Thursday, June 19, 2014

World Cup Python One-Liner

https://gist.github.com/fmasanori/1288160dad16cc473a53



If you don't count imports:

import urllib2, json
print '\n'.join([' '.join((jogo['home_team']['country'], str(jogo['home_team']['goals']), 'x', jogo['away_team']['country'], str(jogo['away_team']['goals']))) for jogo in json.loads(urllib2.urlopen('http://worldcup.sfg.io/matches').read().decode('utf-8')) if jogo['status'] == 'completed'])

Tuesday, March 25, 2014

Variations on the Game 2048

Just like 10Print, the game 2048 has become a folk artifact.  People have been making all kinds of variations of it.  This website seems to be tracking them:

http://phenomist.wordpress.com/2048-variants/

NIST Randomness Beacon

NIST is implementing a prototype source of public randomness.
 The Beacon is designed to provide unpredictability, autonomy, and consistency. 


http://www.nist.gov/itl/csd/ct/nist_beacon.cfm

HN Discussion thread