Skip to content

Instantly share code, notes, and snippets.

View korakot's full-sized avatar

Korakot Chaovavanich korakot

  • Bangkok, Thailand
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active March 28, 2024 09:10
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@korakot
korakot / modify_trie.py
Last active January 19, 2023 04:12
Customize word tokenization: add and remove words from trie
!pip install pythainlp
from pythainlp import word_tokenize
from pythainlp.tokenize import DEFAULT_DICT_TRIE as trie
# default behavior
print(word_tokenize('ฝนตกทั่วฟ้า')) # ['ฝนตก', 'ทั่ว', 'ฟ้า']
# modify behavior
trie.remove('ฝนตก')
trie.add('ทั่วฟ้า')
word_tokenize('ฝนตกทั่วฟ้า') # ['ฝน', 'ตก', 'ทั่วฟ้า']
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@radames
radames / README.md
Last active March 4, 2024 06:44
How to connect to your Google Colab Notebook via SSH!

Connect to your Google Colab Notebook via SSH

Using this amazing project tmate.io you can SSH tunnel to your colab notebook machine. You can with few lines of code download the binary, run an instance in the background and output the generated SSH address.

!wget -nc https://github.com/tmate-io/tmate/releases/download/2.4.0/tmate-2.4.0-static-linux-i386.tar.xz &> /dev/null
!tar --skip-old-files -xvf tmate-2.4.0-static-linux-i386.tar.xz &> /dev/null
!rm -f nohup.out; bash -ic 'nohup ./tmate-2.4.0-static-linux-i386/tmate -S /tmp/tmate.sock new-session -d & disown -a' >/dev/null 2>&1
!./tmate-2.4.0-static-linux-i386/tmate -S /tmp/tmate.sock wait tmate-ready
@pjbelo
pjbelo / google-cloud-storage-cors-config.md
Last active August 19, 2022 11:32
Google Cloud Storage CORS configuration

Use the gsutil cors command to configure CORS on a bucket:

gsutil cors set cors-json-file.json gs://example

Where cors-json-file.json contains:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jeremyschlatter
jeremyschlatter / Jupyter-React-integration.ipynb
Created July 25, 2017 02:36
Render React inline from a Jupyter notebook cell
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mdonkers
mdonkers / server.py
Last active March 17, 2024 04:06
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@teamdandelion
teamdandelion / labels_1024.tsv
Last active February 6, 2024 08:33
TensorBoard: TF Dev Summit Tutorial
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
7
2
1
0
4
1
4
9
5
9
@itod
itod / split_keyboards.md
Last active March 23, 2024 21:00
Every "split" mechanical keyboard currently being sold that I know of