Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
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
[{"args":{"name":"swapper"},"cat":"__metadata","name":"thread_name","ph":"M","pid":0,"tid":0,"ts":0}, | |
{"args":{"name":"Compositor"},"cat":"__metadata","name":"thread_name","ph":"M","pid":84685,"tid":41219,"ts":0}, | |
{"args":{"name":"CrBrowserMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72630,"tid":259,"ts":0}, | |
{"args":{"name":"ThreadPoolServiceThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72644,"tid":38159,"ts":0}, | |
{"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":84685,"tid":33539,"ts":0}, | |
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":84685,"tid":259,"ts":0}, | |
{"args":{"name":"Chrome_IOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72630,"tid":33027,"ts":0}, | |
{"args":{"name":"VizCompositorThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72644,"tid":34563,"ts":0}, | |
{"args":{"name":"CrGpuMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72644,"t |
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
ffprobe -of compact -select_streams v -show_packets [VIDEO_FILE OR STREAM_URL] | grep K$ | awk 'BEGIN{FS="|";last=-1}{split($5,a,"="); if(last != -1) {print "Keframe pos: " a[2] ", Interval: " a[2]-last " seconds"} else {print "Keyframe: " a[2]}; last=a[2]}' |
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
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options | |
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full. | |
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}… | |
Getting help: | |
-h — print basic options | |
-h long — print more options | |
-h full — print all options (including all format and codec specific options, very long) |
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
from __future__ import print_function | |
import numpy as np | |
import pandas as pd | |
import talib as ta | |
import pandas_datareader as web | |
from sklearn.linear_model import LinearRegression | |
from sklearn.linear_model import Ridge | |
from sklearn.model_selection import cross_val_score |
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
from typing import Any, Generator, TextIO | |
import ffmpeg | |
from srt import Subtitle | |
from srt import parse as srt_parse | |
def segments(file: TextIO) -> Generator: | |
return srt_parse(file.read()) |
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
test: | |
@python tests.py |
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
{ | |
"title":"ge", | |
"description":"O app oficial do globoesporte agora \\u00e9 ge; com tudo sobre o seu time e esportes favoritos\\r\\n\\r\\n<b>SIGA SEU TIME</b>\\r\\nInforma\\u00e7\\u00f5es sobre o seu time do cora\\u00e7\\u00e3o.\\r\\n\\r\\n<b>V\\u00cdDEOS</b>\\r\\nAssista aos principais lances e reportagens.\\r\\n\\r\\n<b>NOT\\u00cdCIAS</b>\\r\\nFique por dentro do mundo dos esportes.\\r\\n\\r\\n<b>TABELAS</b>\\r\\nAcompanhe a posi\\u00e7\\u00e3o do seu time nos campeonatos.\\r\\n\\r\\n<b>AGENDA</b>\\r\\nSaiba quando v\\u00e3o rolar os principais jogos.\\r\\n\\r\\n<b>ALERTAS</b>\\r\\nSeja avisado sobre as principais novidades.\\r\\n\\r\\n\\r\\nCAMPEONATOS NACIONAIS:\\r\\n\\r\\n- Brasileir\\u00e3o s\\u00e9rie A\\r\\n- Brasileir\\u00e3o s\\u00e9rie B\\r\\n- Brasileir\\u00e3o s\\u00e9rie C\\r\\n- Brasileir\\u00e3o s\\u00e9rie D\\r\\n- Copa do Brasil\\r\\n\\r\\n\\r\\nCAMPEONATOS REGIONAIS E ESTADUAIS:\\r\\n\\r\\n- Paulista\\r\\n- Carioca\\r\\n- Mineiro\\r\\n- Paranaense\\r\\n- Ga\\u00facho\\r\\n- Baiano\\r |
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 unittest | |
import responses | |
import json | |
from unittest.mock import patch | |
from main import httpbin_requester, fetch_google_play_installs | |
class HTTPBinRequesterTestCase(unittest.TestCase): | |
NewerOlder