Edm0nd/edmond/utils.py

13 lines
235 B
Python
Raw Normal View History

import random
import requests
def http_get(url):
response = requests.get(url)
if response.status_code == 200:
return response.text
def proc(proba_percentage):
return random.random() < (proba_percentage / 100.0)