Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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, itertools, functools, operator | |
def matrix_exp(A, num_iters=100): | |
inv_facs = itertools.accumulate(range(1,num_iters+1), operator.mul, initial=1) | |
As = itertools.accumulate(range(num_iters), lambda Ap, _: np.dot(Ap, A), initial=A) | |
return sum(1. / inv_fac * A for inv_fac, A in zip(inv_facs, As)) |
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
use std::{ | |
cell::RefCell, | |
ops::{Add, Mul, Neg}, | |
rc::Rc, | |
}; | |
#[derive(Debug, Clone)] | |
struct Var { | |
inner: VarInnerRef, | |
} |
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
#!/usr/bin/bash | |
# This is a short script that uses a NON-STANDARD version of mmseqs2 | |
# to extract Neff scores from a profile. | |
# | |
# Please set the MMSEQS and REFORMAT enviroment variables to point to the | |
# respective executables! Otherwise, this script will try to use default | |
# parameters and fail ungracefully. | |
# | |
# This script takes MSAs in .a3m format as input and produces a file |
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
#!/usr/bin/env python3 | |
"""pick k random files from a directory that lay within a given size range""" | |
import os | |
import random | |
import sys | |
if len(sys.argv) != 2: | |
print(f"usage: {sys.argv[0]} dirname") |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int main(int ArgCount, char **Args) | |
{ | |
char *Pattern = "ababcabab"; | |
char *Text = "abababcbababcababcab"; | |
size_t PatternLength = strlen(Pattern); |