Skip to content

Instantly share code, notes, and snippets.

View korakot's full-sized avatar

Korakot Chaovavanich korakot

  • Bangkok, Thailand
View GitHub Profile
@korakot
korakot / path.txt
Last active July 23, 2023 10:44
ChatGPT Code Interpreter library path
/home/sandbox/.local/lib/python3.8/site-packages/
https://pkgs.org/download/unzip
@korakot
korakot / chatgpt_convert.py
Last active July 14, 2023 15:25
Convert chatgpt_conversations.zip to sqlite
import sqlite3
import pandas as pd
import json
import zipfile
import time
# Recreate the database with debug information
def create_database_debug(filename, db_name):
# Extract the JSON data from the zip file
with zipfile.ZipFile(filename, 'r') as zip_ref:
@korakot
korakot / plugin_sources.txt
Last active August 23, 2023 15:17
ChatGPT plugin list sources
whatplugin.ai
plugin.surf
pugin.ai
gptstore.ai
github.com/copilot-us/chatgpt-plugins
github.com/sisbell/chatgpt-plugin-store
@korakot
korakot / plugin_domains.txt
Last active February 29, 2024 07:25
Chatgpt plugin domain list
dmtoolkit.magejosh.repl.co
seo-plugin.orrenprunckun.com
talkfpl.beegreeeen.workers.dev
videohighlight.com
aiplugin-experiences.owlting.com
www.nani.ooo
jetbook.click
imageeditor.dev
api.speedybrand.io
c-resume.copilot.us
@korakot
korakot / keyboard.txt
Created April 12, 2023 12:27
Keyboard RK switch problem
Fn + Left Ctrl will switch back
See https://defkey.com/royal-kludge-rk61-shortcuts
@korakot
korakot / zig.py
Last active February 4, 2023 13:32
Install zig in Colab
url = 'https://ziglang.org/download/0.10.1/zig-linux-x86_64-0.10.1.tar.xz'
!curl $url | tar xJ
!mv zig-linux-x86_64-0.10.1 /opt/bin
%%file main.zig
const std = @import("std");
pub fn main() void {
std.debug.print("Hello world\n", .{});
}
@korakot
korakot / table.txt
Created January 19, 2023 07:40
Table in markdown
| | | | | |
|---|---|---|---|---|
| | | | | |
| | | | | |
| | | | | |
@korakot
korakot / strip_context.py
Last active January 20, 2023 02:36
Strip line to get only context around a word
def context(line, word, padding=40):
# หาคำแรก แล้ว pre-40, หาคำสุดท้าย post+40 เอาง่ายๆ แบบนี้ล่ะ
p1 = line.index(word)
p1s = line.rfind(' ', 0, max(0, p1-padding))
if p1s==-1:
p1s = 0
p2 = line.rindex(word)
p2s = line.find(' ', min(len(line), p2+padding))
if p2s == -1:
p2s = len(line)
@korakot
korakot / docx_lines.py
Last active January 19, 2023 04:06
Extract lines from docx (word document)
from pathlib import Path
!pip -q install python-docx
from docx import Document
files = list(Path('docx').glob('*.docx'))
def docx_lines(path):
doc = Document(path)
lines = []
for para in doc.paragraphs:
@korakot
korakot / s3.txt
Created December 11, 2022 05:41
S3 public URL
# bucket: dham
# path: /first.wav
https://dham.s3.amazonaws.com/first.wav
# longer URL with region
https://dham.s3.us-west-2.amazonaws.com/first.wav