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
| # uv https://docs.astral.sh/uv/concepts/projects/dependencies/ | |
| # poetry https://python-poetry.org/docs/pyproject/ | |
| # packaging https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ | |
| [project] | |
| name = "" | |
| version = "0.0.1" | |
| description = "" | |
| requires-python = "3.12.*" | |
| authors = [{ name = "", email = "" }] |
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
| [mypy] | |
| # Config: https://mypy.readthedocs.io/en/stable/config_file.html | |
| # Cheat sheet: https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html | |
| python_version = 3.12 | |
| files = . | |
| check_untyped_defs = True | |
| no_implicit_reexport = True |
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
| #r4 | |
| target-version = "py311" | |
| line-length = 88 | |
| indent-width = 4 | |
| respect-gitignore = true | |
| show-fixes = true | |
| output-format = "concise" | |
| preview = true | |
| [lint] |
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 zsh | |
| ## Snippets for data munging, DuckDB, JSON imports and exports | |
| ## Requires AWS CLI and jq | |
| ## Playground data is CSV with 200k Jeopardy questions found on Kaggle: | |
| ## https://www.kaggle.com/datasets/tunguz/200000-jeopardy-questions | |
| ## Snippet highlights: | |
| ## * zsh to set a var from a heredoc without any escaping | |
| ## * zsh for var substitution in template strings | |
| ## * DuckDB DDL for tables |
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 zsh | |
| ## Snippets for data munging and import to DynamoDB | |
| ## Requires AWS CLI and jq | |
| ## Playground data is CSV with 200k Jeopardy questions found on Kaggle: | |
| ## https://www.kaggle.com/datasets/tunguz/200000-jeopardy-questions | |
| ## DynamoDB local: | |
| ## https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html | |
| ## Snippet highlights: | |
| ## * JQ to convert some JSON format to DynamoDB PutRequest |
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 os | |
| import sys | |
| import boto3 | |
| def receive(queue_url, delete_messages=False): | |
| print(f"Reading queue {queue_url}", file=sys.stderr) | |
| sqs_client = boto3.client('sqs') |
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
| from __future__ import annotations | |
| import json | |
| import sys | |
| from decimal import Decimal | |
| from time import perf_counter | |
| import boto3 | |
NewerOlder