code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Room(): <NEW_LINE> <INDENT> def __init__(self, description, key = None): <NEW_LINE> <INDENT> self.description = description <NEW_LINE> self.key = key <NEW_LINE> self.north_door = None <NEW_LINE> self.south_door = None <NEW_LINE> self.west_door = None <NEW_LINE> self.east_door = None <NEW_LINE> <DEDENT> def add_no...
A Room is in a maze. It has a brief description. It might have a maze. It has walls in the cardinal directions, and each wall may or may not have a door. A room has methods for adding doors in each of the cardinal directions. These methods take the other room to connect this room to, creat a door between them, and se...
62598eddcb5e8a47e493b435
class CheckModulationHandler(handler.Handler): <NEW_LINE> <INDENT> def get(self, checkmodulation_name): <NEW_LINE> <INDENT> c = self.request.mongo_connection.shinken.checkmodulations.find_one( {"checkmodulation_name": checkmodulation_name} ) <NEW_LINE> return checkmodulation.CheckModulation(**c) <NEW_LINE> <DEDENT> def...
Fulfills a request on the check modulation resource.
62598edd8a43f66fc4bf06e9
class Test(unittest.TestCase): <NEW_LINE> <INDENT> def _test_snapshot(self, snapshot_path: Path) -> None: <NEW_LINE> <INDENT> with snapshot_mod.create_tmp_dir() as tmp_dir: <NEW_LINE> <INDENT> snapshot = snapshot_mod.unpack_into(snapshot_path, tmp_dir) <NEW_LINE> self._run_test(snapshot) <NEW_LINE> <DEDENT> <DEDENT> de...
Tests to verify the contents of various saved snapshots. All of the test functions in this class are dynamically added by register_tests()
62598edd57b8e32f525073c3
class Gate(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__gate_name = 'Identity' <NEW_LINE> self.__gate_matrix = numpy.matrix([ [1, 0], [0, 1] ]) <NEW_LINE> <DEDENT> @check_gate.gate_call_check <NEW_LINE> def __call__(self, qr): <NEW_LINE> <INDENT> if isinstance(qr, (qubit.Qubit, qubit.Rand...
gate class "In quantum computing and specifically the quantum circuit model of computation, a quantum logic gate is a basic quantum circuit operating on a small number of qubits. They are the building blocks of quantum circuits, like classical logic gates are for conventional digital circuits. Quantum logic gates are...
62598eddf8510a7c17d7d438
class GatewayUtils: <NEW_LINE> <INDENT> def fix_transfer_encoding(self) -> None: <NEW_LINE> <INDENT> transfer_encoding = request.headers.get("Transfer-Encoding", None) <NEW_LINE> if transfer_encoding == u"chunked": <NEW_LINE> <INDENT> request.environ["wsgi.input_terminated"] = True
Provide a set of utility functions useful in the gateway.
62598edd07f4c71912bad9d6
class LabeledSlider(QtGui.QWidget): <NEW_LINE> <INDENT> def __init__(self, min, max, default=None, parent=None): <NEW_LINE> <INDENT> super(LabeledSlider, self).__init__(parent) <NEW_LINE> self._slider = QtGui.QSlider() <NEW_LINE> self._slider.setMinimum(0) <NEW_LINE> self._slider.setMaximum(100) <NEW_LINE> self._slider...
A labeled slider widget, that handles floats and integers
62598eddbaa26c4b54d4d849
class Actor(nn.Module): <NEW_LINE> <INDENT> def __init__(self, state_size, action_size, seed, fc1_units=400, fc2_units=300): <NEW_LINE> <INDENT> super(Actor, self).__init__() <NEW_LINE> self.seed = torch.manual_seed(seed) <NEW_LINE> self.fc1 = nn.Linear(state_size, fc1_units) <NEW_LINE> self.fc2 = nn.Linear(fc1_units, ...
Actor (Policy) Model.
62598edd435de62698e9a34e
class Voter(db.Model): <NEW_LINE> <INDENT> net_id = db.StringProperty(required=True, indexed=True) <NEW_LINE> @property <NEW_LINE> def elections(self): <NEW_LINE> <INDENT> election_list = [] <NEW_LINE> for election_voter in ElectionVoter.gql('WHERE voter=:1', self.key()): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> el...
A voter that uses the application.
62598edd9b70327d1c57d331
class ApiException(Exception): <NEW_LINE> <INDENT> def __init__(self, message, status_code=HTTP_Status.INTERNAL_SERVER_ERROR): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.message = message <NEW_LINE> self.status_code = status_code <NEW_LINE> <DEDENT> def to_response(self): <NEW_LINE> <INDENT> response = json...
Generic API parser/formatter for exception messages. :param message: :param status_code: Defaults to 500
62598edd67a9b606de544546
class Upresneni(models.Model): <NEW_LINE> <INDENT> misto = models.ForeignKey(Poi, blank=True, null=True, on_delete=models.CASCADE) <NEW_LINE> email = models.EmailField(verbose_name=u"Váš e-mail (pro další komunikaci)", null=True) <NEW_LINE> status = models.CharField(max_length=10, choices=UPRESNENI_CHOICE) <NEW_LINE> d...
Tabulka pro uzivatelske doplnovani informaci do mapy. Prozatim na principu rucniho prepisu udaju v adminu. Vyzchazi z POI, ale nekopiruje se do ni. Slouzi predevsim k doplneni informace k mistu. Nektera pole mohou byt proto nefunkncni. Pouziva se pouze v Zelene mape, v PNK zatim neaktivni
62598edd5f7d997b871f8691
class HPackHdrString(packet.Packet): <NEW_LINE> <INDENT> name = 'HPack Header String' <NEW_LINE> fields_desc = [ fields.BitEnumField('type', None, 1, {0: 'Literal', 1: 'Compressed'}), FieldUVarLenField('len', None, 7, length_of='data'), HPackStrLenField( 'data', HPackLiteralString(''), length_from=lambda pkt: pkt.getfi...
HPackHdrString is a packet that that is serialized into a RFC7541 par5.2 string literal repr.
62598edd30dc7b766599de00
class _PropagateException(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.exc_info = None <NEW_LINE> <DEDENT> def propagate(self, *exc_info): <NEW_LINE> <INDENT> if not self.exc_info: <NEW_LINE> <INDENT> self.exc_info = exc_info <NEW_LINE> <DEDENT> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> r...
context manager designed to propagate exceptions outside of a cffi callback context. normally cffi suppresses the exception when propagate is called this class will hold onto the error until the control flow leaves the context, then the error will be raised with _PropagateException as propagate: # give propagate as ...
62598edd3d592f4c4edb946d
class IEC104_IO_M_IT_TB_1_IOA(IEC104_IO_M_IT_TB_1): <NEW_LINE> <INDENT> name = 'M_IT_TB_1 (+ioa)' <NEW_LINE> fields_desc = [LEThreeBytesField('information_object_address', 0)] + IEC104_IO_M_IT_TB_1.fields_desc
extended version of IEC104_IO_M_IT_TB_1 containing an individual information object address
62598edd24f1403a92684b60
class HyperVReplicaReplicationDetails(ReplicationProviderSpecificSettings): <NEW_LINE> <INDENT> _validation = { 'instance_type': {'required': True}, } <NEW_LINE> _attribute_map = { 'instance_type': {'key': 'instanceType', 'type': 'str'}, 'last_replicated_time': {'key': 'lastReplicatedTime', 'type': 'iso-8601'}, 'vm_nic...
HyperV replica 2012 replication details. All required parameters must be populated in order to send to Azure. :param instance_type: Required. Gets the Instance type.Constant filled by server. :type instance_type: str :param last_replicated_time: The Last replication time. :type last_replicated_time: ~datetime.datetim...
62598edd32920d7e50bc45a6
class Instrument(metaclass=ABCMeta): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def payoff(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def engine(self, **kwargs): <NEW_LINE> <INDENT> if not kwargs['model']: <NEW_LINE> <INDENT> kwargs['model'] = DEFAULT_MODEL[self.undl][self.derivative_type][self.expiry_type...
Instrument - Metaclass to define financial instrument @abstract functions: payoff => defines payoff on instrument. engine => attach the instrument with the pricing model and market data.
62598edd442bda511e95a9e0
class Outbox(object): <NEW_LINE> <INDENT> def __init__(self, username, password, server, port, mode='TLS', debug=False, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): <NEW_LINE> <INDENT> if mode not in ('SSL', 'TLS', None): <NEW_LINE> <INDENT> raise ValueError("Mode must be one of TLS, SSL, or None") <NEW_LINE> <DEDENT> serv...
Thin wrapper around the SMTP and SMTP_SSL classes from the smtplib module.
62598edd7cff6e4e811b3f67
class gs_inline_diff_stage_or_reset_line(gs_inline_diff_stage_or_reset_base): <NEW_LINE> <INDENT> def get_diff_from_line(self, row, reset): <NEW_LINE> <INDENT> hunks = diff_view_hunks[self.view.id()] <NEW_LINE> add_length_earlier_in_diff = 0 <NEW_LINE> cur_hunk_begin_on_minus = 0 <NEW_LINE> cur_hunk_begin_on_plus = 0 <...
Given a line number, generate a diff of that single line in the active file, and apply that diff to the file. If the `reset` flag is set to `True`, apply the patch in reverse (reverting that line to the version in HEAD).
62598edd4e4d562566370992
@bgp4_update.register_path_attributes_type(bgp4_update._AS_PATH) <NEW_LINE> class as_path(object): <NEW_LINE> <INDENT> def __init__(self, flag = 0x40, code = bgp4_update._AS_PATH, length = 0, as_type = 1, as_len = 0, as_values =[]): <NEW_LINE> <INDENT> self.flag = flag <NEW_LINE> self.code = code <NEW_LINE> self.length...
0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Attr. Flags |Attr. Type Code| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ XXX should contain multiple TLVs: <path segment type, path segment length, path segment value> path segment type(1 octet): 1 -- AS_SET 2 -- ...
62598edd56ac1b37e6300766
class GetRegion(handlers.UnsafeHandler): <NEW_LINE> <INDENT> def get(self, dataset: str, region: str, ds_version: str = None): <NEW_LINE> <INDENT> dataset, ds_version = utils.parse_dataset(dataset, ds_version) <NEW_LINE> try: <NEW_LINE> <INDENT> chrom, start, stop = utils.parse_region(region) <NEW_LINE> <DEDENT> except...
Request information about genes in a region.
62598edd7047854f4633d95b
class Controller(wsgi.Controller): <NEW_LINE> <INDENT> _view_builder_class = view_addresses.ViewBuilder <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(Controller, self).__init__(**kwargs) <NEW_LINE> self._compute_api = nova.compute.API() <NEW_LINE> <DEDENT> def _get_instance(self, context, server_id...
The servers addresses API controller for the OpenStack API.
62598edd30bbd722464681b1
class Logger(LogManager): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.host = socket.gethostname() <NEW_LINE> LogManager.__init__(self, *args, **kwargs) <NEW_LINE> <DEDENT> def access(self): <NEW_LINE> <INDENT> request = cherrypy.request <NEW_LINE> remote = request.remote <NEW_LINE>...
Custom logger to record information in format we prefer.
62598edd3eb6a72ae0388bba
class User(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> email = models.EmailField(max_length=255, unique=True) <NEW_LINE> name = models.CharField(max_length=255) <NEW_LINE> is_active = models.BooleanField(default=True) <NEW_LINE> is_staff = models.BooleanField(default=False) <NEW_LINE> objects = UserManager...
Custom user model with email instead of username
62598edd63d6d428bbee0d4b
class Building_db_writer(object): <NEW_LINE> <INDENT> def __init__(self, file_out): <NEW_LINE> <INDENT> self.handle = csv.writer(open(file_out, 'w'), lineterminator='\n') <NEW_LINE> self.BID = 1 <NEW_LINE> aggregate_on = AGGREGATE_ON <NEW_LINE> average_on = AVERAGE_ON <NEW_LINE> self.aggregate_on_index = {} <NEW_LINE> ...
Class to write a site file
62598edd009cb60464cffac8
class Catalyst(models.Model): <NEW_LINE> <INDENT> enzyme = models.ForeignKey(Enzyme) <NEW_LINE> reaction = models.ForeignKey(Reaction) <NEW_LINE> evidence = models.ForeignKey(Evidence)
Which enzymes catalyse which reactions, and which piece of evidence supports it.
62598eddc432627299fa152f
class Job(generics.ListCreateAPIView): <NEW_LINE> <INDENT> queryset = Job.objects.all() <NEW_LINE> serializer_class = JobSerializers
get: Return a list of all the existing jobs. post: Create a new job instance.
62598eddd486a94d0ba2a550
class ScoreBoard(object): <NEW_LINE> <INDENT> def __init__(self, settings, screen, stats): <NEW_LINE> <INDENT> self.screen = screen <NEW_LINE> self.settings = settings <NEW_LINE> self.stats = stats <NEW_LINE> self.screen_rect = screen.get_rect() <NEW_LINE> self.text_color = (30, 30, 30) <NEW_LINE> self.font = pygame.fo...
显示得分信息的类
62598edd91f36d47f2230161
class LtmProfileFastl4(LtmProfileFastl4Schema): <NEW_LINE> <INDENT> cli_command = "/mgmt/tm/ltm/profile/fastl4" <NEW_LINE> def rest(self): <NEW_LINE> <INDENT> response = self.device.get(self.cli_command) <NEW_LINE> response_json = response.json() <NEW_LINE> if not response_json: <NEW_LINE> <INDENT> return {} <NEW_LINE>...
To F5 resource for /mgmt/tm/ltm/profile/fastl4
62598edd97e22403b383946b
class ProbeViewController: <NEW_LINE> <INDENT> def __init__(self, event_loop): <NEW_LINE> <INDENT> assert event_loop is not None <NEW_LINE> self.__event_loop = event_loop <NEW_LINE> self.__instrument_added_event_listener = None <NEW_LINE> self.__instrument_removed_event_listener = None <NEW_LINE> self.__instrument_adde...
Manage a ProbeView for each instrument (STEMController) that gets registered.
62598edd63b5f9789fe836eb
class P1aMessage(Message): <NEW_LINE> <INDENT> def __init__(self, src, ballot_number): <NEW_LINE> <INDENT> Message.__init__(self, src) <NEW_LINE> self.ballot_number = ballot_number
Sent by Scouts to Acceptors in Phase 1 of Paxos. Carries a ballot number.
62598edd67a9b606de544548
class TestEntitycarrierWebserviceLabelTypeApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = swagger_client.api.entitycarrier_webservice_label_type_api.EntitycarrierWebserviceLabelTypeApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ...
EntitycarrierWebserviceLabelTypeApi unit test stubs
62598edd45492302aabfaa2d
class MediumConfig(object): <NEW_LINE> <INDENT> init_scale = 0.05 <NEW_LINE> max_grad_norm = 5 <NEW_LINE> num_layers = 2 <NEW_LINE> num_steps = 35 <NEW_LINE> hidden_size = 650 <NEW_LINE> max_epoch = 6 <NEW_LINE> max_max_epoch = 39 <NEW_LINE> keep_prob = 0.5 <NEW_LINE> lr_decay = 0.8 <NEW_LINE> batch_size = 20 <NEW_LINE...
Medium config.
62598edd30dc7b766599de02
class QuerySignatureV0AuthHandler(QuerySignatureHelper, AuthHandler): <NEW_LINE> <INDENT> SignatureVersion = 0 <NEW_LINE> capability = ['sign-v0'] <NEW_LINE> def _calc_signature(self, params, *args): <NEW_LINE> <INDENT> boto.log.debug('using _calc_signature_0') <NEW_LINE> hmac = self._hmac.copy() <NEW_LINE> s = params[...
Class SQS query signature based Auth handler.
62598edd21bff66bcd7211cc
class Field(object): <NEW_LINE> <INDENT> def __init__(self, name, column_type, primary_key, default): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.column_type = column_type <NEW_LINE> self.primary_key = primary_key <NEW_LINE> self.default = default <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> retu...
字段基类
62598edd090684286d59299c
class Movie(): <NEW_LINE> <INDENT> def __init__(self,movie_title,art_url,youtube_link): <NEW_LINE> <INDENT> self.title = movie_title <NEW_LINE> self.poster_image_url = art_url <NEW_LINE> self.trailer_youtube_url = youtube_link <NEW_LINE> <DEDENT> def show_trailer(self): <NEW_LINE> <INDENT> webbrowser.open(self.trailer_...
Defines the structure of a movie on the page
62598edd498bea3a75a560b1
class Serial(Base): <NEW_LINE> <INDENT> def __init__(self, strat_list): <NEW_LINE> <INDENT> Base.__init__(self) <NEW_LINE> self.__stratList = strat_list <NEW_LINE> <DEDENT> def handlePINInitInput(self, input_job): <NEW_LINE> <INDENT> for s in self.__stratList: <NEW_LINE> <INDENT> s.handlePINInitInput(input_job) <NEW_LI...
Class for serial strategy composition.
62598edd56b00c62f0fb0e4b
class PaymentType(models.Model): <NEW_LINE> <INDENT> cardholder = models.ForeignKey(User, on_delete=models.CASCADE, related_name='cardholder_payment_types') <NEW_LINE> account_nickname = models.CharField(max_length=20) <NEW_LINE> account_type = models.CharField(max_length=20) <NEW_LINE> account_number = models.DecimalF...
This class models a payment type in the API's database. ----Fields---- - cardholder(foreign key): links to Customer(CustomerID) with a foregin key - account_nickname(character): nickname of payment type - account_type(character): type of payment - account_number(decimal): account number - is_active(boolean): boolean...
62598edd7cff6e4e811b3f69
class BadTokens(unittest.TestCase): <NEW_LINE> <INDENT> badTokens = ('-1-', '-.a', '3a', '20x320x93E-10', '&', '$', '@', '<<a|', '|a|', '<>', '1..') <NEW_LINE> def testBadTokens(self): <NEW_LINE> <INDENT> for token in self.badTokens: <NEW_LINE> <INDENT> self.assertRaises(classify.ClassificationError, classifier.toClass...
Contains invalid Tokens
62598edd0c0af96317c54918
class NodeUUID(PeerUUID): <NEW_LINE> <INDENT> pass
The UUID of any Node.
62598edd925a0f43d25e65a9
class SetBackup(base_classes.NoOutputAsyncMutator): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> parser.add_argument( '--backup-pool', nargs='?', completion_resource='targetPools', help=('Name of the target pool that will serve as backup. ' 'If this flag is provided without a value...
Set a backup pool for a target pool.
62598eddb5575c28eb711f8e
class unsignedInt (unsignedLong): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.XMLSchema.createExpandedName('unsignedInt')
XMLSchema datatype U{unsignedInt<http://www.w3.org/TR/xmlschema-2/#unsignedInt>}.
62598edd56ac1b37e6300768
class HierarchyLoopError(EmployeeError): <NEW_LINE> <INDENT> def __init__(self, employee, supervisor): <NEW_LINE> <INDENT> if employee == supervisor: <NEW_LINE> <INDENT> msg = 'Cannot set self ({}) as supervisor)'.format(employee) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> msg = 'Cannot set subordinate ({}) as super...
Raised when employee has their any level subordinate set as supervisor creating a loop
62598edd99fddb7c1ca620c4
@ClassFactory.register(ClassType.NETWORK) <NEW_LINE> class BertSelfOutput(Module): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> super(BertSelfOutput, self).__init__() <NEW_LINE> self.dense = ops.Linear(config.hidden_size, config.hidden_size) <NEW_LINE> self.LayerNorm = ops.LayerNorm(config.hidden...
Bert Self Output.
62598edd6aa9bd52df0d3429
class SelectorBIC(ModelSelector): <NEW_LINE> <INDENT> def bic(self, model, n_components): <NEW_LINE> <INDENT> log_l = model.score(self.X, self.lengths) <NEW_LINE> p = n_components ** 2 + 2 * n_components * model.n_features - 1 <NEW_LINE> return -2 * log_l + p * np.log(len(self.X)) <NEW_LINE> <DEDENT> def select(self): ...
select the model with the lowest Baysian Information Criterion(BIC) score http://www2.imm.dtu.dk/courses/02433/doc/ch6_slides.pdf Bayesian information criteria: BIC = -2 * logL + p * logN
62598edd8e71fb1e983b9fec
class TSENRICHDATA(BaseEnrichData): <NEW_LINE> <INDENT> def __init__(self, rack_order , data_plus_meta, racks_map): <NEW_LINE> <INDENT> super(TSENRICHDATA, self).__init__(module_name, version_name, rack_order , data_plus_meta, racks_map) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> data_dict = self.data_plus_...
This is a class for enrichment. Attributes: rack_order (int): the order of the rack (i.e. 4). data_plus_meta (dict): dictionary contining data and meta data. racks_map (dict): dictionary of all racks and their orders.
62598edd30bbd722464681b3
class FetchInboxJob(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.inboxService = None <NEW_LINE> self.proxyService = None <NEW_LINE> <DEDENT> def execute(self, scheduler): <NEW_LINE> <INDENT> paginationMax = settings["persistance"]["paginationBackendMax"] <NEW_LINE> nbInbox = self.inboxServi...
Job pour charger les inbox en attente et les envoyer sur le système local Ce job ne fait pas le travail final mais il se charge juste de charger les inbox par paquet et délègue le travail à un service
62598edd462c4b4f79db9f75
@urls.register <NEW_LINE> class Dataset(generic.View): <NEW_LINE> <INDENT> url_regex = r'meteos/datasets/(?P<id>[^/]+)$' <NEW_LINE> @rest_utils.ajax() <NEW_LINE> def get(self, request, id): <NEW_LINE> <INDENT> return change_to_id(client.dataset_show(request, id).to_dict())
API for retrieving a single dataset
62598edd7b25080760ed5a16
class Square: <NEW_LINE> <INDENT> def __init__(self, size=0): <NEW_LINE> <INDENT> self.size = size <NEW_LINE> <DEDENT> @property <NEW_LINE> def size(self): <NEW_LINE> <INDENT> return self.__size <NEW_LINE> <DEDENT> @size.setter <NEW_LINE> def size(self, value): <NEW_LINE> <INDENT> if type(value) is int: <NEW_LINE> <IND...
Square stuff
62598edd91f36d47f2230162
class SimpleRouter(object): <NEW_LINE> <INDENT> def __init__(self, apps): <NEW_LINE> <INDENT> self.routes = routes = [] <NEW_LINE> for route, app in apps: <NEW_LINE> <INDENT> if not route.startswith('/'): <NEW_LINE> <INDENT> route = "/%s" % route <NEW_LINE> <DEDENT> if route[-1] != '/': <NEW_LINE> <INDENT> route = "%s/...
I implement a simple (even naive) route dispatcher. Not intended for production use -- merely for tests.
62598edd5fdd1c0f98e5c529
class SingleContinuousPSpace(ContinuousPSpace, SinglePSpace): <NEW_LINE> <INDENT> @property <NEW_LINE> def set(self): <NEW_LINE> <INDENT> return self.distribution.set <NEW_LINE> <DEDENT> @property <NEW_LINE> def domain(self): <NEW_LINE> <INDENT> return SingleContinuousDomain(sympify(self.symbol), self.set) <NEW_LINE> <...
A continuous probability space over a single univariate variable These consist of a Symbol and a SingleContinuousDistribution This class is normally accessed through the various random variable functions, Normal, Exponential, Uniform, etc....
62598edd0c0af96317c54919
class ReadOnlyModelViewSet(rf_mixins.RetrieveModelMixin, mixins.ListModelMixin, rf_viewsets.GenericViewSet): <NEW_LINE> <INDENT> pass
A viewset that provides default `list()` and `retrieve()` actions.
62598edde76e3b2f99fd6fb6
class SalesforceAPI(Salesforce): <NEW_LINE> <INDENT> def __init__(self, username, password, security_token, sandbox=False, sf_version='27.0'): <NEW_LINE> <INDENT> import warnings <NEW_LINE> warnings.warn( "Use of login arguments has been deprecated. Please use kwargs", DeprecationWarning ) <NEW_LINE> super(SalesforceAP...
Deprecated SalesforceAPI Instance This class implements the Username/Password Authentication Mechanism using Arguments It has since been surpassed by the 'Salesforce' class, which relies on kwargs
62598edd23849d37ff84f636
class RFCNMetaArch(faster_rcnn_meta_arch.FasterRCNNMetaArch): <NEW_LINE> <INDENT> def __init__(self, is_training, num_classes, image_resizer_fn, feature_extractor, first_stage_only, first_stage_anchor_generator, first_stage_atrous_rate, first_stage_box_predictor_arg_scope, first_stage_box_predictor_kernel_size, first_s...
R-FCN Meta-architecture definition.
62598edda17c0f6771d5a7d7
class Base(Executor): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__success = True <NEW_LINE> self.__results = [] <NEW_LINE> <DEDENT> def get_success(self): <NEW_LINE> <INDENT> return self.__success <NEW_LINE> <DEDENT> def set_failed(self): <NEW_LINE> <INDENT> self.__success = False <NEW_LINE> <DED...
Base class for all analytics checks. This class provides the basic methods and infrastructure to handle the analytics.
62598edd236d856c2adc86d1
class VcfPrimerDesign: <NEW_LINE> <INDENT> def __init__(self, reference, vcf_file, desc): <NEW_LINE> <INDENT> self.reference = Fasta(reference) <NEW_LINE> with warnings.catch_warnings(): <NEW_LINE> <INDENT> warnings.simplefilter("ignore") <NEW_LINE> self.alt=FastaVariant(reference,vcf_file,het=True, hom=True,sample=Non...
A primer design object that is primed with genome reference and vcf variant data
62598eddcc0a2c111447957e
class NusModule(Details): <NEW_LINE> <INDENT> timetable = scrapy.Field()
Item containing all the information for a single module for NUS, because everything is contained nicely thanks to NUSMODS.
62598edd090684286d59299d
class DocReferenceMigrator(SphinxTransform): <NEW_LINE> <INDENT> default_priority = 5 <NEW_LINE> def apply(self): <NEW_LINE> <INDENT> for node in self.document.traverse(addnodes.pending_xref): <NEW_LINE> <INDENT> if node.get('reftype') == 'doc' and node.get('refdomain') is None: <NEW_LINE> <INDENT> source, line = get_s...
Migrate :doc: reference to std domain.
62598eddeab8aa0e5d30a2f4
class SymantecCertificatePlugin(cert.CertificatePluginBase): <NEW_LINE> <INDENT> def __init__(self, conf=CONF): <NEW_LINE> <INDENT> self.username = conf.symantec_plugin.username <NEW_LINE> self.password = conf.symantec_plugin.password <NEW_LINE> self.url = conf.symantec_plugin.url <NEW_LINE> if self.username == None: <...
Symantec certificate plugin.
62598edd23849d37ff84f637
class FileWriteError(DjangoEnvcryptException): <NEW_LINE> <INDENT> pass
Could not save the file
62598edd66673b3332c2e923
class TheanoOpNode(Node): <NEW_LINE> <INDENT> def __init__(self, wraps=None, color='#344e30', node=None, *args, **kwargs): <NEW_LINE> <INDENT> super(TheanoOpNode,self).__init__(wraps=wraps, node=node, color=color) <NEW_LINE> <DEDENT> def parse_wrapped(self, expression): <NEW_LINE> <INDENT> self.type = 'expression' <NEW...
Theano operator node. Overrides wrapping method as theano ops do not expose name or module. Op is set as expression=(str) which is the name of a theano tensor operation. Adds two inputs, 'a' and 'b', for binary ops. Default color: green
62598edd8da39b475be01727
class Mine2GetherProvider(Provider): <NEW_LINE> <INDENT> def __init__(self, wallet_address): <NEW_LINE> <INDENT> self.wallet_address = wallet_address <NEW_LINE> <DEDENT> def fetch_data(self): <NEW_LINE> <INDENT> r1 = requests.get( "https://trtl.mine2gether.com/api/stats_address?address=" + self.wallet_address) <NEW_LIN...
trtl.mine2gether.com
62598edd925a0f43d25e65ab
class testFaceted(MeetingIDEATestCase, mctf): <NEW_LINE> <INDENT> pass
Tests the faceted navigation.
62598edd7d43ff24874266ba
class SourceReference(_messages.Message): <NEW_LINE> <INDENT> repository = _messages.StringField(1) <NEW_LINE> revisionId = _messages.StringField(2)
A reference to a particular snapshot of the source tree used to build and deploy an application. Fields: repository: Optional. A URI string identifying the repository. Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" revisionId: The canonical (and persistent) identifier of the deployed revi...
62598eddd7e4931a7ef3a61a
class IntWrapper(Model): <NEW_LINE> <INDENT> _validation = { 'value': {'required': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': 'int'}, } <NEW_LINE> def __init__(self, value): <NEW_LINE> <INDENT> self.value = value
IntWrapper :param value: :type value: int
62598edd30bbd722464681b5
class SwingFoot(Box): <NEW_LINE> <INDENT> THICKNESS = 0.01 <NEW_LINE> def __init__(self, swing_height, color='c'): <NEW_LINE> <INDENT> super(SwingFoot, self).__init__( X=0.12, Y=0.06, Z=self.THICKNESS, color=color, dZ=-self.THICKNESS) <NEW_LINE> self.end_pose = None <NEW_LINE> self.mid_pose = None <NEW_LINE> self.start...
Invisible body used for swing foot interpolation. Parameters ---------- swing_height : double Height in [m] for the apex of the foot trajectory. color : char, optional Color applied to all links of the KinBody.
62598edd7047854f4633d95f
class TestDhcpRelayService(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testDhcpRelayService(self): <NEW_LINE> <INDENT> pass
DhcpRelayService unit test stubs
62598edd3eb6a72ae0388bbe
class SendMailWithReport(object): <NEW_LINE> <INDENT> smtp_server = "smtp.qq.com" <NEW_LINE> from_user = "346064730@qq.com" <NEW_LINE> from_pass_word ="qxukpzjdnbtobjfj" <NEW_LINE> to_user = "18896022818@163.com" <NEW_LINE> subject = "python自动化测试" <NEW_LINE> file_name = REPORT_DIR+"/ouoc_ui_report.html" <NEW_LINE> @sta...
发送邮件
62598edd0a50d4780f703926
class FileInfo(): <NEW_LINE> <INDENT> def __init__(self, path, size=None, sha=None): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.size = size <NEW_LINE> self.sha = sha
Data class storing (path, size, sha) for a file.
62598edd30bbd722464681b6
class AirspeedRelativeAtFirstFlapExtensionWithGearDown(KeyPointValueNode): <NEW_LINE> <INDENT> name = 'Airspeed Relative To Vref30+80 At First Flap Extension With Gear Down' <NEW_LINE> units = ut.KT <NEW_LINE> def derive(self, speed=KPV('Airspeed At Flap Extension With Gear Down'), gw_ldg=KPV('Gross Weight At Touchdown...
Specific to certain 757/767 operations, this is the speed relative to the Vref at the landing weight, assuming a flap 30 landing, plus 80kts.
62598edd009cb60464cffacc
class PageBreak(object): <NEW_LINE> <INDENT> def append_to(self, doc, target): <NEW_LINE> <INDENT> p = target.ownerDocument.createElement('w:p') <NEW_LINE> r = target.ownerDocument.createElement('w:r') <NEW_LINE> br = target.ownerDocument.createElement('w:br') <NEW_LINE> br.setAttribute('w:type', 'page') <NEW_LINE> r.a...
Page break
62598edd097d151d1a2bf59c
class Optimizer(abc.ABC): <NEW_LINE> <INDENT> def export_proto(self): <NEW_LINE> <INDENT> return optimizers_pb2.Optimizer()
Optimization algorithm for a neural network's parameters.
62598edd5fdd1c0f98e5c52b
class Folder(ManagedEntity): <NEW_LINE> <INDENT> def __init__(self, core, name=None, ref=None, type=ManagedObjectTypes.Folder): <NEW_LINE> <INDENT> super(Folder, self).__init__(core, name=name, ref=ref, type=type) <NEW_LINE> <DEDENT> @property <NEW_LINE> def childEntity(self): <NEW_LINE> <INDENT> return self.update('ch...
The Folder managed object is a container for storing and organizing inventory objects. Folders can contain folders and other objects. The childType property identifies a folder's type and determines the types of folders and objects the folder can contain.* A folder can contain a child folder of the same type as the par...
62598edd23849d37ff84f638
class ObjSurfaceImporterTest(TransactionalTestCase): <NEW_LINE> <INDENT> torrus = os.path.join(os.path.dirname(tvb_data.obj.__file__), 'test_torus.obj') <NEW_LINE> ball = os.path.join(os.path.dirname(tvb_data.obj.__file__), 'Test_Ball.obj') <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.datatypeFactory = Datatype...
Unit-tests for Obj Surface importer.
62598edde76e3b2f99fd6fb8
class Item(Base): <NEW_LINE> <INDENT> __tablename__ = 'item' <NEW_LINE> t_id = Column(Integer, primary_key=True) <NEW_LINE> t_itemName = Column(String(100), nullable=False, unique=True) <NEW_LINE> t_itemDescription = Column(String(250), nullable=False) <NEW_LINE> t_userId = Column(Integer, ForeignKey('user.t_id', ondel...
Item stores the item information (name and description), also stores the id of the user and the id of the category is part of in an one to many relationship, finally it serializes all its fields for the JSON end points Arguments: Base {declarative_base} -- special class that correspond to tables in the DB
62598edd435de62698e9a354
class AccountsManagerDaemon(object): <NEW_LINE> <INDENT> def __init__(self, pidfile, accounts_manager, fcntl_module=fcntl): <NEW_LINE> <INDENT> logging.debug('Initializing Daemon Module') <NEW_LINE> if not pidfile: <NEW_LINE> <INDENT> pidfile = PIDFILE <NEW_LINE> <DEDENT> self.pidfile = pidfile <NEW_LINE> self.accounts...
Creates a daemon process to run the accounts manager in.
62598edd16aa5153ce3fea79
class EnforceRequirementProperties(Eo3Interface): <NEW_LINE> <INDENT> @property <NEW_LINE> def properties(self) -> Eo3Dict: <NEW_LINE> <INDENT> return self._props <NEW_LINE> <DEDENT> def __init__(self, properties: Mapping, required_fields: Set[str]) -> None: <NEW_LINE> <INDENT> self._props = RequiredPropertyDict(requir...
A wrapper for EO3 fields that throws a loud error if a field in required_properties isn't set. Throws MissingRequiredFields error.
62598edd4e4d562566370997
class Tag(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> ordering = ['title',] <NEW_LINE> <DEDENT> title = models.CharField( max_length = 255 ) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return "%s" % (self.title,)
Tag Model
62598edd8e7ae83300ee760e
class Bounds: <NEW_LINE> <INDENT> INITIAL_POINT = Point(None) <NEW_LINE> def __init__(self, initial_pts=None, dtype=float): <NEW_LINE> <INDENT> initial_pts = [] if initial_pts is None else initial_pts <NEW_LINE> self.dtype = dtype <NEW_LINE> self.lo = Bounds.INITIAL_POINT <NEW_LINE> self.hi = Bounds.INITIAL_POINT <NEW_...
A class for keeping track of bounds. Works with Point instances, and automatically updates n-dimensional lo/hi values.
62598edd63d6d428bbee0d50
class InlineResponse20011(object): <NEW_LINE> <INDENT> swagger_types = { 'status': 'str', 'result': 'InlineResponse20011Result' } <NEW_LINE> attribute_map = { 'status': 'status', 'result': 'result' } <NEW_LINE> def __init__(self, status=None, result=None): <NEW_LINE> <INDENT> self._status = None <NEW_LINE> self._result...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598edde64d504609df867f
class Channel(Model): <NEW_LINE> <INDENT> title = CharField(max_length=80) <NEW_LINE> channel_id = CharField(max_length=80, unique=True) <NEW_LINE> from_address = CharField(max_length=200, help_text='"Name <email>" or "email"') <NEW_LINE> required = BooleanField(default=False) <NEW_LINE> def __unicode__(self): <NEW_LIN...
Contacts can subscribe to channels. Emails are attached to channels. A contact will receive an email if he's subscribed to the email's channel. If the channel is marked as required (boolean field) then all contacts are implicitely subscribed to the channel. Typically there is one such channel, which could be called "...
62598edd090684286d59299e
class AccountStorageUsageForMedia(object): <NEW_LINE> <INDENT> def __init__(self, usage_data): <NEW_LINE> <INDENT> self.usage_data = usage_data <NEW_LINE> <DEDENT> @property <NEW_LINE> def key(self): <NEW_LINE> <INDENT> return self.usage_data["mediaKey"] <NEW_LINE> <DEDENT> @property <NEW_LINE> def label(self): <NEW_LI...
Storage used for a specific media type into the account.
62598edda17c0f6771d5a7da
class ProductDetail(Base): <NEW_LINE> <INDENT> __tablename__="product_detail" <NEW_LINE> nid=Column(Integer,primary_key=True) <NEW_LINE> title=Column(VARCHAR(16)) <NEW_LINE> content=Column(VARCHAR(32)) <NEW_LINE> product_id=Column(Integer,ForeignKey("product.nid"))
产品详细
62598edd60cbc95b063628bb
class Rope: <NEW_LINE> <INDENT> def __init__(self, s: str = None): <NEW_LINE> <INDENT> def __build(s): <NEW_LINE> <INDENT> if len(s) == 1: <NEW_LINE> <INDENT> res = _RopeTreeMap() <NEW_LINE> res[None] = s <NEW_LINE> return res <NEW_LINE> <DEDENT> middle = len(s) // 2 <NEW_LINE> a, b = __build(s[:middle]), __build(s[mid...
Структура, принимающая на вход строку и позволяющая за логарифмическое время выполнять две основные операции: 1. Искать символ по индексу 2. Переставить две части строки слева и справа от индекса Основана на дереве поиска с неявными ключами. Неявным ключом здесь будет количество элементов дерева, меньших данног...
62598edd3c8af77a43b671f1
class GlobaltagtokenApi(object): <NEW_LINE> <INDENT> def __init__(self, api_client=None): <NEW_LINE> <INDENT> config = Configuration() <NEW_LINE> if api_client: <NEW_LINE> <INDENT> self.api_client = api_client <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> if not config.api_client: <NEW_LINE> <INDENT> config.api_client ...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen
62598eddbe383301e0251d56
class Image(Validator): <NEW_LINE> <INDENT> def validate(self, value): <NEW_LINE> <INDENT> if not isinstance(value, str): <NEW_LINE> <INDENT> if value is None: <NEW_LINE> <INDENT> raise ValueError(f"Field '{self.private_name[1:]}' is missing.") <NEW_LINE> <DEDENT> if not isinstance(value, str): <NEW_LINE> <INDENT> rais...
Upload images should not have _thumb, _small, or _medium suffixes in their names.
62598edd8c0ade5d55dc2943
class UnresolvingLogger(object): <NEW_LINE> <INDENT> implements(IRequestLogger) <NEW_LINE> def __init__(self, logger): <NEW_LINE> <INDENT> self.logger = logger <NEW_LINE> <DEDENT> def logRequest(self, ip, message): <NEW_LINE> <INDENT> self.logger.logMessage('%s%s' % (ip, message))
Just in case you don't want to resolve
62598eddd7e4931a7ef3a61b
class LR_REG(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def fn(w, x): <NEW_LINE> <INDENT> return 1.0 / (1.0 + np.exp(-np.dot(x, w))).reshape(x.shape[0], 1) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def loss(y, y_hat): <NEW_LINE> <INDENT> return np.sum(np.nan_to_num((y_hat - y) ** 2)) / 2 <NEW_LINE> <DEDEN...
用回归的LR
62598edd82261d6c5272f176
class TimeSinceColumn(tables.Column): <NEW_LINE> <INDENT> def render(self, value): <NEW_LINE> <INDENT> time_since = float(time.time()) - float(value) <NEW_LINE> idle_time = str(timedelta(seconds=time_since)) if value else "NA" <NEW_LINE> return idle_time
Return time since formated as "00:00:00"
62598edd4a966d76dd5ed463
class IPv4Dest(Destination, NonVrfPathProcessingMixin): <NEW_LINE> <INDENT> ROUTE_FAMILY = RF_IPv4_UC <NEW_LINE> def _best_path_lost(self): <NEW_LINE> <INDENT> old_best_path = self._best_path <NEW_LINE> NonVrfPathProcessingMixin._best_path_lost(self) <NEW_LINE> self._core_service._signal_bus.best_path_changed(old_best_...
VPNv4 Destination Store IPv4 Paths.
62598edd3317a56b869bd828
class PyoObjectBase(object): <NEW_LINE> <INDENT> _STREAM_TYPE = '' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> if not serverCreated(): <NEW_LINE> <INDENT> raise PyoServerStateException("You must create and boot a Server before creating any audio object.") <NEW_LINE> <DEDENT> if not serverBooted(): <NEW_LINE> <IN...
Base class for all pyo objects. This object encapsulates some common behaviors for all pyo objects. One typically inherits from a more specific subclass of this class instead of using it directly. .. note:: **Operations allowed on all PyoObjectBase** >>> len(obj) # Return the number of streams managed by t...
62598edda8370b77170ee96e
class CfmMdidFormatEnum(Enum): <NEW_LINE> <INDENT> null = 1 <NEW_LINE> dns_like = 2 <NEW_LINE> mac_address = 3 <NEW_LINE> string = 4 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_ethernet_cfm_cfg as meta <NEW_LINE> return meta._meta_tab...
CfmMdidFormatEnum Cfm mdid format .. data:: null = 1 Null MDID .. data:: dns_like = 2 DNS-like MDID .. data:: mac_address = 3 MDID Comprising MAC Address and 16-bit integer .. data:: string = 4 String MDID
62598edd10dbd63aa1c6f0ef
class ContainerConsumerMetadatum(BASE, SoftDeleteMixIn, ModelBase): <NEW_LINE> <INDENT> __tablename__ = 'container_consumer_metadata' <NEW_LINE> container_id = sa.Column(sa.String(36), sa.ForeignKey('containers.id'), index=True, nullable=False) <NEW_LINE> project_id = sa.Column(sa.String(36), sa.ForeignKey('projects.id...
Stores Consumer Registrations for Containers in the datastore. Services can register interest in Containers. Services will provide a type and a URL for the object that is using the Container.
62598edd8a43f66fc4bf06f1
class facture(models.Model): <NEW_LINE> <INDENT> remise_pourcentage = models.IntegerField() <NEW_LINE> remise_montant = models.IntegerField() <NEW_LINE> date = models.DateField() <NEW_LINE> salle = models.CharField(max_length=100) <NEW_LINE> reservations = models.ForeignKey('airbnb.reservations', on_delete=CASCADE) <NE...
docstring for ClassName
62598edddd821e528d6d74c7
class XmlValidationError(Exception): <NEW_LINE> <INDENT> pass
Exception class for xml schema validation errors.
62598edd07f4c71912bad9de
class Value_Field (Int_Field) : <NEW_LINE> <INDENT> struct_code = { 7 : "B" , 8 : "B" } <NEW_LINE> def as_bytes (self, result, value, telegram) : <NEW_LINE> <INDENT> tc = telegram.type_code <NEW_LINE> if tc < 7 : <NEW_LINE> <INDENT> return self.__super.as_bytes (result, value, telegram) <NEW_LINE> <DEDENT> off =...
Special handling of values
62598edd07f4c71912bad9df
class Tag(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100)
A string that can be attached to an item. Attributes ---------- name : str The name of the tag
62598edd4e4d562566370999
class FileSystemThrottledCrashStorage(FileSystemRawCrashStorage): <NEW_LINE> <INDENT> required_config = Namespace() <NEW_LINE> required_config.add_option( 'def_fs_root', doc='a path to a local file system', default='/home/socorro/deferredCrashStore' ) <NEW_LINE> def __init__(self, config, quit_check_callback=None): <NE...
This varient of file system storage segregates crashes based on the result of Collector throttling. When the collector recieves a crash, it applies throttle rules and saves the result in the crash json under the key 'legacy_processing'. Only crashes that have a value of 0 in that field will eventually make it on to p...
62598edda17c0f6771d5a7db
class ConfigurationMixin(object): <NEW_LINE> <INDENT> def _render_config(self, service_type, flavor, instance_id): <NEW_LINE> <INDENT> config = template.SingleInstanceConfigTemplate( service_type, flavor, instance_id) <NEW_LINE> config.render() <NEW_LINE> return config
Configuration Mixin Configuration related tasks for instances and resizes.
62598edd30dc7b766599de08
class Stylesheet(object): <NEW_LINE> <INDENT> def __init__(self, rules, errors, encoding): <NEW_LINE> <INDENT> self.rules = rules <NEW_LINE> self.errors = errors <NEW_LINE> self.encoding = encoding <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return '<{0.__class__.__name__} {1} rules {2} errors>'.format(...
A parsed CSS stylesheet. .. attribute:: rules A mixed list, in source order, of :class:`RuleSet` and various at-rules such as :class:`ImportRule`, :class:`MediaRule` and :class:`PageRule`. Use their :obj:`at_keyword` attribute to distinguish them. .. attribute:: errors A list of :class:`~.parsin...
62598edd21a7993f00c644ec
class Line: <NEW_LINE> <INDENT> def __init__(self, x1, y1, x2, y2): <NEW_LINE> <INDENT> self.x1 = np.float32(x1) <NEW_LINE> self.y1 = np.float32(y1) <NEW_LINE> self.x2 = np.float32(x2) <NEW_LINE> self.y2 = np.float32(y2) <NEW_LINE> self.slope = self.compute_slope() <NEW_LINE> self.bias = self.compute_bias() <NEW_LINE> ...
A Line is defined from two points (x1, y1) and (x2, y2) as follows: y - y1 = (y2 - y1) / (x2 - x1) * (x - x1) Each line has its own slope and intercept (bias).
62598edde5267d203ee69e83
class HomePageView(TemplateView): <NEW_LINE> <INDENT> template_name = 'club/training_list.html' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> now = datetime.datetime.now() <NEW_LINE> context = super(HomePageView, self).get_context_data(**kwargs) <NEW_LINE> context['trainings'] = Training.objects....
Home Page with list of trainings
62598eddd268445f26638e4e