Forked from JupyterLab 3.3.1 on Binder and updated to 3.3.2.
This file contains 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
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).
This file contains 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 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": |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 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." |
This file contains 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
# 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/) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder