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 io | |
import os | |
import requests | |
import subprocess | |
import zipfile | |
EXIFTOOLDIR = "C:\\tools\\exiftool" | |
EXIFTOOLURL = "https://www.sno.phy.queensu.ca/~phil/exiftool/" | |
EXIFTOOLVER = "http://owl.phy.queensu.ca/~phil/exiftool/ver.txt" |
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 requests | |
try: | |
from defusedxml import ElementTree # pip install defusedxml | |
except (ImportError, AttributeError): | |
from xml.etree import ElementTree | |
def getter(indevice, test=False): |
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 | |
"""Check for Samsung updates.""" | |
import argparse | |
import sys | |
import requests | |
try: | |
from defusedxml import ElementTree | |
except (ImportError, AttributeError): |
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 gzip | |
import os | |
import shutil | |
import subprocess | |
from defusedxml import ElementTree | |
import yaml | |
""" |
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 os | |
TS3HEADER = b'DBPF\x02\x00\x00\x00\x00' | |
TS4HEADER = b'DBPF\x02\x00\x00\x00\x01' | |
def collector(indir=None): | |
if indir is None: | |
indir = os.getcwd() |
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 configparser | |
import os | |
import shutil | |
import winreg | |
def get_install_path(): | |
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Maxis\\The Sims 4") as winkey: | |
instpath = winreg.QueryValueEx(winkey, "Install Dir")[0] | |
inipath = os.path.join(instpath, "Game", "Bin", "Default.ini") |
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 os | |
import subprocess | |
MAGICDICT = {b"GIF8": ".gif", b"\x89PNG": ".png"} | |
def single_convert(afile): | |
with open(afile, "rb") as thefile: | |
header = thefile.read(4) |
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 collections | |
import os | |
def header_reader(infile): | |
with open(infile, "rb") as afile: | |
afile.seek(36) | |
bval = afile.read(1) | |
ival = int.from_bytes(bval, byteorder="big") | |
return ival |
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 bs4 | |
import more_itertools | |
import requests | |
OUTDOORURL = "https://www.deichschafblog.de/s4/mods-fuer-outdoor-leben/" | |
WORKURL = "https://www.deichschafblog.de/s4/mods-fuer-an-die-arbeit/" | |
TOGETHERURL = "https://www.deichschafblog.de/s4/mods-fuer-zeit-fuer-freunde/" | |
CITYURL = "https://www.deichschafblog.de/s4/mods-fuer-grossstadtleben/" | |
VAMPIRESURL = "https://www.deichschafblog.de/s4/mods-fuer-vampire/" |
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 argparse | |
import subprocess | |
import sys | |
def do(id, tracker): | |
subprocess.call(["transmission-remote", "-t", id, "-td", tracker]) | |
def get(): | |
q = subprocess.check_output(["transmission-remote", "-l"]) | |
w = q.split("\n")[1:] |