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
#!/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 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
#!/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 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 python3 | |
import datetime | |
import sys | |
import cachier | |
import feedparser | |
import pandas | |
import requests |
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 bottle | |
@bottle.route('<path:path>', method=['GET', 'POST', 'PUT', 'PATCH']) | |
def echo(path): | |
return bottle.request.body | |
bottle.run(host='localhost', port=8080) |
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 contextlib | |
import os | |
import sys | |
import cachier | |
import feedparser | |
import keyring |
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 | |
BUCKETNAME=$1 | |
aws s3api list-multipart-uploads --bucket $BUCKETNAME \ | |
| jq -r '.Uploads[] | "--key \"\(.Key)\" --upload-id \(.UploadId)"' \ | |
| while read -r line; do | |
eval "aws s3api abort-multipart-upload --bucket $BUCKETNAME $line"; | |
done |
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
from bottle import request, route, run, redirect | |
redirect_url = 'https://example.com/foo | |
@route('/foo') | |
def job(): | |
requestor_id = request.query['requestor_id'] | |
print(f'{requestor_id} clicked the link') | |
redirect(redirect_url) |