This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import duckdb | |
import polars as pl | |
from typing import Iterator, Optional | |
from polars.io.plugins import register_io_source | |
from duckdb import SQLExpression | |
import json | |
from decimal import Decimal | |
import datetime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete all the unwanted defaults | |
gh label delete bug --yes | |
gh label delete documentation --yes | |
gh label delete duplicate --yes | |
gh label delete enhancement --yes | |
gh label delete "good first issue" --yes | |
gh label delete "help wanted" --yes | |
gh label delete invalid --yes | |
gh label delete question --yes | |
gh label delete wontfix --yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env rust-script | |
//! ```cargo | |
//! [dependencies] | |
//! ordermap = "0.5" | |
//! serde = { version = "1", features = ["derive"] } | |
//! serde_json = { version = "1", features = ["preserve_order"] } | |
//! anyhow = "1" | |
//! ``` | |
use anyhow::Result; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you debug the Python stack trace when passing in a simple 2 col DF | |
```py | |
(polars-genson-py) louis 🌟 ~/dev/polars-genson/polars-genson-py $ qp schema_test.py | |
[1] > /home/louis/dev/polars-genson/polars-genson-py/python/polars_genson/__init__.py(45)schema_to_json() | |
-> breakpoint() | |
(Pdb++) n | |
[1] > /home/louis/dev/polars-genson/polars-genson-py/python/polars_genson/__init__.py(46)schema_to_json() | |
-> return _rust_schema_to_json(df) | |
(Pdb++) s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Git status report task | |
gnews: | |
#!/usr/bin/env python3 | |
from subprocess import check_output | |
gnew = check_output(["git", "status", "--porcelain"], text=True).splitlines() | |
groups = { | |
"M": "Changed", | |
"A": "Added", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Git status report task | |
gnews: | |
#!/usr/bin/env python3 | |
from subprocess import check_output | |
gnew = check_output(["git", "status", "--porcelain"], text=True).splitlines() | |
groups = { | |
"M": "Changed", | |
"A": "Added", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main: | |
just trap-demo | |
just do-more-things | |
echo ">>> Finished" | |
trap-demo: | |
#!/usr/bin/env bash | |
set -e | |
echo ">>> Task starting" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S rust-script | |
//! ```cargo | |
//! [dependencies] | |
//! genson-rs = "0.2" | |
//! serde_json = "1" | |
//! ``` | |
use std::env; | |
use std::fs; | |
use std::panic::AssertUnwindSafe; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S rust-script | |
//! ```cargo | |
//! [dependencies] | |
//! genson-rs = "0.2" | |
//! serde_json = "1" | |
//! ``` | |
use std::env; | |
use std::fs; | |
use std::io::{self, Read}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime as dt | |
import random | |
from functools import wraps | |
import polars as pl | |
from narlogs import print_step | |
def load_dog_data(): | |
"""Load sample dog registry data""" |
NewerOlder