Skip to content

Instantly share code, notes, and snippets.

View EricSchles's full-sized avatar

Eric Schles EricSchles

View GitHub Profile
@EricSchles
EricSchles / Output
Created April 15, 2019 20:31 — forked from macournoyer/Output
A Neural Network framework in 25 LOC
$ python xor.py
Training:
Epoch 0 MSE: 1.765
Epoch 100 MSE: 0.015
Epoch 200 MSE: 0.005
* Target MSE reached *
Evaluating:
1 XOR 0 = 1 ( 0.904) Error: 0.096
0 XOR 1 = 1 ( 0.908) Error: 0.092
1 XOR 1 = 0 (-0.008) Error: 0.008
numpy
pandas
scipy
sklearn
tensorflow
keras
statsmodels
pomegranate
seaborn
matplotlib
def get_percent_empty(df):
listing = list(df.isnull().sum()/df.shape[0] != 0)
columns_of_interest = []
cols = df.columns.tolist()
for index, col in enumerate(cols):
if listing[index]:
columns_of_interest.append(col)
return df[columns_of_interest].isnull().sum()/df.shape[0]
@EricSchles
EricSchles / poormansdag.ipynb
Created July 18, 2018 19:49 — forked from mariusvniekerk/poormansdag.ipynb
How to make a simple task execution engine in basically no code
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EricSchles
EricSchles / poormansdag.ipynb
Created July 18, 2018 19:49 — forked from mariusvniekerk/poormansdag.ipynb
How to make a simple task execution engine in basically no code
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EricSchles
EricSchles / solver.py
Created June 10, 2018 03:04 — forked from dutc/solver.py
code improvement exercise: solver.py
from numpy.random import random
from numpy import array, isclose, zeros_like, sign
from numpy.linalg import lstsq
def solve(func, values, atol=0.1):
while True:
result = func(values)
if isclose(result, 0, atol=atol):
break
values -= sign(result) * random(values.size)
# http://chase-seibert.github.io/blog/2016/07/22/pygithub-examples.html
# https://stackoverflow.com/questions/41691327/ssl-sslerror-ssl-certificate-verify-failed-certificate-verify-failed-ssl-c
from github import Github
from github import UnknownObjectException
import pandas as pd
# creating your own Github token:
# https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/
from config import GITHUB_API_TOKEN
import argparse
import time

Keybase proof

I hereby claim:

  • I am EricSchles on github.
  • I am ericschles (https://keybase.io/ericschles) on keybase.
  • I have a public key whose fingerprint is 1637 964C 97D6 CD68 1118 BB38 A52B 87D4 B9A7 1826

To claim this, I am signing this object: