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
from Bio.Seq import Seq | |
from Bio import Entrez | |
from Bio import pairwise2 | |
from Bio.Align import substitution_matrices | |
from Bio.pairwise2 import format_alignment | |
Entrez.email = "<hidden @ mail>" | |
blosum62 = substitution_matrices.load("BLOSUM62") | |
def get_protein_sequence(id: str) -> str: |
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
<h1> Copy and paste your html code here </h1> |
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
# tonight we went over how to solve fizzbuzz | |
# see if you can try to improve our solution. | |
numbers = (1..100) # [1, 2, 3, 4, 5, 6 .. 100] | |
numbers.each do |number| | |
if number % 5 == 0 && number % 3 == 0 | |
puts "FizzBuzz" | |
elsif number % 5 == 0 | |
puts "Buzz" | |
elsif number % 3 == 0 |
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
# STRINGS | |
# # we can use double quotes | |
puts "This is a string." | |
# # or we can use single quotes | |
puts 'This is a string with single quotes.' | |
# # adding two strings together | |
puts 'Hello, ' + "Maggie." | |
#INTEGER | |
#we can add them |
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
class Board | |
attr_reader :spaces, :name, :board_example, :num_to_words | |
attr_accessor :view | |
def initialize | |
@spaces = { | |
:one => EMPTY, | |
:two => EMPTY, | |
:three => EMPTY, | |
:four => EMPTY, |
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
def create_ceasar_cipher(phrase, key) | |
letters = phrase.scan(/./) | |
new_phrase = [] | |
letters.each do |letter| | |
num = letter.ord | |
num += key | |
new_letter = num.chr | |
new_phrase << new_letter |
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
puts "How much do you want to spend on pop bottles?" | |
cost = gets.chomp.to_i | |
@invest = cost / 2 | |
def bottle_pop(bottles, caps_recycled, empties_recycled, caps, empties) | |
@bottles = bottles | |
@caps_recycled_total = caps_recycled | |
@empties_recycled_total = empties_recycled | |
@caps = caps | |
@empties = empties |
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
problem one | |
write three functions that compute the sum of the numbers in a given list | |
using a: | |
for loop | |
def sum(num1, num2, num3) | |
numbers = [num1, num2, num3] | |
total_sum = 0 | |
for num in numbers | |
total_sum += num |
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
class Players | |
attr_accessor :lives | |
attr_reader :player_name | |
def initialize (player_name) | |
@player_name = player_name | |
@lives = 3 | |
end | |
def print_greeting |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |