Skip to content

Instantly share code, notes, and snippets.

@ypresto
ypresto / prepare-gentoo-prefix-macosx.sh
Created March 21, 2012 07:40
Gentoo prefix installation on Mac OS X
#!/usr/bin/bash
# Gentoo prefix installation on Mac OS X (Mar. 2012)
# This script may be outdated soon.
# Please refer: http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml
export EPREFIX="$HOME/gentoo"
export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:$PATH"
curl -o bootstrap-prefix.sh 'http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/scripts/bootstrap-prefix.sh?format=txt'
@paniq
paniq / shadow_chess.md
Last active September 17, 2019 15:31
Shadow Chess

Shadow Chess

Version 1 (2017/11/15) by @TetroniMike and @paniq

Beware: This is an alpha version. The rules are completely untested.

Shadow Chess (also known as Quantum Chess, Imaginary Chess or M.A.D. Chess) works like regular chess, but with additional rules that are designed to produce new strategical opportunities and interesting outcomes:

@tomaka
tomaka / gist:623781c5af6ebbc5dcfe
Last active February 15, 2020 06:24
Gfx vs glium comparison table
Gfx and glium are Rust libraries that aim to provide a "rusty" abstraction over graphics programming APIs.
Both may look similar, and one of the questions that gets asked frequently on IRC is "what are the differences between gfx and glium?". Here is a comparison table:
| Gfx | Glium
-------------------------------------|-------------------------------------------------------------------------------------------------------------------|--------------------------------
URL | <https://github.com/gfx-rs/gfx-rs> | <https://github.com/tomaka/glium>
History | Papers since Oct 2013. Really started in June 2014. | Private/confidential from Feb 201
@lyldev
lyldev / Eigen Cheat sheet
Created March 30, 2020 11:34 — forked from gocarlos/Eigen Cheat sheet
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
@amaarora
amaarora / TTP-benchmark.ipynb
Last active January 13, 2021 06:16
aman_arora/git/pytorch-image-models/notebooks/TTP-benchmark.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
python build/build.py --enable_cuda True --cuda_path $EBROOTCUDA --cudnn_path $EBROOTCUDNN --cuda_compute_capabilities "7.0,7.5,8.0"
_ _ __ __
| | / \ \ \/ /
_ | |/ _ \ \ /
| |_| / ___ \/ \
\___/_/ \/_/\_\
Starting local Bazel server and connecting to it...
JJNEERCFKNBUUR2SINDESU2DJJGEESSUJVHEWRKKIZDVMTKOINEUSNBSIRDVKMSOJFMVURKHJZBFKSKSJFCTEVKTKZFTKQSVLFLEGRKKLEZFMT2VLJLUYSSHIZFVIU2DJNLEYVKPK5FU2SSWIRDE2VSLJBEU4TKUI5KEGT2JLJGUKT2UGJGUUUSFIU3FMU2WJM2UKVSVKNJU6SSWINLE6V2DKZFUCWSVJFKFEVSHJJGUKQ2NLJKEUNKFIZGVEU2HJFDEWVKFKZJUQSS2IVCUSVKKGVEFKNSRHU6T2PI=
@dacarlin
dacarlin / human_disease_enzymes.md
Last active December 4, 2021 11:21
Human diseases caused by point mutations in genes encoding enzymes
@townsean
townsean / pixel-color-count.py
Created October 9, 2019 08:52
Gets a sum of pixels per unique color
# pixel-color-count.py - Gets a sum of pixels per unique color
# maintainer - Ashley Grenon @townsean
import argparse
try:
from PIL import Image
except ImportError:
exit("This script requires the PIL module. Install with pip install Pillow")
try:
@khayrov
khayrov / serialize.py
Last active January 26, 2022 02:17
Serializable transactions and retry in SQLAlchemy
from sqlalchemy import (create_engine, event,
Column, Integer,
ForeignKey)
from sqlalchemy import event
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declarative_base, declared_attr
from sqlalchemy.exc import DBAPIError
import sqlite3