Skip to content

Instantly share code, notes, and snippets.

View henryiii's full-sized avatar
👨‍🍼
New baby

Henry Schreiner henryiii

👨‍🍼
New baby
View GitHub Profile
@henryiii
henryiii / bstemplate.bash
Last active December 18, 2015 20:29
Bash Script Template, copy useful parts.
#!/usr/bin/env bash
# No argument version (any argument prints help)
if [ $# -gt 0 ] ; then
echo "$(echo $0 | sed "s;$HOME;~;")"
echo "Help command output"
exit 0
fi
@henryiii
henryiii / setgrades.py
Last active August 29, 2015 14:11
This is a python based grading program. Requires Anaconda, or standard scientific python libraries. Uses TK graphics, so you don't need to have Qt.
#!/usr/bin/env python
'''
Set final grades
Henry Schreiner
Version 1.5
This requires Anaconda, or the following:
* Python 2.7 or 3.3+
* Numpy
@henryiii
henryiii / sockcom.py
Created July 28, 2014 14:28
basic comm code
#!/usr/bin/env python
import socket
import pickle
import time
TCP_IP_PORT = '192.168.1.8', 5005
BUFFER_SIZE = 1024
RMSG = "recvd."
@henryiii
henryiii / textmanipui.py
Created July 16, 2014 03:38
UI powered text manipulation
# perform actions on a selected block of text
import editor
import ui
sel = editor.get_selection()
text = editor.get_text()
if sel[0]-sel[1]:
text = text[sel[0]:sel[1]]
@henryiii
henryiii / uidir.py
Last active August 29, 2015 14:03
directory viewer for ui
# coding: utf-8
import ui
import os
import console
class MyTableViewDataSource (object):
sel = [None]
def __init__(self, base_dir = '.'):
@henryiii
henryiii / iDG.py
Last active August 29, 2015 14:02
iDG.py
import ui
import console
#from DetGUI.connection import Detector
sz = ui.get_screen_size()
banner = 108
class MyTextFieldDelegate (object):
def __init__(self,but):
self.but = but
@henryiii
henryiii / installsympy.py
Last active August 29, 2015 13:56
installsimpy
# Install SimPy
import urllib
import tarfile
import shutil
import console
import os
name = 'sympy'
version = '0.7.5'