Skip to content

Instantly share code, notes, and snippets.

View duncangh's full-sized avatar
💭
👨‍💻

Graham Duncan duncangh

💭
👨‍💻
View GitHub Profile
@imthenachoman
imthenachoman / Developing a GAS Powered Google Workspace Add-on And Launching It To The Marketplace.md
Last active June 24, 2024 15:49
Developing a GAS Powered Google Workspace Add-on And Launching It To The Marketplace
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Add ChatGPT Menu
const onOpen = () => {
const ui = SpreadsheetApp.getUi();
ui.createMenu("ChatGPT")
.addItem("💾 Save Responses as Text", "saveAsText")
.addItem("ChatGPT API Sheet by Sarah Tamsin 💜", "openUrl")
.addToUi();
};
@nateraw
nateraw / video-classification-pipeline-transformers.ipynb
Created December 9, 2022 18:55
video-classification-pipeline-transformers.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / decord-stereo-audio-bug.ipynb
Created November 15, 2022 17:27
decord-stereo-audio-bug.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eyeseast
eyeseast / python.md
Last active May 6, 2024 17:11
How to set up Python in 2022

I have an updated version of this on my blog here: https://chrisamico.com/blog/2023-01-14/python-setup/.

Python

This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.

Tools and helpful links:

  • Python docs: https://docs.python.org/3/
  • Python Standard Library:  - Start here when you're trying to solve a specific problem
@Overemployed
Overemployed / install.sh
Last active April 18, 2024 19:08
Jacktrip running on PiKVM / Raspberry Pi with arch distro
#!/bin/bash
# Check if script is running as root
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# your personal machine running jacktrip
REMOTE_JACK_SERVER=nat.local
@Overemployed
Overemployed / transcribe.js
Last active June 1, 2024 15:36
Listen for a live recording and transcribe the file. Send a notification when YOUR_NAME is called
const pathParser = require("path");
const { MODEL_PATH, HOME, YOUR_NAME, FILE_GLOB } = process.env;
console.log(MODEL_PATH, HOME, YOUR_NAME, FILE_GLOB);
const chokidar = require('chokidar');
const vosk = require('vosk');
const wav = require("wav");
const { Readable } = require("stream");
const { notify } = require('node-notifier');
const TailingReadableStream = require('tailing-stream');
const recordingsDir = `${HOME}/recordings/`
import requests
import pandas as pd
import plotly.graph_objects as go
import pandas as pd
from datetime import datetime
api_key = 'your api key from financialmodelingprep'
@dutc
dutc / day01-part1.py
Last active December 22, 2021 13:48
Advent of Code using `numpy` & `pandas`
from pandas import read_csv
s = read_csv('data.txt', squeeze=True, header=None)
print(
(s.diff() > 0).sum(),
)