content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import pygame_sdl2 pygame_sdl2.import_as_pygame() import pygame import os import random import math from Ball import Ball def save_state(balls): """ Saves the game state. """ stateString = "" with open("state.txt", "w") as f: for ball in balls: stateString += "{} {} {} {} {}".format(ball.imageFile, ball.speedx, ball.speedy, ball.rect.centerx, ball.rect.centery) stateString += '\n' f.write(stateString) if __name__ == "__main__": main()
[ 11748, 12972, 6057, 62, 21282, 75, 17, 198, 9078, 6057, 62, 21282, 75, 17, 13, 11748, 62, 292, 62, 9078, 6057, 3419, 198, 198, 11748, 12972, 6057, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 10688, 198, 6738, 6932, 1330, 6932, 19...
1.701422
422
from __future__ import division import math, copy import argparse from brownian import Brownian import scipy import LLRcalc if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "--alpha", help="probability of a false positve", type=float, default=0.05 ) parser.add_argument( "--beta", help="probability of a false negative", type=float, default=0.05 ) parser.add_argument( "--elo0", help="H0 (expressed in LogisticElo)", type=float, default=0.0 ) parser.add_argument( "--elo1", help="H1 (expressed in LogisticElo)", type=float, default=5.0 ) parser.add_argument("--level", help="confidence level", type=float, default=0.95) parser.add_argument( "--elo-model", help="logistic or normalized", choices=['logistic', 'normalized'], default='logistic', ) parser.add_argument( "--results", help="trinomial of pentanomial frequencies, low to high", nargs="*", type=int, required=True, ) args = parser.parse_args() results = args.results if len(results) != 3 and len(results) != 5: parser.error("argument --results: expected 3 or 5 arguments") alpha = args.alpha beta = args.beta elo0 = args.elo0 elo1 = args.elo1 elo_model = args.elo_model p = 1 - args.level s = sprt(alpha=alpha, beta=beta, elo0=elo0, elo1=elo1, elo_model=elo_model) s.set_state(results) a = s.analytics(p) print("Design parameters") print("=================") print("False positives : %4.2f%%" % (100 * alpha,)) print("False negatives : %4.2f%%" % (100 * beta,)) print("[Elo0,Elo1] : [%.2f,%.2f]" % (elo0, elo1)) print("Confidence level : %4.2f%%" % (100 * (1 - p),)) print("Elo model : %s" % elo_model) print("Estimates") print("=========") print("Elo : %.2f" % a["elo"]) print( "Confidence interval : [%.2f,%.2f] (%4.2f%%)" % (a["ci"][0], a["ci"][1], 100 * (1 - p)) ) print("LOS : %4.2f%%" % (100 * a["LOS"],)) print("Context") print("=======") print( "LLR [u,l] : %.2f %s [%.2f,%.2f]" % (a["LLR"], "(clamped)" if a["clamped"] else "", a["a"], a["b"]) )
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 10688, 11, 4866, 198, 11748, 1822, 29572, 198, 6738, 7586, 666, 1330, 4373, 666, 198, 11748, 629, 541, 88, 198, 11748, 27140, 49, 9948, 66, 628, 198, 198, 361, 11593, 3672, 834, 6624, 3...
2.075536
1,165
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # from dataclasses import dataclass import struct from binascii import unhexlify import random ############ # DEFINES ############ AF_BLUETOOTH = 31 HCI_CHANNEL_USER = 1 HCI_COMMAND_PACKET = 0x01 HCI_ACL_DATA_PACKET = 0x02 HCI_EVENT_PACKET = 0x04 HCI_EV_CODE_DISCONN_CMP = 0x05 HCI_EV_CODE_CMD_CMP = 0x0e HCI_EV_CODE_CMD_STATUS = 0x0f HCI_EV_CODE_LE_META_EVENT = 0x3e HCI_SUBEV_CODE_LE_ENHANCED_CONN_CMP = 0x0a HCI_SUBEV_CODE_LE_DATA_LEN_CHANGE = 0x07 HCI_SUBEV_CODE_LE_PHY_UPDATE_CMP = 0x0c HCI_SUBEV_CODE_LE_CHAN_SEL_ALG = 0x14 HCI_EV_NUM_COMP_PKTS = 0x13 CONN_FAILED_TO_BE_ESTABLISHED = 0x3e CONN_TIMEOUT = 0x08 OGF_HOST_CTL = 0x03 OCF_SET_EVENT_MASK = 0x0001 OCF_RESET = 0X0003 OGF_INFO_PARAM = 0x04 OCF_READ_LOCAL_COMMANDS = 0x0002 OCF_READ_BD_ADDR = 0x0009 OGF_LE_CTL = 0x08 OCF_LE_SET_EVENT_MASK = 0x0001 OCF_LE_READ_BUFFER_SIZE_V1 = 0x0002 OCF_LE_READ_BUFFER_SIZE_V2 = 0x0060 OCF_LE_SET_RANDOM_ADDRESS = 0x0005 OCF_LE_SET_ADVERTISING_PARAMETERS = 0x0006 OCF_LE_SET_ADVERTISE_ENABLE = 0x000a OCF_LE_SET_SCAN_PARAMETERS = 0x000b OCF_LE_SET_SCAN_ENABLE = 0x000c OCF_LE_CREATE_CONN = 0x000d OCF_LE_SET_DATA_LEN = 0x0022 OCF_LE_READ_SUGGESTED_DFLT_DATA_LEN = 0x0023 OCF_LE_READ_MAX_DATA_LEN = 0x002f OCF_LE_READ_PHY = 0x0030 OCF_LE_SET_DFLT_PHY = 0x0031 OCF_LE_SET_PHY = 0x0032 OGF_VENDOR_SPECIFIC = 0x003f BLE_HCI_OCF_VS_RD_STATIC_ADDR = 0x0001 PUBLIC_ADDRESS_TYPE = 0 STATIC_RANDOM_ADDRESS_TYPE = 1 WAIT_FOR_EVENT_TIMEOUT = 5 WAIT_FOR_EVENT_CONN_TIMEOUT = 25 ############ # GLOBAL VAR ############ num_of_bytes_to_send = None # based on supported_max_tx_octets num_of_packets_to_send = None events_list = [] bdaddr = '00:00:00:00:00:00' static_addr = '00:00:00:00:00:00' le_read_buffer_size = None conn_handle = 0 requested_tx_octets = 1 requested_tx_time = 1 suggested_dflt_data_len = None max_data_len = None phy = None ev_num_comp_pkts = None num_of_completed_packets_cnt = 0 num_of_completed_packets_time = 0 ############ # FUNCTIONS ############ ############ # GLOBAL VAR CLASSES ############ ############ # EVENTS ############ class HCI_Ev_LE_Chan_Sel_Alg(HCI_Ev_LE_Meta): connection_handle: int algorithm: int ############ # PARAMETERS ############ ############ # RX / TX ############
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, ...
2.311589
1,303
"""Simple Hail query example.""" import click import hail as hl from bokeh.io.export import get_screenshot_as_png from analysis_runner import output_path GNOMAD_HGDP_1KG_MT = ( 'gs://gcp-public-data--gnomad/release/3.1/mt/genomes/' 'gnomad.genomes.v3.1.hgdp_1kg_subset_dense.mt' ) if __name__ == '__main__': query() # pylint: disable=no-value-for-parameter
[ 37811, 26437, 42913, 12405, 1672, 526, 15931, 198, 198, 11748, 3904, 198, 11748, 32405, 355, 289, 75, 198, 6738, 1489, 365, 71, 13, 952, 13, 39344, 1330, 651, 62, 1416, 26892, 62, 292, 62, 11134, 198, 6738, 3781, 62, 16737, 1330, 5072...
2.335404
161
import uuid import time import socket import struct
[ 11748, 334, 27112, 198, 11748, 640, 198, 11748, 17802, 198, 11748, 2878, 628, 628, 628, 628, 628, 628, 628, 628, 628 ]
3.285714
21
""" How to load morphologies of certain cells from the database. """ #this is an expected failure right now, as morphology is not implemented from __future__ import absolute_import from __future__ import print_function import PyOpenWorm as P from PyOpenWorm.context import Context from PyOpenWorm.worm import Worm from six import StringIO #Connect to database. with P.connect('default.conf') as conn: ctx = Context(ident="http://openworm.org/data", conf=conn.conf).stored #Create a new Cell object to work with. aval = ctx(Worm)().get_neuron_network().aneuron('AVAL') #Get the morphology associated with the Cell. Returns a neuroml.Morphology object. morph = aval._morphology() out = StringIO() morph.export(out, 0) # we're printing it here, but we would normally do something else with the morphology object. print(str(out.read()))
[ 37811, 198, 2437, 284, 3440, 17488, 5823, 286, 1728, 4778, 422, 262, 6831, 13, 198, 37811, 198, 2, 5661, 318, 281, 2938, 5287, 826, 783, 11, 355, 46320, 318, 407, 9177, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, ...
3.329502
261
from __future__ import absolute_import from __future__ import unicode_literals from django.test import SimpleTestCase from corehq.apps.app_manager.const import ( AUTO_SELECT_RAW, AUTO_SELECT_CASE, WORKFLOW_FORM, WORKFLOW_MODULE, WORKFLOW_PREVIOUS, WORKFLOW_ROOT, WORKFLOW_PARENT_MODULE, ) from corehq.apps.app_manager.models import FormDatum, FormLink from corehq.apps.app_manager.suite_xml.post_process.workflow import _replace_session_references_in_stack, CommandId from corehq.apps.app_manager.suite_xml.xml_models import StackDatum from corehq.apps.app_manager.tests.app_factory import AppFactory from corehq.apps.app_manager.tests.util import TestXmlMixin from corehq.apps.app_manager.xpath import session_var
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 9288, 1330, 17427, 14402, 20448, 198, 198, 6738, 4755, 71, 80, 13, 18211, 13, 1324, 62, 37153,...
2.742647
272
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Loads, converts, and runs sample models.""" import abc import collections import functools import tempfile import time from typing import Callable, Iterable, List, Mapping, Optional, Sequence, Union from absl import logging import numpy as np from tensorflow.core.framework import graph_pb2 from tensorflow.core.framework import tensor_shape_pb2 from tensorflow.core.protobuf import config_pb2 from tensorflow.core.protobuf import meta_graph_pb2 from tensorflow.python.client import session from tensorflow.python.compiler.tensorrt import trt_convert as trt from tensorflow.python.framework import convert_to_constants from tensorflow.python.framework import dtypes as tf_dtypes from tensorflow.python.framework import importer from tensorflow.python.framework import ops as framework_ops from tensorflow.python.ops import random_ops from tensorflow.python.saved_model import load as saved_model_load from tensorflow.python.saved_model import loader as saved_model_loader from tensorflow.python.saved_model import signature_constants from tensorflow.python.saved_model import tag_constants # pylint: disable=bad-whitespace ### Helper Functions def _get_concrete_tensor_shape( tensor_shape: tensor_shape_pb2.TensorShapeProto, batch_size: Optional[int] = None) -> Sequence[int]: """Gets a concrete tensor shape without dynamic dimensions.""" if tensor_shape.unknown_rank: raise ValueError("Cannot generates random tensors for unknown rank!") shape = [dim.size for dim in tensor_shape.dim] if not shape: raise ValueError("The tensor cannot have a rank of 0!") if shape[0] < 0: if batch_size is None or batch_size <= 0: raise ValueError("Must provide a valid batch size " "as the tensor has a dynamic batch size!") shape[0] = batch_size if any(filter(lambda x: x < 0, shape)): raise ValueError("Cannot have dynamic dimensions except for batch size!") return shape def _generate_random_tensor_v1(tensor_info: meta_graph_pb2.TensorInfo, batch_size: Optional[int] = None) -> np.ndarray: """Generates a random tensor based on the data type and tensor shape.""" dtype = tf_dtypes.as_dtype(tensor_info.dtype) shape = _get_concrete_tensor_shape(tensor_info.tensor_shape, batch_size) with session.Session(): return random_ops.random_uniform( shape=shape, dtype=dtype, name=tensor_info.name.split(":")[0]).eval() def _generate_random_tensor_v2( tensor: framework_ops.Tensor, batch_size: Optional[int] = None) -> framework_ops.Tensor: """Generates a random tensor based on the data type and tensor shape.""" shape = _get_concrete_tensor_shape(tensor.shape.as_proto(), batch_size) return random_ops.random_uniform( shape=shape, dtype=tensor.dtype, name=tensor.name) # Models are repeatedly loaded for different TensorRT conversion settings. # Using cache can reduce I/O. ### Test Classes class TestResult( collections.namedtuple("TestResult", ["outputs", "latency", "trt_convert_params"])): class ModelConfig( collections.namedtuple("ModelConfig", [ "saved_model_dir", "saved_model_tags", "saved_model_signature_key", "default_batch_size" ])): """Configurations for test models.""" class TestResultCollection( collections.namedtuple("TestResultCollection", ["results", "config"])): class _ModelHandlerBase(metaclass=abc.ABCMeta): """Base class for running a model.""" batch_size = batch_size or self.model_config.default_batch_size return { tensor_info.name: _generate_random_tensor_v1(tensor_info, batch_size) for tensor_info in self.input_tensor_info.values() } class ModelHandlerV2(_ModelHandlerBase): """Runs a model in TF2.""" def generate_random_inputs(self, batch_size: Optional[int] = None ) -> Sequence[framework_ops.Tensor]: batch_size = batch_size or self.model_config.default_batch_size return [ _generate_random_tensor_v2(tensor, batch_size) for tensor in self.graph_func.inputs ] class _TrtModelHandlerBase(_ModelHandlerBase): """Base class for converting and running a model.""" def _check_contains_trt_engine(self, graph_def: graph_pb2.GraphDef): if "TRTEngineOp" not in [node.op for node in graph_def.node]: raise RuntimeError("Failed to convert to TensorRT! " "Model Information: {}".format(str(self))) def save(self, output_saved_model_dir: Optional[str] = None, overwrite=True) -> None: """Saves a TensorRT converted model.""" if self._conversion_is_saved and not overwrite: return output_saved_model_dir = output_saved_model_dir or tempfile.mkdtemp() logging.info("Saving TensorRT model to %s!", output_saved_model_dir) self._converter.save(output_saved_model_dir) self._model_config = self.model_config._replace( saved_model_dir=output_saved_model_dir) self._conversion_is_saved = True class TrtModelHandlerV1(_TrtModelHandlerBase, ModelHandlerV1): """Converts a TF1 model with TensorRT and runs the converted model.""" _check_conversion = _TrtModelHandlerBase._check_contains_trt_engine class TrtModelHandlerV2(_TrtModelHandlerBase, ModelHandlerV2): """Converts a TF2 model with TensorRT and runs the converted model.""" class _ModelHandlerManagerBase(metaclass=abc.ABCMeta): """Manages a series of ModelHandlers for aggregrated testing/benchmarking.""" def generate_random_inputs(self, batch_size: Optional[int] = None): return self._ori_model.generate_random_inputs(batch_size) def run(self, inputs=None, warmup_iterations: int = 10, benchmark_iterations: int = 100) -> TestResultCollection: """Runs model inference with provided or randomly generated input tensors. Args: inputs: Mapping from names to input ndarrays in TF1. Or a sequence of tensors in TF2. If `None`, ramdomly generated input tensors will be used instead. warmup_iterations: Number of inferences to warm up the runtime. benchmark_iterations: Number of inferences to measure the latency. Returns: `TestResultCollection` summarizing timing and numerics information for different TensorRT conversion settings. """ inputs = inputs or self.generate_random_inputs() results = [ model.run(inputs, warmup_iterations, benchmark_iterations) for model in [self._ori_model] + self._trt_models ] return self._result_collection._replace(results=results) class ModelHandlerManagerV1(_ModelHandlerManagerBase): """Manages a series of ModelHandlers for aggregrated testing/benchmarking in TF1.""" model_handler_cls = ModelHandlerV1 trt_model_handler_cls = TrtModelHandlerV1 class ModelHandlerManagerV2(_ModelHandlerManagerBase): """Manages a series of ModelHandlers for aggregrated testing/benchmarking in TF2.""" model_handler_cls = ModelHandlerV2 trt_model_handler_cls = TrtModelHandlerV2
[ 2, 15069, 12131, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846,...
2.901046
2,678
eval(input("Enter a expression "))
[ 18206, 7, 15414, 7203, 17469, 257, 5408, 366, 4008 ]
3.777778
9
import numpy as np import matplotlib.pyplot as plt import pandas as pd # load dataset into Pandas DataFrame df = pd.read_csv("D:\Python_programs\ML\Iris Data\KPCA\iris.csv") #df.to_csv('iris.csv') from sklearn.preprocessing import StandardScaler features = ['sepal length', 'sepal width', 'petal length', 'petal width'] # Separating out the features x = df.loc[:, features].values # Separating out the target y = df.loc[:,['target']].values # Standardizing the features x = StandardScaler().fit_transform(x) from sklearn.decomposition import KernelPCA ## Finding the principle components # KERNELS : linear,rbf,poly # #------------------------------------------------------ k=['linear','rbf','poly'] for i in k: Kernel_Pca(i)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 3440, 27039, 656, 16492, 292, 6060, 19778, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, ...
3.057851
242
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from typing import List, Pattern from recognizers_text.utilities import RegExpUtility from recognizers_number.number import BaseNumberParser from recognizers_number.number.italian.extractors import ItalianIntegerExtractor, ItalianCardinalExtractor from recognizers_number.number.italian.parsers import ItalianNumberParserConfiguration from ...resources.base_date_time import BaseDateTime from ...resources.italian_date_time import ItalianDateTime from ..extractors import DateTimeExtractor from ..base_duration import BaseDurationExtractor from ..base_date import BaseDateExtractor from ..base_dateperiod import DatePeriodExtractorConfiguration, MatchedIndex from .duration_extractor_config import ItalianDurationExtractorConfiguration from .date_extractor_config import ItalianDateExtractorConfiguration from recognizers_text.extractor import Extractor from recognizers_number import ItalianOrdinalExtractor, BaseNumberExtractor, ItalianCardinalExtractor
[ 2, 220, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 220, 49962, 739, 262, 17168, 13789, 13, 198, 198, 6738, 19720, 1330, 7343, 11, 23939, 198, 198, 6738, 3018, 11341, 62, 5239, 13, 315, 2410, 1330, 3310, 16870...
4.236948
249
"""SQLite Driver implementation.""" # pylint: disable=R0201 import os import sqlite3 from typing import Any, AnyStr, List, NoReturn, Optional, Tuple from pydbrepo.drivers.driver import Driver
[ 37811, 17861, 578, 12434, 7822, 526, 15931, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 49, 15, 1264, 198, 198, 11748, 28686, 198, 11748, 44161, 578, 18, 198, 6738, 19720, 1330, 4377, 11, 4377, 13290, 11, 7343, 11, 1400, 13615, 11, ...
3.266667
60
import numpy as np from PuzzleLib import Config from PuzzleLib.Backend import gpuarray, Blas from PuzzleLib.Backend.Dnn import batchNormNd, batchNormNdBackward from PuzzleLib.Variable import Variable from PuzzleLib.Modules.Module import ModuleError, Module
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 23966, 25835, 1330, 17056, 198, 198, 6738, 23966, 25835, 13, 7282, 437, 1330, 308, 19944, 18747, 11, 1086, 292, 198, 6738, 23966, 25835, 13, 7282, 437, 13, 35, 20471, 1330, 15458, 35393, 45...
3.575342
73
xs = ('foo', 'bar', 'baz'<caret>
[ 34223, 796, 19203, 21943, 3256, 705, 5657, 3256, 198, 220, 220, 220, 220, 220, 705, 65, 1031, 6, 27, 6651, 83, 29 ]
1.727273
22
from concurrent import futures from forecaster.prophet import Forecaster as ProphetForecaster from multiprocessing import Event, Process, cpu_count from pythonjsonlogger import jsonlogger import contextlib import grpc import logging import model.api.forecast_pb2_grpc as grpc_lib import os import signal import socket import sys import time def json_logger(): logger = logging.getLogger() log_handler = logging.StreamHandler(sys.stdout) formatter = jsonlogger.JsonFormatter(fmt='%(asctime)s %(name)s %(levelname)s %(message)s') log_handler.setFormatter(formatter) log_handler.flush = sys.stdout.flush logger.setLevel(logging.INFO) logger.addHandler(log_handler) return logger
[ 6738, 24580, 1330, 25650, 198, 6738, 1674, 17970, 13, 22930, 3202, 1330, 4558, 17970, 355, 13583, 16351, 17970, 198, 6738, 18540, 305, 919, 278, 1330, 8558, 11, 10854, 11, 42804, 62, 9127, 198, 6738, 21015, 17752, 6404, 1362, 1330, 33918,...
3.042918
233
def test_setupcall(): """ Test the call of the setup function """ import jupyter_libertem_proxy as jx print("\nRunning test_setupcall...") print(jx.setup_libertem())
[ 4299, 1332, 62, 40406, 13345, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6208, 262, 869, 286, 262, 9058, 2163, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1330, 474, 929, 88, 353, 62, 33203, 11498, 62, 36436, 355, 474,...
2.581081
74
# Copyright 2020 DeepMind Technologies Limited. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """WorkerManager handles thread and process-based runtimes.""" import atexit import collections from concurrent import futures import ctypes import os import signal import subprocess import threading import time from typing import Optional, Sequence, Text from absl import flags from absl import logging from absl.testing import absltest from launchpad import flags as lp_flags import psutil import termcolor FLAGS = flags.FLAGS ThreadWorker = collections.namedtuple('ThreadWorker', ['thread', 'future']) _WORKER_MANAGERS = threading.local() _HAS_MAIN_MANAGER = False def register_signal_handler(sig, handler): """Registers a signal handler.""" return signal.signal(sig, handler) def wait_for_stop(): """Blocks until termination of the node's program is requested. Can be used to perform cleanup at the end of the run, for example: start_server() lp.wait_for_stop() stop_server() checkpoint() """ get_worker_manager().wait_for_stop()
[ 2, 15069, 12131, 10766, 28478, 21852, 15302, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 35...
3.477223
461
# Copyright (c) OpenMMLab. All rights reserved. import ctypes import glob import logging import os def get_ops_path() -> str: """Get path of the TensorRT plugin library. Returns: str: A path of the TensorRT plugin library. """ wildcard = os.path.abspath( os.path.join( os.path.dirname(__file__), '../../../build/lib/libmmdeploy_tensorrt_ops.so')) paths = glob.glob(wildcard) lib_path = paths[0] if len(paths) > 0 else '' return lib_path def load_tensorrt_plugin() -> bool: """Load TensorRT plugins library. Returns: bool: True if TensorRT plugin library is successfully loaded. """ lib_path = get_ops_path() success = False if os.path.exists(lib_path): ctypes.CDLL(lib_path) logging.info(f'Successfully loaded tensorrt plugins from {lib_path}') success = True else: logging.warning(f'Could not load the library of tensorrt plugins. \ Because the file does not exist: {lib_path}') return success
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 11748, 269, 19199, 198, 11748, 15095, 198, 11748, 18931, 198, 11748, 28686, 628, 198, 4299, 651, 62, 2840, 62, 6978, 3419, 4613, 965, 25, 198, 220, 220, 220,...
2.445476
431
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import logging import os import random import unittest from typing import Optional import numpy as np import pytorch_lightning as pl import torch import torch.nn as nn from parameterized import parameterized from reagent.core import types as rlt from reagent.core.parameters import ( NormalizationData, NormalizationParameters, ProblemDomain, Seq2RewardTrainerParameters, ) from reagent.gym.envs import Gym from reagent.gym.utils import create_df_from_replay_buffer from reagent.models.seq2reward_model import Seq2RewardNetwork from reagent.net_builder.value.fully_connected import FullyConnected from reagent.prediction.predictor_wrapper import ( Seq2RewardWithPreprocessor, Seq2RewardPlanShortSeqWithPreprocessor, FAKE_STATE_ID_LIST_FEATURES, FAKE_STATE_ID_SCORE_LIST_FEATURES, ) from reagent.preprocessing.identify_types import DO_NOT_PREPROCESS from reagent.preprocessing.preprocessor import Preprocessor from reagent.training.utils import gen_permutations from reagent.training.world_model.compress_model_trainer import CompressModelTrainer from reagent.training.world_model.seq2reward_trainer import get_Q, Seq2RewardTrainer from torch.utils.data import DataLoader logger = logging.getLogger(__name__) SEED = 0 STRING_GAME_TESTS = [(False,), (True,)] def create_string_game_data( dataset_size=10000, training_data_ratio=0.9, filter_short_sequence=False ): SEQ_LEN = 6 NUM_ACTION = 2 NUM_MDP_PER_BATCH = 5 env = Gym(env_name="StringGame-v0", set_max_steps=SEQ_LEN) df = create_df_from_replay_buffer( env=env, problem_domain=ProblemDomain.DISCRETE_ACTION, desired_size=dataset_size, multi_steps=None, ds="2020-10-10", ) if filter_short_sequence: batch_size = NUM_MDP_PER_BATCH time_diff = torch.ones(SEQ_LEN, batch_size) valid_step = SEQ_LEN * torch.ones(batch_size, dtype=torch.int64)[:, None] not_terminal = torch.Tensor( [0 if i == SEQ_LEN - 1 else 1 for i in range(SEQ_LEN)] ) not_terminal = torch.transpose(not_terminal.tile(NUM_MDP_PER_BATCH, 1), 0, 1) else: batch_size = NUM_MDP_PER_BATCH * SEQ_LEN time_diff = torch.ones(SEQ_LEN, batch_size) valid_step = torch.arange(SEQ_LEN, 0, -1).tile(NUM_MDP_PER_BATCH)[:, None] not_terminal = torch.transpose( torch.tril(torch.ones(SEQ_LEN, SEQ_LEN), diagonal=-1).tile( NUM_MDP_PER_BATCH, 1 ), 0, 1, ) num_batches = int(dataset_size / SEQ_LEN / NUM_MDP_PER_BATCH) batches = [None for _ in range(num_batches)] batch_count, batch_seq_count = 0, 0 batch_reward = torch.zeros(SEQ_LEN, batch_size) batch_action = torch.zeros(SEQ_LEN, batch_size, NUM_ACTION) batch_state = torch.zeros(SEQ_LEN, batch_size, NUM_ACTION) for mdp_id in sorted(set(df.mdp_id)): mdp = df[df["mdp_id"] == mdp_id].sort_values("sequence_number", ascending=True) if len(mdp) != SEQ_LEN: continue all_step_reward = torch.Tensor(list(mdp["reward"])) all_step_state = torch.Tensor([list(s.values()) for s in mdp["state_features"]]) all_step_action = torch.zeros_like(all_step_state) all_step_action[torch.arange(SEQ_LEN), [int(a) for a in mdp["action"]]] = 1.0 for j in range(SEQ_LEN): if filter_short_sequence and j > 0: break reward = torch.zeros_like(all_step_reward) reward[: SEQ_LEN - j] = all_step_reward[-(SEQ_LEN - j) :] batch_reward[:, batch_seq_count] = reward state = torch.zeros_like(all_step_state) state[: SEQ_LEN - j] = all_step_state[-(SEQ_LEN - j) :] batch_state[:, batch_seq_count] = state action = torch.zeros_like(all_step_action) action[: SEQ_LEN - j] = all_step_action[-(SEQ_LEN - j) :] batch_action[:, batch_seq_count] = action batch_seq_count += 1 if batch_seq_count == batch_size: batches[batch_count] = rlt.MemoryNetworkInput( reward=batch_reward, action=rlt.FeatureData(float_features=batch_action), state=rlt.FeatureData(float_features=batch_state), next_state=rlt.FeatureData( float_features=torch.zeros_like(batch_state) ), # fake, not used anyway not_terminal=not_terminal, time_diff=time_diff, valid_step=valid_step, step=None, ) batch_count += 1 batch_seq_count = 0 batch_reward = torch.zeros_like(batch_reward) batch_action = torch.zeros_like(batch_action) batch_state = torch.zeros_like(batch_state) assert batch_count == num_batches num_training_batches = int(training_data_ratio * num_batches) training_data = DataLoader( batches[:num_training_batches], collate_fn=lambda x: x[0] ) eval_data = DataLoader(batches[num_training_batches:], collate_fn=lambda x: x[0]) return training_data, eval_data def train_seq2reward_model(training_data, learning_rate=0.01, num_epochs=5): SEQ_LEN, batch_size, NUM_ACTION = next( iter(training_data) ).action.float_features.shape assert SEQ_LEN == 6 and NUM_ACTION == 2 seq2reward_network = Seq2RewardNetwork( state_dim=NUM_ACTION, action_dim=NUM_ACTION, num_hiddens=64, num_hidden_layers=2, ) trainer_param = Seq2RewardTrainerParameters( learning_rate=learning_rate, multi_steps=SEQ_LEN, action_names=["0", "1"], gamma=1.0, view_q_value=True, ) trainer = Seq2RewardTrainer( seq2reward_network=seq2reward_network, params=trainer_param ) pl.seed_everything(SEED) pl_trainer = pl.Trainer(max_epochs=num_epochs, deterministic=True) pl_trainer.fit(trainer, training_data) return trainer def eval_seq2reward_model(eval_data, seq2reward_trainer): SEQ_LEN, batch_size, NUM_ACTION = next(iter(eval_data)).action.float_features.shape initial_state = torch.Tensor([[0, 0]]) initial_state_q_values = torch.squeeze( get_Q( seq2reward_trainer.seq2reward_network, initial_state, seq2reward_trainer.all_permut, ) ) total_mse_loss = 0 total_q_values = torch.zeros(NUM_ACTION) total_action_distribution = torch.zeros(NUM_ACTION) for idx, batch in enumerate(eval_data): ( mse_loss, _, q_values, action_distribution, ) = seq2reward_trainer.validation_step(batch, idx) total_mse_loss += mse_loss total_q_values += torch.tensor(q_values) total_action_distribution += torch.tensor(action_distribution) N_eval = len(eval_data) eval_mse_loss = total_mse_loss / N_eval eval_q_values = total_q_values / N_eval eval_action_distribution = total_action_distribution / N_eval return ( initial_state_q_values, eval_mse_loss, eval_q_values, eval_action_distribution, ) def train_seq2reward_compress_model( training_data, seq2reward_network, learning_rate=0.1, num_epochs=5 ): SEQ_LEN, batch_size, NUM_ACTION = next( iter(training_data) ).action.float_features.shape assert SEQ_LEN == 6 and NUM_ACTION == 2 compress_net_builder = FullyConnected(sizes=[8, 8]) state_normalization_data = NormalizationData( dense_normalization_parameters={ 0: NormalizationParameters(feature_type=DO_NOT_PREPROCESS), 1: NormalizationParameters(feature_type=DO_NOT_PREPROCESS), } ) compress_model_network = compress_net_builder.build_value_network( state_normalization_data, output_dim=NUM_ACTION, ) trainer_param = Seq2RewardTrainerParameters( learning_rate=0.0, multi_steps=SEQ_LEN, action_names=["0", "1"], compress_model_learning_rate=learning_rate, gamma=1.0, view_q_value=True, ) trainer = CompressModelTrainer( compress_model_network=compress_model_network, seq2reward_network=seq2reward_network, params=trainer_param, ) pl.seed_everything(SEED) pl_trainer = pl.Trainer(max_epochs=num_epochs, deterministic=True) pl_trainer.fit(trainer, training_data) return trainer def eval_seq2reward_compress_model(eval_data, compress_model_trainer): SEQ_LEN, batch_size, NUM_ACTION = next(iter(eval_data)).action.float_features.shape total_mse_loss = 0 total_q_values = torch.zeros(NUM_ACTION) total_action_distribution = torch.zeros(NUM_ACTION) for idx, batch in enumerate(eval_data): ( mse_loss, q_values, action_distribution, _, ) = compress_model_trainer.validation_step(batch, idx) total_mse_loss += mse_loss total_q_values += torch.tensor(q_values) total_action_distribution += torch.tensor(action_distribution) N_eval = len(eval_data) eval_mse_loss = total_mse_loss / N_eval eval_q_values = total_q_values / N_eval eval_action_distribution = total_action_distribution / N_eval return eval_mse_loss, eval_q_values, eval_action_distribution
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 2489, 10395, 13, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 555, 715, 395, 198,...
2.200462
4,325
# MINLP written by GAMS Convert at 01/15/21 11:37:33 # # Equation counts # Total E G L N X C B # 1486 571 111 804 0 0 0 0 # # Variable counts # x b i s1s s2s sc si # Total cont binary integer sos1 sos2 scont sint # 865 685 180 0 0 0 0 0 # FX 0 0 0 0 0 0 0 0 # # Nonzero counts # Total const NL DLL # 3373 3193 180 0 # # Reformulation has removed 1 variable and 1 equation from pyomo.environ import * model = m = ConcreteModel() m.x2 = Var(within=Reals,bounds=(0,40),initialize=0) m.x3 = Var(within=Reals,bounds=(0,40),initialize=0) m.x4 = Var(within=Reals,bounds=(0,40),initialize=0) m.x5 = Var(within=Reals,bounds=(0,None),initialize=0) m.x6 = Var(within=Reals,bounds=(0,None),initialize=0) m.x7 = Var(within=Reals,bounds=(0,None),initialize=0) m.x8 = Var(within=Reals,bounds=(0,None),initialize=0) m.x9 = Var(within=Reals,bounds=(0,None),initialize=0) m.x10 = Var(within=Reals,bounds=(0,None),initialize=0) m.x11 = Var(within=Reals,bounds=(0,None),initialize=0) m.x12 = Var(within=Reals,bounds=(0,None),initialize=0) m.x13 = Var(within=Reals,bounds=(0,None),initialize=0) m.x14 = Var(within=Reals,bounds=(0,None),initialize=0) m.x15 = Var(within=Reals,bounds=(0,None),initialize=0) m.x16 = Var(within=Reals,bounds=(0,None),initialize=0) m.x17 = Var(within=Reals,bounds=(0,None),initialize=0) m.x18 = Var(within=Reals,bounds=(0,None),initialize=0) m.x19 = Var(within=Reals,bounds=(0,None),initialize=0) m.x20 = Var(within=Reals,bounds=(0,None),initialize=0) m.x21 = Var(within=Reals,bounds=(0,None),initialize=0) m.x22 = Var(within=Reals,bounds=(0,None),initialize=0) m.x23 = Var(within=Reals,bounds=(0,None),initialize=0) m.x24 = Var(within=Reals,bounds=(0,None),initialize=0) m.x25 = Var(within=Reals,bounds=(0,None),initialize=0) m.x26 = Var(within=Reals,bounds=(0,None),initialize=0) m.x27 = Var(within=Reals,bounds=(0,None),initialize=0) m.x28 = Var(within=Reals,bounds=(0,None),initialize=0) m.x29 = Var(within=Reals,bounds=(0,None),initialize=0) m.x30 = Var(within=Reals,bounds=(0,None),initialize=0) m.x31 = Var(within=Reals,bounds=(0,None),initialize=0) m.x32 = Var(within=Reals,bounds=(0,None),initialize=0) m.x33 = Var(within=Reals,bounds=(0,None),initialize=0) m.x34 = Var(within=Reals,bounds=(0,None),initialize=0) m.x35 = Var(within=Reals,bounds=(0,30),initialize=0) m.x36 = Var(within=Reals,bounds=(0,30),initialize=0) m.x37 = Var(within=Reals,bounds=(0,30),initialize=0) m.x38 = Var(within=Reals,bounds=(0,None),initialize=0) m.x39 = Var(within=Reals,bounds=(0,None),initialize=0) m.x40 = Var(within=Reals,bounds=(0,None),initialize=0) m.x41 = Var(within=Reals,bounds=(0,None),initialize=0) m.x42 = Var(within=Reals,bounds=(0,None),initialize=0) m.x43 = Var(within=Reals,bounds=(0,None),initialize=0) m.x44 = Var(within=Reals,bounds=(0,None),initialize=0) m.x45 = Var(within=Reals,bounds=(0,None),initialize=0) m.x46 = Var(within=Reals,bounds=(0,None),initialize=0) m.x47 = Var(within=Reals,bounds=(0,None),initialize=0) m.x48 = Var(within=Reals,bounds=(0,None),initialize=0) m.x49 = Var(within=Reals,bounds=(0,None),initialize=0) m.x50 = Var(within=Reals,bounds=(0,None),initialize=0) m.x51 = Var(within=Reals,bounds=(0,None),initialize=0) m.x52 = Var(within=Reals,bounds=(0,None),initialize=0) m.x53 = Var(within=Reals,bounds=(0,None),initialize=0) m.x54 = Var(within=Reals,bounds=(0,None),initialize=0) m.x55 = Var(within=Reals,bounds=(0,None),initialize=0) m.x56 = Var(within=Reals,bounds=(0,None),initialize=0) m.x57 = Var(within=Reals,bounds=(0,None),initialize=0) m.x58 = Var(within=Reals,bounds=(0,None),initialize=0) m.x59 = Var(within=Reals,bounds=(0,None),initialize=0) m.x60 = Var(within=Reals,bounds=(0,None),initialize=0) m.x61 = Var(within=Reals,bounds=(0,None),initialize=0) m.x62 = Var(within=Reals,bounds=(0,None),initialize=0) m.x63 = Var(within=Reals,bounds=(0,None),initialize=0) m.x64 = Var(within=Reals,bounds=(0,None),initialize=0) m.x65 = Var(within=Reals,bounds=(0,None),initialize=0) m.x66 = Var(within=Reals,bounds=(0,None),initialize=0) m.x67 = Var(within=Reals,bounds=(0,None),initialize=0) m.x68 = Var(within=Reals,bounds=(0,None),initialize=0) m.x69 = Var(within=Reals,bounds=(0,None),initialize=0) m.x70 = Var(within=Reals,bounds=(0,None),initialize=0) m.x71 = Var(within=Reals,bounds=(0,None),initialize=0) m.x72 = Var(within=Reals,bounds=(0,None),initialize=0) m.x73 = Var(within=Reals,bounds=(0,None),initialize=0) m.x74 = Var(within=Reals,bounds=(0,None),initialize=0) m.x75 = Var(within=Reals,bounds=(0,None),initialize=0) m.x76 = Var(within=Reals,bounds=(0,None),initialize=0) m.x77 = Var(within=Reals,bounds=(0,None),initialize=0) m.x78 = Var(within=Reals,bounds=(0,None),initialize=0) m.x79 = Var(within=Reals,bounds=(0,None),initialize=0) m.x80 = Var(within=Reals,bounds=(0,None),initialize=0) m.x81 = Var(within=Reals,bounds=(0,None),initialize=0) m.x82 = Var(within=Reals,bounds=(0,None),initialize=0) m.x83 = Var(within=Reals,bounds=(0,None),initialize=0) m.x84 = Var(within=Reals,bounds=(0,None),initialize=0) m.x85 = Var(within=Reals,bounds=(0,None),initialize=0) m.x86 = Var(within=Reals,bounds=(0,20),initialize=0) m.x87 = Var(within=Reals,bounds=(0,20),initialize=0) m.x88 = Var(within=Reals,bounds=(0,20),initialize=0) m.x89 = Var(within=Reals,bounds=(0,20),initialize=0) m.x90 = Var(within=Reals,bounds=(0,20),initialize=0) m.x91 = Var(within=Reals,bounds=(0,20),initialize=0) m.x92 = Var(within=Reals,bounds=(0,None),initialize=0) m.x93 = Var(within=Reals,bounds=(0,None),initialize=0) m.x94 = Var(within=Reals,bounds=(0,None),initialize=0) m.x95 = Var(within=Reals,bounds=(0,None),initialize=0) m.x96 = Var(within=Reals,bounds=(0,None),initialize=0) m.x97 = Var(within=Reals,bounds=(0,None),initialize=0) m.x98 = Var(within=Reals,bounds=(0,None),initialize=0) m.x99 = Var(within=Reals,bounds=(0,None),initialize=0) m.x100 = Var(within=Reals,bounds=(0,None),initialize=0) m.x101 = Var(within=Reals,bounds=(0,None),initialize=0) m.x102 = Var(within=Reals,bounds=(0,None),initialize=0) m.x103 = Var(within=Reals,bounds=(0,None),initialize=0) m.x104 = Var(within=Reals,bounds=(0,None),initialize=0) m.x105 = Var(within=Reals,bounds=(0,None),initialize=0) m.x106 = Var(within=Reals,bounds=(0,None),initialize=0) m.x107 = Var(within=Reals,bounds=(0,None),initialize=0) m.x108 = Var(within=Reals,bounds=(0,None),initialize=0) m.x109 = Var(within=Reals,bounds=(0,None),initialize=0) m.x110 = Var(within=Reals,bounds=(0,None),initialize=0) m.x111 = Var(within=Reals,bounds=(0,None),initialize=0) m.x112 = Var(within=Reals,bounds=(0,None),initialize=0) m.x113 = Var(within=Reals,bounds=(0,None),initialize=0) m.x114 = Var(within=Reals,bounds=(0,None),initialize=0) m.x115 = Var(within=Reals,bounds=(0,None),initialize=0) m.x116 = Var(within=Reals,bounds=(0,None),initialize=0) m.x117 = Var(within=Reals,bounds=(0,None),initialize=0) m.x118 = Var(within=Reals,bounds=(0,None),initialize=0) m.x119 = Var(within=Reals,bounds=(0,None),initialize=0) m.x120 = Var(within=Reals,bounds=(0,None),initialize=0) m.x121 = Var(within=Reals,bounds=(0,None),initialize=0) m.x122 = Var(within=Reals,bounds=(0,None),initialize=0) m.x123 = Var(within=Reals,bounds=(0,None),initialize=0) m.x124 = Var(within=Reals,bounds=(0,None),initialize=0) m.x125 = Var(within=Reals,bounds=(0,None),initialize=0) m.x126 = Var(within=Reals,bounds=(0,None),initialize=0) m.x127 = Var(within=Reals,bounds=(0,None),initialize=0) m.x128 = Var(within=Reals,bounds=(0,None),initialize=0) m.x129 = Var(within=Reals,bounds=(0,None),initialize=0) m.x130 = Var(within=Reals,bounds=(0,None),initialize=0) m.x131 = Var(within=Reals,bounds=(0,None),initialize=0) m.x132 = Var(within=Reals,bounds=(0,None),initialize=0) m.x133 = Var(within=Reals,bounds=(0,None),initialize=0) m.x134 = Var(within=Reals,bounds=(0,None),initialize=0) m.x135 = Var(within=Reals,bounds=(0,None),initialize=0) m.x136 = Var(within=Reals,bounds=(0,None),initialize=0) m.x137 = Var(within=Reals,bounds=(0,None),initialize=0) m.x138 = Var(within=Reals,bounds=(0,None),initialize=0) m.x139 = Var(within=Reals,bounds=(0,None),initialize=0) m.x140 = Var(within=Reals,bounds=(0,None),initialize=0) m.x141 = Var(within=Reals,bounds=(0,None),initialize=0) m.x142 = Var(within=Reals,bounds=(0,None),initialize=0) m.x143 = Var(within=Reals,bounds=(0,None),initialize=0) m.x144 = Var(within=Reals,bounds=(0,None),initialize=0) m.x145 = Var(within=Reals,bounds=(0,None),initialize=0) m.x146 = Var(within=Reals,bounds=(0,None),initialize=0) m.x147 = Var(within=Reals,bounds=(0,None),initialize=0) m.x148 = Var(within=Reals,bounds=(0,None),initialize=0) m.x149 = Var(within=Reals,bounds=(0,None),initialize=0) m.x150 = Var(within=Reals,bounds=(0,None),initialize=0) m.x151 = Var(within=Reals,bounds=(0,None),initialize=0) m.x152 = Var(within=Reals,bounds=(0,None),initialize=0) m.x153 = Var(within=Reals,bounds=(0,None),initialize=0) m.x154 = Var(within=Reals,bounds=(0,None),initialize=0) m.x155 = Var(within=Reals,bounds=(0,None),initialize=0) m.x156 = Var(within=Reals,bounds=(0,None),initialize=0) m.x157 = Var(within=Reals,bounds=(0,None),initialize=0) m.x158 = Var(within=Reals,bounds=(0,None),initialize=0) m.x159 = Var(within=Reals,bounds=(0,None),initialize=0) m.x160 = Var(within=Reals,bounds=(0,None),initialize=0) m.x161 = Var(within=Reals,bounds=(0,None),initialize=0) m.x162 = Var(within=Reals,bounds=(0,None),initialize=0) m.x163 = Var(within=Reals,bounds=(0,None),initialize=0) m.x164 = Var(within=Reals,bounds=(0,None),initialize=0) m.x165 = Var(within=Reals,bounds=(0,None),initialize=0) m.x166 = Var(within=Reals,bounds=(0,None),initialize=0) m.x167 = Var(within=Reals,bounds=(0,None),initialize=0) m.x168 = Var(within=Reals,bounds=(0,None),initialize=0) m.x169 = Var(within=Reals,bounds=(0,None),initialize=0) m.x170 = Var(within=Reals,bounds=(0,30),initialize=0) m.x171 = Var(within=Reals,bounds=(0,30),initialize=0) m.x172 = Var(within=Reals,bounds=(0,30),initialize=0) m.x173 = Var(within=Reals,bounds=(0,None),initialize=0) m.x174 = Var(within=Reals,bounds=(0,None),initialize=0) m.x175 = Var(within=Reals,bounds=(0,None),initialize=0) m.x176 = Var(within=Reals,bounds=(0,None),initialize=0) m.x177 = Var(within=Reals,bounds=(0,None),initialize=0) m.x178 = Var(within=Reals,bounds=(0,None),initialize=0) m.x179 = Var(within=Reals,bounds=(0,None),initialize=0) m.x180 = Var(within=Reals,bounds=(0,None),initialize=0) m.x181 = Var(within=Reals,bounds=(0,None),initialize=0) m.x182 = Var(within=Reals,bounds=(0,None),initialize=0) m.x183 = Var(within=Reals,bounds=(0,None),initialize=0) m.x184 = Var(within=Reals,bounds=(0,None),initialize=0) m.x185 = Var(within=Reals,bounds=(0,None),initialize=0) m.x186 = Var(within=Reals,bounds=(0,None),initialize=0) m.x187 = Var(within=Reals,bounds=(0,None),initialize=0) m.x188 = Var(within=Reals,bounds=(0,None),initialize=0) m.x189 = Var(within=Reals,bounds=(0,None),initialize=0) m.x190 = Var(within=Reals,bounds=(0,None),initialize=0) m.x191 = Var(within=Reals,bounds=(0,None),initialize=0) m.x192 = Var(within=Reals,bounds=(0,None),initialize=0) m.x193 = Var(within=Reals,bounds=(0,None),initialize=0) m.x194 = Var(within=Reals,bounds=(0,None),initialize=0) m.x195 = Var(within=Reals,bounds=(0,None),initialize=0) m.x196 = Var(within=Reals,bounds=(0,None),initialize=0) m.x197 = Var(within=Reals,bounds=(0,None),initialize=0) m.x198 = Var(within=Reals,bounds=(0,None),initialize=0) m.x199 = Var(within=Reals,bounds=(0,None),initialize=0) m.x200 = Var(within=Reals,bounds=(0,None),initialize=0) m.x201 = Var(within=Reals,bounds=(0,None),initialize=0) m.x202 = Var(within=Reals,bounds=(0,None),initialize=0) m.x203 = Var(within=Reals,bounds=(0,None),initialize=0) m.x204 = Var(within=Reals,bounds=(0,None),initialize=0) m.x205 = Var(within=Reals,bounds=(0,None),initialize=0) m.x206 = Var(within=Reals,bounds=(0,None),initialize=0) m.x207 = Var(within=Reals,bounds=(0,None),initialize=0) m.x208 = Var(within=Reals,bounds=(0,None),initialize=0) m.x209 = Var(within=Reals,bounds=(0,None),initialize=0) m.x210 = Var(within=Reals,bounds=(0,None),initialize=0) m.x211 = Var(within=Reals,bounds=(0,None),initialize=0) m.x212 = Var(within=Reals,bounds=(0,None),initialize=0) m.x213 = Var(within=Reals,bounds=(0,None),initialize=0) m.x214 = Var(within=Reals,bounds=(0,None),initialize=0) m.x215 = Var(within=Reals,bounds=(0,None),initialize=0) m.x216 = Var(within=Reals,bounds=(0,None),initialize=0) m.x217 = Var(within=Reals,bounds=(0,None),initialize=0) m.x218 = Var(within=Reals,bounds=(0,None),initialize=0) m.x219 = Var(within=Reals,bounds=(0,None),initialize=0) m.x220 = Var(within=Reals,bounds=(0,None),initialize=0) m.x221 = Var(within=Reals,bounds=(0,None),initialize=0) m.x222 = Var(within=Reals,bounds=(0,None),initialize=0) m.x223 = Var(within=Reals,bounds=(0,None),initialize=0) m.x224 = Var(within=Reals,bounds=(0,None),initialize=0) m.x225 = Var(within=Reals,bounds=(0,None),initialize=0) m.x226 = Var(within=Reals,bounds=(0,None),initialize=0) m.x227 = Var(within=Reals,bounds=(0,None),initialize=0) m.x228 = Var(within=Reals,bounds=(0,None),initialize=0) m.x229 = Var(within=Reals,bounds=(0,None),initialize=0) m.x230 = Var(within=Reals,bounds=(0,None),initialize=0) m.x231 = Var(within=Reals,bounds=(0,None),initialize=0) m.x232 = Var(within=Reals,bounds=(0,None),initialize=0) m.x233 = Var(within=Reals,bounds=(0,None),initialize=0) m.x234 = Var(within=Reals,bounds=(0,None),initialize=0) m.x235 = Var(within=Reals,bounds=(0,None),initialize=0) m.x236 = Var(within=Reals,bounds=(0,None),initialize=0) m.x237 = Var(within=Reals,bounds=(0,None),initialize=0) m.x238 = Var(within=Reals,bounds=(0,None),initialize=0) m.x239 = Var(within=Reals,bounds=(0,None),initialize=0) m.x240 = Var(within=Reals,bounds=(0,None),initialize=0) m.x241 = Var(within=Reals,bounds=(0,None),initialize=0) m.x242 = Var(within=Reals,bounds=(0,None),initialize=0) m.x243 = Var(within=Reals,bounds=(0,None),initialize=0) m.x244 = Var(within=Reals,bounds=(0,None),initialize=0) m.x245 = Var(within=Reals,bounds=(0,None),initialize=0) m.x246 = Var(within=Reals,bounds=(0,None),initialize=0) m.x247 = Var(within=Reals,bounds=(0,None),initialize=0) m.x248 = Var(within=Reals,bounds=(0,None),initialize=0) m.x249 = Var(within=Reals,bounds=(0,None),initialize=0) m.x250 = Var(within=Reals,bounds=(0,None),initialize=0) m.x251 = Var(within=Reals,bounds=(0,None),initialize=0) m.x252 = Var(within=Reals,bounds=(0,None),initialize=0) m.x253 = Var(within=Reals,bounds=(0,None),initialize=0) m.x254 = Var(within=Reals,bounds=(0,None),initialize=0) m.x255 = Var(within=Reals,bounds=(0,None),initialize=0) m.x256 = Var(within=Reals,bounds=(0,None),initialize=0) m.x257 = Var(within=Reals,bounds=(0,None),initialize=0) m.x258 = Var(within=Reals,bounds=(0,None),initialize=0) m.x259 = Var(within=Reals,bounds=(0,None),initialize=0) m.x260 = Var(within=Reals,bounds=(0,None),initialize=0) m.x261 = Var(within=Reals,bounds=(0,None),initialize=0) m.x262 = Var(within=Reals,bounds=(0,None),initialize=0) m.x263 = Var(within=Reals,bounds=(0,None),initialize=0) m.x264 = Var(within=Reals,bounds=(0,None),initialize=0) m.x265 = Var(within=Reals,bounds=(0,None),initialize=0) m.x266 = Var(within=Reals,bounds=(0,None),initialize=0) m.x267 = Var(within=Reals,bounds=(0,None),initialize=0) m.x268 = Var(within=Reals,bounds=(0,None),initialize=0) m.x269 = Var(within=Reals,bounds=(0,None),initialize=0) m.x270 = Var(within=Reals,bounds=(0,None),initialize=0) m.x271 = Var(within=Reals,bounds=(0,None),initialize=0) m.x272 = Var(within=Reals,bounds=(0,None),initialize=0) m.x273 = Var(within=Reals,bounds=(0,None),initialize=0) m.x274 = Var(within=Reals,bounds=(0,None),initialize=0) m.x275 = Var(within=Reals,bounds=(0,None),initialize=0) m.x276 = Var(within=Reals,bounds=(0,None),initialize=0) m.x277 = Var(within=Reals,bounds=(0,None),initialize=0) m.x278 = Var(within=Reals,bounds=(0,None),initialize=0) m.x279 = Var(within=Reals,bounds=(0,None),initialize=0) m.x280 = Var(within=Reals,bounds=(0,None),initialize=0) m.x281 = Var(within=Reals,bounds=(0,None),initialize=0) m.x282 = Var(within=Reals,bounds=(0,None),initialize=0) m.x283 = Var(within=Reals,bounds=(0,None),initialize=0) m.x284 = Var(within=Reals,bounds=(0,None),initialize=0) m.x285 = Var(within=Reals,bounds=(0,None),initialize=0) m.x286 = Var(within=Reals,bounds=(0,None),initialize=0) m.x287 = Var(within=Reals,bounds=(0,None),initialize=0) m.x288 = Var(within=Reals,bounds=(0,None),initialize=0) m.x289 = Var(within=Reals,bounds=(0,None),initialize=0) m.x290 = Var(within=Reals,bounds=(0,None),initialize=0) m.x291 = Var(within=Reals,bounds=(0,None),initialize=0) m.x292 = Var(within=Reals,bounds=(0,None),initialize=0) m.x293 = Var(within=Reals,bounds=(0,None),initialize=0) m.x294 = Var(within=Reals,bounds=(0,None),initialize=0) m.x295 = Var(within=Reals,bounds=(0,None),initialize=0) m.x296 = Var(within=Reals,bounds=(0,None),initialize=0) m.x297 = Var(within=Reals,bounds=(0,None),initialize=0) m.x298 = Var(within=Reals,bounds=(0,None),initialize=0) m.x299 = Var(within=Reals,bounds=(0,None),initialize=0) m.x300 = Var(within=Reals,bounds=(0,None),initialize=0) m.x301 = Var(within=Reals,bounds=(0,None),initialize=0) m.x302 = Var(within=Reals,bounds=(0,None),initialize=0) m.x303 = Var(within=Reals,bounds=(0,None),initialize=0) m.x304 = Var(within=Reals,bounds=(0,None),initialize=0) m.x305 = Var(within=Reals,bounds=(0,None),initialize=0) m.x306 = Var(within=Reals,bounds=(0,None),initialize=0) m.x307 = Var(within=Reals,bounds=(0,None),initialize=0) m.x308 = Var(within=Reals,bounds=(0,None),initialize=0) m.x309 = Var(within=Reals,bounds=(0,None),initialize=0) m.x310 = Var(within=Reals,bounds=(0,None),initialize=0) m.x311 = Var(within=Reals,bounds=(0,None),initialize=0) m.x312 = Var(within=Reals,bounds=(0,None),initialize=0) m.x313 = Var(within=Reals,bounds=(0,None),initialize=0) m.x314 = Var(within=Reals,bounds=(0,None),initialize=0) m.x315 = Var(within=Reals,bounds=(0,None),initialize=0) m.x316 = Var(within=Reals,bounds=(0,None),initialize=0) m.x317 = Var(within=Reals,bounds=(0,None),initialize=0) m.x318 = Var(within=Reals,bounds=(0,None),initialize=0) m.x319 = Var(within=Reals,bounds=(0,None),initialize=0) m.x320 = Var(within=Reals,bounds=(0,None),initialize=0) m.x321 = Var(within=Reals,bounds=(0,None),initialize=0) m.x322 = Var(within=Reals,bounds=(0,None),initialize=0) m.x323 = Var(within=Reals,bounds=(0,None),initialize=0) m.x324 = Var(within=Reals,bounds=(0,None),initialize=0) m.x325 = Var(within=Reals,bounds=(0,None),initialize=0) m.x326 = Var(within=Reals,bounds=(0,None),initialize=0) m.x327 = Var(within=Reals,bounds=(0,None),initialize=0) m.x328 = Var(within=Reals,bounds=(0,None),initialize=0) m.x329 = Var(within=Reals,bounds=(0,None),initialize=0) m.x330 = Var(within=Reals,bounds=(0,None),initialize=0) m.x331 = Var(within=Reals,bounds=(0,None),initialize=0) m.x332 = Var(within=Reals,bounds=(0,None),initialize=0) m.x333 = Var(within=Reals,bounds=(0,None),initialize=0) m.x334 = Var(within=Reals,bounds=(0,None),initialize=0) m.x335 = Var(within=Reals,bounds=(0,None),initialize=0) m.x336 = Var(within=Reals,bounds=(0,None),initialize=0) m.x337 = Var(within=Reals,bounds=(0,None),initialize=0) m.x338 = Var(within=Reals,bounds=(0,None),initialize=0) m.x339 = Var(within=Reals,bounds=(0,None),initialize=0) m.x340 = Var(within=Reals,bounds=(0,None),initialize=0) m.x341 = Var(within=Reals,bounds=(0,None),initialize=0) m.x342 = Var(within=Reals,bounds=(0,None),initialize=0) m.x343 = Var(within=Reals,bounds=(0,None),initialize=0) m.x344 = Var(within=Reals,bounds=(0,None),initialize=0) m.x345 = Var(within=Reals,bounds=(0,None),initialize=0) m.x346 = Var(within=Reals,bounds=(0,None),initialize=0) m.x347 = Var(within=Reals,bounds=(0,None),initialize=0) m.x348 = Var(within=Reals,bounds=(0,None),initialize=0) m.x349 = Var(within=Reals,bounds=(0,None),initialize=0) m.x350 = Var(within=Reals,bounds=(0,None),initialize=0) m.x351 = Var(within=Reals,bounds=(0,None),initialize=0) m.x352 = Var(within=Reals,bounds=(0,None),initialize=0) m.x353 = Var(within=Reals,bounds=(0,None),initialize=0) m.x354 = Var(within=Reals,bounds=(0,None),initialize=0) m.x355 = Var(within=Reals,bounds=(0,None),initialize=0) m.x356 = Var(within=Reals,bounds=(0,None),initialize=0) m.x357 = Var(within=Reals,bounds=(0,None),initialize=0) m.x358 = Var(within=Reals,bounds=(0,None),initialize=0) m.x359 = Var(within=Reals,bounds=(0,None),initialize=0) m.x360 = Var(within=Reals,bounds=(0,None),initialize=0) m.x361 = Var(within=Reals,bounds=(0,None),initialize=0) m.x362 = Var(within=Reals,bounds=(0,None),initialize=0) m.x363 = Var(within=Reals,bounds=(0,None),initialize=0) m.x364 = Var(within=Reals,bounds=(0,None),initialize=0) m.x365 = Var(within=Reals,bounds=(0,None),initialize=0) m.x366 = Var(within=Reals,bounds=(0,None),initialize=0) m.x367 = Var(within=Reals,bounds=(0,None),initialize=0) m.x368 = Var(within=Reals,bounds=(0,None),initialize=0) m.x369 = Var(within=Reals,bounds=(0,None),initialize=0) m.x370 = Var(within=Reals,bounds=(0,None),initialize=0) m.x371 = Var(within=Reals,bounds=(0,None),initialize=0) m.x372 = Var(within=Reals,bounds=(0,None),initialize=0) m.x373 = Var(within=Reals,bounds=(0,None),initialize=0) m.x374 = Var(within=Reals,bounds=(0,None),initialize=0) m.x375 = Var(within=Reals,bounds=(0,None),initialize=0) m.x376 = Var(within=Reals,bounds=(0,None),initialize=0) m.x377 = Var(within=Reals,bounds=(0,None),initialize=0) m.x378 = Var(within=Reals,bounds=(0,None),initialize=0) m.x379 = Var(within=Reals,bounds=(0,None),initialize=0) m.x380 = Var(within=Reals,bounds=(0,None),initialize=0) m.x381 = Var(within=Reals,bounds=(0,None),initialize=0) m.x382 = Var(within=Reals,bounds=(0,None),initialize=0) m.x383 = Var(within=Reals,bounds=(0,None),initialize=0) m.x384 = Var(within=Reals,bounds=(0,None),initialize=0) m.x385 = Var(within=Reals,bounds=(0,None),initialize=0) m.x386 = Var(within=Reals,bounds=(0,None),initialize=0) m.x387 = Var(within=Reals,bounds=(0,None),initialize=0) m.x388 = Var(within=Reals,bounds=(0,None),initialize=0) m.x389 = Var(within=Reals,bounds=(0,None),initialize=0) m.x390 = Var(within=Reals,bounds=(0,None),initialize=0) m.x391 = Var(within=Reals,bounds=(0,None),initialize=0) m.x392 = Var(within=Reals,bounds=(0,None),initialize=0) m.x393 = Var(within=Reals,bounds=(0,None),initialize=0) m.x394 = Var(within=Reals,bounds=(0,None),initialize=0) m.x395 = Var(within=Reals,bounds=(0,None),initialize=0) m.x396 = Var(within=Reals,bounds=(0,None),initialize=0) m.x397 = Var(within=Reals,bounds=(0,None),initialize=0) m.x398 = Var(within=Reals,bounds=(0,None),initialize=0) m.x399 = Var(within=Reals,bounds=(0,None),initialize=0) m.x400 = Var(within=Reals,bounds=(0,None),initialize=0) m.x401 = Var(within=Reals,bounds=(0,None),initialize=0) m.x402 = Var(within=Reals,bounds=(0,None),initialize=0) m.x403 = Var(within=Reals,bounds=(0,None),initialize=0) m.x404 = Var(within=Reals,bounds=(0,None),initialize=0) m.x405 = Var(within=Reals,bounds=(0,None),initialize=0) m.x406 = Var(within=Reals,bounds=(0,None),initialize=0) m.x407 = Var(within=Reals,bounds=(0,None),initialize=0) m.x408 = Var(within=Reals,bounds=(0,None),initialize=0) m.x409 = Var(within=Reals,bounds=(0,None),initialize=0) m.x410 = Var(within=Reals,bounds=(0,None),initialize=0) m.x411 = Var(within=Reals,bounds=(0,None),initialize=0) m.x412 = Var(within=Reals,bounds=(0,None),initialize=0) m.x413 = Var(within=Reals,bounds=(0,None),initialize=0) m.x414 = Var(within=Reals,bounds=(0,None),initialize=0) m.x415 = Var(within=Reals,bounds=(0,None),initialize=0) m.x416 = Var(within=Reals,bounds=(0,None),initialize=0) m.x417 = Var(within=Reals,bounds=(0,None),initialize=0) m.x418 = Var(within=Reals,bounds=(0,None),initialize=0) m.x419 = Var(within=Reals,bounds=(0,None),initialize=0) m.x420 = Var(within=Reals,bounds=(0,None),initialize=0) m.x421 = Var(within=Reals,bounds=(0,None),initialize=0) m.x422 = Var(within=Reals,bounds=(0,None),initialize=0) m.x423 = Var(within=Reals,bounds=(0,None),initialize=0) m.x424 = Var(within=Reals,bounds=(0,None),initialize=0) m.x425 = Var(within=Reals,bounds=(0,None),initialize=0) m.x426 = Var(within=Reals,bounds=(0,None),initialize=0) m.x427 = Var(within=Reals,bounds=(0,None),initialize=0) m.x428 = Var(within=Reals,bounds=(0,None),initialize=0) m.x429 = Var(within=Reals,bounds=(0,None),initialize=0) m.x430 = Var(within=Reals,bounds=(0,None),initialize=0) m.x431 = Var(within=Reals,bounds=(0,None),initialize=0) m.x432 = Var(within=Reals,bounds=(0,None),initialize=0) m.x433 = Var(within=Reals,bounds=(0,None),initialize=0) m.x434 = Var(within=Reals,bounds=(0,None),initialize=0) m.x435 = Var(within=Reals,bounds=(0,None),initialize=0) m.x436 = Var(within=Reals,bounds=(0,None),initialize=0) m.x437 = Var(within=Reals,bounds=(0,None),initialize=0) m.x438 = Var(within=Reals,bounds=(0,None),initialize=0) m.x439 = Var(within=Reals,bounds=(0,None),initialize=0) m.x440 = Var(within=Reals,bounds=(0,None),initialize=0) m.x441 = Var(within=Reals,bounds=(0,None),initialize=0) m.x442 = Var(within=Reals,bounds=(0,None),initialize=0) m.x443 = Var(within=Reals,bounds=(0,None),initialize=0) m.x444 = Var(within=Reals,bounds=(0,None),initialize=0) m.x445 = Var(within=Reals,bounds=(0,None),initialize=0) m.x446 = Var(within=Reals,bounds=(0,None),initialize=0) m.x447 = Var(within=Reals,bounds=(0,None),initialize=0) m.x448 = Var(within=Reals,bounds=(0,None),initialize=0) m.x449 = Var(within=Reals,bounds=(0,None),initialize=0) m.x450 = Var(within=Reals,bounds=(0,None),initialize=0) m.x451 = Var(within=Reals,bounds=(0,None),initialize=0) m.x452 = Var(within=Reals,bounds=(0,None),initialize=0) m.x453 = Var(within=Reals,bounds=(0,None),initialize=0) m.x454 = Var(within=Reals,bounds=(0,None),initialize=0) m.x455 = Var(within=Reals,bounds=(0,None),initialize=0) m.x456 = Var(within=Reals,bounds=(0,None),initialize=0) m.x457 = Var(within=Reals,bounds=(0,None),initialize=0) m.x458 = Var(within=Reals,bounds=(0,None),initialize=0) m.x459 = Var(within=Reals,bounds=(0,None),initialize=0) m.x460 = Var(within=Reals,bounds=(0,None),initialize=0) m.x461 = Var(within=Reals,bounds=(0,None),initialize=0) m.x462 = Var(within=Reals,bounds=(0,None),initialize=0) m.x463 = Var(within=Reals,bounds=(0,None),initialize=0) m.x464 = Var(within=Reals,bounds=(0,None),initialize=0) m.x465 = Var(within=Reals,bounds=(0,None),initialize=0) m.x466 = Var(within=Reals,bounds=(0,None),initialize=0) m.x467 = Var(within=Reals,bounds=(0,None),initialize=0) m.x468 = Var(within=Reals,bounds=(0,None),initialize=0) m.x469 = Var(within=Reals,bounds=(0,None),initialize=0) m.x470 = Var(within=Reals,bounds=(0,None),initialize=0) m.x471 = Var(within=Reals,bounds=(0,None),initialize=0) m.x472 = Var(within=Reals,bounds=(0,None),initialize=0) m.x473 = Var(within=Reals,bounds=(0,None),initialize=0) m.x474 = Var(within=Reals,bounds=(0,None),initialize=0) m.x475 = Var(within=Reals,bounds=(0,None),initialize=0) m.x476 = Var(within=Reals,bounds=(0,None),initialize=0) m.x477 = Var(within=Reals,bounds=(0,None),initialize=0) m.x478 = Var(within=Reals,bounds=(0,None),initialize=0) m.x479 = Var(within=Reals,bounds=(0,None),initialize=0) m.x480 = Var(within=Reals,bounds=(0,None),initialize=0) m.x481 = Var(within=Reals,bounds=(0,None),initialize=0) m.x482 = Var(within=Reals,bounds=(0,None),initialize=0) m.x483 = Var(within=Reals,bounds=(0,None),initialize=0) m.x484 = Var(within=Reals,bounds=(0,None),initialize=0) m.x485 = Var(within=Reals,bounds=(0,None),initialize=0) m.x486 = Var(within=Reals,bounds=(0,None),initialize=0) m.x487 = Var(within=Reals,bounds=(0,None),initialize=0) m.x488 = Var(within=Reals,bounds=(0,None),initialize=0) m.x489 = Var(within=Reals,bounds=(0,None),initialize=0) m.x490 = Var(within=Reals,bounds=(0,None),initialize=0) m.x491 = Var(within=Reals,bounds=(0,None),initialize=0) m.x492 = Var(within=Reals,bounds=(0,None),initialize=0) m.x493 = Var(within=Reals,bounds=(0,None),initialize=0) m.x494 = Var(within=Reals,bounds=(0,None),initialize=0) m.x495 = Var(within=Reals,bounds=(0,None),initialize=0) m.x496 = Var(within=Reals,bounds=(0,None),initialize=0) m.x497 = Var(within=Reals,bounds=(0,None),initialize=0) m.x498 = Var(within=Reals,bounds=(0,None),initialize=0) m.x499 = Var(within=Reals,bounds=(0,None),initialize=0) m.x500 = Var(within=Reals,bounds=(0,None),initialize=0) m.x501 = Var(within=Reals,bounds=(0,None),initialize=0) m.x502 = Var(within=Reals,bounds=(0,None),initialize=0) m.x503 = Var(within=Reals,bounds=(0,None),initialize=0) m.x504 = Var(within=Reals,bounds=(0,None),initialize=0) m.x505 = Var(within=Reals,bounds=(0,None),initialize=0) m.x506 = Var(within=Reals,bounds=(0,None),initialize=0) m.x507 = Var(within=Reals,bounds=(0,None),initialize=0) m.x508 = Var(within=Reals,bounds=(0,None),initialize=0) m.x509 = Var(within=Reals,bounds=(0,None),initialize=0) m.x510 = Var(within=Reals,bounds=(0,None),initialize=0) m.x511 = Var(within=Reals,bounds=(0,None),initialize=0) m.x512 = Var(within=Reals,bounds=(0,None),initialize=0) m.x513 = Var(within=Reals,bounds=(0,None),initialize=0) m.x514 = Var(within=Reals,bounds=(0,None),initialize=0) m.x515 = Var(within=Reals,bounds=(0,None),initialize=0) m.x516 = Var(within=Reals,bounds=(0,None),initialize=0) m.x517 = Var(within=Reals,bounds=(0,None),initialize=0) m.x518 = Var(within=Reals,bounds=(0,None),initialize=0) m.x519 = Var(within=Reals,bounds=(0,None),initialize=0) m.x520 = Var(within=Reals,bounds=(0,None),initialize=0) m.x521 = Var(within=Reals,bounds=(0,None),initialize=0) m.x522 = Var(within=Reals,bounds=(0,None),initialize=0) m.x523 = Var(within=Reals,bounds=(0,None),initialize=0) m.x524 = Var(within=Reals,bounds=(0,None),initialize=0) m.x525 = Var(within=Reals,bounds=(0,None),initialize=0) m.x526 = Var(within=Reals,bounds=(0,None),initialize=0) m.x527 = Var(within=Reals,bounds=(0,None),initialize=0) m.x528 = Var(within=Reals,bounds=(0,None),initialize=0) m.x529 = Var(within=Reals,bounds=(0,None),initialize=0) m.x530 = Var(within=Reals,bounds=(0,None),initialize=0) m.x531 = Var(within=Reals,bounds=(0,None),initialize=0) m.x532 = Var(within=Reals,bounds=(0,None),initialize=0) m.x533 = Var(within=Reals,bounds=(0,None),initialize=0) m.x534 = Var(within=Reals,bounds=(0,None),initialize=0) m.x535 = Var(within=Reals,bounds=(0,None),initialize=0) m.x536 = Var(within=Reals,bounds=(0,None),initialize=0) m.x537 = Var(within=Reals,bounds=(0,None),initialize=0) m.x538 = Var(within=Reals,bounds=(0,None),initialize=0) m.x539 = Var(within=Reals,bounds=(0,None),initialize=0) m.x540 = Var(within=Reals,bounds=(0,None),initialize=0) m.x541 = Var(within=Reals,bounds=(0,None),initialize=0) m.x542 = Var(within=Reals,bounds=(0,None),initialize=0) m.x543 = Var(within=Reals,bounds=(0,None),initialize=0) m.x544 = Var(within=Reals,bounds=(0,None),initialize=0) m.x545 = Var(within=Reals,bounds=(0,None),initialize=0) m.x546 = Var(within=Reals,bounds=(0,None),initialize=0) m.x547 = Var(within=Reals,bounds=(0,None),initialize=0) m.x548 = Var(within=Reals,bounds=(0,None),initialize=0) m.x549 = Var(within=Reals,bounds=(0,None),initialize=0) m.x550 = Var(within=Reals,bounds=(0,None),initialize=0) m.x551 = Var(within=Reals,bounds=(0,None),initialize=0) m.x552 = Var(within=Reals,bounds=(0,None),initialize=0) m.x553 = Var(within=Reals,bounds=(0,None),initialize=0) m.x554 = Var(within=Reals,bounds=(0,None),initialize=0) m.x555 = Var(within=Reals,bounds=(0,None),initialize=0) m.x556 = Var(within=Reals,bounds=(0,None),initialize=0) m.x557 = Var(within=Reals,bounds=(0,None),initialize=0) m.x558 = Var(within=Reals,bounds=(0,None),initialize=0) m.x559 = Var(within=Reals,bounds=(0,None),initialize=0) m.x560 = Var(within=Reals,bounds=(0,None),initialize=0) m.x561 = Var(within=Reals,bounds=(0,None),initialize=0) m.x562 = Var(within=Reals,bounds=(0,None),initialize=0) m.x563 = Var(within=Reals,bounds=(0,None),initialize=0) m.x564 = Var(within=Reals,bounds=(0,None),initialize=0) m.x565 = Var(within=Reals,bounds=(0,None),initialize=0) m.x566 = Var(within=Reals,bounds=(0,None),initialize=0) m.x567 = Var(within=Reals,bounds=(0,None),initialize=0) m.x568 = Var(within=Reals,bounds=(0,None),initialize=0) m.x569 = Var(within=Reals,bounds=(0,None),initialize=0) m.x570 = Var(within=Reals,bounds=(0,None),initialize=0) m.x571 = Var(within=Reals,bounds=(0,None),initialize=0) m.x572 = Var(within=Reals,bounds=(0,None),initialize=0) m.x573 = Var(within=Reals,bounds=(0,None),initialize=0) m.x574 = Var(within=Reals,bounds=(0,None),initialize=0) m.x575 = Var(within=Reals,bounds=(0,None),initialize=0) m.x576 = Var(within=Reals,bounds=(0,None),initialize=0) m.x577 = Var(within=Reals,bounds=(0,None),initialize=0) m.x578 = Var(within=Reals,bounds=(0,None),initialize=0) m.x579 = Var(within=Reals,bounds=(0,None),initialize=0) m.x580 = Var(within=Reals,bounds=(0,None),initialize=0) m.x581 = Var(within=Reals,bounds=(0,None),initialize=0) m.x582 = Var(within=Reals,bounds=(0,None),initialize=0) m.x583 = Var(within=Reals,bounds=(0,None),initialize=0) m.x584 = Var(within=Reals,bounds=(0,None),initialize=0) m.x585 = Var(within=Reals,bounds=(0,None),initialize=0) m.x586 = Var(within=Reals,bounds=(0,None),initialize=0) m.x587 = Var(within=Reals,bounds=(0,None),initialize=0) m.x588 = Var(within=Reals,bounds=(0,None),initialize=0) m.x589 = Var(within=Reals,bounds=(0,None),initialize=0) m.x590 = Var(within=Reals,bounds=(0,None),initialize=0) m.x591 = Var(within=Reals,bounds=(0,None),initialize=0) m.x592 = Var(within=Reals,bounds=(0,None),initialize=0) m.x593 = Var(within=Reals,bounds=(0,None),initialize=0) m.x594 = Var(within=Reals,bounds=(0,None),initialize=0) m.x595 = Var(within=Reals,bounds=(0,None),initialize=0) m.b596 = Var(within=Binary,bounds=(0,1),initialize=0) m.b597 = Var(within=Binary,bounds=(0,1),initialize=0) m.b598 = Var(within=Binary,bounds=(0,1),initialize=0) m.b599 = Var(within=Binary,bounds=(0,1),initialize=0) m.b600 = Var(within=Binary,bounds=(0,1),initialize=0) m.b601 = Var(within=Binary,bounds=(0,1),initialize=0) m.b602 = Var(within=Binary,bounds=(0,1),initialize=0) m.b603 = Var(within=Binary,bounds=(0,1),initialize=0) m.b604 = Var(within=Binary,bounds=(0,1),initialize=0) m.b605 = Var(within=Binary,bounds=(0,1),initialize=0) m.b606 = Var(within=Binary,bounds=(0,1),initialize=0) m.b607 = Var(within=Binary,bounds=(0,1),initialize=0) m.b608 = Var(within=Binary,bounds=(0,1),initialize=0) m.b609 = Var(within=Binary,bounds=(0,1),initialize=0) m.b610 = Var(within=Binary,bounds=(0,1),initialize=0) m.b611 = Var(within=Binary,bounds=(0,1),initialize=0) m.b612 = Var(within=Binary,bounds=(0,1),initialize=0) m.b613 = Var(within=Binary,bounds=(0,1),initialize=0) m.b614 = Var(within=Binary,bounds=(0,1),initialize=0) m.b615 = Var(within=Binary,bounds=(0,1),initialize=0) m.b616 = Var(within=Binary,bounds=(0,1),initialize=0) m.b617 = Var(within=Binary,bounds=(0,1),initialize=0) m.b618 = Var(within=Binary,bounds=(0,1),initialize=0) m.b619 = Var(within=Binary,bounds=(0,1),initialize=0) m.b620 = Var(within=Binary,bounds=(0,1),initialize=0) m.b621 = Var(within=Binary,bounds=(0,1),initialize=0) m.b622 = Var(within=Binary,bounds=(0,1),initialize=0) m.b623 = Var(within=Binary,bounds=(0,1),initialize=0) m.b624 = Var(within=Binary,bounds=(0,1),initialize=0) m.b625 = Var(within=Binary,bounds=(0,1),initialize=0) m.b626 = Var(within=Binary,bounds=(0,1),initialize=0) m.b627 = Var(within=Binary,bounds=(0,1),initialize=0) m.b628 = Var(within=Binary,bounds=(0,1),initialize=0) m.b629 = Var(within=Binary,bounds=(0,1),initialize=0) m.b630 = Var(within=Binary,bounds=(0,1),initialize=0) m.b631 = Var(within=Binary,bounds=(0,1),initialize=0) m.b632 = Var(within=Binary,bounds=(0,1),initialize=0) m.b633 = Var(within=Binary,bounds=(0,1),initialize=0) m.b634 = Var(within=Binary,bounds=(0,1),initialize=0) m.b635 = Var(within=Binary,bounds=(0,1),initialize=0) m.b636 = Var(within=Binary,bounds=(0,1),initialize=0) m.b637 = Var(within=Binary,bounds=(0,1),initialize=0) m.b638 = Var(within=Binary,bounds=(0,1),initialize=0) m.b639 = Var(within=Binary,bounds=(0,1),initialize=0) m.b640 = Var(within=Binary,bounds=(0,1),initialize=0) m.b641 = Var(within=Binary,bounds=(0,1),initialize=0) m.b642 = Var(within=Binary,bounds=(0,1),initialize=0) m.b643 = Var(within=Binary,bounds=(0,1),initialize=0) m.b644 = Var(within=Binary,bounds=(0,1),initialize=0) m.b645 = Var(within=Binary,bounds=(0,1),initialize=0) m.b646 = Var(within=Binary,bounds=(0,1),initialize=0) m.b647 = Var(within=Binary,bounds=(0,1),initialize=0) m.b648 = Var(within=Binary,bounds=(0,1),initialize=0) m.b649 = Var(within=Binary,bounds=(0,1),initialize=0) m.b650 = Var(within=Binary,bounds=(0,1),initialize=0) m.b651 = Var(within=Binary,bounds=(0,1),initialize=0) m.b652 = Var(within=Binary,bounds=(0,1),initialize=0) m.b653 = Var(within=Binary,bounds=(0,1),initialize=0) m.b654 = Var(within=Binary,bounds=(0,1),initialize=0) m.b655 = Var(within=Binary,bounds=(0,1),initialize=0) m.b656 = Var(within=Binary,bounds=(0,1),initialize=0) m.b657 = Var(within=Binary,bounds=(0,1),initialize=0) m.b658 = Var(within=Binary,bounds=(0,1),initialize=0) m.b659 = Var(within=Binary,bounds=(0,1),initialize=0) m.b660 = Var(within=Binary,bounds=(0,1),initialize=0) m.b661 = Var(within=Binary,bounds=(0,1),initialize=0) m.b662 = Var(within=Binary,bounds=(0,1),initialize=0) m.b663 = Var(within=Binary,bounds=(0,1),initialize=0) m.b664 = Var(within=Binary,bounds=(0,1),initialize=0) m.b665 = Var(within=Binary,bounds=(0,1),initialize=0) m.b666 = Var(within=Binary,bounds=(0,1),initialize=0) m.b667 = Var(within=Binary,bounds=(0,1),initialize=0) m.b668 = Var(within=Binary,bounds=(0,1),initialize=0) m.b669 = Var(within=Binary,bounds=(0,1),initialize=0) m.b670 = Var(within=Binary,bounds=(0,1),initialize=0) m.b671 = Var(within=Binary,bounds=(0,1),initialize=0) m.b672 = Var(within=Binary,bounds=(0,1),initialize=0) m.b673 = Var(within=Binary,bounds=(0,1),initialize=0) m.b674 = Var(within=Binary,bounds=(0,1),initialize=0) m.b675 = Var(within=Binary,bounds=(0,1),initialize=0) m.b676 = Var(within=Binary,bounds=(0,1),initialize=0) m.b677 = Var(within=Binary,bounds=(0,1),initialize=0) m.b678 = Var(within=Binary,bounds=(0,1),initialize=0) m.b679 = Var(within=Binary,bounds=(0,1),initialize=0) m.b680 = Var(within=Binary,bounds=(0,1),initialize=0) m.b681 = Var(within=Binary,bounds=(0,1),initialize=0) m.b682 = Var(within=Binary,bounds=(0,1),initialize=0) m.b683 = Var(within=Binary,bounds=(0,1),initialize=0) m.b684 = Var(within=Binary,bounds=(0,1),initialize=0) m.b685 = Var(within=Binary,bounds=(0,1),initialize=0) m.b686 = Var(within=Binary,bounds=(0,1),initialize=0) m.b687 = Var(within=Binary,bounds=(0,1),initialize=0) m.b688 = Var(within=Binary,bounds=(0,1),initialize=0) m.b689 = Var(within=Binary,bounds=(0,1),initialize=0) m.b690 = Var(within=Binary,bounds=(0,1),initialize=0) m.b691 = Var(within=Binary,bounds=(0,1),initialize=0) m.b692 = Var(within=Binary,bounds=(0,1),initialize=0) m.b693 = Var(within=Binary,bounds=(0,1),initialize=0) m.b694 = Var(within=Binary,bounds=(0,1),initialize=0) m.b695 = Var(within=Binary,bounds=(0,1),initialize=0) m.b696 = Var(within=Binary,bounds=(0,1),initialize=0) m.b697 = Var(within=Binary,bounds=(0,1),initialize=0) m.b698 = Var(within=Binary,bounds=(0,1),initialize=0) m.b699 = Var(within=Binary,bounds=(0,1),initialize=0) m.b700 = Var(within=Binary,bounds=(0,1),initialize=0) m.b701 = Var(within=Binary,bounds=(0,1),initialize=0) m.b702 = Var(within=Binary,bounds=(0,1),initialize=0) m.b703 = Var(within=Binary,bounds=(0,1),initialize=0) m.b704 = Var(within=Binary,bounds=(0,1),initialize=0) m.b705 = Var(within=Binary,bounds=(0,1),initialize=0) m.b706 = Var(within=Binary,bounds=(0,1),initialize=0) m.b707 = Var(within=Binary,bounds=(0,1),initialize=0) m.b708 = Var(within=Binary,bounds=(0,1),initialize=0) m.b709 = Var(within=Binary,bounds=(0,1),initialize=0) m.b710 = Var(within=Binary,bounds=(0,1),initialize=0) m.b711 = Var(within=Binary,bounds=(0,1),initialize=0) m.b712 = Var(within=Binary,bounds=(0,1),initialize=0) m.b713 = Var(within=Binary,bounds=(0,1),initialize=0) m.b714 = Var(within=Binary,bounds=(0,1),initialize=0) m.b715 = Var(within=Binary,bounds=(0,1),initialize=0) m.b716 = Var(within=Binary,bounds=(0,1),initialize=0) m.b717 = Var(within=Binary,bounds=(0,1),initialize=0) m.b718 = Var(within=Binary,bounds=(0,1),initialize=0) m.b719 = Var(within=Binary,bounds=(0,1),initialize=0) m.b720 = Var(within=Binary,bounds=(0,1),initialize=0) m.b721 = Var(within=Binary,bounds=(0,1),initialize=0) m.b722 = Var(within=Binary,bounds=(0,1),initialize=0) m.b723 = Var(within=Binary,bounds=(0,1),initialize=0) m.b724 = Var(within=Binary,bounds=(0,1),initialize=0) m.b725 = Var(within=Binary,bounds=(0,1),initialize=0) m.b726 = Var(within=Binary,bounds=(0,1),initialize=0) m.b727 = Var(within=Binary,bounds=(0,1),initialize=0) m.b728 = Var(within=Binary,bounds=(0,1),initialize=0) m.b729 = Var(within=Binary,bounds=(0,1),initialize=0) m.b730 = Var(within=Binary,bounds=(0,1),initialize=0) m.b731 = Var(within=Binary,bounds=(0,1),initialize=0) m.b732 = Var(within=Binary,bounds=(0,1),initialize=0) m.b733 = Var(within=Binary,bounds=(0,1),initialize=0) m.b734 = Var(within=Binary,bounds=(0,1),initialize=0) m.b735 = Var(within=Binary,bounds=(0,1),initialize=0) m.b736 = Var(within=Binary,bounds=(0,1),initialize=0) m.b737 = Var(within=Binary,bounds=(0,1),initialize=0) m.b738 = Var(within=Binary,bounds=(0,1),initialize=0) m.b739 = Var(within=Binary,bounds=(0,1),initialize=0) m.b740 = Var(within=Binary,bounds=(0,1),initialize=0) m.b741 = Var(within=Binary,bounds=(0,1),initialize=0) m.b742 = Var(within=Binary,bounds=(0,1),initialize=0) m.b743 = Var(within=Binary,bounds=(0,1),initialize=0) m.b744 = Var(within=Binary,bounds=(0,1),initialize=0) m.b745 = Var(within=Binary,bounds=(0,1),initialize=0) m.b746 = Var(within=Binary,bounds=(0,1),initialize=0) m.b747 = Var(within=Binary,bounds=(0,1),initialize=0) m.b748 = Var(within=Binary,bounds=(0,1),initialize=0) m.b749 = Var(within=Binary,bounds=(0,1),initialize=0) m.b750 = Var(within=Binary,bounds=(0,1),initialize=0) m.b751 = Var(within=Binary,bounds=(0,1),initialize=0) m.b752 = Var(within=Binary,bounds=(0,1),initialize=0) m.b753 = Var(within=Binary,bounds=(0,1),initialize=0) m.b754 = Var(within=Binary,bounds=(0,1),initialize=0) m.b755 = Var(within=Binary,bounds=(0,1),initialize=0) m.b756 = Var(within=Binary,bounds=(0,1),initialize=0) m.b757 = Var(within=Binary,bounds=(0,1),initialize=0) m.b758 = Var(within=Binary,bounds=(0,1),initialize=0) m.b759 = Var(within=Binary,bounds=(0,1),initialize=0) m.b760 = Var(within=Binary,bounds=(0,1),initialize=0) m.b761 = Var(within=Binary,bounds=(0,1),initialize=0) m.b762 = Var(within=Binary,bounds=(0,1),initialize=0) m.b763 = Var(within=Binary,bounds=(0,1),initialize=0) m.b764 = Var(within=Binary,bounds=(0,1),initialize=0) m.b765 = Var(within=Binary,bounds=(0,1),initialize=0) m.b766 = Var(within=Binary,bounds=(0,1),initialize=0) m.b767 = Var(within=Binary,bounds=(0,1),initialize=0) m.b768 = Var(within=Binary,bounds=(0,1),initialize=0) m.b769 = Var(within=Binary,bounds=(0,1),initialize=0) m.b770 = Var(within=Binary,bounds=(0,1),initialize=0) m.b771 = Var(within=Binary,bounds=(0,1),initialize=0) m.b772 = Var(within=Binary,bounds=(0,1),initialize=0) m.b773 = Var(within=Binary,bounds=(0,1),initialize=0) m.b774 = Var(within=Binary,bounds=(0,1),initialize=0) m.b775 = Var(within=Binary,bounds=(0,1),initialize=0) m.x776 = Var(within=Reals,bounds=(None,None),initialize=0) m.x777 = Var(within=Reals,bounds=(None,None),initialize=0) m.x778 = Var(within=Reals,bounds=(None,None),initialize=0) m.x779 = Var(within=Reals,bounds=(None,None),initialize=0) m.x780 = Var(within=Reals,bounds=(None,None),initialize=0) m.x781 = Var(within=Reals,bounds=(None,None),initialize=0) m.x782 = Var(within=Reals,bounds=(None,None),initialize=0) m.x783 = Var(within=Reals,bounds=(None,None),initialize=0) m.x784 = Var(within=Reals,bounds=(None,None),initialize=0) m.x785 = Var(within=Reals,bounds=(None,None),initialize=0) m.x786 = Var(within=Reals,bounds=(None,None),initialize=0) m.x787 = Var(within=Reals,bounds=(None,None),initialize=0) m.x788 = Var(within=Reals,bounds=(None,None),initialize=0) m.x789 = Var(within=Reals,bounds=(None,None),initialize=0) m.x790 = Var(within=Reals,bounds=(None,None),initialize=0) m.x791 = Var(within=Reals,bounds=(None,None),initialize=0) m.x792 = Var(within=Reals,bounds=(None,None),initialize=0) m.x793 = Var(within=Reals,bounds=(None,None),initialize=0) m.x794 = Var(within=Reals,bounds=(None,None),initialize=0) m.x795 = Var(within=Reals,bounds=(None,None),initialize=0) m.x796 = Var(within=Reals,bounds=(None,None),initialize=0) m.x797 = Var(within=Reals,bounds=(None,None),initialize=0) m.x798 = Var(within=Reals,bounds=(None,None),initialize=0) m.x799 = Var(within=Reals,bounds=(None,None),initialize=0) m.x800 = Var(within=Reals,bounds=(None,None),initialize=0) m.x801 = Var(within=Reals,bounds=(None,None),initialize=0) m.x802 = Var(within=Reals,bounds=(None,None),initialize=0) m.x803 = Var(within=Reals,bounds=(None,None),initialize=0) m.x804 = Var(within=Reals,bounds=(None,None),initialize=0) m.x805 = Var(within=Reals,bounds=(None,None),initialize=0) m.x806 = Var(within=Reals,bounds=(None,None),initialize=0) m.x807 = Var(within=Reals,bounds=(None,None),initialize=0) m.x808 = Var(within=Reals,bounds=(None,None),initialize=0) m.x809 = Var(within=Reals,bounds=(None,None),initialize=0) m.x810 = Var(within=Reals,bounds=(None,None),initialize=0) m.x811 = Var(within=Reals,bounds=(None,None),initialize=0) m.x812 = Var(within=Reals,bounds=(None,None),initialize=0) m.x813 = Var(within=Reals,bounds=(None,None),initialize=0) m.x814 = Var(within=Reals,bounds=(None,None),initialize=0) m.x815 = Var(within=Reals,bounds=(None,None),initialize=0) m.x816 = Var(within=Reals,bounds=(None,None),initialize=0) m.x817 = Var(within=Reals,bounds=(None,None),initialize=0) m.x818 = Var(within=Reals,bounds=(None,None),initialize=0) m.x819 = Var(within=Reals,bounds=(None,None),initialize=0) m.x820 = Var(within=Reals,bounds=(None,None),initialize=0) m.x821 = Var(within=Reals,bounds=(None,None),initialize=0) m.x822 = Var(within=Reals,bounds=(None,None),initialize=0) m.x823 = Var(within=Reals,bounds=(None,None),initialize=0) m.x824 = Var(within=Reals,bounds=(None,None),initialize=0) m.x825 = Var(within=Reals,bounds=(None,None),initialize=0) m.x826 = Var(within=Reals,bounds=(None,None),initialize=0) m.x827 = Var(within=Reals,bounds=(None,None),initialize=0) m.x828 = Var(within=Reals,bounds=(None,None),initialize=0) m.x829 = Var(within=Reals,bounds=(None,None),initialize=0) m.x830 = Var(within=Reals,bounds=(None,None),initialize=0) m.x831 = Var(within=Reals,bounds=(None,None),initialize=0) m.x832 = Var(within=Reals,bounds=(None,None),initialize=0) m.x833 = Var(within=Reals,bounds=(None,None),initialize=0) m.x834 = Var(within=Reals,bounds=(None,None),initialize=0) m.x835 = Var(within=Reals,bounds=(None,None),initialize=0) m.x836 = Var(within=Reals,bounds=(None,None),initialize=0) m.x837 = Var(within=Reals,bounds=(None,None),initialize=0) m.x838 = Var(within=Reals,bounds=(None,None),initialize=0) m.x839 = Var(within=Reals,bounds=(None,None),initialize=0) m.x840 = Var(within=Reals,bounds=(None,None),initialize=0) m.x841 = Var(within=Reals,bounds=(None,None),initialize=0) m.x842 = Var(within=Reals,bounds=(None,None),initialize=0) m.x843 = Var(within=Reals,bounds=(None,None),initialize=0) m.x844 = Var(within=Reals,bounds=(None,None),initialize=0) m.x845 = Var(within=Reals,bounds=(None,None),initialize=0) m.x846 = Var(within=Reals,bounds=(None,None),initialize=0) m.x847 = Var(within=Reals,bounds=(None,None),initialize=0) m.x848 = Var(within=Reals,bounds=(None,None),initialize=0) m.x849 = Var(within=Reals,bounds=(None,None),initialize=0) m.x850 = Var(within=Reals,bounds=(None,None),initialize=0) m.x851 = Var(within=Reals,bounds=(None,None),initialize=0) m.x852 = Var(within=Reals,bounds=(None,None),initialize=0) m.x853 = Var(within=Reals,bounds=(None,None),initialize=0) m.x854 = Var(within=Reals,bounds=(None,None),initialize=0) m.x855 = Var(within=Reals,bounds=(None,None),initialize=0) m.x856 = Var(within=Reals,bounds=(None,None),initialize=0) m.x857 = Var(within=Reals,bounds=(None,None),initialize=0) m.x858 = Var(within=Reals,bounds=(None,None),initialize=0) m.x859 = Var(within=Reals,bounds=(None,None),initialize=0) m.x860 = Var(within=Reals,bounds=(None,None),initialize=0) m.x861 = Var(within=Reals,bounds=(None,None),initialize=0) m.x862 = Var(within=Reals,bounds=(None,None),initialize=0) m.x863 = Var(within=Reals,bounds=(None,None),initialize=0) m.x864 = Var(within=Reals,bounds=(None,None),initialize=0) m.x865 = Var(within=Reals,bounds=(None,None),initialize=0) m.obj = Objective(expr= - m.x2 - m.x3 - m.x4 + 5*m.x20 + 10*m.x21 + 5*m.x22 - 2*m.x35 - m.x36 - 2*m.x37 - 10*m.x86 - 5*m.x87 - 5*m.x88 - 5*m.x89 - 5*m.x90 - 5*m.x91 + 40*m.x110 + 30*m.x111 + 15*m.x112 + 15*m.x113 + 20*m.x114 + 25*m.x115 + 10*m.x116 + 30*m.x117 + 40*m.x118 + 30*m.x119 + 20*m.x120 + 20*m.x121 + 35*m.x122 + 50*m.x123 + 20*m.x124 + 20*m.x125 + 30*m.x126 + 35*m.x127 + 25*m.x128 + 50*m.x129 + 10*m.x130 + 15*m.x131 + 20*m.x132 + 20*m.x133 + 30*m.x155 + 40*m.x156 + 40*m.x157 - m.x170 - m.x171 - m.x172 + 80*m.x194 + 90*m.x195 + 120*m.x196 + 285*m.x197 + 390*m.x198 + 350*m.x199 + 290*m.x200 + 405*m.x201 + 190*m.x202 + 280*m.x203 + 400*m.x204 + 430*m.x205 + 290*m.x206 + 300*m.x207 + 240*m.x208 + 350*m.x209 + 250*m.x210 + 300*m.x211 - 5*m.b686 - 4*m.b687 - 6*m.b688 - 8*m.b689 - 7*m.b690 - 6*m.b691 - 6*m.b692 - 9*m.b693 - 4*m.b694 - 10*m.b695 - 9*m.b696 - 5*m.b697 - 6*m.b698 - 10*m.b699 - 6*m.b700 - 7*m.b701 - 7*m.b702 - 4*m.b703 - 4*m.b704 - 3*m.b705 - 2*m.b706 - 5*m.b707 - 6*m.b708 - 7*m.b709 - 2*m.b710 - 5*m.b711 - 2*m.b712 - 4*m.b713 - 7*m.b714 - 4*m.b715 - 3*m.b716 - 9*m.b717 - 3*m.b718 - 7*m.b719 - 2*m.b720 - 9*m.b721 - 3*m.b722 - m.b723 - 9*m.b724 - 2*m.b725 - 6*m.b726 - 3*m.b727 - 4*m.b728 - 8*m.b729 - m.b730 - 2*m.b731 - 5*m.b732 - 2*m.b733 - 3*m.b734 - 4*m.b735 - 3*m.b736 - 5*m.b737 - 7*m.b738 - 6*m.b739 - 2*m.b740 - 8*m.b741 - 4*m.b742 - m.b743 - 4*m.b744 - m.b745 - 2*m.b746 - 5*m.b747 - 2*m.b748 - 9*m.b749 - 2*m.b750 - 9*m.b751 - 5*m.b752 - 8*m.b753 - 4*m.b754 - 2*m.b755 - 3*m.b756 - 8*m.b757 - 10*m.b758 - 6*m.b759 - 3*m.b760 - 4*m.b761 - 8*m.b762 - 7*m.b763 - 7*m.b764 - 3*m.b765 - 9*m.b766 - 4*m.b767 - 8*m.b768 - 6*m.b769 - 2*m.b770 - m.b771 - 3*m.b772 - 8*m.b773 - 3*m.b774 - 4*m.b775, sense=maximize) m.c2 = Constraint(expr= m.x2 - m.x5 - m.x8 == 0) m.c3 = Constraint(expr= m.x3 - m.x6 - m.x9 == 0) m.c4 = Constraint(expr= m.x4 - m.x7 - m.x10 == 0) m.c5 = Constraint(expr= - m.x11 - m.x14 + m.x17 == 0) m.c6 = Constraint(expr= - m.x12 - m.x15 + m.x18 == 0) m.c7 = Constraint(expr= - m.x13 - m.x16 + m.x19 == 0) m.c8 = Constraint(expr= m.x17 - m.x20 - m.x23 == 0) m.c9 = Constraint(expr= m.x18 - m.x21 - m.x24 == 0) m.c10 = Constraint(expr= m.x19 - m.x22 - m.x25 == 0) m.c11 = Constraint(expr= m.x23 - m.x26 - m.x29 - m.x32 == 0) m.c12 = Constraint(expr= m.x24 - m.x27 - m.x30 - m.x33 == 0) m.c13 = Constraint(expr= m.x25 - m.x28 - m.x31 - m.x34 == 0) m.c14 = Constraint(expr= m.x38 - m.x47 - m.x50 == 0) m.c15 = Constraint(expr= m.x39 - m.x48 - m.x51 == 0) m.c16 = Constraint(expr= m.x40 - m.x49 - m.x52 == 0) m.c17 = Constraint(expr= m.x44 - m.x53 - m.x56 - m.x59 == 0) m.c18 = Constraint(expr= m.x45 - m.x54 - m.x57 - m.x60 == 0) m.c19 = Constraint(expr= m.x46 - m.x55 - m.x58 - m.x61 == 0) m.c20 = Constraint(expr= m.x68 - m.x80 - m.x83 == 0) m.c21 = Constraint(expr= m.x69 - m.x81 - m.x84 == 0) m.c22 = Constraint(expr= m.x70 - m.x82 - m.x85 == 0) m.c23 = Constraint(expr= - m.x71 - m.x89 + m.x92 == 0) m.c24 = Constraint(expr= - m.x72 - m.x90 + m.x93 == 0) m.c25 = Constraint(expr= - m.x73 - m.x91 + m.x94 == 0) m.c26 = Constraint(expr= m.x74 - m.x95 - m.x98 == 0) m.c27 = Constraint(expr= m.x75 - m.x96 - m.x99 == 0) m.c28 = Constraint(expr= m.x76 - m.x97 - m.x100 == 0) m.c29 = Constraint(expr= m.x77 - m.x101 - m.x104 - m.x107 == 0) m.c30 = Constraint(expr= m.x78 - m.x102 - m.x105 - m.x108 == 0) m.c31 = Constraint(expr= m.x79 - m.x103 - m.x106 - m.x109 == 0) m.c32 = Constraint(expr= m.x134 - m.x137 == 0) m.c33 = Constraint(expr= m.x135 - m.x138 == 0) m.c34 = Constraint(expr= m.x136 - m.x139 == 0) m.c35 = Constraint(expr= m.x137 - m.x140 - m.x143 == 0) m.c36 = Constraint(expr= m.x138 - m.x141 - m.x144 == 0) m.c37 = Constraint(expr= m.x139 - m.x142 - m.x145 == 0) m.c38 = Constraint(expr= - m.x146 - m.x149 + m.x152 == 0) m.c39 = Constraint(expr= - m.x147 - m.x150 + m.x153 == 0) m.c40 = Constraint(expr= - m.x148 - m.x151 + m.x154 == 0) m.c41 = Constraint(expr= m.x152 - m.x155 - m.x158 == 0) m.c42 = Constraint(expr= m.x153 - m.x156 - m.x159 == 0) m.c43 = Constraint(expr= m.x154 - m.x157 - m.x160 == 0) m.c44 = Constraint(expr= m.x158 - m.x161 - m.x164 - m.x167 == 0) m.c45 = Constraint(expr= m.x159 - m.x162 - m.x165 - m.x168 == 0) m.c46 = Constraint(expr= m.x160 - m.x163 - m.x166 - m.x169 == 0) m.c47 = Constraint(expr= m.x173 - m.x182 - m.x185 == 0) m.c48 = Constraint(expr= m.x174 - m.x183 - m.x186 == 0) m.c49 = Constraint(expr= m.x175 - m.x184 - m.x187 == 0) m.c50 = Constraint(expr= m.x179 - m.x188 - m.x191 - m.x194 == 0) m.c51 = Constraint(expr= m.x180 - m.x189 - m.x192 - m.x195 == 0) m.c52 = Constraint(expr= m.x181 - m.x190 - m.x193 - m.x196 == 0) m.c53 = Constraint(expr=(m.x224/(0.001 + 0.999*m.b596) - log(1 + m.x212/(0.001 + 0.999*m.b596)))*(0.001 + 0.999*m.b596) <= 0) m.c54 = Constraint(expr=(m.x225/(0.001 + 0.999*m.b597) - log(1 + m.x213/(0.001 + 0.999*m.b597)))*(0.001 + 0.999*m.b597) <= 0) m.c55 = Constraint(expr=(m.x226/(0.001 + 0.999*m.b598) - log(1 + m.x214/(0.001 + 0.999*m.b598)))*(0.001 + 0.999*m.b598) <= 0) m.c56 = Constraint(expr= m.x215 == 0) m.c57 = Constraint(expr= m.x216 == 0) m.c58 = Constraint(expr= m.x217 == 0) m.c59 = Constraint(expr= m.x227 == 0) m.c60 = Constraint(expr= m.x228 == 0) m.c61 = Constraint(expr= m.x229 == 0) m.c62 = Constraint(expr= m.x5 - m.x212 - m.x215 == 0) m.c63 = Constraint(expr= m.x6 - m.x213 - m.x216 == 0) m.c64 = Constraint(expr= m.x7 - m.x214 - m.x217 == 0) m.c65 = Constraint(expr= m.x11 - m.x224 - m.x227 == 0) m.c66 = Constraint(expr= m.x12 - m.x225 - m.x228 == 0) m.c67 = Constraint(expr= m.x13 - m.x226 - m.x229 == 0) m.c68 = Constraint(expr= m.x212 - 40*m.b596 <= 0) m.c69 = Constraint(expr= m.x213 - 40*m.b597 <= 0) m.c70 = Constraint(expr= m.x214 - 40*m.b598 <= 0) m.c71 = Constraint(expr= m.x215 + 40*m.b596 <= 40) m.c72 = Constraint(expr= m.x216 + 40*m.b597 <= 40) m.c73 = Constraint(expr= m.x217 + 40*m.b598 <= 40) m.c74 = Constraint(expr= m.x224 - 3.71357206670431*m.b596 <= 0) m.c75 = Constraint(expr= m.x225 - 3.71357206670431*m.b597 <= 0) m.c76 = Constraint(expr= m.x226 - 3.71357206670431*m.b598 <= 0) m.c77 = Constraint(expr= m.x227 + 3.71357206670431*m.b596 <= 3.71357206670431) m.c78 = Constraint(expr= m.x228 + 3.71357206670431*m.b597 <= 3.71357206670431) m.c79 = Constraint(expr= m.x229 + 3.71357206670431*m.b598 <= 3.71357206670431) m.c80 = Constraint(expr=(m.x230/(0.001 + 0.999*m.b599) - 1.2*log(1 + m.x218/(0.001 + 0.999*m.b599)))*(0.001 + 0.999* m.b599) <= 0) m.c81 = Constraint(expr=(m.x231/(0.001 + 0.999*m.b600) - 1.2*log(1 + m.x219/(0.001 + 0.999*m.b600)))*(0.001 + 0.999* m.b600) <= 0) m.c82 = Constraint(expr=(m.x232/(0.001 + 0.999*m.b601) - 1.2*log(1 + m.x220/(0.001 + 0.999*m.b601)))*(0.001 + 0.999* m.b601) <= 0) m.c83 = Constraint(expr= m.x221 == 0) m.c84 = Constraint(expr= m.x222 == 0) m.c85 = Constraint(expr= m.x223 == 0) m.c86 = Constraint(expr= m.x233 == 0) m.c87 = Constraint(expr= m.x234 == 0) m.c88 = Constraint(expr= m.x235 == 0) m.c89 = Constraint(expr= m.x8 - m.x218 - m.x221 == 0) m.c90 = Constraint(expr= m.x9 - m.x219 - m.x222 == 0) m.c91 = Constraint(expr= m.x10 - m.x220 - m.x223 == 0) m.c92 = Constraint(expr= m.x14 - m.x230 - m.x233 == 0) m.c93 = Constraint(expr= m.x15 - m.x231 - m.x234 == 0) m.c94 = Constraint(expr= m.x16 - m.x232 - m.x235 == 0) m.c95 = Constraint(expr= m.x218 - 40*m.b599 <= 0) m.c96 = Constraint(expr= m.x219 - 40*m.b600 <= 0) m.c97 = Constraint(expr= m.x220 - 40*m.b601 <= 0) m.c98 = Constraint(expr= m.x221 + 40*m.b599 <= 40) m.c99 = Constraint(expr= m.x222 + 40*m.b600 <= 40) m.c100 = Constraint(expr= m.x223 + 40*m.b601 <= 40) m.c101 = Constraint(expr= m.x230 - 4.45628648004517*m.b599 <= 0) m.c102 = Constraint(expr= m.x231 - 4.45628648004517*m.b600 <= 0) m.c103 = Constraint(expr= m.x232 - 4.45628648004517*m.b601 <= 0) m.c104 = Constraint(expr= m.x233 + 4.45628648004517*m.b599 <= 4.45628648004517) m.c105 = Constraint(expr= m.x234 + 4.45628648004517*m.b600 <= 4.45628648004517) m.c106 = Constraint(expr= m.x235 + 4.45628648004517*m.b601 <= 4.45628648004517) m.c107 = Constraint(expr= - 0.75*m.x236 + m.x260 == 0) m.c108 = Constraint(expr= - 0.75*m.x237 + m.x261 == 0) m.c109 = Constraint(expr= - 0.75*m.x238 + m.x262 == 0) m.c110 = Constraint(expr= m.x239 == 0) m.c111 = Constraint(expr= m.x240 == 0) m.c112 = Constraint(expr= m.x241 == 0) m.c113 = Constraint(expr= m.x263 == 0) m.c114 = Constraint(expr= m.x264 == 0) m.c115 = Constraint(expr= m.x265 == 0) m.c116 = Constraint(expr= m.x26 - m.x236 - m.x239 == 0) m.c117 = Constraint(expr= m.x27 - m.x237 - m.x240 == 0) m.c118 = Constraint(expr= m.x28 - m.x238 - m.x241 == 0) m.c119 = Constraint(expr= m.x38 - m.x260 - m.x263 == 0) m.c120 = Constraint(expr= m.x39 - m.x261 - m.x264 == 0) m.c121 = Constraint(expr= m.x40 - m.x262 - m.x265 == 0) m.c122 = Constraint(expr= m.x236 - 4.45628648004517*m.b602 <= 0) m.c123 = Constraint(expr= m.x237 - 4.45628648004517*m.b603 <= 0) m.c124 = Constraint(expr= m.x238 - 4.45628648004517*m.b604 <= 0) m.c125 = Constraint(expr= m.x239 + 4.45628648004517*m.b602 <= 4.45628648004517) m.c126 = Constraint(expr= m.x240 + 4.45628648004517*m.b603 <= 4.45628648004517) m.c127 = Constraint(expr= m.x241 + 4.45628648004517*m.b604 <= 4.45628648004517) m.c128 = Constraint(expr= m.x260 - 3.34221486003388*m.b602 <= 0) m.c129 = Constraint(expr= m.x261 - 3.34221486003388*m.b603 <= 0) m.c130 = Constraint(expr= m.x262 - 3.34221486003388*m.b604 <= 0) m.c131 = Constraint(expr= m.x263 + 3.34221486003388*m.b602 <= 3.34221486003388) m.c132 = Constraint(expr= m.x264 + 3.34221486003388*m.b603 <= 3.34221486003388) m.c133 = Constraint(expr= m.x265 + 3.34221486003388*m.b604 <= 3.34221486003388) m.c134 = Constraint(expr=(m.x266/(0.001 + 0.999*m.b605) - 1.5*log(1 + m.x242/(0.001 + 0.999*m.b605)))*(0.001 + 0.999* m.b605) <= 0) m.c135 = Constraint(expr=(m.x267/(0.001 + 0.999*m.b606) - 1.5*log(1 + m.x243/(0.001 + 0.999*m.b606)))*(0.001 + 0.999* m.b606) <= 0) m.c136 = Constraint(expr=(m.x268/(0.001 + 0.999*m.b607) - 1.5*log(1 + m.x244/(0.001 + 0.999*m.b607)))*(0.001 + 0.999* m.b607) <= 0) m.c137 = Constraint(expr= m.x245 == 0) m.c138 = Constraint(expr= m.x246 == 0) m.c139 = Constraint(expr= m.x247 == 0) m.c140 = Constraint(expr= m.x272 == 0) m.c141 = Constraint(expr= m.x273 == 0) m.c142 = Constraint(expr= m.x274 == 0) m.c143 = Constraint(expr= m.x29 - m.x242 - m.x245 == 0) m.c144 = Constraint(expr= m.x30 - m.x243 - m.x246 == 0) m.c145 = Constraint(expr= m.x31 - m.x244 - m.x247 == 0) m.c146 = Constraint(expr= m.x41 - m.x266 - m.x272 == 0) m.c147 = Constraint(expr= m.x42 - m.x267 - m.x273 == 0) m.c148 = Constraint(expr= m.x43 - m.x268 - m.x274 == 0) m.c149 = Constraint(expr= m.x242 - 4.45628648004517*m.b605 <= 0) m.c150 = Constraint(expr= m.x243 - 4.45628648004517*m.b606 <= 0) m.c151 = Constraint(expr= m.x244 - 4.45628648004517*m.b607 <= 0) m.c152 = Constraint(expr= m.x245 + 4.45628648004517*m.b605 <= 4.45628648004517) m.c153 = Constraint(expr= m.x246 + 4.45628648004517*m.b606 <= 4.45628648004517) m.c154 = Constraint(expr= m.x247 + 4.45628648004517*m.b607 <= 4.45628648004517) m.c155 = Constraint(expr= m.x266 - 2.54515263975353*m.b605 <= 0) m.c156 = Constraint(expr= m.x267 - 2.54515263975353*m.b606 <= 0) m.c157 = Constraint(expr= m.x268 - 2.54515263975353*m.b607 <= 0) m.c158 = Constraint(expr= m.x272 + 2.54515263975353*m.b605 <= 2.54515263975353) m.c159 = Constraint(expr= m.x273 + 2.54515263975353*m.b606 <= 2.54515263975353) m.c160 = Constraint(expr= m.x274 + 2.54515263975353*m.b607 <= 2.54515263975353) m.c161 = Constraint(expr= - m.x248 + m.x278 == 0) m.c162 = Constraint(expr= - m.x249 + m.x279 == 0) m.c163 = Constraint(expr= - m.x250 + m.x280 == 0) m.c164 = Constraint(expr= - 0.5*m.x254 + m.x278 == 0) m.c165 = Constraint(expr= - 0.5*m.x255 + m.x279 == 0) m.c166 = Constraint(expr= - 0.5*m.x256 + m.x280 == 0) m.c167 = Constraint(expr= m.x251 == 0) m.c168 = Constraint(expr= m.x252 == 0) m.c169 = Constraint(expr= m.x253 == 0) m.c170 = Constraint(expr= m.x257 == 0) m.c171 = Constraint(expr= m.x258 == 0) m.c172 = Constraint(expr= m.x259 == 0) m.c173 = Constraint(expr= m.x281 == 0) m.c174 = Constraint(expr= m.x282 == 0) m.c175 = Constraint(expr= m.x283 == 0) m.c176 = Constraint(expr= m.x32 - m.x248 - m.x251 == 0) m.c177 = Constraint(expr= m.x33 - m.x249 - m.x252 == 0) m.c178 = Constraint(expr= m.x34 - m.x250 - m.x253 == 0) m.c179 = Constraint(expr= m.x35 - m.x254 - m.x257 == 0) m.c180 = Constraint(expr= m.x36 - m.x255 - m.x258 == 0) m.c181 = Constraint(expr= m.x37 - m.x256 - m.x259 == 0) m.c182 = Constraint(expr= m.x44 - m.x278 - m.x281 == 0) m.c183 = Constraint(expr= m.x45 - m.x279 - m.x282 == 0) m.c184 = Constraint(expr= m.x46 - m.x280 - m.x283 == 0) m.c185 = Constraint(expr= m.x248 - 4.45628648004517*m.b608 <= 0) m.c186 = Constraint(expr= m.x249 - 4.45628648004517*m.b609 <= 0) m.c187 = Constraint(expr= m.x250 - 4.45628648004517*m.b610 <= 0) m.c188 = Constraint(expr= m.x251 + 4.45628648004517*m.b608 <= 4.45628648004517) m.c189 = Constraint(expr= m.x252 + 4.45628648004517*m.b609 <= 4.45628648004517) m.c190 = Constraint(expr= m.x253 + 4.45628648004517*m.b610 <= 4.45628648004517) m.c191 = Constraint(expr= m.x254 - 30*m.b608 <= 0) m.c192 = Constraint(expr= m.x255 - 30*m.b609 <= 0) m.c193 = Constraint(expr= m.x256 - 30*m.b610 <= 0) m.c194 = Constraint(expr= m.x257 + 30*m.b608 <= 30) m.c195 = Constraint(expr= m.x258 + 30*m.b609 <= 30) m.c196 = Constraint(expr= m.x259 + 30*m.b610 <= 30) m.c197 = Constraint(expr= m.x278 - 15*m.b608 <= 0) m.c198 = Constraint(expr= m.x279 - 15*m.b609 <= 0) m.c199 = Constraint(expr= m.x280 - 15*m.b610 <= 0) m.c200 = Constraint(expr= m.x281 + 15*m.b608 <= 15) m.c201 = Constraint(expr= m.x282 + 15*m.b609 <= 15) m.c202 = Constraint(expr= m.x283 + 15*m.b610 <= 15) m.c203 = Constraint(expr=(m.x314/(0.001 + 0.999*m.b611) - 1.25*log(1 + m.x284/(0.001 + 0.999*m.b611)))*(0.001 + 0.999* m.b611) <= 0) m.c204 = Constraint(expr=(m.x315/(0.001 + 0.999*m.b612) - 1.25*log(1 + m.x285/(0.001 + 0.999*m.b612)))*(0.001 + 0.999* m.b612) <= 0) m.c205 = Constraint(expr=(m.x316/(0.001 + 0.999*m.b613) - 1.25*log(1 + m.x286/(0.001 + 0.999*m.b613)))*(0.001 + 0.999* m.b613) <= 0) m.c206 = Constraint(expr= m.x287 == 0) m.c207 = Constraint(expr= m.x288 == 0) m.c208 = Constraint(expr= m.x289 == 0) m.c209 = Constraint(expr= m.x320 == 0) m.c210 = Constraint(expr= m.x321 == 0) m.c211 = Constraint(expr= m.x322 == 0) m.c212 = Constraint(expr= m.x47 - m.x284 - m.x287 == 0) m.c213 = Constraint(expr= m.x48 - m.x285 - m.x288 == 0) m.c214 = Constraint(expr= m.x49 - m.x286 - m.x289 == 0) m.c215 = Constraint(expr= m.x62 - m.x314 - m.x320 == 0) m.c216 = Constraint(expr= m.x63 - m.x315 - m.x321 == 0) m.c217 = Constraint(expr= m.x64 - m.x316 - m.x322 == 0) m.c218 = Constraint(expr= m.x284 - 3.34221486003388*m.b611 <= 0) m.c219 = Constraint(expr= m.x285 - 3.34221486003388*m.b612 <= 0) m.c220 = Constraint(expr= m.x286 - 3.34221486003388*m.b613 <= 0) m.c221 = Constraint(expr= m.x287 + 3.34221486003388*m.b611 <= 3.34221486003388) m.c222 = Constraint(expr= m.x288 + 3.34221486003388*m.b612 <= 3.34221486003388) m.c223 = Constraint(expr= m.x289 + 3.34221486003388*m.b613 <= 3.34221486003388) m.c224 = Constraint(expr= m.x314 - 1.83548069293539*m.b611 <= 0) m.c225 = Constraint(expr= m.x315 - 1.83548069293539*m.b612 <= 0) m.c226 = Constraint(expr= m.x316 - 1.83548069293539*m.b613 <= 0) m.c227 = Constraint(expr= m.x320 + 1.83548069293539*m.b611 <= 1.83548069293539) m.c228 = Constraint(expr= m.x321 + 1.83548069293539*m.b612 <= 1.83548069293539) m.c229 = Constraint(expr= m.x322 + 1.83548069293539*m.b613 <= 1.83548069293539) m.c230 = Constraint(expr=(m.x326/(0.001 + 0.999*m.b614) - 0.9*log(1 + m.x290/(0.001 + 0.999*m.b614)))*(0.001 + 0.999* m.b614) <= 0) m.c231 = Constraint(expr=(m.x327/(0.001 + 0.999*m.b615) - 0.9*log(1 + m.x291/(0.001 + 0.999*m.b615)))*(0.001 + 0.999* m.b615) <= 0) m.c232 = Constraint(expr=(m.x328/(0.001 + 0.999*m.b616) - 0.9*log(1 + m.x292/(0.001 + 0.999*m.b616)))*(0.001 + 0.999* m.b616) <= 0) m.c233 = Constraint(expr= m.x293 == 0) m.c234 = Constraint(expr= m.x294 == 0) m.c235 = Constraint(expr= m.x295 == 0) m.c236 = Constraint(expr= m.x332 == 0) m.c237 = Constraint(expr= m.x333 == 0) m.c238 = Constraint(expr= m.x334 == 0) m.c239 = Constraint(expr= m.x50 - m.x290 - m.x293 == 0) m.c240 = Constraint(expr= m.x51 - m.x291 - m.x294 == 0) m.c241 = Constraint(expr= m.x52 - m.x292 - m.x295 == 0) m.c242 = Constraint(expr= m.x65 - m.x326 - m.x332 == 0) m.c243 = Constraint(expr= m.x66 - m.x327 - m.x333 == 0) m.c244 = Constraint(expr= m.x67 - m.x328 - m.x334 == 0) m.c245 = Constraint(expr= m.x290 - 3.34221486003388*m.b614 <= 0) m.c246 = Constraint(expr= m.x291 - 3.34221486003388*m.b615 <= 0) m.c247 = Constraint(expr= m.x292 - 3.34221486003388*m.b616 <= 0) m.c248 = Constraint(expr= m.x293 + 3.34221486003388*m.b614 <= 3.34221486003388) m.c249 = Constraint(expr= m.x294 + 3.34221486003388*m.b615 <= 3.34221486003388) m.c250 = Constraint(expr= m.x295 + 3.34221486003388*m.b616 <= 3.34221486003388) m.c251 = Constraint(expr= m.x326 - 1.32154609891348*m.b614 <= 0) m.c252 = Constraint(expr= m.x327 - 1.32154609891348*m.b615 <= 0) m.c253 = Constraint(expr= m.x328 - 1.32154609891348*m.b616 <= 0) m.c254 = Constraint(expr= m.x332 + 1.32154609891348*m.b614 <= 1.32154609891348) m.c255 = Constraint(expr= m.x333 + 1.32154609891348*m.b615 <= 1.32154609891348) m.c256 = Constraint(expr= m.x334 + 1.32154609891348*m.b616 <= 1.32154609891348) m.c257 = Constraint(expr=(m.x338/(0.001 + 0.999*m.b617) - log(1 + m.x269/(0.001 + 0.999*m.b617)))*(0.001 + 0.999*m.b617) <= 0) m.c258 = Constraint(expr=(m.x339/(0.001 + 0.999*m.b618) - log(1 + m.x270/(0.001 + 0.999*m.b618)))*(0.001 + 0.999*m.b618) <= 0) m.c259 = Constraint(expr=(m.x340/(0.001 + 0.999*m.b619) - log(1 + m.x271/(0.001 + 0.999*m.b619)))*(0.001 + 0.999*m.b619) <= 0) m.c260 = Constraint(expr= m.x275 == 0) m.c261 = Constraint(expr= m.x276 == 0) m.c262 = Constraint(expr= m.x277 == 0) m.c263 = Constraint(expr= m.x341 == 0) m.c264 = Constraint(expr= m.x342 == 0) m.c265 = Constraint(expr= m.x343 == 0) m.c266 = Constraint(expr= m.x41 - m.x269 - m.x275 == 0) m.c267 = Constraint(expr= m.x42 - m.x270 - m.x276 == 0) m.c268 = Constraint(expr= m.x43 - m.x271 - m.x277 == 0) m.c269 = Constraint(expr= m.x68 - m.x338 - m.x341 == 0) m.c270 = Constraint(expr= m.x69 - m.x339 - m.x342 == 0) m.c271 = Constraint(expr= m.x70 - m.x340 - m.x343 == 0) m.c272 = Constraint(expr= m.x269 - 2.54515263975353*m.b617 <= 0) m.c273 = Constraint(expr= m.x270 - 2.54515263975353*m.b618 <= 0) m.c274 = Constraint(expr= m.x271 - 2.54515263975353*m.b619 <= 0) m.c275 = Constraint(expr= m.x275 + 2.54515263975353*m.b617 <= 2.54515263975353) m.c276 = Constraint(expr= m.x276 + 2.54515263975353*m.b618 <= 2.54515263975353) m.c277 = Constraint(expr= m.x277 + 2.54515263975353*m.b619 <= 2.54515263975353) m.c278 = Constraint(expr= m.x338 - 1.26558121681553*m.b617 <= 0) m.c279 = Constraint(expr= m.x339 - 1.26558121681553*m.b618 <= 0) m.c280 = Constraint(expr= m.x340 - 1.26558121681553*m.b619 <= 0) m.c281 = Constraint(expr= m.x341 + 1.26558121681553*m.b617 <= 1.26558121681553) m.c282 = Constraint(expr= m.x342 + 1.26558121681553*m.b618 <= 1.26558121681553) m.c283 = Constraint(expr= m.x343 + 1.26558121681553*m.b619 <= 1.26558121681553) m.c284 = Constraint(expr= - 0.9*m.x296 + m.x344 == 0) m.c285 = Constraint(expr= - 0.9*m.x297 + m.x345 == 0) m.c286 = Constraint(expr= - 0.9*m.x298 + m.x346 == 0) m.c287 = Constraint(expr= m.x299 == 0) m.c288 = Constraint(expr= m.x300 == 0) m.c289 = Constraint(expr= m.x301 == 0) m.c290 = Constraint(expr= m.x347 == 0) m.c291 = Constraint(expr= m.x348 == 0) m.c292 = Constraint(expr= m.x349 == 0) m.c293 = Constraint(expr= m.x53 - m.x296 - m.x299 == 0) m.c294 = Constraint(expr= m.x54 - m.x297 - m.x300 == 0) m.c295 = Constraint(expr= m.x55 - m.x298 - m.x301 == 0) m.c296 = Constraint(expr= m.x71 - m.x344 - m.x347 == 0) m.c297 = Constraint(expr= m.x72 - m.x345 - m.x348 == 0) m.c298 = Constraint(expr= m.x73 - m.x346 - m.x349 == 0) m.c299 = Constraint(expr= m.x296 - 15*m.b620 <= 0) m.c300 = Constraint(expr= m.x297 - 15*m.b621 <= 0) m.c301 = Constraint(expr= m.x298 - 15*m.b622 <= 0) m.c302 = Constraint(expr= m.x299 + 15*m.b620 <= 15) m.c303 = Constraint(expr= m.x300 + 15*m.b621 <= 15) m.c304 = Constraint(expr= m.x301 + 15*m.b622 <= 15) m.c305 = Constraint(expr= m.x344 - 13.5*m.b620 <= 0) m.c306 = Constraint(expr= m.x345 - 13.5*m.b621 <= 0) m.c307 = Constraint(expr= m.x346 - 13.5*m.b622 <= 0) m.c308 = Constraint(expr= m.x347 + 13.5*m.b620 <= 13.5) m.c309 = Constraint(expr= m.x348 + 13.5*m.b621 <= 13.5) m.c310 = Constraint(expr= m.x349 + 13.5*m.b622 <= 13.5) m.c311 = Constraint(expr= - 0.6*m.x302 + m.x350 == 0) m.c312 = Constraint(expr= - 0.6*m.x303 + m.x351 == 0) m.c313 = Constraint(expr= - 0.6*m.x304 + m.x352 == 0) m.c314 = Constraint(expr= m.x305 == 0) m.c315 = Constraint(expr= m.x306 == 0) m.c316 = Constraint(expr= m.x307 == 0) m.c317 = Constraint(expr= m.x353 == 0) m.c318 = Constraint(expr= m.x354 == 0) m.c319 = Constraint(expr= m.x355 == 0) m.c320 = Constraint(expr= m.x56 - m.x302 - m.x305 == 0) m.c321 = Constraint(expr= m.x57 - m.x303 - m.x306 == 0) m.c322 = Constraint(expr= m.x58 - m.x304 - m.x307 == 0) m.c323 = Constraint(expr= m.x74 - m.x350 - m.x353 == 0) m.c324 = Constraint(expr= m.x75 - m.x351 - m.x354 == 0) m.c325 = Constraint(expr= m.x76 - m.x352 - m.x355 == 0) m.c326 = Constraint(expr= m.x302 - 15*m.b623 <= 0) m.c327 = Constraint(expr= m.x303 - 15*m.b624 <= 0) m.c328 = Constraint(expr= m.x304 - 15*m.b625 <= 0) m.c329 = Constraint(expr= m.x305 + 15*m.b623 <= 15) m.c330 = Constraint(expr= m.x306 + 15*m.b624 <= 15) m.c331 = Constraint(expr= m.x307 + 15*m.b625 <= 15) m.c332 = Constraint(expr= m.x350 - 9*m.b623 <= 0) m.c333 = Constraint(expr= m.x351 - 9*m.b624 <= 0) m.c334 = Constraint(expr= m.x352 - 9*m.b625 <= 0) m.c335 = Constraint(expr= m.x353 + 9*m.b623 <= 9) m.c336 = Constraint(expr= m.x354 + 9*m.b624 <= 9) m.c337 = Constraint(expr= m.x355 + 9*m.b625 <= 9) m.c338 = Constraint(expr=(m.x356/(0.001 + 0.999*m.b626) - 1.1*log(1 + m.x308/(0.001 + 0.999*m.b626)))*(0.001 + 0.999* m.b626) <= 0) m.c339 = Constraint(expr=(m.x357/(0.001 + 0.999*m.b627) - 1.1*log(1 + m.x309/(0.001 + 0.999*m.b627)))*(0.001 + 0.999* m.b627) <= 0) m.c340 = Constraint(expr=(m.x358/(0.001 + 0.999*m.b628) - 1.1*log(1 + m.x310/(0.001 + 0.999*m.b628)))*(0.001 + 0.999* m.b628) <= 0) m.c341 = Constraint(expr= m.x311 == 0) m.c342 = Constraint(expr= m.x312 == 0) m.c343 = Constraint(expr= m.x313 == 0) m.c344 = Constraint(expr= m.x359 == 0) m.c345 = Constraint(expr= m.x360 == 0) m.c346 = Constraint(expr= m.x361 == 0) m.c347 = Constraint(expr= m.x59 - m.x308 - m.x311 == 0) m.c348 = Constraint(expr= m.x60 - m.x309 - m.x312 == 0) m.c349 = Constraint(expr= m.x61 - m.x310 - m.x313 == 0) m.c350 = Constraint(expr= m.x77 - m.x356 - m.x359 == 0) m.c351 = Constraint(expr= m.x78 - m.x357 - m.x360 == 0) m.c352 = Constraint(expr= m.x79 - m.x358 - m.x361 == 0) m.c353 = Constraint(expr= m.x308 - 15*m.b626 <= 0) m.c354 = Constraint(expr= m.x309 - 15*m.b627 <= 0) m.c355 = Constraint(expr= m.x310 - 15*m.b628 <= 0) m.c356 = Constraint(expr= m.x311 + 15*m.b626 <= 15) m.c357 = Constraint(expr= m.x312 + 15*m.b627 <= 15) m.c358 = Constraint(expr= m.x313 + 15*m.b628 <= 15) m.c359 = Constraint(expr= m.x356 - 3.04984759446376*m.b626 <= 0) m.c360 = Constraint(expr= m.x357 - 3.04984759446376*m.b627 <= 0) m.c361 = Constraint(expr= m.x358 - 3.04984759446376*m.b628 <= 0) m.c362 = Constraint(expr= m.x359 + 3.04984759446376*m.b626 <= 3.04984759446376) m.c363 = Constraint(expr= m.x360 + 3.04984759446376*m.b627 <= 3.04984759446376) m.c364 = Constraint(expr= m.x361 + 3.04984759446376*m.b628 <= 3.04984759446376) m.c365 = Constraint(expr= - 0.9*m.x317 + m.x416 == 0) m.c366 = Constraint(expr= - 0.9*m.x318 + m.x417 == 0) m.c367 = Constraint(expr= - 0.9*m.x319 + m.x418 == 0) m.c368 = Constraint(expr= - m.x374 + m.x416 == 0) m.c369 = Constraint(expr= - m.x375 + m.x417 == 0) m.c370 = Constraint(expr= - m.x376 + m.x418 == 0) m.c371 = Constraint(expr= m.x323 == 0) m.c372 = Constraint(expr= m.x324 == 0) m.c373 = Constraint(expr= m.x325 == 0) m.c374 = Constraint(expr= m.x377 == 0) m.c375 = Constraint(expr= m.x378 == 0) m.c376 = Constraint(expr= m.x379 == 0) m.c377 = Constraint(expr= m.x419 == 0) m.c378 = Constraint(expr= m.x420 == 0) m.c379 = Constraint(expr= m.x421 == 0) m.c380 = Constraint(expr= m.x62 - m.x317 - m.x323 == 0) m.c381 = Constraint(expr= m.x63 - m.x318 - m.x324 == 0) m.c382 = Constraint(expr= m.x64 - m.x319 - m.x325 == 0) m.c383 = Constraint(expr= m.x86 - m.x374 - m.x377 == 0) m.c384 = Constraint(expr= m.x87 - m.x375 - m.x378 == 0) m.c385 = Constraint(expr= m.x88 - m.x376 - m.x379 == 0) m.c386 = Constraint(expr= m.x110 - m.x416 - m.x419 == 0) m.c387 = Constraint(expr= m.x111 - m.x417 - m.x420 == 0) m.c388 = Constraint(expr= m.x112 - m.x418 - m.x421 == 0) m.c389 = Constraint(expr= m.x317 - 1.83548069293539*m.b629 <= 0) m.c390 = Constraint(expr= m.x318 - 1.83548069293539*m.b630 <= 0) m.c391 = Constraint(expr= m.x319 - 1.83548069293539*m.b631 <= 0) m.c392 = Constraint(expr= m.x323 + 1.83548069293539*m.b629 <= 1.83548069293539) m.c393 = Constraint(expr= m.x324 + 1.83548069293539*m.b630 <= 1.83548069293539) m.c394 = Constraint(expr= m.x325 + 1.83548069293539*m.b631 <= 1.83548069293539) m.c395 = Constraint(expr= m.x374 - 20*m.b629 <= 0) m.c396 = Constraint(expr= m.x375 - 20*m.b630 <= 0) m.c397 = Constraint(expr= m.x376 - 20*m.b631 <= 0) m.c398 = Constraint(expr= m.x377 + 20*m.b629 <= 20) m.c399 = Constraint(expr= m.x378 + 20*m.b630 <= 20) m.c400 = Constraint(expr= m.x379 + 20*m.b631 <= 20) m.c401 = Constraint(expr= m.x416 - 20*m.b629 <= 0) m.c402 = Constraint(expr= m.x417 - 20*m.b630 <= 0) m.c403 = Constraint(expr= m.x418 - 20*m.b631 <= 0) m.c404 = Constraint(expr= m.x419 + 20*m.b629 <= 20) m.c405 = Constraint(expr= m.x420 + 20*m.b630 <= 20) m.c406 = Constraint(expr= m.x421 + 20*m.b631 <= 20) m.c407 = Constraint(expr=(m.x422/(0.001 + 0.999*m.b632) - log(1 + m.x329/(0.001 + 0.999*m.b632)))*(0.001 + 0.999*m.b632) <= 0) m.c408 = Constraint(expr=(m.x423/(0.001 + 0.999*m.b633) - log(1 + m.x330/(0.001 + 0.999*m.b633)))*(0.001 + 0.999*m.b633) <= 0) m.c409 = Constraint(expr=(m.x424/(0.001 + 0.999*m.b634) - log(1 + m.x331/(0.001 + 0.999*m.b634)))*(0.001 + 0.999*m.b634) <= 0) m.c410 = Constraint(expr= m.x335 == 0) m.c411 = Constraint(expr= m.x336 == 0) m.c412 = Constraint(expr= m.x337 == 0) m.c413 = Constraint(expr= m.x425 == 0) m.c414 = Constraint(expr= m.x426 == 0) m.c415 = Constraint(expr= m.x427 == 0) m.c416 = Constraint(expr= m.x65 - m.x329 - m.x335 == 0) m.c417 = Constraint(expr= m.x66 - m.x330 - m.x336 == 0) m.c418 = Constraint(expr= m.x67 - m.x331 - m.x337 == 0) m.c419 = Constraint(expr= m.x113 - m.x422 - m.x425 == 0) m.c420 = Constraint(expr= m.x114 - m.x423 - m.x426 == 0) m.c421 = Constraint(expr= m.x115 - m.x424 - m.x427 == 0) m.c422 = Constraint(expr= m.x329 - 1.32154609891348*m.b632 <= 0) m.c423 = Constraint(expr= m.x330 - 1.32154609891348*m.b633 <= 0) m.c424 = Constraint(expr= m.x331 - 1.32154609891348*m.b634 <= 0) m.c425 = Constraint(expr= m.x335 + 1.32154609891348*m.b632 <= 1.32154609891348) m.c426 = Constraint(expr= m.x336 + 1.32154609891348*m.b633 <= 1.32154609891348) m.c427 = Constraint(expr= m.x337 + 1.32154609891348*m.b634 <= 1.32154609891348) m.c428 = Constraint(expr= m.x422 - 0.842233385663186*m.b632 <= 0) m.c429 = Constraint(expr= m.x423 - 0.842233385663186*m.b633 <= 0) m.c430 = Constraint(expr= m.x424 - 0.842233385663186*m.b634 <= 0) m.c431 = Constraint(expr= m.x425 + 0.842233385663186*m.b632 <= 0.842233385663186) m.c432 = Constraint(expr= m.x426 + 0.842233385663186*m.b633 <= 0.842233385663186) m.c433 = Constraint(expr= m.x427 + 0.842233385663186*m.b634 <= 0.842233385663186) m.c434 = Constraint(expr=(m.x428/(0.001 + 0.999*m.b635) - 0.7*log(1 + m.x362/(0.001 + 0.999*m.b635)))*(0.001 + 0.999* m.b635) <= 0) m.c435 = Constraint(expr=(m.x429/(0.001 + 0.999*m.b636) - 0.7*log(1 + m.x363/(0.001 + 0.999*m.b636)))*(0.001 + 0.999* m.b636) <= 0) m.c436 = Constraint(expr=(m.x430/(0.001 + 0.999*m.b637) - 0.7*log(1 + m.x364/(0.001 + 0.999*m.b637)))*(0.001 + 0.999* m.b637) <= 0) m.c437 = Constraint(expr= m.x365 == 0) m.c438 = Constraint(expr= m.x366 == 0) m.c439 = Constraint(expr= m.x367 == 0) m.c440 = Constraint(expr= m.x431 == 0) m.c441 = Constraint(expr= m.x432 == 0) m.c442 = Constraint(expr= m.x433 == 0) m.c443 = Constraint(expr= m.x80 - m.x362 - m.x365 == 0) m.c444 = Constraint(expr= m.x81 - m.x363 - m.x366 == 0) m.c445 = Constraint(expr= m.x82 - m.x364 - m.x367 == 0) m.c446 = Constraint(expr= m.x116 - m.x428 - m.x431 == 0) m.c447 = Constraint(expr= m.x117 - m.x429 - m.x432 == 0) m.c448 = Constraint(expr= m.x118 - m.x430 - m.x433 == 0) m.c449 = Constraint(expr= m.x362 - 1.26558121681553*m.b635 <= 0) m.c450 = Constraint(expr= m.x363 - 1.26558121681553*m.b636 <= 0) m.c451 = Constraint(expr= m.x364 - 1.26558121681553*m.b637 <= 0) m.c452 = Constraint(expr= m.x365 + 1.26558121681553*m.b635 <= 1.26558121681553) m.c453 = Constraint(expr= m.x366 + 1.26558121681553*m.b636 <= 1.26558121681553) m.c454 = Constraint(expr= m.x367 + 1.26558121681553*m.b637 <= 1.26558121681553) m.c455 = Constraint(expr= m.x428 - 0.572481933717686*m.b635 <= 0) m.c456 = Constraint(expr= m.x429 - 0.572481933717686*m.b636 <= 0) m.c457 = Constraint(expr= m.x430 - 0.572481933717686*m.b637 <= 0) m.c458 = Constraint(expr= m.x431 + 0.572481933717686*m.b635 <= 0.572481933717686) m.c459 = Constraint(expr= m.x432 + 0.572481933717686*m.b636 <= 0.572481933717686) m.c460 = Constraint(expr= m.x433 + 0.572481933717686*m.b637 <= 0.572481933717686) m.c461 = Constraint(expr=(m.x434/(0.001 + 0.999*m.b638) - 0.65*log(1 + m.x368/(0.001 + 0.999*m.b638)))*(0.001 + 0.999* m.b638) <= 0) m.c462 = Constraint(expr=(m.x435/(0.001 + 0.999*m.b639) - 0.65*log(1 + m.x369/(0.001 + 0.999*m.b639)))*(0.001 + 0.999* m.b639) <= 0) m.c463 = Constraint(expr=(m.x436/(0.001 + 0.999*m.b640) - 0.65*log(1 + m.x370/(0.001 + 0.999*m.b640)))*(0.001 + 0.999* m.b640) <= 0) m.c464 = Constraint(expr=(m.x434/(0.001 + 0.999*m.b638) - 0.65*log(1 + m.x380/(0.001 + 0.999*m.b638)))*(0.001 + 0.999* m.b638) <= 0) m.c465 = Constraint(expr=(m.x435/(0.001 + 0.999*m.b639) - 0.65*log(1 + m.x381/(0.001 + 0.999*m.b639)))*(0.001 + 0.999* m.b639) <= 0) m.c466 = Constraint(expr=(m.x436/(0.001 + 0.999*m.b640) - 0.65*log(1 + m.x382/(0.001 + 0.999*m.b640)))*(0.001 + 0.999* m.b640) <= 0) m.c467 = Constraint(expr= m.x371 == 0) m.c468 = Constraint(expr= m.x372 == 0) m.c469 = Constraint(expr= m.x373 == 0) m.c470 = Constraint(expr= m.x383 == 0) m.c471 = Constraint(expr= m.x384 == 0) m.c472 = Constraint(expr= m.x385 == 0) m.c473 = Constraint(expr= m.x437 == 0) m.c474 = Constraint(expr= m.x438 == 0) m.c475 = Constraint(expr= m.x439 == 0) m.c476 = Constraint(expr= m.x83 - m.x368 - m.x371 == 0) m.c477 = Constraint(expr= m.x84 - m.x369 - m.x372 == 0) m.c478 = Constraint(expr= m.x85 - m.x370 - m.x373 == 0) m.c479 = Constraint(expr= m.x92 - m.x380 - m.x383 == 0) m.c480 = Constraint(expr= m.x93 - m.x381 - m.x384 == 0) m.c481 = Constraint(expr= m.x94 - m.x382 - m.x385 == 0) m.c482 = Constraint(expr= m.x119 - m.x434 - m.x437 == 0) m.c483 = Constraint(expr= m.x120 - m.x435 - m.x438 == 0) m.c484 = Constraint(expr= m.x121 - m.x436 - m.x439 == 0) m.c485 = Constraint(expr= m.x368 - 1.26558121681553*m.b638 <= 0) m.c486 = Constraint(expr= m.x369 - 1.26558121681553*m.b639 <= 0) m.c487 = Constraint(expr= m.x370 - 1.26558121681553*m.b640 <= 0) m.c488 = Constraint(expr= m.x371 + 1.26558121681553*m.b638 <= 1.26558121681553) m.c489 = Constraint(expr= m.x372 + 1.26558121681553*m.b639 <= 1.26558121681553) m.c490 = Constraint(expr= m.x373 + 1.26558121681553*m.b640 <= 1.26558121681553) m.c491 = Constraint(expr= m.x380 - 33.5*m.b638 <= 0) m.c492 = Constraint(expr= m.x381 - 33.5*m.b639 <= 0) m.c493 = Constraint(expr= m.x382 - 33.5*m.b640 <= 0) m.c494 = Constraint(expr= m.x383 + 33.5*m.b638 <= 33.5) m.c495 = Constraint(expr= m.x384 + 33.5*m.b639 <= 33.5) m.c496 = Constraint(expr= m.x385 + 33.5*m.b640 <= 33.5) m.c497 = Constraint(expr= m.x434 - 2.30162356062425*m.b638 <= 0) m.c498 = Constraint(expr= m.x435 - 2.30162356062425*m.b639 <= 0) m.c499 = Constraint(expr= m.x436 - 2.30162356062425*m.b640 <= 0) m.c500 = Constraint(expr= m.x437 + 2.30162356062425*m.b638 <= 2.30162356062425) m.c501 = Constraint(expr= m.x438 + 2.30162356062425*m.b639 <= 2.30162356062425) m.c502 = Constraint(expr= m.x439 + 2.30162356062425*m.b640 <= 2.30162356062425) m.c503 = Constraint(expr= - m.x386 + m.x440 == 0) m.c504 = Constraint(expr= - m.x387 + m.x441 == 0) m.c505 = Constraint(expr= - m.x388 + m.x442 == 0) m.c506 = Constraint(expr= m.x389 == 0) m.c507 = Constraint(expr= m.x390 == 0) m.c508 = Constraint(expr= m.x391 == 0) m.c509 = Constraint(expr= m.x443 == 0) m.c510 = Constraint(expr= m.x444 == 0) m.c511 = Constraint(expr= m.x445 == 0) m.c512 = Constraint(expr= m.x95 - m.x386 - m.x389 == 0) m.c513 = Constraint(expr= m.x96 - m.x387 - m.x390 == 0) m.c514 = Constraint(expr= m.x97 - m.x388 - m.x391 == 0) m.c515 = Constraint(expr= m.x122 - m.x440 - m.x443 == 0) m.c516 = Constraint(expr= m.x123 - m.x441 - m.x444 == 0) m.c517 = Constraint(expr= m.x124 - m.x442 - m.x445 == 0) m.c518 = Constraint(expr= m.x386 - 9*m.b641 <= 0) m.c519 = Constraint(expr= m.x387 - 9*m.b642 <= 0) m.c520 = Constraint(expr= m.x388 - 9*m.b643 <= 0) m.c521 = Constraint(expr= m.x389 + 9*m.b641 <= 9) m.c522 = Constraint(expr= m.x390 + 9*m.b642 <= 9) m.c523 = Constraint(expr= m.x391 + 9*m.b643 <= 9) m.c524 = Constraint(expr= m.x440 - 9*m.b641 <= 0) m.c525 = Constraint(expr= m.x441 - 9*m.b642 <= 0) m.c526 = Constraint(expr= m.x442 - 9*m.b643 <= 0) m.c527 = Constraint(expr= m.x443 + 9*m.b641 <= 9) m.c528 = Constraint(expr= m.x444 + 9*m.b642 <= 9) m.c529 = Constraint(expr= m.x445 + 9*m.b643 <= 9) m.c530 = Constraint(expr= - m.x392 + m.x446 == 0) m.c531 = Constraint(expr= - m.x393 + m.x447 == 0) m.c532 = Constraint(expr= - m.x394 + m.x448 == 0) m.c533 = Constraint(expr= m.x395 == 0) m.c534 = Constraint(expr= m.x396 == 0) m.c535 = Constraint(expr= m.x397 == 0) m.c536 = Constraint(expr= m.x449 == 0) m.c537 = Constraint(expr= m.x450 == 0) m.c538 = Constraint(expr= m.x451 == 0) m.c539 = Constraint(expr= m.x98 - m.x392 - m.x395 == 0) m.c540 = Constraint(expr= m.x99 - m.x393 - m.x396 == 0) m.c541 = Constraint(expr= m.x100 - m.x394 - m.x397 == 0) m.c542 = Constraint(expr= m.x125 - m.x446 - m.x449 == 0) m.c543 = Constraint(expr= m.x126 - m.x447 - m.x450 == 0) m.c544 = Constraint(expr= m.x127 - m.x448 - m.x451 == 0) m.c545 = Constraint(expr= m.x392 - 9*m.b644 <= 0) m.c546 = Constraint(expr= m.x393 - 9*m.b645 <= 0) m.c547 = Constraint(expr= m.x394 - 9*m.b646 <= 0) m.c548 = Constraint(expr= m.x395 + 9*m.b644 <= 9) m.c549 = Constraint(expr= m.x396 + 9*m.b645 <= 9) m.c550 = Constraint(expr= m.x397 + 9*m.b646 <= 9) m.c551 = Constraint(expr= m.x446 - 9*m.b644 <= 0) m.c552 = Constraint(expr= m.x447 - 9*m.b645 <= 0) m.c553 = Constraint(expr= m.x448 - 9*m.b646 <= 0) m.c554 = Constraint(expr= m.x449 + 9*m.b644 <= 9) m.c555 = Constraint(expr= m.x450 + 9*m.b645 <= 9) m.c556 = Constraint(expr= m.x451 + 9*m.b646 <= 9) m.c557 = Constraint(expr=(m.x452/(0.001 + 0.999*m.b647) - 0.75*log(1 + m.x398/(0.001 + 0.999*m.b647)))*(0.001 + 0.999* m.b647) <= 0) m.c558 = Constraint(expr=(m.x453/(0.001 + 0.999*m.b648) - 0.75*log(1 + m.x399/(0.001 + 0.999*m.b648)))*(0.001 + 0.999* m.b648) <= 0) m.c559 = Constraint(expr=(m.x454/(0.001 + 0.999*m.b649) - 0.75*log(1 + m.x400/(0.001 + 0.999*m.b649)))*(0.001 + 0.999* m.b649) <= 0) m.c560 = Constraint(expr= m.x401 == 0) m.c561 = Constraint(expr= m.x402 == 0) m.c562 = Constraint(expr= m.x403 == 0) m.c563 = Constraint(expr= m.x455 == 0) m.c564 = Constraint(expr= m.x456 == 0) m.c565 = Constraint(expr= m.x457 == 0) m.c566 = Constraint(expr= m.x101 - m.x398 - m.x401 == 0) m.c567 = Constraint(expr= m.x102 - m.x399 - m.x402 == 0) m.c568 = Constraint(expr= m.x103 - m.x400 - m.x403 == 0) m.c569 = Constraint(expr= m.x128 - m.x452 - m.x455 == 0) m.c570 = Constraint(expr= m.x129 - m.x453 - m.x456 == 0) m.c571 = Constraint(expr= m.x130 - m.x454 - m.x457 == 0) m.c572 = Constraint(expr= m.x398 - 3.04984759446376*m.b647 <= 0) m.c573 = Constraint(expr= m.x399 - 3.04984759446376*m.b648 <= 0) m.c574 = Constraint(expr= m.x400 - 3.04984759446376*m.b649 <= 0) m.c575 = Constraint(expr= m.x401 + 3.04984759446376*m.b647 <= 3.04984759446376) m.c576 = Constraint(expr= m.x402 + 3.04984759446376*m.b648 <= 3.04984759446376) m.c577 = Constraint(expr= m.x403 + 3.04984759446376*m.b649 <= 3.04984759446376) m.c578 = Constraint(expr= m.x452 - 1.04900943706034*m.b647 <= 0) m.c579 = Constraint(expr= m.x453 - 1.04900943706034*m.b648 <= 0) m.c580 = Constraint(expr= m.x454 - 1.04900943706034*m.b649 <= 0) m.c581 = Constraint(expr= m.x455 + 1.04900943706034*m.b647 <= 1.04900943706034) m.c582 = Constraint(expr= m.x456 + 1.04900943706034*m.b648 <= 1.04900943706034) m.c583 = Constraint(expr= m.x457 + 1.04900943706034*m.b649 <= 1.04900943706034) m.c584 = Constraint(expr=(m.x458/(0.001 + 0.999*m.b650) - 0.8*log(1 + m.x404/(0.001 + 0.999*m.b650)))*(0.001 + 0.999* m.b650) <= 0) m.c585 = Constraint(expr=(m.x459/(0.001 + 0.999*m.b651) - 0.8*log(1 + m.x405/(0.001 + 0.999*m.b651)))*(0.001 + 0.999* m.b651) <= 0) m.c586 = Constraint(expr=(m.x460/(0.001 + 0.999*m.b652) - 0.8*log(1 + m.x406/(0.001 + 0.999*m.b652)))*(0.001 + 0.999* m.b652) <= 0) m.c587 = Constraint(expr= m.x407 == 0) m.c588 = Constraint(expr= m.x408 == 0) m.c589 = Constraint(expr= m.x409 == 0) m.c590 = Constraint(expr= m.x461 == 0) m.c591 = Constraint(expr= m.x462 == 0) m.c592 = Constraint(expr= m.x463 == 0) m.c593 = Constraint(expr= m.x104 - m.x404 - m.x407 == 0) m.c594 = Constraint(expr= m.x105 - m.x405 - m.x408 == 0) m.c595 = Constraint(expr= m.x106 - m.x406 - m.x409 == 0) m.c596 = Constraint(expr= m.x131 - m.x458 - m.x461 == 0) m.c597 = Constraint(expr= m.x132 - m.x459 - m.x462 == 0) m.c598 = Constraint(expr= m.x133 - m.x460 - m.x463 == 0) m.c599 = Constraint(expr= m.x404 - 3.04984759446376*m.b650 <= 0) m.c600 = Constraint(expr= m.x405 - 3.04984759446376*m.b651 <= 0) m.c601 = Constraint(expr= m.x406 - 3.04984759446376*m.b652 <= 0) m.c602 = Constraint(expr= m.x407 + 3.04984759446376*m.b650 <= 3.04984759446376) m.c603 = Constraint(expr= m.x408 + 3.04984759446376*m.b651 <= 3.04984759446376) m.c604 = Constraint(expr= m.x409 + 3.04984759446376*m.b652 <= 3.04984759446376) m.c605 = Constraint(expr= m.x458 - 1.11894339953103*m.b650 <= 0) m.c606 = Constraint(expr= m.x459 - 1.11894339953103*m.b651 <= 0) m.c607 = Constraint(expr= m.x460 - 1.11894339953103*m.b652 <= 0) m.c608 = Constraint(expr= m.x461 + 1.11894339953103*m.b650 <= 1.11894339953103) m.c609 = Constraint(expr= m.x462 + 1.11894339953103*m.b651 <= 1.11894339953103) m.c610 = Constraint(expr= m.x463 + 1.11894339953103*m.b652 <= 1.11894339953103) m.c611 = Constraint(expr=(m.x464/(0.001 + 0.999*m.b653) - 0.85*log(1 + m.x410/(0.001 + 0.999*m.b653)))*(0.001 + 0.999* m.b653) <= 0) m.c612 = Constraint(expr=(m.x465/(0.001 + 0.999*m.b654) - 0.85*log(1 + m.x411/(0.001 + 0.999*m.b654)))*(0.001 + 0.999* m.b654) <= 0) m.c613 = Constraint(expr=(m.x466/(0.001 + 0.999*m.b655) - 0.85*log(1 + m.x412/(0.001 + 0.999*m.b655)))*(0.001 + 0.999* m.b655) <= 0) m.c614 = Constraint(expr= m.x413 == 0) m.c615 = Constraint(expr= m.x414 == 0) m.c616 = Constraint(expr= m.x415 == 0) m.c617 = Constraint(expr= m.x467 == 0) m.c618 = Constraint(expr= m.x468 == 0) m.c619 = Constraint(expr= m.x469 == 0) m.c620 = Constraint(expr= m.x107 - m.x410 - m.x413 == 0) m.c621 = Constraint(expr= m.x108 - m.x411 - m.x414 == 0) m.c622 = Constraint(expr= m.x109 - m.x412 - m.x415 == 0) m.c623 = Constraint(expr= m.x134 - m.x464 - m.x467 == 0) m.c624 = Constraint(expr= m.x135 - m.x465 - m.x468 == 0) m.c625 = Constraint(expr= m.x136 - m.x466 - m.x469 == 0) m.c626 = Constraint(expr= m.x410 - 3.04984759446376*m.b653 <= 0) m.c627 = Constraint(expr= m.x411 - 3.04984759446376*m.b654 <= 0) m.c628 = Constraint(expr= m.x412 - 3.04984759446376*m.b655 <= 0) m.c629 = Constraint(expr= m.x413 + 3.04984759446376*m.b653 <= 3.04984759446376) m.c630 = Constraint(expr= m.x414 + 3.04984759446376*m.b654 <= 3.04984759446376) m.c631 = Constraint(expr= m.x415 + 3.04984759446376*m.b655 <= 3.04984759446376) m.c632 = Constraint(expr= m.x464 - 1.18887736200171*m.b653 <= 0) m.c633 = Constraint(expr= m.x465 - 1.18887736200171*m.b654 <= 0) m.c634 = Constraint(expr= m.x466 - 1.18887736200171*m.b655 <= 0) m.c635 = Constraint(expr= m.x467 + 1.18887736200171*m.b653 <= 1.18887736200171) m.c636 = Constraint(expr= m.x468 + 1.18887736200171*m.b654 <= 1.18887736200171) m.c637 = Constraint(expr= m.x469 + 1.18887736200171*m.b655 <= 1.18887736200171) m.c638 = Constraint(expr=(m.x482/(0.001 + 0.999*m.b656) - log(1 + m.x470/(0.001 + 0.999*m.b656)))*(0.001 + 0.999*m.b656) <= 0) m.c639 = Constraint(expr=(m.x483/(0.001 + 0.999*m.b657) - log(1 + m.x471/(0.001 + 0.999*m.b657)))*(0.001 + 0.999*m.b657) <= 0) m.c640 = Constraint(expr=(m.x484/(0.001 + 0.999*m.b658) - log(1 + m.x472/(0.001 + 0.999*m.b658)))*(0.001 + 0.999*m.b658) <= 0) m.c641 = Constraint(expr= m.x473 == 0) m.c642 = Constraint(expr= m.x474 == 0) m.c643 = Constraint(expr= m.x475 == 0) m.c644 = Constraint(expr= m.x485 == 0) m.c645 = Constraint(expr= m.x486 == 0) m.c646 = Constraint(expr= m.x487 == 0) m.c647 = Constraint(expr= m.x140 - m.x470 - m.x473 == 0) m.c648 = Constraint(expr= m.x141 - m.x471 - m.x474 == 0) m.c649 = Constraint(expr= m.x142 - m.x472 - m.x475 == 0) m.c650 = Constraint(expr= m.x146 - m.x482 - m.x485 == 0) m.c651 = Constraint(expr= m.x147 - m.x483 - m.x486 == 0) m.c652 = Constraint(expr= m.x148 - m.x484 - m.x487 == 0) m.c653 = Constraint(expr= m.x470 - 1.18887736200171*m.b656 <= 0) m.c654 = Constraint(expr= m.x471 - 1.18887736200171*m.b657 <= 0) m.c655 = Constraint(expr= m.x472 - 1.18887736200171*m.b658 <= 0) m.c656 = Constraint(expr= m.x473 + 1.18887736200171*m.b656 <= 1.18887736200171) m.c657 = Constraint(expr= m.x474 + 1.18887736200171*m.b657 <= 1.18887736200171) m.c658 = Constraint(expr= m.x475 + 1.18887736200171*m.b658 <= 1.18887736200171) m.c659 = Constraint(expr= m.x482 - 0.78338879230327*m.b656 <= 0) m.c660 = Constraint(expr= m.x483 - 0.78338879230327*m.b657 <= 0) m.c661 = Constraint(expr= m.x484 - 0.78338879230327*m.b658 <= 0) m.c662 = Constraint(expr= m.x485 + 0.78338879230327*m.b656 <= 0.78338879230327) m.c663 = Constraint(expr= m.x486 + 0.78338879230327*m.b657 <= 0.78338879230327) m.c664 = Constraint(expr= m.x487 + 0.78338879230327*m.b658 <= 0.78338879230327) m.c665 = Constraint(expr=(m.x488/(0.001 + 0.999*m.b659) - 1.2*log(1 + m.x476/(0.001 + 0.999*m.b659)))*(0.001 + 0.999* m.b659) <= 0) m.c666 = Constraint(expr=(m.x489/(0.001 + 0.999*m.b660) - 1.2*log(1 + m.x477/(0.001 + 0.999*m.b660)))*(0.001 + 0.999* m.b660) <= 0) m.c667 = Constraint(expr=(m.x490/(0.001 + 0.999*m.b661) - 1.2*log(1 + m.x478/(0.001 + 0.999*m.b661)))*(0.001 + 0.999* m.b661) <= 0) m.c668 = Constraint(expr= m.x479 == 0) m.c669 = Constraint(expr= m.x480 == 0) m.c670 = Constraint(expr= m.x481 == 0) m.c671 = Constraint(expr= m.x491 == 0) m.c672 = Constraint(expr= m.x492 == 0) m.c673 = Constraint(expr= m.x493 == 0) m.c674 = Constraint(expr= m.x143 - m.x476 - m.x479 == 0) m.c675 = Constraint(expr= m.x144 - m.x477 - m.x480 == 0) m.c676 = Constraint(expr= m.x145 - m.x478 - m.x481 == 0) m.c677 = Constraint(expr= m.x149 - m.x488 - m.x491 == 0) m.c678 = Constraint(expr= m.x150 - m.x489 - m.x492 == 0) m.c679 = Constraint(expr= m.x151 - m.x490 - m.x493 == 0) m.c680 = Constraint(expr= m.x476 - 1.18887736200171*m.b659 <= 0) m.c681 = Constraint(expr= m.x477 - 1.18887736200171*m.b660 <= 0) m.c682 = Constraint(expr= m.x478 - 1.18887736200171*m.b661 <= 0) m.c683 = Constraint(expr= m.x479 + 1.18887736200171*m.b659 <= 1.18887736200171) m.c684 = Constraint(expr= m.x480 + 1.18887736200171*m.b660 <= 1.18887736200171) m.c685 = Constraint(expr= m.x481 + 1.18887736200171*m.b661 <= 1.18887736200171) m.c686 = Constraint(expr= m.x488 - 0.940066550763924*m.b659 <= 0) m.c687 = Constraint(expr= m.x489 - 0.940066550763924*m.b660 <= 0) m.c688 = Constraint(expr= m.x490 - 0.940066550763924*m.b661 <= 0) m.c689 = Constraint(expr= m.x491 + 0.940066550763924*m.b659 <= 0.940066550763924) m.c690 = Constraint(expr= m.x492 + 0.940066550763924*m.b660 <= 0.940066550763924) m.c691 = Constraint(expr= m.x493 + 0.940066550763924*m.b661 <= 0.940066550763924) m.c692 = Constraint(expr= - 0.75*m.x494 + m.x518 == 0) m.c693 = Constraint(expr= - 0.75*m.x495 + m.x519 == 0) m.c694 = Constraint(expr= - 0.75*m.x496 + m.x520 == 0) m.c695 = Constraint(expr= m.x497 == 0) m.c696 = Constraint(expr= m.x498 == 0) m.c697 = Constraint(expr= m.x499 == 0) m.c698 = Constraint(expr= m.x521 == 0) m.c699 = Constraint(expr= m.x522 == 0) m.c700 = Constraint(expr= m.x523 == 0) m.c701 = Constraint(expr= m.x161 - m.x494 - m.x497 == 0) m.c702 = Constraint(expr= m.x162 - m.x495 - m.x498 == 0) m.c703 = Constraint(expr= m.x163 - m.x496 - m.x499 == 0) m.c704 = Constraint(expr= m.x173 - m.x518 - m.x521 == 0) m.c705 = Constraint(expr= m.x174 - m.x519 - m.x522 == 0) m.c706 = Constraint(expr= m.x175 - m.x520 - m.x523 == 0) m.c707 = Constraint(expr= m.x494 - 0.940066550763924*m.b662 <= 0) m.c708 = Constraint(expr= m.x495 - 0.940066550763924*m.b663 <= 0) m.c709 = Constraint(expr= m.x496 - 0.940066550763924*m.b664 <= 0) m.c710 = Constraint(expr= m.x497 + 0.940066550763924*m.b662 <= 0.940066550763924) m.c711 = Constraint(expr= m.x498 + 0.940066550763924*m.b663 <= 0.940066550763924) m.c712 = Constraint(expr= m.x499 + 0.940066550763924*m.b664 <= 0.940066550763924) m.c713 = Constraint(expr= m.x518 - 0.705049913072943*m.b662 <= 0) m.c714 = Constraint(expr= m.x519 - 0.705049913072943*m.b663 <= 0) m.c715 = Constraint(expr= m.x520 - 0.705049913072943*m.b664 <= 0) m.c716 = Constraint(expr= m.x521 + 0.705049913072943*m.b662 <= 0.705049913072943) m.c717 = Constraint(expr= m.x522 + 0.705049913072943*m.b663 <= 0.705049913072943) m.c718 = Constraint(expr= m.x523 + 0.705049913072943*m.b664 <= 0.705049913072943) m.c719 = Constraint(expr=(m.x524/(0.001 + 0.999*m.b665) - 1.5*log(1 + m.x500/(0.001 + 0.999*m.b665)))*(0.001 + 0.999* m.b665) <= 0) m.c720 = Constraint(expr=(m.x525/(0.001 + 0.999*m.b666) - 1.5*log(1 + m.x501/(0.001 + 0.999*m.b666)))*(0.001 + 0.999* m.b666) <= 0) m.c721 = Constraint(expr=(m.x526/(0.001 + 0.999*m.b667) - 1.5*log(1 + m.x502/(0.001 + 0.999*m.b667)))*(0.001 + 0.999* m.b667) <= 0) m.c722 = Constraint(expr= m.x503 == 0) m.c723 = Constraint(expr= m.x504 == 0) m.c724 = Constraint(expr= m.x505 == 0) m.c725 = Constraint(expr= m.x530 == 0) m.c726 = Constraint(expr= m.x531 == 0) m.c727 = Constraint(expr= m.x532 == 0) m.c728 = Constraint(expr= m.x164 - m.x500 - m.x503 == 0) m.c729 = Constraint(expr= m.x165 - m.x501 - m.x504 == 0) m.c730 = Constraint(expr= m.x166 - m.x502 - m.x505 == 0) m.c731 = Constraint(expr= m.x176 - m.x524 - m.x530 == 0) m.c732 = Constraint(expr= m.x177 - m.x525 - m.x531 == 0) m.c733 = Constraint(expr= m.x178 - m.x526 - m.x532 == 0) m.c734 = Constraint(expr= m.x500 - 0.940066550763924*m.b665 <= 0) m.c735 = Constraint(expr= m.x501 - 0.940066550763924*m.b666 <= 0) m.c736 = Constraint(expr= m.x502 - 0.940066550763924*m.b667 <= 0) m.c737 = Constraint(expr= m.x503 + 0.940066550763924*m.b665 <= 0.940066550763924) m.c738 = Constraint(expr= m.x504 + 0.940066550763924*m.b666 <= 0.940066550763924) m.c739 = Constraint(expr= m.x505 + 0.940066550763924*m.b667 <= 0.940066550763924) m.c740 = Constraint(expr= m.x524 - 0.994083415506506*m.b665 <= 0) m.c741 = Constraint(expr= m.x525 - 0.994083415506506*m.b666 <= 0) m.c742 = Constraint(expr= m.x526 - 0.994083415506506*m.b667 <= 0) m.c743 = Constraint(expr= m.x530 + 0.994083415506506*m.b665 <= 0.994083415506506) m.c744 = Constraint(expr= m.x531 + 0.994083415506506*m.b666 <= 0.994083415506506) m.c745 = Constraint(expr= m.x532 + 0.994083415506506*m.b667 <= 0.994083415506506) m.c746 = Constraint(expr= - m.x506 + m.x536 == 0) m.c747 = Constraint(expr= - m.x507 + m.x537 == 0) m.c748 = Constraint(expr= - m.x508 + m.x538 == 0) m.c749 = Constraint(expr= - 0.5*m.x512 + m.x536 == 0) m.c750 = Constraint(expr= - 0.5*m.x513 + m.x537 == 0) m.c751 = Constraint(expr= - 0.5*m.x514 + m.x538 == 0) m.c752 = Constraint(expr= m.x509 == 0) m.c753 = Constraint(expr= m.x510 == 0) m.c754 = Constraint(expr= m.x511 == 0) m.c755 = Constraint(expr= m.x515 == 0) m.c756 = Constraint(expr= m.x516 == 0) m.c757 = Constraint(expr= m.x517 == 0) m.c758 = Constraint(expr= m.x539 == 0) m.c759 = Constraint(expr= m.x540 == 0) m.c760 = Constraint(expr= m.x541 == 0) m.c761 = Constraint(expr= m.x167 - m.x506 - m.x509 == 0) m.c762 = Constraint(expr= m.x168 - m.x507 - m.x510 == 0) m.c763 = Constraint(expr= m.x169 - m.x508 - m.x511 == 0) m.c764 = Constraint(expr= m.x170 - m.x512 - m.x515 == 0) m.c765 = Constraint(expr= m.x171 - m.x513 - m.x516 == 0) m.c766 = Constraint(expr= m.x172 - m.x514 - m.x517 == 0) m.c767 = Constraint(expr= m.x179 - m.x536 - m.x539 == 0) m.c768 = Constraint(expr= m.x180 - m.x537 - m.x540 == 0) m.c769 = Constraint(expr= m.x181 - m.x538 - m.x541 == 0) m.c770 = Constraint(expr= m.x506 - 0.940066550763924*m.b668 <= 0) m.c771 = Constraint(expr= m.x507 - 0.940066550763924*m.b669 <= 0) m.c772 = Constraint(expr= m.x508 - 0.940066550763924*m.b670 <= 0) m.c773 = Constraint(expr= m.x509 + 0.940066550763924*m.b668 <= 0.940066550763924) m.c774 = Constraint(expr= m.x510 + 0.940066550763924*m.b669 <= 0.940066550763924) m.c775 = Constraint(expr= m.x511 + 0.940066550763924*m.b670 <= 0.940066550763924) m.c776 = Constraint(expr= m.x512 - 30*m.b668 <= 0) m.c777 = Constraint(expr= m.x513 - 30*m.b669 <= 0) m.c778 = Constraint(expr= m.x514 - 30*m.b670 <= 0) m.c779 = Constraint(expr= m.x515 + 30*m.b668 <= 30) m.c780 = Constraint(expr= m.x516 + 30*m.b669 <= 30) m.c781 = Constraint(expr= m.x517 + 30*m.b670 <= 30) m.c782 = Constraint(expr= m.x536 - 15*m.b668 <= 0) m.c783 = Constraint(expr= m.x537 - 15*m.b669 <= 0) m.c784 = Constraint(expr= m.x538 - 15*m.b670 <= 0) m.c785 = Constraint(expr= m.x539 + 15*m.b668 <= 15) m.c786 = Constraint(expr= m.x540 + 15*m.b669 <= 15) m.c787 = Constraint(expr= m.x541 + 15*m.b670 <= 15) m.c788 = Constraint(expr=(m.x566/(0.001 + 0.999*m.b671) - 1.25*log(1 + m.x542/(0.001 + 0.999*m.b671)))*(0.001 + 0.999* m.b671) <= 0) m.c789 = Constraint(expr=(m.x567/(0.001 + 0.999*m.b672) - 1.25*log(1 + m.x543/(0.001 + 0.999*m.b672)))*(0.001 + 0.999* m.b672) <= 0) m.c790 = Constraint(expr=(m.x568/(0.001 + 0.999*m.b673) - 1.25*log(1 + m.x544/(0.001 + 0.999*m.b673)))*(0.001 + 0.999* m.b673) <= 0) m.c791 = Constraint(expr= m.x545 == 0) m.c792 = Constraint(expr= m.x546 == 0) m.c793 = Constraint(expr= m.x547 == 0) m.c794 = Constraint(expr= m.x569 == 0) m.c795 = Constraint(expr= m.x570 == 0) m.c796 = Constraint(expr= m.x571 == 0) m.c797 = Constraint(expr= m.x182 - m.x542 - m.x545 == 0) m.c798 = Constraint(expr= m.x183 - m.x543 - m.x546 == 0) m.c799 = Constraint(expr= m.x184 - m.x544 - m.x547 == 0) m.c800 = Constraint(expr= m.x197 - m.x566 - m.x569 == 0) m.c801 = Constraint(expr= m.x198 - m.x567 - m.x570 == 0) m.c802 = Constraint(expr= m.x199 - m.x568 - m.x571 == 0) m.c803 = Constraint(expr= m.x542 - 0.705049913072943*m.b671 <= 0) m.c804 = Constraint(expr= m.x543 - 0.705049913072943*m.b672 <= 0) m.c805 = Constraint(expr= m.x544 - 0.705049913072943*m.b673 <= 0) m.c806 = Constraint(expr= m.x545 + 0.705049913072943*m.b671 <= 0.705049913072943) m.c807 = Constraint(expr= m.x546 + 0.705049913072943*m.b672 <= 0.705049913072943) m.c808 = Constraint(expr= m.x547 + 0.705049913072943*m.b673 <= 0.705049913072943) m.c809 = Constraint(expr= m.x566 - 0.666992981045719*m.b671 <= 0) m.c810 = Constraint(expr= m.x567 - 0.666992981045719*m.b672 <= 0) m.c811 = Constraint(expr= m.x568 - 0.666992981045719*m.b673 <= 0) m.c812 = Constraint(expr= m.x569 + 0.666992981045719*m.b671 <= 0.666992981045719) m.c813 = Constraint(expr= m.x570 + 0.666992981045719*m.b672 <= 0.666992981045719) m.c814 = Constraint(expr= m.x571 + 0.666992981045719*m.b673 <= 0.666992981045719) m.c815 = Constraint(expr=(m.x572/(0.001 + 0.999*m.b674) - 0.9*log(1 + m.x548/(0.001 + 0.999*m.b674)))*(0.001 + 0.999* m.b674) <= 0) m.c816 = Constraint(expr=(m.x573/(0.001 + 0.999*m.b675) - 0.9*log(1 + m.x549/(0.001 + 0.999*m.b675)))*(0.001 + 0.999* m.b675) <= 0) m.c817 = Constraint(expr=(m.x574/(0.001 + 0.999*m.b676) - 0.9*log(1 + m.x550/(0.001 + 0.999*m.b676)))*(0.001 + 0.999* m.b676) <= 0) m.c818 = Constraint(expr= m.x551 == 0) m.c819 = Constraint(expr= m.x552 == 0) m.c820 = Constraint(expr= m.x553 == 0) m.c821 = Constraint(expr= m.x575 == 0) m.c822 = Constraint(expr= m.x576 == 0) m.c823 = Constraint(expr= m.x577 == 0) m.c824 = Constraint(expr= m.x185 - m.x548 - m.x551 == 0) m.c825 = Constraint(expr= m.x186 - m.x549 - m.x552 == 0) m.c826 = Constraint(expr= m.x187 - m.x550 - m.x553 == 0) m.c827 = Constraint(expr= m.x200 - m.x572 - m.x575 == 0) m.c828 = Constraint(expr= m.x201 - m.x573 - m.x576 == 0) m.c829 = Constraint(expr= m.x202 - m.x574 - m.x577 == 0) m.c830 = Constraint(expr= m.x548 - 0.705049913072943*m.b674 <= 0) m.c831 = Constraint(expr= m.x549 - 0.705049913072943*m.b675 <= 0) m.c832 = Constraint(expr= m.x550 - 0.705049913072943*m.b676 <= 0) m.c833 = Constraint(expr= m.x551 + 0.705049913072943*m.b674 <= 0.705049913072943) m.c834 = Constraint(expr= m.x552 + 0.705049913072943*m.b675 <= 0.705049913072943) m.c835 = Constraint(expr= m.x553 + 0.705049913072943*m.b676 <= 0.705049913072943) m.c836 = Constraint(expr= m.x572 - 0.480234946352917*m.b674 <= 0) m.c837 = Constraint(expr= m.x573 - 0.480234946352917*m.b675 <= 0) m.c838 = Constraint(expr= m.x574 - 0.480234946352917*m.b676 <= 0) m.c839 = Constraint(expr= m.x575 + 0.480234946352917*m.b674 <= 0.480234946352917) m.c840 = Constraint(expr= m.x576 + 0.480234946352917*m.b675 <= 0.480234946352917) m.c841 = Constraint(expr= m.x577 + 0.480234946352917*m.b676 <= 0.480234946352917) m.c842 = Constraint(expr=(m.x578/(0.001 + 0.999*m.b677) - log(1 + m.x527/(0.001 + 0.999*m.b677)))*(0.001 + 0.999*m.b677) <= 0) m.c843 = Constraint(expr=(m.x579/(0.001 + 0.999*m.b678) - log(1 + m.x528/(0.001 + 0.999*m.b678)))*(0.001 + 0.999*m.b678) <= 0) m.c844 = Constraint(expr=(m.x580/(0.001 + 0.999*m.b679) - log(1 + m.x529/(0.001 + 0.999*m.b679)))*(0.001 + 0.999*m.b679) <= 0) m.c845 = Constraint(expr= m.x533 == 0) m.c846 = Constraint(expr= m.x534 == 0) m.c847 = Constraint(expr= m.x535 == 0) m.c848 = Constraint(expr= m.x581 == 0) m.c849 = Constraint(expr= m.x582 == 0) m.c850 = Constraint(expr= m.x583 == 0) m.c851 = Constraint(expr= m.x176 - m.x527 - m.x533 == 0) m.c852 = Constraint(expr= m.x177 - m.x528 - m.x534 == 0) m.c853 = Constraint(expr= m.x178 - m.x529 - m.x535 == 0) m.c854 = Constraint(expr= m.x203 - m.x578 - m.x581 == 0) m.c855 = Constraint(expr= m.x204 - m.x579 - m.x582 == 0) m.c856 = Constraint(expr= m.x205 - m.x580 - m.x583 == 0) m.c857 = Constraint(expr= m.x527 - 0.994083415506506*m.b677 <= 0) m.c858 = Constraint(expr= m.x528 - 0.994083415506506*m.b678 <= 0) m.c859 = Constraint(expr= m.x529 - 0.994083415506506*m.b679 <= 0) m.c860 = Constraint(expr= m.x533 + 0.994083415506506*m.b677 <= 0.994083415506506) m.c861 = Constraint(expr= m.x534 + 0.994083415506506*m.b678 <= 0.994083415506506) m.c862 = Constraint(expr= m.x535 + 0.994083415506506*m.b679 <= 0.994083415506506) m.c863 = Constraint(expr= m.x578 - 0.690184503917672*m.b677 <= 0) m.c864 = Constraint(expr= m.x579 - 0.690184503917672*m.b678 <= 0) m.c865 = Constraint(expr= m.x580 - 0.690184503917672*m.b679 <= 0) m.c866 = Constraint(expr= m.x581 + 0.690184503917672*m.b677 <= 0.690184503917672) m.c867 = Constraint(expr= m.x582 + 0.690184503917672*m.b678 <= 0.690184503917672) m.c868 = Constraint(expr= m.x583 + 0.690184503917672*m.b679 <= 0.690184503917672) m.c869 = Constraint(expr= - 0.9*m.x554 + m.x584 == 0) m.c870 = Constraint(expr= - 0.9*m.x555 + m.x585 == 0) m.c871 = Constraint(expr= - 0.9*m.x556 + m.x586 == 0) m.c872 = Constraint(expr= m.x557 == 0) m.c873 = Constraint(expr= m.x558 == 0) m.c874 = Constraint(expr= m.x559 == 0) m.c875 = Constraint(expr= m.x587 == 0) m.c876 = Constraint(expr= m.x588 == 0) m.c877 = Constraint(expr= m.x589 == 0) m.c878 = Constraint(expr= m.x188 - m.x554 - m.x557 == 0) m.c879 = Constraint(expr= m.x189 - m.x555 - m.x558 == 0) m.c880 = Constraint(expr= m.x190 - m.x556 - m.x559 == 0) m.c881 = Constraint(expr= m.x206 - m.x584 - m.x587 == 0) m.c882 = Constraint(expr= m.x207 - m.x585 - m.x588 == 0) m.c883 = Constraint(expr= m.x208 - m.x586 - m.x589 == 0) m.c884 = Constraint(expr= m.x554 - 15*m.b680 <= 0) m.c885 = Constraint(expr= m.x555 - 15*m.b681 <= 0) m.c886 = Constraint(expr= m.x556 - 15*m.b682 <= 0) m.c887 = Constraint(expr= m.x557 + 15*m.b680 <= 15) m.c888 = Constraint(expr= m.x558 + 15*m.b681 <= 15) m.c889 = Constraint(expr= m.x559 + 15*m.b682 <= 15) m.c890 = Constraint(expr= m.x584 - 13.5*m.b680 <= 0) m.c891 = Constraint(expr= m.x585 - 13.5*m.b681 <= 0) m.c892 = Constraint(expr= m.x586 - 13.5*m.b682 <= 0) m.c893 = Constraint(expr= m.x587 + 13.5*m.b680 <= 13.5) m.c894 = Constraint(expr= m.x588 + 13.5*m.b681 <= 13.5) m.c895 = Constraint(expr= m.x589 + 13.5*m.b682 <= 13.5) m.c896 = Constraint(expr= - 0.6*m.x560 + m.x590 == 0) m.c897 = Constraint(expr= - 0.6*m.x561 + m.x591 == 0) m.c898 = Constraint(expr= - 0.6*m.x562 + m.x592 == 0) m.c899 = Constraint(expr= m.x563 == 0) m.c900 = Constraint(expr= m.x564 == 0) m.c901 = Constraint(expr= m.x565 == 0) m.c902 = Constraint(expr= m.x593 == 0) m.c903 = Constraint(expr= m.x594 == 0) m.c904 = Constraint(expr= m.x595 == 0) m.c905 = Constraint(expr= m.x191 - m.x560 - m.x563 == 0) m.c906 = Constraint(expr= m.x192 - m.x561 - m.x564 == 0) m.c907 = Constraint(expr= m.x193 - m.x562 - m.x565 == 0) m.c908 = Constraint(expr= m.x209 - m.x590 - m.x593 == 0) m.c909 = Constraint(expr= m.x210 - m.x591 - m.x594 == 0) m.c910 = Constraint(expr= m.x211 - m.x592 - m.x595 == 0) m.c911 = Constraint(expr= m.x560 - 15*m.b683 <= 0) m.c912 = Constraint(expr= m.x561 - 15*m.b684 <= 0) m.c913 = Constraint(expr= m.x562 - 15*m.b685 <= 0) m.c914 = Constraint(expr= m.x563 + 15*m.b683 <= 15) m.c915 = Constraint(expr= m.x564 + 15*m.b684 <= 15) m.c916 = Constraint(expr= m.x565 + 15*m.b685 <= 15) m.c917 = Constraint(expr= m.x590 - 9*m.b683 <= 0) m.c918 = Constraint(expr= m.x591 - 9*m.b684 <= 0) m.c919 = Constraint(expr= m.x592 - 9*m.b685 <= 0) m.c920 = Constraint(expr= m.x593 + 9*m.b683 <= 9) m.c921 = Constraint(expr= m.x594 + 9*m.b684 <= 9) m.c922 = Constraint(expr= m.x595 + 9*m.b685 <= 9) m.c923 = Constraint(expr= 5*m.b686 + m.x776 == 0) m.c924 = Constraint(expr= 4*m.b687 + m.x777 == 0) m.c925 = Constraint(expr= 6*m.b688 + m.x778 == 0) m.c926 = Constraint(expr= 8*m.b689 + m.x779 == 0) m.c927 = Constraint(expr= 7*m.b690 + m.x780 == 0) m.c928 = Constraint(expr= 6*m.b691 + m.x781 == 0) m.c929 = Constraint(expr= 6*m.b692 + m.x782 == 0) m.c930 = Constraint(expr= 9*m.b693 + m.x783 == 0) m.c931 = Constraint(expr= 4*m.b694 + m.x784 == 0) m.c932 = Constraint(expr= 10*m.b695 + m.x785 == 0) m.c933 = Constraint(expr= 9*m.b696 + m.x786 == 0) m.c934 = Constraint(expr= 5*m.b697 + m.x787 == 0) m.c935 = Constraint(expr= 6*m.b698 + m.x788 == 0) m.c936 = Constraint(expr= 10*m.b699 + m.x789 == 0) m.c937 = Constraint(expr= 6*m.b700 + m.x790 == 0) m.c938 = Constraint(expr= 7*m.b701 + m.x791 == 0) m.c939 = Constraint(expr= 7*m.b702 + m.x792 == 0) m.c940 = Constraint(expr= 4*m.b703 + m.x793 == 0) m.c941 = Constraint(expr= 4*m.b704 + m.x794 == 0) m.c942 = Constraint(expr= 3*m.b705 + m.x795 == 0) m.c943 = Constraint(expr= 2*m.b706 + m.x796 == 0) m.c944 = Constraint(expr= 5*m.b707 + m.x797 == 0) m.c945 = Constraint(expr= 6*m.b708 + m.x798 == 0) m.c946 = Constraint(expr= 7*m.b709 + m.x799 == 0) m.c947 = Constraint(expr= 2*m.b710 + m.x800 == 0) m.c948 = Constraint(expr= 5*m.b711 + m.x801 == 0) m.c949 = Constraint(expr= 2*m.b712 + m.x802 == 0) m.c950 = Constraint(expr= 4*m.b713 + m.x803 == 0) m.c951 = Constraint(expr= 7*m.b714 + m.x804 == 0) m.c952 = Constraint(expr= 4*m.b715 + m.x805 == 0) m.c953 = Constraint(expr= 3*m.b716 + m.x806 == 0) m.c954 = Constraint(expr= 9*m.b717 + m.x807 == 0) m.c955 = Constraint(expr= 3*m.b718 + m.x808 == 0) m.c956 = Constraint(expr= 7*m.b719 + m.x809 == 0) m.c957 = Constraint(expr= 2*m.b720 + m.x810 == 0) m.c958 = Constraint(expr= 9*m.b721 + m.x811 == 0) m.c959 = Constraint(expr= 3*m.b722 + m.x812 == 0) m.c960 = Constraint(expr= m.b723 + m.x813 == 0) m.c961 = Constraint(expr= 9*m.b724 + m.x814 == 0) m.c962 = Constraint(expr= 2*m.b725 + m.x815 == 0) m.c963 = Constraint(expr= 6*m.b726 + m.x816 == 0) m.c964 = Constraint(expr= 3*m.b727 + m.x817 == 0) m.c965 = Constraint(expr= 4*m.b728 + m.x818 == 0) m.c966 = Constraint(expr= 8*m.b729 + m.x819 == 0) m.c967 = Constraint(expr= m.b730 + m.x820 == 0) m.c968 = Constraint(expr= 2*m.b731 + m.x821 == 0) m.c969 = Constraint(expr= 5*m.b732 + m.x822 == 0) m.c970 = Constraint(expr= 2*m.b733 + m.x823 == 0) m.c971 = Constraint(expr= 3*m.b734 + m.x824 == 0) m.c972 = Constraint(expr= 4*m.b735 + m.x825 == 0) m.c973 = Constraint(expr= 3*m.b736 + m.x826 == 0) m.c974 = Constraint(expr= 5*m.b737 + m.x827 == 0) m.c975 = Constraint(expr= 7*m.b738 + m.x828 == 0) m.c976 = Constraint(expr= 6*m.b739 + m.x829 == 0) m.c977 = Constraint(expr= 2*m.b740 + m.x830 == 0) m.c978 = Constraint(expr= 8*m.b741 + m.x831 == 0) m.c979 = Constraint(expr= 4*m.b742 + m.x832 == 0) m.c980 = Constraint(expr= m.b743 + m.x833 == 0) m.c981 = Constraint(expr= 4*m.b744 + m.x834 == 0) m.c982 = Constraint(expr= m.b745 + m.x835 == 0) m.c983 = Constraint(expr= 2*m.b746 + m.x836 == 0) m.c984 = Constraint(expr= 5*m.b747 + m.x837 == 0) m.c985 = Constraint(expr= 2*m.b748 + m.x838 == 0) m.c986 = Constraint(expr= 9*m.b749 + m.x839 == 0) m.c987 = Constraint(expr= 2*m.b750 + m.x840 == 0) m.c988 = Constraint(expr= 9*m.b751 + m.x841 == 0) m.c989 = Constraint(expr= 5*m.b752 + m.x842 == 0) m.c990 = Constraint(expr= 8*m.b753 + m.x843 == 0) m.c991 = Constraint(expr= 4*m.b754 + m.x844 == 0) m.c992 = Constraint(expr= 2*m.b755 + m.x845 == 0) m.c993 = Constraint(expr= 3*m.b756 + m.x846 == 0) m.c994 = Constraint(expr= 8*m.b757 + m.x847 == 0) m.c995 = Constraint(expr= 10*m.b758 + m.x848 == 0) m.c996 = Constraint(expr= 6*m.b759 + m.x849 == 0) m.c997 = Constraint(expr= 3*m.b760 + m.x850 == 0) m.c998 = Constraint(expr= 4*m.b761 + m.x851 == 0) m.c999 = Constraint(expr= 8*m.b762 + m.x852 == 0) m.c1000 = Constraint(expr= 7*m.b763 + m.x853 == 0) m.c1001 = Constraint(expr= 7*m.b764 + m.x854 == 0) m.c1002 = Constraint(expr= 3*m.b765 + m.x855 == 0) m.c1003 = Constraint(expr= 9*m.b766 + m.x856 == 0) m.c1004 = Constraint(expr= 4*m.b767 + m.x857 == 0) m.c1005 = Constraint(expr= 8*m.b768 + m.x858 == 0) m.c1006 = Constraint(expr= 6*m.b769 + m.x859 == 0) m.c1007 = Constraint(expr= 2*m.b770 + m.x860 == 0) m.c1008 = Constraint(expr= m.b771 + m.x861 == 0) m.c1009 = Constraint(expr= 3*m.b772 + m.x862 == 0) m.c1010 = Constraint(expr= 8*m.b773 + m.x863 == 0) m.c1011 = Constraint(expr= 3*m.b774 + m.x864 == 0) m.c1012 = Constraint(expr= 4*m.b775 + m.x865 == 0) m.c1013 = Constraint(expr= m.b596 - m.b597 <= 0) m.c1014 = Constraint(expr= m.b596 - m.b598 <= 0) m.c1015 = Constraint(expr= m.b597 - m.b598 <= 0) m.c1016 = Constraint(expr= m.b599 - m.b600 <= 0) m.c1017 = Constraint(expr= m.b599 - m.b601 <= 0) m.c1018 = Constraint(expr= m.b600 - m.b601 <= 0) m.c1019 = Constraint(expr= m.b602 - m.b603 <= 0) m.c1020 = Constraint(expr= m.b602 - m.b604 <= 0) m.c1021 = Constraint(expr= m.b603 - m.b604 <= 0) m.c1022 = Constraint(expr= m.b605 - m.b606 <= 0) m.c1023 = Constraint(expr= m.b605 - m.b607 <= 0) m.c1024 = Constraint(expr= m.b606 - m.b607 <= 0) m.c1025 = Constraint(expr= m.b608 - m.b609 <= 0) m.c1026 = Constraint(expr= m.b608 - m.b610 <= 0) m.c1027 = Constraint(expr= m.b609 - m.b610 <= 0) m.c1028 = Constraint(expr= m.b611 - m.b612 <= 0) m.c1029 = Constraint(expr= m.b611 - m.b613 <= 0) m.c1030 = Constraint(expr= m.b612 - m.b613 <= 0) m.c1031 = Constraint(expr= m.b614 - m.b615 <= 0) m.c1032 = Constraint(expr= m.b614 - m.b616 <= 0) m.c1033 = Constraint(expr= m.b615 - m.b616 <= 0) m.c1034 = Constraint(expr= m.b617 - m.b618 <= 0) m.c1035 = Constraint(expr= m.b617 - m.b619 <= 0) m.c1036 = Constraint(expr= m.b618 - m.b619 <= 0) m.c1037 = Constraint(expr= m.b620 - m.b621 <= 0) m.c1038 = Constraint(expr= m.b620 - m.b622 <= 0) m.c1039 = Constraint(expr= m.b621 - m.b622 <= 0) m.c1040 = Constraint(expr= m.b623 - m.b624 <= 0) m.c1041 = Constraint(expr= m.b623 - m.b625 <= 0) m.c1042 = Constraint(expr= m.b624 - m.b625 <= 0) m.c1043 = Constraint(expr= m.b626 - m.b627 <= 0) m.c1044 = Constraint(expr= m.b626 - m.b628 <= 0) m.c1045 = Constraint(expr= m.b627 - m.b628 <= 0) m.c1046 = Constraint(expr= m.b629 - m.b630 <= 0) m.c1047 = Constraint(expr= m.b629 - m.b631 <= 0) m.c1048 = Constraint(expr= m.b630 - m.b631 <= 0) m.c1049 = Constraint(expr= m.b632 - m.b633 <= 0) m.c1050 = Constraint(expr= m.b632 - m.b634 <= 0) m.c1051 = Constraint(expr= m.b633 - m.b634 <= 0) m.c1052 = Constraint(expr= m.b635 - m.b636 <= 0) m.c1053 = Constraint(expr= m.b635 - m.b637 <= 0) m.c1054 = Constraint(expr= m.b636 - m.b637 <= 0) m.c1055 = Constraint(expr= m.b638 - m.b639 <= 0) m.c1056 = Constraint(expr= m.b638 - m.b640 <= 0) m.c1057 = Constraint(expr= m.b639 - m.b640 <= 0) m.c1058 = Constraint(expr= m.b641 - m.b642 <= 0) m.c1059 = Constraint(expr= m.b641 - m.b643 <= 0) m.c1060 = Constraint(expr= m.b642 - m.b643 <= 0) m.c1061 = Constraint(expr= m.b644 - m.b645 <= 0) m.c1062 = Constraint(expr= m.b644 - m.b646 <= 0) m.c1063 = Constraint(expr= m.b645 - m.b646 <= 0) m.c1064 = Constraint(expr= m.b647 - m.b648 <= 0) m.c1065 = Constraint(expr= m.b647 - m.b649 <= 0) m.c1066 = Constraint(expr= m.b648 - m.b649 <= 0) m.c1067 = Constraint(expr= m.b650 - m.b651 <= 0) m.c1068 = Constraint(expr= m.b650 - m.b652 <= 0) m.c1069 = Constraint(expr= m.b651 - m.b652 <= 0) m.c1070 = Constraint(expr= m.b653 - m.b654 <= 0) m.c1071 = Constraint(expr= m.b653 - m.b655 <= 0) m.c1072 = Constraint(expr= m.b654 - m.b655 <= 0) m.c1073 = Constraint(expr= m.b656 - m.b657 <= 0) m.c1074 = Constraint(expr= m.b656 - m.b658 <= 0) m.c1075 = Constraint(expr= m.b657 - m.b658 <= 0) m.c1076 = Constraint(expr= m.b659 - m.b660 <= 0) m.c1077 = Constraint(expr= m.b659 - m.b661 <= 0) m.c1078 = Constraint(expr= m.b660 - m.b661 <= 0) m.c1079 = Constraint(expr= m.b662 - m.b663 <= 0) m.c1080 = Constraint(expr= m.b662 - m.b664 <= 0) m.c1081 = Constraint(expr= m.b663 - m.b664 <= 0) m.c1082 = Constraint(expr= m.b665 - m.b666 <= 0) m.c1083 = Constraint(expr= m.b665 - m.b667 <= 0) m.c1084 = Constraint(expr= m.b666 - m.b667 <= 0) m.c1085 = Constraint(expr= m.b668 - m.b669 <= 0) m.c1086 = Constraint(expr= m.b668 - m.b670 <= 0) m.c1087 = Constraint(expr= m.b669 - m.b670 <= 0) m.c1088 = Constraint(expr= m.b671 - m.b672 <= 0) m.c1089 = Constraint(expr= m.b671 - m.b673 <= 0) m.c1090 = Constraint(expr= m.b672 - m.b673 <= 0) m.c1091 = Constraint(expr= m.b674 - m.b675 <= 0) m.c1092 = Constraint(expr= m.b674 - m.b676 <= 0) m.c1093 = Constraint(expr= m.b675 - m.b676 <= 0) m.c1094 = Constraint(expr= m.b677 - m.b678 <= 0) m.c1095 = Constraint(expr= m.b677 - m.b679 <= 0) m.c1096 = Constraint(expr= m.b678 - m.b679 <= 0) m.c1097 = Constraint(expr= m.b680 - m.b681 <= 0) m.c1098 = Constraint(expr= m.b680 - m.b682 <= 0) m.c1099 = Constraint(expr= m.b681 - m.b682 <= 0) m.c1100 = Constraint(expr= m.b683 - m.b684 <= 0) m.c1101 = Constraint(expr= m.b683 - m.b685 <= 0) m.c1102 = Constraint(expr= m.b684 - m.b685 <= 0) m.c1103 = Constraint(expr= m.b686 + m.b687 <= 1) m.c1104 = Constraint(expr= m.b686 + m.b688 <= 1) m.c1105 = Constraint(expr= m.b686 + m.b687 <= 1) m.c1106 = Constraint(expr= m.b687 + m.b688 <= 1) m.c1107 = Constraint(expr= m.b686 + m.b688 <= 1) m.c1108 = Constraint(expr= m.b687 + m.b688 <= 1) m.c1109 = Constraint(expr= m.b689 + m.b690 <= 1) m.c1110 = Constraint(expr= m.b689 + m.b691 <= 1) m.c1111 = Constraint(expr= m.b689 + m.b690 <= 1) m.c1112 = Constraint(expr= m.b690 + m.b691 <= 1) m.c1113 = Constraint(expr= m.b689 + m.b691 <= 1) m.c1114 = Constraint(expr= m.b690 + m.b691 <= 1) m.c1115 = Constraint(expr= m.b692 + m.b693 <= 1) m.c1116 = Constraint(expr= m.b692 + m.b694 <= 1) m.c1117 = Constraint(expr= m.b692 + m.b693 <= 1) m.c1118 = Constraint(expr= m.b693 + m.b694 <= 1) m.c1119 = Constraint(expr= m.b692 + m.b694 <= 1) m.c1120 = Constraint(expr= m.b693 + m.b694 <= 1) m.c1121 = Constraint(expr= m.b695 + m.b696 <= 1) m.c1122 = Constraint(expr= m.b695 + m.b697 <= 1) m.c1123 = Constraint(expr= m.b695 + m.b696 <= 1) m.c1124 = Constraint(expr= m.b696 + m.b697 <= 1) m.c1125 = Constraint(expr= m.b695 + m.b697 <= 1) m.c1126 = Constraint(expr= m.b696 + m.b697 <= 1) m.c1127 = Constraint(expr= m.b698 + m.b699 <= 1) m.c1128 = Constraint(expr= m.b698 + m.b700 <= 1) m.c1129 = Constraint(expr= m.b698 + m.b699 <= 1) m.c1130 = Constraint(expr= m.b699 + m.b700 <= 1) m.c1131 = Constraint(expr= m.b698 + m.b700 <= 1) m.c1132 = Constraint(expr= m.b699 + m.b700 <= 1) m.c1133 = Constraint(expr= m.b701 + m.b702 <= 1) m.c1134 = Constraint(expr= m.b701 + m.b703 <= 1) m.c1135 = Constraint(expr= m.b701 + m.b702 <= 1) m.c1136 = Constraint(expr= m.b702 + m.b703 <= 1) m.c1137 = Constraint(expr= m.b701 + m.b703 <= 1) m.c1138 = Constraint(expr= m.b702 + m.b703 <= 1) m.c1139 = Constraint(expr= m.b704 + m.b705 <= 1) m.c1140 = Constraint(expr= m.b704 + m.b706 <= 1) m.c1141 = Constraint(expr= m.b704 + m.b705 <= 1) m.c1142 = Constraint(expr= m.b705 + m.b706 <= 1) m.c1143 = Constraint(expr= m.b704 + m.b706 <= 1) m.c1144 = Constraint(expr= m.b705 + m.b706 <= 1) m.c1145 = Constraint(expr= m.b707 + m.b708 <= 1) m.c1146 = Constraint(expr= m.b707 + m.b709 <= 1) m.c1147 = Constraint(expr= m.b707 + m.b708 <= 1) m.c1148 = Constraint(expr= m.b708 + m.b709 <= 1) m.c1149 = Constraint(expr= m.b707 + m.b709 <= 1) m.c1150 = Constraint(expr= m.b708 + m.b709 <= 1) m.c1151 = Constraint(expr= m.b710 + m.b711 <= 1) m.c1152 = Constraint(expr= m.b710 + m.b712 <= 1) m.c1153 = Constraint(expr= m.b710 + m.b711 <= 1) m.c1154 = Constraint(expr= m.b711 + m.b712 <= 1) m.c1155 = Constraint(expr= m.b710 + m.b712 <= 1) m.c1156 = Constraint(expr= m.b711 + m.b712 <= 1) m.c1157 = Constraint(expr= m.b713 + m.b714 <= 1) m.c1158 = Constraint(expr= m.b713 + m.b715 <= 1) m.c1159 = Constraint(expr= m.b713 + m.b714 <= 1) m.c1160 = Constraint(expr= m.b714 + m.b715 <= 1) m.c1161 = Constraint(expr= m.b713 + m.b715 <= 1) m.c1162 = Constraint(expr= m.b714 + m.b715 <= 1) m.c1163 = Constraint(expr= m.b716 + m.b717 <= 1) m.c1164 = Constraint(expr= m.b716 + m.b718 <= 1) m.c1165 = Constraint(expr= m.b716 + m.b717 <= 1) m.c1166 = Constraint(expr= m.b717 + m.b718 <= 1) m.c1167 = Constraint(expr= m.b716 + m.b718 <= 1) m.c1168 = Constraint(expr= m.b717 + m.b718 <= 1) m.c1169 = Constraint(expr= m.b719 + m.b720 <= 1) m.c1170 = Constraint(expr= m.b719 + m.b721 <= 1) m.c1171 = Constraint(expr= m.b719 + m.b720 <= 1) m.c1172 = Constraint(expr= m.b720 + m.b721 <= 1) m.c1173 = Constraint(expr= m.b719 + m.b721 <= 1) m.c1174 = Constraint(expr= m.b720 + m.b721 <= 1) m.c1175 = Constraint(expr= m.b722 + m.b723 <= 1) m.c1176 = Constraint(expr= m.b722 + m.b724 <= 1) m.c1177 = Constraint(expr= m.b722 + m.b723 <= 1) m.c1178 = Constraint(expr= m.b723 + m.b724 <= 1) m.c1179 = Constraint(expr= m.b722 + m.b724 <= 1) m.c1180 = Constraint(expr= m.b723 + m.b724 <= 1) m.c1181 = Constraint(expr= m.b725 + m.b726 <= 1) m.c1182 = Constraint(expr= m.b725 + m.b727 <= 1) m.c1183 = Constraint(expr= m.b725 + m.b726 <= 1) m.c1184 = Constraint(expr= m.b726 + m.b727 <= 1) m.c1185 = Constraint(expr= m.b725 + m.b727 <= 1) m.c1186 = Constraint(expr= m.b726 + m.b727 <= 1) m.c1187 = Constraint(expr= m.b728 + m.b729 <= 1) m.c1188 = Constraint(expr= m.b728 + m.b730 <= 1) m.c1189 = Constraint(expr= m.b728 + m.b729 <= 1) m.c1190 = Constraint(expr= m.b729 + m.b730 <= 1) m.c1191 = Constraint(expr= m.b728 + m.b730 <= 1) m.c1192 = Constraint(expr= m.b729 + m.b730 <= 1) m.c1193 = Constraint(expr= m.b731 + m.b732 <= 1) m.c1194 = Constraint(expr= m.b731 + m.b733 <= 1) m.c1195 = Constraint(expr= m.b731 + m.b732 <= 1) m.c1196 = Constraint(expr= m.b732 + m.b733 <= 1) m.c1197 = Constraint(expr= m.b731 + m.b733 <= 1) m.c1198 = Constraint(expr= m.b732 + m.b733 <= 1) m.c1199 = Constraint(expr= m.b734 + m.b735 <= 1) m.c1200 = Constraint(expr= m.b734 + m.b736 <= 1) m.c1201 = Constraint(expr= m.b734 + m.b735 <= 1) m.c1202 = Constraint(expr= m.b735 + m.b736 <= 1) m.c1203 = Constraint(expr= m.b734 + m.b736 <= 1) m.c1204 = Constraint(expr= m.b735 + m.b736 <= 1) m.c1205 = Constraint(expr= m.b737 + m.b738 <= 1) m.c1206 = Constraint(expr= m.b737 + m.b739 <= 1) m.c1207 = Constraint(expr= m.b737 + m.b738 <= 1) m.c1208 = Constraint(expr= m.b738 + m.b739 <= 1) m.c1209 = Constraint(expr= m.b737 + m.b739 <= 1) m.c1210 = Constraint(expr= m.b738 + m.b739 <= 1) m.c1211 = Constraint(expr= m.b740 + m.b741 <= 1) m.c1212 = Constraint(expr= m.b740 + m.b742 <= 1) m.c1213 = Constraint(expr= m.b740 + m.b741 <= 1) m.c1214 = Constraint(expr= m.b741 + m.b742 <= 1) m.c1215 = Constraint(expr= m.b740 + m.b742 <= 1) m.c1216 = Constraint(expr= m.b741 + m.b742 <= 1) m.c1217 = Constraint(expr= m.b743 + m.b744 <= 1) m.c1218 = Constraint(expr= m.b743 + m.b745 <= 1) m.c1219 = Constraint(expr= m.b743 + m.b744 <= 1) m.c1220 = Constraint(expr= m.b744 + m.b745 <= 1) m.c1221 = Constraint(expr= m.b743 + m.b745 <= 1) m.c1222 = Constraint(expr= m.b744 + m.b745 <= 1) m.c1223 = Constraint(expr= m.b746 + m.b747 <= 1) m.c1224 = Constraint(expr= m.b746 + m.b748 <= 1) m.c1225 = Constraint(expr= m.b746 + m.b747 <= 1) m.c1226 = Constraint(expr= m.b747 + m.b748 <= 1) m.c1227 = Constraint(expr= m.b746 + m.b748 <= 1) m.c1228 = Constraint(expr= m.b747 + m.b748 <= 1) m.c1229 = Constraint(expr= m.b749 + m.b750 <= 1) m.c1230 = Constraint(expr= m.b749 + m.b751 <= 1) m.c1231 = Constraint(expr= m.b749 + m.b750 <= 1) m.c1232 = Constraint(expr= m.b750 + m.b751 <= 1) m.c1233 = Constraint(expr= m.b749 + m.b751 <= 1) m.c1234 = Constraint(expr= m.b750 + m.b751 <= 1) m.c1235 = Constraint(expr= m.b752 + m.b753 <= 1) m.c1236 = Constraint(expr= m.b752 + m.b754 <= 1) m.c1237 = Constraint(expr= m.b752 + m.b753 <= 1) m.c1238 = Constraint(expr= m.b753 + m.b754 <= 1) m.c1239 = Constraint(expr= m.b752 + m.b754 <= 1) m.c1240 = Constraint(expr= m.b753 + m.b754 <= 1) m.c1241 = Constraint(expr= m.b755 + m.b756 <= 1) m.c1242 = Constraint(expr= m.b755 + m.b757 <= 1) m.c1243 = Constraint(expr= m.b755 + m.b756 <= 1) m.c1244 = Constraint(expr= m.b756 + m.b757 <= 1) m.c1245 = Constraint(expr= m.b755 + m.b757 <= 1) m.c1246 = Constraint(expr= m.b756 + m.b757 <= 1) m.c1247 = Constraint(expr= m.b758 + m.b759 <= 1) m.c1248 = Constraint(expr= m.b758 + m.b760 <= 1) m.c1249 = Constraint(expr= m.b758 + m.b759 <= 1) m.c1250 = Constraint(expr= m.b759 + m.b760 <= 1) m.c1251 = Constraint(expr= m.b758 + m.b760 <= 1) m.c1252 = Constraint(expr= m.b759 + m.b760 <= 1) m.c1253 = Constraint(expr= m.b761 + m.b762 <= 1) m.c1254 = Constraint(expr= m.b761 + m.b763 <= 1) m.c1255 = Constraint(expr= m.b761 + m.b762 <= 1) m.c1256 = Constraint(expr= m.b762 + m.b763 <= 1) m.c1257 = Constraint(expr= m.b761 + m.b763 <= 1) m.c1258 = Constraint(expr= m.b762 + m.b763 <= 1) m.c1259 = Constraint(expr= m.b764 + m.b765 <= 1) m.c1260 = Constraint(expr= m.b764 + m.b766 <= 1) m.c1261 = Constraint(expr= m.b764 + m.b765 <= 1) m.c1262 = Constraint(expr= m.b765 + m.b766 <= 1) m.c1263 = Constraint(expr= m.b764 + m.b766 <= 1) m.c1264 = Constraint(expr= m.b765 + m.b766 <= 1) m.c1265 = Constraint(expr= m.b767 + m.b768 <= 1) m.c1266 = Constraint(expr= m.b767 + m.b769 <= 1) m.c1267 = Constraint(expr= m.b767 + m.b768 <= 1) m.c1268 = Constraint(expr= m.b768 + m.b769 <= 1) m.c1269 = Constraint(expr= m.b767 + m.b769 <= 1) m.c1270 = Constraint(expr= m.b768 + m.b769 <= 1) m.c1271 = Constraint(expr= m.b770 + m.b771 <= 1) m.c1272 = Constraint(expr= m.b770 + m.b772 <= 1) m.c1273 = Constraint(expr= m.b770 + m.b771 <= 1) m.c1274 = Constraint(expr= m.b771 + m.b772 <= 1) m.c1275 = Constraint(expr= m.b770 + m.b772 <= 1) m.c1276 = Constraint(expr= m.b771 + m.b772 <= 1) m.c1277 = Constraint(expr= m.b773 + m.b774 <= 1) m.c1278 = Constraint(expr= m.b773 + m.b775 <= 1) m.c1279 = Constraint(expr= m.b773 + m.b774 <= 1) m.c1280 = Constraint(expr= m.b774 + m.b775 <= 1) m.c1281 = Constraint(expr= m.b773 + m.b775 <= 1) m.c1282 = Constraint(expr= m.b774 + m.b775 <= 1) m.c1283 = Constraint(expr= m.b596 - m.b686 <= 0) m.c1284 = Constraint(expr= - m.b596 + m.b597 - m.b687 <= 0) m.c1285 = Constraint(expr= - m.b596 - m.b597 + m.b598 - m.b688 <= 0) m.c1286 = Constraint(expr= m.b599 - m.b689 <= 0) m.c1287 = Constraint(expr= - m.b599 + m.b600 - m.b690 <= 0) m.c1288 = Constraint(expr= - m.b599 - m.b600 + m.b601 - m.b691 <= 0) m.c1289 = Constraint(expr= m.b602 - m.b692 <= 0) m.c1290 = Constraint(expr= - m.b602 + m.b603 - m.b693 <= 0) m.c1291 = Constraint(expr= - m.b602 - m.b603 + m.b604 - m.b694 <= 0) m.c1292 = Constraint(expr= m.b605 - m.b695 <= 0) m.c1293 = Constraint(expr= - m.b605 + m.b606 - m.b696 <= 0) m.c1294 = Constraint(expr= - m.b605 - m.b606 + m.b607 - m.b697 <= 0) m.c1295 = Constraint(expr= m.b608 - m.b698 <= 0) m.c1296 = Constraint(expr= - m.b608 + m.b609 - m.b699 <= 0) m.c1297 = Constraint(expr= - m.b608 - m.b609 + m.b610 - m.b700 <= 0) m.c1298 = Constraint(expr= m.b611 - m.b701 <= 0) m.c1299 = Constraint(expr= - m.b611 + m.b612 - m.b702 <= 0) m.c1300 = Constraint(expr= - m.b611 - m.b612 + m.b613 - m.b703 <= 0) m.c1301 = Constraint(expr= m.b614 - m.b704 <= 0) m.c1302 = Constraint(expr= - m.b614 + m.b615 - m.b705 <= 0) m.c1303 = Constraint(expr= - m.b614 - m.b615 + m.b616 - m.b706 <= 0) m.c1304 = Constraint(expr= m.b617 - m.b707 <= 0) m.c1305 = Constraint(expr= - m.b617 + m.b618 - m.b708 <= 0) m.c1306 = Constraint(expr= - m.b617 - m.b618 + m.b619 - m.b709 <= 0) m.c1307 = Constraint(expr= m.b620 - m.b710 <= 0) m.c1308 = Constraint(expr= - m.b620 + m.b621 - m.b711 <= 0) m.c1309 = Constraint(expr= - m.b620 - m.b621 + m.b622 - m.b712 <= 0) m.c1310 = Constraint(expr= m.b623 - m.b713 <= 0) m.c1311 = Constraint(expr= - m.b623 + m.b624 - m.b714 <= 0) m.c1312 = Constraint(expr= - m.b623 - m.b624 + m.b625 - m.b715 <= 0) m.c1313 = Constraint(expr= m.b626 - m.b716 <= 0) m.c1314 = Constraint(expr= - m.b626 + m.b627 - m.b717 <= 0) m.c1315 = Constraint(expr= - m.b626 - m.b627 + m.b628 - m.b718 <= 0) m.c1316 = Constraint(expr= m.b629 - m.b719 <= 0) m.c1317 = Constraint(expr= - m.b629 + m.b630 - m.b720 <= 0) m.c1318 = Constraint(expr= - m.b629 - m.b630 + m.b631 - m.b721 <= 0) m.c1319 = Constraint(expr= m.b632 - m.b722 <= 0) m.c1320 = Constraint(expr= - m.b632 + m.b633 - m.b723 <= 0) m.c1321 = Constraint(expr= - m.b632 - m.b633 + m.b634 - m.b724 <= 0) m.c1322 = Constraint(expr= m.b635 - m.b725 <= 0) m.c1323 = Constraint(expr= - m.b635 + m.b636 - m.b726 <= 0) m.c1324 = Constraint(expr= - m.b635 - m.b636 + m.b637 - m.b727 <= 0) m.c1325 = Constraint(expr= m.b638 - m.b728 <= 0) m.c1326 = Constraint(expr= - m.b638 + m.b639 - m.b729 <= 0) m.c1327 = Constraint(expr= - m.b638 - m.b639 + m.b640 - m.b730 <= 0) m.c1328 = Constraint(expr= m.b641 - m.b731 <= 0) m.c1329 = Constraint(expr= - m.b641 + m.b642 - m.b732 <= 0) m.c1330 = Constraint(expr= - m.b641 - m.b642 + m.b643 - m.b733 <= 0) m.c1331 = Constraint(expr= m.b644 - m.b734 <= 0) m.c1332 = Constraint(expr= - m.b644 + m.b645 - m.b735 <= 0) m.c1333 = Constraint(expr= - m.b644 - m.b645 + m.b646 - m.b736 <= 0) m.c1334 = Constraint(expr= m.b647 - m.b737 <= 0) m.c1335 = Constraint(expr= - m.b647 + m.b648 - m.b738 <= 0) m.c1336 = Constraint(expr= - m.b647 - m.b648 + m.b649 - m.b739 <= 0) m.c1337 = Constraint(expr= m.b650 - m.b740 <= 0) m.c1338 = Constraint(expr= - m.b650 + m.b651 - m.b741 <= 0) m.c1339 = Constraint(expr= - m.b650 - m.b651 + m.b652 - m.b742 <= 0) m.c1340 = Constraint(expr= m.b653 - m.b743 <= 0) m.c1341 = Constraint(expr= - m.b653 + m.b654 - m.b744 <= 0) m.c1342 = Constraint(expr= - m.b653 - m.b654 + m.b655 - m.b745 <= 0) m.c1343 = Constraint(expr= m.b656 - m.b746 <= 0) m.c1344 = Constraint(expr= - m.b656 + m.b657 - m.b747 <= 0) m.c1345 = Constraint(expr= - m.b656 - m.b657 + m.b658 - m.b748 <= 0) m.c1346 = Constraint(expr= m.b659 - m.b749 <= 0) m.c1347 = Constraint(expr= - m.b659 + m.b660 - m.b750 <= 0) m.c1348 = Constraint(expr= - m.b659 - m.b660 + m.b661 - m.b751 <= 0) m.c1349 = Constraint(expr= m.b662 - m.b752 <= 0) m.c1350 = Constraint(expr= - m.b662 + m.b663 - m.b753 <= 0) m.c1351 = Constraint(expr= - m.b662 - m.b663 + m.b664 - m.b754 <= 0) m.c1352 = Constraint(expr= m.b665 - m.b755 <= 0) m.c1353 = Constraint(expr= - m.b665 + m.b666 - m.b756 <= 0) m.c1354 = Constraint(expr= - m.b665 - m.b666 + m.b667 - m.b757 <= 0) m.c1355 = Constraint(expr= m.b668 - m.b758 <= 0) m.c1356 = Constraint(expr= - m.b668 + m.b669 - m.b759 <= 0) m.c1357 = Constraint(expr= - m.b668 - m.b669 + m.b670 - m.b760 <= 0) m.c1358 = Constraint(expr= m.b671 - m.b761 <= 0) m.c1359 = Constraint(expr= - m.b671 + m.b672 - m.b762 <= 0) m.c1360 = Constraint(expr= - m.b671 - m.b672 + m.b673 - m.b763 <= 0) m.c1361 = Constraint(expr= m.b674 - m.b764 <= 0) m.c1362 = Constraint(expr= - m.b674 + m.b675 - m.b765 <= 0) m.c1363 = Constraint(expr= - m.b674 - m.b675 + m.b676 - m.b766 <= 0) m.c1364 = Constraint(expr= m.b677 - m.b767 <= 0) m.c1365 = Constraint(expr= - m.b677 + m.b678 - m.b768 <= 0) m.c1366 = Constraint(expr= - m.b677 - m.b678 + m.b679 - m.b769 <= 0) m.c1367 = Constraint(expr= m.b680 - m.b770 <= 0) m.c1368 = Constraint(expr= - m.b680 + m.b681 - m.b771 <= 0) m.c1369 = Constraint(expr= - m.b680 - m.b681 + m.b682 - m.b772 <= 0) m.c1370 = Constraint(expr= m.b683 - m.b773 <= 0) m.c1371 = Constraint(expr= - m.b683 + m.b684 - m.b774 <= 0) m.c1372 = Constraint(expr= - m.b683 - m.b684 + m.b685 - m.b775 <= 0) m.c1373 = Constraint(expr= m.b596 + m.b599 == 1) m.c1374 = Constraint(expr= m.b597 + m.b600 == 1) m.c1375 = Constraint(expr= m.b598 + m.b601 == 1) m.c1376 = Constraint(expr= - m.b602 + m.b611 + m.b614 >= 0) m.c1377 = Constraint(expr= - m.b603 + m.b612 + m.b615 >= 0) m.c1378 = Constraint(expr= - m.b604 + m.b613 + m.b616 >= 0) m.c1379 = Constraint(expr= - m.b611 + m.b629 >= 0) m.c1380 = Constraint(expr= - m.b612 + m.b630 >= 0) m.c1381 = Constraint(expr= - m.b613 + m.b631 >= 0) m.c1382 = Constraint(expr= - m.b614 + m.b632 >= 0) m.c1383 = Constraint(expr= - m.b615 + m.b633 >= 0) m.c1384 = Constraint(expr= - m.b616 + m.b634 >= 0) m.c1385 = Constraint(expr= - m.b605 + m.b617 >= 0) m.c1386 = Constraint(expr= - m.b606 + m.b618 >= 0) m.c1387 = Constraint(expr= - m.b607 + m.b619 >= 0) m.c1388 = Constraint(expr= - m.b617 + m.b635 + m.b638 >= 0) m.c1389 = Constraint(expr= - m.b618 + m.b636 + m.b639 >= 0) m.c1390 = Constraint(expr= - m.b619 + m.b637 + m.b640 >= 0) m.c1391 = Constraint(expr= - m.b608 + m.b620 + m.b623 + m.b626 >= 0) m.c1392 = Constraint(expr= - m.b609 + m.b621 + m.b624 + m.b627 >= 0) m.c1393 = Constraint(expr= - m.b610 + m.b622 + m.b625 + m.b628 >= 0) m.c1394 = Constraint(expr= - m.b620 + m.b638 >= 0) m.c1395 = Constraint(expr= - m.b621 + m.b639 >= 0) m.c1396 = Constraint(expr= - m.b622 + m.b640 >= 0) m.c1397 = Constraint(expr= - m.b623 + m.b641 + m.b644 >= 0) m.c1398 = Constraint(expr= - m.b624 + m.b642 + m.b645 >= 0) m.c1399 = Constraint(expr= - m.b625 + m.b643 + m.b646 >= 0) m.c1400 = Constraint(expr= - m.b626 + m.b647 + m.b650 + m.b653 >= 0) m.c1401 = Constraint(expr= - m.b627 + m.b648 + m.b651 + m.b654 >= 0) m.c1402 = Constraint(expr= - m.b628 + m.b649 + m.b652 + m.b655 >= 0) m.c1403 = Constraint(expr= m.b596 + m.b599 - m.b602 >= 0) m.c1404 = Constraint(expr= m.b597 + m.b600 - m.b603 >= 0) m.c1405 = Constraint(expr= m.b598 + m.b601 - m.b604 >= 0) m.c1406 = Constraint(expr= m.b596 + m.b599 - m.b605 >= 0) m.c1407 = Constraint(expr= m.b597 + m.b600 - m.b606 >= 0) m.c1408 = Constraint(expr= m.b598 + m.b601 - m.b607 >= 0) m.c1409 = Constraint(expr= m.b596 + m.b599 - m.b608 >= 0) m.c1410 = Constraint(expr= m.b597 + m.b600 - m.b609 >= 0) m.c1411 = Constraint(expr= m.b598 + m.b601 - m.b610 >= 0) m.c1412 = Constraint(expr= m.b602 - m.b611 >= 0) m.c1413 = Constraint(expr= m.b603 - m.b612 >= 0) m.c1414 = Constraint(expr= m.b604 - m.b613 >= 0) m.c1415 = Constraint(expr= m.b602 - m.b614 >= 0) m.c1416 = Constraint(expr= m.b603 - m.b615 >= 0) m.c1417 = Constraint(expr= m.b604 - m.b616 >= 0) m.c1418 = Constraint(expr= m.b605 - m.b617 >= 0) m.c1419 = Constraint(expr= m.b606 - m.b618 >= 0) m.c1420 = Constraint(expr= m.b607 - m.b619 >= 0) m.c1421 = Constraint(expr= m.b608 - m.b620 >= 0) m.c1422 = Constraint(expr= m.b609 - m.b621 >= 0) m.c1423 = Constraint(expr= m.b610 - m.b622 >= 0) m.c1424 = Constraint(expr= m.b608 - m.b623 >= 0) m.c1425 = Constraint(expr= m.b609 - m.b624 >= 0) m.c1426 = Constraint(expr= m.b610 - m.b625 >= 0) m.c1427 = Constraint(expr= m.b608 - m.b626 >= 0) m.c1428 = Constraint(expr= m.b609 - m.b627 >= 0) m.c1429 = Constraint(expr= m.b610 - m.b628 >= 0) m.c1430 = Constraint(expr= m.b611 - m.b629 >= 0) m.c1431 = Constraint(expr= m.b612 - m.b630 >= 0) m.c1432 = Constraint(expr= m.b613 - m.b631 >= 0) m.c1433 = Constraint(expr= m.b614 - m.b632 >= 0) m.c1434 = Constraint(expr= m.b615 - m.b633 >= 0) m.c1435 = Constraint(expr= m.b616 - m.b634 >= 0) m.c1436 = Constraint(expr= m.b617 - m.b635 >= 0) m.c1437 = Constraint(expr= m.b618 - m.b636 >= 0) m.c1438 = Constraint(expr= m.b619 - m.b637 >= 0) m.c1439 = Constraint(expr= m.b617 - m.b638 >= 0) m.c1440 = Constraint(expr= m.b618 - m.b639 >= 0) m.c1441 = Constraint(expr= m.b619 - m.b640 >= 0) m.c1442 = Constraint(expr= m.b623 - m.b641 >= 0) m.c1443 = Constraint(expr= m.b624 - m.b642 >= 0) m.c1444 = Constraint(expr= m.b625 - m.b643 >= 0) m.c1445 = Constraint(expr= m.b623 - m.b644 >= 0) m.c1446 = Constraint(expr= m.b624 - m.b645 >= 0) m.c1447 = Constraint(expr= m.b625 - m.b646 >= 0) m.c1448 = Constraint(expr= m.b626 - m.b647 >= 0) m.c1449 = Constraint(expr= m.b627 - m.b648 >= 0) m.c1450 = Constraint(expr= m.b628 - m.b649 >= 0) m.c1451 = Constraint(expr= m.b626 - m.b650 >= 0) m.c1452 = Constraint(expr= m.b627 - m.b651 >= 0) m.c1453 = Constraint(expr= m.b628 - m.b652 >= 0) m.c1454 = Constraint(expr= m.b626 - m.b653 >= 0) m.c1455 = Constraint(expr= m.b627 - m.b654 >= 0) m.c1456 = Constraint(expr= m.b628 - m.b655 >= 0) m.c1457 = Constraint(expr= - m.b653 + m.b656 + m.b659 >= 0) m.c1458 = Constraint(expr= - m.b654 + m.b657 + m.b660 >= 0) m.c1459 = Constraint(expr= - m.b655 + m.b658 + m.b661 >= 0) m.c1460 = Constraint(expr= - m.b662 + m.b671 + m.b674 >= 0) m.c1461 = Constraint(expr= - m.b663 + m.b672 + m.b675 >= 0) m.c1462 = Constraint(expr= - m.b664 + m.b673 + m.b676 >= 0) m.c1463 = Constraint(expr= - m.b665 + m.b677 >= 0) m.c1464 = Constraint(expr= - m.b666 + m.b678 >= 0) m.c1465 = Constraint(expr= - m.b667 + m.b679 >= 0) m.c1466 = Constraint(expr= m.b653 - m.b656 >= 0) m.c1467 = Constraint(expr= m.b654 - m.b657 >= 0) m.c1468 = Constraint(expr= m.b655 - m.b658 >= 0) m.c1469 = Constraint(expr= m.b653 - m.b659 >= 0) m.c1470 = Constraint(expr= m.b654 - m.b660 >= 0) m.c1471 = Constraint(expr= m.b655 - m.b661 >= 0) m.c1472 = Constraint(expr= m.b662 - m.b671 >= 0) m.c1473 = Constraint(expr= m.b663 - m.b672 >= 0) m.c1474 = Constraint(expr= m.b664 - m.b673 >= 0) m.c1475 = Constraint(expr= m.b662 - m.b674 >= 0) m.c1476 = Constraint(expr= m.b663 - m.b675 >= 0) m.c1477 = Constraint(expr= m.b664 - m.b676 >= 0) m.c1478 = Constraint(expr= m.b665 - m.b677 >= 0) m.c1479 = Constraint(expr= m.b666 - m.b678 >= 0) m.c1480 = Constraint(expr= m.b667 - m.b679 >= 0) m.c1481 = Constraint(expr= m.b668 - m.b680 >= 0) m.c1482 = Constraint(expr= m.b669 - m.b681 >= 0) m.c1483 = Constraint(expr= m.b670 - m.b682 >= 0) m.c1484 = Constraint(expr= m.b668 - m.b683 >= 0) m.c1485 = Constraint(expr= m.b669 - m.b684 >= 0) m.c1486 = Constraint(expr= m.b670 - m.b685 >= 0)
[ 2, 220, 20625, 19930, 3194, 416, 402, 40834, 38240, 379, 5534, 14, 1314, 14, 2481, 1367, 25, 2718, 25, 2091, 198, 2, 220, 220, 198, 2, 220, 7889, 341, 9853, 198, 2, 220, 220, 220, 220, 220, 7472, 220, 220, 220, 220, 220, 220, 22...
1.921497
73,984
import unittest from flask import json from tests.base_test import BaseTest from app import db, elastic_index from app.model.resource import Resource from app.model.resource_category import ResourceCategory from app.model.resource_change_log import ResourceChangeLog from app.model.user import Role
[ 11748, 555, 715, 395, 198, 198, 6738, 42903, 1330, 33918, 198, 198, 6738, 5254, 13, 8692, 62, 9288, 1330, 7308, 14402, 198, 6738, 598, 1330, 20613, 11, 27468, 62, 9630, 198, 6738, 598, 13, 19849, 13, 31092, 1330, 20857, 198, 6738, 598...
3.973684
76
import json import logging import math import re from contextlib import contextmanager from django.core.management import call_command from django.core.management.base import CommandError from morango.models import Filter from morango.models import InstanceIDModel from morango.models import ScopeDefinition from morango.sync.controller import MorangoProfileController from ..utils import create_superuser_and_provision_device from ..utils import get_baseurl from ..utils import get_client_and_server_certs from ..utils import get_dataset_id from ..utils import get_single_user_sync_filter from ..utils import provision_single_user_device from kolibri.core.auth.constants.morango_sync import PROFILE_FACILITY_DATA from kolibri.core.auth.constants.morango_sync import ScopeDefinitions from kolibri.core.auth.constants.morango_sync import State from kolibri.core.auth.management.utils import get_facility from kolibri.core.auth.management.utils import run_once from kolibri.core.auth.models import dataset_cache from kolibri.core.logger.utils.data import bytes_for_humans from kolibri.core.tasks.exceptions import UserCancelledError from kolibri.core.tasks.management.commands.base import AsyncCommand from kolibri.core.utils.lock import db_lock from kolibri.utils import conf DATA_PORTAL_SYNCING_BASE_URL = conf.OPTIONS["Urls"]["DATA_PORTAL_SYNCING_BASE_URL"] TRANSFER_MESSAGE = "{records_transferred}/{records_total}, {transfer_total}" logger = logging.getLogger(__name__)
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 10688, 198, 11748, 302, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 869, 62, 21812, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 86...
3.201299
462
import math import imageio import cv2 as cv import numpy as np import transformer D1 = 105 D2 = 175 D3 = 275 if __name__ == "__main__": cap = cv.VideoCapture('samples/delta.mp4') if not cap.isOpened(): raise IOError("Video was not opened!") mse = 0 count = 0 reader = imageio.get_reader('samples/delta.mp4') fps = reader.get_meta_data()['fps'] writer = imageio.get_writer('samples/result.mp4', fps=fps) while True: res, frame = cap.read() if not res: break mean_error = 0 holes_count = 0 img = frame.copy() cv.imshow('dfa', img) frame = cv.cvtColor(frame, cv.COLOR_BGR2GRAY) frame_copy = frame.copy() # frame = cv.adaptiveThreshold(frame, 255, cv.ADAPTIVE_THRESH_MEAN_C, cv.THRESH_BINARY_INV, 15, 9) # kernel = cv.getStructuringElement(cv.MORPH_ELLIPSE, (3, 3)) # frame = cv.morphologyEx(frame, cv.MORPH_OPEN, kernel) # frame = cv.medianBlur(frame, 3) # contours, hierarchy = cv.findContours(frame, cv.RETR_LIST, cv.CHAIN_APPROX_NONE) # roi = max(contours, key=cv.contourArea) # x, y, w, h = cv.boundingRect(roi) x, y, w, h = 115, 0, 445, 360 img = img[y: y+h, x: x+w] img = transformer.rotate_along_axis(img, theta=40) frame_copy = frame_copy[y: y+h, x: x+w] frame_copy = transformer.rotate_along_axis(frame_copy, theta=40) # cv.imshow('', frame_copy) # cv.rectangle(frame_copy, (x, y), (x + w, y + h), (0, 255, 0), 2) # cv.drawContours(frame_copy, roi, -1, (0, 0, 255), 2) # res, mask = cv.threshold(frame_copy, 0, 255, cv.THRESH_BINARY) # frame_copy = cv.bitwise_and(frame_copy, frame_copy, mask=mask) # corners = cv.goodFeaturesToTrack(frame_copy, 1000, 0.0001, 1) # corners = list(sorted(corners, key=lambda x: x[0][1])) # print(corners[-1], corners[-2]) # print() # corners = np.array([[38, 293], [407, 293]]) # for item in corners: # # x, y = map(int, item.ravel()) # x, y = item # cv.circle(img, (x, y), 5, (0, 0, 255), -1) src = np.float32([[0, 0], [w, 0], [38, 293], [407, 293]]) dst = np.float32([[0, 0], [w, 0], [30, h], [w - 30, h]]) matrix = cv.getPerspectiveTransform(src, dst) img = cv.warpPerspective(img, matrix, (w, h)) cv.imshow('', img) img_copy = img.copy() img = cv.cvtColor(img, cv.COLOR_BGR2GRAY) img = cv.adaptiveThreshold(img, 255, cv.ADAPTIVE_THRESH_MEAN_C, cv.THRESH_BINARY_INV, 15, 9) kernel = cv.getStructuringElement(cv.MORPH_ELLIPSE, (3, 3)) img = cv.morphologyEx(img, cv.MORPH_OPEN, kernel) img = cv.medianBlur(img, 3) origin = (w // 2 + 4, h // 2 + 2) o1, o2 = origin r = w // 2 + 1 ORIGIN = (0, 0) R = 300 # mm contours, hierarchy = cv.findContours(img, cv.RETR_LIST, cv.CHAIN_APPROX_NONE) contours = list(filter(lambda x: 50 < cv.contourArea(x) < 175, contours)) factor = 0.1 smooth_contours = [] for i in range(len(contours)): epsilon = factor * cv.arcLength(contours[i], True) approx = cv.approxPolyDP(contours[i], epsilon, True) x, y, width, height = cv.boundingRect(approx) area = width*height if len(approx) == 4 and 75 < area < 200: smooth_contours.append(contours[i]) center, radius = cv.minEnclosingCircle(approx) radius = int(radius) center = tuple(map(int, center)) x, y = center X = ((x - o1) * R) / r Y = ((y - o2) * R) / r X, Y = round(X, 2), round(Y, 2) cv.circle(img_copy, center, radius, (0, 255, 0), 2) cv.putText(img_copy, str((X, Y)), center, cv.FONT_HERSHEY_SIMPLEX, 0.3, (255, 0, 255, 255), 1, cv.LINE_AA) e1, e2, e3 = map(lambda d: abs(math.hypot(X, Y) - d), [D1, D2, D3]) error = min(e1, e2, e3) if error < 10: mean_error += error ** 2 holes_count += 1 cv.circle(img_copy, origin, 4, (0, 0, 255), -1) # cv.line(img_copy, origin, (origin[0], origin[1]), (255, 0, 255), 2) mean_error /= holes_count mse += mean_error count += 1 cv.imshow("Final", img_copy) writer.append_data(img_copy) # cv.imshow("Chg", img) if cv.waitKey(30) == 27: break print("E:", mse / count, "N:", count) writer.close() cap.release() cv.destroyAllWindows()
[ 11748, 10688, 198, 11748, 2939, 952, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 47385, 198, 198, 35, 16, 796, 13343, 198, 35, 17, 796, 19038, 198, 35, 18, 796, 25829, 198, 198, 361, 11593,...
1.882283
2,523
#!/usr/bin/env python3 """ A tool to grab a single BOSS image and pull a few items from its header. It is used in bin/sloan_log.py, but it could be used directly as well. """ import argparse from pathlib import Path from astropy.time import Time import fitsio if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 32, 2891, 284, 5552, 257, 2060, 347, 18420, 2939, 290, 2834, 257, 1178, 3709, 422, 663, 13639, 13, 632, 318, 198, 973, 287, 9874, 14, 82, 5439, 272, 62, 6404, 13, 9...
3.091837
98
# Altere o Programa 8.20 de forma que o usurio tenha trs chances de acertar o nmero # O programa termina se o usurio acertar ou errar trs vezes # Programa 8.20 do livro, pgina 184 # Programa 8.20 - Adivinhando o nmero # # import random # # n = random.randint(1, 10) # x = int(input('Escolha um nmero entre 1 e 10: ')) # if x == n: # print('Voc acertou!') # else: # print('Voc errou.') import random numberRandom = random.randint(1, 10) counter = 0 while True: chosenNumber = int(input('\nEscolha um nmero entre 1 e 10: ')) counter += 1 if chosenNumber == numberRandom: print(f'Parabns! Voc acertou na {counter} de 3 tentativas!') break else: print(f'Voc errou!') if counter < 3: print(f'Resta(m) {3 - counter} tentativa(s).') else: print('Suas tentativas acabaram! Mais sorte na prxima vez.') print(f'O nmero sorteado foi {numberRandom}.') break
[ 2, 12344, 567, 267, 6118, 64, 807, 13, 1238, 390, 1296, 64, 8358, 267, 39954, 952, 3478, 3099, 491, 82, 8395, 390, 936, 861, 283, 267, 299, 647, 78, 198, 2, 440, 1430, 64, 5651, 64, 384, 267, 39954, 952, 936, 861, 283, 267, 84, ...
2.254808
416
# -*- coding: utf-8 -*- """This sub module provides a global variable to check for checking if the non-interactive argument was set Exported variable: interactive -- False, if the main the non-interactive argument was set, True, if it was not set """ global interactive interactive = True;
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 1212, 850, 8265, 3769, 257, 3298, 7885, 284, 2198, 329, 10627, 611, 262, 1729, 12, 3849, 5275, 4578, 373, 900, 198, 198, 3109, 9213, 7885, 25, 198, 3849, 5...
3.6625
80
import setuptools # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setuptools.setup( name="atm76", version="0.1.0", author="Steven H. Berguin", author_email="stevenberguin@gmail.com", description="Differentiable 1976 Atmosphere", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/shb84/ATM76.git", packages=setuptools.find_packages(), package_data={}, install_requires=["numpy>=1.16", "genn"], include_package_data=True, classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], python_requires='>=3.7', )
[ 11748, 900, 37623, 10141, 198, 198, 2, 1675, 779, 257, 6414, 21004, 198, 6738, 40481, 82, 1330, 1280, 198, 6738, 28686, 1330, 3108, 198, 198, 1456, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 19...
2.629412
340
import logging import asyncio from agent.check_plugins import AbstractCheckPlugin # Do khong biet dung thu vien asyncio ntn ca nen em dung thu vien request # python import requests import sys import time from datetime import datetime logger = logging.getLogger(__name__) def mean_deviation(self, array_speed, download_speed): """The mean deviation each downloads with download_speed. Args: array_speed (list): list download speeds for each kB. download_speed (kB/s): mean download speed. Returns: mean_deviation (kB/s) """ if len(array_speed) == 0: return 0 sum = 0 for speed in array_speed: sum += abs(speed - download_speed) return sum//len(array_speed) def output(self, my_array): """Reformat my_array for inserting into influxdb. Args: my_array (list): [self._snode, url, str(datetime.now()), download_speed, mean_deviationS, accelerationS] Returns: json format for influxdb """ return { "measurement": "download_speed", "tags": { "snode": "{}".format(my_array[0]), "dnode": "{}".format(my_array[1]) }, # "time": "{}".format(my_array[2]), "fields": { "speed": my_array[3], "mean_deviation": my_array[4], "acceleration": my_array[5] } }
[ 11748, 18931, 198, 11748, 30351, 952, 198, 6738, 5797, 13, 9122, 62, 37390, 1330, 27741, 9787, 37233, 198, 198, 2, 2141, 44081, 506, 275, 1155, 288, 2150, 294, 84, 410, 2013, 30351, 952, 299, 34106, 1275, 299, 268, 795, 288, 2150, 294...
2.061745
745
from django.urls import path from . import views app_name = "main" urlpatterns = [ path("",views.homepage,name="homepage") ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 366, 12417, 1, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 7203, 1600, 33571, 13, 11195, 7700, 11, 3672, 262...
2.708333
48
""" Utility used by the Network class to actually train. Based on: https://github.com/fchollet/keras/blob/master/examples/mnist_mlp.py """ from keras.datasets import mnist, cifar10 from keras.models import Sequential from keras.layers import Dense, Dropout from keras.utils.np_utils import to_categorical from keras.callbacks import EarlyStopping import data_parser import numpy as np from keras.optimizers import Adadelta, Adam, rmsprop from sklearn.metrics import mean_squared_error # Helper: Early stopping. early_stopper = EarlyStopping(patience=5) def get_cifar10(): """Retrieve the CIFAR dataset and process the data.""" # Set defaults. nb_classes = 10 batch_size = 64 input_shape = (3072,) # Get the data. (x_train, y_train), (x_test, y_test) = cifar10.load_data() x_train = x_train.reshape(50000, 3072) x_test = x_test.reshape(10000, 3072) x_train = x_train.astype('float32') x_test = x_test.astype('float32') x_train /= 255 x_test /= 255 # convert class vectors to binary class matrices y_train = to_categorical(y_train, nb_classes) y_test = to_categorical(y_test, nb_classes) return (nb_classes, batch_size, input_shape, x_train, x_test, y_train, y_test) def get_mnist(): """Retrieve the MNIST dataset and process the data.""" # Set defaults. nb_classes = 10 batch_size = 128 input_shape = (784,) # Get the data. (x_train, y_train), (x_test, y_test) = mnist.load_data() x_train = x_train.reshape(60000, 784) x_test = x_test.reshape(10000, 784) x_train = x_train.astype('float32') x_test = x_test.astype('float32') x_train /= 255 x_test /= 255 # convert class vectors to binary class matrices y_train = to_categorical(y_train, nb_classes) y_test = to_categorical(y_test, nb_classes) return (nb_classes, batch_size, input_shape, x_train, x_test, y_train, y_test) def compile_model(network, nb_classes, input_shape): """Compile a sequential model. Args: network (dict): the parameters of the network Returns: a compiled network. """ # Get our network parameters. nb_layers = network['nb_layers'] nb_neurons = network['nb_neurons'] activation = network['activation'] optimizer = network['optimizer'] learning_rate = network['learning_rate'] model = Sequential() # Add each layer. for i in range(nb_layers): # Need input shape for first layer. if i == 0: print(nb_neurons) model.add(Dense(units=nb_neurons, activation=activation, input_shape=input_shape)) else: print(nb_neurons) model.add(Dense(nb_neurons, activation=activation)) model.add(Dropout(0.2)) # hard-coded dropout # Output layer. if(nb_classes == -1): model.add(Dense(1, activation='linear')) ADAM = Adam(lr=learning_rate) model.compile(loss='mean_squared_error', metrics=['accuracy'], optimizer=ADAM) else: model.add(Dense(nb_classes, activation='softmax')) model.compile(loss='categorical_crossentropy', optimizer=optimizer, metrics=['accuracy']) return model def train_and_score(network, dataset): """Train the model, return test loss. Args: network (dict): the parameters of the network dataset (str): Dataset to use for training/evaluating """ if dataset == 'cifar10': nb_classes, batch_size, input_shape, x_train, \ x_test, y_train, y_test = get_cifar10() elif dataset == 'mnist': nb_classes, batch_size, input_shape, x_train, \ x_test, y_train, y_test = get_mnist() elif dataset == 'dbtt': nb_classes, batch_size, input_shape, x_train, \ x_test, y_train, y_test = get_dbtt() model = compile_model(network, nb_classes, input_shape) if dataset == 'dbtt': model.fit(x_train, y_train, epochs=10, batch_size=1406, verbose=0) y_predict = model.predict(x_test) * 758.92 # todo way to not hardcode this? rms = np.sqrt(mean_squared_error(y_test, y_predict)) print(rms) return rms else: model.fit(x_train, y_train, batch_size=batch_size, epochs=10000, # using early stopping, so no real limit verbose=0, validation_data=(x_test, y_test), callbacks=[early_stopper]) score = model.evaluate(x_test, y_test, verbose=0) return score[1] # 1 is accuracy. 0 is loss.
[ 37811, 198, 18274, 879, 973, 416, 262, 7311, 1398, 284, 1682, 4512, 13, 198, 198, 15001, 319, 25, 198, 220, 220, 220, 3740, 1378, 12567, 13, 785, 14, 69, 354, 349, 1616, 14, 6122, 292, 14, 2436, 672, 14, 9866, 14, 1069, 12629, 14,...
2.316244
1,970
from openslides.agenda.models import Item from openslides.core.models import CustomSlide from openslides.utils.test import TestCase
[ 6738, 9808, 75, 1460, 13, 363, 7438, 13, 27530, 1330, 9097, 198, 6738, 9808, 75, 1460, 13, 7295, 13, 27530, 1330, 8562, 11122, 485, 198, 6738, 9808, 75, 1460, 13, 26791, 13, 9288, 1330, 6208, 20448, 628 ]
3.594595
37
import weakref import os import requests import ssl from ssl import SSLContext import logging from ssl_context_builder.builder.builder import SslContextBuilder from ssl_context_builder.http_impl.requests_wrapper.ssl_adapter import SslAdapter
[ 11748, 4939, 5420, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 264, 6649, 198, 6738, 264, 6649, 1330, 25952, 21947, 198, 11748, 18931, 198, 198, 6738, 264, 6649, 62, 22866, 62, 38272, 13, 38272, 13, 38272, 1330, 311, 6649, 21947, 3...
3.588235
68
''' Selected cifar-10. The .csv file format: class_index,data_index 3,0 8,1 8,2 ... ''' import pickle import pandas as pd file = 'E:\pycharm\LEARN\data\cifar-10\cifar-10-batches-py\\test_batch' with open(file, 'rb') as f: dict = pickle.load(f, encoding='bytes') dict.keys() batch_label = dict[b'batch_label'] labels = dict[b'labels'] data = dict[b'data'] filenames = dict[b'filenames'] length = len(labels) data_index = [i for i in range(length)] class_index = labels csv_dict = {'class_index': class_index, 'data_index': data_index} df = pd.DataFrame(csv_dict) df.to_csv('selected_cifar10.csv', index=False)
[ 7061, 6, 198, 4653, 12609, 269, 361, 283, 12, 940, 13, 383, 764, 40664, 2393, 5794, 25, 198, 198, 4871, 62, 9630, 11, 7890, 62, 9630, 198, 18, 11, 15, 198, 23, 11, 16, 198, 23, 11, 17, 198, 986, 198, 198, 7061, 6, 198, 198, ...
2.352273
264
# Ghetto Fixtures from codebox import app from codebox.apps.auth.models import User from codebox.apps.snippets.models import Snippet from codebox.apps.organizations.models import Organization, OrganizationMember from flask import g client = app.test_client() _ctx = app.test_request_context() _ctx.push() app.preprocess_request() g.redis.flushdb() User.objects.create(pk=1, name='zeeg') Organization.objects.create(pk='disqus', name='DISQUS') OrganizationMember.objects.create(org='disqus', user=1) # Create sample snippets # plaintext Snippet.objects.create(org='disqus', user=1, lang='text', text = "Hello World!") # python Snippet.objects.create(org='disqus', user=1, lang='python', text = "print 'Disqus was here'") # html Snippet.objects.create(org='disqus', user=1, lang='html', text = '<h1>Look its HTML!</h1>') # javascript Snippet.objects.create(org='disqus', user=1, lang='javascript', text = "document.write('Di-squs')")
[ 2, 402, 35619, 376, 25506, 198, 198, 6738, 2438, 3524, 1330, 598, 198, 6738, 2438, 3524, 13, 18211, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 2438, 3524, 13, 18211, 13, 16184, 3974, 1039, 13, 27530, 1330, 5489, 3974, 316, 198, 673...
2.9375
320
from unittest.mock import Mock, patch from django.test import SimpleTestCase from corehq.apps.domain.exceptions import DomainDoesNotExist from corehq.apps.linked_domain.exceptions import ( DomainLinkAlreadyExists, DomainLinkError, DomainLinkNotAllowed, ) from corehq.apps.linked_domain.views import link_domains
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 11, 8529, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 17427, 14402, 20448, 198, 198, 6738, 4755, 71, 80, 13, 18211, 13, 27830, 13, 1069, 11755, 1330, 20021, 13921, 3673, 3109, 396, 198,...
3.084906
106
import function_exercise_01 as st st.sandwich_toppings('meatballs', 'salad')
[ 11748, 2163, 62, 1069, 23697, 62, 486, 355, 336, 198, 198, 301, 13, 38142, 11451, 62, 1462, 37840, 10786, 41495, 21591, 3256, 705, 21680, 324, 11537, 628 ]
2.925926
27
#!/usr/bin/python # # from __future__ import absolute_import import json import re import logging from .datacite import DataCiteParser # # if __name__ == "__main__": # # # allows program to print utf-8 encoded output sensibly # import codecs # sys.stdout = codecs.getwriter('utf-8')(sys.stdout) # sys.stderr = codecs.getwriter('utf-8')(sys.stderr) # # parser = ZenodoParser() # for file in sys.argv[1:]: # d = None # with open(file, 'r') as fp: # d = parser.parse(fp) # print json.dumps(d, indent=2)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 18931, 198, 6738, 764, 19608, 330, 578, 1330, 6060, 34, 578, 46677, 628, ...
2.25
248
import json import time from functools import lru_cache from multiprocessing import Pool, Process from threading import Thread, Timer from typing import Any, Dict, List from datetime import datetime import hashlib import inspect import requests import waitress from bottle import BaseTemplate, Bottle, request, response, static_file, template, error import utils.constants as consts from core import Block, BlockChain, SingleOutput, Transaction, TxIn, TxOut, genesis_block from authority import Authority from utils.logger import logger, iplogger from utils.storage import get_block_from_db, get_wallet_from_db, read_header_list_from_db from utils.utils import compress, decompress, dhash from wallet import Wallet app = Bottle() BaseTemplate.defaults["get_url"] = app.get_url LINE_PROFILING = False BLOCKCHAIN = BlockChain() PEER_LIST: List[Dict[str, Any]] = [] MY_WALLET = Wallet() miner = Authority() # Periodically sync with all the peers # Transactions for all active chains question = '''What is greater than God, more evil than the devil, the poor have it, the rich need it, and if you eat it, you'll die?''' actual_answer = "nothing" with open('uuids.json', 'r') as file: uuid_json = file.read() valid_ids = set(json.loads(uuid_json)) # @app.get("/wallet") # def wallet(): # log_ip(request, inspect.stack()[0][3]) # return template("wallet.html", message="", message_type="", pubkey=MY_WALLET.public_key) # @app.post("/wallet") # def wallet_post(): # log_ip(request, inspect.stack()[0][3]) # number = int(request.forms.get("number")) # message = "" # message_type = "info" # try: # receivers = [] # amounts = [] # total_amount = 0 # for i in range(0, number): # receiver = str(request.forms.get("port" + str(i))) # bounty = int(request.forms.get("amount" + str(i))) # publickey = "" # if len(receiver) < 10: # wallet = get_wallet_from_db(receiver) # if wallet is not None: # publickey = wallet[1] # else: # message = "Error with the Receiver Port ID, try again." # message_type = "danger" # return template("wallet.html", message=message, message_type=message_type, pubkey=MY_WALLET.public_key) # else: # publickey = receiver # total_amount += bounty # receivers.append(publickey) # amounts.append(bounty) # if check_balance(MY_WALLET.public_key) >= total_amount: # result = send_bounty(receivers, amounts) # if result: # message = "Your transaction is sent, please wait for it to be mined!" # else: # message = "Some Error Occured, Contact Admin." # message_type = "warning" # else: # message = "You have Insufficient Balance!" # message_type = "warning" # return template("wallet.html", message=message, message_type=message_type, pubkey=MY_WALLET.public_key) # except Exception as e: # logger.error(e) # message = "Some Error Occured. Please try again later." # message_type = "danger" # return template("wallet.html", message=message, message_type=message_type, pubkey=MY_WALLET.public_key) def render_block_header(hdr): html = "<table>" html += "<tr><th>" + "Height" + "</th>" html += "<td>" + str(hdr.height) + "</td></tr>" html += "<tr><th>" + "Block Hash" + "</th>" html += "<td>" + dhash(hdr) + "</td></tr>" html += "<tr><th>" + "Prev Block Hash" + "</th>" html += "<td>" + str(hdr.prev_block_hash) + "</td></tr>" html += "<tr><th>" + "Merkle Root" + "</th>" html += "<td>" + str(hdr.merkle_root) + "</td></tr>" html += "<tr><th>" + "Timestamp" + "</th>" html += ( "<td>" + str(datetime.fromtimestamp(hdr.timestamp).strftime("%d-%m-%Y %H:%M:%S")) + " (" + str(hdr.timestamp) + ")</td></tr>" ) # get block block = Block.from_json(get_block_from_db(dhash(hdr))).object() html += "<tr><th>" + "Transactions" + "</th>" html += "<td>" + str(len(block.transactions)) + "</td></tr>" # for i, transaction in enumerate(block.transactions): # s = "coinbase: " + str(transaction.is_coinbase) + ", fees: " + str(transaction.fees) # html += "<tr><th>Transaction " + str(i) + "</th><td>" + str(s) + "</td></tr>" html += "</table>" return str(html) if __name__ == "__main__": try: if consts.NEW_BLOCKCHAIN: logger.info("FullNode: Starting New Chain from Genesis") BLOCKCHAIN.add_block(genesis_block) else: # Restore Blockchain logger.info("FullNode: Restoring Existing Chain") header_list = read_header_list_from_db() BLOCKCHAIN.build_from_header_list(header_list) # Sync with all my peers sync_with_peers() # Start mining Thread Thread(target=start_mining_thread, daemon=True).start() if consts.NO_MINING: logger.info("FullNode: Not Mining") # Start server if LINE_PROFILING: from wsgi_lineprof.middleware import LineProfilerMiddleware with open("lineprof" + str(consts.MINER_SERVER_PORT) + ".log", "w") as f: app = LineProfilerMiddleware(app, stream=f, async_stream=True) waitress.serve(app, host="0.0.0.0", threads=16, port=consts.MINER_SERVER_PORT) else: waitress.serve(app, host="0.0.0.0", threads=16, port=consts.MINER_SERVER_PORT) except KeyboardInterrupt: miner.stop_mining()
[ 11748, 33918, 198, 11748, 640, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 11, 10854, 198, 6738, 4704, 278, 1330, 14122, 11, 5045, 263, 198, 6738, 19720, 1330, 4377, 11, 360, 7...
2.287451
2,550
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.python.framework import ops from collections import OrderedDict import warnings, logging from deepexplain.tf.v1_x import constants from deepexplain.tf.v1_x.baseClasses import GradientBasedMethod from deepexplain.tf.v1_x.methods import DeepLIFTRescale, EpsilonLRP from deepexplain.tf.v1_x.utils import original_grad from deepexplain.tf.v1_x.methods import DummyZero, Saliency, GradientXInput, IntegratedGradients, EpsilonLRP, DeepLIFTRescale, Occlusion, ShapleySampling attribution_methods = OrderedDict({ 'zero': (DummyZero, 0), 'saliency': (Saliency, 1), 'grad*input': (GradientXInput, 2), 'intgrad': (IntegratedGradients, 3), 'elrp': (EpsilonLRP, 4), 'deeplift': (DeepLIFTRescale, 5), 'occlusion': (Occlusion, 6), 'shapley_sampling': (ShapleySampling, 7) }) print(f'Using tf version = {tf.__version__}')
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 3...
2.737569
362
""" Get the memory usage of a Keras model. From https://stackoverflow.com/a/46216013. """ def get_model_memory_usage(batch_size, model): """ Get the memory usage of a Keras model in GB. From https://stackoverflow.com/a/46216013. """ import numpy as np try: from keras import backend as K except ImportError: from tensorflow.keras import backend as K shapes_mem_count = 0 internal_model_mem_count = 0 for l in model.layers: layer_type = l.__class__.__name__ if layer_type == 'Model': internal_model_mem_count += get_model_memory_usage(batch_size, l) single_layer_mem = 1 out_shape = l.output_shape if isinstance(out_shape, list): out_shape = out_shape[0] for s in out_shape: if s is None: continue single_layer_mem *= s shapes_mem_count += single_layer_mem trainable_count = np.sum([K.count_params(p) for p in model.trainable_weights]) non_trainable_count = np.sum([K.count_params(p) for p in model.non_trainable_weights]) number_size = 4.0 if K.floatx() == 'float16': number_size = 2.0 if K.floatx() == 'float64': number_size = 8.0 total_memory = number_size * (batch_size * shapes_mem_count + trainable_count + non_trainable_count) gbytes = np.round(total_memory / (1024.0 ** 3), 3) + internal_model_mem_count return gbytes
[ 37811, 198, 3855, 262, 4088, 8748, 286, 257, 17337, 292, 2746, 13, 198, 198, 4863, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 64, 14, 3510, 20666, 30273, 13, 198, 37811, 198, 198, 4299, 651, 62, 19849, 62, 31673, 62, 26060, 7, 435...
2.316375
629
import abc
[ 11748, 450, 66, 628 ]
3
4
import io import os from setuptools import setup def read(file_name): """Read a text file and return the content as a string.""" with io.open(os.path.join(os.path.dirname(__file__), file_name), encoding='utf-8') as f: return f.read() setup( name='recmetrics', url='https://github.com/statisticianinstilettos/recommender_metrics', author='Claire Longo', author_email='longoclaire@gmail.com', packages=['recmetrics'], install_requires=['funcsigs', 'numpy', 'pandas', 'plotly', 'scikit-learn', 'seaborn'], license='MIT', version='0.1.4', description='Evaluation metrics for recommender systems', long_description=read("README.md"), long_description_content_type="text/markdown", )
[ 11748, 33245, 198, 11748, 28686, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 4299, 1100, 7, 7753, 62, 3672, 2599, 198, 220, 220, 220, 37227, 5569, 257, 2420, 2393, 290, 1441, 262, 2695, 355, 257, 4731, 526, 15931, 198, 22...
2.37092
337
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """BERT finetuning runner.""" from __future__ import annotations, absolute_import import os from typing import Dict, List from transformers import ( AutoTokenizer, BertTokenizer, BertForSequenceClassification, BertConfig, Trainer, TrainingArguments, PreTrainedTokenizer ) from transformers.configuration_utils import PretrainedConfig from src.schema import ( InputExample, InputFeatures, Config ) from src.data_process import ( AgNewsDataProcessor ) from config import create_logger logger = create_logger() def convert_single_example( example_index: int, example: InputExample, label2id: Dict[str, int], max_seq_length: int, tokenizer: BertTokenizer ) -> InputFeatures: """Converts a single `InputExample` into a single `InputFeatures`. example_index: example """ parameters = { "text":example.text_a, "add_special_tokens":True, "padding":True, "max_length":max_seq_length, "return_attention_mask":True, "return_token_type_ids":True, "return_length":True, "verbose":True } if example.text_b: parameters['text_pair'] = example.text_b feature = tokenizer(**parameters) input_feature = InputFeatures( input_ids=feature['token_ids'], attention_mask=feature['attention_mask'], segment_ids=feature['token_type_ids'], label_id=label2id[example.label], is_real_example=True ) if example_index < 5: logger.info(f'*************************** Example {example_index} ***************************') logger.info(example) logger.info(input_feature) logger.info('*************************** Example End ***************************') return input_feature def create_model(config: Config): """Creates a classification model.""" models = { "bert-for-sequence-classification": create_bert_for_sequence_classification_model, } return models[config.model_name](config) def convert_examples_to_features( examples, label_list: List[str], max_seq_length: int, tokenizer: PreTrainedTokenizer ): """Convert a set of `InputExample`s to a list of `InputFeatures`.""" label2id = {label: index for index, label in enumerate(label_list)} features = [] for (ex_index, example) in enumerate(examples): if ex_index % 200 == 0: logger.info("Writing example %d of %d" % (ex_index, len(examples))) feature = convert_single_example(ex_index, example, label2id, max_seq_length, tokenizer) features.append(feature) return features if __name__ == "__main__": main()
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 3012, 9552, 15417, 4816, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393,...
2.758678
1,210
import sqlite3 import os import psycopg2 from dotenv import load_dotenv load_dotenv() DB_NAME2 = os.getenv("DB_NAME3") DB_USER2 = os.getenv("DB_USER3") DB_PASS2 = os.getenv("DB_PASS3") DB_HOST2 = os.getenv("DB_HOST3") conn = psycopg2.connect(dbname=DB_NAME2, user=DB_USER2, password=DB_PASS2, host=DB_HOST2) cursor = conn.cursor() sl_conn = sqlite3.connect("rpg_db.sqlite3") sl_cursor = sl_conn.cursor() characters = sl_cursor.execute('SELECT * FROM charactercreator_character LIMIT 10').fetchall() print(characters) create_character_table_query = ''' CREATE TABLE IF NOT EXISTS rpg_characters ( character_id SERIAL PRIMARY KEY, name VARCHAR(30), level INT, exp INT, hp INT, strength INT, intelligence INT, dexterity INT, wisdom INT ) ''' cursor.execute(create_character_table_query) conn.commit() for character in characters: insert_query = f''' INSERT INTO rpg_characters (character_id, name, level, exp, hp, strength, intelligence, dexterity, wisdom) VALUES {character} ''' cursor.execute(insert_query) conn.commit() cursor.close() conn.close()
[ 11748, 44161, 578, 18, 198, 11748, 28686, 198, 11748, 17331, 22163, 70, 17, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 198, 2220, 62, 26518, 24330, 3419, 198, 198, 11012, 62, 20608, 17, 796, 28686, 13, 1136, 24330, 7203...
2.320158
506
import battlefy_data import battlefy_wiki_linkings from datetime import datetime from operator import itemgetter from pathlib import Path import calcup_roster_tracking if __name__ == '__main__': main()
[ 11748, 3344, 24928, 62, 7890, 198, 11748, 3344, 24928, 62, 15466, 62, 8726, 654, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 2386, 25244, 62, 305...
3.188406
69
import pygame ##################### EJEMPLO DE USO ############################## # texto1 = Texto(screen, 'Hola', 10, 10) ##################### EJEMPLO DE USO ############################## # textarea1 = Textarea(screen, 'Hola mundo que tal estas hoy')
[ 11748, 12972, 6057, 198, 220, 220, 220, 220, 198, 198, 14468, 4242, 2, 412, 41, 3620, 6489, 46, 5550, 1294, 46, 1303, 14468, 7804, 4242, 2, 198, 2, 2420, 78, 16, 796, 8255, 78, 7, 9612, 11, 705, 39, 5708, 3256, 838, 11, 838, 8, ...
3.023256
86
# This is the code to train the xgboost model with cross-validation for each unique room in the dataset. # Models are dumped into ./models and results are dumped into two csv files in the current work directory. import argparse import json import math import os import pickle import warnings from typing import Tuple import numpy as np import pandas as pd import xgboost as xgb from hyperopt import fmin, tpe, hp, STATUS_OK, Trials from imblearn.over_sampling import SMOTE from numpy.random import RandomState from sklearn.metrics import r2_score, mean_squared_error from sklearn.model_selection import train_test_split from sklearn.utils import compute_sample_weight from tqdm import tqdm from xgboost import DMatrix, cv # Set up an argument parser to decide the metric function parser = argparse.ArgumentParser() parser.add_argument("--metric", choices=['R2', 'RMSE'], type=str, required=False, default='R2', help="The evaluation metric you want to use to train the XGBoost model") parser.add_argument("--log", choices=[0, 1, 100], type=int, required=False, default=0, help="Whether to print out the training progress") parser.add_argument("--SMOTE", choices=[0, 1], type=int, required=False, default=1, help="Whether use the SMOTE or not") parser.add_argument("--SMOGN", choices=[0, 1], type=int, required=False, default=0, help="Whether use the SMOGN or not") parser.add_argument("--SampleWeight", choices=[0, 1], type=int, required=False, default=0, help="Whether use the sample weight") args = parser.parse_args() # Ignore all the warnings and set pandas to display every column and row everytime we print a dataframe warnings.filterwarnings('ignore') pd.set_option('display.max_columns', None) pd.set_option('display.max_rows', None) assert args.SMOTE != args.SMOGN, "Can't use SMOTE and SMOGN at the same time!" # Load the data with a positive AC electricity consumption value, and drop the time data as we don't need them data = pd.read_csv("summer_data_compiled.csv", index_col=0) data = data[data.AC > 0].drop(['Time', 'Date', 'Hour'], axis=1).reset_index(drop=True) # Create some directory to store the models and future analysis figures. # log_folder_name = "Test_{}_{}".format(args.metric, datetime.now().strftime("%Y_%m_%d_%H_%M_%S")) log_folder_name = "Test_R2_HYPEROPT" log_folder_name = log_folder_name + "_SMOTE" if args.SMOTE else log_folder_name log_folder_name = log_folder_name + "_SMOGN" if args.SMOGN else log_folder_name log_folder_name = log_folder_name + "_SW" if args.SampleWeight else log_folder_name previous_parameter_folder = "Test_R2_HYPEROPT" assert log_folder_name != previous_parameter_folder, "Previous folder name exists" if not os.path.exists('./{}/'.format(log_folder_name)): os.mkdir('./{}'.format(log_folder_name)) os.mkdir('./{}/models/'.format(log_folder_name)) os.mkdir('./{}/trntst_models/'.format(log_folder_name)) # Define our evaluation functions eval_dict = {'RMSE': RMSE, 'R2': R2} print("Start Training The Models") # Create two dataframes to store the result during the training and after the training. error_csv = pd.DataFrame( columns=['room', 'train-{}-mean'.format(args.metric), 'train-{}-std'.format(args.metric), 'train-rmse-mean', 'train-rmse-std', 'test-{}-mean'.format(args.metric), 'test-{}-std'.format(args.metric), 'test-rmse-mean', 'test-rmse-std']) prediction_csv = pd.DataFrame(columns=['room', 'observation', 'prediction']) room_list = data['Location'].unique() # ranging through all the rooms and do the training and cross-validation for each room. for room in tqdm(room_list): seed = 2030 + room # Four rooms have low quality data and we delete them manually if room == 309 or room == 312 or room == 826 or room == 917 or room == 1001: continue # We extract the data of particular room and run the SMOTE algorithm on it. room_data = data[data.Location == room].drop(['Location'], axis=1).reset_index(drop=True) if args.SMOTE: # Label all the AC data by 0.75, all AC above 0.75 will be marked as 1, otherwise 0. Split into X and y room_data['SMOTE_split'] = (room_data['AC'] > 0.75).astype('int') X = room_data.drop(['SMOTE_split'], axis=1) y = room_data['SMOTE_split'] # Run the SMOTE algorithm and retrieve the result. model_smote = SMOTE(random_state=621, k_neighbors=3) room_data_smote, smote_split = model_smote.fit_resample(X, y) # concat the result from SMOTE and split the result into X and y for training. room_data_smote = pd.concat([room_data_smote, smote_split], axis=1) y = room_data_smote['AC'] X = room_data_smote.drop(['AC', 'SMOTE_split'], axis=1) elif args.SMOGN: if len(room_data) < 500: room_data['SMOTE_split'] = (room_data['AC'] > 0.75).astype('int') X = room_data.drop(['SMOTE_split'], axis=1) y = room_data['SMOTE_split'] # Run the SMOTE algorithm and retrieve the result. model_smote = SMOTE(random_state=621, k_neighbors=3) room_data_smote, smote_split = model_smote.fit_resample(X, y) # concat the result from SMOTE and split the result into X and y for training. room_data_smote = pd.concat([room_data_smote, smote_split], axis=1) y = room_data_smote['AC'] X = room_data_smote.drop(['AC', 'SMOTE_split'], axis=1) else: room_data = pd.read_csv('./SMOGN_processed/{}.csv'.format(room), index_col=0) y = room_data['AC'] X = room_data.drop(['AC'], axis=1) else: y = pd.DataFrame(room_data['AC'].fillna(method='pad')) X = room_data.drop(['AC'], axis=1).fillna(method='pad') if args.SampleWeight: class_sample = pd.cut(y, bins=15) weight = compute_sample_weight(class_weight="balanced", y=class_sample) X = X.to_numpy() # Build another full data matrix for the built-in cross validation function to work. data_matrix = DMatrix(data=X, label=y, weight=weight) if args.SampleWeight else DMatrix(data=X, label=y) # Cross_validation with hyper-parameter tuning space = {'max_depth': hp.quniform("max_depth", 3, 10, 1), 'learning_rate': hp.uniform("learning_rate", 0.1, 3), 'colsample_bytree': hp.uniform("colsample_bytree", 0.5, 1), 'min_child_weight': hp.quniform("min_child_weight", 1, 20, 1), 'reg_alpha': hp.quniform("reg_alpha", 0, 100, 1), 'reg_lambda': hp.uniform("reg_lambda", 0, 2), 'subsample': hp.uniform("subsample", 0.5, 1), 'min_split_loss': hp.uniform("min_split_loss", 0, 9)} if os.path.exists('./{}/models/{}_parameter.npy'.format(previous_parameter_folder, room)): best_param_dict = np.load('./{}/models/{}_parameter.npy'.format(previous_parameter_folder, room), allow_pickle=True).item() np.save('./{}/models/{}_parameter.npy'.format(log_folder_name, room), best_param_dict) else: trials = Trials() best_hyperparams = fmin(fn=fobjective, space=space, algo=tpe.suggest, max_evals=400, trials=trials, rstate=RandomState(seed)) # setup our training parameters and a model variable as model checkpoint best_param_dict = {'objective': 'reg:squarederror', 'max_depth': int(best_hyperparams['max_depth']), 'reg_alpha': best_hyperparams['reg_alpha'], 'reg_lambda': best_hyperparams['reg_lambda'], 'min_child_weight': best_hyperparams['min_child_weight'], 'colsample_bytree': best_hyperparams['colsample_bytree'], 'learning_rate': best_hyperparams['learning_rate'], 'subsample': best_hyperparams['subsample'], 'min_split_loss': best_hyperparams['min_split_loss']} np.save('./{}/models/{}_parameter.npy'.format(log_folder_name, room), best_param_dict) # Use the built-in cv function to do the cross validation, still with ten folds, this will return us the results. xgb_cv_result = cv(dtrain=data_matrix, params=best_param_dict, nfold=5, early_stopping_rounds=30, as_pandas=True, num_boost_round=200, seed=seed, shuffle=True, feval=eval_dict[args.metric], maximize=True) xgb_cv_result['room'] = room error_csv.loc[len(error_csv)] = xgb_cv_result.loc[len(xgb_cv_result) - 1] # Use one training_testing for ploting, and save both ground truth and prediction value into the dataframe X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=seed) d_train = DMatrix(X_train, label=y_train) d_test = DMatrix(X_test, label=y_test) watchlist = [(d_test, 'eval'), (d_train, 'train')] xgb_model_train_test = xgb.train(params=best_param_dict, dtrain=d_train, num_boost_round=200, evals=watchlist, verbose_eval=args.log, xgb_model=None, feval=eval_dict[args.metric], maximize=True) prediction = np.array(xgb_model_train_test.predict(d_test)).tolist() real = np.array(y_test).tolist() prediction_csv.loc[len(prediction_csv)] = {'room': room, 'observation': json.dumps(real), 'prediction': json.dumps(prediction)} # Dump the error dataframes into csv files. error_csv.to_csv('./{}/error.csv'.format(log_folder_name), index=False) prediction_csv.to_csv('./{}/prediction.csv'.format(log_folder_name), index=False) # Develop a model using the whole orignial dataset, and save the model xgb_model_full = xgb.train(params=best_param_dict, dtrain=data_matrix, num_boost_round=200, evals=watchlist, verbose_eval=args.log, xgb_model=None, feval=eval_dict[args.metric], maximize=True) # Save all the models we trained for future use pickle.dump(xgb_model_train_test, open('./{}/trntst_models/{}.pickle.bat'.format(log_folder_name, room), 'wb')) pickle.dump(xgb_model_full, open('./{}/models/{}.pickle.bat'.format(log_folder_name, room), 'wb')) print("Training finished!")
[ 2, 770, 318, 262, 2438, 284, 4512, 262, 2124, 70, 39521, 2746, 351, 3272, 12, 12102, 341, 329, 1123, 3748, 2119, 287, 262, 27039, 13, 198, 2, 32329, 389, 24105, 656, 24457, 27530, 290, 2482, 389, 24105, 656, 734, 269, 21370, 3696, 2...
2.416745
4,264
import os from setuptools import setup # Read the version g = {} with open(os.path.join("editorconfig", "version.py"), "rt") as fp: exec(fp.read(), g) v = g['VERSION'] version = ".".join(str(x) for x in v[:3]) if v[3] != "final": version += "-" + v[3] setup( name='EditorConfig', version=version, author='EditorConfig Team', packages=['editorconfig'], url='http://editorconfig.org/', license='python', description='EditorConfig File Locator and Interpreter for Python', long_description=open('README.rst').read(), entry_points = { 'console_scripts': [ 'editorconfig = editorconfig.__main__:main', ] }, classifiers=[ 'License :: OSI Approved :: Python Software Foundation License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: Implementation :: PyPy', ], )
[ 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 2, 4149, 262, 2196, 198, 70, 796, 23884, 198, 4480, 1280, 7, 418, 13, 6978, 13, 22179, 7203, 35352, 11250, 1600, 366, 9641, 13, 9078, 12340, 366, 17034, 4943, 355, 277,...
2.591182
499
import numpy as np import matplotlib.pyplot as plt t = np.arange(0,375,6.5) # MEM_1 = [0.031, 0.034, 0.034, 0.034, 0.031, 0.034, 0.034, 0.034, 0.031, 0.033, 0.035, 0.034, 0.031, 0.033, 0.034, 0.034, 0.031, 0.033, 0.034, 0.034, 0.031, 0.033, 0.034, 0.034, 0.031, 0.033, 0.034, 0.034, 0.031, 0.031, 0.031, 0.031, 0.031, 0.031] # MEM_2 = [0.031, 0.033, 0.045, 0.054, 0.057, 0.068, 0.068, 0.066, 0.071, 0.071, 0.077, 0.079, 0.089, 0.083, 0.079, 0.073, 0.07, 0.076, 0.076, 0.083, 0.086, 0.083, 0.078, 0.074, 0.071, 0.073, 0.073, 0.073, 0.071, 0.071, 0.071, 0.071, 0.071, 0.071] # MEM_3 = [0.032, 0.034, 0.049, 0.073, 0.082, 0.099, 0.121, 0.132, 0.133, 0.123, 0.109, 0.111, 0.114, 0.114, 0.116, 0.132, 0.148, 0.139, 0.13, 0.116, 0.112, 0.113, 0.114, 0.114, 0.112, 0.112, 0.112, 0.112, 0.112, 0.112, 0.112, 0.112, 0.112, 0.112] # MEM_4 = [0.032, 0.035, 0.05, 0.073, 0.105, 0.126, 0.149, 0.17, 0.176, 0.18, 0.171, 0.151, 0.145, 0.152, 0.153, 0.166, 0.177, 0.173, 0.166, 0.152, 0.152, 0.148, 0.148, 0.148, 0.148, 0.148, 0.148, 0.148, 0.148, 0.148, 0.148, 0.148, 0.148, 0.148] # MEM_5 = [0.032, 0.034, 0.049, 0.068, 0.106, 0.141, 0.166, 0.194, 0.221, 0.238, 0.235, 0.213, 0.185, 0.185, 0.189, 0.193, 0.197, 0.2, 0.201, 0.201, 0.197, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.190, 0.190, 0.190] # MEM_6 = [0.032, 0.034, 0.049, 0.069, 0.102, 0.133, 0.179, 0.193, 0.233, 0.264, 0.299, 0.297, 0.279, 0.237, 0.226, 0.226, 0.228, 0.231, 0.232, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23] # MEM_7 = [0.03, 0.032, 0.047, 0.066, 0.098, 0.131, 0.169, 0.219, 0.234, 0.281, 0.314, 0.344, 0.337, 0.318, 0.271, 0.264, 0.263, 0.264, 0.265, 0.266, 0.267, 0.267, 0.267, 0.267, 0.267, 0.267, 0.267, 0.267, 0.267, 0.267, 0.267, 0.267, 0.267, 0.267] MEM_1 = [0.038, 0.039, 0.04, 0.042, 0.047, 0.048, 0.05, 0.044, 0.038, 0.038, 0.039, 0.044, 0.048, 0.048, 0.048, 0.038, 0.041, 0.041, 0.047, 0.051, 0.049, 0.047, 0.038, 0.04, 0.04, 0.046, 0.052, 0.049, 0.045, 0.038, 0.038, 0.038, 0.043, 0.048, 0.048, 0.048, 0.04, 0.038, 0.04, 0.039, 0.046, 0.05, 0.049, 0.045, 0.039, 0.039, 0.042, 0.042, 0.048, 0.052, 0.05, 0.047, 0.041, 0.039, 0.039, 0.039, 0.039, 0.039] MEM_2 = [0.041, 0.049, 0.056, 0.064, 0.084, 0.091, 0.096, 0.088, 0.081, 0.076, 0.076, 0.078, 0.088, 0.102, 0.103, 0.094, 0.085, 0.076, 0.077, 0.084, 0.093, 0.097, 0.092, 0.082, 0.076, 0.076, 0.079, 0.085, 0.092, 0.088, 0.085, 0.076, 0.076, 0.076, 0.077, 0.077, 0.077, 0.076, 0.077, 0.077, 0.077, 0.076, 0.077, 0.077, 0.077, 0.076, 0.077, 0.077, 0.077, 0.076, 0.077, 0.077, 0.077, 0.076, 0.077, 0.077, 0.077, 0.077] MEM_3 = [0.077, 0.077, 0.086, 0.091, 0.108, 0.129, 0.137, 0.14, 0.126, 0.121, 0.117, 0.115, 0.125, 0.139, 0.142, 0.143, 0.126, 0.122, 0.115, 0.114, 0.118, 0.122, 0.122, 0.118, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113, 0.113] MEM_4 = [0.117, 0.117, 0.128, 0.141, 0.162, 0.191, 0.19, 0.189, 0.166, 0.16, 0.155, 0.158, 0.169, 0.182, 0.178, 0.174, 0.159, 0.156, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153, 0.153] MEM_5 = [0.154, 0.154, 0.166, 0.173, 0.195, 0.227, 0.232, 0.239, 0.207, 0.197, 0.195, 0.194, 0.205, 0.21, 0.209, 0.198, 0.191, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188, 0.188] MEM_6 = [0.179, 0.179, 0.195, 0.203, 0.231, 0.267, 0.269, 0.266, 0.238, 0.222, 0.218, 0.214, 0.22, 0.227, 0.226, 0.223, 0.218, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214] MEM_7 = [0.204, 0.205, 0.226, 0.23, 0.251, 0.302, 0.327, 0.32, 0.305, 0.273, 0.257, 0.256, 0.256, 0.257, 0.257, 0.258, 0.256, 0.256, 0.257, 0.257, 0.258, 0.256, 0.256, 0.257, 0.257, 0.258, 0.256, 0.256, 0.257, 0.257, 0.258, 0.256, 0.256, 0.257, 0.257, 0.258, 0.256, 0.256, 0.257, 0.257, 0.258, 0.256, 0.256, 0.257, 0.257, 0.258, 0.256, 0.256, 0.257, 0.257, 0.258, 0.256, 0.256, 0.257, 0.257, 0.258, 0.257, 0.257] font1 = { 'family' : 'Times New Roman', 'weight' : 'normal', 'size' : 28, } font2 = { 'family' : 'Times New Roman', 'weight' : 'normal', 'size' : 20, } plt.title('processing Memory% Analysis',font1) l1, = plt.plot(t,MEM_1,color='green',marker="o",label='1 hadoop group') l2, = plt.plot(t,MEM_2,color='darkorange',marker="o",label='2 hadoop group') l3, = plt.plot(t,MEM_3,color='yellow',marker="o",label='3 hadoop group') l4, = plt.plot(t,MEM_4,color='greenyellow',marker="o",label='4 hadoop group') l5, = plt.plot(t,MEM_5,color='springgreen',marker="o",label='5 hadoop group') l6, = plt.plot(t,MEM_6,color='darkslategrey',marker="o",label='6 hadoop group') l7, = plt.plot(t,MEM_7,color='red',marker="o",label='7 hadoop group') #l2, = plt.plot(x2,multi,color='red',label='multi hadoop group') # color: darkorange lightcoral darkgoldenrod yellow greenyellow springgreen darkslategrey deepskyblue fushsia blue x_ticks = np.arange(0,380,30) y_ticks = np.arange(0,0.6,0.1) plt.legend(handles=[l1,l2,l3,l4,l5,l6,l7],labels=['1-hadoop-group-MEM','2-hadoop-group-MEM','3-hadoop-group-MEM','4-hadoop-group-MEM','5-hadoop-group-MEM','6-hadoop-group-MEM','7-hadoop-group-MEM'],loc="best") plt.xlabel('time unit(seconds)',font2) plt.ylabel('hadoop occupy MEM unit(% 62G)',font2) plt.xticks(x_ticks) plt.yticks(y_ticks) #plt.savefig('.MEM%.png') plt.show()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 83, 796, 45941, 13, 283, 858, 7, 15, 11, 22318, 11, 21, 13, 20, 8, 198, 2, 35153, 62, 16, 796, 685, 15, 13, 43637, 11, 657, ...
1.748768
3,451
import re import munge def parse_interval(val): """ converts a string to float of seconds .5 = 500ms 90 = 1m30s **Arguments** - val (`str`) """ re_intv = re.compile(r"([\d\.]+)([a-zA-Z]+)") val = val.strip() total = 0.0 for match in re_intv.findall(val): unit = match[1] count = float(match[0]) if unit == "s": total += count elif unit == "m": total += count * 60 elif unit == "ms": total += count / 1000 elif unit == "h": total += count * 3600 elif unit == "d": total += count * 86400 else: raise ValueError("unknown unit from interval string '%s'" % val) return total
[ 11748, 302, 198, 198, 11748, 29856, 469, 628, 198, 4299, 21136, 62, 3849, 2100, 7, 2100, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 26161, 257, 4731, 284, 12178, 286, 4201, 198, 220, 220, 220, 220, 220, 220, 220, 764, 20, ...
1.981959
388
# -*- coding: utf-8 -*- """Tests for sktime annotators.""" import pandas as pd import pytest from sktime.registry import all_estimators from sktime.utils._testing.estimator_checks import _make_args ALL_ANNOTATORS = all_estimators(estimator_types="series-annotator", return_names=False)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 51, 3558, 329, 1341, 2435, 24708, 2024, 526, 15931, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 9288, 198, 198, 6738, 1341, 2435, 13, 2301, 4592...
2.843137
102
picamera import PiCamera from time import sleep import boto3 import os.path import subprocess s3 = boto3.client('s3') bucket = 'cambucket21' camera = PiCamera() #camera.resolution(1920,1080) x = 0 camerafile = x while True: if (x == 6): x = 1 else: x = x + 1 camera.start_preview() camera.start_recording('/home/pi/' + str(x) + '.h264') sleep(2) camera.stop_recording() camera.stop_preview() subprocess.Popen("MP4Box -add " + str(x) + ".h264 " + str(x) +".mp4", shell=True) sleep(1) s3.upload_file('/home/pi/' + str(x) + '.mp4',bucket,'/home/pi/' + str(x) + '.mp4')
[ 16564, 18144, 1330, 13993, 35632, 198, 6738, 640, 1330, 3993, 198, 11748, 275, 2069, 18, 198, 11748, 28686, 13, 6978, 198, 11748, 850, 14681, 198, 82, 18, 796, 275, 2069, 18, 13, 16366, 10786, 82, 18, 11537, 198, 27041, 316, 796, 705,...
2.370833
240
from datetime import datetime if __name__ == "__main__": run_example()
[ 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1057, 62, 20688, 3419, 198 ]
2.785714
28
#!/usr/bin/env python from __future__ import print_function from kaldi.segmentation import NnetSAD, SegmentationProcessor from kaldi.nnet3 import NnetSimpleComputationOptions from kaldi.util.table import SequentialMatrixReader # Construct SAD model = NnetSAD.read_model("final.raw") post = NnetSAD.read_average_posteriors("post_output.vec") transform = NnetSAD.make_sad_transform(post) graph = NnetSAD.make_sad_graph() decodable_opts = NnetSimpleComputationOptions() decodable_opts.extra_left_context = 79 decodable_opts.extra_right_context = 21 decodable_opts.extra_left_context_initial = 0 decodable_opts.extra_right_context_final = 0 decodable_opts.frames_per_chunk = 150 decodable_opts.acoustic_scale = 0.3 sad = NnetSAD(model, transform, graph, decodable_opts=decodable_opts) seg = SegmentationProcessor(target_labels=[2]) # Define feature pipeline as a Kaldi rspecifier feats_rspec = "ark:compute-mfcc-feats --config=mfcc.conf scp:wav.scp ark:- |" # Segment with SequentialMatrixReader(feats_rspec) as f, open ("segments", "w") as s: for key, feats in f: out = sad.segment(feats) segments, stats = seg.process(out["alignment"]) seg.write(key, segments, s) print("segments:", segments, flush=True) print("stats:", stats, flush=True) print("global stats:", seg.stats, flush=True)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 6738, 479, 37566, 13, 325, 5154, 341, 1330, 399, 3262, 50, 2885, 11, 1001, 5154, 341, 18709, 273, 198, 6738, 479, 37566, ...
2.598441
513
from cProfile import label from matplotlib.pyplot import text import pandas as pd import numpy as np from tokenizers import Tokenizer import torch from torch.utils.data import Dataset, DataLoader from typing import Dict, Any, Tuple from datasets import load_dataset
[ 6738, 269, 37046, 1330, 6167, 198, 6738, 2603, 29487, 8019, 13, 9078, 29487, 1330, 2420, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11241, 11341, 1330, 29130, 7509, 198, 11748, 28034, 198, 6738, ...
3.613333
75
#!/usr/bin/python # mp4museum.org by julius schmiedel 2019 import os import sys import glob from subprocess import Popen, PIPE import RPi.GPIO as GPIO FNULL = open(os.devnull, "w") # setup GPIO pin GPIO.setmode(GPIO.BOARD) GPIO.setup(11, GPIO.IN, pull_up_down = GPIO.PUD_DOWN) GPIO.setup(13, GPIO.IN, pull_up_down = GPIO.PUD_DOWN) # functions to be called by event listener # add event listener GPIO.add_event_detect(11, GPIO.FALLING, callback = buttonPause, bouncetime = 234) GPIO.add_event_detect(13, GPIO.FALLING, callback = buttonNext, bouncetime = 1234) # please do not remove my logo screen player = Popen(['omxplayer', '--adev', 'both', '/home/pi/mp4museum.mp4'],stdin=PIPE,stdout=FNULL) player.wait() # the loop while(1): for files in sorted(glob.glob(r'/media/*/*.mp4')): player = Popen(['omxplayer','--adev', 'both',files],stdin=PIPE,stdout=FNULL) player.wait()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 29034, 19, 76, 6744, 13, 2398, 416, 474, 377, 3754, 5513, 76, 798, 417, 13130, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 15095, 198, 6738, 850, 14681, 1330, 8099, 268, ...
2.507082
353
""" Comparison between the efficiency of the Boyer-Moore algorithm and the naive substring search algorithm. The runtimes for both algorithms are plotted on the same axes. """ import matplotlib.pyplot as plt import numpy as np import string import time import random from bm_alg import boyer_moore_match, naive_match # number of test cases for each iteration TEST_CASES = 100 # test cases generated based on this pattern (vary_n) PATTERN = 'ICT1002 is a really great module!' # test cases generated based on this text (vary_m) TEXT = PATTERN * 50 def generate_test_cases(pattern, length, k): """ Generates <k> test cases with text of length <length> containing <pattern> Args: pattern (str): A pattern within the text. length (int): The length of the pattern k (int): The number of test cases Returns: A list of test cases, i.e. strings that contain <pattern> """ result = [] for _ in range(k): text = pattern while len(text) < length: direction = random.choice((0, 1)) # 0 --> Left if direction == 0: text = random.choice(string.ascii_lowercase) + text # 1 --> Right else: text = text + random.choice(string.ascii_lowercase) result.append(text) return result if __name__ == '__main__': main()
[ 37811, 198, 50249, 1653, 1022, 262, 9332, 286, 262, 6387, 263, 12, 40049, 11862, 290, 262, 24354, 3293, 1806, 2989, 11862, 13, 198, 464, 1057, 22355, 329, 1111, 16113, 389, 37515, 319, 262, 976, 34197, 13, 198, 37811, 198, 198, 11748, ...
2.62782
532
ans = dict() pairs = dict() n = int(input()) for i in range(0, n-1): child, parent = input().split() if parent in pairs: pairs[parent].append(child) else: pairs[parent] = [child] if n > 0: for k in pairs: create_tree(k) for key in sorted(ans.keys()): print(key, ans[key])
[ 504, 796, 8633, 3419, 198, 79, 3468, 796, 8633, 3419, 198, 77, 796, 493, 7, 15414, 28955, 198, 1640, 1312, 287, 2837, 7, 15, 11, 299, 12, 16, 2599, 198, 220, 220, 220, 1200, 11, 2560, 796, 5128, 22446, 35312, 3419, 198, 220, 220, ...
2.197279
147
if __name__ == "__main__": main()
[ 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.157895
19
import json from typing import Type, TYPE_CHECKING from django.core.exceptions import ObjectDoesNotExist from django.utils.decorators import method_decorator from django.views.decorators.cache import cache_page from rest_framework import viewsets, filters from rest_framework.exceptions import NotFound from rest_framework.negotiation import BaseContentNegotiation from rest_framework.permissions import IsAuthenticatedOrReadOnly, AllowAny from rest_framework.request import Request from rest_framework.response import Response from rest_framework.views import APIView from indicators.models import Variable, DataViz from indicators.utils import get_geog_model from indicators.views import GeoJSONRenderer from maps.models import DataLayer from maps.serializers import DataLayerSerializer, DataLayerDetailsSerializer from profiles.settings import VIEW_CACHE_TTL if TYPE_CHECKING: from geo.models import AdminRegion from indicators.models.viz import MiniMap
[ 11748, 33918, 198, 6738, 19720, 1330, 5994, 11, 41876, 62, 50084, 2751, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 273, 2024, 1330, 2446, 6...
3.884
250
from magma import _BitType, BitType, BitsType, UIntType, SIntType def raise_mantle_import_error_unary(self): raise MantleImportError( "Operators are not defined until mantle has been imported") def raise_mantle_import_error_binary(self, other): raise MantleImportError( "Operators are not defined until mantle has been imported") def define_raise_undefined_operator_error(type_str, operator, type_): if type_ == "unary": else: assert type_ == "binary" return wrapped for op in ("__eq__", "__ne__"): setattr(_BitType, op, raise_mantle_import_error_binary) for op in ( "__and__", "__or__", "__xor__", "__invert__", "__add__", "__sub__", "__mul__", "__div__", "__lt__", # __le__ skipped because it's used for assignment on inputs # "__le__", "__gt__", "__ge__" ): if op == "__invert__": setattr(_BitType, op, define_raise_undefined_operator_error("_BitType", op, "unary")) else: setattr( _BitType, op, define_raise_undefined_operator_error("_BitType", op, "binary")) for op in ("__and__", "__or__", "__xor__", "__invert__" ): if op == "__invert__": setattr(BitType, op, raise_mantle_import_error_unary) else: setattr(BitType, op, raise_mantle_import_error_binary) for op in ("__and__", "__or__", "__xor__", "__invert__", "__lshift__", "__rshift__", ): if op == "__invert__": setattr(BitsType, op, raise_mantle_import_error_unary) else: setattr(BitsType, op, raise_mantle_import_error_binary) for op in ("__add__", "__sub__", "__mul__", "__div__", "__lt__", # __le__ skipped because it's used for assignment on inputs # "__le__", "__gt__", "__ge__" ): setattr(BitsType, op, define_raise_undefined_operator_error("BitsType", op, "binary")) for op in ("__add__", "__sub__", "__mul__", "__div__", "__lt__", # __le__ skipped because it's used for assignment on inputs # "__le__", "__gt__", "__ge__" ): setattr(SIntType, op, raise_mantle_import_error_binary) setattr(UIntType, op, raise_mantle_import_error_binary)
[ 6738, 2153, 2611, 1330, 4808, 13128, 6030, 11, 4722, 6030, 11, 44733, 6030, 11, 471, 5317, 6030, 11, 311, 5317, 6030, 628, 628, 198, 4299, 5298, 62, 76, 16941, 62, 11748, 62, 18224, 62, 403, 560, 7, 944, 2599, 198, 220, 220, 220, ...
1.929429
1,332
import subprocess import sys import time import traceback from queue import Queue from sultan.core import Base from sultan.echo import Echo from threading import Thread def print_stdout(self, always_print=False): """ Prints the stdout to console - if there is any stdout, otherwise does nothing. :param always_print: print the stdout, even if there is nothing in the buffer (default: false) """ if self.__stdout or always_print: self.__echo.info("---------------" + "-" * 100) self.__format_lines_info(self.stdout) self.__echo.info("---------------" + "-" * 100) def print_stderr(self, always_print=False): """ Prints the stderr to console - if there is any stdout, otherwise does nothing. :param always_print: print the stderr, even if there is nothing in the buffer (default: false) """ if self.__stderr or always_print: self.__echo.critical("--{ STDERR }---" + "-" * 100) self.__format_lines_error(self.stderr) self.__echo.critical("---------------" + "-" * 100) def print_traceback(self, always_print=False): """ Prints the traceback to console - if there is any traceback, otherwise does nothing. :param always_print: print the traceback, even if there is nothing in the buffer (default: false) """ if self._exception or always_print: self.__echo.critical("--{ TRACEBACK }" + "-" * 100) self.__format_lines_error(self.traceback) self.__echo.critical("---------------" + "-" * 100)
[ 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 12854, 1891, 198, 198, 6738, 16834, 1330, 4670, 518, 198, 6738, 264, 30454, 13, 7295, 1330, 7308, 198, 6738, 264, 30454, 13, 30328, 1330, 21455, 198, 6738, 4704, 278, 13...
2.534056
646
import os import click from .util import cli_message from great_expectations.render import DefaultJinjaPageView from great_expectations.version import __version__ as __version__ msg_prompt_choose_data_source = """ Configure a datasource: 1. Pandas DataFrame 2. Relational database (SQL) 3. Spark DataFrame 4. Skip datasource configuration """ # msg_prompt_dbt_choose_profile = """ # Please specify the name of the dbt profile (from your ~/.dbt/profiles.yml file Great Expectations \ # should use to connect to the database # """ # msg_dbt_go_to_notebook = """ # To create expectations for your dbt models start Jupyter and open notebook # great_expectations/notebooks/using_great_expectations_with_dbt.ipynb - # it will walk you through next steps. # """ msg_prompt_filesys_enter_base_path = """ Enter the path of the root directory where the data files are stored. (The path may be either absolute or relative to current directory.) """ msg_prompt_datasource_name = """ Give your new data source a short name. """ msg_sqlalchemy_config_connection = """ Great Expectations relies on sqlalchemy to connect to relational databases. Please make sure that you have it installed. Next, we will configure database credentials and store them in the "{0:s}" section of this config file: great_expectations/uncommitted/credentials/profiles.yml: """ msg_unknown_data_source = """ We are looking for more types of data types to support. Please create a GitHub issue here: https://github.com/great-expectations/great_expectations/issues/new In the meantime you can see what Great Expectations can do on CSV files. To create expectations for your CSV files start Jupyter and open notebook great_expectations/notebooks/using_great_expectations_with_pandas.ipynb - it will walk you through configuring the database connection and next steps. """ msg_filesys_go_to_notebook = """ To create expectations for your data, start Jupyter and open a tutorial notebook: To launch with jupyter notebooks: <green>jupyter notebook great_expectations/notebooks/create_expectations.ipynb</green> To launch with jupyter lab: <green>jupyter lab great_expectations/notebooks/create_expectations.ipynb</green> """ msg_sqlalchemy_go_to_notebook = """ To create expectations for your data start Jupyter and open the notebook that will walk you through next steps. To launch with jupyter notebooks: <green>jupyter notebook great_expectations/notebooks/create_expectations.ipynb</green> To launch with jupyter lab: <green>jupyter lab great_expectations/notebooks/create_expectations.ipynb</green> """ msg_spark_go_to_notebook = """ To create expectations for your data start Jupyter and open the notebook that will walk you through next steps. To launch with jupyter notebooks: <green>jupyter notebook great_expectations/notebooks/create_expectations.ipynb</green> To launch with jupyter lab: <green>jupyter lab great_expectations/notebooks/create_expectations.ipynb</green> """
[ 11748, 28686, 198, 11748, 3904, 198, 198, 6738, 764, 22602, 1330, 537, 72, 62, 20500, 198, 6738, 1049, 62, 1069, 806, 602, 13, 13287, 1330, 15161, 41, 259, 6592, 9876, 7680, 198, 6738, 1049, 62, 1069, 806, 602, 13, 9641, 1330, 11593, ...
3.210638
940
# -*- coding: utf-8 -*- """ Provide download function by request """ from datetime import datetime import logging import time import urllib.parse import requests from bs4 import BeautifulSoup
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 37811, 201, 198, 15946, 485, 4321, 2163, 416, 2581, 201, 198, 37811, 201, 198, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 11748, 18931, 201, ...
2.753247
77
#!/usr/bin/python s = Solution() print s.reverseWords('a x')
[ 2, 48443, 14629, 14, 8800, 14, 29412, 628, 198, 198, 82, 796, 28186, 3419, 198, 4798, 264, 13, 50188, 37117, 10786, 64, 2124, 11537, 628 ]
2.6
25
# -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (C) 2017 Marcos Pereira <marcospereira.mpj@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. try: from urllib.parse import urljoin except ImportError: from urlparse import urljoin import requests from requests.adapters import HTTPAdapter from .exceptions import KeycloakConnectionError def clean_headers(self): """Clear header parameters.""" self.headers = {} def exist_param_headers(self, key): """Check if the parameter exists in the header. :param key: (str) Header parameters key. :returns: If the header parameters exist, return True. """ return self.param_headers(key) is not None def add_param_headers(self, key, value): """Add a single parameter inside the header. :param key: (str) Header parameters key. :param value: (str) Value to be added. """ self.headers[key] = value def del_param_headers(self, key): """Remove a specific parameter. :param key: (str) Key of the header parameters. """ self.headers.pop(key, None) def raw_get(self, path, **kwargs): """Submit get request to the path. :param path: (str) Path for request. :returns: Response the request. :raises: HttpError Can't connect to server. """ try: return self._s.get( urljoin(self.base_url, path), params=kwargs, headers=self.headers, timeout=self.timeout, verify=self.verify, ) except Exception as e: raise KeycloakConnectionError("Can't connect to server (%s)" % e) def raw_post(self, path, data, **kwargs): """Submit post request to the path. :param path: (str) Path for request. :param data: (dict) Payload for request. :returns: Response the request. :raises: HttpError Can't connect to server. """ try: return self._s.post( urljoin(self.base_url, path), params=kwargs, data=data, headers=self.headers, timeout=self.timeout, verify=self.verify, ) except Exception as e: raise KeycloakConnectionError("Can't connect to server (%s)" % e) def raw_put(self, path, data, **kwargs): """Submit put request to the path. :param path: (str) Path for request. :param data: (dict) Payload for request. :returns: Response the request. :raises: HttpError Can't connect to server. """ try: return self._s.put( urljoin(self.base_url, path), params=kwargs, data=data, headers=self.headers, timeout=self.timeout, verify=self.verify, ) except Exception as e: raise KeycloakConnectionError("Can't connect to server (%s)" % e) def raw_delete(self, path, data={}, **kwargs): """Submit delete request to the path. :param path: (str) Path for request. :param data: (dict) Payload for request. :returns: Response the request. :raises: HttpError Can't connect to server. """ try: return self._s.delete( urljoin(self.base_url, path), params=kwargs, data=data, headers=self.headers, timeout=self.timeout, verify=self.verify, ) except Exception as e: raise KeycloakConnectionError("Can't connect to server (%s)" % e)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 34, 8, 2177, 37033, 17229, 8704, 1279, 3876, 6966, 431, 260, 8704, 13, 3149, 73, 31, 14816, ...
2.382704
2,012
#!venv/bin/python3 cs = [int(c) for c in open("inputs/23.in", "r").readline().strip()] print("Part 1:", f(cs.copy(), 100)[0]) print("Part 2:", f(cs.copy() + [i for i in range(10, 1000001)], 10000000)[1])
[ 2, 0, 574, 85, 14, 8800, 14, 29412, 18, 198, 6359, 796, 685, 600, 7, 66, 8, 329, 269, 287, 1280, 7203, 15414, 82, 14, 1954, 13, 259, 1600, 366, 81, 11074, 961, 1370, 22446, 36311, 3419, 60, 198, 198, 4798, 7203, 7841, 352, 25, ...
2.318182
88
# Import the application from device_registry import app # Run the application in debug mode app.run(host='0.0.0.0', port=int(app.config['PORT']), debug=True)
[ 2, 17267, 262, 3586, 198, 6738, 3335, 62, 2301, 4592, 1330, 598, 198, 198, 2, 5660, 262, 3586, 287, 14257, 4235, 198, 1324, 13, 5143, 7, 4774, 11639, 15, 13, 15, 13, 15, 13, 15, 3256, 2493, 28, 600, 7, 1324, 13, 11250, 17816, 15...
3.076923
52
import yaml from ruamel.yaml import YAML from ruamel.yaml.error import YAMLError try: from yaml import CSafeLoader as SafeLoader except ImportError: from yaml import SafeLoader from dvc.exceptions import StageFileCorruptedError from dvc.utils.compat import open def parse_stage_for_update(text, path): """Parses text into Python structure. Unlike `parse_stage()` this returns ordered dicts, values have special attributes to store comments and line breaks. This allows us to preserve all of those upon dump. This one is, however, several times slower than simple `parse_stage()`. """ try: yaml = YAML() return yaml.load(text) or {} except YAMLError as exc: raise StageFileCorruptedError(path, cause=exc)
[ 11748, 331, 43695, 198, 6738, 7422, 17983, 13, 88, 43695, 1330, 575, 2390, 43, 198, 6738, 7422, 17983, 13, 88, 43695, 13, 18224, 1330, 575, 2390, 2538, 81, 1472, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 331, 43695, 1330, 9429, ...
2.954373
263
entrada = input("palabra") listaDeLetras = [] for i in entrada: listaDeLetras.append(i)
[ 298, 81, 4763, 796, 5128, 7203, 18596, 397, 430, 4943, 198, 4868, 64, 5005, 5756, 8847, 796, 17635, 198, 1640, 1312, 287, 24481, 4763, 25, 198, 220, 220, 220, 1351, 64, 5005, 5756, 8847, 13, 33295, 7, 72, 8, 628 ]
2.325
40
import numpy as np from pyad.nn import NeuralNet from sklearn.datasets import load_breast_cancer from sklearn.model_selection import train_test_split np.random.seed(0) data = load_breast_cancer() X_train, X_test, y_train, y_test = train_test_split( data.data, data.target, train_size=0.8, random_state=0 ) nn = NeuralNet(loss_fn='cross_entropy') nn.add_layer(X_train.shape[1], 100, activation='linear') nn.add_layer(100, 100, activation='logistic') nn.add_layer(100, 1 + np.max(y_train), activation='linear') nn.train( X_train, y_train, X_test, y_test, batch_size=1, learning_rate=1e-3, epochs=20 ) print('Predictions:', nn.predict(X_test))
[ 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 324, 13, 20471, 1330, 47986, 7934, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 3440, 62, 4679, 459, 62, 48870, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, ...
2.534615
260
from microbit import * I2CADR = 0x0E DIE_TEMP = 0x0F while True: i2c.write(I2CADR, bytearray([DIE_TEMP])) d = i2c.read(I2CADR, 1) x = d[0] if x >=128: x -= 256 x += 10 print(x) sleep(500)
[ 6738, 4580, 2545, 1330, 1635, 198, 198, 40, 17, 34, 2885, 49, 796, 657, 87, 15, 36, 198, 35, 10008, 62, 51, 39494, 220, 796, 657, 87, 15, 37, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 1312, 17, 66, 13, 13564, 7, 40, 17, ...
1.674074
135
import ssl import nltk from textblob import TextBlob from nltk.corpus import stopwords # set SSL try: _create_unverified_https_context = ssl._create_unverified_context except AttributeError: pass else: ssl._create_default_https_context = _create_unverified_https_context # download noun data (if required) nltk.download('brown') nltk.download('punkt') nltk.download('stopwords') def extract_nouns(sentence): """Extract the nouns from a sentence using the 'textblob' library.""" blob = TextBlob(sentence) return blob.noun_phrases def remove_stopwords(sentence): """Remove stopwords from a sentence and return the list of words.""" blob = TextBlob(sentence) return [word for word in blob.words if word not in stopwords.words('english') and len(word)>2]
[ 11748, 264, 6649, 198, 198, 11748, 299, 2528, 74, 198, 6738, 2420, 2436, 672, 1330, 8255, 3629, 672, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 628, 198, 2, 900, 25952, 198, 28311, 25, 198, 220, 220, 220, 4808,...
2.883636
275
from django_celery_beat.models import PeriodicTask, IntervalSchedule from django.core.management.base import BaseCommand from django.db import IntegrityError
[ 198, 6738, 42625, 14208, 62, 7015, 88, 62, 12945, 13, 27530, 1330, 18581, 291, 25714, 11, 4225, 2100, 27054, 5950, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 9945, 1330, 39348...
3.681818
44
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from ppcls.data.preprocess.ops.autoaugment import ImageNetPolicy as RawImageNetPolicy from ppcls.data.preprocess.ops.randaugment import RandAugment as RawRandAugment from ppcls.data.preprocess.ops.timm_autoaugment import RawTimmAutoAugment from ppcls.data.preprocess.ops.cutout import Cutout from ppcls.data.preprocess.ops.hide_and_seek import HideAndSeek from ppcls.data.preprocess.ops.random_erasing import RandomErasing from ppcls.data.preprocess.ops.grid import GridMask from ppcls.data.preprocess.ops.operators import DecodeImage from ppcls.data.preprocess.ops.operators import ResizeImage from ppcls.data.preprocess.ops.operators import CropImage from ppcls.data.preprocess.ops.operators import RandCropImage from ppcls.data.preprocess.ops.operators import RandFlipImage from ppcls.data.preprocess.ops.operators import NormalizeImage from ppcls.data.preprocess.ops.operators import ToCHWImage from ppcls.data.preprocess.ops.operators import AugMix from ppcls.data.preprocess.batch_ops.batch_operators import MixupOperator, CutmixOperator, OpSampler, FmixOperator import numpy as np from PIL import Image def transform(data, ops=[]): """ transform """ for op in ops: data = op(data) return data
[ 2, 15069, 357, 66, 8, 33448, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845...
3.222417
571
# required modules import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matplotlib import cm from matplotlib.colors import Normalize from mpl_toolkits.mplot3d import Axes3D from matplotlib.animation import FuncAnimation # two-dimesional version # three-dimensional version
[ 2, 2672, 13103, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 2164, 2340, 43106, 355, 50000, 43106, 198, 6738, 2603, 29487, 8019, 1330, 12067, 198, 6...
3.211538
104
# Copyright 2019 Google LLC # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Test layers from qconvolutional.py.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np from numpy.testing import assert_allclose import pytest import tempfile from tensorflow.keras import backend as K from tensorflow.keras.layers import Activation from tensorflow.keras.layers import Flatten from tensorflow.keras.layers import Input from tensorflow.keras.models import Model from tensorflow.keras.backend import clear_session from qkeras import binary from qkeras import ternary from qkeras import QActivation from qkeras import QDense from qkeras import QConv1D from qkeras import QConv2D from qkeras import QSeparableConv2D from qkeras import quantized_bits from qkeras import quantized_relu from qkeras.utils import model_save_quantized_weights from qkeras.utils import quantized_model_from_json from qkeras.utils import load_qmodel from qkeras import print_qstats from qkeras import extract_model_operations # TODO(hzhuang): # qoctave_conv test # qbatchnorm test if __name__ == '__main__': pytest.main([__file__])
[ 2, 15069, 13130, 3012, 11419, 198, 2, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, ...
3.480469
512
from typing import Optional, List, TypeVar, Generic, Callable import discord.ui from .item import Item from .select_option import SelectOption from .custom import CustomSelect C = TypeVar("C", bound=discord.ui.Select)
[ 6738, 19720, 1330, 32233, 11, 7343, 11, 5994, 19852, 11, 42044, 11, 4889, 540, 198, 198, 11748, 36446, 13, 9019, 198, 198, 6738, 764, 9186, 1330, 9097, 198, 6738, 764, 19738, 62, 18076, 1330, 9683, 19722, 198, 6738, 764, 23144, 1330, ...
3.555556
63
"""This module contains the general information for StorageScsiLunRef ManagedObject.""" from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta
[ 37811, 1212, 8265, 4909, 262, 2276, 1321, 329, 20514, 3351, 13396, 43, 403, 8134, 1869, 1886, 10267, 526, 15931, 198, 198, 6738, 2644, 1229, 1416, 5908, 1330, 1869, 1886, 10267, 198, 6738, 2644, 1229, 82, 535, 382, 28961, 1330, 471, 66,...
3.737705
61
from __future__ import print_function, absolute_import, division from sys import stdout as _stdout from time import time as _time import numpy as np try: import pyfftw pyfftw.interfaces.cache.enable() pyfftw.interfaces.cache.set_keepalive_time(10) rfftn = pyfftw.interfaces.numpy_fft.rfftn irfftn = pyfftw.interfaces.numpy_fft.irfftn except ImportError: from numpy.fft import rfftn, irfftn from disvis import volume from disvis.points import dilate_points from disvis.libdisvis import (rotate_image3d, dilate_points_add, longest_distance) from powerfit.solutions import Solutions from saxstools.saxs_curve import scattering_curve, create_fifj_lookup_table from saxstools.helpers import coarse_grain from saxstools.libsaxstools import calc_chi2 from saxstools.kernels import Kernels as saxs_Kernels try: import pyopencl as cl import pyopencl.array as cl_array import disvis.pyclfft from disvis.kernels import Kernels from disvis import pyclfft except ImportError: pass def rsurface(points, radius, shape, voxelspacing): dimensions = [x*voxelspacing for x in shape] origin = volume_origin(points, dimensions) rsurf = volume.zeros(shape, voxelspacing, origin) rsurf = dilate_points(points, radius, rsurf) return rsurf def volume_origin(points, dimensions): center = points.mean(axis=0) origin = [(c - d/2.0) for c, d in zip(center, dimensions)] return origin def grid_restraints(restraints, voxelspacing, origin, lcenter): nrestraints = len(restraints) g_restraints = np.zeros((nrestraints, 8), dtype=np.float64) for n in range(nrestraints): r_sel, l_sel, mindis, maxdis = restraints[n] r_pos = (r_sel.center - origin)/voxelspacing l_pos = (l_sel.center - lcenter)/voxelspacing g_restraints[n, 0:3] = r_pos g_restraints[n, 3:6] = l_pos g_restraints[n, 6] = mindis/voxelspacing g_restraints[n, 7] = maxdis/voxelspacing return g_restraints def grid_shape(points1, points2, voxelspacing): shape = min_grid_shape(points1, points2, voxelspacing) shape = [volume.radix235(x) for x in shape] return shape def min_grid_shape(points1, points2, voxelspacing): # the minimal grid shape is the size of the fixed protein in # each dimension and the longest diameter is the scanning chain dimensions1 = points1.ptp(axis=0) dimension2 = longest_distance(points2) grid_shape = np.asarray(((dimensions1 + dimension2)/voxelspacing) + 10, dtype=np.int32)[::-1] return grid_shape def float32array(array_like): return np.asarray(array_like, dtype=np.float32)
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 4112, 62, 11748, 11, 7297, 198, 6738, 25064, 1330, 14367, 448, 355, 4808, 19282, 448, 198, 6738, 640, 1330, 640, 355, 4808, 2435, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 28...
2.575145
1,038
#!/usr/bin/env python3 import os import sys import time sys.path.append(os.getcwd()+'/lib') import random from dataclasses import dataclass, field from ObsInfo import ObsInfo def generate_random_obs(num_obs: int, size_list: list, config_data): """ config_file_name = "config.json" json_file = open(config_file_name) config_data = json.load(json_file) size_list = [length, width, height] """ ObsList = [] if (num_obs > 0.5): for i in range(0, num_obs): # random center center = [random.uniform(config_data["LAB_SPACE_LIMIT"]["LIMIT_X"][0], config_data["LAB_SPACE_LIMIT"]["LIMIT_X"][1]), \ random.uniform(config_data["LAB_SPACE_LIMIT"]["LIMIT_Y"][0], config_data["LAB_SPACE_LIMIT"]["LIMIT_Y"][1]), \ random.uniform(config_data["LAB_SPACE_LIMIT"]["LIMIT_Z"][0], config_data["LAB_SPACE_LIMIT"]["LIMIT_Z"][1])] ObsList.append( ObsInfo(center, size_list) ) return ObsList
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 1136, 66, 16993, 3419, 10, 26488, 8019, 11537, 198, 11748, 4738, 198, 6738, 4818, 330...
2.179204
452
# TG-UserBot - A modular Telegram UserBot script for Python. # Copyright (C) 2019 Kandarp <https://github.com/kandnub> # # TG-UserBot is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # TG-UserBot is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with TG-UserBot. If not, see <https://www.gnu.org/licenses/>. from typing import Tuple, Union from telethon.tl import types from ..utils.client import UserBotClient from ..utils.helpers import get_chat_link ChatBannedRights = { 'until_date': 'Banned until:', 'view_messages': 'Read messages:', 'send_messages': 'Send messages:', 'send_media': 'Send media:', 'send_stickers': 'Send stickers:', 'send_gifs': 'Send GIFs:', 'send_games': 'Send games:', 'send_inline': 'Send inline messages:', 'embed_links': 'Send embed links:', 'send_polls': 'Send polls:', 'change_info': 'Change info:', 'invite_users': 'Add users:', 'pin_messages': 'Pin messages:' } ChatAdminRights = { 'change_info': 'Change chat info:', 'post_messages': 'Post messages:', 'edit_messages': 'Edit messages:', 'delete_messages': 'Delete messages:', 'ban_users': 'Ban users:', 'invite_users': 'Invite users:', 'pin_messages': 'Pin messages:', 'add_admins': 'Add new admins:' }
[ 2, 44121, 12, 12982, 20630, 532, 317, 26507, 50203, 11787, 20630, 4226, 329, 11361, 13, 201, 198, 2, 15069, 357, 34, 8, 13130, 220, 50224, 5117, 1279, 5450, 1378, 12567, 13, 785, 14, 74, 392, 77, 549, 29, 201, 198, 2, 201, 198, 2,...
2.758514
646
import numpy as np
[ 11748, 299, 32152, 355, 45941, 198 ]
3.166667
6
__package_name__ = "pyrocco" __version__ = "0.1.0" __author__ = "Joo Palmeiro" __author_email__ = "jm.palmeiro@campus.fct.unl.pt" __description__ = "A Python CLI to add the Party Parrot to a custom background image." __url__ = "https://github.com/joaopalmeiro/pyrocco"
[ 834, 26495, 62, 3672, 834, 796, 366, 9078, 305, 535, 78, 1, 198, 834, 9641, 834, 796, 366, 15, 13, 16, 13, 15, 1, 198, 834, 9800, 834, 796, 366, 41, 2238, 3175, 1326, 7058, 1, 198, 834, 9800, 62, 12888, 834, 796, 366, 73, 76, ...
2.537736
106
# coding: utf-8 # 2019/8/23 @ tongshiwei
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 13130, 14, 23, 14, 1954, 2488, 10479, 44019, 42990, 198 ]
2.157895
19
""" Round a number -------------- Input (float) A floating point number (int) Number of decimals Default value is: 0 Output (float) Rounded number (int) Whether using the default decimals value, the return number will be the nearest integer """ number = 103.14159 # Rounding with 2 decimals number_rounded = round(number, 2) print('Rounding with 2 decimals') print('original number: {}, rounded: {}, type of rounded: {}' .format(number, number_rounded, type(number_rounded))) # Rounding with -2 decimals number_rounded = round(number, -2) print('\nRounding with -2 decimals') print('original number: {}, rounded: {}, type of rounded: {}' .format(number, number_rounded, type(number_rounded))) # Rounding with 0 decimals number_rounded = round(number, 0) print('\nRounding with 0 decimals') print('original number: {}, rounded: {}, type of rounded: {}' .format(number, number_rounded, type(number_rounded))) # Rounding with default # Result will be integer (!) number_rounded = round(number) print('\nRounding with default') print('original number: {}, rounded: {}, type of rounded: {}' .format(number, number_rounded, type(number_rounded)))
[ 37811, 201, 198, 22685, 257, 1271, 201, 198, 26171, 201, 198, 20560, 220, 220, 357, 22468, 8, 220, 220, 220, 220, 317, 12462, 966, 1271, 201, 198, 220, 220, 220, 220, 220, 220, 220, 357, 600, 8, 220, 220, 220, 220, 220, 220, 7913,...
2.696017
477
#!/usr/bin/env python3 import RPi.GPIO as GPIO from mfrc522 import SimpleMFRC522 import play import time if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 6738, 285, 69, 6015, 49542, 1330, 17427, 49800, 7397, 49542, 198, 198, 11748, 711, 198, 11748, 640, 628, 198, 361, 11593, 3...
2.625
56
import os MYPY = False if MYPY: from typing_extensions import Final PYTHON2_VERSION = (2, 7) # type: Final PYTHON3_VERSION = (3, 6) # type: Final PYTHON3_VERSION_MIN = (3, 4) # type: Final CACHE_DIR = '.mypy_cache' # type: Final CONFIG_FILE = 'mypy.ini' # type: Final SHARED_CONFIG_FILES = ['setup.cfg', ] # type: Final USER_CONFIG_FILES = ['~/.config/mypy/config', '~/.mypy.ini', ] # type: Final if os.environ.get('XDG_CONFIG_HOME'): USER_CONFIG_FILES.insert(0, os.path.join(os.environ['XDG_CONFIG_HOME'], 'mypy/config')) CONFIG_FILES = [CONFIG_FILE, ] + SHARED_CONFIG_FILES + USER_CONFIG_FILES # type: Final # This must include all reporters defined in mypy.report. This is defined here # to make reporter names available without importing mypy.report -- this speeds # up startup. REPORTER_NAMES = ['linecount', 'any-exprs', 'linecoverage', 'memory-xml', 'cobertura-xml', 'xml', 'xslt-html', 'xslt-txt', 'html', 'txt'] # type: Final
[ 11748, 28686, 198, 198, 26708, 47, 56, 796, 10352, 198, 361, 17615, 47, 56, 25, 198, 220, 220, 220, 422, 19720, 62, 2302, 5736, 1330, 8125, 198, 198, 47, 56, 4221, 1340, 17, 62, 43717, 796, 357, 17, 11, 767, 8, 220, 1303, 2099, ...
2.062731
542
#!/usr/bin/env python # -*- coding: utf-8 -*- # License: BSD-3 (https://tldrlegal.com/license/bsd-3-clause-license-(revised)) # Copyright (c) 2016-2021, Cabral, Juan; Luczywo, Nadia # All rights reserved. # ============================================================================= # DOCS # ============================================================================= """Functionalities for remove negatives from criteria. In addition to the main functionality, an MCDA agnostic function is offered to push negatives values on an array along an arbitrary axis. """ # ============================================================================= # IMPORTS # ============================================================================= import numpy as np from ..core import SKCMatrixAndWeightTransformerABC from ..utils import doc_inherit # ============================================================================= # FUNCTIONS # ============================================================================= def push_negatives(arr, axis): r"""Increment the array until all the valuer are sean >= 0. If an array has negative values this function increment the values proportionally to made all the array positive along an axis. .. math:: \overline{X}_{ij} = \begin{cases} X_{ij} + min_{X_{ij}} & \text{if } X_{ij} < 0\\ X_{ij} & \text{otherwise} \end{cases} Parameters ---------- arr: :py:class:`numpy.ndarray` like. A array with values axis : :py:class:`int` optional Axis along which to operate. By default, flattened input is used. Returns ------- :py:class:`numpy.ndarray` array with all values >= 0. Examples -------- .. code-block:: pycon >>> from skcriteria.preprocess import push_negatives >>> mtx = [[1, 2], [3, 4]] >>> mtx_lt0 = [[-1, 2], [3, 4]] # has a negative value >>> push_negatives(mtx) # array without negatives don't be affected array([[1, 2], [3, 4]]) # all the array is incremented by 1 to eliminate the negative >>> push_negatives(mtx_lt0) array([[0, 3], [4, 5]]) # by column only the first one (with the negative value) is affected >>> push_negatives(mtx_lt0, axis=0) array([[0, 2], [4, 4]]) # by row only the first row (with the negative value) is affected >>> push_negatives(mtx_lt0, axis=1) array([[0, 3], [3, 4]]) """ arr = np.asarray(arr) mins = np.min(arr, axis=axis, keepdims=True) delta = (mins < 0) * mins return arr - delta
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 13789, 25, 347, 10305, 12, 18, 357, 5450, 1378, 83, 335, 81, 18011, 13, 785, 14, 43085, 14, 1443, 67, 12, 18, ...
2.785714
980
# -*- coding: utf-8 -*- # # This class was auto-generated from the API references found at # https://support.direct.ingenico.com/documentation/api/reference/ # from ingenico.direct.sdk.data_object import DataObject from ingenico.direct.sdk.domain.address import Address from ingenico.direct.sdk.domain.company_information import CompanyInformation from ingenico.direct.sdk.domain.personal_information_token import PersonalInformationToken
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 770, 1398, 373, 8295, 12, 27568, 422, 262, 7824, 10288, 1043, 379, 198, 2, 3740, 1378, 11284, 13, 12942, 13, 36795, 3713, 13, 785, 14, 22897, 341, 14, 150...
3.606557
122
import time import pykeyboard # TODO: Replace following two lines with the code that activate the application. print('Activate the application 3 seconds.') time.sleep(3) k = pykeyboard.PyKeyboard() k.press_key(k.left_key) time.sleep(1) # Hold down left key for 1 second. k.release_key(k.left_key)
[ 11748, 640, 198, 198, 11748, 12972, 2539, 3526, 628, 198, 2, 16926, 46, 25, 40177, 1708, 734, 3951, 351, 262, 2438, 326, 15155, 262, 3586, 13, 198, 4798, 10786, 25526, 378, 262, 3586, 513, 4201, 2637, 8, 198, 2435, 13, 42832, 7, 18,...
3.040404
99
import os import tarfile from abc import ABC, abstractmethod from glob import glob import shutil import random import zstandard """ This registry is for automatically downloading and extracting datasets. To register a class you need to inherit the DataDownloader class, provide name, filetype and url attributes, and (optionally) provide download / extract / exists / tokenize functions to check if the data exists, and, if it doesn't, download, extract and tokenize the data into the correct directory. When done, add it to the DATA_DOWNLOADERS dict. The function process_data runs the pre-processing for the selected dataset. """ DATA_DIR = os.environ.get('DATA_DIR', './data') GPT2_VOCAB_FP = f"{DATA_DIR}/gpt2-vocab.json" GPT2_VOCAB_URL = "https://s3.amazonaws.com/models.huggingface.co/bert/gpt2-vocab.json" GPT2_MERGE_FP = f"{DATA_DIR}/gpt2-merges.txt" GPT2_MERGE_URL = "https://s3.amazonaws.com/models.huggingface.co/bert/gpt2-merges.txt" def extract(self): """extracts dataset and moves to the correct data dir if necessary""" self._extract_tar() def exists(self): """Checks if the dataset is present""" return os.path.isdir(f"{self.base_dir}/{self.name}") def download(self): """downloads dataset""" os.makedirs(self.base_dir, exist_ok=True) os.system(f"wget {self.url} -O {os.path.join(self.base_dir, os.path.basename(self.url))}") class Enron(DataDownloader): name = "enron" filetype = "jsonl.zst" url = "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst" seed = 1 def maybe_download_gpt2_tokenizer_data(): if not os.path.isfile(GPT2_VOCAB_FP): os.system(f'wget {GPT2_VOCAB_URL} -O {GPT2_VOCAB_FP}') if not os.path.isfile(GPT2_MERGE_FP): os.system(f'wget {GPT2_MERGE_URL} -O {GPT2_MERGE_FP}') DATA_DOWNLOADERS = { "enron": Enron }
[ 11748, 28686, 198, 11748, 13422, 7753, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 15095, 1330, 15095, 198, 11748, 4423, 346, 198, 11748, 4738, 198, 11748, 1976, 20307, 198, 198, 37811, 198, 1212, 20478, 318, 329, 6338, ...
2.488
750
from logging import getLogger logger = getLogger(__name__)
[ 6738, 18931, 1330, 651, 11187, 1362, 198, 198, 6404, 1362, 796, 651, 11187, 1362, 7, 834, 3672, 834, 8, 198 ]
3
20
#!/usr/bin/env python import os import json import sys import unittest import urllib2 from flexmock import flexmock sys.path.append(os.path.join(os.path.dirname(__file__), "../../")) import solr_interface import search_exceptions
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 11748, 2956, 297, 571, 17, 198, 198, 6738, 7059, 76, 735, 1330, 7059, 76, 735, 198, 198, 17597,...
2.841463
82
# coding=utf-8 # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Model parallel utility interface.""" from .cross_entropy import vocab_parallel_cross_entropy from .data import broadcast_data from .grads import clip_grad_norm from .initialize import destroy_model_parallel from .initialize import get_data_parallel_group from .initialize import get_data_parallel_rank from .initialize import get_data_parallel_world_size from .initialize import get_model_parallel_group from .initialize import get_model_parallel_rank from .initialize import get_model_parallel_src_rank from .initialize import get_model_parallel_world_size from .initialize import initialize_model_parallel from .initialize import model_parallel_is_initialized from .layers import ColumnParallelLinear from .layers import ParallelEmbedding from .layers import RowParallelLinear from .layers import VocabParallelEmbedding from .mappings import copy_to_model_parallel_region from .mappings import gather_from_model_parallel_region from .mappings import reduce_from_model_parallel_region from .mappings import scatter_to_model_parallel_region from .random import checkpoint from .random import partition_activations_in_checkpoint from .random import get_cuda_rng_tracker from .random import model_parallel_cuda_manual_seed from .transformer_enc_dec import ParallelTransformer, LayerNorm
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 357, 66, 8, 13130, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198...
3.561111
540
# -*- coding: utf-8 -*- import os from django.db import models from django.db.models.signals import post_delete from django.dispatch import receiver from .base import Pessoa from djangosige.apps.login.models import Usuario from djangosige.configs.settings import MEDIA_ROOT # Deletar logo quando empresa for deletada
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 11748, 28686, 201, 198, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 201, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281,...
2.651163
129
import os from nltk.translate.bleu_score import corpus_bleu from nltk.translate.bleu_score import SmoothingFunction import json from tqdm import tqdm, trange from random import sample import numpy as np import pickle import argparse import bert_eval_acc import svm_eval_acc smooth = SmoothingFunction() def eval_bleu(ref, pred): """ :param ref: list(list(list(any))), a list of reference sentences, each element of the list is a list of references :param pred: list(list(any)), a list of predictions :return: corpus bleu score """ return corpus_bleu(ref, pred, smoothing_function=smooth.method1) def eval_bleu_detail(ref, pred): """ :param ref: list(list(list(any))), a list of reference sentences, each element of the list is a list of references :param pred: list(list(any)), a list of predictions :return: corpus bleu score """ return corpus_bleu(ref, pred, weights=[1, 0, 0, 0], smoothing_function=smooth.method1),\ corpus_bleu(ref, pred, weights=[0, 1, 0, 0], smoothing_function=smooth.method1), \ corpus_bleu(ref, pred, weights=[0, 0, 1, 0], smoothing_function=smooth.method1), \ corpus_bleu(ref, pred, weights=[0, 0, 0, 1], smoothing_function=smooth.method1) def count_ngram(hyps_resp, n): """ Count the number of unique n-grams :param hyps_resp: list, a list of responses :param n: int, n-gram :return: the number of unique n-grams in hyps_resp """ if len(hyps_resp) == 0: print("ERROR, eval_distinct get empty input") return if type(hyps_resp[0]) != list: print("ERROR, eval_distinct takes in a list of <class 'list'>, get a list of {} instead".format( type(hyps_resp[0]))) return ngram = set() for resp in hyps_resp: if len(resp) < n: continue for i in range(len(resp) - n + 1): ngram.add(' '.join(resp[i: i + n])) return len(ngram) def eval_distinct_detail(hyps_resp): """ compute distinct score for the hyps_resp :param hyps_resp: list, a list of hyps responses :return: average distinct score for 1, 2-gram """ if len(hyps_resp) == 0: print("ERROR, eval_distinct get empty input") return if type(hyps_resp[0]) != list: print("ERROR, eval_distinct takes in a list of <class 'list'>, get a list of {} instead".format( type(hyps_resp[0]))) return hyps_resp = [[str(x) for x in l] for l in hyps_resp] hyps_resp = [(' '.join(i)).split() for i in hyps_resp] num_tokens = sum([len(i) for i in hyps_resp]) dist1 = count_ngram(hyps_resp, 1) / float(num_tokens) dist2 = count_ngram(hyps_resp, 2) / float(num_tokens) return dist1, dist2 def eval_f1(ref, pred): """ :param ref: list(list(list(any))), a list of reference sentences, each element of the list is a list of references :param pred: list(list(any)), a list of predictions :return: f1 score """ assert len(ref) == len(pred) > 0 precisions = [] recalls = [] for i, s in enumerate(pred): ref_set = set() for rs in ref[i]: for w in rs: ref_set.add(w) pred_set = set() for w in s: pred_set.add(w) p = 0 for w in s: if w in ref_set: p += 1 if len(s) > 0: p /= len(s) r = 0 for rs in ref[i]: for w in rs: if w in pred_set: r += 1 tot_l = sum([len(rs) for rs in ref[i]]) if tot_l > 0: r /= tot_l precisions.append(p) recalls.append(r) precision = sum(precisions) / len(precisions) recall = sum(recalls) / len(recalls) return 0.0 if precision == recall == 0 else 2 * precision * recall / (precision + recall) parser = argparse.ArgumentParser() parser.add_argument('--eval_file_path', help='path of the eval file', required=True) args = parser.parse_args() file_path = args.eval_file_path calc_metrics_value(None, file_path) print("Evaluating acc results:") bert_eval_acc.main(file_path) svm_eval_acc.main(file_path)
[ 11748, 28686, 198, 6738, 299, 2528, 74, 13, 7645, 17660, 13, 903, 84, 62, 26675, 1330, 35789, 62, 903, 84, 198, 6738, 299, 2528, 74, 13, 7645, 17660, 13, 903, 84, 62, 26675, 1330, 2439, 1025, 722, 22203, 198, 11748, 33918, 198, 6738...
2.301099
1,820
"""Constants for the UniFi component.""" import logging LOGGER = logging.getLogger(__package__) DOMAIN = "unifi" CONTROLLER_ID = "{host}-{site}" CONF_CONTROLLER = "controller" CONF_SITE_ID = "site" UNIFI_WIRELESS_CLIENTS = "unifi_wireless_clients" CONF_ALLOW_BANDWIDTH_SENSORS = "allow_bandwidth_sensors" CONF_BLOCK_CLIENT = "block_client" CONF_DETECTION_TIME = "detection_time" CONF_POE_CLIENTS = "poe_clients" CONF_TRACK_CLIENTS = "track_clients" CONF_TRACK_DEVICES = "track_devices" CONF_TRACK_WIRED_CLIENTS = "track_wired_clients" CONF_SSID_FILTER = "ssid_filter" DEFAULT_ALLOW_BANDWIDTH_SENSORS = False DEFAULT_POE_CLIENTS = True DEFAULT_TRACK_CLIENTS = True DEFAULT_TRACK_DEVICES = True DEFAULT_TRACK_WIRED_CLIENTS = True DEFAULT_DETECTION_TIME = 300 ATTR_MANUFACTURER = "Ubiquiti Networks"
[ 37811, 34184, 1187, 329, 262, 43376, 10547, 7515, 526, 15931, 198, 11748, 18931, 198, 198, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 26495, 834, 8, 198, 39170, 29833, 796, 366, 403, 22238, 1, 198, 198, 10943, 5446, 46, ...
2.310345
348
# Your OrderedStream object will be instantiated and called as such: # obj = OrderedStream(n) # param_1 = obj.insert(id,value)
[ 198, 198, 2, 3406, 14230, 1068, 12124, 2134, 481, 307, 9113, 12931, 290, 1444, 355, 884, 25, 198, 2, 26181, 796, 14230, 1068, 12124, 7, 77, 8, 198, 2, 5772, 62, 16, 796, 26181, 13, 28463, 7, 312, 11, 8367, 8, 198 ]
3.071429
42
import numpy as np from treelas import post_order, TreeInstance
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2054, 417, 292, 1330, 1281, 62, 2875, 11, 12200, 33384, 628, 198 ]
3.473684
19