Skip to content

Instantly share code, notes, and snippets.

View gwbischof's full-sized avatar
🧐
Learning

Garrett Bischof gwbischof

🧐
Learning
View GitHub Profile
require('luau')
_addon.name = 'automacro'
_addon.version = '1.0'
_addon.author = 'Mapogo'
_addon.commands = {'am',}
sleep_time = 30
windower.register_event('load', function()
@gwbischof
gwbischof / venmo_receipts.py
Created November 25, 2022 21:46
Generate and Email receipts for Venmo transactions.
"""
Checks your Vemmo transactions, generates a receipt, and emails it to email in venmo note.
1. Make a PDF of you receipt template.
2. https://www.sejda.com/pdf-forms, this is useful to add fields to an existing PDF.
3. Use fillpdfs.get_form_fields to find all of the fields in the PDF.
4. Get gmail and venmo api credentials.
5. Follow instructions here to get venmo token https://github.com/mmohades/Venmo
6. Update the GLOBALS.
7. Execute this script.
"""
@gwbischof
gwbischof / density.py
Last active October 24, 2022 19:22
Multifile Density
import os
import matplotlib.pyplot as plt
from pathlib import Path
from export_draft import Multifile
DATA_DIRECTORY = Path("/nsls2/data/chx/legacy/Compressed_Data")
densities = []
def multifile_density(multifile):
total_pixels = 0
import requests
import json
from ophyd import Component as Cpt
from ophyd import Device, Signal
from ophyd.sim import NullStatus
class UnrealClient():
@gwbischof
gwbischof / learn_python1.ipynb
Created April 1, 2021 16:25
Python teaching material1
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
===================
Publishing Releases
===================
# Make a new branch called rel-VER for release notes.
# Make a PR called release notes VER.
# Merge release notes PR.
#!/bin/bash
VERSION=$1
REMOTE=$2
MAIN_BRANCH=$3
echo "Publishing $VERSION"
git commit --allow-empty -m "REL: $VERSION"
git tag -a $VERSION
git push $REMOTE $MAIN_BRANCH
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gwbischof
gwbischof / mongo_backup_cron.txt
Last active February 22, 2021 20:43
mongo_backup_cron
#!/bin/bash
# ------------------------------------------------------------------
# Simple Backup Script for MongoDB
# ------------------------------------------------------------------
# Definitions
MONGO_HOST='localhost'
MONGO_PORT="27017"
DUMP_PATH='/backup/mongo_backup'
DAYS_OF_BACKUPS=2
@gwbischof
gwbischof / BlueskyDatabrokerPackServer.py
Last active February 8, 2021 17:37
BlueskyDatabrokerPackServer
"""
This builds and serves databroker-pack files
"""
import asyncio
import os
import pathlib
import subprocess
import tempfile
import zipfile