This file contains 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
from enum import Enum | |
class SmartMode(str, Enum): | |
ON = "on" | |
OFF = "off" | |
class Intensity(str, Enum): | |
FAST = "fast" |
This file contains 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
<!-- this is a modified version of the XML file for ISO metric threads, with offsets of 0.1, 0.15, 0.2, and 0.25. --> | |
<!-- see https://github.com/thomasa88/ThreadKeeper for how to install --> | |
<?xml version='1.0' encoding='utf-8'?> | |
<ThreadType> | |
<Name>ISO Metric profile - Offsets</Name> | |
<CustomName>ISO Metric profile - Offsets</CustomName> | |
<Unit>mm</Unit> | |
<Angle>60</Angle> | |
<SortOrder>3</SortOrder> | |
<ThreadSize> |
This file contains 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 os | |
import re | |
from typing import Set | |
import requests | |
from requests.sessions import RequestsCookieJar | |
import urllib3 | |
""" | |
Poll Traefik for changes to Host configurations, and update EdgeRouter config |
This file contains 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
#! /usr/local/bin/python3 | |
# assumes the the BOM has been generated from https://github.com/macmanpb/CSV-BOM | |
# in 360: install plugin, "create" menu > create BOM, defaults should be fine | |
import csv | |
import argparse | |
boards = [] |
This file contains 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
#!/usr/local/bin/python3 | |
# -*- coding: ascii -*- | |
import sys | |
import subprocess | |
import time | |
import argparse | |
def main(): | |
parser = argparse.ArgumentParser(description="Create new Jekyll pages and publish to GitHub") |
This file contains 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 tkinter | |
import lifxlan | |
class Application(tkinter.Frame): | |
def sendCommand(self, type, val): | |
try: | |
light = self.lights[int(self.selectedLight.get())] | |
except ValueError: | |
return |
This file contains 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 org.graphstream.graph.Edge; | |
import org.graphstream.graph.Graph; | |
import org.graphstream.graph.Node; | |
import org.graphstream.graph.implementations.SingleGraph; | |
import javax.swing.*; | |
import javax.swing.Timer; | |
import java.awt.*; | |
import java.util.*; |
This file contains 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
def update_stack(stack, arg) | |
if /-?\d+(\.\d+)?/.match arg | |
stack.push arg.to_f | |
else | |
i1 = stack.pop | |
i2 = stack.pop | |
begin | |
result = i1.send(arg, i2) | |
stack.push result |