This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- fit 3 $ circle [sin cps, osc 0] [osc 0.5, 0.5] * (osc ft) * 0.2 >> video; | |
-- fit 3 $ circle [0, sin cps] [osc 0.5, 0.5] * 0.2 >> video; | |
circle [0.0, 0.0] (osc ft) * 0.3 >> red; | |
fit 1 $ circle [osc 0.1, 0.0] (osc ft) * 0.3 >> blue; | |
fit 1 $ circle [0.1, osc 0.1] (osc ft) * 0.3 >> green; | |
-- mesh [0,0.1] [0.5,0.5] * (osc ft) * 0.2 >> blue; | |
-- mesh [0,-0.1] [0.5,0.5] * (osc ft) * 0.2 >> video; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A Lonely Spaceship Travelling the Expanse of the Universe | |
function setup() { | |
// A Nice Canvas to Draw | |
createCanvas(350, 600); | |
} | |
function SpaceBackground() { | |
// Space is Dark | |
background(0, 0, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Folium choloropeth with suport for Branca colormaps and custom feature functions | |
""" | |
import folium | |
import warnings | |
import numpy as np | |
from folium.map import FeatureGroup | |
from branca.utilities import color_brewer | |
from branca.colormap import ColorMap, StepColormap, LinearColormap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Count Min Hash.""" | |
from hashlib import md5, sha1, blake2b, sha3_512 | |
def get_row_column(value, hash_fns, m): | |
"""Fetch Row and Column.""" | |
for row, _hash_fn in enumerate(hash_fns): | |
column = ( | |
int( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Hyper Log Log.""" | |
import math | |
from hashlib import sha1 | |
class HyperLogLog(object): | |
"""HyperLogLog.""" | |
def __init__(self, k): | |
"""Initialize Bucket Size.""" | |
self.k = k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Basic Proxies in Python.""" | |
"""Twisted.""" | |
from twisted.internet import reactor | |
from twisted.web import proxy, server | |
site = server.Site(proxy.ReverseProxyResource("example.com", 80, b"")) | |
reactor.listenTCP(8080, site) | |
reactor.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Huffman Puffman. | |
Visualize the Tree on https://github.com/Sangarshanan/huffman-coding | |
""" | |
import heapq | |
from collections import Counter | |
def encode_message(message): | |
""" | |
Convert the String to a Fixed 8 bit binary | |
ord(character) -> Unicode -> 08b binary |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Bloom: Studio album by Troye Sivan.""" | |
import pyhash | |
def calculate_hash(value, m): | |
# FNV | |
hash1 = pyhash.fnv1_32()(value) % m | |
# MurMur | |
hash2 = pyhash.murmur1_32()(value) % m |
NewerOlder