Skip to content

Instantly share code, notes, and snippets.

thurask

  • Toronto, Canada
Block or report user

Report or block thurask

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
View fix_plumbobs.py
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")
@thurask
thurask / gbuds_checker.py
Created Jun 11, 2019
Check latest firmware version of Galaxy Buds (R170)
View gbuds_checker.py
#!/usr/bin/env python3
import requests
try:
from defusedxml import ElementTree # pip install defusedxml
except (ImportError, AttributeError):
from xml.etree import ElementTree
def main(indevice):
View dbpf_sorter.py
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
View bienchen_version_checker.py
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/"
View exiftool_updater.py
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"
View namer.py
import xml.etree.ElementTree as et
import openpyxl
wb = openpyxl.Workbook()
tree = et.parse("Neia_MoreNamesTuning.xml")
root = tree.getroot()
workzone = root[1][2]
for lang in workzone:
langname = lang[0].text
nametuning = lang[1]
View lepprint_bot.py
#!/usr/bin/env python3
import contextlib
import io
import os
import time
import discord # pip install discord.py
import lepprint.lepprint as lepprint # https://gist.github.com/thurask/632cdc049767aaa63492e2bd6039a1ca
import requests # pip install requests
View gitter.py
import concurrent.futures
import os
import subprocess
GITFOLDER = "C:\\git"
def filterer(infx):
dirs = [os.path.join(infx, x) for x in os.listdir(infx) if os.path.isdir(os.path.join(infx, x)) and ".git" in os.listdir(os.path.join(infx, x))]
View ts4updater.py
#!/usr/bin/env python3
"""Check some popular TS4 mods for updates."""
import argparse
import io
import os
import platform
import re
import string
import sys
import tempfile
View lepprint.py
#!/usr/bin/env python3
"""Pretty print The Sims 4 lastException files, and then some."""
import argparse
import collections
import concurrent.futures
import configparser
import contextlib
import datetime
import io
import itertools
You can’t perform that action at this time.