Skip to content

Instantly share code, notes, and snippets.

@abul4fia
abul4fia / 00README.md
Last active May 12, 2024 01:35
Finding sub-texts by shape in manim

Finding shapes in Tex mobjects

This module implements some utility functions to search some shapes (formulas, symbols) inside a Tex (or MathTex) mobject.

The approach is to compare the shapes (bezier curves) of the symbols, instead of the particular strings that produced them. This approach is generic and avoids the use of other manim mechanisms that would break under some circunstances, such as the presence of \frac{}{} in a formula.

The function you would probably want to use is group_shapes_in_tex(). Despite the confusing name, the goal is to find all the occurences of a given symbol (or group of symbols, or list of symbols) inside a Tex mobject, and return a VGroup containing them

@pablotolentino
pablotolentino / Visual Studio 2022 Product Key
Created November 20, 2021 20:41
Visual Studio 2022 Enterprise Product key
Visual Studio 2022
Enterprise :
VHF9H-NXBBB-638P6-6JHCY-88JWH
Professional:
TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 12, 2024 01:28
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@nathggns
nathggns / README.md
Last active May 12, 2024 01:26
Fibonacci Generator in LMC

LMC Fibonacci Generator

Screenshot

You can run this program on any LMC emulator, such as http://peterhigginson.co.uk/LMC/

LMC, which stands for Little Man Computer is a model of a computer, used to teach students how CPUs work. Read More.

Lines 1-2

@Artefact2
Artefact2 / README.md
Last active May 12, 2024 01:25
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

@panamantis
panamantis / logging.ini
Created June 20, 2020 13:22
Python logging configuration files (yaml, json, ini)
[loggers]
keys=root,app,uvicorn
[handlers]
keys=console,file,uvicorn
[formatters]
keys=console,file
[logger_root]
@ssstonebraker
ssstonebraker / sed cheatsheet
Created August 2, 2013 14:06 — forked from un33k/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@lincolnthalles
lincolnthalles / random_memo.js
Last active May 12, 2024 01:19
Add "Random Memo" button to Memos v0.21+ sidebar
const RANDOM_MEMO_SETTINGS = {
// Amount of memos to cache
memoAmount: 100,
// Kinds of memos to cache: PUBLIC = visible to everyone, PROTECTED = logged in users, PRIVATE = only the creator
memoKinds: ["PUBLIC", "PROTECTED", "PRIVATE"],
// Time in minutes to cache the memos
memoCacheTimeMinutes: 60,
// Username of the memo creator to filter the memos
memoCreatorUsername: "",
// Button text
@Gavinok
Gavinok / eglot-codelens.el
Created March 12, 2024 22:10
Add support for code lenses in eglot for emacs
;; eglot-codelens.el --- Add support for codelenses to eglot -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
;;; Extending eglot to support lenses
;;;; Findings
;; Lenses often support the option to be used as a code action
;; some servers rely on custom code actions implemented by the client
;; - [[https://github.com/emacs-lsp/lsp-mode/issues/2250]] mentions this
@philippkraft
philippkraft / README.md
Last active May 12, 2024 01:16
Convert xyz elevation models to GeoTiff

Convert .xyz elevation models to GeoTiff

In Germany, more and more state agencies allow free access to high resolution elevation models. However, these are often released as xyz tables, which are not easily used in GIS environments. A standard method to convert this format to raster formats (eg. GeoTiff) is the GDAL function gdal_translate [1, 2]. However, converting 1M lines takes dozens of seconds and is not trivial to parallize.