Skip to content

Instantly share code, notes, and snippets.

Avatar

Max Burstein mburst

View GitHub Profile
View bloomfilter.py
from bitarray import bitarray
import mmh3
class BloomFilter:
def __init__(self, size, hash_count):
self.size = size
self.hash_count = hash_count
self.bit_array = bitarray(size)
self.bit_array.setall(0)
View jquery_autocomplete.html
<!DOCTYPE html>
<html>
<head>
<title>jQuery Autocomplete</title>
<style>
#res {
margin: 0px;
padding-left: 0px;
width: 150px;
}
@mburst
mburst / astar.rb
Created Feb 24, 2013
Ruby A* implementation
View astar.rb
require 'priority_queue'
require 'set'
class Node
def initialize(x, y)
@x = x
@y = y
@obstacle = false
@g_score = Float::INFINITY
end
@mburst
mburst / coffin.py
Created Apr 21, 2020
Add Coffin Dancing Meme and Astronomia To Any Short Video
View coffin.py
from moviepy.editor import VideoFileClip, AudioFileClip, concatenate_videoclips
dropstart = 19
audio = AudioFileClip('astronomia.mp3')
dance = VideoFileClip('dance.mp4')
clip = VideoFileClip('fail.mp4')
audiostart = max(0, dropstart-clip.duration)
audio = audio.subclip(audiostart, dropstart + dance.duration)
finalclip = concatenate_videoclips([clip, dance], method="compose").set_audio(audio)
@mburst
mburst / rss_reader.php
Created Mar 24, 2013
RSS Feed Reader in PHP
View rss_reader.php
<html>
<head>
<title>RSS Feed Reader</title>
</head>
<body>
<?php
//Feed URLs
$feeds = array(
"http://maxburstein.com/rss",
"http://www.engadget.com/rss.xml",
You can’t perform that action at this time.