Skip to content

Instantly share code, notes, and snippets.

@judero01col
judero01col / Service KMS
Last active January 8, 2025 03:05
Volume License Activation Key Service - KMS
## Find Available Target Editions
DISM.exe /Online /Get-TargetEditions
## Convert Server Standard 2019 Evaluation to Server Standard 2019
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
## How To Activate
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato
@disler
disler / README.md
Last active January 8, 2025 03:04
Use Meta Prompting to rapidly generate results in the GenAI Age

Meta Prompting

In the Generative AI Age your ability to generate prompts is your ability to generate results.

Guide

Claude 3.5 Sonnet and o1 series models are recommended for meta prompting.

Replace {{user-input}} with your own input to generate prompts.

Use mp_*.txt as example user-inputs to see how to generate high quality prompts.

@aras-p
aras-p / SceneViewShowMips.shader
Last active January 8, 2025 03:03
Unity editor scene view "show mips" shader (as it is in 5.6 alpha)
/* C# code that sets up the mip colors texture:
s_MipColorsTexture = new Texture2D (32, 32, TextureFormat.RGBA32, true);
s_MipColorsTexture.hideFlags = HideFlags.HideAndDontSave;
Color[] colors = new Color[6];
colors[0] = new Color (0.0f, 0.0f, 1.0f, 0.8f);
colors[1] = new Color (0.0f, 0.5f, 1.0f, 0.4f);
colors[2] = new Color (1.0f, 1.0f, 1.0f, 0.0f); // optimal level
colors[3] = new Color (1.0f, 0.7f, 0.0f, 0.2f);
colors[4] = new Color (1.0f, 0.3f, 0.0f, 0.6f);
colors[5] = new Color (1.0f, 0.0f, 0.0f, 0.8f);
@yuanzhi-zhu
yuanzhi-zhu / self_attention.py
Created June 12, 2024 20:57
self attention with RoPE
"""
This code was originally obtained from:
https://github.com/meta-llama/codellama/blob/main/llama/model.py
adapted from https://github.com/naver-ai/rope-vit/blob/main/self-attn/rope_self_attn.py
"""
import torch
import torch.nn as nn
from functools import partial
import einops
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active January 8, 2025 03:02
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@spajak
spajak / IPv6.ps1
Last active January 8, 2025 03:02
Disable random IPv6 addresses and use SLAAC IPv6 (Windows 10)
# Disable random IPv6 addresses (but keep temporary addresses),
# and use SLAAC address as a preferred IPv6 address in Windows 10
# ------------------------------------------------------------------------------
# UseTemporaryAddresses
#
# Always. The computer always generates temporary addresses by using random numbers.
# Counter. The computer generates temporary addresses by using the interface identifier.
# You typically use this identifier for test purposes.
# Disabled. The computer does not use temporary addresses.
# !pip install torch transformers scikit-learn umap-learn matplotlib datasets joblib pandas zstandard
'''
Code outline:
1. Loading the pre-trained GPT-2 model and tokenizer.
2. Loading or downloading the dataset and saving it to disk with compression.
3. Collecting and normalizing activations from the middle layer of the model.
4. Training multiple SAEs with different feature sizes and saving them to disk.
5. Finding the feature that responds to the phrase "Golden Gate Bridge" in each SAE.
@dieu
dieu / Dockerfile
Last active January 8, 2025 03:01
Home Assistant Docker on Mac OS
FROM homeassistant/home-assistant:stable
# Install avahi-daemon in container
# https://gnanesh.me/avahi-docker-non-root.html
RUN set -ex \
&& apk --no-cache --no-progress add avahi avahi-tools dbus \
# Disable default Avahi services
&& rm /etc/avahi/services/* \
&& rm -rf /var/cache/apk/*
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 8, 2025 02:57
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference