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 logging | |
import os | |
import sys | |
import traceback | |
from contextlib import contextmanager | |
import diart.operators as dops | |
import numpy as np | |
import rich | |
import rx.operators as ops |
Last updated: April 2021
Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22
).
Depending on the age and/or popularity of the video, not all formats will be available.
Resolution | AV1 HFR High | AV1 HFR | AV1 | VP9.2 HDR HFR | VP9 HFR | VP9 | H.264 HFR | H.264 |
---|---|---|---|---|---|---|---|---|
MP4 | MP4 | MP4 | WebM | WebM | WebM | MP4 | MP4 |
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
def geometric_brownian_motion(G0, mu, sigma, N, T): | |
"""Simulates a Geometric Brownian Motion. | |
:param float G0: initial value | |
:param float mu: drift coefficient | |
:param float sigma: diffusion coefficient | |
:param int N: number of discrete steps | |
:param int T: number of continuous time steps | |
:return list: the geometric Brownian Motion | |
""" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 numpy as np | |
def cellular_automaton(rule_number, size, steps, | |
init_cond='random', impulse_pos='center'): | |
"""Generate the state of an elementary cellular automaton after a pre-determined | |
number of steps starting from some random state. | |
Args: | |
rule_number (int): the number of the update rule to use | |
size (int): number of cells in the row |
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 xml.etree.ElementTree as ET | |
def indent(elem, level=0): | |
i = "\n" + level*" " | |
if len(elem): | |
if not elem.text or not elem.text.strip(): | |
elem.text = i + " " | |
if not elem.tail or not elem.tail.strip(): | |
elem.tail = i |
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
# xml document | |
# edit.py | |
# encode.py | |
# extract.py | |
# namespace.py | |
# search.py |
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
// Referencia del servicio web https://consultaqr.facturaelectronica.sat.gob.mx/ConsultaCFDIService.svc | |
/// <summary> | |
/// Estado de la factura de acuerdo a validación. | |
/// </summary> | |
enum Status | |
{ | |
Valida = 1, //Válida por el SAT | |
NoValida = 2, //No válida por el SAT | |
Duplicada = 3, //Se intenta cargar más de una vez en el sistema |
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
<?php | |
$xml = simplexml_load_file('test.xml'); | |
$ns = $xml->getNamespaces(true); | |
$xml->registerXPathNamespace('c', $ns['cfdi']); | |
$xml->registerXPathNamespace('t', $ns['tfd']); | |
//EMPIEZO A LEER LA INFORMACION DEL CFDI E IMPRIMIRLA | |
foreach ($xml->xpath('//cfdi:Comprobante') as $cfdiComprobante){ | |
echo $cfdiComprobante['version']; |
NewerOlder