Skip to content

Instantly share code, notes, and snippets.

View lychrel's full-sized avatar
🎯
Focusing

Jack Lynch lychrel

🎯
Focusing
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lychrel
lychrel / sf.geojson
Created December 29, 2021 05:34
San Francisco Geospatial Chips
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lychrel
lychrel / ArxivCitationRecommender.ipynb
Created August 6, 2020 01:05
Arxiv Citation Recommendations via collaborative filtering
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

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 April 23, 2019 14:17
convert a batch of images from RGB to greyscale
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 April 27, 2017 20:27
icon transformations
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 April 25, 2017 02:32
joint PMF functions
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],