Skip to content

Instantly share code, notes, and snippets.

niyumard

Block or report user

Report or block niyumard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@niyumard
niyumard / lingueeaudio.py
Created Sep 7, 2019
This script extracts audio for French words from Linguee dictionary
View lingueeaudio.py
#!/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:
@niyumard
niyumard / lernulookup.py
Last active Mar 21, 2019
This script looks up esperanto words in Lernu.net website, this script is especially made for being used via GoldenDict.
View lernulookup.py
#!/usr/bin/python3
import requests, sys
from bs4 import BeautifulSoup
listoflangs = ["en|eo","eo|en","eo|fa"]
for i in listoflangs:
try:
r = requests.post("https://lernu.net/en/vortaro", data={'DictWords[word]': sys.argv[1], "DictWords[dictionary]": i})
#print(r.status_code, r.reason)
@niyumard
niyumard / rolldice.py
Created Feb 10, 2019
Draw chart for rolling dice for k times
View rolldice.py
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))
You can’t perform that action at this time.