- Verify that IndentTokenizer works with a non-LINE-based tokenizer specification, rather than the default
- Resurrect the 'NEWLINE' token, as we need it to be as picky about the file format as the current parser is
- Implement a parser which leverages this to properly change the lexer states for both ordinary functions and "def" syntax functions. Determine if this should be custom or PLY or codetalker or what, by first determining whether these libraries would support a lexer like ours
- Do performance testing comparing the new parser against the old, and against the pyparsing implementation
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 * as mongoose from 'mongoose'; | |
| export let Schema = mongoose.Schema; | |
| export let ObjectId = mongoose.Schema.Types.ObjectId; | |
| export let Mixed = mongoose.Schema.Types.Mixed; | |
| export interface IHeroModel extends mongoose.Document { | |
| name: string; | |
| power: string; |
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
| from subprocess import Popen, PIPE | |
| import re | |
| def getvideodetails(filepath): | |
| cmd = "avconv -i %s" % filepath | |
| p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE) | |
| di = p.communicate() | |
| for line in di: | |
| if line.rfind("Duration") > 0: | |
| duration = re.findall("Duration: (\d+:\d+:[\d.]+)", line)[0] |
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
| #!/usr/bin/env python3 | |
| """ | |
| License: MIT License | |
| Copyright (c) 2023 Miel Donkers | |
| Very simple HTTP server in python for logging requests | |
| Usage:: | |
| ./server.py [<port>] | |
| """ | |
| from http.server import BaseHTTPRequestHandler, HTTPServer |
I updated my package autolike today using the following steps:
- Changed the version number in
setup.pyand modify package as necessary.
Assuming you’re in the root of your project directory, then run:
pip install -e .
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
| #!/bin/bash | |
| # How to use: | |
| # Store this file as .git/hooks/pre-commit and make it executable | |
| # Or, to share the hook with your team, store as .githooks/pre-commit, | |
| # make this file executable and run: | |
| # git config core.hooksPath .githooks | |
| # A pre-commit hook for go projects. In addition to the standard |
OlderNewer