Skip to content

Instantly share code, notes, and snippets.

View ryan-kasi's full-sized avatar

Ryan Kasichainula ryan-kasi

View GitHub Profile
@ryan-kasi
ryan-kasi / red_balloons.py
Created December 29, 2020 20:16
red balloons
image_file = 'up.jpeg'
output_file = 'output.png'
image = plt.imread(image_file)/255
target_hue = 0.0
def falloff(hue_diff, intensity):
return max(0,min(1,(np.exp(1 - intensity * hue_diff) - 1)))
for i in range(image.shape[0]):
from functools import reduce
constraints_mapping = [[idx, int(item)] for idx, item in enumerate(constraints) if item != 'x']
def integer_solutions(bus_1, bus_2):
offset = bus_1[0]
increment = bus_1[1]
delay = bus_2[0]
mod_value = bus_2[1]
while((offset + delay) % mod_value != 0):
topic model graphviz
@ryan-kasi
ryan-kasi / topic model visualization
Last active May 23, 2016 22:32
topicmodel-graphviz
d3 visualization of some topic modeling from Economist, Jacobin and WND.