Skip to content

Instantly share code, notes, and snippets.


Ferdinand Mütsch n1try

Block or report user

Report or block n1try

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
n1try / deezer2json.js
Last active Mar 24, 2018
Export Deezer playlist to JSON
View deezer2json.js
1. Go to and open the playlist you want to export, e.g.
2. Scroll down to the very bottom
3. Open your browser's dev tools (F12 on Linux an Windows) and go to the Console tab
4. Paste the following one-line command and hit enter
JSON.stringify('datagrid-row song')).map(r => Object.assign({}, {title: r.getElementsByClassName('title')[0].childNodes[0].textContent, artist:'[itemprop="byArtist"]')).map(a => a.textContent).reduce((acc, a) => a + ', ' + acc, '').slice(0, -2)})), null, 2)
n1try /
Last active Feb 14, 2018
Naive implementation of the Apriori algorithm in Python
# Naive implementation of the Apriori algorithm in Python
# Example 2 from
data = [
n1try /
Last active Jul 27, 2019
A scraper for restaurant reviews from Tripadvisor
A script to scrape restaurant reviews from or using Selenium.
Author: Ferdinand Mütsch <>
License: MIT
Updated: January, 09 2018
- Install `selenium` and `pandas` using pip
- Install PhantomJS or get Chrome- or Firefox webdriver binaries and add them to your PATH (see
n1try /
Last active Nov 8, 2017
Sample WSGI web server with Flask
# gunicorn --bind --workers 4 wsgi:app
# gunicorn --bind --workers 1 --threads 12 wsgi:app
import time
from flask import Flask
app = Flask(__name__)
# Requests from one client are not blocked by long-lasting requests from another client, as long as there are workers available
n1try /
Created Oct 3, 2017
Watch for exam results announcement and notify via telegram-middleman-bot (run as Cronjob)
import requests
import os
url = ''
keywords = ['steuerrecht']
cache_file = 'cache.txt'
hook_url = ''
hook_sender_id = 'Watcher'
hook_recipient_id = ''
# Inspired by
import random
import gym
import math
import numpy as np
from collections import deque
from keras.models import Sequential
from keras.layers import Dense
from keras.optimizers import Adam
import time
import multiprocessing
import numpy as np
from sklearn.model_selection import ParameterGrid
import qcartpole
N_RUNS = 10
grid_params = {
# Inspired by
import gym
import numpy as np
import math
from collections import deque
class QCartPoleSolver():
def __init__(self, buckets=(1, 1, 6, 12,), n_episodes=1000, n_win_ticks=195, min_alpha=0.1, min_epsilon=0.1, gamma=1.0, ada_divisor=25, max_env_steps=None, quiet=False, monitor=False):
self.buckets = buckets # down-scaling feature space to discrete range
n1try / simple_nn.go
Last active Aug 24, 2017
Simple Neural Network in Go
View simple_nn.go
/* Simple neural net with one hidden layer consisting of one neuron */
/* Inspired by */
package main
import (
n1try /
Created Aug 16, 2017
MNIST with Scikit Learn's Multi-Layer Perceptron
import numpy as np
from scipy.ndimage import convolve
from sklearn.neural_network import MLPClassifier
from sklearn.datasets import fetch_mldata
from sklearn.model_selection import train_test_split, cross_val_score, GridSearchCV
from sklearn.externals import joblib
import os.path
PATH = 'mlp_model.pkl'
You can’t perform that action at this time.