Skip to content

Instantly share code, notes, and snippets.

View sappelt's full-sized avatar

sappelt sappelt

View GitHub Profile
@sappelt
sappelt / frozendeepq.ipynb
Created September 1, 2018 10:47
FrozenLake with q-tables and refactored to deep q-learning
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sappelt
sappelt / a_frozenq.ipynb
Last active September 1, 2018 10:48
FrozenLake with q-tables and refactored to deep q-learning
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sappelt
sappelt / bitcoin_connection.py
Created June 1, 2018 16:31
How to establish a connection to the bitcoin manually. Peer discovery + connecting and sending version message
# Import requests and regex library
import requests
import re
def get_external_ip():
# Make a request to checkip.dyndns.org as proposed
# in https://en.bitcoin.it/wiki/Satoshi_Client_Node_Discovery#DNS_Addresses
response = requests.get('http://checkip.dyndns.org').text
# Filter the response with a regex for an IPv4 address