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
noise() | |
.color(() => a.fft[2]*2,0,.6) | |
.modulate(noise(() => a.fft[0]*10)) | |
.scale(()=> a.fft[2]*5) | |
.layer( | |
src(o0) | |
.mask(osc(10).modulateRotate(osc(),90,0)) | |
.scale(() => a.fft[0]*2) | |
.luma(0.2,0.3) | |
) |
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
// First upload (misc exp) | |
stack( | |
n("<0*2 1 [4 2] 3*2>*4").sound("wind"), | |
note("[C G], <D Fb B C A>*[0.5,2]") | |
.sound("space").gain(3) | |
.lpf("<100 200 300 400 500 600 700 800 900 1000 1100 1000 900 800 700 600 500 400 300 200>/4") | |
.room(1) | |
.pan("<0 1>/2") | |
.delay(1) |
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 |
NewerOlder