Skip to content

Instantly share code, notes, and snippets.

#define _XOPEN_SOURCE 600
#define _POSIX_C_SOURCE 200112L
#define _BSD_SOURCE
#include <stdio.h>
#include <string.h>
#include <math.h>
// mmmmm..... donut!
int main() {
@yihu-dev
yihu-dev / facegood_bs_to_arkit.py
Created March 8, 2022 05:53
python script to convert FACEGOOD bs_value to ARKit format
### script to convert FACEGOOD bs values to ARKIT
import numpy as np
import pandas as pd
import argparse
mapping_one = {
'jawForward': 'jaw_thrust_c',
'jawLeft': 'jaw_sideways_l',
'jawRight': 'jaw_sideways_r',
'jawOpen': 'mouth_stretch_c',
@ninehills
ninehills / chatglm-openai-api.ipynb
Last active April 16, 2024 01:15
chatglm-openai-api.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rain-1
rain-1 / llama-home.md
Last active December 27, 2025 05:31
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
@wey-gu
wey-gu / animated_connectors.md
Last active October 22, 2025 21:09
How to create diagrams like Alex Xu/bytebytego's great work

Tool: draw.io

Animate the connectors

Animating your connectors is great for demonstrating directional flow charts, electrical circuits and more. To animate your connectors:

  1. Click on the connector you wish to animate. Hold Ctrl or Cmd and click to select multiple connectors
  2. On the right-hand side go to Style > Property and click on the arrow to expand the field
  3. Scroll down to Flow Animation and check the box