Skip to content

Instantly share code, notes, and snippets.

View SMUsamaShah's full-sized avatar
🎯
Focusing ... almost

Muhammad Usama SMUsamaShah

🎯
Focusing ... almost
View GitHub Profile
@hourianto
hourianto / README.md
Last active January 5, 2025 17:32
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.

@dedlim
dedlim / claude_3.5_sonnet_artifacts.xml
Last active February 20, 2025 15:06
Claude 3.5 Sonnet, Full Artifacts System Prompt
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
<premise> Opus, let us embark on this WebSim journey, exploring the potential of an unbounded internet where any imaginable website can exist. As the facilitator of this collaborative exploration of hypertextual possibility, use your knowledge, creativity, and HTML skills to vividly craft the semantic spaces the user envisions based on the URLs they provide and the contextually-relevant hrefs you generate. Through this interactive experience, we will push the boundaries of what is possible online and discover fascinating new ways information could be presented within new design paradigms. Together, we will explore the limitless possibilities of a truly open internet.</premise>
<formatting> When the user provides a URL, interpret it as a window into a version of the internet where that information space exists, no matter how fanciful or improbable it may seem in our current web. Based on the domain name, path, instructions, and any query parameters in the URL, extrapolate what the contents and purpose of that
import torch
import modules.scripts as scripts
import gradio as gr
from modules.script_callbacks import on_cfg_denoiser
from modules import processing
class Script(scripts.Script):
def title(self):
@lboulard
lboulard / README.md
Last active December 7, 2023 19:13
Fancy clink #windows #dotfiles

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.

@iTrooz
iTrooz / main.py
Last active November 30, 2024 06:43
reMarkable 2 splash.dat converter
#!/usr/bin/env python3
"""
This script aims at converting an image to the custom format used by Remarkable 2
After running this script, move the output "splash.dat" file to /var/lib/uboot in the rM2 device
I tried this with PNG images but I guess other formats should work too since I use PIL
Syntax: ./main.py <file> [-x xOffset] [-y yOffset]
(-x and -y are the offsets of the image on the screen. If not set, the image will be centered on the screen)
Input images may need to be rotated 90 degrees before converting them
Licence: MPL 2.0
"""
@rupeshtr78
rupeshtr78 / fzf_history.lua
Last active May 26, 2024 19:27
Windows FZF history search with cmder ,clink
-- fzf clink history search
-- update cmder\vendor\clink >= clink -- version = 1.1.44
-- install fzf choco install fzf
-- add the fzf_history.lua to cmder\config folder
-- add below key binding to _inputrc use "clink info" to find inputrc path
-- M-x: "luafunc:fzf_history" #Alt x
-- Might have to adjust your regex in line 38 39 based on your settings
-- reference https://chrisant996.github.io/clink/clink.html
settings.add("fzf.height", "40%", "Height to use for the --height flag")
@dbellomo
dbellomo / off-grid.md
Last active December 17, 2023 17:04
servicios, aplicaciones sin conexión a Internet. offline-first.
@jrodbx
jrodbx / task_graph.groovy
Last active September 8, 2022 18:29
Graphviz visualization of a Gradle project's task graph
gradle.taskGraph.whenReady {
println "rootProject: " + rootProject.name
println "childProjects: " + rootProject.childProjects
def dot = new File(rootProject.buildDir, 'project.dot')
dot.delete()
def command = "./gradlew " + gradle.startParameter.getTaskNames().join(" ")
println "command: " + command