Skip to content

Instantly share code, notes, and snippets.

View matthewcarbone's full-sized avatar
🏠
Working from home

Matthew Carbone matthewcarbone

🏠
Working from home
View GitHub Profile
@stefanv
stefanv / install-deps
Last active November 4, 2023 21:45
Install build or other dependencies from pyproject.toml
#!/usr/bin/env python
import tomllib
import argparse
import sys
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument(
@danielballan
danielballan / README.md
Created November 21, 2022 14:45
Writing data into Tiled experimental sandbox
conda activate sandbox
pip install --pre tiled[all] databroker[all] ipython

Note for Mac: Mac uses zsh by default and it requires single quotes like 'databroker[all]'. On the other hand, Windows requires that you not have quotes.

mkdir sandbox
cd sandbox/
@webinista
webinista / pelicanconf.py
Last active May 28, 2024 04:08
A Pelican configuration for having a home page and blog index or landing page.
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# --------------------------------------
# Now compatible with Pelican 4.0.x!
# --------------------------------------
# Added by me
import time
#Author: Christopher J. Wright
# Modified by Shuyue
# Hashing out "bad keys" that generare errors. Checked that they are not functional and that they don't exist in rcParams. There are also many other keys here that aren't doing anything in the test figures so far. We need to check the newst rcParam sheet. The figure.dpi setting is useful.
lines.linestyle : -
lines.marker : None
# lines.linewidth : 2.0
# lines.markersize : 5
lines.linewidth : 1.5 # manuscripture
lines.markersize : 5.3 # manuscripture
@gocarlos
gocarlos / Eigen Cheat sheet
Last active May 31, 2024 18:30
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.
@mrkwjc
mrkwjc / cuspsolve.py
Last active November 28, 2022 09:49
CUDA vs. CPU sparse solver in Python
# ### Interface cuSOLVER PyCUDA
from __future__ import print_function
import pycuda.gpuarray as gpuarray
import pycuda.driver as cuda
import pycuda.autoinit
import numpy as np
import scipy.sparse as sp
import ctypes
@thriveth
thriveth / CBcolors.py
Created January 22, 2014 14:52
A color blind/friendly color cycle for Matplotlib line plots. Might want to shuffle it around a bit more,but already not it gives kinda good contrasts between subsequent colors, and shows reasonably well in colorblind filters (though not in pure monochrome).
CB_color_cycle = ['#377eb8', '#ff7f00', '#4daf4a',
'#f781bf', '#a65628', '#984ea3',
'#999999', '#e41a1c', '#dede00']
@greglandrum
greglandrum / RecapAndBricsTutorial.ipynb
Created November 15, 2012 04:20
RDKit BRICS and RECAP Tutorial
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.