Skip to content

Instantly share code, notes, and snippets.

View AlanHohn's full-sized avatar

Alan Hohn AlanHohn

View GitHub Profile
@AlanHohn
AlanHohn / makecsv.py
Created January 19, 2017 13:59
Generate a random CSV in Python
#!/usr/bin/python
import csv
import random
records=9000000
print("Making %d records\n" % records)
fieldnames=['id','name','age','city']
writer = csv.DictWriter(open("people.csv", "w"), fieldnames=fieldnames)
@AlanHohn
AlanHohn / Test.java
Created October 3, 2016 14:33
Java stream array sum
import java.util.Arrays;
public class Test {
public static void main(String[] args) {
int[] arr = { 1, 2, 3, 4, 5 };
int sum = Arrays.stream(arr).sum();
System.out.println("Sum is: " + sum);

Keybase proof

I hereby claim:

  • I am alanhohn on github.
  • I am alanhohn (https://keybase.io/alanhohn) on keybase.
  • I have a public key whose fingerprint is 8925 7A98 AA4F B1AD 53BD 42E0 37E7 06B2 5CD2 43B7

To claim this, I am signing this object: