Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am anton-cao on github.
  • I am antoncao (https://keybase.io/antoncao) on keybase.
  • I have a public key ASBK3a-2NYfRDHOZRXGKUZpmawQO_4Vw4pHMv8Fmjp9qUgo

To claim this, I am signing this object:

@Anton-Cao
Anton-Cao / perceptron.py
Created March 22, 2019 20:04
Pseudocode for perceptron algorithm
def perceptron(data, labels):
"""
Pseudo-python for perceptron algorithm
"""
d, n = data.dims # data is d x n array
th = [0] * n # initialize theta to vector of zeros
th_0 = 0
while True:
done = True
for i in range(d):
@Anton-Cao
Anton-Cao / copy_config.py
Last active December 24, 2018 07:13
Python script that copies new key-value pairs from sample_config.json to config.json
'''
Python script that copies new key-value pairs from sample_config.json to config.json
'''
import json
sample_file = open('sample_config.json', 'r')
sample_contents = json.loads(sample_file.read())
sample_file.close()