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 json | |
import random | |
# ISO-ish language codes to simulate | |
LANG_CODES = [ | |
"en", | |
"fr", | |
"de", | |
"es", | |
"it", |
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 json | |
import random | |
# ISO-ish language codes to simulate | |
LANG_CODES = [ | |
"en", | |
"fr", | |
"de", | |
"es", | |
"it", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 json | |
examples = [ | |
{ | |
"id": "Q1", | |
"aliases": ["Universe", "Cosmos"], # list of strings | |
"labels": { # categorical map | |
"en": "universe", | |
"fr": "univers", | |
"de": "Universum" |
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 polars as pl | |
import fastavro | |
from pathlib import Path | |
# Define an Avro schema with both record (struct) and map | |
schema = { | |
"type": "record", | |
"name": "Inventory", | |
"fields": [ | |
{"name": "id", "type": "int"}, |
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] | |
//! diesel = { version = "2.2", features = ["sqlite"] } | |
//! diesel-dynamic-schema = "0.2" | |
//! rusqlite = "0.31" | |
//! serde = { version = "1", features = ["derive"] } | |
//! serde_json = "1" | |
//! ``` | |
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 |
NewerOlder