Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#!/usr/bin/ruby | |
# This script installs to /usr/local only. To install elsewhere you can just | |
# untar https://github.com/mxcl/homebrew/tarball/master anywhere you like. | |
module Tty extend self | |
def blue; bold 34; end | |
def white; bold 39; end | |
def red; underline 31; end | |
def reset; escape 0; end | |
def bold n; escape "1;#{n}" end |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Top Twitter</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
<link type="text/css" href="styles.css" rel="stylesheet" /> | |
</head> | |
<body> | |
<h1 id='title'> Top 100 artists with verified Twitter accounts</h1> | |
<ol id="results"> </ol> |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
One of my favorite past times is to look at the notebooks of famous scientists. Da Vinci's notebook is well known, but there plenty others. Worshipping Da Vinci like no other, I bought a Think/Create/Record journal, used it mostly to keep jot down random thoughts and take notes. This was great in the beginning, but the conformity of lines drove me nuts. Only moleskines made blank notebooks, so I had to buy one.
At the same time I started a freelance project. The project itself is irrelevant, but suffice to say it was very complex and spanned several months. It seemed like a perfect opportunity to use the moleskine. Looking back, all my entries fell under few categories:
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
Verifying myself: My Bitcoin username is +cpo. https://onename.io/cpo |
I hereby claim:
To claim this, I am signing this object:
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.chart div { | |
font: 10px sans-serif; | |
background-color: steelblue; | |
text-align: right; | |
padding: 3px; | |
margin: 1px; |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
body { font-family: sans-serif; } | |
</style> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<body> | |
<script> | |
// var resource = 'https://dataclips.heroku.com/vgyygvzqtezwpmwpcmmjlluamjlk.json'; | |
// Replaced with local copy (CORS) |