Skip to content

Instantly share code, notes, and snippets.

View theacodes's full-sized avatar
๐Ÿชผ
I'm workin on it!

Stargirl Flowers theacodes

๐Ÿชผ
I'm workin on it!
View GitHub Profile
@theacodes
theacodes / thread_emoji.py
Created December 2, 2023 17:42
Thread emoji
import threading
ANIMALS = list(
"๐Ÿถ๐Ÿฑ๐Ÿญ๐Ÿน๐Ÿฐ๐ŸฆŠ๐Ÿป๐Ÿผ๐Ÿจ๐Ÿฏ๐Ÿฆ๐Ÿฎ๐Ÿท๐Ÿฝ๐Ÿธ๐Ÿต๐Ÿ”๐Ÿง๐Ÿฆ๐Ÿค๐Ÿชฟ๐Ÿฆ†๐Ÿฆ‰๐Ÿฆ‡๐Ÿฆ‡๐Ÿบ๐Ÿ—๐Ÿด๐Ÿฆ„๐ŸซŽ๐Ÿ๐Ÿชฑ๐Ÿ›๐Ÿฆ‹๐ŸŒ๐Ÿž๐Ÿœ๐Ÿชฐ๐Ÿชฒ๐Ÿชณ๐ŸฆŸ๐Ÿฆ—๐Ÿ•ท๏ธ๐Ÿ•ธ๏ธ๐Ÿฆ‚๐Ÿข๐Ÿ๐ŸฆŽ๐Ÿฆ–๐Ÿฆ•๐Ÿ™๐Ÿฆ‘๐Ÿชผ๐Ÿฆ๐Ÿฆž๐Ÿฆ€๐Ÿก๐Ÿ ๐ŸŸ๐Ÿฌ๐Ÿณ๐Ÿ‹๐Ÿฆˆ๐Ÿฆญ๐ŸŠ๐Ÿ…๐Ÿ†๐Ÿฆ“๐Ÿฆ๐Ÿฆง๐Ÿฆฃ๐Ÿ˜๐Ÿฆ›๐Ÿฆ๐Ÿช๐Ÿซ๐Ÿฆ’๐Ÿฆ˜๐Ÿฆฌ๐Ÿƒ๐Ÿ‚๐Ÿ„๐Ÿซ๐ŸŽ๐Ÿ–๐Ÿ๐Ÿ‘๐Ÿฆ™๐Ÿ๐ŸฆŒ๐Ÿ•๐Ÿฉ๐Ÿˆ๐Ÿ“๐Ÿฆƒ๐Ÿฆค๐Ÿฆš๐Ÿฆœ๐Ÿฆข๐Ÿฆฉ๐Ÿ•Š๏ธ๐Ÿ‡๐Ÿฆ๐Ÿฆจ๐Ÿฆก๐Ÿฆซ๐Ÿฆฆ๐Ÿฆฅ๐Ÿ๐Ÿ€๐Ÿฟ๏ธ๐Ÿฆ”๐Ÿ‰๐Ÿฒ"
)
ANIMALS_LEFT = []
THREAD_EMOJI = {}
def thread_emoji():
@theacodes
theacodes / watch.ts
Created April 22, 2024 17:54
Lit @change decorator
/**
* Helper for watching reactive properties (@property) or internal state (@state)
* and calling a callback.
*
* Adapted from Shoelace:
* - https://github.com/shoelace-style/shoelace/blob/64996b2d3512a13d2ec68146fb92164d03e07e6a/src/internal/watch.ts
*/
import type { PropertyValues, ReactiveElement } from "lit";
@theacodes
theacodes / attach-controller.ts
Created June 18, 2024 21:56
Lit attachController directive
/*
* Copyright (c) 2024 Opulo, Inc
* Published under the Mozilla Public License
* Full text available at: https://www.mozilla.org/en-US/MPL/
*/
import { isFunction } from "@glimmer/common/types";
import {
AsyncDirective,
LitElement,
@theacodes
theacodes / model_replace.py
Last active November 19, 2024 01:24
Pydantic model_replace helper
from typing import Annotated, Any, overload
import pydantic
@overload
def model_replace[T: pydantic.BaseModel](val: T, /, **kwargs) -> T: ...
@overload
def model_replace[T: pydantic.BaseModel](val: T, _partial: T, /) -> T: ...
def model_replace[T: pydantic.BaseModel](val: T, _partial: T | None = None, /, **kwargs) -> T: