Skip to content

Instantly share code, notes, and snippets.

View charles-cai's full-sized avatar

Charles Cai charles-cai

View GitHub Profile
@jlia0
jlia0 / agent loop
Last active December 8, 2025 04:12
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@willccbb
willccbb / grpo_demo.py
Last active December 9, 2025 07:47
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
"""
citation:
@misc{brown2025grpodemo,
title={Granular Format Rewards for Eliciting Mathematical Reasoning Capabilities in Small Language Models},
author={Brown, William},
@Databracket9
Databracket9 / API to Postgres ETL
Created July 7, 2024 09:51
End-to-End Data Engineering with Pandas
import pandas as pd
import requests
import configparser
import psycopg2
# raw_data = requests.get("https://storage.googleapis.com/generall-shared-data/startups_demo.json")
# with open("raw_files/raw_data.json", "w") as f:
# f.write(raw_data.text)
@Cdaprod
Cdaprod / Wireless-Bluetooth-USB-C-Keyboard-with-ESP32-S2-Mini.md
Created July 7, 2024 02:22
This setup enables your ESP32-S3 Mini to act as a wireless Bluetooth keyboard using a USB-C keyboard. Ensure you adapt the provided code examples to fit your specific setup and environment.

Building a Wireless Bluetooth USB-C Keyboard with ESP32-S3 Mini

Creating a wireless Bluetooth USB-C keyboard using an ESP32-S3 Mini involves connecting a USB-C keyboard to an ESP32-S3 via a USB Host Shield. This project allows you to transform a wired keyboard into a wireless one, leveraging Bluetooth communication. Below is a detailed guide on how to set up and program this system.

Components Needed

  1. ESP32-S3 Mini
  2. USB Host Shield or USB Host Adapter (e.g., USB Host Shield for Arduino or a USB Host Module)
  3. USB-C Keyboard
  4. USB-C to USB-A Adapter (if necessary)
@pykeras
pykeras / ollama_dedicated_gpu.md
Last active August 6, 2025 16:26
Run ollama on specific GPU(s)

Ollama GPU Selector: Customize GPU Usage for Ollama

If you want to run Ollama on a specific GPU or multiple GPUs, this tutorial is for you. By default, Ollama utilizes all available GPUs, but sometimes you may want to dedicate a specific GPU or a subset of your GPUs for Ollama's use. The idea for this guide originated from the following issue: Run Ollama on dedicated GPU.

Steps:

  1. Create a script let's call it ollama_gpu_selector.sh:

    nano ollama_gpu_selector.sh
@bigsnarfdude
bigsnarfdude / gpt2-ppo-training.ipynb
Last active July 18, 2025 11:04
gpt2-ppo-training.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@levelsio
levelsio / gist:5bc87fd1b1ffbf4a705047bebd9b4790
Last active September 27, 2025 09:49
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
@JVital2013
JVital2013 / How-To-Hand-Track-Polar-Orbiting-Satellites.md
Last active April 2, 2025 11:42
How to Hand-Track Polar-orbiting satellites

How to Hand-Track Polar-Orbiting Weather Satellites

This is how I hand-track polar-orbiting weather satellites using an old equatorial mount telescope tripod and a 1.7 GHz grid dish. This may not be the best way to do it, and other ideas are welcome!

If you're unfamiliar with HRPT reception, this is not the right place to learn about it. Head over to https://sgcderek.github.io/blog/beginner-hrpt-guide.html for that. This write-up only focuses on hand-tracking to record a baseband.

Hardware Required

The crux of the "tracking" design is the equatorial mount. These are not cheap to buy new, it's destructive to mount a dish to it, and the mount is not used the way it's designed - but for my needs, it works! I had an old one from the early 1990s lying around, so it was convenient and essentially free. Of course, you can use another mount - but you'll need to ask for someone else's opinion on how that works since equatorial is all I know 😄.

@devbdavis
devbdavis / Readme.md
Last active October 6, 2025 14:28
ESP32-S2 Keyboard on Arduino
@deanmlittle
deanmlittle / useful-bitcoin-tools.md
Last active August 3, 2025 05:27
Useful Bitcoin Tools