Skip to content

Instantly share code, notes, and snippets.

@disler
disler / README.md
Last active October 22, 2024 02:58
Personal AI Assistant: 'Ada' - v0

This is not working complete code.

This is strictly a v0, scrapy, proof of concept for the first version of a personal AI Assistant working end to end in just ~322 LOC.

It's only a frame of reference for you to consume the core ideas of how to build a POC of a personal AI Assistant.

To see the high level of how this works check out the explanation video. To follow our agentic journey check out the @IndyDevDan channel.

Stay focused, keep building.

@moyix
moyix / .env.local
Created August 19, 2023 22:40
Setup for locally hosted LLM chat using chat-ui and TGI with WizardLM-70B
MONGODB_URL=mongodb://localhost:27017
HF_ACCESS_TOKEN=<REDACTED>
# 'name', 'userMessageToken', 'assistantMessageToken' are required
MODELS=`[
{
"endpoints": [{"url": "http://localhost:8081"}],
"name": "WizardLM/WizardLM-70B-V1.0",
"description": "WizardLM: Empowering Large Pre-Trained Language Models to Follow Complex Instructions",
"websiteUrl": "https://huggingface.co/WizardLM/WizardLM-70B-V1.0",
import sys
import os
import re
import json
import zipfile
from collections import defaultdict, namedtuple
from collections.abc import Mapping
from email.parser import HeaderParser
from email.policy import compat32
from base64 import urlsafe_b64decode
@moyix
moyix / fast_check_for_ffast_math.py
Created September 2, 2022 16:12
A faster check to see if a binary has a constructor that enables FTZ/DAZ that just does byte matching
import sys
import mmap
from elftools.elf.elffile import ELFFile, ELFError
import struct
set_fast_math_code = bytes.fromhex('0fae5c24fc814c24fc408000000fae5424fcc3')
def load_bytes_from_elf(bindata, elf, vaddr, size):
try:
paddr = next(iter(elf.address_offsets(vaddr)))
@scyto
scyto / docker-swarm-architecture.md
Last active April 25, 2025 21:04
My Docker Swarm Architecture

This (and related gists) captures how i created my docker swarm architecture. This is intended mostly for my own notes incase i need to re-creeate anything later! As such expect some typos and possibly even an error...

Installation Step-by-Step

Each major task has its own gist, this is to help with maitainability long term.

  1. Install Debian VM for each docker host
  2. install Docker
  3. Configure Docker Swarm
  4. Install Portainer
  5. Install KeepaliveD
  6. Using VirtioFS backed by CephFS for bind mounts (migrating from glsuterFS - WIP)
@Koenvh1
Koenvh1 / canvas-scraper.py
Created April 13, 2019 12:56
Scrape your Canvas website and download all content to a folder. Tested on 2019-04-13.
import argparse
import os
import re
from pathvalidate import sanitize_filename
from canvasapi import Canvas
from canvasapi.course import Course
from canvasapi.exceptions import Unauthorized, ResourceDoesNotExist
from canvasapi.file import File
from canvasapi.module import Module, ModuleItem