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
I wanna write a small tool that will swap music from my youtube video. Currently it's binary | |
if override_audio: | |
o_cmd = ["ffmpeg", "-i", music_url, "-i", video_url, "-codec", "copy", | |
"-y", "-shortest", output_video] | |
logger.info(o_cmd) | |
code = sp.call(o_cmd) | |
else: | |
cmd = ["ffmpeg", "-i", music_url, "-i", video_url, "-filter_complex", | |
"amix=duration=shortest", "-vcodec", "copy", "-y", "-shortest", | |
output_video] |
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
# given list [2, 3, 5, 78] | |
# return 1, 4, 6-77, 79-99 | |
# the range is always <1, 100) | |
def get_ranges(lst, N=100): | |
s = set(lst) | |
filtered = (i for i in xrange(1, N) if not i in s) | |
output2 = [] | |
prev = None | |
skipping = False | |
for num in filtered: |
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
(function() { | |
window.S3Upload = (function() { | |
S3Upload.prototype.s3_object_name = 'default_name'; | |
S3Upload.prototype.s3_sign_put_url = '/signS3put'; | |
S3Upload.prototype.file_dom_selector = 'file_upload'; |
NewerOlder