Skip to content

Instantly share code, notes, and snippets.

import numpy as np
import pandas as pd
from sklearn.decomposition import PCA
from sklearn.manifold import TSNE
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from transformers import BertTokenizer, BertModel
import torch
from adjustText import adjust_text
@guvener
guvener / tw-background-hex.md
Created April 30, 2022 08:46
Tailwind background colors HEX codes
@superseb
superseb / rke2-commands.md
Last active January 11, 2025 17:35
RKE2 commands

RKE2 commands

  • Updated on May 29 to accommodate etcd container not having /bin/sh available anymore.

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@akaak
akaak / if-you-use-vscode-then-use-gistpad.md
Last active January 11, 2025 17:36
use-gistpad[object Object]

If you are a developer and use Visual Studio Code (VSCode), then I recommend that you use GistPad

https://aka.ms/gistpad

Super helpful to view and work with your gists right within VSCode

Does automatic sync with your github and use VSCode interface to view, write and udpate your gists.

Build your own workflow to take notes, build knowledge base that is your own!

@guidorafael
guidorafael / scan_mutableList_in_indices
Last active January 11, 2025 17:36
Example of a for loop, using "in", scanning a MutableList via indices. Also aassigning new values to elements in a "val" declared MutableList. Also using joinToString.
/**
* Example of a for loop, using "in", scanning a MutableList via indices.
* Also aassigning new values to elements in a "val" declared MutableList.
* Also using joinToString.
*/
fun main() {
val mlNumbers = mutableListOf(1, 2, 3, 4, 5)
for (i in mlNumbers.indices) {
mlNumbers[i] = mlNumbers[i] * 2
}
@dbrand666
dbrand666 / link_multiple_devices.yaml
Last active January 11, 2025 17:35 — forked from aderusha/link_multiple_devices.yaml
Select multiple entities to link their on/off state. If any selected entity is turned on or off, the other selected entities will be sent a matching on or off command.
version: "3.5"
# The Scrypted docker-compose.yml file typically resides at:
# ~/.scrypted/docker-compose.yml
# Example volumes SMB (CIFS) and NFS.
# Uncomment only one.
# volumes:
# nvr:
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active January 11, 2025 17:32
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@skrymets
skrymets / Cornell's Notes Template.md
Last active January 11, 2025 17:31
Cornell Note Template for Obsidian
cssclass
cornell-note
Cues

Notes

The Cornell Note-taking System is a popular and effective method for organizing and summarizing information during lectures, readings, or any other form of learning.

@jamietre
jamietre / ddns_provider.conf
Last active January 11, 2025 17:29
Howto - using duckdns with Synology RT2600AC
[DuckDNS]
modulepath=/sbin/duckddns
queryurl=duckDNS.org