Skip to content

Instantly share code, notes, and snippets.

@veekaybee
veekaybee / normcore-llm.md
Last active January 9, 2025 15:56
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

Draziw.Button.Mines
ag.video_solutions.wedotv
ahf.dummynation
ai.socialapps.speakmaster
air.com.beachbumgammon
air.com.freshplanet.games.SongPop2
air.com.gamesys.mobile.slots.jpj
air.com.goodgamestudios.empirefourkingdoms
air.com.kitchenscramble.goo
air.com.lalaplay.rummy45
#!/usr/bin/env python
# Standard imports
from abc import ABCMeta, abstractmethod
import logging
import os
import shlex
import subprocess
from typing import Callable
@zulhfreelancer
zulhfreelancer / how-to-install-promtool.md
Created April 4, 2024 04:07
How to install promtool by Prometheus?

How to install promtool by Prometheus?

# Fetch latest version
TAG=$(curl -s https://api.github.com/repos/prometheus/prometheus/releases | jq -r '.[] | .tag_name' | head -n 1)
echo $TAG

# Remove the `v` prefix
VERSION=$(echo $TAG | sed 's/v//')
echo $VERSION

An error

I was using TEQC to do quality control of my WES bam files aligned by bwa-mem. My data are paired end, so a function reads2pairs is called to make the paired-end reads to be a single fragment. I then get this error:

> readpairs <- reads2pairs(reads)
Error in reads2pairs(reads) : read pair IDs do not seem to be unique

I asked in the bioconductor support site and went to the source code of that function.

@nonameset
nonameset / natives.py
Last active January 9, 2025 15:49
GTA5 Native Renamer
# Python script for IDA Pro to rename all native functions for Grand Theft Auto V in the GTA5.exe.
# Executable version used for dump: 1.0.2824.0
# Not to be used for online modifications, for educational purposes only.
natives = [
( 0x4EDE34FBADD967A6, 0x4EDE34FBADD967A6, 0x15f6978, "WAIT"),
( 0xE81651AD79516E48, 0xe81651ad79516e48, 0x15f6364, "START_NEW_SCRIPT"),
( 0xB8BA7F44DF1575E1, 0xb8ba7f44df1575e1, 0x15f6448, "START_NEW_SCRIPT_WITH_ARGS"),
( 0xEB1C67C3A5333A92, 0xeb1c67c3a5333a92, 0x15f6488, "START_NEW_SCRIPT_WITH_NAME_HASH"),
( 0xC4BB298BD441BE78, 0xc4bb298bd441be78, 0x15f64cc, "START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS"),
@zacroker
zacroker / Dockerfile
Last active January 9, 2025 15:48
Dockerfiles for building and debugging stm32 microcontrollers
FROM ubuntu:18.04 as binary-build-stage
RUN apt update -y && \
apt install -y --no-install-recommends \
build-essential \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi
WORKDIR /src
COPY . .
ARG DEBUG=1
@dahjelle
dahjelle / pre-commit.sh
Created July 13, 2016 16:48
Pre-commit hook for eslint, linting *only* staged changes.
#!/bin/bash
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$')
do
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes
if [ $? -ne 0 ]; then
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint."
exit 1 # exit with failure status
fi
done
@NGR-NP
NGR-NP / location.json
Last active January 9, 2025 15:47
Nepal Location
{
"province": [
{
"3": "Bagmati"
},
{
"4": "Gandaki"
},
{
"6": "Karnali"
@rphlmr
rphlmr / clear-db.ts
Last active January 9, 2025 15:46
Drizzle snippets
// Credits to Louistiti from Drizzle Discord: https://discord.com/channels/1043890932593987624/1130802621750448160/1143083373535973406
import { sql } from "drizzle-orm";
const clearDb = async (): Promise<void> => {
const query = sql<string>`SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE';
`;