Skip to content

Instantly share code, notes, and snippets.

View shawenyao's full-sized avatar

Wenyao shawenyao

View GitHub Profile
@leongkui
leongkui / convert2utf8.py
Last active May 28, 2025 03:28
Fix/convert GBK/GB2312 format to UTF8
import codecs
import sys
# https://stackoverflow.com/questions/53954604/python-encoding-chinese-to-special-character
infile = codecs.open(sys.argv[1], "r", "gb2312")
lines = infile.readline()
infile.close()
print(lines)
@Treeki
Treeki / TurnipPrices.cpp
Last active June 10, 2025 03:05
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{