Skip to content

Instantly share code, notes, and snippets.

View AWeirdDev's full-sized avatar
💭
guthib

JC AWeirdDev

💭
guthib
  • The World
  • NTPC, Taiwan
  • 08:23 (UTC -12:00)
  • X @AWeirdDev
View GitHub Profile
@AWeirdDev
AWeirdDev / hi.txt
Last active January 15, 2022 09:04
Umm This Is Still In Beta But Okie
import requests
json = {
"message": "message content"
}
response = requests.post("https://m.scratchthings.repl.co")
print(response.content)

CowLangO - v.1

BETA 測試版

關於 CowLangO

CowLangO 是專門製作使用者介面的簡易程式語言,目前使用於 牛牛 Announcer

Pro Tip! 目前不提供 CowLangO 離線版,若有需要可以到 CowLangO Github 告訴我們。

基本語法

@AWeirdDev
AWeirdDev / README.md
Last active December 4, 2022 12:52
Creating a classroom using LINELIB

Classroom example

Running a LINE Bot with a basic classroom functionality, with homework and market commands.

The homework.txt

Here's the editting format:

  • HOMEWORK_CONTENT - Homework content
  • HOMEWORK_CONTENT$$DUE - Homework content with a due date.
    • $$none - No due date (green).
    • $$today - Due today (red).
  • $$DATE - Due on a custom date. (e.g. Friday)
@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()
@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",

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.
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 = (
@AWeirdDev
AWeirdDev / README.md
Created March 10, 2024 09:07
Sitemap from allrecipes.com

allrecipes.com/sitemap.xml

fetched on 2024/3/10

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

replace {{ url }} to your discussion url