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/bin/env python3 | |
import sys | |
temps = sys.argv[1:] | |
for ln in sys.stdin: | |
if ln.rstrip() == 'M600': | |
sys.stdout.write('M104 S' + temps.pop(0) + '\n') | |
else: | |
sys.stdout.write(ln) |
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/bin/env python3 | |
import random | |
from colormath.color_objects import LabColor, sRGBColor | |
from colormath.color_conversions import convert_color | |
from colormath.color_diff import delta_e_cie2000 | |
print("<style>body { font-size: 24pt; font-family: monospace; }</style>"); | |
def random_srgb(): | |
return sRGBColor( |
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/bin/env python3 | |
import sys | |
temps = sys.argv[1:] | |
for ln in sys.stdin: | |
if ln.rstrip() == 'M600': | |
sys.stdout.write('M104 S' + temps.pop(0) + '\n') | |
else: | |
sys.stdout.write(ln) |
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
// Copyright 2021 Keegan McAllister | |
// License: CC-BY 4.0 | |
// https://creativecommons.org/licenses/by/4.0/ | |
include <MCAD/units.scad> | |
/* [Part selection] */ | |
// Part selection | |
part = "assembly"; // [assembly, plate, grid, rail, base] |
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
module menger_sponge(n) { | |
if (n <= 0) { | |
cube(center=true); | |
} else { | |
for (x=[-1:1]) { | |
for (y=[-1:1]) { | |
for (z=[-1:1]) { | |
if (abs(x)+abs(y)+abs(z) >= 2) { | |
scale(1/3) | |
translate([x,y,z]) |
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
#include "DHT.h" | |
#define DHTPIN 2 | |
#define DHTTYPE DHT11 | |
#define PERIOD 5000 | |
DHT dht(DHTPIN, DHTTYPE); | |
void setup() { |
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
#!/bin/sh | |
#set -e | |
./ewma.py < log > smoothed | |
echo | |
./progress.py "$@" < smoothed | |
echo | |
gnuplot < weight-graph.gpl |
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/bin/env python3 | |
import time | |
import sys | |
repeats = 12 | |
phases = [ | |
('Inhale', 4), | |
('Hold', 2), | |
('Exhale', 6), |
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/bin/env python | |
import time | |
import visa | |
IP_ADDR = '192.168.50.219' | |
INTERVAL = 1.0 | |
rm = visa.ResourceManager('@py') | |
scope = rm.open_resource('TCPIP::%s::INSTR' % (IP_ADDR,)) |
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/bin/env python | |
import itertools | |
import colorsys | |
import datetime | |
import irc.bot | |
import random | |
import socket | |
import struct | |
import sys | |
import re |
NewerOlder