This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import os | |
url = 'http://www.zar.kit.edu/rss/feed.rss' | |
keywords = ['steuerrecht'] | |
cache_file = 'cache.txt' | |
hook_url = 'http://middleman.ferdinand-muetsch.de/api/messages' | |
hook_sender_id = 'Watcher' | |
hook_recipient_id = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inspired by https://keon.io/deep-q-learning/ | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import multiprocessing | |
import numpy as np | |
from sklearn.model_selection import ParameterGrid | |
import qcartpole | |
N_RUNS = 10 | |
grid_params = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inspired by https://medium.com/@tuzzer/cart-pole-balancing-with-q-learning-b54c6068d947 | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Simple neural net with one hidden layer consisting of one neuron */ | |
/* Inspired by https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1 */ | |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"math" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://play.golang.org/p/Y8eaSkYNgG | |
package main | |
import ( | |
"fmt" | |
) | |
const ( | |
logDebug = "DEBUG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
N := int64(751395478255) | |
n := N |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"io" | |
"log" | |
"net" | |
"net/http" | |
"net/rpc" | |
"net/rpc/jsonrpc" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const fetch = require('node-fetch') | |
, base64stream = require('base64-stream'); | |
const URL = 'https://www.google.de/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'; | |
fetch(URL) | |
.then((res) => { | |
return new Promise((resolve, reject) => { |