Skip to content

Instantly share code, notes, and snippets.

@karpathy
karpathy / min-char-rnn.py
Last active December 12, 2025 18:57
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@elowy01
elowy01 / BCFtools cheat sheet
Last active December 12, 2025 18:54
BCFtools cheat sheet
*bcftools filter
*Filter variants per region (in this example, print out only variants mapped to chr1 and chr2)
qbcftools filter -r1,2 ALL.chip.omni_broad_sanger_combined.20140818.snps.genotypes.hg38.vcf.gz
*printing out info for only 2 samples:
bcftools view -s NA20818,NA20819 filename.vcf.gz
*printing stats only for variants passing the filter:
bcftools view -f PASS filename.vcf.gz
@YoSoyGena
YoSoyGena / radios_nacionales.md
Last active December 12, 2025 18:54 — forked from pisculichi/radios_nacionales.txt
URLs de radios nacionales de Argentina, para poder escuchar en la web, lista COMPLETAMENTE re-hecha y actualizada para el 2025

RADIOS DE ARGENTINA - LISTA COMPLETA ACTUALIZADA 2025

Tabla actualizada con URLs de streaming de radios argentinas nacionales y provinciales.

NOTAS IMPORTANTES

Sobre las URLs de StreamTheWorld (*)

Las radios marcadas con asterisco (*) utilizan el servicio StreamTheWorld. Sus URLs son temporales y requieren renovación periódica. Al acceder al enlace, se genera automáticamente una nueva URL válida.

Formatos de Audio

TCREI Framework: Crafting Effective AI Prompts

The TCREI framework is a powerful approach to writing clear and effective prompts for Generative AI (Gen AI) tools. It emphasizes a structured initial setup followed by a continuous refinement process.

The Framework Breakdown

  • T (Task): Clearly define what you want the AI to do. This is the core action or output you expect.
  • C (Context): Provide all necessary background information relevant to your task. The more context you give, the better the AI can tailor its response.
  • R (References): Offer examples, specific formatting requirements, desired tones, or other guidelines to help the AI understand your expectations more precisely.
  • E (Evaluate): After receiving an AI's output, critically assess whether it meets your goals and expectations.
@chrisdiana
chrisdiana / convert_hex_xterm.py
Created January 29, 2015 23:23
Convert hex color code to closest xterm-256 value
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@koke228666
koke228666 / smopt.user.js
Last active December 12, 2025 18:50
SMopt
// ==UserScript==
// @name SMopt
// @namespace Violentmonkey Scripts
// @match *://friends.grishka.me/*
// @match *://smithereen.my2007.net/*
// @run-at document-start
// @downloadURL https://gist.github.com/koke228666/500ca020d93a105bdfd0eb313a09a105/raw/smopt.user.js
// @updateURL https://gist.github.com/koke228666/500ca020d93a105bdfd0eb313a09a105/raw/smopt.user.js
// @grant none
// @version 1.2.1
@omltcat
omltcat / caddy_labels.md
Last active December 12, 2025 18:46
Caddy with Docker Labels: Easy config for wildcard certs and Authelia

What is this?

One great feature of caddy-docker-proxy is that you can quickly define config rules with Docker Compose labels in each containers on the fly like Traefik, instead of at a centralized place. With this feature, we can define everything in compose files, and don't ever need to mess with a config file (Caddyfile or JSON).

Taking advantage of snippets, I created this docker-compose.yaml example so that you can quickly define routing rules and add authetication like Authelia with just 3 lines of labels below each docker container you use.

With this example, should not ever need to manually edit Caddyfile config.

When you add a new container, you just need to do this:

networks:
@wanyakun
wanyakun / LLDB Debugger commands.txt
Created November 8, 2016 03:03
LLDB Debugger commands
Debugger commands:
apropos -- List debugger commands related to a word or subject.
breakpoint -- Commands for operating on breakpoints (see 'help b' for
shorthand.)
bugreport -- Commands for creating domain-specific bug reports.
command -- Commands for managing custom LLDB commands.
disassemble -- Disassemble specified instructions in the current
target. Defaults to the current function for the
current thread and stack frame.
@thiagozs
thiagozs / DoH_DNSoverHTTPS.md
Created November 29, 2021 21:16
DoH - DNS over HTTPS

DoH - DNS over HTTPS

DoH queries resolve over HTTPS for privacy, performance, and security. DoH also makes it easier to use a name server of your choice instead of the one configured for your system.

Spec

RFC 8484 - DNS Queries over HTTPS (DoH)

Publicly available servers

@gnat
gnat / mariadb_mysql_portable_no_install.md
Last active December 12, 2025 18:42
Portable Database - Standalone MariaDB and MySQL zero install.

Database Standalone Quickstart

🐬 = MySQL 8
🦭 = MariaDB

Why?

  • Localize your database into one single folder of your choosing.
  • No sudo / root requirement.
  • Run multiple database at the same time on the same machine- Full bare metal performance.