Skip to content

Instantly share code, notes, and snippets.

Avatar
🤙
chillin'

Ryan Tuck ryantuck

🤙
chillin'
View GitHub Profile
View group_items.py
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
ryantuck / delete-local-merged-git-branches.sh
Created Oct 26, 2021
Delete local git branches that have been merged. I think assumes you're on master.
View delete-local-merged-git-branches.sh
git branch --merged | grep -v master | xargs -I % git branch -D %
View jira-search-engine-to-chrome.txt
chrome://settings/searchEngines?search=search
Search engine: Jira
keyword: jira
URL: https://MYCORP.atlassian.net/secure/QuickSearch.jspa?searchString=%s
View recursive_namespace.py
class RecursiveNamespace(SimpleNamespace):
"""
Recursive instantiation of SimpleNamespace for supporting nested dicts.
Literally copied from the internet: https://dev.to/taqkarim/extending-simplenamespace-for-nested-dictionaries-58e8
"""
@staticmethod
def map_entry(entry):
if isinstance(entry, dict):
View karabiner.json
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
View want_username.txt
I would love to have the @tuck username and it looks very inactive!
View resume.json
{
"meta": {
"theme": "Class"
},
"basics": {
"name": "Ryan Tuck",
"email": "ryntck@gmail.com",
"phone": "609-315-1847",
"website": "http://ryantuck.io",
"summary": "I'm super cool.",
View sql_syntax_migration_postgres_to_bq.md

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!

General

Casting

Postgres

@ryantuck
ryantuck / looker_content_validator.py
Last active Oct 31, 2019
Script to extract content from Looker Content Validator HMTL table
View looker_content_validator.py
# this is probably less elegant than just using the API to do this
# https://docs.looker.com/reference/api-and-integration/api-reference/v3.1/content#validate_content
# largely copied from https://stackoverflow.com/a/44275458
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.
View generate_svg_from_dot.sh
dot -Kfdp -Nfontname=Courier -Nfontsize=10 -Efontname=Courier -Efontsize=10 -T{fmt} {dot_filepath} -o {output_filepath}