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
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<script src="//unpkg.com/[email protected]"></script> | |
</head> | |
<body> | |
<svg></svg> |
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
gistup |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.line { | |
fill: none; | |
stroke: steelblue; | |
stroke-width: 1.5px; | |
} | |
.zoom { |
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
gistup |
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 datetime | |
import pytz | |
timestamp = 1556668800.0 | |
date = datetime.datetime.utcfromtimestamp(timestamp) | |
print(date) # 2019-05-01 00:00:00 | |
# Applying timezone without converting it | |
date_utc = pytz.utc.localize(date) | |
print(date_utc.strftime(fmt)) # 2019-05-01 00:00:00 UTC+0000 |
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 datetime | |
import pytz | |
timestamp = 1556668800.0 | |
date = datetime.datetime.utcfromtimestamp(timestamp) | |
print(date) # 2019-05-01 00:00:00 | |
# Applying timezone without converting it | |
date_sp = pytz.timezone("America/Sao_Paulo").localize(date) | |
print(date_sp.strftime(fmt)) # 2019-05-01 00:00:00 -03-0300 |
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 datetime | |
timestamp = 1556668800.0 | |
date = datetime.datetime.utcfromtimestamp(timestamp) | |
print(date) # 2019-05-01 00:00:00 |
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 datetime | |
import time | |
date = datetime.datetime(2019,5,1) # date object | |
print(date) # 2019-05-01 00:00:00 | |
ts = time.mktime(date.timetuple()) # timestamp in seconds | |
print(ts) # 1556668800.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
#!/bin/bash | |
#$2 .mp3 | |
ffmpeg -i $1 -acodec libmp3lame -aq 4 $2 | |
#https://ubuntuforums.org/showthread.php?t=1493682 |
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
#!/bin/bash | |
# $1 = filename | |
rm -f ${1}.mp4 | |
a=1;for file in `ls ${1}*.mp4`; do ffmpeg -i $file -c copy -bsf:v h264_mp4toannexb -f mpegts tmpfile${a}.ts; a=$((a+1)); done | |
ffmpeg -i "concat:`ls tmpfile*.ts | paste -s -d\"|\"`" -c copy -bsf:a aac_adtstoasc ${1}.mp4 |