Skip to content

Instantly share code, notes, and snippets.

View Zsailer's full-sized avatar

Zachary Sailer Zsailer

View GitHub Profile
@Zsailer
Zsailer / jupyter-dev-meeting-template.md
Last active October 30, 2018 20:40
Proposal for Jupyter Dev Meeting Redesign

Sub-teams

Here is a list of proposed sub-groups to give anouncements each meeting:

  1. Jupyter Core
  2. Jupyter Lab
  3. nteract
  4. Jupyterhub
  5. Binder
  6. IPython Core
@Zsailer
Zsailer / notes.md
Last active June 28, 2018 18:37
Notes for Bioinformatics Class
@Zsailer
Zsailer / main.py
Last active May 30, 2018 21:39
PhyloVega Example API
import phylovega as phy
tree = phy.Tree(data).encode(
nodes=[],
edges=[],
node_color=[],
edge_color=[],
@Zsailer
Zsailer / README.md
Created February 22, 2018 18:04
conda environment + jupyter kernel

Create conda environment.

conda create -n <kernel name> pip jupyter 

Activate environment.

source activate <kernel name>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Zsailer
Zsailer / flavor1.py
Last active January 29, 2018 17:16
post-1
import pandas as pd
import pandas_flavor as pf
@pf.registor_dataframe_method
def check_columns(df):
# Required columns
required_cols = {'x', 'y', 'z'}
# Find columns missing from
if required_cols.issubset(df.columns) is False:
@Zsailer
Zsailer / hide_single_cell.py
Last active July 10, 2023 15:41
Hide a single cell in Jupyter notebook
from IPython.display import HTML
from IPython.display import display
# Taken from https://stackoverflow.com/questions/31517194/how-to-hide-one-specific-cell-input-or-output-in-ipython-notebook
tag = HTML('''<script>
code_show=true;
function code_toggle() {
if (code_show){
$('div.cell.code_cell.rendered.selected div.input').hide();
} else {
@Zsailer
Zsailer / README.md
Last active August 3, 2017 23:21
Towards defining a tree JSON format

Towards defining a (phylogenetic) tree JSON Format

After a fair bit of digging, I was unable to find a single, defined JSON structure for phylogenetic data. With awesome visualization libraries (like D3) emerging, I think it is necessary to standardize a JSON grammar to allow libraries like DendroPy to access such visualizations.

In this document, I attempt to define this set of rules and grammar.

Metadata Keys

@Zsailer
Zsailer / README.md
Last active October 10, 2016 17:31
Proposal for D3 inspired JSON format for Dendropy's Tree Class

Dendropy's Tree class to JSON format

A proposed JSON format for Dendropy's Tree class. This is D3 inspired, and easily portable to all of D3's hierarchical visualization examples.

Example

For the following example, I'll use the simple string (taken from wikipedia) converted to a JSON format

(A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5)F;  
@Zsailer
Zsailer / discrete_cmap.py
Created August 18, 2016 17:31 — forked from jakevdp/discrete_cmap.py
Small utility to create a discrete matplotlib colormap
# By Jake VanderPlas
# License: BSD-style
import matplotlib.pyplot as plt
import numpy as np
def discrete_cmap(N, base_cmap=None):
"""Create an N-bin discrete colormap from the specified input map"""