Skip to content

Instantly share code, notes, and snippets.

@KernelA
KernelA / .dockerignore
Created February 1, 2020 20:31
.dockerignore example for Python projects
# Git
.git
.gitignore
.gitattributes
# CI
.codeclimate.yml
.travis.yml
.taskcluster.yml
@todbot
todbot / rawhid_code.py
Last active May 6, 2024 14:49
circuitpython raw hid demo
# rawhid_code.py -- copy to CIRCUITPY as "code.py"
# don't forget to install rawhid_boot.py as "boot.py" and press reset
# works with report IDs up to 63 byte report count
# test with hidapitester like:
# ./hidapitester --usagePage 0xff00 --usage 1 --open -l 64 --send-output 2,3,4,5 --timeout 1000 --read-input 1
# adapted from code presented here:
# https://github.com/libusb/hidapi/issues/478
import time
import usb_hid
@FlorSanders
FlorSanders / JetsonNano2GB_LlamaCpp_SetupGuide.md
Created April 11, 2024 15:17
Setup llama.cpp on a Nvidia Jetson Nano 2GB

Setup Guide for llama.cpp on Nvidia Jetson Nano 2GB

This is a full account of the steps I ran to get llama.cpp running on the Nvidia Jetson Nano 2GB. It accumulates multiple different fixes and tutorials, whose contributions are referenced at the bottom of this README.

Procedure

At a high level, the procedure to install llama.cpp on a Jetson Nano consists of 3 steps.

  1. Compile the gcc 8.5 compiler from source.
@karpathy
karpathy / min-char-rnn.py
Last active May 6, 2024 14:48
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)
<?php
/**
*
* Plugin Name: CF7 to Webhook - Add UTM Cookies
* Description: Add Cookies data to webhook
* Version: 1.0.2
* Author: Mário Valney - Modified for Handl UTM Grabber by Epic Matt
* Author URI: https://mariovalney.com + Modified by https://epicim.com
* Text Domain: cf7-to-webhook-add-cookies
*/
@BlueSwordM
BlueSwordM / Simple SVT-AV1 Beginner Guide Part 1.md
Last active May 6, 2024 14:45
Simple SVT-AV1 Beginner Guide Part 1

Since we're dealing with simpler AV1 encoding, that does mean we'll be eskewing aomenc-av1, since it requires 2-pass encoding to be able to take advantage of it, and I use it externally since I have access to a special build.

Now, let's get on with the simple guide.

You'll first need to be reasonably competent with command line builds or use a recent up to date ffmpeg GUI with support for SVT-AV1.

As such, I would recommend getting a master git ffmpeg build for the operating system of your choice right here:

https://github.com/BtbN/FFmpeg-Builds

@Verssae
Verssae / safetyedu.js
Last active May 6, 2024 14:44
한양대 안전교육 스킵 스크립트
/*
Hanyang Univ. a script for skipping safetyedu courses
http://safetyedu.hanyang.ac.kr/
[교육 영상 스킵]
1. '수강하기' 버튼을 눌러 안전교육 창을 띄운다.
2. 개발자도구(F12 버튼을 눌러) 열어 'console' 탭에 이동해 아래 스크립트를 붙여넣는다.
3. 6과목에 대해 반복한다.
# This supports merging as many adapters as you want.
# python merge_adapters.py --base_model_name_or_path <base_model> --peft_model_paths <adapter1> <adapter2> <adapter3> --output_dir <merged_model>
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import os
import argparse
@nate-dryer
nate-dryer / resume.json
Last active May 6, 2024 14:42
My Resume
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Nate Dryer",
"label": "Product Management Leader | Specializing in AI/ML Innovation, User-Centric Design, and Data-Driven Decision Making",
"image": "",
"email": "dryer.nathan@gmail.com",
"phone": "(626) 223-0106",
"url": "https://natedryer.com",
"summary": "I have 10+ years of experience delivering digital B2B and consumer-facing solutions across various industries, including mobile banking, healthcare tech, and user experience management. My passion is to build products that people love to use and want to buy, by understanding their needs, pain points, and preferences, and by applying data-driven insights and user-centric design principles. I have a strong background in UX and Artificial Intelligence / Machine Learning (AI/ML), and I have led cross-functional teams to successfully launch innovative AI-powered solutions.",
@fnky
fnky / ANSI.md
Last active May 6, 2024 14:41
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27