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
#!/usr/bin/env python3 | |
from bs4 import BeautifulSoup | |
import requests | |
import convert_numbers | |
from csv import writer | |
URL_List_as_txt = open('url.lst', 'r') | |
URLs = URL_List_as_txt.read().splitlines() | |
for URL in URLs: |
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
#!/usr/bin/python3 | |
import requests, sys, os | |
from bs4 import BeautifulSoup | |
try: | |
r = requests.get("https://www.linguee.com/english-french/search", data={'query': sys.argv[1]}) | |
#print(r.status_code, r.reason) | |
if r.status_code == 200 and r.reason == 'OK': | |
pass | |
else: |
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
#!/usr/bin/python | |
import requests,re, sys | |
from bs4 import BeautifulSoup | |
URL = 'https://lernu.net/en/vortaro' | |
client = requests.session() | |
# Retrieve the CSRF token first | |
z = client.get(URL) # sets cookie | |
if 'YII_CSRF_TOKEN' in client.cookies and 'PHPSESSID' in client.cookies: |
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 random | |
import matplotlib.pyplot as plt | |
#How many times do you want the loop to run? | |
howmanytimes = 1000000 | |
k = 4 | |
def dice(): | |
r = '' | |
for j in range(0,k): | |
r += str(random.randint(1,6)) |