Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Jack Lynch lychrel

🎯
Focusing
View GitHub Profile
@lychrel
lychrel / ArxivCitationRecommender.ipynb
Created Aug 6, 2020
Arxiv Citation Recommendations via collaborative filtering
View ArxivCitationRecommender.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View keybase.md

Keybase proof

I hereby claim:

  • I am lychrel on github.
  • I am lychrel (https://keybase.io/lychrel) on keybase.
  • I have a public key ASBDtpQEhe673ONcTabmKjlOrr0H-mZJVOTCsO7DrKSx-Qo

To claim this, I am signing this object:

@lychrel
lychrel / batch_rgb2gray.py
Created Apr 23, 2019
convert a batch of images from RGB to greyscale
View batch_rgb2gray.py
import tensorflow as tf
import numpy as np
def rgb2gray(rgb):
return np.dot(rgb[...,:3], [0.2989, 0.5870, 0.1140])
def batch_rgb2gray(rgb):
color = rgb
rgb_t = tf.transpose(rgb, [0, 2, 3, 1])
sess = tf.Session()
@lychrel
lychrel / transform_icon.py
Last active Apr 27, 2017
icon transformations
View transform_icon.py
import numpy as np
import sys, os
# tab length
tab = 4
# create icons from input file
with open('fills.txt', 'r') as f:
bigstr = f.read()[:-1]
rows = filCols = bigstr.split('\n\n')
@lychrel
lychrel / joint_pmf.py
Created Apr 25, 2017
joint PMF functions
View joint_pmf.py
import numpy as np
expected_value = 0
jpmf = np.array([
[0.025, 0.015, 0.010],
[0.050, 0.030, 0.020],
[0.125, 0.075, 0.050],
[0.150, 0.090, 0.060],
[0.100, 0.060, 0.040],