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
| // ==UserScript== | |
| // @name Ryan's BIDMC OMR fix | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description CSS changes to make the page look nicer, add functionality | |
| // @author Ryan Neff, MS4. raneff@gmail.com | |
| // @match https://holmes.caregroup.org/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=caregroup.org | |
| // @grant MIT license | |
| // ==/UserScript== |
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
| import pandas | |
| import requests, json | |
| req = input("Please enter a URL:") | |
| network_obj = json.loads(requests.get(req).text) | |
| node_names = {i["@id"]:i["n"] for i in network_obj[3]["nodes"]} | |
| edges = network_obj[4]["edges"] | |
| edgeattr = network_obj[7]["edgeAttributes"] | |
| citations = {i["po"]:i["v"] for i in edgeattr if i["n"] == "citation"} | |
| directed = {i["po"]:i["v"] for i in edgeattr if i["n"] == "directed"} |
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
| #!pip install synapseclient | |
| import synapseclient, os | |
| from synapseclient import Project, Folder, File, Link | |
| syn = synapseclient.Synapse() | |
| def upload_files_create_folders(path=".",parent_id=""): | |
| """ upload_files_create_folders(path=".",parent_id="") | |
| Recursively uploads all files and folders to a Synapse Project or folder. | |
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: https://github.com/nfusi/qvalue | |
| ## edited to work in Python 3 by Ryan Neff, 4/19/18 | |
| import scipy as sp | |
| import numpy as np | |
| from scipy import interpolate | |
| def qvalue_estimate(pv, m=None, verbose=False, lowmem=False, pi0=None): | |
| """ | |
| Estimates q-values from p-values |
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
| import numpy as np | |
| import scipy as sp | |
| def acat_test(pvalues,weights=None): | |
| '''acat_test() | |
| Aggregated Cauchy Assocaition Test | |
| A p-value combination method using the Cauchy distribution. | |
| Inspired by: https://github.com/yaowuliu/ACAT/blob/master/R/ACAT.R | |
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
| import numpy as np | |
| import seaborn as sb | |
| import matplotlib.pyplot as plt | |
| import matplotlib as mpl | |
| from matplotlib.collections import PatchCollection | |
| #### heatmap_circle() | |
| ## | |
| ## Creates a heatmap of values, with size of the circle at a given (row,col) as a second dimension | |
| ## uses seaborn's clustermap to provide biclustering |
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/bash | |
| input_file=$1; | |
| if unzip -l "${input_file}" | grep ".tiff" | |
| then | |
| echo "tiffs found, converting..." | |
| unzip -q "${input_file}" -d test | |
| for i in test/ppt/media/*.tiff; do sips -s format png "${i}" --out "${i%tiff}png"; rm $i; done | |
| for i in test/ppt/slides/_rels/*.rels; do echo $i; sed -i -e 's/.tiff/.png/g' $i; done |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.