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
with open('exp-my-database-utf8.sql', 'r', encoding='utf8') as s: | |
input = s.read() | |
output = '' | |
split_char = 't' | |
split = input.split(split_char) | |
corrected = 0 | |
not_corrected = 0 |
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 numpy as np | |
import cv2 | |
cap = cv2.VideoCapture(0) | |
#cap.set(3, 1920) | |
#cap.set(4, 1080) | |
while(True): | |
ret, frame = cap.read() | |
cv2.imshow('frame', frame) |
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
# This script will convert all videos (mp4) in the folder to GIFs. | |
FILES="./*.mp4" | |
for f in $FILES | |
do | |
echo "Processing $f file..." | |
ffmpeg -i $f -vf "fps=10,scale=600:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 "${f}.gif" | |
done |
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
# This script will remove all pdf passwords from files in one folder. They have to have the same password. | |
FILES="./*.pdf" | |
for f in $FILES | |
do | |
echo "Processing $f file..." | |
pdftk $f input_pw ENTER_YOUR_PASSWORD output "${f}_wp.pdf" | |
done |
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 matplotlib.pyplot as plt | |
import numpy as np | |
from decimal import * | |
getcontext().prec = 20 | |
MAX_ITERATIONS = 20 | |
phi_approximations = list() | |
current_fib = Decimal(1) |