I hereby claim:
- I am danqing on github.
- I am danqing (https://keybase.io/danqing) on keybase.
- I have a public key ASCOgKDXtW1K03A5_coDVN3qeBJSUQjriIw3hqQEWt7YxQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Verifying my Blockstack ID is secured with the address 16DThYAyWydSWE6D2tHYsuYYFJTxAVDK4Y https://explorer.blockstack.org/address/16DThYAyWydSWE6D2tHYsuYYFJTxAVDK4Y |
from datetime import datetime | |
def predict_head_or_tail(): | |
current_second = datetime.now().second | |
return 'head' if current_second % 2 else 'tail' | |
predict_head_or_tail() # 50/50 chance for head/tail |
class FlipPredictor(object): | |
def __init__(self): | |
self.tries = 0 # Total tries so far. | |
self.guess = 5 # Current guess. | |
def predict(self, previous): | |
"""Predict # heads in the next 10 flips. | |
previous is # heads in the previous 10 flips. That's what we learn from! |
from __future__ import print_function | |
import keras | |
from keras.datasets import mnist | |
from keras.models import Sequential | |
from keras.layers import Dense, Dropout | |
from keras.optimizers import RMSprop | |
batch_size = 128 | |
num_classes = 10 |
import numpy | |
from numpy.linalg import norm | |
from nltk.corpus import stopwords | |
from nltk import download | |
download('stopwords') | |
stop_words = stopwords.words('english') | |
sset = [ | |
'whats the weather like', |
#!/usr/bin/env python | |
import xmlrpclib | |
import pip | |
pypi = xmlrpclib.ServerProxy('http://pypi.python.org/pypi') | |
for dist in pip.get_installed_distributions(): | |
available = pypi.package_releases(dist.project_name) | |
if not available: | |
# Try to capitalize pkg name |