Skip to content

Instantly share code, notes, and snippets.

@swablueme
swablueme / echodownloader.py
Last active July 3, 2018 11:01
downloads unimelb echo lectures
import requests
import os.path
import json
import re
#URL for echo
baseurl="https://echo360.org.au"
#list of subject names with which to name folders
subjectname=["COMP10001", "another_subject"]
@swablueme
swablueme / tumblr_notes.py
Last active May 4, 2018 06:22
prints out the username of a tumblr user from a weighted random pick depending on whether a person reblogged, said or liked
import re
import random
from collections import defaultdict
#open a text file containing tumblr notes
fp = open("notes.txt")
#lists that contain the usernames of people who have liked, reblogged and said
reblogged_leest=[]
liked_leest=[]
@swablueme
swablueme / fugwacom.bat
Created July 3, 2018 09:17
.bat that kills all wacom processes and restarts it on windows
FOR %%i in (1, 1, 2) do (
FOR %%A in (
"WTabletServicePro.exe"
"Wacom_Tablet.exe"
"Wacom_TabletUser.exe"
"Wacom_TouchUser.exe"
) DO taskkill /f /im %%A
net stop "WTabletServicePro"
net start "WTabletServicePro"
)
@swablueme
swablueme / artstation.py
Last active July 3, 2018 10:49
artstation artist likes downloader
import re
import json
import requests
import math
import os
from multiprocessing import Pool
requests.packages.urllib3.disable_warnings()
#artist to download from
import asyncio
import hashlib
import os
import datetime as dt
import configparser
from shutil import copyfile
import time
import msvcrt
import threading
@swablueme
swablueme / dds_2_png.bat
Created February 29, 2020 10:58
dds_png bat for use with texconv
for %%f in (*.dds) do (
.\texconv.exe "%%f" -ft png
)
@pause
@swablueme
swablueme / please_rename_bins.py
Created March 1, 2020 03:02
put 3H romfs files in the correct directory structure
import os
import csv
OUTPUT_DIRECTORY="out"
FILELIST_CSV="filelist.csv"
def rename_bins():
files=os.listdir(OUTPUT_DIRECTORY)
with open(FILELIST_CSV) as csvfile:
reader = csv.DictReader(csvfile)
dictFilenames={row["Index"]:(row["Filename"], row["Destination"]) for row in reader}
@swablueme
swablueme / start_stop_citrix.bat
Created March 2, 2020 06:43
Starts/stops Citrix services
tasklist /FI "IMAGENAME eq wfcrun32.exe" 2>NUL | find /I /N "wfcrun32.exe">NUL
if %ERRORLEVEL%==0 (
echo Program is running, killed
FOR %%A in (
"wfcrun32.exe"
"SelfServicePlugin.exe"
"concentr.exe"
"redirector.exe"
"AuthManSvr.exe"
"Receiver.exe"
@swablueme
swablueme / epubmaker.py
Last active March 28, 2021 05:35
.txt files to epub
# -*- coding: utf-8 -*-
import os
import io
import pypub
import re
import logging
import time
logger = logging.getLogger()
@swablueme
swablueme / android_process_music.py
Last active September 23, 2022 09:14
Removes album art from music and folders it -- ready to put in my android directory
import eyed3
import os, shutil
import mutagen
from mutagen.mp4 import MP4
from mutagen.id3 import APIC, ID3
import re
eyed3.log.setLevel("ERROR")
print("Current working directory: {0}".format(os.getcwd()))
music_folder="to process"
to_output_to="output"