Skip to content

Instantly share code, notes, and snippets.

View empjustine's full-sized avatar

大関 金城 秀喜 カシオ empjustine

View GitHub Profile
@bigsnarfdude
bigsnarfdude / unsloth_deepseek.md
Last active February 9, 2025 23:46
deepseek r1 gguf unsloth

See our collection for versions of Deepseek-R1 including GGUF & 4-bit formats. Unsloth's DeepSeek-R1 1.58-bit + 2-bit Dynamic Quants selectively avoids quantizing certain parameters, greatly increasing accuracy than standard 1-bit/2-bit.

Instructions to run this model in llama.cpp: Or you can view more detailed instructions here: unsloth.ai/blog/deepseekr1-dynamic

Do not forget about <|User|> and <|Assistant|> tokens! - Or use a chat template formatter Obtain the latest llama.cpp at https://github.com/ggerganov/llama.cpp It's best to use --min-p 0.05 or 0.1 to counteract very rare token predictions - I found this to work well especially for the 1.58bit model. Example with Q4_0 K quantized cache Notice -no-cnv disables auto conversation mode

@rendello
rendello / _unicode_roundtrip_unsafe.txt
Last active November 25, 2024 00:55
Unicode roundtrip-unsafe characters. They change to different characters (or sets of characters) when case is changed and then changed back.
Uppercase -> lowercase -> uppercase:
İ i̇ İ LATIN CAPITAL LETTER I WITH DOT ABOVE -> LATIN SMALL LETTER I, COMBINING DOT ABOVE -> LATIN CAPITAL LETTER I, COMBINING DOT ABOVE
Ω ω Ω OHM SIGN -> GREEK SMALL LETTER OMEGA -> GREEK CAPITAL LETTER OMEGA
ẞ ß SS LATIN CAPITAL LETTER SHARP S -> LATIN SMALL LETTER SHARP S -> LATIN CAPITAL LETTER S, LATIN CAPITAL LETTER S
K k K KELVIN SIGN -> LATIN SMALL LETTER K -> LATIN CAPITAL LETTER K
Å å Å ANGSTROM SIGN -> LATIN SMALL LETTER A WITH RING ABOVE -> LATIN CAPITAL LETTER A WITH RING ABOVE
ϴ θ Θ GREEK CAPITAL THETA SYMBOL -> GREEK SMALL LETTER THETA -> GREEK CAPITAL LETTER THETA
Lowercase -> uppercase -> lowercase:
ῗ Ϊ͂ ῗ GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI -> GREEK CAPITAL LETTER IOTA, COMBINING DIAERESIS, COMBINING GREEK PERISPOMENI -> GREEK SMALL LETTER IOTA, COMBINING DIAERESIS, COMBINING GREEK PERISPOMENI
@egeozcan
egeozcan / index.html
Created October 18, 2024 08:40
image viewer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fullscreen Image Viewer</title>
<style>
body {
font-family: Arial, sans-serif;
}
@rendello
rendello / _utf8_case_data.rs
Last active March 11, 2025 21:53
Unicode codepoints that expand or contract when case is changed in UTF-8. Good for testing parsers. Includes the data `utf8_case_data.rs` and the script to generate it, `generate_utf8.py`.
/*
Copyright (c) 2024 Rendello
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
@adtac
adtac / README.md
Last active April 7, 2025 12:59
Using your Kindle as an e-ink monitor

3.5 fps, Paperwhite 3
@adtac_

step 1: jailbreak your Kindle

mobileread.com is your best resource here, follow the instructions from the LanguageBreak thread

I didn't really follow the LanguageBreak instructions because I didn't care about most of the features + I was curious to do it myself, but the LanguageBreak github repo was invaluable for debugging

@SilvortheGrand
SilvortheGrand / SetupKamvas13
Last active August 2, 2024 19:48
Sets up the side buttons for the Kamvas 13 graphical tablet on Linux. Tested for Debian 12 and set up to use Krita's keybinds. Before running, ensure the drawing tablet is connected to the computer.
# NOTE: Button numbers 4-7 do not map to any buttons for technical reasons, thus the skip to 8
# Undo
xsetwacom set "HUION Huion Tablet_GS1331 Pad pad" button 1 key +Ctrl +Z
# Redo
xsetwacom set "HUION Huion Tablet_GS1331 Pad pad" button 2 key +Ctrl +Shift +Z
# Ctrl for easy zoom access
xsetwacom set "HUION Huion Tablet_GS1331 Pad pad" button 3 key +Ctrl
# Cut
xsetwacom set "HUION Huion Tablet_GS1331 Pad pad" button 8 key Ctrl X
@nelsonaloysio
nelsonaloysio / toolbox-export.sh
Created July 7, 2024 07:17
Export toolbox applications the same way as with distrobox.
#!/usr/bin/env sh
# SPDX-License-Identifier: GPL-3.0-only
#
# This file is part of the distrobox project:
# https://github.com/89luca89/distrobox
#
# Just modified to work with toolbox:
# https://github.com/containers/toolbox
#
# Copyright (C) 2021 distrobox contributors
@dfeldman
dfeldman / gist:5a5630d28b8336f403123c071cfdac9e
Created June 5, 2024 15:48
Database Schema for Microsoft's Copilot+Recall feature
****** SemanticTextStore.db :
CREATE TABLE si_db_info (
schema_version INTEGER
);
CREATE TABLE si_items (
id BLOB(16) PRIMARY KEY NOT NULL
);
CREATE TABLE si_diskann_graph (
id INTEGER PRIMARY KEY,
@jart
jart / rename-pictures.sh
Created December 12, 2023 15:24
Shell script for renaming all images in a folder
#!/bin/sh
# rename-pictures.sh
# Author: Justine Tunney <[email protected]>
# License: Apache 2.0
#
# This shell script can be used to ensure all the images in a folder
# have good descriptive filenames that are written in English. It's
# based on the Mistral 7b and LLaVA v1.5 models.
#
# For example, the following command:
@alexkuz
alexkuz / install-spd-piper.sh
Last active January 4, 2025 00:41
Install Piper TTS as speech dispatcher module
#!/bin/sh
set -e
BASE_PIPER_VOICES_URL=${BASE_PIPER_VOICES_URL:-https://huggingface.co/rhasspy/piper-voices/resolve/main}
INSTALL_DIR=${INSTALL_DIR:-~/.local/share/speech-dispatcher-piper}
CONFIG_DIR=${CONFIG_DIR:-~/.config/speech-dispatcher/modules}
CONFIG_PATH=$CONFIG_DIR/piper-generic.conf
PLATFORM=${PLATFORM:-$(uname -m)}
PIPER_BIN_GZ_URL=${PIPER_BIN_GZ_URL:-https://github.com/rhasspy/piper/releases/latest/download/piper_linux_$PLATFORM.tar.gz}