Skip to content

Instantly share code, notes, and snippets.

View baobuiquang's full-sized avatar
👋
Hi there!

Bao Bui-Quang baobuiquang

👋
Hi there!
View GitHub Profile
@baobuiquang
baobuiquang / python_quickcodes.py
Created August 29, 2024 01:26
Python Quickcodes
# Create folder
import os
os.makedirs("my/path", exist_ok=True)
# Read and write CSV
import pandas as pd
df = pd.read_csv('input_data.csv', encoding='utf-8')
df.to_csv('output_data.csv', encoding='utf-8', index=False)
@baobuiquang
baobuiquang / cmd_quickcodes.bat
Last active August 29, 2024 02:17
CMD Quickcodes
# Python
call py --version
# Virtual Environment
call py -m venv venv
call venv\Scripts\activate
call py -m pip install -U pip
call py run.py
# Install dependencies
@baobuiquang
baobuiquang / fastapi.py
Last active October 25, 2024 08:21
FastAPI
# Full boilerplate project: https://github.com/baobuiquang/fastapi
# How to POST request:
# Invoke-RestMethod -Uri http://127.0.0.1:8888/post -Method POST
from fastapi.middleware.cors import CORSMiddleware
from fastapi import FastAPI
import uvicorn
import _config
@baobuiquang
baobuiquang / Linux
Created August 29, 2024 08:00
Linux
ssh -L 1234:localhost:1234 [email protected]
jupyter lab --no-browser --port=1234
@baobuiquang
baobuiquang / Zrok
Created August 29, 2024 08:01
Zrok
zrok reserve public 1234 --unique-name baobuiquang
zrok share reserved baobuiquang public