CLICK ME
yes, even hidden code blocks!
print("hello world!")
import os | |
import tempfile | |
from http import HTTPStatus | |
from typing import Annotated | |
import sqlalchemy as sa | |
from fastapi import APIRouter, BackgroundTasks, Depends, FastAPI, HTTPException | |
from fastapi.responses import FileResponse | |
from sqlalchemy import select | |
from sqlalchemy.orm import DeclarativeBase, Mapped, Session, mapped_column, undefer |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Deny", | |
"Action": [ | |
"logs:CreateLogGroup", | |
"logs:CreateLogStream", | |
"logs:PutLogEvents" | |
], |
>>> class X: | |
... def __init__(self): | |
... self._a = None | |
... @property | |
... def a(self): | |
... return self._a | |
... @a.setter | |
... def a(self, val): | |
... self._a = val | |
... |
# install latest | |
for i in {7..11}; do V=$(pyenv install --list | grep "^[[:space:]]*3\.${i}\.[0-9]*" | tail -n 1 | sed 's,[[:space:]]*,,g'); echo "${V}"; yes n | pyenv install ${V}; echo; echo; done | |
# forced uninstall everything but latest | |
for i in {7..11}; do for V in $(pyenv versions | grep "^[[:space:]]*3\.${i}\.[0-9]*" | ghead -n -1 | sed 's,[[:space:]]*,,g'); do echo "${V}"; yes n | pyenv uninstall --force ${V}; done; echo; echo; done |
import calendar | |
import re | |
from datetime import date, timedelta | |
from string import punctuation | |
import dateparser | |
from scrapy import Request | |
from gazette.items import Gazette | |
from gazette.spiders.base import BaseGazetteSpider |
WEBVTT | |
Kind: captions | |
Language: pt-BR | |
00:00:00.000 --> 00:00:02.838 | |
Uma grande mudança chega | |
a pip em outubro. | |
00:00:02.938 --> 00:00:07.362 | |
Será um grande alicerce para tornar mais fácil |
#!/usr/bin/env bash | |
INPUT_FILE="${1}" | |
TIME_START="${2}" # expected format HH:MM:SS | |
TIME_DURATION="${3}" # expected format HH:MM:SS | |
OUTPUT_FILE="${4}" | |
BASE="$(basename "${INPUT_FILE}")" | |
SHM_AUDIO_FILE="/dev/shm/audio_${BASE}" | |
SHM_VIDEO_FILE="/dev/shm/video_${BASE}" |
#!/usr/bin/env bash | |
URL_PREFIX='https://raw.githubusercontent.com/github/gitignore/master/' | |
URL_SUFFIX='.gitignore' | |
GLOBAL_IGNORE=~/.config/git/ignore | |
mkdir -p "${GLOBAL_IGNORE}" && rmdir "${GLOBAL_IGNORE}" | |
echo -n > "${GLOBAL_IGNORE}" | |
pushd /tmp | |
for IGNORE in {Linux,Windows,macOS,Vim,Emacs,JetBrains,SublimeText,VisualStudioCode,Ansible,VirtualEnv}; do |
#!/usr/bin/env python3 | |
"""A `grep`-like copycat to match before and after matched lines. | |
""" | |
import re | |
def grep(pattern, string, before=0, after=0): | |
"""A grep-like copycat to match before and after matched lines, | |
if requested. |