Skip to content

Instantly share code, notes, and snippets.

library(dplyr)
## use a vector for the files and the dataframes, where we leave a column in some of them
fn <- c("test_1.csv", "test_2.csv", "test_3.csv")
dl <- c(
mtcars %>% select(-gear),
mtcars %>% select(-disp),
mtcars %>% select(-wt)
@Gijs-Koot
Gijs-Koot / read_network.ipynb
Last active October 1, 2017 13:00
Import train network madrid as gexf. See http://moreno.ss.uci.edu/data.html#train.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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])
@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:
(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) "\"")))
adb shell 'pm list packages' | grep samsung | awk '{gsub(/package:/, ""); print}' | xargs -I $ echo 'pm uninstall -k --user 0 $' | adb shell
@Gijs-Koot
Gijs-Koot / colab-mnist-tutorial.ipynb
Created March 6, 2019 10:30
colab-mnist-tutorial.ipynb
Loading
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.