Skip to content

Instantly share code, notes, and snippets.

View astrochun's full-sized avatar
😃
Hello, GitHub!

Chun Ly astrochun

😃
Hello, GitHub!
View GitHub Profile
@tenuki
tenuki / multi_uvicorn.py
Last active February 24, 2024 01:18
How to run multiple uvicorn server apps in the same process (thanks @a-d-j-i )
##
## How to run multiple uvicorn server apps in the same process
##
import asyncio
from uvicorn import Server, Config
class MyServer(Server):
async def run(self, sockets=None):
self.config.setup_event_loop()
return await self.serve(sockets=sockets)
[tool.poetry.dependencies]
python = "3.7.7"
gdal = {platform = "windows", path = "thirdparty/GDAL-3.1.2-cp37-cp37m-win32.whl"}
fiona = {platform = "windows", path = "thirdparty/Fiona-1.8.13-cp37-cp37m-win32.whl"}
[tool.coverage.paths]
source = ["src", "*/site-packages"]
[tool.coverage.run]
branch = true
@br3ndonland
br3ndonland / github-actions-notes.md
Last active September 30, 2025 19:09
Getting the Gist of GitHub Actions
#!/bin/sh
echo ''
echo ' __________'
echo ' / ___ ___ \'
echo ' / / @ \/ @ \ \'
echo ' \ \___/\___/ /\'
echo ' \____\/____/||'
echo ' / /\\\\\//'
echo ' | |\\\\\\'
@neelabalan
neelabalan / df_to_table.py
Created October 3, 2021 16:57 — forked from avi-perl/df_to_table.py
Convert a pandas.DataFrame object into a rich.Table object for stylized printing in Python.
from datetime import datetime
from typing import Optional
import pandas as pd
from rich import box
from rich.console import Console
from rich.table import Table
console = Console()
@mwouts
mwouts / _introducing_itables.md
Last active February 21, 2025 15:06
Pandas DataFrames as interactive HTML DataTables

Pandas DataFrames as interactive HTML DataTables

In Jupyter Notebook, Jupyter Lab, Google Colab, VS Code and PyCharm

Pandas DataFrames are central to Data Analysis in Python. In this post, we introduce the itables Python package that enhances how these DataFrames are displayed, by turning them into interactive HTML DataTables.


Using itables is as simple as