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
Learn a variety of programming paradigms:
- Write a program in assembly language
#include <iostream> | |
#include <vector> | |
#include <array> | |
typedef std::array<float, 2> xyCoord; | |
float isInCircle(float x, float y, float radius); | |
void setSquareCoords(int row, int column, std::array<xyCoord, 4>& square); | |
int main() |
function Card(s, n) { | |
var suit = s; | |
var number = n; | |
this.getNumber = function() { | |
return number; | |
}; | |
this.getSuit = function() { | |
return suit; | |
}; | |
this.getValue = function() { |
#!/usr/bin/env python2 | |
# | |
# galaxy - jzhu98 | |
# See bottom for LICENSE. | |
# | |
from __future__ import division | |
from math import fsum | |
from random import gauss |
#!/usr/bin/env python2 | |
# | |
# chaos - jzhu98 | |
# See bottom for license. | |
# | |
from __future__ import division | |
from enum import Enum |
# FRACTRAN - jzhu98 | |
# See bottom for license. | |
from fractions import Fraction | |
# Input FRACTRAN code here | |
code = "455/33,11/13,1/11,3/7,11/2,1/3" | |
def parse_input(string): | |
"""Return a list of fractions from the code.""" |
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
Learn a variety of programming paradigms:
/#!/usr/bin/bash | |
# Recrops images in working directory to 16:9 resolution. | |
# Picks the smallest resolution which fits the image with minimal cropping. | |
OUTPUT_DIR="recropped" | |
EXT="jpg" | |
mkdir -p "$OUTPUT_DIR" |
I hereby claim:
To claim this, I am signing this object:
#include<math.h> | |
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define LED_PIN 0 | |
#define NUM_LEDS 60 | |
#define BRIGHTNESS 127 |
# .gitconfig - jameslzhu | |
[user] | |
name = James Zhu | |
email = jameszhu@berkeley.edu | |
[core] | |
editor = vim | |
autocrlf = input | |
filemode = false |