This file contains hidden or 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
#fasta file to dictionary | |
import pandas as pd | |
import argparse | |
from Bio import SeqIO | |
# make a parser so we can pass things in from command line | |
parser = argparse.ArgumentParser( | |
prog = "Name of the program", | |
description = "What the program does", | |
epilog = "Text at the bottom of help") |
This file contains hidden or 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
from Bio import SeqIO | |
def fasta_search(fastas, target): | |
""" | |
Search for a sequence motif in multiple FASTA records. | |
Args: fastas - SeqIO iterable | |
target - the sequence name to find (string) | |
Returns: Nothing. |
This file contains hidden or 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
#latest first | |
create REPONAME on github | |
mkdir REPONAME | |
cd REPONAME | |
git init | |
hugo new site site-build | |
cp -r ../data-vis-with-streamlit/site-build/content site-build | |
cp -r ../data-vis-with-streamlit/site-build/themes/LoveIt_local site-build/themes |
This file contains hidden or 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
spec_dict = { | |
"A": "dog", | |
"B": "parrot", | |
"C": "algae", | |
"D": "trilobite", | |
"E": "apple", | |
"F": "dugong", | |
"G": "placozoa"} |
This file contains hidden or 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
((B:0.2,(C:0.3,D:0.4)E:0.5)F:0.1)A; |
This file contains hidden or 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
#~ standard library imports | |
import sys | |
import re | |
#~ local file import (the dict of codes:species) | |
try: | |
import species_dict | |
except Exception as e: | |
print(f"You'll need your codes:species dict here, named \"species_dict.py\"\n" | |
f"or there is an issue: {e}") |
This file contains hidden or 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
CRIM | ZN | INDUS | CHAS | NOX | RM | AGE | DIS | RAD | TAX | PTRATIO | BK | LSTAT | MEDV | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0.00632 | 18.00 | 2.310 | 0 | 0.5380 | 6.5750 | 65.20 | 4.0900 | 1 | 296.0 | 15.30 | 396.90 | 4.98 | 24.00 | |
0.02731 | 0.00 | 7.070 | 0 | 0.4690 | 6.4210 | 78.90 | 4.9671 | 2 | 242.0 | 17.80 | 396.90 | 9.14 | 21.60 | |
0.02729 | 0.00 | 7.070 | 0 | 0.4690 | 7.1850 | 61.10 | 4.9671 | 2 | 242.0 | 17.80 | 392.83 | 4.03 | 34.70 | |
0.03237 | 0.00 | 2.180 | 0 | 0.4580 | 6.9980 | 45.80 | 6.0622 | 3 | 222.0 | 18.70 | 394.63 | 2.94 | 33.40 | |
0.06905 | 0.00 | 2.180 | 0 | 0.4580 | 7.1470 | 54.20 | 6.0622 | 3 | 222.0 | 18.70 | 396.90 | 5.33 | 36.20 | |
0.02985 | 0.00 | 2.180 | 0 | 0.4580 | 6.4300 | 58.70 | 6.0622 | 3 | 222.0 | 18.70 | 394.12 | 5.21 | 28.70 | |
0.08829 | 12.50 | 7.870 | 0 | 0.5240 | 6.0120 | 66.60 | 5.5605 | 5 | 311.0 | 15.20 | 395.60 | 12.43 | 22.90 | |
0.14455 | 12.50 | 7.870 | 0 | 0.5240 | 6.1720 | 96.10 | 5.9505 | 5 | 311.0 | 15.20 | 396.90 | 19.15 | 27.10 | |
0.21124 | 12.50 | 7.870 | 0 | 0.5240 | 5.6310 | 100.00 | 6.0821 | 5 | 311.0 | 15.20 | 386.63 | 29.93 | 16.50 |
This file contains hidden or 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 something | |
def bobble(); | |
print("ah") | |
This file contains hidden or 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
# hello, this is gist, where snippets of code can be shared | |
# without needing a full repository. | |
# here is an example of a gist :) | |
# chunks splits the screen_name list into manageable blocks: | |
def chunks(a_list, length_of_chunk): | |
# For item i in a range that is a length of a_list, | |
for i in range(0, len(a_list), length_of_chunk): |