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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import os | |
class FileSplitter: | |
def __init__(self): | |
self.parse_args(sys.argv) |
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 os | |
import sys | |
import re | |
import boto3 | |
import zipfile | |
def parse_s3_uri(url): | |
match = re.search('^s3://([^/]+)/(.+)', url) | |
if match: | |
return match.group(1), match.group(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
############################# | |
# | |
# Appends the camera model, | |
# extracted from the EXIF data | |
# to the file name. | |
# | |
# RAW file support comes via | |
# a Perl command-line tool | |
# called `exiftool` | |
# |
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
#!/usr/bin/python | |
import sys | |
import os | |
import math | |
import scipy.stats | |
normal_distribution_calculations =[ | |
(1, "Probability that score is less than x (area below)", ["Enter score: "], lambda dist,score: dist.cdf(score)), | |
(2, "Maximum score to satisfy Pr(x) (area below)", ["Enter probability: "], lambda dist,prob: dist.ppf(prob)), | |
(3, "Probability that score is more than x (area above)", ["Enter score: "], lambda dist,score: dist.sf(score)), |
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
alias aliases="egrep '^[^#$ ]' $0 | sed -E 's/^alias ([^=]+)=/\1 => /g' | sort" |
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
NODES = { | |
1 => [2,4,5], | |
2 => [1,3,4,5,6], | |
3 => [2,5,6], | |
4 => [1,2,5,7,8], | |
5 => [1,2,3,4,6,7,8,9], | |
6 => [2,3,5,8,9], | |
7 => [4,5,8], | |
8 => [4,5,6,7,9], | |
9 => [5,6,8] |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'github/markup' | |
if ARGV.length == 1 | |
f = GitHub::Markup.render(ARGV[0]) | |
puts f | |
else | |
raise "Usage: markup <source_file> [ > <destination_file> ]" | |
end |
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
# too much stuff to camelize the json object keys | |
# so that they are ready for the templates | |
def camelized(emp) | |
puts emp.inspect | |
if emp.is_a?(Array) | |
new = [] | |
emp.each {|e| new << camelize_keys(e)} | |
else | |
new = camelize_keys(emp) |
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
#!/usr/bin/ruby | |
######################### | |
# | |
# Convert rubycode with 4-space indents | |
# to regulation 2-space indenting format. | |
# | |
# supply directory as argument: | |
# > ruby indentity_correction.rb ./my_code_dir | |
# |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDjUroth5dd9SB+U8SuAKnmGgrDPeHGFFwqAXKeNJ+wht6mVXLipDs01eVii3a7Ibkalh2v45+KleiQoXXYhaLuvuq1KskGU7lv5bJUcQWicoBWh/OtrrzmWHlsesq1EDXjqDL0bgm2sQ+efO5G1qnBhwZ7PNXH6CHb8ayuySk8m4N0R/8Sn188LwAdFy2jgcAWuOM8wXACK41JaH38HwMsgrjIphCoxZbAYtufa+wkqztEs546wBk6vDJn46J432LhxXuN5TY9BV043qLQl3Y9RDkRk5Siq63a3vioKYWsqlxIbiN0FAae9S6Klg0pVZYDsJajyYycMIJlGvAx7AGt |
NewerOlder