Skip to content

Instantly share code, notes, and snippets.

View spookyahell's full-sized avatar
🌐
Browsing the WWW (and helping others and myself get through life)

spookyahell

🌐
Browsing the WWW (and helping others and myself get through life)
View GitHub Profile
@spookyahell
spookyahell / GTDU.py
Created August 25, 2018 22:17
python-requests: Get that nasty URL right now!
def GTDU(u, timeout, RT = 0, CE = 0, headers = None):
try:
r = requests.get(u, timeout = timeout, headers = headers)
return r
except requests.exceptions.ReadTimeout:
RT += 1
if RT<5:
r = GTDU(u, timeout, RT = RT, CE = CE, headers = headers)
return r
else:
@spookyahell
spookyahell / apartmentSearch.py
Created August 24, 2018 11:08
How to search for an apartment (assuming you're a dev)
from apartmentSearchProvider import searchExposes
from internetprovider import CheckIfInetProviderOffersBestInternet
closer_cosideration = []
exposes = searchExposes(desiredRegion)
for expose in exposes:
address = expose.address
bestinet = CheckIfInetProviderOffersBestInternet(address)
if bestinet is True:
closer_consideration.append(expose)
// ==UserScript==
// @name Test
// @version 1.0.0
// @namespace @XOR
// @include *google.com*
// @grant GM.notification
// @grant GM.openInTab
// @grant GM.setClipboard
// ==/UserScript==