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 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], |
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
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) |