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 networkx as nx | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import rc | |
def kc( ativos0, num_estados, rede, tempo): | |
firstN = set(); | |
ativos = set(); | |
ativos.add(ativos0); | |
firstN.add(ativos0); |
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 numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import rc | |
dx = 0.001; | |
dy = 0.001; | |
alpha = 0.025; # quando alpha e beta != 0 teremos drift, isso eh, ddeslocamento do centro de massa | |
beta = 0.025; # | |
a = 0.25; # quando a = b = 1/4, difusao eh homogenea | |
b = 0.25; # |
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
def run_with_all_model_types( | |
test_or_class=None, | |
exclude_models=None): | |
"""Execute the decorated test with all Keras model types. | |
This decorator is intended to be applied either to individual test methods in | |
a `keras_parameterized.TestCase` class, or directly to a test class that | |
extends it. Doing so will cause the contents of the individual test | |
method (or all test methods in the class) to be executed multiple times - once | |
for each Keras model type. | |
The Keras model types are: ['functional', 'subclass', 'sequential'] |
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 Person(object): | |
def __init__(self): | |
self.name = None | |
self.position = None | |
self.date_of_birth = None | |
def __str__(self): | |
return '{} born on {} works as a {}'.format(self.name,self.date_of_birth,self.position) | |
# @staticmethod | |
# def new(): | |
# return PersonBuilder() |
OlderNewer