Skip to content

Instantly share code, notes, and snippets.

View willwillems's full-sized avatar
🌱
Working remotely

Will Willems willwillems

🌱
Working remotely
View GitHub Profile
@willwillems
willwillems / scraper.py
Last active February 18, 2017 11:27
Simple Python 3.5.2 Marktplaats scraping example with Beautiful Soup 4
import requests
import urllib.parse
import numpy as np
import matplotlib.pyplot as plt
from bs4 import BeautifulSoup
def crawlmp( base_url, parameters, add_to_url = '' ):
""" Parameters dictionairy can contain:
query[str],
categoryId[int],

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@ikatson
ikatson / websockets_test.py
Last active June 23, 2016 23:44
uwsgi websocket gevent
uwsgi.websocket_handshake(...)
user_id = get_user_id_from_environ(environ)
ready = gevent.event.Event()
dead = gevent.event.Event()
def ws_socket_waiter():
while not dead.is_set():
gevent.socket.wait_read(websocket_fd)