Skip to content

Instantly share code, notes, and snippets.

View wanghaisheng's full-sized avatar
🏠
working on my new project HeyTcm now..Game,self care,wearable device,tcm

HeisenBerg? wanghaisheng

🏠
working on my new project HeyTcm now..Game,self care,wearable device,tcm
View GitHub Profile
@wanghaisheng
wanghaisheng / agent loop
Created March 10, 2025 06:54 — forked from jlia0/agent loop
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
各式食材中英文對照
麵粉/中筋麵粉 Plain flour /all-purpose flour
低筋麵粉/低根粉 cake flour / soft flour / weak flour / low protein flour
高筋麵粉/筋麵/根麵/高根粉 gluten flour / strong flour / bread flour / baker's flour / high protein flour
全麥麵粉 whole wheat flour
澄麵粉/澄粉/澄麵 non-glutinous flour / wheat flour / wheat starch
自發麵粉 self- raising flour
粗玉米豆粉 polenta / yellow cornmeal
粟粉/粟米粉/玉米粉/玉米澱粉 corn flour / cornstarch
@wanghaisheng
wanghaisheng / README.md
Created January 5, 2025 17:32 — forked from hourianto/README.md
Current prompts for WebSim (as of July 13, 2024)

Current WebSim prompts and main context. System/User/Assistant blocks denote different roles in the messages array for the API requests. Stuff in {} is either a file that's too big to be inserted directly, or an explanation.

From what I can see, WebSim is mostly "carried" by Claude's creativity.

  • Main prompt: main_prompt.txt - also check main_flow.txt to see how a complete request is made.
  • Edit prompt: edit_prompt.txt- used when right-click editing the element. Uses the currently selected model. I didn't manage to get the whole prompt with the examples, but most of it at least.
  • Fake LLM API prompt: api_prompt.txt - currently WebSim always uses Claude 3.5 Sonnet for this (from info on Discord).
  • Image rewriting prompt: image_gen_prompt.txt - also uses Claude (don't know what model). Not sure what image model is being used, probably some version SDXL (like SDXL Turbo and similar)

The temperature used is 1, at least for Claude.

i
me
my
myself
we
our
ours
ourselves
you
your
@wanghaisheng
wanghaisheng / alexa.js
Created June 28, 2024 05:14 — forked from aowongster/alexa.js
Getting the Alexa top 1 million sites directly from the server, unzipping it, parsing the csv and getting each line as an array. Now with majestic
var request = require('request');
var unzip = require('unzip');
var csv2 = require('csv2');
const alexa = 'http://s3.amazonaws.com/alexa-static/top-1m.csv.zip'
const majestic = 'http://downloads.majesticseo.com/majestic_million.csv'
const sources = [majestic];
const zSources = [alexa];
@wanghaisheng
wanghaisheng / 01-mac-profiling.md
Created December 18, 2023 11:18 — forked from loderunner/01-mac-profiling.md
Profiling an application in Mac OS X

Profiling an application in Mac OS X

Finding which process to profile

If your system is running slowly, perhaps a process is using too much CPU time and won't let other processes run smoothly. To find out which processes are taking up a lot of CPU time, you can use Apple's Activity Monitor.

The CPU pane shows how processes are affecting CPU (processor) activity:

@wanghaisheng
wanghaisheng / custom-log-filtering-and-formatting.py
Created October 28, 2023 15:14 — forked from acdha/custom-log-filtering-and-formatting.py
Example of how to filter or apply custom formatting using Python's logging library
#!/usr/bin/env python
# encoding: utf-8
from pprint import pformat, pprint
import logging
class PasswordMaskingFilter(logging.Filter):
"""Demonstrate how to filter sensitive data:"""
@wanghaisheng
wanghaisheng / autotranslate_hardsubs.py
Created July 15, 2023 05:06 — forked from kumorikuma/autotranslate_hardsubs.py
Takes as input a video with hardsubs, and will generate translated softsubs in the target language
# Requirements:
# - ImageMagick binary
# - Windows.Media.Ocr.Cli binary
# - VideoSubFinder binary
#
# Official GCloud Translate Setup:
# First 500k characters / mo is free: https://cloud.google.com/translate/pricing
# Install Python Module: pip install google-cloud-translate
# Setup Google Cloud account and billing information: https://cloud.google.com/
# Make a new project and enable "Cloud Translation API": https://console.cloud.google.com/apis/dashboard
@wanghaisheng
wanghaisheng / ffmpeg.md
Created May 18, 2022 08:00 — forked from protrolium/ffmpeg.md
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@wanghaisheng
wanghaisheng / build_flask_.sh
Created May 8, 2022 12:39 — forked from mrf345/build_flask_.sh
Building one-file executable for Python Flask using Pyinstaller
#!/bin/bash
pyinstaller -F -w \
--hidden-import='email.mime.multipart' \
--hidden-import='email.mime.message' \
--hidden-import='email.mime.text' \
--hidden-import='email.mime.image' \
--hidden-import='email.mime.audio' \
--hidden-import='sqlalchemy.sql.default_comparator' \
--hidden-import='jinja2' \
main.py