Skip to content

Instantly share code, notes, and snippets.

View calebrob6's full-sized avatar

Caleb Robinson calebrob6

View GitHub Profile
@calebrob6
calebrob6 / fixDate.sh
Created September 18, 2015 02:18
Run when clock stops displaying on Ubuntu Unity top bar
sudo dpkg-reconfigure --frontend noninteractive tzdata
sudo killall unity-panel-service
import sys
import json
from collections import defaultdict
f = open("stopwords.txt","r")
stopwords = []
for line in f:
stopwords.append(line.strip())
f.close()
def filterLines(lines):
size = 4
for x,y in lines:
if x>16 or y>16:
size = 5
ignored = []
for x,y in lines:
if x==0: ignored.append(y)
import sys
excersiseCards = {
"a":[50,"jumping jacks"],
"b":[20,"crunches"],
"c":[30,"squats"],
"d":[15,"pushups"],
"e":[60,"wall sit"],
"f":[10,"burpees"],
"g":[20,"arm circles"],
import sys
from multiprocessing import Pool
excersiseCards = {
"a":[50,"jumping jacks"],
"b":[20,"crunches"],
"c":[30,"squats"],
"d":[15,"pushups"],
"e":[60,"wall sit"],
@calebrob6
calebrob6 / template.py
Last active March 10, 2025 17:22
General python program template
#!/usr/bin/env python
import sys,os
import time
import argparse
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
'''
Using data from here http://pjreddie.com/projects/mnist-in-csv/
-- Each row is: label, comma seperated version of 28*28 greyscale image
Good example: http://scikit-learn.org/stable/auto_examples/classification/plot_digits_classification.html#example-classification-plot-digits-classification-py
'''
import numpy as np
import sys
import os
import time
import cv2
import numpy as np
def getOutline(img):
@calebrob6
calebrob6 / ipythonTemplate.py
Last active January 5, 2017 05:11
IPython Notebook Header
%matplotlib inline
import sys
import os
import time
import warnings
#warnings.filterwarnings("ignore")
#with warnings.catch_warnings():
# warnings.simplefilter("ignore")
import matplotlib as mpl
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © %YEAR% %USER% <%MAIL%>
#
# Distributed under terms of the %LICENSE% license.
import sys
import time