JupyterLab 3.3.2 on Binder
Forked from JupyterLab 3.3.1 on Binder and updated to 3.3.2.
Forked from JupyterLab 3.3.1 on Binder and updated to 3.3.2.
Gist title |
Try it on Binder!
RetroLab 0.3.13 featuring RTC with RetroLogo hidden to look more like the classic notebook, served on Binder
Based on RetroLab 0.3.2 on Binder where RTC works with RetroLab and then combined that with taking advantage of ability to hide the Retro_Logo use the Jupyter Logo to get something closer to the classic notebook where Real Time Colloaboration works. Idea is from here. Updated from version 0.3.2 to 0.3.13 (see releases here).
import difflib | |
from wasabi import color | |
def diff_strings(a, b): | |
output = [] | |
matcher = difflib.SequenceMatcher(None, a, b) | |
for opcode, a0, a1, b0, b1 in matcher.get_opcodes(): | |
if opcode == "equal": | |
output.append(a[a0:a1]) | |
elif opcode == "insert": |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
from matplotlib.lines import Line2D | |
my_palette = sns.color_palette("cubehelix", 3) | |
sns.set_palette(my_palette) | |
def legend_circles(labels, palette, loc=1, markersize=10, marker='o', padding=0): | |
"Make a legend where the color is indicated by a circle." |
# List unique values in a DataFrame column | |
df['Column Name'].unique() | |
# To extract a specific column (subset the dataframe), you can use [ ] (brackets) or attribute notation. | |
df.height | |
df['height'] | |
# are same thing!!! (from http://www.stephaniehicks.com/learnPython/pages/pandas.html | |
# -or- | |
# http://www.datacarpentry.org/python-ecology-lesson/02-index-slice-subset/) |
#!/usr/bin/env python | |
""" | |
Sequence-based structural alignment of two proteins. | |
""" | |
from __future__ import print_function, division | |
import argparse | |
import os |
""" Usage: python diff.py FILE1 FILE2 | |
A primitive `diff` in 50 lines of Python. | |
Explained here: http://pynash.org/2013/02/26/diff-in-50-lines.html | |
""" | |
def longest_matching_slice(a, a0, a1, b, b0, b1): | |
sa, sb, n = a0, b0, 0 | |
runs = {} |