This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import re | |
from subprocess import CalledProcessError | |
from libqtile.widget import base | |
class NvidiaSensors2(base.ThreadPoolText): | |
""" | |
Displays arbitrary sensor data from Nvidia GPU(s). | |
Not backwards-compatible with ``libqtile.widget.NvidiaSensors``. | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ##### BEGIN GPL LICENSE BLOCK ##### | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class GridBitmap | |
{ | |
public static Bitmap Create(int repeatX, int repeatY, Size bitmapSize, Color foreground, Color background) | |
{ | |
// Check for division by zero | |
if (repeatX == 0 || repeatY == 0) | |
throw new ArgumentException("Division by zero."); | |
Bitmap bmp = new Bitmap(bitmapSize.Width, bitmapSize.Height); | |
Graphics g = Graphics.FromImage(bmp); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>mcl</Title> | |
<Shortcut>mcl</Shortcut> | |
<Description>Inserts ModConsole.Log(), or wraps selected code inside the method.</Description> | |
<Author>Wampa842</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
When the mod is loaded, instantiate your GameObject, then set its position to somewhere in Teimo's shop. | |
The GameObject must have the usual interactivity components - a convex MeshCollider and a Rigidbody. | |
It's best to set Rigidbody.isKinematic to true and GameObject.tag to "Untagged" before adding the behaviour component. | |
*/ | |
/*MIT License | |
Copyright(c) 2018 Wampa842 | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The first parameter defines the platform (1: PC, 2: PS4, 3: XBO). If it's 0 or undefined, the function won't fetch anything - it'll instead use a static timestamp. | |
//I don't think there's any major difference between the platforms' times, you can probably safely use the PC data and remove the unnecessary lines. | |
//On success, the time is passed to the callback function. On any error, the callback will receive the static timestamp. | |
function getCetusTime(platform, callback) | |
{ | |
var timestamp = 1510884902; //Static timestamp to be returned in case of an error. Correct as of 2018-02-13, for PC version 22.12.2. Might not be accurate in the future. | |
if(!platform || (platform > 3)) | |
{ | |
callback(timestamp); | |
return; |