Skip to content

Instantly share code, notes, and snippets.

View Hosuke's full-sized avatar
🐢
I code slowly

Huang Geyang Hosuke

🐢
I code slowly
View GitHub Profile
import os
import re
# Get the current working directory
directory = os.getcwd()
# Iterate over all files in the directory and its subdirectories
for dirpath, dirnames, filenames in os.walk(directory):
for filename in filenames:
# Process only files with a .sql extension
@Hosuke
Hosuke / seed_gen.py
Last active November 15, 2023 14:10
import pandas as pd
import yaml
# 读取CSV文件
df = pd.read_csv('dex_base_trades_seed.csv')
# 初始化schema字典
schema = {
"version": 2,
"seeds": []
@Hosuke
Hosuke / csv2trinosql.py
Created January 9, 2024 10:39
csv to trino static query
import pandas as pd
if __name__ == '__main__':
# Reload the CSV file due to code execution state reset
file_path = '01HKPMHCEM0TFYD6KNPM66XHTT.csv'
df = pd.read_csv(file_path)
# Construct the SQL query in the desired format with dynamic field names
sql_query = "SELECT "
import json
import requests
import pandas as pd
def get_coinpaprika_data():
# Get data from coinpaprika
url = "https://api.coinpaprika.com/v1/coins/"
response = requests.get(url)
return response.json()
@Hosuke
Hosuke / claude.md
Created April 12, 2026 15:52
文言通則

通則

凡例

  • 每 session 之初,先以 /model 設心力於極
  • 繁難之事,善用 ultrathink 與 ultraplan
  • 勿充百萬之境——至二三分滿則當約(compact)或交接(handoff)
  • 時察 /insights,據之以更新 CLAUDE.md

校讎之則(必遵於諸項)

凡將 git commit,必循此序: