I hereby claim:
- I am jirwin on github.
- I am jirwin (https://keybase.io/jirwin) on keybase.
- I have a public key whose fingerprint is E7E9 EC7B B01D 83F7 7A00 4520 9F8F EAFE DD7C 8BA4
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
var customer = require('./lib/http/customer'); | |
customer.getCustomerContacts('731078', {}, function(err, contacts) { | |
console.dir(err); | |
console.dir(contacts); | |
process.exit(0); | |
}); |
use URI::Find::Rule; | |
use LWP::Simple; | |
use HTML::TokeParser; | |
use Time::localtime; | |
use Hackabot::Client; | |
my $hbc = Hackabot::Client->new; | |
sub bitly_link { |
syntax on | |
filetype on | |
color evening | |
set nu | |
set ai | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
"------------ editor behaviour block ------------------ | |
set ruler " show curser position at all times |
search_method = request.params.get('search_method', None) | |
if not search_method: | |
search_method = 'keyword' |
alpha_to_numeric = { 'A': 2, 'B': 3, 'C': 4, 'D': 5, | |
'E': 6, 'F': 7, 'G': 8, 'H': 9, | |
'I': 0, 'J': 1, 'K': 2, 'L': 3, | |
'M': 4, 'N': 5, 'O': 6, 'P': 7, | |
'Q': 8, 'R': 9, 'S': 0, 'T': 1, | |
'U': 2, 'V': 3, 'W': 4, 'X': 5, | |
'Y': 6, 'Z': 7} |
nums = "1234567890" | |
even = [] | |
odd_total = reduce(lambda x, y: x+y, filter(None, (int(x) if (ii+1) % 2 else even.append(int(x)) for ii, x in enumerate(nums)))) | |
even_total = reduce(lambda x, y: x+y, even) |
def validate(self, tracking_number): | |
"Return True if this is a valid UPS tracking number." | |
tracking_num = tracking_number[2:-1] | |
odd_total = 0 | |
even_total = 0 | |
for ii, digit in enumerate(tracking_num.upper()): | |
try: | |
value = int(digit) | |
except ValueError: |
for ii in range(MAX): | |
try: | |
some_action() | |
except socket.error, e: | |
pass | |
raise e |
def get_nearby_zipcodes(zipc, radius=15): | |
q = Quadtree([65, 15, 180, 75]) | |
with open('/home/jirwin/zips.txt') as zips: | |
for line in zips: | |
line = line.rstrip().replace('"', '') | |
zipcode, city, state, longitude, latitude = line.split(',')[1:-2] | |
lat = float(latitude) | |
lon = float(longitude) | |
zipcode = int(zipcode) | |
q.add(zipcode, [lon, |