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
#!/bin/bash | |
root=http://ngm.nationalgeographic.com | |
path=ngm/photo-contest/2012/entries/wallpaper | |
type=(nature places people) | |
for kind in "${type[@]}" | |
do | |
for week in {1..13} | |
do |
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 org.apache.avro.generic.GenericRecord | |
import org.apache.avro.mapred.AvroKey | |
import org.apache.avro.mapreduce.AvroKeyInputFormat | |
import org.apache.hadoop.io.NullWritable | |
import org.apache.spark.SparkContext | |
private def readAvro(sparkContext: SparkContext, path: String) = { | |
sparkContext.newAPIHadoopFile[ | |
AvroKey[GenericRecord], | |
NullWritable, |
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
[MASTER] | |
# Specify a configuration file. | |
#rcfile= | |
# Python code to execute, usually for sys.path manipulation such as | |
# pygtk.require(). | |
#init-hook= | |
# Profiled execution. |
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
redshift -l 59.29:18.01 -t 5800:4500 |
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
logging.basicConfig( | |
level=logging.INFO, | |
format='%(asctime)s - %(levelname)5s - %(name)s - %(message)s', | |
filename=os.path.join(os.path.sep, 'path'), | |
) | |
def get_log_handler(): | |
log_format = '%(asctime)s - %(levelname)5s - %(name)s - %(message)s' | |
log_filename = os.path.join(os.path.sep, 'path') | |
log_formatter = logging.Formatter(log_format) |
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
ls -lhac |
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
#!/bin/bash | |
root=http://ngm.nationalgeographic.com/wallpaper/img/ | |
year_number=07 | |
months_letters=(jan feb march april may june july aug sept oct nov dec) | |
for month in {1..12} | |
do | |
month_letters=${months_letters[month - 1]} | |
for index in {1..20} |
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
#!/bin/bash | |
root=http://ngm.nationalgeographic.com | |
months=(january february march april may june july august september october november december) | |
download() { | |
year=$1 | |
from=$2 | |
to=$3 | |
for month in $(seq $from $to) |
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
style "scrollbar" | |
{ | |
GtkScrollbar::trough-border = 0 | |
} | |
class "Gtk*Scrollbar" style "scrollbar" |
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
sudo sh -c "ulimit -n 65535 && exec su $LOGNAME" |
OlderNewer