Skip to content

Instantly share code, notes, and snippets.

View AWeirdDev's full-sized avatar
💭
guthib

JC AWeirdDev

💭
guthib
  • The World
  • NTPC, Taiwan
  • 06:25 (UTC -12:00)
  • X @AWeirdDev
View GitHub Profile
@AWeirdDev
AWeirdDev / README.md
Created November 4, 2024 10:52
Prompts that teach lower-accuracy LLMs how to correctly generate contents that follow a specific schema.

Schema Prompts

Teach LLMs how to follow schemas like JSON.

JSON

LLMs often make stupid (and sometimes naive) JSON mistakes, such as mistaking JSON for Javascript (doesn't require double quotes for key names), missing characters like brackets, or bad escape strings.

Below is a simple prompt that attempts to lower the probability of those happening, and I think it's pretty cool.

## Tips and tricks
@AWeirdDev
AWeirdDev / README.md
Last active June 16, 2024 11:07
Assets

Fernando Miguel Fernando Miguel

curl "https://static.wikia.nocookie.net/vsbattles/images/b/b0/Fernando_Miguel.png/revision/latest?cb=20240216175342" --output fernando.png

Screen

@AWeirdDev
AWeirdDev / TF-IDF_in_Python.ipynb
Created April 26, 2024 13:32
TF-IDF in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AWeirdDev
AWeirdDev / README.md
Last active April 26, 2024 12:40
Random Articles

Random Articles

Random news articles you did not ask for.

  • 🐣 Language: English (en-US).
  • 🤗 Created by: AI ChatGPT.

Format:

@AWeirdDev
AWeirdDev / README.md
Created April 4, 2024 13:02
Playwright: get discussion body for preprompt

replace {{ url }} to your discussion url

@AWeirdDev
AWeirdDev / README.md
Created March 10, 2024 09:07
Sitemap from allrecipes.com

allrecipes.com/sitemap.xml

fetched on 2024/3/10

from typing import List, Tuple
import requests
from datasets import Dataset
from selectolax.lexbor import LexborHTMLParser
# News pages search total iterations
N_NEWS_ITERS = 100
user_agent = (

A Programmer’s Introduction to Unicode

If you're watching the video tutorial Let's build the GPT Tokenizer by Andrej Karpathy and you want to copy the whole article, just clone this gist.

Clone this:

In [25]: !git clone https://gist.github.com/f48f35dd9456af1f278a349501aafab9.git
Out[25]: # Cloning into 'f48f35dd9456af1f278a349501aafab9'...
 # remote: Enumerating objects: 4, done.
@AWeirdDev
AWeirdDev / api.py
Last active March 20, 2023 10:58
rapiz-dl
from rapiz.app import API, APIContext
import time
api = API()
@api('/api/user', methods=['GET', 'POST'])
def user(res: APIContext):
return {
"name": "John Cena",
@AWeirdDev
AWeirdDev / main.py
Created February 1, 2023 13:44
[LineLib] Hello World Example
from linelib import Client # pip install linelib
client = Client('channel secret', 'channel access token')
@client.event('text')
async def text_msg(ctx):
await ctx.send('Hello, World!')
client.run()