Initial commit

This commit is contained in:
Juul
2026-04-17 16:01:09 +02:00
commit bf23d2f0cc
6 changed files with 218 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
#!/bin/bash
bloatPackages=(
# Google
"com.android.bookmarkprovider"
"com.android.dreams.basic"
"com.android.dreams.phototable"
"com.android.providers.partnerbookmarks"
"com.google.mainline.adservices"
"com.google.android.adservices.api"
"com.google.android.feedback"
"com.google.android.googlequicksearchbox"
"com.google.android.syncadapters.calendar"
"com.google.android.apps.aiwallpapers"
"com.sec.android.autodoodle.service"
# Meta
"com.facebook.services"
"com.facebook.appmanager"
# Samsung
"com.samsung.android.app.watchmanagerstub"
"com.samsung.android.accessibility.talkback"
"com.samsung.android.scloud"
"com.samsung.android.sdk.handwriting"
"com.samsung.safetyinformation"
"com.samsung.android.samsungpass"
"com.samsung.android.spayfw"
"com.sec.android.mimage.avatarstickers"
"com.samsung.android.stickercenter"
"com.samsung.android.app.camera.sticker.facearavatar.preload"
)
for package in "${bloatPackages[@]}";
do
echo Removing: $package
adb shell pm uninstall -k --user 0 $package
done
+18
View File
@@ -0,0 +1,18 @@
import os
import cv2
projectName = "Resolution checker.py"
outputFile = "output.txt"
output = ""
for file in os.listdir():
if file != projectName and file != outputFile:
vid = cv2.VideoCapture(file)
height = str(int(vid.get(cv2.CAP_PROP_FRAME_HEIGHT)))
width = str(int(vid.get(cv2.CAP_PROP_FRAME_WIDTH)))
output = output + (width + "x" + height + "\t" + file + "\n")
oFile = open(outputFile, "a")
oFile.write(output)
oFile.close()
+53
View File
@@ -0,0 +1,53 @@
from os import system
#remove pre- and postfix from url, mainly for pinging
def shortenUrl(host):
host = host.replace("udp://", "")
host = host.replace("tcp://", "")
host = host.replace("http://", "")
host = host.replace("https://", "")
host = host.replace("/announce", "")
newHost = ""
for letter in host:
if letter == ":":
break
else:
newHost = newHost + letter
return(newHost)
def ping(host):
if system(f"ping {host} -n 1") == 0:
return True
else:
return False
f = open("input.txt", "r")
trackers = f.read()
f.close()
endList = []
for line in trackers.split():
if line not in endList:
url = shortenUrl(line)
if ping(url) == True:
endList.append(line)
print(line + " " + "appended")
else:
print(line + " removed inactive tracker")
else:
print(line + " " + "removed duplicate")
newList = open("output.txt", "w")
for item in endList:
newList.write(item + "\n")
newList.close()
input("successfully wrote file")
+42
View File
@@ -0,0 +1,42 @@
from tkinter.filedialog import askdirectory
# Importing required libraries.
from tkinter import Tk
import os
import hashlib
from pathlib import Path
# We don't want the GUI window of
# tkinter to be appearing on our screen
Tk().withdraw()
# Dialog box for selecting a folder.
file_path = askdirectory(title="Select a folder")
# Listing out all the files
# inside our root folder.
list_of_files = os.walk(file_path)
# In order to detect the duplicate
# files we are going to define an empty dictionary.
unique_files = dict()
for root, folders, files in list_of_files:
# Running a for loop on all the files
for file in files:
# Finding complete file path
file_path = Path(os.path.join(root, file))
# Converting all the content of
# our file into md5 hash.
Hash_file = hashlib.md5(open(file_path, 'rb').read()).hexdigest()
# If file hash has already #
# been added we'll simply delete that file
if Hash_file not in unique_files:
unique_files[Hash_file] = file_path
else:
os.remove(file_path)
print(f"{file_path} has been deleted")
+34
View File
@@ -0,0 +1,34 @@
from tkinter.filedialog import askdirectory
from tkinter import Tk
from pathlib import Path
import os
# We don't want the GUI window of
# tkinter to be appearing on our screen
Tk().withdraw()
# Dialog box for selecting a folder.
file_path = askdirectory(title="Select your folder")
# Listing out all the files
# inside our root folder.
list_of_files = os.walk(file_path)
def moveFile(root, file):
if root != file_path:
old_file = Path(os.path.join(str(root), file))
new_file = Path(os.path.join(file_path, file))
print("Moving " + file)
os.rename(old_file, new_file)
def main():
for root, folders, files in list_of_files:
for file in files:
moveFile(root, file)
input()
main()
+32
View File
@@ -0,0 +1,32 @@
from tkinter.filedialog import askdirectory
from tkinter import Tk
import os
import subprocess
import hashlib
from pathlib import Path
sevenzip = r"C:\Program Files\7-Zip\7z.exe"
# We don't want the GUI window of
# tkinter to be appearing on our screen
Tk().withdraw()
# Dialog box for selecting a folder.
file_path = askdirectory(title="Select a folder")
# Listing out all the files
# inside our root folder.
list_of_files = os.walk(file_path)
for root, folders, files in list_of_files:
for file in files:
file_path = Path(os.path.join(root, file))
name, _ = os.path.splitext(file_path)
zipped_filename = f"{name}.7z"
if not os.path.isfile(zipped_filename):
try:
subprocess.run([sevenzip, 'a', zipped_filename, file_path], check=True)
except:
input("")
exit()