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/env python | |
def write_batch_scripts(template, placeholder, batch_file): | |
""" | |
converts a template qub submission script and a batch output file produced | |
by cellprofiler to multiple consecutively numbered submission scripts | |
arguments: | |
---------- |
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 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
#include <iostream> | |
#include <string> | |
using namespace std; | |
// convert DNA to RNA | |
int main() | |
{ | |
string s; | |
// take DNA string as input from stdin | |
cin >> s; | |
char n; // current nucleotide |
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
#include <Rcpp.h> | |
using namespace Rcpp; | |
// cosine distance between two vectors | |
double cosv(NumericVector a, NumericVector b) | |
{ | |
double theta; | |
theta = sum(a * b) / sqrt(sum(pow(a, 2)) * sum(pow(b, 2))); | |
return theta; |
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
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
//define variable s as DNA string | |
string s; | |
// get input from stdin |
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 sklearn.metrics import confusion_matrix | |
import numpy as np | |
cm = confusion_matrix(y_test, predictions) | |
# normalise confusion matrix for diff sized groups | |
cm_norm = cm.astype("float") / cm.sum(axis=1)[:, np.newaxis] | |
# plot confusion matrix | |
plt.figure(figsize=(8,6)) | |
plt.imshow(cm_norm, interpolation='nearest', cmap=plt.cm.Blues) |
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.