Skip to content

Instantly share code, notes, and snippets.

View nanoman657's full-sized avatar
💭
Things that matter are hard.

Joshua Trusty nanoman657

💭
Things that matter are hard.
View GitHub Profile
@nanoman657
nanoman657 / BQDeduplicationExtraCredit.sql
Last active September 19, 2023 20:37
BigQuery Deduplication Extra Credit
WITH
raw_person AS (
SELECT
1 AS id,
'Joshua' AS first_name,
'Trusty' AS last_name,
'red' AS favorite_color,
'09-14-2023' AS date
UNION ALL
SELECT
@nanoman657
nanoman657 / pluralize.py
Created September 1, 2023 18:15
Python Type Checking with Command Line Inputs
from sys import argv
from typing import TypeAlias, Literal, Union, get_args
singular_word: TypeAlias = Literal["pie", "pastry"]
plural_word: TypeAlias = Literal["pies", "pastries"]
def pluralize(word: singular_word, quantity: int) -> str:
plural_map: dict = dict(zip(get_args(singular_word), get_args(plural_word)))
@nanoman657
nanoman657 / server.js
Last active January 26, 2020 22:58
Testing
'use strict';
var http = require('http');
var fs = require('fs');
//var JavaScript1 = require('./prep4Firebase') //require('./JavaScript1');
//var d = require('./Script1');
var url = require('url');
var port = process.env.PORT || 1337;
//const vision = require('@google-cloud/vision');
// Imports the Google Cloud client library