Skip to content

Instantly share code, notes, and snippets.

@rain-1
rain-1 / LLM.md
Last active May 26, 2024 17:46
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@hSATAC
hSATAC / install redis-cli.sh
Created June 7, 2022 05:15
Install redis-cli with tls in alpine
export REDIS_VERSION="6.0.4"
export REDIS_DOWNLOAD_URL="http://download.redis.io/releases/redis-${REDIS_VERSION}.tar.gz"
apk add --update --no-cache --virtual build-deps gcc make linux-headers musl-dev tar openssl-dev pkgconfig
wget -O redis.tar.gz "$REDIS_DOWNLOAD_URL"
mkdir -p /usr/src/redis
tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1
cd /usr/src/redis/src
make BUILD_TLS=yes MALLOC=libc redis-cli
@tamalsaha
tamalsaha / issuer.yaml
Last active March 3, 2023 19:37
Redis TLS with KubeDB
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: redis-issuer
namespace: demo
spec:
ca:
secretName: redis-ca
#include "ArduinoMotorShieldR3.h"
// https://store.arduino.cc/arduino-motor-shield-rev3
// https://randomnerdtutorials.com/complete-guide-for-ultrasonic-sensor-hc-sr04/
// https://github.com/gallingern/arduino-motor-shield-r3
ArduinoMotorShieldR3 md;
int trigPin = 5; // Trigger
int echoPin = 4; // Echo
int ledPin = 7;
@jmrnilsson
jmrnilsson / 32and64bit.cs
Last active May 9, 2020 05:43
Fowler–Noll–Vo 1 A (FNV1) in 32 bit and 64 bit variants
using System;
using System.Text;
namespace Hashing
{
public static class FowlerNollVo
{
public static string ToFnv1aHashInt64(this string text)
{
string Fnv1a(byte[] bytes_)
@lesha-co
lesha-co / ascii_box.txt
Last active March 22, 2023 15:45
Палитра для рисования ASCII
Таблицы
Обычная Жирная Двойная
┌─┬─┐ ┏━┳━┓ ╔═╦═╗
├─┼─┤ ┣━╋━┫ ╠═╬═╣
│ │ │ ┃ ┃ ┃ ║ ║ ║
└─┴─┘ ┗━┻━┛ ╚═╩═╝
Частично двойные и жирные
╓╥╖ ╒╤╕ ┎┰┒ ┍┯┑
╟╫╢ ╞╪╡ ┠╂┨ ┝┿┥
╙╨╜ ╘╧╛ ┖┸┚ ┕┷┙
@evanwill
evanwill / gitBash_windows.md
Last active May 13, 2024 04:59
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@mark-adams
mark-adams / aes_example.cs
Created December 12, 2014 15:02
AES String Encryption (CBC) Example Code for C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace aes_example
{
using System;
@denji
denji / nginx-tuning.md
Last active May 25, 2024 13:32
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@dbuscombe-usgs
dbuscombe-usgs / fix
Created July 26, 2013 02:57
Batch GIMP script for auto-sharpen, white-balance and colour enhance
(define (batch-auto-fix pattern
radius
amount
threshold)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE
filename filename)))
(drawable (car (gimp-image-get-active-layer image))))