Skip to content

Instantly share code, notes, and snippets.

Alexander Lenail zfrenchee

Block or report user

Report or block zfrenchee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View NetReg3.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Is_Anything_Real.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View SPAMS.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View NetReg2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View NetReg.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View d3-dataframe.js
matrix = {
values: [[1, 2], [3, 4]], // sorted row-wise by default
rows_iter: function () { return this.values },
columns_iter: function () { return iterator_over_the_transpose_of(this.values) },
flat_rows_iter: function () { return iterator_over_flattened(this.values) },
flat_columns_iter: function () { return iterator_over_the_flattened_transpose_of(this.values) },
View DefaultDict.js
var DefaultDict = (initValue) => new Proxy({}, {
get: (target, name) => name in target ? target[name] :
(target[name] = (typeof initValue === 'function' ? initValue() : initValue))
});
statistics = DefaultDict(() => DefaultDict(() => DefaultDict(0)));
// Thanks @jonathanzong!
View GOrilla.js
var form = document.createElement('form');
form.setAttribute('method', 'post');
form.setAttribute('action', 'http://cbl-gorilla.cs.technion.ac.il/servlet/GOrilla');
form.setAttribute('target', '_blank');
form.setAttribute('enctype', 'multipart/form-data');
var application_field = document.createElement('input');
application_field.setAttribute("type", "hidden");
application_field.setAttribute("name", "application");
application_field.setAttribute("value", "gorilla");
View pickle_functions.py
def save_as_pickled_object(obj, output_dir, filename):
"""
This is a defensive way to write pickle.write, allowing for very large files on all platforms
"""
filepath = os.path.join(output_dir, filename)
max_bytes = 2**31 - 1
bytes_out = pickle.dumps(obj)
n_bytes = sys.getsizeof(bytes_out)
with open(filepath, 'wb') as f_out:
for idx in range(0, n_bytes, max_bytes):
View analyze_gene_clusters_enrichr.py
import pdb
import pandas as pd
import os
import json
import requests
from argparse import ArgumentParser
ENRICHR_ADDLIST = 'http://amp.pharm.mssm.edu/Enrichr/addList'
ENRICHR_EXPORT = 'http://amp.pharm.mssm.edu/Enrichr/export'
DATABASES =['KEGG_2016', 'Reactome_2016', 'BioCarta_2016']
You can’t perform that action at this time.