This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defpackage :python-interpreter | |
(:use :common-lisp :cffi) | |
(:export #:run-python)) | |
(in-package :python-interpreter) | |
(define-foreign-library libpython (:unix "libpython3.10.so")) | |
(use-foreign-library libpython) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import ABC, abstractmethod | |
from typing import Optional | |
import numpy as np | |
from diffusion_maps import diffusion_maps | |
from mapping import Mapping | |
class Embedding(ABC): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libview/ev-view.c b/libview/ev-view.c | |
index 1ffbf16..079cfd0 100644 | |
--- a/libview/ev-view.c | |
+++ b/libview/ev-view.c | |
@@ -8616,7 +8616,7 @@ ev_view_change_page (EvView *view, | |
gint x, y; | |
view->current_page = new_page; | |
- view->pending_scroll = SCROLL_TO_PAGE_POSITION; | |
+ view->pending_scroll = SCROLL_TO_KEEP_POSITION; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Numerically reparameterize a curve by its arc-length. | |
""" | |
from typing import Optional | |
import numpy as np | |
import scipy | |
import scipy.interpolate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# -ge 1 ]; then | |
bibtex_file=$1 | |
else | |
bibtex_file="bibliography.bib" | |
fi | |
awk -F "[{,]" '/^@/ { print $2 }' $bibtex_file \ | |
| while read reference; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from joblib import Parallel, delayed | |
import numpy as np | |
n = 10000 # Number of experiments | |
dt: float = 1e-5 # Time step length | |
def integrate_until_exit(random_seed): | |
np.random.seed(random_seed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
BEGIN { | |
num_atoms = 0; | |
if (ARGC < 3) { | |
print "Usage: plot-contact-map.awk PDBFILE THRESHOLD" > "/dev/stderr"; | |
error_exit = 1; | |
exit 1; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
BEGIN { | |
gnuplot = "gnuplot -p"; | |
print "set terminal wxt noraise" | gnuplot; | |
print "set view equal xyz" | gnuplot; | |
print "set linetype 1 linecolor palette z linewidth 5" | gnuplot; | |
print "unset tics" | gnuplot; | |
print "unset border" | gnuplot; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Quick and dirty sampling of small rotation matrices.""" | |
import numpy as np | |
from scipy.linalg import expm | |
from scipy.spatial.transform import Rotation | |
n: int = 3 # Dimensions | |
epsilon: float = 1e-2 # Amplitude of the rotation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//$fn = 90; | |
diameter = 30.5; | |
spacing = 2; | |
width = 4 * spacing + 3 * diameter; | |
depth = 2 * spacing + diameter; | |
height = 20 + spacing; | |
difference() { | |
scale([0.94, 0.85, 1]) |
NewerOlder