-
Go to my fork of the VPython Binder repository in your browser.
-
That will take you to a new page and trigger deploying version of the jupyter notebook environment from the correct repository. You shouldn't need to do anything as this takes place; you can watch the progress bar roughly in the middle of the screen, just below the
Launch
button. It may take about a minute. After it boots up, it should bring you to the dashboard that will look like below
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/) |
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
# | |
sudo su - | |
cd /usr/local/bin | |
mkdir ffmpeg | |
cd ffmpeg | |
wget https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-4.2.1-amd64-static.tar.xz | |
tar xvf ffmpeg-4.2.1-amd64-static.tar.xz |
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 os | |
from functools import lru_cache | |
from collections import defaultdict | |
# Read in the taxonomy | |
class NCBITaxonomy(): | |
def __init__(self, folder): | |
self.tax = defaultdict(dict) | |
# Read in the file of taxid information | |
names_fp = os.path.join(folder, 'names.dmp') |
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
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { | |
if (p < 0.5) | |
return 0.5 * pow(2*p, g); |
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.
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
%matplotlib notebook | |
# use `%matplotlib notebook` if you are using current JupyterLab | |
from vpython import * | |
import matplotlib.pyplot as plt | |
plt.style.use('ggplot') | |
# based on "AtomicSolid" by Bruce Sherwood | |
# adapted to include realtime matplotlib by Wayne Decatur |
- Go to VPython.org in your browser. The landing page will look like below.
-
Click on
Binder package
link on that page. That link is near the very bottom of the part of the page that is showing above; it is just below Demo Programs. -
A notebook will then launch. (Sometimes first times they hang, just hit
reload
in your browser.)
After it loads fully it will look like below with a URL different from what you see but similar.
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
#!/usr/bin/env python | |
"""Sequence-based structural alignment of two proteins.""" | |
import argparse | |
import pathlib | |
from Bio.PDB import FastMMCIFParser, MMCIFIO, PDBParser, PDBIO, Superimposer | |
from Bio.PDB.Polypeptide import is_aa |