Skip to content

Instantly share code, notes, and snippets.

View axsddlr's full-sized avatar
🎯
Focusing

Andre Saddler axsddlr

🎯
Focusing
View GitHub Profile
@axsddlr
axsddlr / claude_3.5_sonnet_artifacts.xml
Created June 28, 2024 20:14 — forked from dedlim/claude_3.5_sonnet_artifacts.xml
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
@axsddlr
axsddlr / dispatch_openai_requests.py
Created April 23, 2023 05:09 — forked from neubig/dispatch_openai_requests.py
A simple script to get results from the OpenAI Asynchronous API
import openai
import asyncio
from typing import Any
async def dispatch_openai_requests(
messages_list: list[list[dict[str,Any]]],
model: str,
temperature: float,
max_tokens: int,
top_p: float,
@axsddlr
axsddlr / promptconvert.py
Created February 23, 2023 00:55 — forked from watzon/promptconvert.py
Stable Diffusion WebUI to InvokeAI prompt conversion script
import re
import argparse
re_attention = re.compile(r"""
\\\(|
\\\)|
\\\[|
\\]|
\\\\|
\\|
@axsddlr
axsddlr / threesum_fixed_i_think.c
Created March 29, 2017 03:47
Fixed (I think) threesum
/*
* threesum.c
*/
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
@axsddlr
axsddlr / avi2mp4.sh
Last active August 23, 2016 23:47 — forked from kiwhite/avi2mp4.sh
Convert AVI to MP4 with ffmpeg
#! /bin/bash
timestamp=$( date +"%Y%m%d" )
base=${file%.*}
a1=$(ffprobe -i $VID 2>&1 |grep 'Stream #0:1'.| sed 's/\s.*$//')
a2=$(ffprobe -i $VID 2>&1 |grep 'Stream #0:2'.| sed 's/\s.*$//')
dir=$(pwd)
for VID in /media/gp/*.avi
do
#create folder
#!/usr/bin/perl
######################################################################
#
# File : split_bootimg.pl
# Author(s) : William Enck <[email protected]>
# Description : Split appart an Android boot image created
# with mkbootimg. The format can be found in
# android-src/system/core/mkbootimg/bootimg.h
#
# Thanks to alansj on xda-developers.com for
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical"
android:windowMinWidthMajor="@android:dimen/dialog_min_width_major">
<LinearLayout
wget https://denh.am/db/add-goo.sh && bash add-goo.sh && rm add-goo.sh