[preamble]
TODO:
- download the video
- convert to different formats via ffmpeg
- create thumbnails
- use a trained ML model for scene classification
- make sub clips based on classification
"""Find import and import from statements | |
""" | |
import ast | |
from pathlib import Path | |
class ImportRecord: | |
@classmethod | |
def toplevel_imports(cls, root: Path, prune: list[str] = None) -> list[str]: |
**VS CODE Productivity Shortcuts** 👩💻🧑🏽💻👨🏼💻👩🏼💻👩🏾💻 | |
A kind note: I haven't tested these on windows, if you notice an error, drop it in the comments :). | |
1. Opening and closing sidebar 📂 | |
The sidebar can be opened and closed without clicking on the left-hand side tab using the following shortcuts. | |
Mac — Command + B | |
Windows — Ctrl + B | |
—— |
[ | |
{"id": "1", "title": "PEP Purpose and Guidelines", "authors": "Warsaw, Hylton, Goodger, Coghlan", "discussions_to": null, "status": "Active", "type": "Process", "topic": "", "created": "13-Jun-2000", "python_version": null, "post_history": "21-Mar-2001, 29-Jul-2002, 03-May-2003, 05-May-2012, 07-Apr-2013", "resolution": null, "requires": null, "replaces": null, "superseded_by": null, "url": "https://peps.python.org/pep-0001/", "abstract": ""}, | |
{"id": "2", "title": "Procedure for Adding New Modules", "authors": "Cannon, Faassen", "discussions_to": null, "status": "Active", "type": "Process", "topic": "", "created": "07-Jul-2001", "python_version": null, "post_history": "07-Jul-2001, 09-Mar-2002", "resolution": null, "requires": null, "replaces": null, "superseded_by": null, "url": "https://peps.python.org/pep-0002/", "abstract": "\nIntroduction\nThe Python Standard Library contributes significantly to Python's\nsuccess. The language comes with \"batteries included\", so it is easy\nfor people to become produ |
#!/usr/bin/bash | |
# zn - as zettell | |
# new export variables EDITOR for your editor and | |
#+ NOTES for your notes folder. | |
main () { | |
note_id=$(date +'%Y%m%d%H%M%S') | |
$EDITOR $NOTES/"$note_id".md | |
} |
from dataclasses import dataclass | |
import random | |
pybites_init_questions = [ | |
'If you were to build a chatbot what would it do' | |
] | |
@dataclass | |
class PybitesIntro: |
# Install IPython: python3 -m pip install ipython | |
import IPython | |
from traitlets.config import get_config | |
cfg = get_config() | |
cfg.InteractiveShellEmbed.colors = "Linux" # syntax highlighting | |
cfg.InteractiveShellEmbed.confirm_exit = False | |
alias interacti IPython.embed(config=cfg) |
I am a big fan of the syntastic package. In python, it is useful for viewing both Pyflakes and Bandit errors. However, this only works if syntastic knows what python interpreter to use. Not everyone is fortunate enough to have upgraded all of their software to python3. For reasons out of my control, I end up spending most of my time writing python2 code. This means that the times when I finally get to write python3, all of my syntax checking is broken. How cool would it be to have VIM determine what version of python to use automatically? So, begins my grand experiment...
For this to work, I will be using a virtualenv for python2 and one for python3. It's not absolutely necessary to use virtualenvs but I definitely recommend it. Setting up virtualenvs is out of the scope of this gist but make sure that each virtualenv
"""pins.py | |
Small script that generates all possible 4 number | |
pin combinations. Inspired by @ThePracticalDev's tweet challenge: | |
https://twitter.com/thepracticaldev/status/1000191076106465281?s=21 | |
Challenge Alert!! | |
Write a script that produces all possible 4-digit numbers (0000...9999), | |
then put them into a random order and save the output into a text file. |