Skip to content

Instantly share code, notes, and snippets.

Henry Schreiner henryiii

Block or report user

Report or block henryiii

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View installsympy.py
# Install SimPy
import urllib
import tarfile
import shutil
import console
import os
name = 'sympy'
version = '0.7.5'
View 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 / uidir.py
Last active Aug 29, 2015
directory viewer for ui
View uidir.py
# coding: utf-8
import ui
import os
import console
class MyTableViewDataSource (object):
sel = [None]
def __init__(self, base_dir = '.'):
@henryiii
henryiii / h2048.py
Last active Aug 29, 2015
Pythonista 2048 clone, using ui module. Also should work in any Python console. Added jsbain's swipe implementation.
View h2048.py
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 12 09:33:29 2014
@author: henryiii
Added improvents by JonB (swipes), techteej (design), LawAbidingCactus (size)
"""
import console, random
@henryiii
henryiii / textmanipui.py
Created Jul 16, 2014
UI powered text manipulation
View textmanipui.py
# 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 / cards.py
Last active Aug 29, 2015
base for card games
View cards.py
# -*- coding: utf-8 -*-
"""
Created on Sun Jul 20 17:27:33 2014
@author: henryiii
"""
# http://en.wikipedia.org/wiki/Playing_cards_in_Unicode
from __future__ import unicode_literals, division
@henryiii
henryiii / sockcom.py
Created Jul 28, 2014
basic comm code
View sockcom.py
#!/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 / setgrades.py
Last active Aug 29, 2015
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.
View setgrades.py
#!/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 / bstemplate.bash
Last active Dec 18, 2015
Bash Script Template, copy useful parts.
View bstemplate.bash
#!/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 / pstemplate.py
Created Jun 22, 2013
Python Script Template, copy useful parts.
View pstemplate.py
#!/usr/bin/env python
import argparse
import os
DIR = os.path.realpath(__file__)
parser = argparse.ArgumentParser(description='Send files to web server')
parser.add_argument('-n', '--nochange',
help='make a dry run, don\'t send anything',
You can’t perform that action at this time.