This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/swift | |
import Foundation | |
let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath) | |
let data = try! NSData(contentsOf: path) as Data | |
let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary | |
let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary | |
for (key, value) in mutableDictionary { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The Object | |
// | |
// GenerateMe submission to MCCC Sep 2016 | |
// [email protected] | |
// http://generateme.tumblr.com/ | |
// http://folds2d.tumblr.com/ | |
void setup() { | |
size(540, 540); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import numpy as NP | |
from redis import StrictRedis as redis | |
# a 2D array to serialize | |
A = 10 * NP.random.randn(10000).reshape(1000, 10) | |
# flatten the 2D NumPy array and save it as a binary string | |
array_dtype = str(A.dtype) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#these are meant to be run in a REPL, and the java one in beanshell of something of the sort: | |
#ruby | |
[1,2,3,4].select{ |x| x.even? } | |
#python | |
[x for x in [1,2,3,4] if not x%2] | |
#or, more norvingly | |
filter(lambda x: not x%2, [1,2,3,4]) | |
#clojure |