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
@ECHO off | |
CD /D %~p0 | |
SET output=%~n1_8MB.mp4 | |
FOR /F "usebackq" %%i in (`ffprobe -i %1 -show_entries format^=duration -v quiet -of csv^="p=0"`) do set seconds=%%i | |
SET /A "totalBitrate=64000/seconds" | |
SET overheadBitrate=100 | |
SET audioBitrate=96 | |
SET /A "videoBitrate=totalBitrate-audioBitrate-overheadBitrate" | |
ffmpeg -hide_banner -y -i %1 -c:v libx264 -b:v %videoBitrate%k -pass 1 -b:a %audioBitrate%k -f mp4 NUL && \ | |
ffmpeg -hide_banner -i %1 -c:v libx264 -b:v %videoBitrate%k -pass 2 -b:a %audioBitrate%k "%output%" |
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
let timedelta = document.getElementById("stats").firstElementChild.cloneNode(true); | |
timedelta.innerText = (seconds => `${Math.floor(seconds/3600)}:${Math.floor(seconds/60) % 60}:${Math.floor(seconds) % 60}`).call(this, Array.from(document.getElementsByClassName('ytd-thumbnail-overlay-time-status-renderer')).map(x => x.innerText.split(":").map(x => parseInt(x, 10)).reduce((acc, val) => acc * 60 + val)).reduce((acc, val) => acc + val)); | |
document.getElementById("stats").insertBefore(timedelta, document.getElementById("stats").firstElementChild.nextSibling); |
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
import os | |
import ipywidgets as widgets | |
class FilePicker(object): | |
"""ipywidget for filepicking | |
Display the widget in a notebook: | |
>>> file_picker = FilePicker() |
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
var list = $$('span.a-color-price.a-size-base'); | |
var total = 0; | |
for (i = 0; i < list.length; i++) { | |
var price = parseFloat(list[i].innerHTML.replace('EUR', '') .replace(',', '.')); | |
total += price; | |
} | |
console.log("Total amount of items in wish list = ", total, "€"); |