Skip to content

Instantly share code, notes, and snippets.

View wfsg00098's full-sized avatar
πŸ“š
Studying

ηŽ‹ζ‚„ζ‚„ wfsg00098

πŸ“š
Studying
View GitHub Profile
import llama_cpp
import re
import json
# Model configuration
# tested with mistral, llama2, llama3, and phi3
model_path = "/path/to/model"
base_llm = llama_cpp.Llama(model_path, seed=42, n_gpu_layers=-1, n_ctx=4096, verbose=False, temperature=0.0)
@wfsg00098
wfsg00098 / ela.py
Created May 24, 2018 08:43 — forked from ewencp/ela.py
Quick, simple implementation of Error Level Analysis
#!/usr/bin/env python
# This is a really simple implementation of ELA as described in
# http://blackhat.com/presentations/bh-dc-08/Krawetz/Whitepaper/bh-dc-08-krawetz-WP.pdf
# You shouldn't actually use it, or at least read the paper carefully
# and implement more of the techniques before drawing any conclusions.
from PIL import Image, ImageChops, ImageEnhance
import sys, os.path