Skip to content

Instantly share code, notes, and snippets.

View Taytay's full-sized avatar

Taylor Brown Taytay

View GitHub Profile
// Here is the link to the playground for the following code:
// https://www.typescriptlang.org/play?#code/MYGwhgzhAEAiD2BzaBvAUNT0wDsCWAtmCABKQBi8ArgE4AyApojALzQAuNVDA3BlgAcqAIxB5g0ACZIAcmAIMAXNAic8OZGwBEWvlmhDR46OrzsAFALA15EZQkQAFa7YCUqfvszB4OCPBAGADoQJHMAcgBJbAJsKSQAGmwcSWhoxHh2DgALBggGAxcCO2hw6ABqQptioOlEADViblc9LABfNA7QSBgAYTAs9H1cQmIyCEpaRmZoNk5uVsxDMQlgAbkFZVUadU1oHUWDERWTfAsrapL+9mdL9yGvb19-QJCwqJi4tfYk3FT0zI5PIFC62ZRlSqgmrfRogZqHDpdcBQOBIW62Dz6ZbGOqw7jKHBUAjCBg0WbQAAMhxGRFIFGo9CYrA4XAYnTQ3RR13RxUxgmOxhhTSU0EJxNJ5KpnmSozpEwZ02Z8zZHTQDDF0AA0upUg9MA5tSlyeEDTrwglpddDak2OErWaLaqfH4sgBrHUAWTAAnJeugAG1rUFTSkALr2RLSwM6oL2sPKa6OvjsACeAgK1q9PrmaYY8AAZtB3Sks3w0Kn09AACpUASBCAAHk15OtAD4W9AGAAPdjqyQwa3QAD8AelmqS0siLtwwAYVdzTc93sDodbE-0U9UM7nC-MFbzheLkizrhX7e7vZSMGl+hQpzMynMYGU6nzEsc7hY7dwKegbWH0CONABIMAAbqSaChsBopgaSZYAPTwdAzqqFUthZr6aCIV40YpMGSDWuGqJOEUEAWth+i4ZIsYDIRCYDDyZFYUhbQIUh+6AaRGE5umBZocUpZoMx0AkKSBRmCYMAAFZUKhsm7ECnGXFmwkcTWdZ5E2LY6u2bDNhefYDjqAH+sJ+jjmZWCbuw27zumi4lsumqruRSEbtOOCznZDANoxWZnsJUEgeBNBluW
params:
# Default params file:
# This actually gets overwritten by hydra at runtime
- params.yaml
stages:
# Note that we set the DVC_STAGE_NAME so it knows it's running in dvc.
train:
cmd:
- DVC_STAGE_NAME=train python scripts/fine_tune/fine_tune_and_evaluate.py --hoist_params_path="trainer_task.train"
@Taytay
Taytay / uninstall_pip_packages.sh
Created January 8, 2024 15:23
How to uninstall pip-installed packages in conda
conda list | awk '/pypi/ {print $1}' | xargs pip uninstall -y
# Found here: https://stackoverflow.com/a/66012782
@Taytay
Taytay / regexp_substr2.sql
Created August 2, 2024 12:37
Snowflake enhanced regex_substr. This allows you to use python style regexes in Snowflake.
-- Originally found here: https://github.com/sfc-gh-gpavlik/SnowflakeUDFs/blob/main/RegularExpressions/regexp2.sql
-- Edited to use python and group_num by taytay: https://github.com/taytay/
/********************************************************************************************************
* *
* Snowflake Regular Expression Extensions *
* *
* Copyright (c) 2020 Snowflake Computing Inc. All rights reserved. *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in *
@Taytay
Taytay / duckdb_udf.ipynb
Created December 19, 2024 16:15
Illustrate parallel duckdb UDFs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Taytay
Taytay / dagster_dbt_utils.py
Created March 6, 2025 15:54
Dagster dbt utilities
import json
from typing import AbstractSet, Any, Generator, Mapping, Sequence, ValuesView
import dagster as dg
from dagster import (
AssetCheckResult,
AssetExecutionContext,
AssetKey,
AssetMaterialization,
AssetObservation,