Skip to content

Instantly share code, notes, and snippets.

View khuyentran1401's full-sized avatar
🏠
Working from home

Khuyen Tran khuyentran1401

🏠
Working from home
View GitHub Profile
@khuyentran1401
khuyentran1401 / orders.csv
Created December 11, 2025 14:00
DuckDB tutorial - orders data
order_id customer_id amount
0 2 95.5
1 4 120.3
2 1 85.7
3 3 110.2
4 0 130.8
@khuyentran1401
khuyentran1401 / feb_sales.csv
Created December 11, 2025 14:00
DuckDB tutorial - February sales
Date Product Sales
2023-02-01 Laptop 1500
2023-02-02 Monitor 400
2023-02-03 Mouse 50
@khuyentran1401
khuyentran1401 / jan_sales.csv
Created December 11, 2025 14:00
DuckDB tutorial - January sales
Date Product Sales
2023-01-01 Laptop 1200
2023-01-02 Phone 800
2023-01-03 Tablet 600
@khuyentran1401
khuyentran1401 / users.json
Created December 11, 2025 14:00
DuckDB tutorial - nested JSON user data
[
{"user_id": 0, "profile": {"name": "User_0", "active": false}},
{"user_id": 1, "profile": {"name": "User_1", "active": true}},
{"user_id": 2, "profile": {"name": "User_2", "active": false}},
{"user_id": 3, "profile": {"name": "User_3", "active": true}},
{"user_id": 4, "profile": {"name": "User_4", "active": false}}
]
@khuyentran1401
khuyentran1401 / flight_data.csv
Created December 11, 2025 14:00
DuckDB tutorial - pipe-delimited flight data
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 3 in line 1.
FlightDate|UniqueCarrier|OriginCityName|DestCityName
1988-01-01|AA|New York, NY|Los Angeles, CA
1988-01-02|AA|New York, NY|Los Angeles, CA
1988-01-03|AA|New York, NY|Los Angeles, CA
@khuyentran1401
khuyentran1401 / customers.csv
Created December 11, 2025 14:00
DuckDB tutorial - customers data
customer_id name region segment
0 Customer_0 North A
1 Customer_1 South B
2 Customer_2 East C
3 Customer_3 West A
4 Customer_4 North B
5 Customer_5 South C
6 Customer_6 East A
7 Customer_7 West B
8 Customer_8 North C
@khuyentran1401
khuyentran1401 / sales.csv
Created December 11, 2025 14:00
DuckDB tutorial - sales data
product region amount date
A North 100 2024-01-01
B South 150 2024-01-02
C North 200 2024-01-03
A South 120 2024-01-04
B North 180 2024-01-05
C South 220 2024-01-06
A North 110 2024-01-07
B South 160 2024-01-08
C North 210 2024-01-09
We can't make this file beautiful and searchable because it's too large.
column_1,column_2,column_3
0.7507948164964069,0.40767348076503473,0.91783846705252
0.05683693902687936,0.8344249581421073,0.7885197628797966
0.9685621728865862,0.22322042242735474,0.32994729101423526
0.7659091410107962,0.947624247623736,0.4568907937800606
0.6329713077294552,0.16049635159859943,0.6733334852337765
0.9428937785927056,0.6121576359303711,0.20406187577429125
0.09783514741019594,0.3285568881694171,0.8315536948478751
0.9521955853297526,0.6903355601203242,0.24722661365470522
0.7105871742243044,0.8453069857309263,0.7960150266517927
We can't make this file beautiful and searchable because it's too large.
column_1,column_2,column_3
0.9840313490055554,0.8237162587873815,0.1961040502221134
0.9188675216732579,0.23782967194338533,0.6133996316896547
0.8965042232340755,0.5069027719247561,0.3894070527440623
0.03279837847481504,0.6948257199760983,0.46548265434759306
0.7303764162792399,0.7721719415813256,0.4864749010964726
0.41721716381954765,0.20299189725497913,0.6091806559537448
0.09705379991212815,0.5067258470071659,0.4747831252142545
0.6150856665778249,0.6726491935789671,0.9444189755239045
0.8863414011907637,0.5314814268886903,0.5813002558396944
@khuyentran1401
khuyentran1401 / settings.json
Created April 26, 2023 19:56
vim keyboard map settings for vscode
{
"vim.normalModeKeyBindings": [
{
"before": ["J"],
"after": ["5", "j"]
},
{
"before": ["K"],
"after": ["5", "k"]
}