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 typer | |
from pydantic import BaseModel, ConfigDict, Field | |
class NoExtrasModel(BaseModel): | |
model_config = ConfigDict(extra="forbid") | |
class User(NoExtrasModel): | |
name: str |
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 PIL import Image | |
def main(): | |
input_folder = "output" | |
# List all files in the input folder | |
bmp_files = [f for f in os.listdir(input_folder) if f.lower().endswith(".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 re | |
import typer | |
def main(edl_file: str): | |
with open(edl_file, encoding="utf-8") as f: | |
lines = f.readlines() | |
regex_timestamp = r"\d{3,4} \d{3,4} V C \d{2}:(?P<marker_timestamp>\d{2}:\d{2}):\d{2} \d{2}:\d{2}:\d{2}:\d{2} \d{2}:\d{2}:\d{2}:\d{2} \d{2}:\d{2}:\d{2}:\d{2}" |
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
# Add suffix in place | |
Get-ChildItem -Recurse | Where-Object { !$_.PSIsContainer } | ForEach-Object { | |
Rename-Item $_.FullName -NewName "$($_.BaseName)-$($_.Directory.Name)$($_.Extension)" | |
} | |
# Move to parent with suffix | |
Get-ChildItem -Recurse | Where-Object { !$_.PSIsContainer } | ForEach-Object { | |
Move-Item $_.FullName -Destination "$($_.Directory.Parent.FullName)\$($_.BaseName)-$($_.Directory.Name)$($_.Extension)" | |
} |
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 | |
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip | |
clip_times = { | |
"clip1.mp4": [ | |
((2, 12), (2, 20)), | |
((2, 25), (2, 35)), | |
], |
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
# https://www.python.org/dev/peps/pep-0008/#naming-conventions | |
# short lowercase module and package names | |
# underscores if needed, but discouraged for packages | |
# package.my_module ie package\my_module.py | |
from typing import TypeVar | |
# CapWords for Type Variable names, and preferably short | |
VT_co = TypeVar("VT_co", covariant=True) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
@echo off | |
setlocal EnableDelayedExpansion | |
set colour1=[38;2;128;32;192m | |
set colour2=[38;5;208m | |
echo %colour1%---%colour2% ESC[XXm %colour1%---[0m | |
@REM dark background | |
set str= | |
for /l %%c in (30,1,37) do ( |
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
.Root__main-view > div:first-of-type { | |
display: none; | |
} |
NewerOlder