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
def calcul_taxe_impozite_local(venit_net: float, anul: int): | |
""" | |
versiune = "2.0.0" | |
""" | |
minim_brute_an_val = { | |
2020: 2230, | |
2021: 2300, | |
2022: 2550, |
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 shutil | |
fileFormat = { | |
"Picture": [ | |
".jpeg", | |
".jpg", | |
".gif", | |
".bmp", |
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 | |
input_folder = "./vids" | |
output_folder = "./reencoded" | |
# Create the output folder if it doesn't exist | |
os.makedirs(output_folder, exist_ok=True) | |
# Get a list of all the .mp4 files in the input folder |
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 | |
# Assuming video files are in this format: "1.mp4" | |
filepaths = [f for f in os.listdir() if f.endswith(".mp4")] | |
sorted_filepaths = sorted(filepaths, key=lambda val: int(val.split(".")[0])) | |
allvids = [f'file {os.path.abspath(f)}' for f in sorted_filepaths] | |
with open("vids.txt", "w") as f: | |
f.write("\n".join(allvids)) | |
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 | |
mp4files = [f for f in os.listdir() if f.endswith(".mp4") and "ALTERED" not in f] | |
if __name__ == "__main__": | |
for f in mp4files: | |
os.system(f"auto-editor {f} --no-open") |
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 | |
def split_video(input_file, output_prefix, duration=1800): | |
command = [ | |
'ffmpeg', | |
'-i', input_file, | |
'-c', 'copy', | |
'-segment_time', str(duration), | |
'-f', 'segment', | |
'-reset_timestamps', '1', |
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 | |
from datetime import datetime | |
# Assuming video files are recorted with OBS in this format: "2023-04-11 08-11-11.mp4" | |
def parse_date(filepath): | |
date_str = filepath[:19] | |
return datetime.strptime(date_str, "%Y-%m-%d %H-%M-%S") | |
filepaths = [f for f in os.listdir() if f.endswith(".mp4")] |
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
npx degit sveltejs/template project-name | |
cd project-name | |
npm install | |
npm install svelte-spa-router | |
// Temporary issue postcss works only with: autoprefixer@9.8.6 (remove @9.8.6 if the issue was solved) |
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
try: | |
import sl4a | |
droid = sl4a.Android() | |
except: | |
print("Can't initialize sl4a module!") | |
pass | |
import re | |
import random | |
import time | |
import itertools |
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
def genumerate(li): | |
#using a generator not to kill memory | |
for item in li: | |
yield li.index(item), item | |
#use case | |
for idx, val in genumerate(biglist): | |
pass #do_something() |