pip install datasette sqlite-utils sqlite-ner
# audio
curl https://agnbicentenario.mininterior.gob.ar/api/vida/search\?recurso\=2\&isArray\=false\&termino\=%20\&buscarEn\=all\&tipoBusqueda\=aprox\&palabras\=%20 > audio.json
cat audio.json | jq '[.[] | .assets[] + .metadatos + .fondo]' | sqlite-utils insert agn.db audios -
sqlite-utils transform agn.db audios --drop _id --drop description --drop resourcetype --pk id
sqlite-utils enable-fts agn.db audios title puesta_audiovisual observacion_preparacion legajo_resumen fecha_grabacion
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
#!/usr/bin/env -S uv run -s | |
# /// script | |
# requires-python = ">=3.11" | |
# dependencies = [] | |
# /// | |
import argparse | |
import os | |
import subprocess | |
import shutil |
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
#!/usr/bin/env bash | |
# 1. Search for text in files using Ripgrep | |
# 2. Interactively narrow down the list using fzf | |
# 3. Open the file in Vim | |
rg --color=always --line-number --no-heading --smart-case -t txt "${*:-}" | | |
fzf --ansi \ | |
--color "hl:-1:underline,hl+:-1:underline:reverse" \ | |
--delimiter : \ | |
--preview 'bat --color=always {1} --highlight-line {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
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"height": "container", | |
"data": { | |
"url": "https://fullfatsearch.fly.dev/youtube.csv?sql=select%0D%0A++v.upload_date%2C%0D%0A++SUM%28%0D%0A++++%28LENGTH%28s.text%29+-+LENGTH%28REPLACE%28s.text%2C+%3Asearch%2C+%27%27%29%29%29+%2F+LENGTH%28%3Asearch%29%0D%0A++%29+AS+boludo%2C%0D%0A++s.video_id%2C%0D%0A++s.video_title%2C%0D%0A++v.video_url%0D%0Afrom%0D%0A++subtitles_with_videos+s%0D%0A++join+videos+v+on+s.video_id+%3D+v.video_id%0D%0Awhere%0D%0A++subtitle_id+in+%28%0D%0A++++select%0D%0A++++++rowid%0D%0A++++from%0D%0A++++++subtitles_fts%0D%0A++++where%0D%0A++++++subtitles_fts+match+%3Asearch%0D%0A++%29%0D%0Agroup+by%0D%0A++s.video_id%2C%0D%0A++s.video_title%2C%0D%0A++v.video_url%0D%0Aorder+by%0D%0A++v.upload_date+asc&search=boludo", | |
"format": { | |
"type": "csv" | |
} | |
}, | |
"mark": { |
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
#!/bin/bash | |
# battery monitor systemd suspend/resume hook | |
LOGFILE="/var/log/battery.csv" | |
KERNEL=$(uname -r) | |
BIOS=$(dmidecode -s bios-version) | |
log() { | |
cd /sys/class/power_supply |
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
#!/usr/bin/env bash | |
export PATH="$PATH:/usr/local/bin:/usr/bin" | |
set -e | |
# Token address | |
TOKEN="A6rSPi9JmJgVkW6BatsA6MjFYLseizPM2Fnt92coFjf4" | |
CHAIN="solana" | |
DEX="raydium" | |
EMOJI="🦎" |
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
""" | |
pip install httpx aiofiles tqdm | |
""" | |
import sys | |
import json | |
import httpx | |
import asyncio | |
import argparse | |
import aiofiles | |
import traceback |
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
openssl req -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout cert.key -out cert.pem |
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
curl -sL https://mstdn.jp/api/v1/streaming/public | grep -oE '{.*' --line-buffered | jq --unbuffered -r '.emojis[].url' | xargs -n1 ~/.iterm2/imgcat -u |
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
document.programPage.TOTALES = {} | |
document.programPage.__guardarTotales = function() { | |
const [ INICIAL, VIGENTE, EJECUTADO ] = $('.importe-cabecera-value').map((idx, item) => { | |
return parseFloat(item.innerText.replaceAll(".", "").replace(",", ".")) | |
}) | |
this.TOTALES = { | |
"Presupuesto Inicial": INICIAL, | |
"Presupuesto Vigente": VIGENTE, |
NewerOlder