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 / 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'
@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 / 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 / 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 / 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 / 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 / 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 / pstemplate.py
Created June 22, 2013 16:49
Python Script Template, copy useful parts.
#!/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',
@henryiii
henryiii / gist:6274508
Created August 19, 2013 21:39
pyqttemplate.py
#!\usr\bin\env python
from PyQt4 import QtCore, QtGui, uic
import sys
import os
Slot = QtCore.pyqtSlot
Signal = QtCore.pyqtSignal
LoadUI = uic.loadUi
if getattr(sys, 'frozen', None):
@henryiii
henryiii / auto-deploy_documentation.md
Last active February 15, 2017 17:24 — forked from vidavidorra/auto-deploy_documentation.md
Auto-deploying Doxygen documentation to gh-pages with Travis CI

Auto-deploying Doxygen documentation to gh-pages with Travis CI

This explains how to setup for GitHub projects which automatically generates Doxygen code documentation and publishes the documentation to the gh-pages branch using Travis CI. This way only the source files need to be pushed to GitHub and the gh-pages branch is automatically updated with the generated Doxygen documentation.

Sign up for Travis CI and add your project

Get an account at Travis CI. Turn on Travis for your repository in question, using the Travis control panel.

Create a clean gh-pages branch

To create a clean gh-pages branch, with no commit history, from the master branch enter the code below in the Git Shell. This will create a gh-pages branch with one file, the README.md in it. It doesn't really matter what file is uploaded in it since it will be overwritten when the automatically generated documentation is published to th