Skip to content

Instantly share code, notes, and snippets.

@mtisz
mtisz / llama-3-70B-qlora.yaml
Created May 15, 2024 16:47
Axolotl Config for Llama-3-70B QLoRA
base_model: meta-llama/Meta-Llama-3-70B
model_type: LlamaForCausalLM
tokenizer_type: AutoTokenizer
load_in_8bit: false
load_in_4bit: true
strict: false
datasets:
- path: /home/migel/ai_datasets/tess-v1.5b-chatml.jsonl
@rjzak
rjzak / PyUtils.cpp
Last active May 15, 2024 21:06
Convert between Python list/tuples and C++ vectors
#include <Python.h> // Must be first
#include <vector>
#include <stdexcept>
#include "PyUtils.h"
using namespace std;
// =====
// LISTS
// =====
@minhhieutruong0705
minhhieutruong0705 / OpenCV_Build-Guide.md
Last active May 15, 2024 21:03
Guide to build OpenCV from Source with GPU support (CUDA and cuDNN)

Guide to build OpenCV from source with GPU support (CUDA and cuDNN)

Feb 22nd, 2022

System specification

  • Operating system: Ubuntu 20.04 x84_64 (64-bit)
  • Architecture: amd64
  • GPU: NVIDIA GeForce RTX 3090
  • Python 3.8

Install dependencies and recommeneded packages

@patois
patois / child-gating-poc.py
Created November 15, 2022 19:11 — forked from pellaeon/child-gating-poc.py
Frida child-gating and spawn-gating example
"""
This POC is based on example from https://frida.re/news/#child-gating
and is aimed to instrument child processes along with the main one.
"""
from __future__ import print_function
import frida
from frida_tools.application import Reactor
import threading
@jniltinho
jniltinho / install-buildkit.sh
Last active May 15, 2024 21:00
Enable BuildKit Docker Ubuntu 22.04
#!/bin/bash
#
# https://docs.docker.com/build/buildkit/
# https://github.com/docker/buildx/releases/
# https://github.com/docker/buildx
mkdir -p $HOME/.docker/cli-plugins
wget https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64
chmod +x buildx-v0.11.2.linux-amd64
mv buildx-v0.11.2.linux-amd64 $HOME/.docker/cli-plugins/docker-buildx
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; BACK UP YOUR LOGSEQ DIR BEFORE RUNNING THIS!
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Copyright (C) Aug 4 2022, William R. Burdick Jr.
;;
;; LICENSE
;; This code is dual-licensed with MIT and GPL licenses.
@jauderho
jauderho / gist:6b7d42030e264a135450ecc0ba521bd8
Last active May 15, 2024 20:57
HOWTO: Upgrade Raspberry Pi OS from Bullseye to Bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
@flufflesamy
flufflesamy / fixemails.py
Created April 27, 2024 23:42
Script to fix import of .eml files to ProtonMail due to invalid MIME for attachments
import os
import re
path = os.getcwd()
emlFiles = []
for (root, subdirs, files) in os.walk(path):
for file in files:
if file.endswith(".eml"):
@tabrindle
tabrindle / webp-convert-directory.sh
Last active May 15, 2024 20:57
Convert all files in directory to webp, with default params, or standard cwebp params passed from command
#!/bin/bash
PARAMS=('-m 6 -q 70 -mt -af -progress')
if [ $# -ne 0 ]; then
PARAMS=$@;
fi
cd $(pwd)
@0xjac
0xjac / private_fork.md
Last active May 15, 2024 20:56
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git