This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
/* | |
============================================================================ | |
Name : 660__Lab04.c | |
Author : Michael Kusold | |
Version : 0.3 | |
Description : This program is an extension of 660_Lab03.c which was an | |
extension of 660_Lab01. It implements a persistent state | |
history file. The history file location is ./kusold.history. | |
The history file is saved immediately before the user exits | |
the program by ^D. If the program is terminated in another |
//////////////////////////////////////////////////////// | |
// | |
// A simple OpenGL program that allows you to place | |
// line segments, rotate them, and scale them. Some | |
// other features are changing the color via a right | |
// click menu, creating a star, creating a polygon, | |
// and creating a spiral. | |
// | |
// When 200 lines are drawn, you need to clear the | |
// window to draw more. |
############################################################################### | |
## Description: FuzzyMatch.py takes two files with one keyword per line as ## | |
## command line arguments. It then creates a file with 100% ## | |
## matches called Match100.txt. Next it tries to match the ## | |
## remaining files that are at least 75% similar. If more than ## | |
## one match occurs, it picks the best match and outputs it ## | |
## to Match75.csv. ## | |
## ## | |
## Note: Currently the two files are hardcoded in. Arguments ## | |
## will be implemented later. ## |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
import time | |
def collatz(n): | |
length = 0 | |
i = n | |
while( i > 1): | |
if(i%2 == 0): | |
i /= 2 | |
else: | |
i = 3*i + 1 |
i = 1 | |
while ( i < 100): | |
string = "" | |
if (i%3 == 0): | |
string += "Fizz" | |
if (i%5 == 0): | |
string += "Buzz" | |
if string == "": | |
string = str(i) | |
string += ", " |
var isOdd = function (n) { | |
if (n % 2 === 0) { | |
return false; | |
} else { | |
return true; | |
} | |
}; | |
var isEven = function (n) { | |
if (n % 2 === 0) { |
import time | |
def worthlessCalculator(n): | |
if n <= 3: | |
return 5 | |
output = (3 * worthlessCalculator(n-1) + 5 * worthlessCalculator(n-3) + 7 * worthlessCalculator(n-4) + 11) % 15490549 | |
return output | |
input = -1 |
#!/bin/sh | |
## | |
## Switches grails versions by changing the the symlink ~/grails to a | |
## ~/grails-$VERSION | |
## | |
## Author: Dan Lynn ([email protected]) | |
## Modified: Mike Kusold ([email protected]) | |
if [ -z "$1" ]; then |