Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ryantuck's full-sized avatar

Ryan Tuck ryantuck

View GitHub Profile
from pydantic import BaseModel
from typing import List
class InputItem(BaseModel):
song_id: str
audio_filename: str
class OutputItem(BaseModel):
song_id: str
audio_filenames: list # of strs
ryantuck /
Created October 26, 2021 19:59
Delete local git branches that have been merged. I think assumes you're on master.
git branch --merged | grep -v master | xargs -I % git branch -D %
Search engine: Jira
keyword: jira
class RecursiveNamespace(SimpleNamespace):
Recursive instantiation of SimpleNamespace for supporting nested dicts.
Literally copied from the internet:
def map_entry(entry):
if isinstance(entry, dict):
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
"profiles": [
"complex_modifications": {
"parameters": {
I would love to have the @tuck username and it looks very inactive!
"meta": {
"theme": "Class"
"basics": {
"name": "Ryan Tuck",
"email": "",
"phone": "609-315-1847",
"website": "",
"summary": "I'm super cool.",

SQL Syntax Migration Guide - Postgres to BigQuery

I'm in the process of migrating a lot of SQL (in LookML) from PostgreSQL to BigQuery (Standard SQL). Documenting the quirks I find along the way here!




ryantuck /
Last active October 31, 2019 18:56
Script to extract content from Looker Content Validator HMTL table
# this is probably less elegant than just using the API to do this
# largely copied from
import csv
from bs4 import BeautifulSoup
# find the table where all the data lives via 'inspect element' or whatever
# and save it into a file that we read here.
dot -Kfdp -Nfontname=Courier -Nfontsize=10 -Efontname=Courier -Efontsize=10 -T{fmt} {dot_filepath} -o {output_filepath}