This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import pathlib | |
import pprint | |
import sys | |
import cachier | |
import openai |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
audio_filename="${1}" | |
splits_filename="${2}" | |
x="00:00:00" | |
z=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
audio_filename="${1}" | |
silence_length="${2}" | |
ffmpeg -i "${audio_filename}" -af "silencedetect=d=${silence_length}" -f null - |& awk '/silence_end/ {print $4,$5}' | awk '{S=$2;printf "%d:%02d:%02d\n",S/(60*60),S%(60*60)/60,S%60}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
current_date=$(date "+%Y%m%d") | |
bucket_name="my-backup-bucket" | |
backup_filename="/tmp/documents-backup-${current_date}.tgz" | |
export AWS_PROFILE=backup | |
aws-refresh-credentials | |
aws s3 cp "${backup_filename}.gpg" "s3://${bucket_name}/documents/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import boto3 | |
import cachier | |
import requests | |
@cachier.cachier() | |
def get_services(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import subprocess | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--files', action='append') | |
file_arguments, other_arguments = parser.parse_known_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# pip install beautifulsoup4 keyring pyjwt requests | |
# ./get-access-token.py $auth_domain $client_id $api_name $username | |
import getpass | |
import sys | |
import time | |
import urllib.parse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
url = 'https://www.scripps.org/physicians.json' | |
params = { | |
'api': 'provider_search', | |
'location': 'location-61-scripps-clinic-rancho-bernardo', | |
'skill': 'synonym-1-primary-care', | |
'age_group': 'adults', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import datetime | |
import getpass | |
import os | |
import re | |
import exchangelib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# This script takes one parameter, an American Airlines flight number. | |
# It also requires a FlightLabs API key to be stored in FLIGHTLABS_ACCESS_KEY, | |
# you can get one at https://app.goflightlabs.com/. | |
# It will lookup additional flight details from the flight number, and then | |
# open a web page to the AA seat map tool, passing the proper URL parameters | |
# to view the seat map for the provided flight. |