This file contains 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
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v3.4.0 | |
hooks: | |
- id: trailing-whitespace | |
exclude: ^tests/resources/ | |
- id: end-of-file-fixer | |
exclude: ^tests/resources/ | |
- id: check-yaml |
This file contains 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
PY=python3 | |
all: | |
find data -name "*.txt" | ${PY} test.py | |
data: | |
mkdir -p data | |
for x in `seq 1 150`; do echo $$x; ./generate_password.sh > data/$$x.txt; done |
This file contains 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
import multiprocessing as mp | |
workers = mp.cpu_count() | |
multithread = False | |
if multithread: | |
workers /= 2 | |
def submit_molecule(mol): |
This file contains 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
import numpy as np | |
from scipy.interpolate import interp1d | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
def interpnjck(q, qi, a, method="linear"): | |
# Warning: |
This file contains 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
files=("$@") | |
reverse() { | |
# first argument is the array to reverse | |
# second is the output array | |
declare -n arr="$1" rev="$2" | |
for i in "${arr[@]}" | |
do | |
rev=("$i" "${rev[@]}") |
This file contains 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
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. |
This file contains 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
import numpy as np | |
from rdkit import Chem | |
# examples | |
# C=[NH+]C | |
component = "C=[NH+]" | |
component = "[NH+]C" | |
# C[S+](C)C | |
component = "C[S+]" |
This file contains 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
44 | |
structure 44 | |
N 3.43546000 -1.39128000 0.03454000 | |
C 3.05470000 -0.12617000 -0.19176000 | |
C 1.76133000 0.17977000 -0.62198000 | |
C 0.76863000 -0.81576000 -0.78890000 | |
C -0.65327000 -0.34931000 -1.22433000 | |
O 0.90556000 -2.03611000 -0.62312000 | |
C -1.70339000 -0.50569000 -0.07676000 | |
C -3.06562000 0.24255000 -0.29363000 |
This file contains 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
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/*"] |
This file contains 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 builtins import range | |
print(type(range(0))) |
NewerOlder