Skip to content

Instantly share code, notes, and snippets.

View tomswartz07's full-sized avatar
:shipit:
Checking out the cryptids behind the local Denny's

Tom Swartz tomswartz07

:shipit:
Checking out the cryptids behind the local Denny's
View GitHub Profile
@tazarov
tazarov / test_chunking_chroma.py
Last active June 24, 2024 13:56
An example of how one can chunk texts from large documents in chroma using langchain.
import uuid
from chromadb.utils import embedding_functions
from langchain.schema import Document
from langchain.text_splitter import RecursiveCharacterTextSplitter
long_text = """
The Downsides of LLMs (Logical Language Models)
In the age of artificial intelligence, Logical Language Models (LLMs) represent a significant leap forward in the field of natural language processing. These models are capable of comprehending, generating, and reasoning about human languages in a way that mimics human-like understanding. While the benefits of LLMs are numerous, it's essential to also recognize the downsides that accompany these advancements. This essay will explore the negative aspects of LLMs in terms of ethics, job displacement, security, and potential biases.
@nmeum
nmeum / coffee-grinder-lid.scad
Last active July 13, 2023 19:13
aeg-coffee-grinder-lid
// body
top_width = 95;
bottom_width = 80;
total_length = 122;
depth = 11;
thickness = 1.5;
// bottom circle
bottom_radius = 60;
y_off_bot = sqrt(exp(ln(bottom_radius)*2) - exp(ln(bottom_width/2)*2));

hi, and goodbye

The past few weeks has not been fun on IRC, the drama based on false information and assumptions has been insane. I've almost entirely been silent on the drama because I know the fallout that would happen if I spoke up.

A quick TLDR - I'm quitting all IRC development. KiwiIRC project lead, IRCv3 technical board, supporting the multitude of IRC networks, the lot.

Many people seem to think that I am supporting one side in everything that is going on, so just to be clear: I am not supporting any side of the current freenode drama - there is so much false information going around from everywhere that it is impossible to support anybody.

Woo freenode drama

@wlib
wlib / LICENSE
Last active April 30, 2024 17:07
Run a shell script with bash, line-by-line, prompted on each command. Useful for running unknown scripts or debugging. Not a secure substitute for understanding a script beforehand.
MIT License
Copyright (c) 2021 Daniel Ethridge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@kylemcdonald
kylemcdonald / Collect Parler Metadata.ipynb
Last active June 27, 2024 04:09
Collect video URLs and GPS data for Parler videos.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active May 31, 2024 23:52
Docker Container Logging using Promtail
@stevejenkins
stevejenkins / Pi-hole on UC-CK 0.13.6
Last active March 4, 2024 17:30
Pi-hole on UC-CK 0.13.6
# Instructions for installing Pi-hole 4.2 on UniFi CloudKey Gen 1 (UC-CK) running firmware 0.13.6
# Pi-hole will need to be completely re-installed after every FW update or if CloudKey is reset to defaults.
# Verify UC-CK is running firmware v0.13.6 (or later) before installing Pi-hole. If not, do:
ubnt-systool fwupdate https://dl.ubnt.com/unifi/stage/cloudkey/firmware/UCK/UCK.mtk7623.v0.13.6.7ad551e.190225.0939.bin
# UC-CK firmware v0.13.6 downgrades UniFi Controller to 5.10.17. Upgrade to 5.10.19 with:
cd /tmp
wget https://dl.ubnt.com/unifi/5.10.19/unifi_sysvinit_all.deb
dpkg -i unifi_sysvinit_all.deb
@milesbxf
milesbxf / monzo-alertmanager-config.yaml
Last active June 24, 2024 04:45
Monzo's Alertmanager Slack templates
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##
@mogenson
mogenson / pocket-2-arch-install.md
Last active September 28, 2018 14:25
Pocket 2 Arch Linux Installation Guide

GPD Pocket 2 Arch Linux Installation Guide

This following instructions install Arch Linux on a GPD Pocket 2. This installation uses systemd for boot. It sets up a 30GB root partition and an encrypted user partition that is decrypted and mounted on login. Let's get started.

Download and write the Arch Linux installation ISO to a flash drive. Insert flash drive, press power, hold F12, and select flash drive to boot.

Rotate console:
echo 1 > /sys/class/graphics/fbconv/rotate_all

Connect to Wi-Fi:

#!/usr/bin/env python3
from subprocess import check_output
from re import findall, DOTALL, MULTILINE
inputs = findall(r'.*?index: (\d+).*?sink: (\d+).*?application\.process\.id = "(\d+)"',
check_output(['pacmd', 'list-sink-inputs']).decode("utf-8"), DOTALL|MULTILINE)
sinks = findall(r'index: (\d+)', check_output(['pacmd', 'list-sinks']).decode("utf-8"))
focused_window = check_output(['xdotool', 'getwindowfocus'])
focused_pid = check_output(['xdotool', 'getwindowpid', focused_window]).strip().decode("utf-8")