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 | |
import os | |
import random | |
import string | |
from captcha.image import ImageCaptcha | |
from captcha.audio import AudioCaptcha | |
from playsound import playsound | |
from easygui import * |
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 | |
import json | |
import sys | |
import urllib.request as ur | |
from PIL import Image | |
movie = sys.argv[1].replace(" ","%20") | |
filename = sys.argv[1].replace(" ","_") + ".jpg" |
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 | |
import yaml | |
import json | |
import sys | |
import os | |
""" | |
### Converts JSON to YAML as well as YAML to JSON ### | |
Usage: |
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 | |
def day(x): | |
days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] | |
return days[x] | |
def century(y): | |
startdays = [0, 5, 3, 2] | |
centurycounter = 0 |
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
#!/Users/user/miniconda3/bin/python3 | |
import pyttsx3 | |
engine = pyttsx3.init() | |
engine.setProperty('rate', 150) | |
engine.setProperty('volume', 1.0) | |
people = { |
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 | |
import os | |
string2remove = ".720p.IBCTV.WEBRip.x264-GalaxyGlue" | |
edir = "/Users/user/Desktop/SomeGoodShowS01" | |
#edir = os.getcwd() | |
# Will reaname all files in the 'edir' by removing the above 'string2remove'. | |
# Example: |
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
found = 0 | |
mystring = "Code" | |
with open("inputfile.txt", "r") as input: | |
with open("outputfile.txt", "w") as output: | |
for line in input: | |
if line.startswith(mystring): | |
found = 1 | |
if found == 0: | |
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/env python3 | |
import json | |
import csv | |
csv_file_path = "/Users/user/Downloads/file.csv" | |
json_file_path = "/Users/user/Downloads/file.json" | |
def step1(csv_file_path, json_file_path): |
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/local/bin/env python3 | |
import mysql.connector | |
# pip3 install mysql-connector-python | |
user_input = input("Enter something: ") | |
db = mysql.connector.connect( | |
host="localhost", | |
port="3306", |
OlderNewer