Skip to content

Instantly share code, notes, and snippets.

View SommerEngineering's full-sized avatar
👍

Thorsten Sommer SommerEngineering

👍
View GitHub Profile
@Artefact2
Artefact2 / README.md
Last active July 20, 2024 02:21
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggerganov/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

@reknih
reknih / din-letter.typ
Created March 26, 2023 10:20
A DIN letter template like the one we use at Typst
/*
DIN Letter template
Save this file in your project. Use it like this
in your project file:
#import "template.typ": *
#show: letter.with(
sender: [
@e12e
e12e / block-compromised-github-key.sh
Last active April 2, 2023 16:49 — forked from robbat2/block-compromised-github-key.sh
Mark compromised GitHub.com key as revoked
#!/bin/bash
# For eg MacOs with ssh*.d-style config:
# Update ssh_config (client config, not server config)
echo "RevokedHostKeys /etc/ssh/ssh_revoked_host_keys" | sudo tee /etc/ssh/ssh_config.d/revoked_host_keys.conf
# Create revocation file as ssh binary file. If file isn't readable *all* keys are considered invalid!
test -s /etc/ssh/ssh_revoked_host_keys || sudo ssh-keygen -k -f /etc/ssh/ssh_revoked_host_keys
# Revoke old github key based on full key or id:
cat <<EOF | sudo ssh-keygen -k -u -f /etc/ssh/ssh_revoked_host_keys -
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
@robbat2
robbat2 / block-compromised-github-key.sh
Created March 24, 2023 07:36
Mark compromised GitHub.com key as revoked
#!/bin/bash
# You might need to insert this in a slightly different place
cat >>/etc/ssh/ssh_config <<EOF
Host *
RevokedHostKeys /etc/ssh/ssh_revoked_hosts
EOF
cat >>/etc/ssh/ssh_revoked_hosts <<EOF
# https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
@sandys
sandys / Fastapi-sqlalchemy-pydantic-dataclasses-reloadable-logging.md
Last active June 30, 2024 09:23
fastapi with python 3.10 dataclasses - used to create both sqlalchemy and pydantic models simultaneously. And setting up sqlalchemy the right way (without deadlocks or other problems). Additionally, this also takes care of unified logging when running under gunicorn..as well as being able to run in restartable mode.
@onlurking
onlurking / programming-as-theory-building.md
Last active June 5, 2024 04:46
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@fabianbs
fabianbs / BitSet.cs
Last active July 16, 2020 05:57 — forked from NightOwl888/BitSet.cs
C# port of the java.util.BitSet class
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
namespace BitSet {
/* BitSet.cs -- A vector of bits.
Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
@pat42smith
pat42smith / go_generics_adaptors.md
Last active October 16, 2018 23:58
Go Generics with Adaptors

Go Generics with Adaptors

Contracts — Draft Design presents a draft proposal for adding generic types and functions to the Go programming language, using contracts to specify the behavior required of type parameters.

This document discusses two topics.

First, suppose generic types and functions are added to Go as in the contracts proposal, but without contracts. When a generic function f has a type parameter T, the only operations f can perform on values of type T are the operations that are available on all types. Is there a reasonable way to write generic code in these circumstances, with no other additions to the language? The answer seems to be

  • Yes, this is quite doable.
  • And it works well with both built-in and user-defined types.
@butuzov
butuzov / mp3 to m4b.md
Created August 10, 2018 06:07
Convert mp3's to m4b using `ffmpeg`

Let's imagine we have a lot of mp3 files ( forexample one of the pluralsite courses converted to mp3 ).

URL=https://www.pluralsight.com/courses/run-effective-meetings
PASS=pass
USER=user
OUTPUT="%(playlist_index)s. %(title)s-%(id)s.%(ext)s"
youtube-dl --username $USER --password $PASS -o $OUTPUT --extract-audio --audio-format mp3 $URL
@silvercircle
silvercircle / userChrome.css
Last active March 23, 2024 01:19
My Thunderbird userChrome for square tabs + some minor UI tweaks
/*
* Thunderbird userChrome.css
*
* WARNING: This style was designed for TB version 60 and will likely not work
* with more recent versions (see comments)
*
* it's meant to be used with the default 3 panel split layout
*/
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);