Skip to content

Instantly share code, notes, and snippets.

View captSteveRogers's full-sized avatar

Shantam Shrestha captSteveRogers

View GitHub Profile
@FavioVazquez
FavioVazquez / digit_lr.py
Created May 28, 2018 00:43
Digit Recognizer with LR from @akshaybahadur21
import numpy as np
import matplotlib.pyplot as plt
def softmax(z):
z -= np.max(z)
sm = (np.exp(z).T / np.sum(np.exp(z), axis=1))
return sm
def initialize(dim1, dim2):
@komasaru
komasaru / rndnum_box_muller.py
Last active September 20, 2022 20:18
Python script to generate random numbers with Box-Muller algorithm.
#! /usr/local/bin/python3.6
"""
Random number generatrion with Box-Muller algorithm
"""
import math
import random
import sys
import traceback
@kunanit
kunanit / pandas_postgres.py
Created April 24, 2017 14:36
Read postgres database table into pandas dataframe
import pandas as pd
from sqlalchemy import create_engine
# follows django database settings format, replace with your own settings
DATABASES = {
'production':{
'NAME': 'dbname',
'USER': 'user',
'PASSWORD': 'pass',
'HOST': 'rdsname.clqksfdibzsj.us-east-1.rds.amazonaws.com',