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
#!/bin/bash | |
# | |
# Convert srt subtitle file timestamps from NTSC 23.976 fps to PAL 25 fps and viceversa | |
# A typical srt subtitle frame looks like | |
# | |
# 1 | |
# 00:02:13,720 --> 00:02:16,644 | |
# - ¿Cariño? | |
# - Hola. |
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
#!/bin/bash | |
readme=$( cat <<README | |
Problem: | |
How to apply and synchronize 2 srt subtitle files made for CD release to a single video ripped from DVD/BluRay. | |
No fps conversion so subtitles and video must have same fps (23.976, 25, whatever) | |
1 ~2h video ripped from DVD or BlueRay | |
2 subtitles files for CD box release of same movie. |
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 pandas as pd | |
import matplotlib.pyplot as plt | |
from datetime import datetime | |
import math | |
'''Horas de luz por latitud. | |
Valores para Mendoza, Argentina; año 2024. | |
Cambiando los valores de diccionario dlatitudes se puede usar para cualquier lugar de la tierra. | |
Cambiar también loc1, loc2 con keys a destacar de dlatitudes (horas max/min, equinoccios y solsticios). | |
Genera dos imágenes png; uno con curvas de horas por latitud y otro de isócronas por latitudes. | |
Las latitudes en dlatitudes deben ser de punto flotante con 4 decimales. |
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
#!/bin/bash | |
y="1001" | |
for i in $(seq 1001 2153); do | |
y="$i" | |
m=$(echo "${y:0:2}" | rev) | |
d=$(echo "${y:2:2}" | rev) | |
rv=$(echo "$d$m" | rev) | |
if [ "$d" -le 31 ] && [ "$m" -le 12 ] && [ "$rv" == "$y" ]; then |
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
Automate keystrokes to open URL in Chrome with persistent logs on Network tab. | |
Tested with Chrome 66. | |
A funny workaround to save time while using Chrome dev tools: | |
* Make sure xdotool is installed | |
* Launch chrome | |
* Put the code below in a bash script chrome_auto.sh to send all the keys to: open a tab, dev tools, settings, set 'persistent logs', type the URL and hit enter. | |
#!/bin/bash |