Skip to content

Instantly share code, notes, and snippets.

@jacksonthall22
jacksonthall22 / main.py
Last active April 24, 2024 18:34
Encoding position using occupancy and a mapping of piece triplets
from typing import Iterable
import itertools
import chess
pieces = [chess.Piece(p_type, c) for c in chess.COLORS for p_type in chess.PIECE_TYPES]
NUM_PIECES_IN_GROUP = 3
groups = list(itertools.product(pieces, repeat=NUM_PIECES_IN_GROUP))
BINARY_WIDTH = (len(groups) - 1).bit_length()
{ pkgs, lib, config, ... }: with lib.types;
let
postgresqlInstanceType = submodule {
options.connectionString = lib.mkOption {
type = str;
};
};
@xeoncross
xeoncross / Positive-Adjective-List.txt
Created February 23, 2016 19:19
Positive Adjective List
Positive Adjective List
abundant
accessible
accommodative
accomplished
accurate
achievable
adaptable
adaptive
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active April 24, 2024 18:32
crack activate Office on mac with license file
@dghubble
dghubble / kubeception.md
Last active April 24, 2024 18:29
Running QEMU/KVM and Nested Kubernetes on Bare-Metal Kubernetes
@hwayne
hwayne / Intro.md
Last active April 24, 2024 18:27
Securedrop TLA+ specification review

People who take my TLA+ Class get a free specification review. Cory Myers asked for a review of his Reply.tla spec, reproduced from the PR below, and has graciously agreed to let me make it public. The review itself is here.

Note this is a "light" review: I'm looking for general TLA+ antipatterns and techniques that don't require me to deeply understand the problem domain. This represents about an hour of review.

@BrokenGabe
BrokenGabe / gist:51d55a11c2090d9402e40f12a6ece275
Created December 12, 2023 15:04
uBlock Origin "My Filters"
www.youtube.com###donation-shelf
www.youtube.com##ytd-reel-shelf-renderer.ytd-item-section-renderer.style-scope
www.youtube.com##+js(set, yt.config_.EXPERIMENT_FLAGS.service_worker_enabled, false)
www.youtube.com##+js(nano-stb, resolve(1), *, 0.001)
||googlevideo.com/videoplayback$xhr,3p,method=get,domain=www.youtube.com
@kacperlukawski
kacperlukawski / qdrant-0.10-multiple-vectors.ipynb
Last active April 24, 2024 18:22
Using multiple vectors in Qdrant 0.10
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@conormm
conormm / r-to-python-data-wrangling-basics.md
Last active April 24, 2024 18:22
R to Python: Data wrangling with dplyr and pandas

R to python data wrangling snippets

The dplyr package in R makes data wrangling significantly easier. The beauty of dplyr is that, by design, the options available are limited. Specifically, a set of key verbs form the core of the package. Using these verbs you can solve a wide range of data problems effectively in a shorter timeframe. Whilse transitioning to Python I have greatly missed the ease with which I can think through and solve problems using dplyr in R. The purpose of this document is to demonstrate how to execute the key dplyr verbs when manipulating data using Python (with the pandas package).

dplyr is organised around six key verbs:

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 24, 2024 18:21
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example