Skip to content

Instantly share code, notes, and snippets.

View tsbertalan's full-sized avatar

Tom Bertalan tsbertalan

  • University of Massachusetts Lowell
  • United States
View GitHub Profile
@tsbertalan
tsbertalan / graph_hw1.py
Created September 27, 2012 14:15
Make graphs from the output of APC 524's HW1. Be sure to suitable edit the filename and authorname variables near the top.
import csv
import matplotlib.pyplot as plt
def import_text(filename, separator):
for line in csv.reader(open(filename), delimiter=separator, skipinitialspace=True):
if line:
yield line
results = []
t = []
x = []
@tsbertalan
tsbertalan / cosbifier.py
Created September 8, 2012 14:10
Change your name (or any string) to Bill Cosby speak!
#!/usr/bin/python
#http://cheezburger.com/4925161216
parts = {
'a': 'Hip', 'b': 'Dip', 'c': 'Squoo', 'd': 'Bada', 'e': 'Meep',
'f': 'Bloo', 'g': 'Caw', 'h': 'Squee', 'i': 'Woobly', 'j': 'Badum',
'k': 'Loo', 'l': 'Derp', 'm': 'Nerp', 'n': 'Spee', 'o': 'Papa',
'p': 'Moom', 'q': 'Dub', 'r': 'Pa', 's': 'Naw', 't': 'Ka',
'u': 'Mim', 'v': 'Zap', 'w': 'Nup', 'x': 'Na', 'y': 'Yee',
'z': 'Zoop', ' ': ' '
}
@tsbertalan
tsbertalan / reuben.sh
Created August 19, 2012 18:42
A parameterized song!
#!/bin/sh
echo ""
echo "Reuben, Reuben, I've been thinkin,"
echo "what a fine world it would be,"
echo "if all the $1 were just transported"
echo "all across the northern sea."
echo ""
@tsbertalan
tsbertalan / bpnn.py
Created August 7, 2012 18:30 — forked from raphaelsaunier/bnpnn.py
Back-Propagation Neural Networks by Neil Schemenauer <[email protected]>
# Back-Propagation Neural Networks
#
# Written in Python. See http://www.python.org/
# Placed in the public domain.
# Neil Schemenauer <[email protected]>
#
# Changes:
# 2009-01-30 Fix dsigmoid() to use correct derivative rather than an
# approximation. Suggested by Andrew Lionel Blais.