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
    
  
  
    
  | class VideoFile(): | |
| def __init__(self, filename): | |
| self.filename = filename | |
| def getFile(self): | |
| return self.filename | |
| def setFile(self, filename): | |
| self.filename = filename | 
  
    
      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 abc | |
| class Objeto(object): | |
| __metaclass__ = abc.ABCMeta | |
| def __init__(self,nome): | |
| self.nome = nome | |
  
    
      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
    
  
  
    
  | class Cliente: | |
| def __init__(self,conta,nome,valor): | |
| self.__conta = conta | |
| self.__nome = nome | |
| self.__valor = valor | |
| def setConta(self,conta): | |
| self.__conta = conta | 
  
    
      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
    
  
  
    
  | class ReusablePool: | |
| def __init__(self, size): | |
| self._reusables = [Credential() for _ in range(size)] | |
| def acquire(self): | |
| return self._reusables.pop() | |
| def release(self, reusable): | |
| self._reusables.append(reusable) | 
  
    
      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
    
  
  
    
  | class Singleton: | |
| __unico = None | |
| __nomeBanco = "Banco" | |
| __dado = "" | |
| def setBanco(self, banco): | |
| Singleton.__nomeBanco = banco | |
| def getBanco(self): | |
| return Singleton.__nomeBanco | 
  
    
      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 abc import ABC, abstractmethod | |
| class AbstractFactory(ABC): | |
| @abstractmethod | |
| def create_car(self): | |
| pass | |
| @abstractmethod | 
  
    
      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
    
  
  
    
  | class _Car(object): | |
| pass | |
| class _Bike(object): | |
| pass | |
| def factory_method(product_type): | |
| if product_type == 'car': | 
  
    
      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
    
  
  
    
  | """ | |
| Exemplo aplicado:Descobrir comportamento de compra. | |
| """ | |
| from collections import Counter | |
| import itertools | |
| import sys | |
| # Parâmetros de suporte e confiança | |
| s = 0.35 | 
  
    
      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
    
  
  
    
  | # coding: utf-8 | |
| def play(jogoState, jogoLast, jogoStatus, aux): | |
| print(jogoState) | |
| if jogoState == jogoLast: | |
| jogoStatus = False | |
| else: | |
| for i in range(0, 8): | |
| print(i) | |
| if jogoState[i] != '==>' and jogoState[i + 1] != '==>': | |
| aux[i] = jogoState[i] | 
  
    
      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
    
  
  
    
  | #Dupla: Leonardo;Thalia | |
| import numpy as np | |
| from random import randint | |
| import matplotlib.pyplot as plt | |
| def grupos(distancia, data_pont, centro): | |
| aux_min = min(distancia, key=distancia.get) | |
| return [aux_min, data_pont, centro[aux_min]] | |
| def calcula_centros(cluster_label, centroides): | 
NewerOlder