Skip to content

Instantly share code, notes, and snippets.

View jackparmer's full-sized avatar
🐢

Jack Parmer jackparmer

🐢
View GitHub Profile
@jackparmer
jackparmer / duluth_plotly_theme.json
Created January 26, 2018 01:07
duluth_plotly_theme.json
{
"name": "Duluth",
"reference": {
"marker.color":
["rgb(0,116,217)",
"rgb(255,65,54)",
"rgb(133,20,75)",
"rgb(255,133,27)",
"rgb(255,220,0)",
"rgb(61,153,112)"],
import dash
import dash_core_components as dcc
import dash_html_components as html
import os
import dash_table_experiments
import pandas as pd
import numpy as np
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jackparmer
jackparmer / brain.m
Created August 31, 2017 15:50
Make a 3d brain in plotly
%% generate figure (depends on having https://github.com/edden-gerber/ecog_fmri_visualization_matlab in your MATLAB path)
load('demo_data');
brain_fig = plot_mesh_brain(brain_data.pial_right);
brain_data = get(gca, 'Children');
%% extract brain data from figure
% handle vertices
x_data = brain_data(2).Vertices(:,1);
y_data = brain_data(2).Vertices(:,2);
from dash.react import Dash
from flask import Flask
import finsymbols
import colorlover as cl
from dash_core_components import Graph, Dropdown, Input, Slider
import dash_html_components as html
import datetime as dt
import itertools
import json
import os
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
,NAME,PAGE,IMG_URL,LOGP,PKA,MW,FORM,SOL,DESC
0,Cyclacillin,https://www.drugbank.ca/drugs/DB01000,"<img src=""https://www.drugbank.ca/structures/DB01000/thumb.svg""></img>",1.31,3.3,341.426,C15H23N3O4S,1.9 mg/ml,A cyclohexylamido analog of penicillanic acid. [PubChem]
1,Salbutamol,https://www.drugbank.ca/drugs/DB01001,"<img src=""https://www.drugbank.ca/structures/DB01001/thumb.svg""></img>",1.4,10.12,239.3107,C13H21NO3,2.15 mg/ml,"Salbutamol is a short-acting, selective beta2-adrenergic receptor agonist used in the treatment of asthma and COPD. It is 29 times more selective for beta2 receptors than beta1 receptors giving it higher specificity for pulmonary beta receptors versus beta1-adrenergic receptors located in the heart. Salbutamol is formulated as a racemic mixture of the R- and S-isomers. The R-isomer has 150 times greater affinity for the beta2-receptor than the S-isomer and the S-isomer has been associated with toxicity. This lead to the development of levalbuterol, the single R-isomer of salbutamol.
%% generate figure (depends on having https://github.com/edden-gerber/ecog_fmri_visualization_matlab in your MATLAB path)
load('demo_data');
brain_fig = plot_mesh_brain(brain_data.pial_right);
brain_data = get(gca, 'Children');
%% extract brain data from figure
% handle vertices
x_data = brain_data(2).Vertices(:,1);
y_data = brain_data(2).Vertices(:,2);