Skip to content

Instantly share code, notes, and snippets.

@brettohland
brettohland / 1.0 FormatStyle in Excruciating Detail.md
Last active May 4, 2024 08:11
FormatStyle in Excruciating Detail
@sadimanna
sadimanna / clahe.py
Last active May 4, 2024 08:11
Contrast Limited Adaptive Histogram Equalization in Python
'''
"Contrast Limited Adaptive Histogram Equalization"
by Karel Zuiderveld, karel@cv.ruu.nl
in "Graphics Gems IV", Academic Press, 1994
_Author_ -- Siladittya Manna
The below implementation does not assume that the
X- and Y image resolutions are an integer multiple
of the X- and Y sizes of the contextual regions.
@esterTion
esterTion / 0_BiliComicWebReader
Last active May 4, 2024 08:07
BiliComicWebReader
shit title placeholder
@SomajitDey
SomajitDey / install_ifort_ifx.md
Last active May 4, 2024 08:04
Install INTEL Fortran compiler ifort for free on Ubuntu(WSL2). Also install MKL. OpenMP and OpenMPI runtime for coarray support.

My route:

  1. curl -Lo- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo gpg --dearmor -o /usr/share/keyrings/oneapi-archive-keyring.gpg
  2. sudo tee /etc/apt/sources.list.d/oneAPI.list <<< "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main"
  3. sudo apt update
@gd3kr
gd3kr / embeddings.py
Created February 15, 2024 20:35
compute embeddings for tweets in tweets.json
"""
a simple script that reads tweets inside a json file, uses openai to compute embeddings and creates two files, metadata.tsv and output.tsv, which cam be used to visualise the tweets and their embeddings in TensorFlow Projector (https://projector.tensorflow.org/)
"""
# obtain tweets.json from https://gist.github.com/gd3kr/948296cf675469f5028911f8eb276dbc
import pandas as pd
import json
from openai import OpenAI
@RubenKelevra
RubenKelevra / fast_firefox.md
Last active May 4, 2024 07:54
Make Firefox fast again
INITIALISATION
==============
load wp-config.php
set up default constants
load wp-content/advanced-cache.php if it exists
load wp-content/db.php if it exists
connect to mysql, select db
load object cache (object-cache.php if it exists, or wp-include/cache.php if not)
load wp-content/sunrise.php if it exists (multisite only)
@citruz
citruz / QEMU_ON_M1.md
Last active May 4, 2024 07:50
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 4, 2024 07:50
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@krisbolton
krisbolton / fix-USB-showing-up-as-two-partitions.md
Last active May 4, 2024 07:50
How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows

How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows:

  1. Hold the Windows key and press X, select PowerShell (Admin), select Yes to the pop-up. You can also use Command Prompt.
  2. In the Powershell interface type diskpart to enter the disk partition tool.
  3. Type list disk to see all disks listed.
  4. Select the USB drive by typing select disk [NUMBER]. Be careful to select the correct drive.
  5. Type clean. An error will occur if you have the drive folder open, close the window and repeat the command if this happens.
  6. Type create partition primary.
  7. Type format fs=ntfs quick to format the drive (you can also choose to set fs=fat32).
  8. Type active.