This file contains hidden or 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
files = [] | |
files = sorted(files , key = lambda x:x.split("_")[-1].replace(".ts","")) |
This file contains hidden or 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
directory = r"C:\Users\deep1\audio_segments/" | |
files_concat = ["audio_136","audio_062","audio_008","audio_009","audio_045","audio_050","audio_055","audio_114"] | |
ffmpeg_command = "ffmpeg -i \"concat:" | |
for file in files_concat: | |
ffmpeg_command += file+".mp3|" | |
ffmpeg_command = ffmpeg_command.rstrip("|") | |
ffmpeg_command = ffmpeg_command+"\" music_concat.mp3" | |
os.system(ffmpeg_command) |
This file contains hidden or 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
Using the git reflog command to identify the last-known-good state of your repo | |
Then, git reset --hard <commit> to revert back to it | |
Then, another git push --force to reset the remote repository back to that state | |
"https://community.atlassian.com/t5/Sourcetree-questions/GitHub-repo-lost-much-history-after-forced-push-how-to-restore/qaq-p/254183" |
This file contains hidden or 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
# Python3 | |
from datetime import datetime | |
from pytz import timezone | |
curent_timestamp_ist = int(datetime.now(timezone('Asia/Kolkata')).timestamp()) | |
# Convert to HH:M:SS | |
import time | |
curent_timestamp_ist += 19800 | |
time.strftime("%H:%M:%S", time.gmtime(curent_timestamp_ist)) |
This file contains hidden or 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
from subprocess import check_output | |
import re | |
file_name = "movie.mp4" | |
#For Windows | |
a = str(check_output('ffprobe -i "'+file_name+'" 2>&1 |findstr "Duration"',shell=True)) | |
#For Linux | |
#a = str(check_output('ffprobe -i "'+file_name+'" 2>&1 |grep "Duration"',shell=True)) a = a.split(",")[0].split("Duration:")[1].strip() |
NewerOlder