I hereby claim:
- I am nubela on github.
- I am nubela (https://keybase.io/nubela) on keybase.
- I have a public key ASCwzBw3njPWLKuA2w5BtNxkDgS6Nteoqp3rwAqIHWHUZgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import datetime | |
import json | |
import pyotp | |
import time | |
import requests | |
import action | |
from cfg import NUMONEY_OTP_SECRET, NUMONEY_API_ENDPOINT |
// Sign requests using: | |
// https://tools.ietf.org/html/draft-cavage-http-signatures-09 | |
import hmacSHA256 from 'crypto-js/hmac-sha256'; | |
import sha256 from 'crypto-js/sha256'; | |
import Base64 from 'crypto-js/enc-base64'; | |
// Signed string be MUST be built from headers in this specific order | |
const SIGNATURE_HEADERS = [ | |
"(request-target)", "host", "accept", "content-type", "x-original-length", |
import struct | |
import numpy as np | |
from pylearn2.utils import serial | |
import theano | |
def read_mnist_images(): | |
path = "mnist/" | |
label_path = path + 't10k-images-idx3-ubyte' | |
dtype = 'float32' |
""" | |
This trains a simple 2-layered MLP for classifying handwritten digits (MNIST dataset) | |
For this script to work, you need to have a ./mnist folder that contains the MNIST dataset. | |
The dataset can be downloaded using the script in the following pylearn2 folder: | |
<workspace>/pylearn2/pylearn2/scripts/datasets/download_mnist.py | |
After training the model (neural network containing layers), it will save trained model to disk. | |
""" |
from random import randint | |
import numpy as np | |
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix | |
from pylearn2.models import mlp | |
from pylearn2.termination_criteria import EpochCounter | |
from pylearn2.training_algorithms import sgd | |
import theano | |
def gen_xor_data(): |
import json | |
from BeautifulSoup import BeautifulSoup | |
import requests | |
FILE_NAME = "result.txt" | |
BASE_URL = "http://www.propertyguru.com.sg/" | |
URL = "http://www.propertyguru.com.sg/singapore-property-listing/property-for-rent/%d?property_type=H" \ | |
"&property_type_code[]=HDB&minprice=1500&maxprice=2500&minsize=1000&distance=0.5¢er_lat=1" \ |
import datetime | |
import random | |
from BeautifulSoup import BeautifulSoup | |
from base.util import generate_uuid | |
from homepage.app import homepage_db | |
from homepage.model import UnsplashImage | |
from homepage_cfg import EXPIRE_UNSPLASH_DAYS, UNSPLASH_IMAGE_DIR | |
import os | |
import requests |
1) Join the Javelin Google+ community at https://plus.google.com/communities/106470412179443137104 | |
2) Go to https://play.google.com/apps/testing/com.nubelacorp.javelin and accept being a beta tester | |
3) Wait about an hour, and check Google Play for a new update |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
import smtplib | |
from threading import Thread | |
from base_cfg import STMP_SERVER_HOST, SMTP_PASSWD, SMTP_USERNAME, FROM_EMAIL_NAME, FROM_EMAIL_ADDR | |
class Mail: | |
""" |