Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| Shader "Bumped Specular" { | |
| Properties { | |
| _Color ("Main Color", Color) = (1,1,1,1) | |
| _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) | |
| _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 | |
| _MainTex ("Base (RGB) Gloss (A)", 2D) = "white" {} | |
| _BumpMap ("Normalmap", 2D) = "bump" {} | |
| } | |
| SubShader { | |
| Tags { "RenderType"="Opaque" } |
| window.onload = function() { | |
| var v0 = new Vertex("0"); | |
| var v1 = new Vertex("1"); | |
| var v2 = new Vertex("2"); | |
| var v3 = new Vertex("3"); | |
| var v4 = new Vertex("4"); | |
| var v5 = new Vertex("5"); | |
| var v6 = new Vertex("6"); | |
| var v7 = new Vertex("7"); |
| function! ToggleMinimap() | |
| if exists("s:isMini") && s:isMini == 0 | |
| let s:isMini = 1 | |
| else | |
| let s:isMini = 0 | |
| end | |
| if (s:isMini == 0) |
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
| the | |
| of | |
| to | |
| and | |
| a | |
| in | |
| is | |
| it | |
| you | |
| that |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Restricted Boltzmann Machine (RBM) | |
| References : | |
| - Y. Bengio, P. Lamblin, D. Popovici, H. Larochelle: Greedy Layer-Wise | |
| Training of Deep Networks, Advances in Neural Information Processing | |
| Systems 19, 2007 |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "github.com/gorilla/sessions" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "net/url" |