Skip to content

Instantly share code, notes, and snippets.

View goakley's full-sized avatar

Glen Oakley goakley

View GitHub Profile
@goakley
goakley / tilted.py
Created March 24, 2014 03:01
Tilts the screen based on the orientation of my laptop
#!/usr/bin/python3
from collections import deque
from time import sleep
from os import system
def tilt():
with open('/sys/devices/platform/lis3lv02d/position') as f:
return int(f.read().split(",")[1])
#!/bin/bash
editors="ed ex vi emacs"
echo $editors | sed s/\ /\\n/g | shuf | head -1
type Point = (Double,Double)
type Triangle = (Point,Point,Point)
type Sierpinski = [Triangle]
midpoint :: Point -> Point -> Point
-- ^point between two points
midpoint (x1,y1) (x2,y2) = ((x1 + x2) / 2, (y1 + y2) / 2)
vec :: Point -> Point -> Point
-- ^two points into a vector
input :: [String]
input = [
"billowy",
"biopsy",
"chinos",
"defaced",
"chintz",
"sponged",
"bijoux",
"abhors",
@goakley
goakley / main.py
Last active March 22, 2022 17:27
zytemp script for use with streetturtle/noobie
import json
import pyzytemp
def main():
t = None
co = None
x = pyzytemp.find()
if x:
temp = x[0]
attempts = 8