Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Gijs-Koot
Gijs-Koot / README.md
Last active February 21, 2020 10:23
Sample flask app with two-way communication

start app

pip install flask
FLASK_DEBUG=1 FLASK_APP=app.py flask run

move index.* files into separate folder static (cannot use folders in gists)

open url in browser

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Gijs-Koot
Gijs-Koot / density_based_anomaly_detection.ipynb
Created October 2, 2019 11:40
density based clustering
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Gijs-Koot
Gijs-Koot / colab-mnist-tutorial.ipynb
Created March 6, 2019 10:30
colab-mnist-tutorial.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
adb shell 'pm list packages' | grep samsung | awk '{gsub(/package:/, ""); print}' | xargs -I $ echo 'pm uninstall -k --user 0 $' | adb shell
(defvar gh-publish-base-dir "~/Documents/project/Gijs-Koot.github.io/"
"Base directory of publishing project")
(defun gh-publish-fix-image-links (fn)
(with-temp-file fn
(progn
(insert-file-contents fn)
(goto-char (point-min))
(while (re-search-forward "src=\"\\(images/[a-z]+\.[a-z]+\\)\"" nil t)
(replace-match (concat "src=\"/assets/" (match-string 1) "\"")))
@Gijs-Koot
Gijs-Koot / scrape_ovfiets.py
Created March 25, 2018 11:37
scrape ov fiets data
import requests
import time
import datetime
import json
from hashlib import md5
fn = "./ovfietsdata.json.lines"
while True:
class QueueChain():
def __init__(self, arrival, service):
self.arrival = arrival
self.service = service
def sample_path(self, n):
path = [0]
for i in range(1, n):
path.append(path[i - 1])