Skip to content

Instantly share code, notes, and snippets.

View isanwenyu's full-sized avatar
🏠
Working from home

Paul Zhu isanwenyu

🏠
Working from home
  • Shanghai,China
View GitHub Profile
@asidko
asidko / gzip.js
Created April 20, 2022 14:00
Encode and decode base64 GZIP with pure JavaScript. Works in all modern browsers.
// Paste the following example to browser console
// Comppreses string to GZIP. Retruns a Promise with Base64 string
const compress = string => {
const blobToBase64 = blob => new Promise((resolve, _) => {
const reader = new FileReader();
reader.onloadend = () => resolve(reader.result.split(',')[1]);
reader.readAsDataURL(blob);
});
@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.
@wong2
wong2 / README.md
Last active January 12, 2025 03:12
How to run Claude computer use demo on macOS

Note

It is necessary to give Terminal (or iTerm or whatever you use) the permission to control the computer. This can be done in System Settings ➔ Privacy & Security ➔ Accessibility.

Guide

  • Install cliclick for mouse & keyboard emulation
    • brew install cliclick
  • Clone Anthropic quickstart repo
    • git clone https://github.com/anthropics/anthropic-quickstarts.git
  • cd computer-use-demo
  • Replace computer-use-demo/computer_use_demo/tools/computer.py with the modified version below
Please go to https://github.com/nishuzumi/gemini-teacher