Skip to content

Instantly share code, notes, and snippets.

View charnley's full-sized avatar
😎
make fun

Jimmy C. Kromann charnley

😎
make fun
View GitHub Profile
@charnley
charnley / kpca.py
Created October 18, 2018 09:19 — forked from andersx/kpca.py
Kernel PCA for QML kernels (ndarray)
import numpy as np
import scipy
def kpca(K, n=2, centering=True):
assert K.shape[0] == K.shape[1], "Square matrix required for Kernel PCA."
assert np.allclose(K, K.T, atol=1e-8), "Symmetric matrix required for Kernel PCA."
# First center kernel.
@charnley
charnley / cVim.conf
Last active October 25, 2018 14:01 — forked from pgericson/cVim.conf
cVim config
map <Leader>pt :pintab<CR>
map <Leader>ut :unpintab<CR>
set noautofocus
let mapleader = ","
let hintcharacters = "sadfjklewcmpgh"
site '*://(soundcloud|(hangouts|mail|inbox|calendar).google|*\.todoist.|*\.messenger).com/*' {
call :pintab
}
let blacklists = ["http://regiosqm.org/*","https://www.messenger.com/*","https://mail.google.com/*","https://drive.google.com/*","http://localhost/*","http://hackertyper.com/*"]
@charnley
charnley / doi2bib.sh
Created April 18, 2016 11:22 — forked from mlund/doi2bib.sh
Convert Digital Object Identifier (DOI) to BibTeX using crosscite.org
#!/bin/bash
curl -LH "Accept: application/x-bibtex;q=1" http://dx.doi.org/$1
echo