I hereby claim:
- I am roasbeef on github.
- I am roasbeef (https://keybase.io/roasbeef) on keybase.
- I have a public key whose fingerprint is 22A7 C9B3 4B87 24FF EAD5 9B0A ABA2 7102 5DF9 FA50
To claim this, I am signing this object:
#Sum of digits of 2^1000 | |
from functools import reduce | |
#Solution Number:1 | |
reduce(lambda a,b: a+b, [int(x) for x in str(2**1000)]) | |
#Solution Number:2 | |
sum([int(x) for x in str(2**1000)]) |
def quicksort(lst): | |
if len(lst) == 0: | |
return [] | |
else: | |
return quicksort([x for x in list[1:] if x < lst[0]]) + [list[0] + \ | |
quicksort([x for x in list[1:] if x >= lst[0]]) |
import tweepy | |
import time | |
def get_weather(city): | |
''' | |
returns a dictionary of the forecast for a specified city | |
''' | |
import requests | |
from xml.dom import minidom |
import os | |
import requests | |
''' | |
url = self.request.get('url') | |
try: | |
l = Link() | |
l.seed(url) | |
except ValueError: | |
self.render('index.html', error='Invalid Url') | |
''' |
from math import ceil | |
# Write a function called numPizzas, that takes the number of people present, | |
# the number of slices in a pizza, and the time of day, and returns the | |
# number of pizzas to buy (as a whole integer). | |
# | |
# Spec: | |
# Signature: int numPizzas(int numPeople, int slicesPerPizza, int time) | |
# Time is an int on 24-hour clock (0-23), e.g. 8 = 8am, 14 = 2pm | |
# 11 = 11am 11pm = 23 |
from collections import Counter | |
import requests | |
r = requests.get("http://www.reddit.com/r/christmas/new.json?sort=new&limit=100") | |
data = json.loads(r.content) | |
titles = ''.join(submission['data']['title'] for submission in data['data']['children']) | |
title_words = [word for word in titles.split() if len(title) > 4 and title.isalpha()] | |
top_count = Counter(title_words).most_common(5) #[(u'Christmas', 52), (u'Santa', 6), (u'about', 4), (u'first', 4), (u'Holiday', 4)] |
I hereby claim:
To claim this, I am signing this object:
Verifying that +roasbeef is my openname (Bitcoin username). https://onename.io/roasbeef |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v2.0.22 (GNU/Linux) | |
mQINBFXx788BEACuas8986iaZS6n3nkRrFSd+I4AWyb7TbOsmLGrMKmbKbZKSWpI | |
0cKWX88m1I8VZr1ELgkneHsRGgHxonY+FGsiA1JaYbvN3qT7hXrWggVsfhqr6vg/ | |
8RVdSHolatX4hdWl0zZQ6gT6yTk8wzrxCTJD4AUiRec1Tff4gHJDZLn5cvYPMAgI | |
ex4EqfDeAxSkyjMyMZ+W3uBGAyk5oihUnkaj4FsQH8nhhAr0fLUnBV2gmPPWm7d0 | |
IHpX9KiXorDGdEWhVSIEExBMDXHG4C/nwJiFYRTqkbrVVXo9xdhWJ6V5ewDUUegX | |
cuEiSLMj1cj0ORvRiZHaa213GgfEVg95nFnLorg7LEzBo3V7IrjKMdwG17Z/Wgsh | |
UNvJEXaHn1+LoZWVVijtS79f08AKRyI0axaxRikjP5FgUDnSExhVu1IZLb2WS+l7 |
https://drive.google.com/file/d/0Bw2QYpaOa7bTVGZFVHVlXzd1RGc/view?usp=sharing |