Skip to content

Instantly share code, notes, and snippets.

View seleniumTestAuto.py
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get('http://tecsingularity.com/')
View captureScreenshot.py
from selenium import webdriver
# Open web-driver
webDriver = webdriver.Chrome('chromedriver102.exe')
# Access to URL
webDriver.get('http://tecsingularity.com/')
# Set image(window) size
webDriver.set_window_size(1920, 1080)
View seleniumTest.py
from selenium import webdriver
webDriver = webdriver.Chrome('chromedriver103.exe')
webDriver.get('http://tecsingularity.com/')
View DateAndTime.bat
echo %date%
echo %time%
set time2=%time:~0,8%
echo %time2%
pause
View invMatrix.py
import numpy as np
matrix1 = np.array([[3, 4],
[1, 1]])
matrix1_inv = np.linalg.inv(matrix1)
print(matrix1_inv)
print(np.dot(matrix1,matrix1_inv))
matrix2 = np.array([[1, 1, 2],
[3, -1, 2],
View changeVolume.bat
ffmpeg -i input.mp3 -vcodec copy -af volume=6dB output_plus_6db.mp3
ffmpeg -i input.mp3 -vcodec copy -af volume=-6dB output_minus_6db.mp3
View ChangeFramerate.bat
ffmpeg -i input.mp4
ffmpeg -i input.mp4 -r 10 output_fps10.mp4
ffmpeg -i input.mp4 -r 60 output_fps60.mp4
pause
View AudioLoop.bat
ffmpeg -y -stream_loop 10 -fflags +genpts -i input.mp3 -c copy input_10times.mp3
pause
View calculateDet.py
import numpy as np
matrix1 = np.array([[1, 2],
[3, 4]])
det1 = np.linalg.det(matrix1)
print(det1)
matrix2 = np.array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
View FFMPEGMovieCompare.bat
ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex "hstack" output.mp4
ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex "vstack" output.mp4
ffmpeg -i input1.mp4 -i input2.mp4 -i input3.mp4 -filter_complex "[0:v][1:v][2:v]hstack=inputs=3[v]" -map "[v]" output.mp4
ffmpeg -i input1.mp4 -i input2.mp4 -i input3.mp4 -filter_complex "[0:v][1:v][2:v]vstack=inputs=3[v]" -map "[v]" output.mp4
ffmpeg -i input1.mp4 -i input2.mp4 -i input3.mp4 -i input4.mp4 -filter_complex "[0:v][1:v][2:v][3:v]xstack=inputs=4:layout=0_0|w0_0|0_h0|w0_h0[v]" -map "[v]" output_hstack.mp4
ffmpeg -i input1.mp4 -i input2.mp4 -i input3.mp4 -filter_complex "[0:v][1:v][2:v]xstack=inputs=3:layout=0_0|w0_0|0_h0[v]" -map "[v]" output.mp4
pause