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
url="https://gist.githubusercontent.com/zneak/53f885f1fc5856741cb4/raw/a17a81d15acb8109cda8524c743186901dd269b6/words.txt" | |
words=($(curl -s $url | grep '^\w\w\w\w\w$' | tr '[a-z]' '[A-Z]')) | |
actual=${words[$[$RANDOM % ${#words[@]}]]} | |
end=false | |
guess_count=0 | |
max_guess=6 | |
if [[ $1 == "unlimit" ]]; then | |
max_guess=999999 | |
fi | |
while [[ $end != true ]]; do |
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 webbrowser | |
new = 2 # open in a new tab, if possible | |
url = "https://unix.org/" | |
webbrowser.open(url,new=new) | |
# open an HTML file on my own (Windows) computer | |
url = "file://C:/Users/User/index.html" | |
webbrowser.open(url,new=new) |
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
from bs4 import BeautifulSoup | |
import requests, re | |
def getDom(_url): | |
return requests.get(_url).text # response | |
urlDom = getDom(input('Url: ')) | |
parserDom = BeautifulSoup(urlDom, 'html.parser') | |
for link in parserDom.find_all('a', attrs={'href': re.compile('^https://')}): |
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
netsh wlan export profile folder="%UserProfile%\Desktop" | |
netsh wlan export profile key=clear folder="%UserProfile%\Desktop" |
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
echo Wifi name:? | |
read ssid | |
netsh wlan show profile name=$ssid key=clear | |
read -s -p "Press any key to exit ..." |
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
LXML | |
SCRAPY | |
HTTPLIB | |
REQUESTS | |
SELENIUM | |
HTMLparser | |
HTMLPARSER | |
BEAUTIFULSOUP | |
URLLIB / URLLIB2 | |
https://lxml.de/ |
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
def uncamel(text): | |
"""helloWorld => hello_world""" | |
r = '' | |
for t in text: | |
r += '_' + t.lower() if t.isupper() else t | |
return r | |
print(uncamel('helloWorld')) | |
print(uncamel('goodbyeWorld')) | |
print(uncamel('loremIpsum')) |
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
the | |
of | |
and | |
to | |
a | |
in | |
for | |
is | |
on | |
that |
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
var l = document.getElementsByClassName('style-scope ytd-playlist-add-to-option-renderer').length | |
for (let i = 0; i < l; i++) { | |
var liste = document.getElementsByClassName('style-scope ytd-playlist-add-to-option-renderer')[i].getAttribute("aria-checked"); | |
if(liste == 'true'){alert("This video is in your playlist.");} | |
} | |
/* | |
var checkbox = document.querySelector("#checkbox") | |
var listName = document.querySelector("#checkboxLabel") |
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 json | |
# The query to get the most popular anime | |
query = """ | |
query ($page: Int) { | |
Page (page: $page, perPage: 50) { | |
media (sort: POPULARITY_DESC, type: ANIME, isAdult: true) { | |
id | |
title { |
OlderNewer