Skip to content

Instantly share code, notes, and snippets.

View gombosg's full-sized avatar

Gergely Gombos gombosg

View GitHub Profile
@gombosg
gombosg / stress_test.py
Created March 27, 2019 13:42
Stress testing for Coursera's Algorithmic Toolbox course
# file should export:
# functions = [f1, f2, ..., fn] functions to stress test (maybe the first will be the naive implementation)
# gen_params() - returns a list or tuple of function parameters to test the functions with
# in main file use if __name__=="__main__" for standard IO code so that you can submit it for grading
import sys
from time import time
import FILE as runner # import your filename here
@gombosg
gombosg / getBlockLists.sh
Last active November 27, 2020 21:58 — forked from johntyree/getBlockLists.sh
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Link good as of May 2020
# Download lists, unpack and filter, write to stdout
curl -s -A 'Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0' https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*\?list=.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@gombosg
gombosg / elevatorSaga.js
Created May 16, 2018 12:54
My take on Elevator saga, completes until challenges 1-12 so far.
{
init: function(elevators, floors) {
// ----------------------------
// INIT
// ----------------------------
let myFloors = [];
initFloors();