Skip to content

Instantly share code, notes, and snippets.

View joangq's full-sized avatar

Joan G. Quiroga joangq

  • Fundar
  • Buenos Aires, Argentina
  • 00:12 (UTC -03:00)
View GitHub Profile
class Bar:
def __init__(self): ...
def __call__(self, f):
print('bar')
return f
bar = Bar()
class Foo:
def __init__(self): ...
rm -Recurse -Force .venv
uv sync
uv add pip
.\.venv\Scripts\activate
pip uninstall numpy
pip install numpy
uv add numpy
*.parquet
data/
.vscode/
.auth/
.idea/
.coverage
coverage.json
.streamlit/
# UV Package manager
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ECharts Faceted Waffle Chart</title>
<script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
</head>
<body>
<div id="main" style="width: 800px; height: 600px;"></div>
<script type="text/javascript">
from typing import Any, Callable
from pandas import DataFrame
OneOrMany = Any
def armar_dataset(
dataset_output_old: DataFrame,
dataset: OneOrMany[DataFrame],
pk: list[str],
f_wrangling: Callable,
import json
import requests
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Union, Callable
@dataclass
class ValidationError:
loc: List[Union[str, int]]
msg: str
type: str
# private-build-plans-toml
# npm run build -- ttf::IosevkaCustom
[buildPlans.IosevkaCustom]
family = "Iosevka Custom"
spacing = "term"
serifs = "sans"
noCvSs = true
exportGlyphNames = false
[buildPlans.IosevkaCustom.variants]
class Dual:
def __init__(self, real, dual):
self.real = real # the real part
self.dual = dual # the dual part
def __add__(self, other):
if isinstance(other, Dual):
return Dual(self.real + other.real, self.dual + other.dual)
else:
return Dual(self.real + other, self.dual)
def inspect_schema(x):
match x:
case d if isinstance(x, dict):
schema = {}
for key, d in d.items():
schema[key] = inspect_schema(d)
return schema
case lst if isinstance(x, list):
if not lst:
red_blue_brown = \
['#3896C4', '#A0D4EE', '#EA8783', '#FEB5A2', '#BA7E45', '#39B87F']
tableau_20 = \
['#4E79A7', '#A0CBE8', '#F28E2B', '#D7B5A6', '#59A14F', '#8CD17D', '#B6992D', '#F1CE63', '#499894', '#86BCB6', '#E15759', '#D37295', '#79706E', '#BAB0AC', '#FABFD2', '#B07AA1', '#D4A6C8', '#9D7660']
nuriel_stone = \
['#8175AA', '#94D0C0', '#027B8E', '#9F8F12', '#A39FC9', '#959C9E']
superfishel_stone = \