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: https://github.com/moses-palmer/pynput | |
from pynput.keyboard import Key, Listener | |
import logging | |
log_dir = "" | |
logging.basicConfig(filename=(log_dir + "key_log.txt"), level=logging.DEBUG, format='["%(asctime)s", %(message)s]') | |
def on_press(key): | |
logging.info('"{0}"'.format(key)) |
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: https://github.com/moses-palmer/pynput | |
from pynput.mouse import Listener | |
import logging | |
log_dir = "" | |
logging.basicConfig(filename=(log_dir + "mouse_log.txt"), level=logging.DEBUG, format='["%(asctime)s", %(message)s]') | |
def on_click(x, y, button, pressed): | |
if pressed: |
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 errno | |
folder_to_scan_and_delete = "C:/Users/Owner/Desktop/Folder Simulation/" # Remember '/' not '\', also make sure to end with '/' | |
show_ignored = True | |
show_deleted = True | |
deleted = 0 | |
for root, dirs, files in os.walk(folder_to_scan_and_delete, topdown=False): | |
for name in dirs: |
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 subprocess | |
a = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8', errors="ignore").split('\n') | |
a = [i.split(":")[1][1:-1] for i in a if "All User Profile" in i] | |
for i in a: | |
try: | |
results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8', errors="ignore").split('\n') | |
results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b] | |
try: | |
print ("{:<30}| {:<}".format(i, results[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
# Will sort a given direcotry of music (copy) | |
# Requires mutagen | |
import os | |
from mutagen.id3 import ID3 | |
from mutagen.easymp4 import EasyMP4 | |
import shutil | |
input_folder = input("What is the folder to get files from?") | |
output_folder = os.getcwd() + "/Output/" |
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 time | |
import datetime | |
fileLocation = r"" | |
year = 2017 | |
month = 11 | |
day = 5 | |
hour = 19 | |
minute = 50 |
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 https://github.com/moses-palmer/pynput/issues/20 | |
from pynput import keyboard | |
# The key combination to check | |
COMBINATIONS = [ | |
{keyboard.Key.shift_r, keyboard.KeyCode(char='a')}, | |
{keyboard.Key.shift_r, keyboard.KeyCode(char='A')} | |
] | |
# The currently active modifiers |
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
[ | |
{ | |
"rank": "1", | |
"title": "Black", | |
"album": "Ten", | |
"artist": "Pearl Jam", | |
"albumYear": "1991", | |
"rankOneYearAgo": "2", | |
"rankTwoYearsAgo": "3", | |
"timestamp": "2019-09-13 18:57:13", |
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
[ | |
{ | |
"rank": "1", | |
"title": "Everlong", | |
"album": "The Colour and the Shape", | |
"artist": "Foo Fighters", | |
"albumYear": "1997", | |
"rankOneYearAgo": "8", | |
"rankTwoYearsAgo": "6", | |
"timestamp": "2020-11-06 18:51:00", |
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
""" | |
Google Photos Takeout Processor | |
This tool takes an unzipped and merged (for takeouts above 10Gb) Google Photos Takeout and filters duplicates, applies | |
metadata and moves all files to an output folder with each file having the format | |
`YYYY-MM-DD_HH-MM-SS {original_filename}`. | |
Setup: | |
1. Install tqdm: `pip install tqdm` | |
2. Install loguru: `pip install loguru` |
OlderNewer