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 urlparse | |
from urllib import urlretrieve | |
base_url = 'http://ngm.nationalgeographic.com/' | |
urls = [ \ | |
"/u/H6yMi6fUB_1JR964xxG8RxsYArlNNn1lR5PWutchJ4t_YnYgRQSgSbjtWe2l0Iy-oLGsA9CsqdnrlLhmR0g3rCSzBRF7/", \ | |
"/u/H6yMi6fUB_1JR964xxG8RxsYArlNNn1lR5PWutchJ4t_Y-BNZaUHGX3GhRGQkkys1pZ0r6MMH1tkBqLFL_pSFt3xA3Oi/", \ | |
"/u/H6yMi6fUB_1JR964xxG8RxsYArlNNn1lR5PWutchJ4t6VV_HIvlh3DLvd9e4D4G0uBFWsZpxfwWu_TJ9TchpFQyt2qg8/", \ | |
"/u/H6yMi6fUB_1JR964xxG8RxsYArlNNn1lR5PWutchJ4rkKJOkhh6J27Lg1KkOxF6sBxFqALR33By8KpJ5CndmMknK8Yyx/", \ |
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
ctrl-z | |
bg | |
touch /tmp/stdout | |
touch /tmp/stderr | |
gdb -p $! | |
# In GDB | |
p dup2(open("/tmp/stdout", 1), 1) | |
p dup2(open("/tmp/stderr", 1), 2) |
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
// JAVA REFERENCE IMPLEMENTATION OF IMPROVED NOISE - COPYRIGHT 2002 KEN PERLIN. | |
public final class ImprovedNoise { | |
static public double noise(double x, double y, double z) { | |
int X = (int)Math.floor(x) & 255, // FIND UNIT CUBE THAT | |
Y = (int)Math.floor(y) & 255, // CONTAINS POINT. | |
Z = (int)Math.floor(z) & 255; | |
x -= Math.floor(x); // FIND RELATIVE X,Y,Z | |
y -= Math.floor(y); // OF POINT IN CUBE. | |
z -= Math.floor(z); |
NewerOlder