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 / 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 / git-all.py
Last active July 26, 2017 10:02
Fast repository status for repos in git folder, Python Rewrite.
#!/usr/bin/env python3
from plumbum import local, cli, FG, BG, TF, ProcessExecutionError, colors
from plumbum.cmd import tput, git
from contextlib import contextmanager
from functools import partial
# This can be hard coded to a repo location, or cwd, etc.
# REPOLOC = local.path(__file__) / '..'
REPOLOC = local.env.home / 'git'
@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

@henryiii
henryiii / landau.cpp
Created November 17, 2017 19:07
Simple example of PyBind11 landau binding
// Taken from LCG ROOT MathLib
// License info:
// Authors: Andras Zsenei & Lorenzo Moneta 06/2005
/**********************************************************************
* *
* Copyright (c) 2005 , LCG ROOT MathLib Team *
* *
* *
**********************************************************************/
@henryiii
henryiii / hist.py
Last active April 22, 2019 09:04 — forked from jpivarski/hist.py
Functional histogram slice proposal
import numbers
import math
import numpy
class Binning:
"Abstract superclass of all binning types. Only Regular is implemented."
def __init__(self, *args, **kwargs):
raise NotImplementedError
@henryiii
henryiii / pypi_counter.ipynb
Created April 26, 2019 12:41
PyPI counter
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python3
from argparse import ArgumentParser
from pathlib import Path
from textwrap import indent
import curses
import unicodedata
FOLDER_OPEN = unicodedata.lookup('Open File Folder')
FOLDER_CLOSED = unicodedata.lookup('File Folder')
@henryiii
henryiii / 04_runge_kutta.ipynb
Created January 23, 2020 06:09
RungeKutta Example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.