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
var color_mapping = function(chain){ | |
var mapping = { | |
'A': '0xC0D0FF', | |
'B': '0xB0FFB0', | |
'C': '0xFFC0C8', | |
'D': '0xFFFF80', | |
'E': '0xFFC0FF', | |
'F': '0xB0F0F0', | |
'G': '0xFFD070', | |
'H': '0xF08080', |
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 perceptron_train(self, data): | |
errors = 0 | |
w = list() | |
w.append([0 for item in range(0, len(data[0][1]))]) | |
k = 0 | |
all_correct = True | |
while(1): | |
all_correct = True |
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 argparse import ArgumentParser | |
from collections import Counter | |
TRAIN_SET = str() | |
def main(): | |
features_vector = list() | |
vocabulary_counter = Counter() | |
bag_words = set() |
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_int = [[1, 2, 3], [1, 2, 3], [1, 4, 5, 6], [10], [1, 2], [1, 2], [1, 2], [1, 2], [1, 4, 5, 6], [10], [1]] | |
list_int_aux = [] | |
count = 0 | |
for sublist in list_int: | |
if sublist not in list_int_aux and list_int.count(sublist) > 1: | |
count += 1 | |
list_int_aux.append(sublist) |
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/python | |
# -*- coding: utf-8 -*- | |
import os | |
from Bio.PDB import PDBParser, PDBIO, Select | |
arquivos = [ f for f in os.listdir('.') if os.path.isfile(os.path.join('.',f)) ] | |
class ChainSelect(Select): | |
def __init__(self, chain): |
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
[{ "team": "Boston Celtics" },{ "team": "Dallas Mavericks" },{ "team": "Brooklyn Nets" },{ "team": "Houston Rockets" },{ "team": "New York Knicks" },{ "team": "Memphis Grizzlies" },{ "team": "Philadelphia 76ers" },{ "team": "New Orleans Hornets" },{ "team": "Toronto Raptors" },{ "team": "San Antonio Spurs" },{ "team": "Chicago Bulls" },{ "team": "Denver Nuggets" },{ "team": "Cleveland Cavaliers" },{ "team": "Minnesota Timberwolves" },{ "team": "Detroit Pistons" },{ "team": "Portland Trail Blazers" },{ "team": "Indiana Pacers" },{ "team": "Oklahoma City Thunder" },{ "team": "Milwaukee Bucks" },{ "team": "Utah Jazz" },{ "team": "Atlanta Hawks" },{ "team": "Golden State Warriors" },{ "team": "Charlotte Bobcats" },{ "team": "Los Angeles Clippers" },{ "team": "Miami Heat" },{ "team": "Los Angeles Lakers" },{ "team": "Orlando Magic" },{ "team": "Phoenix Suns" },{ "team": "Washington Wizards" },{ "team": "Sacramento Kings" }] |
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
[{ "team": "New Jersey Devils" },{ "team": "New York Islanders" },{ "team": "New York Rangers" },{ "team": "Philadelphia Flyers" },{ "team": "Pittsburgh Penguins" },{ "team": "Chicago Blackhawks" },{ "team": "Columbus Blue Jackets" },{ "team": "Detroit Red Wings" },{ "team": "Nashville Predators" },{ "team": "St. Louis Blues" },{ "team": "Boston Bruins" },{ "team": "Buffalo Sabres" },{ "team": "Montreal Canadiens" },{ "team": "Ottawa Senators" },{ "team": "Toronto Maple Leafs" },{ "team": "Calgary Flames" },{ "team": "Colorado Avalanche" },{ "team": "Edmonton Oilers" },{ "team": "Minnesota Wild" },{ "team": "Vancouver Canucks" },{ "team": "Carolina Hurricanes" },{ "team": "Florida Panthers" },{ "team": "Tampa Bay Lightning" },{ "team": "Washington Capitals" },{ "team": "Winnipeg Jets" },{ "team": "Anaheim Ducks" },{ "team": "Dallas Stars" },{ "team": "Los Angeles Kings" },{ "team": "Phoenix Coyotes" },{ "team": "San Jose Sharks" }] |
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
<style type="text/css"> | |
.cal_Theme1 .ajax__calendar_container | |
{ | |
background-color: #e2e2e2; | |
border: solid 1px #cccccc; | |
} | |
.cal_Theme1 .ajax__calendar_header | |
{ | |
background-color: #ffffff; | |
margin-bottom: 4px; |
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
assert world.aux.find_link_by_text('perfect/index.php/publiccastings/') | |
answer_url = world.aux.find_link_by_partial_text('perfect/index.php/publiccastings') | |
time.sleep(2) | |
world.aux.quit() | |
time.sleep(1.5) | |
world.aux1 = Browser('chrome') | |
world.aux1.visit(answer_url) | |
assert True |
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
#################### SET MANNEQUINS ######################### | |
@step(u'E devo selecionar alguns modelos para este evento') | |
def e_devo_selecionar_alguns_modelos_para_este_evento(step): | |
assert world.browser.find_by_css('a.btn_on_footer') | |
world.browser.find_by_css('a.btn_on_footer').click() | |
select_models('carlos') | |
def select_models(x): | |
world.browser.execute_script('$("iframe:last").attr("id","iframeModelsSelect")') | |
with world.browser.get_iframe("iframeModelsSelect") as iframe: |