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 difflib | |
from collections import defaultdict | |
def find_xxh3_files(directory): | |
xxh3_files = [] | |
for root, _, files in os.walk(directory): | |
for file in files: | |
if file.endswith('.xxh3'): | |
xxh3_files.append(os.path.join(root, file)) |
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
ffmpeg -i infile.mp4 -i infile.srt -c copy -c:s mov_text outfile.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
(Get-Item "00000.MTS").CreationTime=(Get-Item "00000.MTS").LastWriteTime |
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
REM Credit to https://forums.garmin.com/apps-software/mac-windows-software/f/virb-edit-mac/116005/flightradar-24-fr24-klm-to-gpx-files | |
REM But garmin keeps messing with their forum so I fear it may again go somewhere else. | |
"C:\Program Files\GPSBabel\gpsbabel.exe" -w -i kml -f INFILE.kml -x nuketypes,tracks -x transform,trk=wpt,del -o GPX -F OUTFILE.gpx |
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
#!/usr/bin/python3 | |
import random, time | |
min = 1 | |
max = 6 | |
pa = 0 | |
pb = 0 | |
startdone = 0 | |
gamedone = 0 | |
read = 'n' |
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
#!/usr/bin/pwsh | |
param ( | |
[string]$FlaskApp = "app.py", | |
[string]$FlaskEnvironment = "development", | |
[string]$IPHost = "127.0.0.1", | |
[string]$Port = 5000 | |
) | |
#set env var "FLASK_APP" to $args[0] | |
#set env var "FLASK_ENV" to $args[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
# rruleset_json.py by Max 2022 | |
# To the extent possible under law, the person who associated CC0 with | |
# rruleset_json.py has waived all copyright and related or neighboring rights | |
# to rruleset_json.py. | |
# You should have received a copy of the CC0 legalcode along with this | |
# work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | |
# https://gist.github.com/maxfire2008/096fd5f55c9d79a11d41769d58e8bca1 |
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
mapping = [ | |
["Spring 1941",40,38], | |
["Part 3",54,53], | |
["My day",44,43], | |
["Fall 1941",50,49], | |
["Bombs!",176,192], | |
] | |
def difference(a,b): | |
if a > b: |
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 itertools | |
side_a = "(a+b)/c==d" | |
v = [-9,-2,8,-7] | |
for p in itertools.permutations(v,len(v)): | |
side_a_m = side_a | |
for i,v in enumerate(p): | |
side_a_m=side_a_m.replace(chr(i+97),"("+str(v)+")") |
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 any_order(a,b,order): | |
c=a | |
for item in order: | |
if item == "+": | |
c+=b | |
elif item == "*": | |
c*=b | |
elif item == "-": | |
c-=b | |
elif item == "/": |
NewerOlder