Skip to content

Instantly share code, notes, and snippets.

View skittleson's full-sized avatar

Spencer Kittleson skittleson

View GitHub Profile
@staticmethod
def mark_for_deletions(from_email_to_delete: str):
client = __get_client()
client.select_folder("INBOX")
action_on_uids = []
for i in range(1, 3):
start = (datetime.now() + timedelta(days=-(30 * i))
).strftime('%d-%b-%Y')
end = (datetime.now() + timedelta(days=-((30 * i)-30))
).strftime('%d-%b-%Y')
@rain-1
rain-1 / llama-home.md
Last active April 24, 2025 06:41
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
@mulhoon
mulhoon / last-modified-demo-server.js
Last active December 28, 2022 12:23
Counting unique visitors and bounces without cookies.
const express = require('express')
const app = express()
app.get('/ping', (req, res) => {
const now = Date.now(),
day = 8.64e7
// calculate midnight today and tomorrow
const midnight = Math.floor(now / day) * day
const midnightDate = new Date(midnight)
@skittleson
skittleson / pi-router.md
Last active January 9, 2023 04:27
Pi Router Steps
@skittleson
skittleson / tempRules.md
Last active March 28, 2022 01:22
Temp Control a Fridge
Template
{"NAME":"Tuya Siren","GPIO":[255,107,255,108,255,255,0,0,255,255,255,255,255],"FLAG":0,"BASE":54}
You must activate the template before using any of the tuya commands below.
Recommended rules for tasmota:
rule1 on system#boot backlog tuyasend4 102,0; tuyasend2 103,300; TuyaSend1 117,0 endon
rule1 1
tuyamcu 11,104
@lbussy
lbussy / README.md
Last active January 18, 2025 14:33
How to create a Wireless Access Point with a, OTG connected Raspberry Pi to share your Internet Connection

Creating a Raspberry Pi Wireless Access Point Bridge (WAP) via On The Go (OTG) Connection

Issue: You are traveling, and all you have access to is that crappy sort of Internet that requires you to hit a network login page via your laptop's web browser. You want to connect some other devices, maybe some IoT devices, so that you can keep up with your projects. There is no way to do that since they don't have a web browser. Or do you have access to some pay-as-you-go Internet that only allows one device?

Solution: A Raspberry Pi Zero W (or any Pi with WiFi).

Overview:

  1. The Raspberry Pi is connected to your computer's USB port and uses what's called a Remote Network Driver Interface Specification (RNDIS) adapter to create a network between your Pi and your computer over the USB.
  2. Your main computer's network connections are then shared, allowing another network connection to use its Internet connection.
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 8, 2025 14:18
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@khronos227
khronos227 / rpi-wifi-setup.sh
Created January 4, 2019 05:23
script to setup wifi access point for raspbian os
#!/bin/bash
function backup () {
if [ -e $1 -a ! -e $1.bak ]; then
cp $1{,.bak}
fi
}
function restore () {
cp $1{.bak,}
@dideler
dideler / bot.rb
Last active April 24, 2025 04:41
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#