Skip to content

Instantly share code, notes, and snippets.

View rec's full-sized avatar
🥝
coding

Tom Ritchford rec

🥝
coding
View GitHub Profile
{
"before": {
"name": "11e97bc7bd4~4801",
"commit_id": "6c2c527cd67",
"message": "[BE] Remove extra semicolons from SymmetricMemory.hpp (#154034)"
},
"after": {
"name": "11e97bc7bd4~4800",
"commit_id": "b7d08defe9c",
"message": "[BE]: Type previously untyped decorators (#153726)"
{
"081000-7a470c93206": {
"diff": {
"otherSymbolCounts": {"withKnownType": 1}
},
"symbols": {"added": 1}
},
"081045-284b7668980": {
"diff": {
"exportedSymbolCounts": {"withUnknownType": 2},
{
"081000-7a470c93206": {
"diff": {
"otherSymbolCounts": {"withKnownType": 1}
},
"symbols": {"added": 1}
},
"081045-284b7668980": {
"diff": {
"exportedSymbolCounts": {"withUnknownType": 2},
@rec
rec / funcs.py
Last active April 18, 2025 16:58
funcs = []
for i in range(10):
def func(i=i):
return i
funcs.append(func)
print(*(f() for f in funcs))
from engora.misc import dcommand
from typer import Argument, Option, Typer
from typing import Optional
import pytest
command = Typer().command
@command(help='test')
def a_command(
# This has been replaced by the PyPi module https://pypi.org/project/dtyper/
from argparse import Namespace
import dataclasses
import functools
import inspect
@functools.wraps(dataclasses.make_dataclass)
def dcommand(typer_f, **kwargs):
from . import command
from engora import CONFIG
from pathlib import Path
from typer import Argument, Option
from typing import List, Optional
_CFGS = (
'max_items',
'max_requests',
'only',
type AutoGenerated struct {
A struct {
B []interface{} `json:"b"`
} `json:"a"`
}
@rec
rec / dc.py
Last active August 17, 2021 09:33
from dataclasses import dataclass
@dataclass
class B:
b: List[object]
@dataclass
class A:
a: B
from dataclasses import dataclass, field
@dataclass(order=True)
class Action:
name: str = 'test'
_name: str = field(default="undefined", init=False, compare=True, repr=False)
@property
def name(self) -> str: # pylint: disable=function-redefined