Skip to content

Instantly share code, notes, and snippets.

@sss-ng
sss-ng / readme.md
Last active October 11, 2023 00:30
why does sqlalchemy UUID succeed with mysql BINARY(16) but fails with postgres BYTEA

Here a docker compose to test

version: '3.4'

volumes:
  pg_vol:
    driver: local
  my_vol:
@sss-ng
sss-ng / groupby.py
Created May 5, 2022 22:32
pandas groupby reindex not working as expected
import pandas as pd
dates = pd.date_range("2020-01-01", "2020-01-10", freq="1D", tz="UTC")
df = pd.DataFrame(
[
{"state": "virginia", "count": 4},
{"state": "virginia", "count": 5},
@sss-ng
sss-ng / remove_output.py
Created August 16, 2019 18:08 — forked from damianavila/remove_output.py
Remove output from IPython notebook from the command line (dev version 1.0)
"""
Usage: python remove_output.py notebook.ipynb [ > without_output.ipynb ]
Modified from remove_output by Minrk
"""
import sys
import io
import os
from IPython.nbformat.current import read, write