hexsha
string | size
int64 | ext
string | lang
string | max_stars_repo_path
string | max_stars_repo_name
string | max_stars_repo_head_hexsha
string | max_stars_repo_licenses
list | max_stars_count
int64 | max_stars_repo_stars_event_min_datetime
string | max_stars_repo_stars_event_max_datetime
string | max_issues_repo_path
string | max_issues_repo_name
string | max_issues_repo_head_hexsha
string | max_issues_repo_licenses
list | max_issues_count
int64 | max_issues_repo_issues_event_min_datetime
string | max_issues_repo_issues_event_max_datetime
string | max_forks_repo_path
string | max_forks_repo_name
string | max_forks_repo_head_hexsha
string | max_forks_repo_licenses
list | max_forks_count
int64 | max_forks_repo_forks_event_min_datetime
string | max_forks_repo_forks_event_max_datetime
string | content
string | avg_line_length
float64 | max_line_length
int64 | alphanum_fraction
float64 | qsc_code_num_words_quality_signal
int64 | qsc_code_num_chars_quality_signal
float64 | qsc_code_mean_word_length_quality_signal
float64 | qsc_code_frac_words_unique_quality_signal
float64 | qsc_code_frac_chars_top_2grams_quality_signal
float64 | qsc_code_frac_chars_top_3grams_quality_signal
float64 | qsc_code_frac_chars_top_4grams_quality_signal
float64 | qsc_code_frac_chars_dupe_5grams_quality_signal
float64 | qsc_code_frac_chars_dupe_6grams_quality_signal
float64 | qsc_code_frac_chars_dupe_7grams_quality_signal
float64 | qsc_code_frac_chars_dupe_8grams_quality_signal
float64 | qsc_code_frac_chars_dupe_9grams_quality_signal
float64 | qsc_code_frac_chars_dupe_10grams_quality_signal
float64 | qsc_code_frac_chars_replacement_symbols_quality_signal
float64 | qsc_code_frac_chars_digital_quality_signal
float64 | qsc_code_frac_chars_whitespace_quality_signal
float64 | qsc_code_size_file_byte_quality_signal
float64 | qsc_code_num_lines_quality_signal
float64 | qsc_code_num_chars_line_max_quality_signal
float64 | qsc_code_num_chars_line_mean_quality_signal
float64 | qsc_code_frac_chars_alphabet_quality_signal
float64 | qsc_code_frac_chars_comments_quality_signal
float64 | qsc_code_cate_xml_start_quality_signal
float64 | qsc_code_frac_lines_dupe_lines_quality_signal
float64 | qsc_code_cate_autogen_quality_signal
float64 | qsc_code_frac_lines_long_string_quality_signal
float64 | qsc_code_frac_chars_string_length_quality_signal
float64 | qsc_code_frac_chars_long_word_length_quality_signal
float64 | qsc_code_frac_lines_string_concat_quality_signal
float64 | qsc_code_cate_encoded_data_quality_signal
float64 | qsc_code_frac_chars_hex_words_quality_signal
float64 | qsc_code_frac_lines_prompt_comments_quality_signal
float64 | qsc_code_frac_lines_assert_quality_signal
float64 | qsc_codepython_cate_ast_quality_signal
float64 | qsc_codepython_frac_lines_func_ratio_quality_signal
float64 | qsc_codepython_cate_var_zero_quality_signal
bool | qsc_codepython_frac_lines_pass_quality_signal
float64 | qsc_codepython_frac_lines_import_quality_signal
float64 | qsc_codepython_frac_lines_simplefunc_quality_signal
float64 | qsc_codepython_score_lines_no_logic_quality_signal
float64 | qsc_codepython_frac_lines_print_quality_signal
float64 | qsc_code_num_words
int64 | qsc_code_num_chars
int64 | qsc_code_mean_word_length
int64 | qsc_code_frac_words_unique
null | qsc_code_frac_chars_top_2grams
int64 | qsc_code_frac_chars_top_3grams
int64 | qsc_code_frac_chars_top_4grams
int64 | qsc_code_frac_chars_dupe_5grams
int64 | qsc_code_frac_chars_dupe_6grams
int64 | qsc_code_frac_chars_dupe_7grams
int64 | qsc_code_frac_chars_dupe_8grams
int64 | qsc_code_frac_chars_dupe_9grams
int64 | qsc_code_frac_chars_dupe_10grams
int64 | qsc_code_frac_chars_replacement_symbols
int64 | qsc_code_frac_chars_digital
int64 | qsc_code_frac_chars_whitespace
int64 | qsc_code_size_file_byte
int64 | qsc_code_num_lines
int64 | qsc_code_num_chars_line_max
int64 | qsc_code_num_chars_line_mean
int64 | qsc_code_frac_chars_alphabet
int64 | qsc_code_frac_chars_comments
int64 | qsc_code_cate_xml_start
int64 | qsc_code_frac_lines_dupe_lines
int64 | qsc_code_cate_autogen
int64 | qsc_code_frac_lines_long_string
int64 | qsc_code_frac_chars_string_length
int64 | qsc_code_frac_chars_long_word_length
int64 | qsc_code_frac_lines_string_concat
null | qsc_code_cate_encoded_data
int64 | qsc_code_frac_chars_hex_words
int64 | qsc_code_frac_lines_prompt_comments
int64 | qsc_code_frac_lines_assert
int64 | qsc_codepython_cate_ast
int64 | qsc_codepython_frac_lines_func_ratio
int64 | qsc_codepython_cate_var_zero
int64 | qsc_codepython_frac_lines_pass
int64 | qsc_codepython_frac_lines_import
int64 | qsc_codepython_frac_lines_simplefunc
int64 | qsc_codepython_score_lines_no_logic
int64 | qsc_codepython_frac_lines_print
int64 | effective
string | hits
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e68682ac6ba97f9b172ff277c3a2a87e5c65354c
| 1,761
|
py
|
Python
|
tests/fixtures/defxmlschema/chapter15.py
|
gramm/xsdata
|
082c780757c6d76a5c31a6757276ef6912901ed2
|
[
"MIT"
] | null | null | null |
tests/fixtures/defxmlschema/chapter15.py
|
gramm/xsdata
|
082c780757c6d76a5c31a6757276ef6912901ed2
|
[
"MIT"
] | null | null | null |
tests/fixtures/defxmlschema/chapter15.py
|
gramm/xsdata
|
082c780757c6d76a5c31a6757276ef6912901ed2
|
[
"MIT"
] | null | null | null |
from dataclasses import dataclass, field
from decimal import Decimal
from typing import Optional
from xsdata.models.datatype import XmlDate
@dataclass
class SizeType:
value: Optional[int] = field(
default=None,
metadata={
"required": True,
}
)
system: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
}
)
@dataclass
class ShirtType:
description: Optional[str] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
}
)
comment: Optional[str] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
}
)
number: Optional[int] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
}
)
name: Optional[str] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
}
)
size: Optional[SizeType] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
}
)
id: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
}
)
version: Optional[Decimal] = field(
default=None,
metadata={
"type": "Attribute",
}
)
eff_date: Optional[XmlDate] = field(
default=None,
metadata={
"name": "effDate",
"type": "Attribute",
}
)
@dataclass
class Shirt(ShirtType):
class Meta:
name = "shirt"
| 20.241379
| 42
| 0.473027
| 135
| 1,761
| 6.162963
| 0.296296
| 0.144231
| 0.192308
| 0.288462
| 0.519231
| 0.519231
| 0.419471
| 0.313702
| 0.198317
| 0
| 0
| 0
| 0.398069
| 1,761
| 86
| 43
| 20.476744
| 0.784906
| 0
| 0
| 0.5
| 0
| 0
| 0.109029
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.05
| 0
| 0.225
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
e69afae741859fe05b5f191d930aaa0cc0138694
| 3,204
|
py
|
Python
|
qiskit/providers/basebackend.py
|
ismaila-at-za-ibm/qiskit-terra
|
08303ec98ac7b33fde55266dc3a74466fbdcae95
|
[
"Apache-2.0"
] | 2
|
2021-09-06T19:25:36.000Z
|
2021-11-17T10:46:12.000Z
|
qiskit/providers/basebackend.py
|
ismaila-at-za-ibm/qiskit-terra
|
08303ec98ac7b33fde55266dc3a74466fbdcae95
|
[
"Apache-2.0"
] | null | null | null |
qiskit/providers/basebackend.py
|
ismaila-at-za-ibm/qiskit-terra
|
08303ec98ac7b33fde55266dc3a74466fbdcae95
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""This module implements the abstract base class for backend modules.
To create add-on backend modules subclass the Backend class in this module.
Doing so requires that the required backend interface is implemented.
"""
from abc import ABC, abstractmethod
from qiskit.version import __version__
from .models import BackendStatus
class BaseBackend(ABC):
"""Base class for backends."""
@abstractmethod
def __init__(self, configuration, provider=None):
"""Base class for backends.
This method should initialize the module and its configuration, and
raise an exception if a component of the module is
not available.
Args:
configuration (BackendConfiguration): backend configuration
provider (BaseProvider): provider responsible for this backend
Raises:
FileNotFoundError if backend executable is not available.
QiskitError: if there is no name in the configuration
"""
self._configuration = configuration
self._provider = provider
@abstractmethod
def run(self, qobj):
"""Run a Qobj on the the backend."""
pass
def configuration(self):
"""Return the backend configuration.
Returns:
BackendConfiguration: the configuration for the backend.
"""
return self._configuration
def properties(self):
"""Return backend properties.
Returns:
BackendProperties: the configuration for the backend. If the backend
does not support properties, it returns ``None``.
"""
return None
def provider(self):
"""Return the backend Provider.
Returns:
BaseProvider: the Provider responsible for the backend.
"""
return self._provider
def status(self):
"""Return backend status.
Returns:
BackendStatus: the status of the backend.
"""
return BackendStatus(backend_name=self.name(),
backend_version=__version__,
operational=True,
pending_jobs=0,
status_msg='')
def name(self):
"""Return backend name.
Returns:
str: the name of the backend.
"""
return self._configuration.backend_name
def __str__(self):
return self.name()
def __repr__(self):
"""Official string representation of a Backend.
Note that, by Qiskit convention, it is consciously *not* a fully valid
Python expression. Subclasses should provide 'a string of the form
<...some useful description...>'. [0]
[0] https://docs.python.org/3/reference/datamodel.html#object.__repr__
"""
return "<{}('{}') from {}()>".format(self.__class__.__name__,
self.name(),
self._provider)
| 30.226415
| 80
| 0.604869
| 336
| 3,204
| 5.639881
| 0.383929
| 0.05277
| 0.033773
| 0.031662
| 0.072296
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00503
| 0.317416
| 3,204
| 105
| 81
| 30.514286
| 0.861454
| 0.526529
| 0
| 0.064516
| 0
| 0
| 0.016584
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.290323
| false
| 0.032258
| 0.096774
| 0.032258
| 0.645161
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 2
|
e6a0dd14d03a3e676bea433343d789bde96e6abd
| 666
|
py
|
Python
|
bbio/platform/beaglebone/api.py
|
efargas/PyBBIO
|
b0b15fc52befd56e817dbc5876f738e70ef05541
|
[
"MIT"
] | null | null | null |
bbio/platform/beaglebone/api.py
|
efargas/PyBBIO
|
b0b15fc52befd56e817dbc5876f738e70ef05541
|
[
"MIT"
] | null | null | null |
bbio/platform/beaglebone/api.py
|
efargas/PyBBIO
|
b0b15fc52befd56e817dbc5876f738e70ef05541
|
[
"MIT"
] | null | null | null |
# api.py
# Part of PyBBIO
# github.com/alexanderhiam/PyBBIO
# MIT License
#
# Beaglebone platform API file.
from bbio.platform.platform import detect_platform
PLATFORM = detect_platform()
if "3.8" in PLATFORM:
from bone_3_8.adc import analog_init, analog_cleanup
from bone_3_8.pwm import pwm_init, pwm_cleanup
from serial_port import serial_cleanup
elif "3.2" in PLATFORM:
from bone_3_2.adc import analog_init, analog_cleanup
from bone_3_2.pwm import pwm_init, pwm_cleanup
from serial_port import serial_cleanup
def platform_init():
analog_init()
pwm_init()
def platform_cleanup():
analog_cleanup()
pwm_cleanup()
serial_cleanup()
| 21.483871
| 54
| 0.77027
| 103
| 666
| 4.699029
| 0.31068
| 0.066116
| 0.07438
| 0.07438
| 0.491736
| 0.413223
| 0.413223
| 0.413223
| 0.413223
| 0.243802
| 0
| 0.02139
| 0.157658
| 666
| 30
| 55
| 22.2
| 0.841355
| 0.145646
| 0
| 0.117647
| 0
| 0
| 0.010695
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.117647
| false
| 0
| 0.411765
| 0
| 0.529412
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 2
|
e6b45faace1959ed1daf554b861e2a396b78702b
| 222
|
py
|
Python
|
sanctuary/tag/serializers.py
|
20CM/Sanctuary
|
14694d9bd6376bdc05248741a91df778400e9f66
|
[
"BSD-3-Clause"
] | 1
|
2017-05-29T11:53:06.000Z
|
2017-05-29T11:53:06.000Z
|
sanctuary/tag/serializers.py
|
20CM/Sanctuary
|
14694d9bd6376bdc05248741a91df778400e9f66
|
[
"BSD-3-Clause"
] | null | null | null |
sanctuary/tag/serializers.py
|
20CM/Sanctuary
|
14694d9bd6376bdc05248741a91df778400e9f66
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
from rest_framework import serializers
from .models import Tag
class TagSerializer(serializers.ModelSerializer):
class Meta:
model = Tag
read_only_fields = ('topics_count',)
| 18.5
| 49
| 0.689189
| 25
| 222
| 5.96
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005714
| 0.211712
| 222
| 11
| 50
| 20.181818
| 0.845714
| 0.094595
| 0
| 0
| 0
| 0
| 0.060302
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 2
|
e6b462f3efa3e6e931f1a4ef9f1a10fd45f8f99c
| 571
|
py
|
Python
|
examples/management_api/aliveness_test.py
|
cloudamqp/amqpstorm
|
35eb8edc5f0c2ea3839e93940bf9d0e5f8f4242e
|
[
"MIT"
] | null | null | null |
examples/management_api/aliveness_test.py
|
cloudamqp/amqpstorm
|
35eb8edc5f0c2ea3839e93940bf9d0e5f8f4242e
|
[
"MIT"
] | null | null | null |
examples/management_api/aliveness_test.py
|
cloudamqp/amqpstorm
|
35eb8edc5f0c2ea3839e93940bf9d0e5f8f4242e
|
[
"MIT"
] | null | null | null |
from amqpstorm.management import ApiConnectionError
from amqpstorm.management import ApiError
from amqpstorm.management import ManagementApi
if __name__ == '__main__':
API = ManagementApi('http://127.0.0.1:15672', 'guest', 'guest')
try:
result = API.aliveness_test('/')
if result['status'] == 'ok':
print("RabbitMQ is alive!")
else:
print("RabbitMQ is not alive! :(")
except ApiConnectionError as why:
print('Connection Error: %s' % why)
except ApiError as why:
print('ApiError: %s' % why)
| 33.588235
| 67
| 0.635727
| 64
| 571
| 5.53125
| 0.546875
| 0.110169
| 0.194915
| 0.245763
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025287
| 0.238179
| 571
| 16
| 68
| 35.6875
| 0.788506
| 0
| 0
| 0
| 0
| 0
| 0.217163
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0.266667
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
e6ba0ea03b3d3e18b20568efd5fed882e88148ea
| 1,834
|
py
|
Python
|
lib/galaxy/model/migrate/versions/0073_add_ldda_to_implicit_conversion_table.py
|
blankenberg/galaxy-data-resource
|
ca32a1aafd64948f489a4e5cf88096f32391b1d9
|
[
"CC-BY-3.0"
] | null | null | null |
lib/galaxy/model/migrate/versions/0073_add_ldda_to_implicit_conversion_table.py
|
blankenberg/galaxy-data-resource
|
ca32a1aafd64948f489a4e5cf88096f32391b1d9
|
[
"CC-BY-3.0"
] | 1
|
2015-02-21T18:48:19.000Z
|
2015-02-27T15:50:32.000Z
|
lib/galaxy/model/migrate/versions/0073_add_ldda_to_implicit_conversion_table.py
|
blankenberg/galaxy-data-resource
|
ca32a1aafd64948f489a4e5cf88096f32391b1d9
|
[
"CC-BY-3.0"
] | 3
|
2015-02-22T13:34:16.000Z
|
2020-10-01T01:28:04.000Z
|
"""
Migration script to add 'ldda_parent_id' column to the implicitly_converted_dataset_association table.
"""
from sqlalchemy import *
from sqlalchemy.orm import *
from migrate import *
from migrate.changeset import *
import logging
log = logging.getLogger( __name__ )
metadata = MetaData()
def upgrade(migrate_engine):
metadata.bind = migrate_engine
print __doc__
metadata.reflect()
try:
Implicitly_converted_table = Table( "implicitly_converted_dataset_association", metadata, autoload=True )
if migrate_engine.name != 'sqlite':
c = Column( "ldda_parent_id", Integer, ForeignKey( "library_dataset_dataset_association.id" ), index=True, nullable=True )
else:
#Can't use the ForeignKey in sqlite.
c = Column( "ldda_parent_id", Integer, index=True, nullable=True )
c.create( Implicitly_converted_table, index_name="ix_implicitly_converted_dataset_assoc_ldda_parent_id")
assert c is Implicitly_converted_table.c.ldda_parent_id
except Exception, e:
print "Adding ldda_parent_id column to implicitly_converted_dataset_association table failed: %s" % str( e )
log.debug( "Adding ldda_parent_id column to implicitly_converted_dataset_association table failed: %s" % str( e ) )
def downgrade(migrate_engine):
metadata.bind = migrate_engine
metadata.reflect()
try:
Implicitly_converted_table = Table( "implicitly_converted_dataset_association", metadata, autoload=True )
Implicitly_converted_table.c.ldda_parent_id.drop()
except Exception, e:
print "Dropping ldda_parent_id column from implicitly_converted_dataset_association table failed: %s" % str( e )
log.debug( "Dropping ldda_parent_id column from implicitly_converted_dataset_association table failed: %s" % str( e ) )
| 44.731707
| 134
| 0.741003
| 227
| 1,834
| 5.665198
| 0.281938
| 0.192068
| 0.093313
| 0.2014
| 0.640747
| 0.592535
| 0.533437
| 0.426128
| 0.426128
| 0.426128
| 0
| 0
| 0.18048
| 1,834
| 40
| 135
| 45.85
| 0.855622
| 0.019084
| 0
| 0.322581
| 0
| 0
| 0.336493
| 0.195498
| 0
| 0
| 0
| 0
| 0.032258
| 0
| null | null | 0
| 0.16129
| null | null | 0.096774
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
e6c3d9a702952ceabdb0472e2fb0bedbc90655bc
| 782
|
py
|
Python
|
inventories/models.py
|
destodasoftware/kately_api
|
89e4e80a93ebf8e5d2f2981d108ce5efde75d0dd
|
[
"MIT"
] | null | null | null |
inventories/models.py
|
destodasoftware/kately_api
|
89e4e80a93ebf8e5d2f2981d108ce5efde75d0dd
|
[
"MIT"
] | 10
|
2019-12-04T23:52:31.000Z
|
2022-02-10T08:34:15.000Z
|
inventories/models.py
|
destodasoftware/kately_api
|
89e4e80a93ebf8e5d2f2981d108ce5efde75d0dd
|
[
"MIT"
] | null | null | null |
from django.db import models
from products.models import Product
from utils.models import Utility
class Inventory(Utility):
inventory_number = models.CharField(unique=True, max_length=100, blank=True, null=True)
supplier = models.CharField(max_length=100, blank=True, null=True)
user = models.ForeignKey('auth.User', on_delete=models.SET_NULL, blank=True, null=True)
is_adjusment = models.BooleanField(default=False)
def __str__(self):
return self.inventory_number
class InventoryItem(Utility):
inventory = models.ForeignKey(Inventory, on_delete=models.CASCADE)
product = models.ForeignKey(Product, on_delete=models.CASCADE)
quantity = models.PositiveIntegerField(default=1)
def __str__(self):
return self.product.name
| 27.928571
| 91
| 0.751918
| 99
| 782
| 5.767677
| 0.424242
| 0.047285
| 0.068301
| 0.089317
| 0.171629
| 0.101576
| 0.101576
| 0
| 0
| 0
| 0
| 0.010542
| 0.150895
| 782
| 27
| 92
| 28.962963
| 0.849398
| 0
| 0
| 0.125
| 0
| 0
| 0.011568
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0.1875
| 0.125
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 2
|
e6dbab8094c7c2aea35411b5ea545eabb3be8db0
| 273
|
py
|
Python
|
problem020.py
|
mazayus/ProjectEuler
|
64aebd5d80031fab2f0ef3c44c3a1118212ab613
|
[
"MIT"
] | null | null | null |
problem020.py
|
mazayus/ProjectEuler
|
64aebd5d80031fab2f0ef3c44c3a1118212ab613
|
[
"MIT"
] | null | null | null |
problem020.py
|
mazayus/ProjectEuler
|
64aebd5d80031fab2f0ef3c44c3a1118212ab613
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
from functools import *
import operator
def factorial(number):
assert number >= 1
return reduce(operator.mul, range(1, number+1))
def digits(number):
yield from (int(digit) for digit in str(number))
print(sum(digits(factorial(100))))
| 19.5
| 52
| 0.70696
| 40
| 273
| 4.825
| 0.675
| 0.072539
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030568
| 0.161172
| 273
| 13
| 53
| 21
| 0.812227
| 0.076923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.625
| 0.125
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 2
|
e6df360b607f7a2f24c1ab6bf355ca5d23eb73f0
| 856
|
py
|
Python
|
src/records.py
|
oth-datapipeline/ingestion-scripts
|
48eecf63b0bf06200aa59be63de6839599ec51df
|
[
"Apache-2.0"
] | null | null | null |
src/records.py
|
oth-datapipeline/ingestion-scripts
|
48eecf63b0bf06200aa59be63de6839599ec51df
|
[
"Apache-2.0"
] | 4
|
2022-03-31T16:41:33.000Z
|
2022-03-31T22:58:11.000Z
|
src/records.py
|
oth-datapipeline/ingestion-scripts
|
48eecf63b0bf06200aa59be63de6839599ec51df
|
[
"Apache-2.0"
] | null | null | null |
from faust import Record
class RssFeed(Record, serializer='json'):
feed_source: str
title: str
link: str
published: str = None
author: str = None
summary: str = None
published_parsed: list = None
authors: list = None
tags: list = None
comments: str = None
content: list = None
source: dict = None
class TwitterTrend(Record, serializer='json'):
pass
class Tweet(Record, serializer="json"):
tweet_id: str
text: str
created_at: str
metrics: dict
author: dict
trend: str
place: str = None
hashtags: list = None
class RedditPost(Record, serializer='json'):
id: str
title: str
author: dict
created: str
score: int
upvote_ratio: float
reddit: dict
domain: str = None
url: str = None
comments: list = None
keywords: list = None
| 18.608696
| 46
| 0.627336
| 107
| 856
| 4.971963
| 0.420561
| 0.092105
| 0.150376
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.286215
| 856
| 45
| 47
| 19.022222
| 0.870704
| 0
| 0
| 0.108108
| 0
| 0
| 0.018692
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.027027
| 0.027027
| 0
| 0.972973
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 2
|
e6dfce648d291a8622a4863d4137f07d19b0910a
| 320
|
py
|
Python
|
setup.py
|
shirayu/fitbit-dumper
|
21cee614e294d84204ad06d81dae9adf9853a135
|
[
"Apache-2.0"
] | null | null | null |
setup.py
|
shirayu/fitbit-dumper
|
21cee614e294d84204ad06d81dae9adf9853a135
|
[
"Apache-2.0"
] | null | null | null |
setup.py
|
shirayu/fitbit-dumper
|
21cee614e294d84204ad06d81dae9adf9853a135
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name="",
version="0.01",
packages=find_packages(),
install_requires=[
"fitbit"
],
dependency_links=[
],
extras_require={
"tests": [
"flake8",
"autopep8",
]
}
)
| 15.238095
| 43
| 0.515625
| 28
| 320
| 5.714286
| 0.857143
| 0.15
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028571
| 0.34375
| 320
| 20
| 44
| 16
| 0.733333
| 0.065625
| 0
| 0.117647
| 0
| 0
| 0.097315
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.058824
| 0
| 0.058824
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
e6ea40233a3bb49f837e23e4f39a0fd85da9fe09
| 489
|
py
|
Python
|
vendor/migrations/0003_store_password.py
|
rayhu-osu/vcube
|
ff1af048adb8a9f1007368150a78b309b4d821af
|
[
"MIT"
] | 1
|
2019-02-20T18:47:04.000Z
|
2019-02-20T18:47:04.000Z
|
vendor/migrations/0003_store_password.py
|
rayhu-osu/vcube
|
ff1af048adb8a9f1007368150a78b309b4d821af
|
[
"MIT"
] | null | null | null |
vendor/migrations/0003_store_password.py
|
rayhu-osu/vcube
|
ff1af048adb8a9f1007368150a78b309b4d821af
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-07-24 19:36
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('vendor', '0002_store_image'),
]
operations = [
migrations.AddField(
model_name='store',
name='password',
field=models.CharField(default=1, max_length=30),
preserve_default=False,
),
]
| 22.227273
| 61
| 0.609407
| 54
| 489
| 5.333333
| 0.796296
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.067606
| 0.274029
| 489
| 21
| 62
| 23.285714
| 0.743662
| 0.139059
| 0
| 0
| 1
| 0
| 0.083732
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.071429
| 0.142857
| 0
| 0.357143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 2
|
e6ee404e9353e9098c1662d7447e96af2b5999cf
| 164
|
py
|
Python
|
main.py
|
seton-develops/PDF-Camelot-Folder-Executable
|
168b5c24afe8884cf121a4207d7d3cb3ee7cc626
|
[
"MIT"
] | null | null | null |
main.py
|
seton-develops/PDF-Camelot-Folder-Executable
|
168b5c24afe8884cf121a4207d7d3cb3ee7cc626
|
[
"MIT"
] | null | null | null |
main.py
|
seton-develops/PDF-Camelot-Folder-Executable
|
168b5c24afe8884cf121a4207d7d3cb3ee7cc626
|
[
"MIT"
] | null | null | null |
'''
Created on Jun 17, 2021
@author: Sean
'''
import PDF2CSV_GUI
def main():
j = PDF2CSV_GUI.Convert_GUI()
if __name__ == "__main__":
main()
| 12.615385
| 34
| 0.591463
| 21
| 164
| 4.095238
| 0.761905
| 0.232558
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0.268293
| 164
| 13
| 35
| 12.615385
| 0.65
| 0.231707
| 0
| 0
| 0
| 0
| 0.074766
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
e6eeea99216e21aebde0241d03385a480d8c6df4
| 649
|
py
|
Python
|
src/terrafort/main.py
|
silvercar/terrafort
|
bdf9cb5d7f58d10a0c295c01b3a5620fdcc2876c
|
[
"MIT"
] | 1
|
2019-06-18T00:40:40.000Z
|
2019-06-18T00:40:40.000Z
|
src/terrafort/main.py
|
silvercar/terrafort
|
bdf9cb5d7f58d10a0c295c01b3a5620fdcc2876c
|
[
"MIT"
] | null | null | null |
src/terrafort/main.py
|
silvercar/terrafort
|
bdf9cb5d7f58d10a0c295c01b3a5620fdcc2876c
|
[
"MIT"
] | 1
|
2021-08-25T02:15:28.000Z
|
2021-08-25T02:15:28.000Z
|
"""
Terrafort
Generate terraform templates for specific resources
"""
import click
from .providers.aws import Aws
@click.group()
@click.option('--commands',
is_flag=True,
help="Output import commands instead of a terraform template")
@click.version_option()
@click.pass_context
def cli(ctx, commands=False):
ctx.obj = {'commands': commands}
cli.add_command(Aws.aws_db_instance)
cli.add_command(Aws.aws_iam_instance_profile)
cli.add_command(Aws.aws_instance)
cli.add_command(Aws.aws_security_group)
if __name__ == "__main__":
# pylint: disable=unexpected-keyword-arg,no-value-for-parameter
cli(obj={})
| 22.37931
| 76
| 0.731895
| 88
| 649
| 5.136364
| 0.568182
| 0.053097
| 0.115044
| 0.141593
| 0.20354
| 0.119469
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146379
| 649
| 28
| 77
| 23.178571
| 0.815884
| 0.191063
| 0
| 0
| 1
| 0
| 0.154739
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.0625
| false
| 0.0625
| 0.1875
| 0
| 0.25
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 2
|
fc17f33a601367758a32e2d5faa7f26cd43a27dc
| 1,938
|
py
|
Python
|
bootstrap/p1.5.0/src/common/const.py
|
apurwaj2/df-on-k8s
|
1aecb0bc293d008c5a2384df32ad434bfcc51caa
|
[
"Apache-2.0"
] | null | null | null |
bootstrap/p1.5.0/src/common/const.py
|
apurwaj2/df-on-k8s
|
1aecb0bc293d008c5a2384df32ad434bfcc51caa
|
[
"Apache-2.0"
] | null | null | null |
bootstrap/p1.5.0/src/common/const.py
|
apurwaj2/df-on-k8s
|
1aecb0bc293d008c5a2384df32ad434bfcc51caa
|
[
"Apache-2.0"
] | null | null | null |
class Constants(object):
LOGGER_CONF = "common/mapr_conf/logger.yml"
USERNAME = "mapr"
GROUPNAME = "mapr"
USERID = 5000
GROUPID = 5000
ADMIN_USERNAME = "custadmin"
ADMIN_GROUPNAME = "custadmin"
ADMIN_USERID = 7000
ADMIN_GROUPID = 7000
ADMIN_PASS = "mapr"
MYSQL_USER = "admin"
MYSQL_PASS = "mapr"
LDAPADMIN_USER = "admin"
LDAPADMIN_PASS = "mapr"
LDAPBIND_USER = "readonly"
LDAPBIND_PASS = "mapr"
EXAMPLE_LDAP_NAMESPACE = "hpe-ldap"
CSI_REPO = "quay.io/k8scsi"
KDF_REPO = "docker.io/maprtech" #registry.hub.docker.com/maprtech
KUBEFLOW_REPO = "gcr.io/mapr-252711/kf-ecp-5.3.0"
OPERATOR_REPO = "gcr.io/mapr-252711"
KUBELET_DIR = "/var/lib/kubelet"
ECP_KUBELET_DIR = "/var/lib/docker/kubelet"
LOCAL_PATH_PROVISIONER_REPO= ""
KFCTL_HSP_ISTIO_REPO = ""
BUSYBOX_REPO = ""
def enum(**named_values):
return type('Enum', (), named_values)
AUTH_TYPES = enum(CUSTOM_LDAP='customLDAP', RAW_LINUX_USERS='rawLinuxUsers', EXAMPLE_LDAP='exampleLDAP')
# OPEN SSL
OPENSSL = '/usr/bin/openssl'
KEY_SIZE = 1024
DAYS = 3650
CA_CERT = 'ca.cert'
CA_KEY = 'ca.key'
# http://www.openssl.org/docs/apps/openssl.html#PASS_PHRASE_ARGUMENTS
X509_EXTRA_ARGS = ()
OPENSSL_CONFIG_TEMPLATE = """
prompt = no
distinguished_name = req_distinguished_name
req_extensions = v3_req
[ req_distinguished_name ]
C = US
ST = CO
L = Fort Collins
O = HPE
OU = HCP
CN = %(service)s
emailAddress = [email protected]
[ v3_req ]
# Extensions to add to a certificate request
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
[ alt_names ]
DNS.1 = %(service)s
DNS.2 = %(service)s.%(namespace)s
DNS.3 = %(service)s.%(namespace)s.svc
"""
| 29.363636
| 108
| 0.639835
| 238
| 1,938
| 4.978992
| 0.57563
| 0.027004
| 0.01519
| 0.021941
| 0.032068
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032832
| 0.245614
| 1,938
| 65
| 109
| 29.815385
| 0.777702
| 0.055728
| 0
| 0
| 0
| 0
| 0.493151
| 0.098082
| 0
| 0
| 0
| 0
| 0
| 1
| 0.017241
| false
| 0.068966
| 0
| 0.017241
| 0.637931
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 2
|
fc1d23d6b61a9e5c408d579ed37655541819b9f0
| 23,402
|
py
|
Python
|
callback_handlers.py
|
andrey18106/vocabulary_bot
|
68a5835fb69e255df1766c2ed5c5228daaa4f06f
|
[
"MIT"
] | null | null | null |
callback_handlers.py
|
andrey18106/vocabulary_bot
|
68a5835fb69e255df1766c2ed5c5228daaa4f06f
|
[
"MIT"
] | null | null | null |
callback_handlers.py
|
andrey18106/vocabulary_bot
|
68a5835fb69e255df1766c2ed5c5228daaa4f06f
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# ===== Default imports =====
import asyncio
import logging
# ===== External libs imports =====
from aiogram import Bot, Dispatcher, types
from aiogram.dispatcher import FSMContext
# ===== Local imports =====
from analytics import BotAnalytics
from db_manager import DbManager
from lang_manager import LangManager
from markups_manager import MarkupManager
from states.Dictionary import DictionaryQuizState, DictionaryState, DictionaryEditWordState, DictionarySearchWordState
from states.Mailing import AdminMailingState
import pagination
class VocabularyBotCallbackHandler:
"""Class for Vocabulary Bot callback handlers"""
def __init__(self, db_manager: DbManager, lang_manager: LangManager, markup_manager: MarkupManager,
analytics: BotAnalytics, dispatcher: Dispatcher, bot: Bot):
self.db = db_manager
self.lang = lang_manager
self.markup = markup_manager
self.analytics = analytics
self.dp = dispatcher
self.bot = bot
self.__init_handlers()
def __init_handlers(self):
# CALLBACK HANDLER FOR USER LANGUAGE SETTINGS
@self.dp.callback_query_handler(lambda query: query.data.startswith('lang_setting_'))
@self.analytics.callback_metric
async def language_settings_callback_handler(query: types.CallbackQuery):
"""Handle selecting preferred interface language"""
user_lang = self.lang.parse_user_lang(query['from']['id'])
selected_lang = query['data'][-2:]
if selected_lang != user_lang:
self.db.set_user_lang(query['from']['id'], selected_lang)
await query.message.delete()
await query.message.answer(text=self.lang.get_page_text('LANG_SETTINGS', 'SUCCESS', selected_lang),
reply_markup=self.markup.get_main_menu_markup(selected_lang))
await query.answer()
else:
await query.answer(self.lang.get_page_text('LANG_SETTINGS', 'ERROR', user_lang), show_alert=True)
@self.dp.callback_query_handler(lambda query: query.data.startswith('help_question_'))
@self.analytics.callback_metric
async def help_callback_handler(query: types.CallbackQuery):
"""Handle HELP page question buttons"""
user_id = query['from']['id']
user_lang = self.lang.parse_user_lang(user_id)
question = query['data']
await query.message.edit_text(self.lang.get_page_text("HELP", question, user_lang))
await query.message.edit_reply_markup(self.markup.get_help_back_markup(user_lang))
await query.answer()
@self.dp.callback_query_handler(lambda query: query.data == 'back_to_help')
@self.analytics.callback_metric
async def back_to_help_callback_handler(query: types.CallbackQuery):
"""Handle HELP page question back button"""
user_id = query['from']['id']
user_lang = self.lang.parse_user_lang(user_id)
await query.message.edit_text(self.lang.get_page_text("HELP", "TEXT", user_lang))
await query.message.edit_reply_markup(self.markup.get_help_markup(user_lang))
await query.answer()
@self.dp.callback_query_handler(lambda query: query.data.startswith('settings_'))
@self.analytics.callback_metric
async def settings_page_callback_handler(query: types.CallbackQuery):
"""Handle SETTINGS page buttons"""
user_id = query['from']['id']
user_lang = self.lang.parse_user_lang(user_id)
page = query['data'][9:]
if page == 'interface':
await query.message.edit_text(self.lang.get_page_text("LANG_SETTINGS", "TEXT", user_lang))
await query.message.edit_reply_markup(self.markup.get_lang_settings_markup(user_lang))
await query.answer()
elif page == 'newsletters':
await query.message.edit_text(self.lang.get_page_text("NEWSLETTER_SETTINGS", "TEXT", user_lang))
await query.message.edit_reply_markup(self.markup.get_news_settings_markup(user_lang))
await query.answer()
@self.dp.callback_query_handler(lambda query: query.data.startswith('news_setting_'))
@self.analytics.callback_metric
async def language_settings_callback_handler(query: types.CallbackQuery):
"""Newsletters settings"""
user_lang = self.lang.parse_user_lang(query['from']['id'])
selected_option = query['data'][13:]
user_mailings = self.db.get_user_mailings(query['from']['id'])
mailings_settings = ['disable', 'important', 'all']
if mailings_settings[user_mailings] != selected_option:
if selected_option == 'all' and user_mailings != 2:
self.db.set_user_mailings(query['from']['id'], 2)
elif selected_option == 'important' and user_mailings != 1:
self.db.set_user_mailings(query['from']['id'], 1)
elif selected_option == 'disable' and user_mailings != 0:
self.db.set_user_mailings(query['from']['id'], 0)
await query.message.delete()
await query.message.answer(self.lang.get_page_text("NEWSLETTER_SETTINGS", "SUCCESS", user_lang))
else:
await query.answer(self.lang.get_page_text('NEWSLETTER_SETTINGS', 'ALREADY_SET', user_lang),
show_alert=True)
async def _send_dictionary_page(message: types.Message, user_id: int, user_lang: str, from_lang: str,
to_lang: str, state: FSMContext):
current_state = {
'current_page': 0,
'from_lang': from_lang,
'to_lang': to_lang
}
paginator = getattr(pagination, 'dictionary'.capitalize() + 'Paginator')(self.lang, self.db, self.markup,
user_id,
current_page=current_state)
await message.answer(text=self.lang.get_page_text('DICTIONARY', 'TEXT', user_lang),
reply_markup=self.markup.get_dictionary_markup(user_lang))
await message.answer(text=paginator.first_page(user_lang), reply_markup=paginator.get_reply_markup())
async with state.proxy() as data:
data['curr_pagination_page'] = current_state
await DictionaryState.dictionary.set()
@self.dp.callback_query_handler(lambda query: query.data.startswith('dictionary_'), state="*")
@self.analytics.callback_fsm_metric
async def dictionary_list_callback_handler(query: types.CallbackQuery, state: FSMContext):
user_lang = self.lang.parse_user_lang(query['from']['id'])
selected_dict_pairs = query.data[11:].split('_')
from_lang = selected_dict_pairs[0]
to_lang = selected_dict_pairs[1]
await query.message.delete()
await _send_dictionary_page(query.message, query['from']['id'], user_lang, from_lang, to_lang, state)
# PAGINATION
@self.dp.callback_query_handler(lambda query: query.data.startswith('first_'), state="*")
@self.analytics.callback_fsm_metric
async def pagination_first_callback_handler(query: types.CallbackQuery, state: FSMContext):
action = query.data[6:]
user_lang = self.lang.parse_user_lang(query['from']['id'])
async with state.proxy() as data:
if 'curr_pagination_page' in data:
current_page = data['curr_pagination_page']
paginator = getattr(pagination, action.capitalize() + 'Paginator')(self.lang, self.db, self.markup,
query['from']['id'],
current_page=current_page)
if not paginator.is_first():
await query.message.edit_text(text=paginator.first_page(user_lang),
reply_markup=paginator.get_reply_markup(),
parse_mode=paginator.get_parse_mode())
data['curr_pagination_page'] = paginator.get_state_data()
else:
await query.answer(self.lang.get_page_text('PAGINATION', 'FIRST_REACHED', user_lang),
show_alert=True)
logging.getLogger(type(self).__name__).info(f'[{action}] callback executed.')
await query.answer()
@self.dp.callback_query_handler(lambda query: query.data.startswith('prev_'), state="*")
@self.analytics.callback_fsm_metric
async def pagination_prev_callback_handler(query: types.CallbackQuery, state: FSMContext):
action = query.data[5:]
user_lang = self.lang.parse_user_lang(query['from']['id'])
async with state.proxy() as data:
if 'curr_pagination_page' in data:
current_page = data['curr_pagination_page']
paginator = getattr(pagination, action.capitalize() + 'Paginator')(self.lang, self.db, self.markup,
query['from']['id'],
current_page=current_page)
if not paginator.is_first():
await query.message.edit_text(text=paginator.prev_page(user_lang),
reply_markup=paginator.get_reply_markup(),
parse_mode=paginator.get_parse_mode())
data['curr_pagination_page'] = paginator.get_state_data()
else:
await query.answer(self.lang.get_page_text('PAGINATION', 'FIRST_REACHED', user_lang),
show_alert=True)
logging.getLogger(type(self).__name__).info(f'[{action}] callback executed.')
await query.answer()
@self.dp.callback_query_handler(lambda query: query.data.startswith('next_'), state="*")
@self.analytics.callback_fsm_metric
async def pagination_next_callback_handler(query: types.CallbackQuery, state: FSMContext):
action = query.data[5:]
user_lang = self.lang.parse_user_lang(query['from']['id'])
async with state.proxy() as data:
if 'curr_pagination_page' in data:
current_page = data['curr_pagination_page']
paginator = getattr(pagination, action.capitalize() + 'Paginator')(self.lang, self.db, self.markup,
query['from']['id'],
current_page=current_page)
if not paginator.is_last():
await query.message.edit_text(text=paginator.next_page(user_lang),
reply_markup=paginator.get_reply_markup(),
parse_mode=paginator.get_parse_mode())
data['curr_pagination_page'] = paginator.get_state_data()
else:
await query.answer(self.lang.get_page_text('PAGINATION', 'LAST_REACHED', user_lang),
show_alert=True)
logging.getLogger(type(self).__name__).info(f'[{action}] callback executed.')
await query.answer()
@self.dp.callback_query_handler(lambda query: query.data.startswith('last_'), state="*")
@self.analytics.callback_fsm_metric
async def pagination_last_callback_handler(query: types.CallbackQuery, state: FSMContext):
action = query.data[5:]
user_lang = self.lang.parse_user_lang(query['from']['id'])
async with state.proxy() as data:
if 'curr_pagination_page' in data:
current_page = data['curr_pagination_page']
paginator = getattr(pagination, action.capitalize() + 'Paginator')(self.lang, self.db, self.markup,
query['from']['id'],
current_page=current_page)
if not paginator.is_last():
await query.message.edit_text(text=paginator.last_page(user_lang),
reply_markup=paginator.get_reply_markup(),
parse_mode=paginator.get_parse_mode())
data['curr_pagination_page'] = paginator.get_state_data()
else:
await query.answer(self.lang.get_page_text('PAGINATION', 'LAST_REACHED', user_lang),
show_alert=True)
logging.getLogger(type(self).__name__).info(f'[{action}] callback executed.')
await query.answer()
@self.dp.callback_query_handler(lambda query: query.data == 'profile_referral_link')
@self.analytics.callback_metric
async def profile_referral_link_callback_handler(query: types.CallbackQuery):
user_lang = self.lang.parse_user_lang(query['from']['id'])
await query.message.answer(self.lang.get_user_referral_link_page(query['from']['id'], user_lang))
await query.message.edit_reply_markup(None)
await query.answer()
@self.dp.callback_query_handler(lambda query: query.data.startswith('mailings_'))
@self.analytics.callback_metric
async def admin_mailings_new_callback_handler(query: types.CallbackQuery):
user_lang = self.lang.parse_user_lang(query['from']['id'])
action = query['data'][9:]
if action == 'new':
await AdminMailingState.message.set()
await query.message.delete()
await query.message.answer(text=self.lang.get_page_text('MAILINGS', 'NEW', user_lang),
reply_markup=self.markup.get_cancel_markup())
elif action == 'schedule_list':
await query.answer()
# QUIZ CALLBACKS
@self.dp.callback_query_handler(lambda query: query.data == 'quiz_start', state="*")
@self.analytics.callback_fsm_metric
async def quiz_start_callback_handler(query: types.CallbackQuery, state: FSMContext):
await query.answer()
await query.message.delete()
user_lang = self.lang.parse_user_lang(query['from']['id'])
async with state.proxy() as data:
from_lang = data['curr_pagination_page']['from_lang']
to_lang = data['curr_pagination_page']['to_lang']
quiz_data = self.db.get_user_quiz_data(query['from']['id'], from_lang, to_lang, 10)
await DictionaryQuizState.user_answers.set()
async with state.proxy() as data:
data['quiz_results'] = []
data['quiz_data'] = quiz_data
data['index'] = 1
question = f"{data['index']}/{len(data['quiz_data'])} " + \
self.lang.get_page_text('QUIZ', 'QUESTION', user_lang).format(quiz_data[0]['word'])
await self.bot.send_poll(chat_id=query['from']['id'],
question=question,
options=quiz_data[0]['options'],
correct_option_id=quiz_data[0]['options'].index(quiz_data[0]['answer']),
type='quiz',
reply_markup=self.markup.get_quiz_next_markup(user_lang))
@self.dp.callback_query_handler(state=DictionaryQuizState.user_answers)
@self.analytics.callback_fsm_metric
async def quiz_next_callback_handler(query: types.CallbackQuery, state: FSMContext):
user_lang = self.lang.parse_user_lang(query['from']['id'])
if query.message.poll.total_voter_count == 1:
await query.answer()
await query.message.delete()
async with state.proxy() as data:
curr_q_index = data['index']
quiz_result = {
'word': data['quiz_data'][curr_q_index - 1]['word'],
'selected_option': query.message.poll.options.index(
list(filter(lambda item: item.voter_count == 1,
query.message.poll.options))[0]),
'correct_option': query.message.poll.correct_option_id,
'options': list(map(lambda item: dict(item), query.message.poll.options))
}
data['quiz_results'].append(quiz_result)
if curr_q_index < len(data['quiz_data']) - 1:
data['index'] = curr_q_index + 1
question = f"{data['index']}/{len(data['quiz_data'])} "
else:
question = f"{len(data['quiz_data'])}/{len(data['quiz_data'])} "
await DictionaryQuizState.finish.set()
question += self.lang.get_page_text('QUIZ', 'QUESTION', user_lang).format(
data['quiz_data'][curr_q_index]['word'])
await self.bot.send_poll(chat_id=query['from']['id'],
question=question,
options=data['quiz_data'][curr_q_index]['options'],
correct_option_id=data['quiz_data'][curr_q_index]['options'].index(
data['quiz_data'][curr_q_index]['answer']),
type='quiz',
reply_markup=self.markup.get_quiz_next_markup(user_lang)
if curr_q_index != len(data['quiz_data']) - 1 else
self.markup.get_quiz_finish_markup(user_lang))
else:
await query.answer(self.lang.get_page_text('QUIZ', 'NON_SELECTED', user_lang),
show_alert=True)
@self.dp.callback_query_handler(state=DictionaryQuizState.finish)
@self.analytics.callback_fsm_metric
async def quiz_finish_callback_handler(query: types.CallbackQuery, state: FSMContext):
user_lang = self.lang.parse_user_lang(query['from']['id'])
if query.message.poll.total_voter_count == 1:
await query.answer()
await query.message.delete()
async with state.proxy() as data:
quiz_result = {
'word': data['quiz_data'][data['index']]['word'],
'selected_option': query.message.poll.options.index(
list(filter(lambda item: item.voter_count == 1,
query.message.poll.options))[0]),
'correct_option': query.message.poll.correct_option_id,
'options': list(map(lambda item: dict(item), query.message.poll.options))
}
data['quiz_results'].append(quiz_result)
await query.message.answer(self.lang.get_page_text('QUIZ', 'FINISH', user_lang))
await query.message.answer(self.lang.get_quiz_results_page(data['quiz_results'], user_lang),
parse_mode='Markdown')
last_pagination_page = data['curr_pagination_page']
await state.finish()
await DictionaryState.dictionary.set()
async with state.proxy() as data:
data['curr_pagination_page'] = last_pagination_page
else:
await query.answer(self.lang.get_page_text('QUIZ', 'NON_SELECTED', user_lang),
show_alert=True)
@self.dp.callback_query_handler(state=DictionarySearchWordState.search_query)
@self.analytics.callback_fsm_metric
async def search_word_actions_callback_handler(query: types.CallbackQuery, state: FSMContext):
user_lang = self.lang.parse_user_lang(query['from']['id'])
action = query.data[10:]
if action == 'add':
async with state.proxy() as data:
new_word_string = data['search_query']
new_word_translation = data['translation']
from_lang = data['curr_pagination_page']['from_lang']
to_lang = data['curr_pagination_page']['to_lang']
self.db.add_user_word(new_word_string, new_word_translation, query['from']['id'], from_lang,
to_lang)
await query.message.edit_text(self.lang.get_page_text('ADD_WORD', 'SUCCESSFUL_ADDED', user_lang))
await state.finish()
await asyncio.sleep(1)
await _send_dictionary_page(query.message, query['from']['id'], user_lang, from_lang, to_lang, state)
elif action == 'find_another':
await query.message.delete()
await query.message.answer(text=self.lang.get_page_text('FIND_WORD', 'WELCOME_TEXT', user_lang),
reply_markup=self.markup.get_cancel_markup())
@self.dp.callback_query_handler(state=DictionaryEditWordState.search_query)
@self.analytics.callback_metric
async def edit_word_actions_callback_handler(query: types.CallbackQuery):
user_lang = self.lang.parse_user_lang(query['from']['id'])
action = query.data[10:]
if action == 'string':
await DictionaryEditWordState.new_word_string.set()
await query.message.delete()
await query.message.answer(text=self.lang.get_page_text('EDIT_WORD', 'NEW_STRING', user_lang),
reply_markup=self.markup.get_cancel_markup())
elif action == 'translation':
await DictionaryEditWordState.new_word_translation.set()
await query.message.delete()
await query.message.answer(text=self.lang.get_page_text('EDIT_WORD', 'NEW_TRANSLATION', user_lang),
reply_markup=self.markup.get_cancel_markup())
| 61.746702
| 119
| 0.563499
| 2,437
| 23,402
| 5.135412
| 0.076734
| 0.048582
| 0.029005
| 0.027567
| 0.76684
| 0.752697
| 0.71674
| 0.676468
| 0.632761
| 0.590811
| 0
| 0.002748
| 0.331425
| 23,402
| 378
| 120
| 61.910053
| 0.797137
| 0.009529
| 0
| 0.523669
| 0
| 0
| 0.084704
| 0.006529
| 0
| 0
| 0
| 0
| 0
| 1
| 0.005917
| false
| 0
| 0.038462
| 0
| 0.047337
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
fc267d60ba151acc5fd2bfd47790174a62234e97
| 1,043
|
py
|
Python
|
tests/news_test.py
|
mucciz/News
|
2484d91edaef181d9a6d4b86d6bee822781f931d
|
[
"MIT"
] | null | null | null |
tests/news_test.py
|
mucciz/News
|
2484d91edaef181d9a6d4b86d6bee822781f931d
|
[
"MIT"
] | null | null | null |
tests/news_test.py
|
mucciz/News
|
2484d91edaef181d9a6d4b86d6bee822781f931d
|
[
"MIT"
] | 1
|
2019-07-29T12:45:00.000Z
|
2019-07-29T12:45:00.000Z
|
import unittest
from app.models import News
# News = news.News
class NewsTest(unittest.TestCase):
'''
Test Class to test the behaviour of the Movie class
'''
def setUp(self):
'''
Set up method that will run before every Test
'''
self.new_news = News('abc-news','ABC NEWS','Your trusted source for breaking news, analysis, exclusive interviews, headlines, and videos at ABCNews.com.','http://www.abc.net.au/news','business','au')
def test_instance(self):
self.assertTrue(isinstance(self.new_news,News))
def test_init(self):
self.assertEqual(self.new_news.id,'abc-news')
self.assertEqual(self.new_news.name,'ABC NEWS')
self.assertEqual(self.new_news.description,'Your trusted source for breaking news, analysis, exclusive interviews, headlines, and videos at ABCNews.com.')
self.assertEqual(self.new_news.url,'http://www.abc.net.au/news')
self.assertEqual(self.new_news.country,'au')
# if __name__ == '__main__':
# unittest.main()
| 35.965517
| 207
| 0.67977
| 143
| 1,043
| 4.839161
| 0.412587
| 0.070809
| 0.111272
| 0.15896
| 0.520231
| 0.445087
| 0.352601
| 0.257225
| 0.257225
| 0.257225
| 0
| 0
| 0.190796
| 1,043
| 28
| 208
| 37.25
| 0.819905
| 0.155321
| 0
| 0
| 0
| 0.153846
| 0.371429
| 0
| 0
| 0
| 0
| 0
| 0.461538
| 1
| 0.230769
| false
| 0
| 0.153846
| 0
| 0.461538
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
fc2698b4b0dd35425a260f9ab84e959ae7a54a73
| 365
|
py
|
Python
|
test/get-gh-comment-info.py
|
MQasimSarfraz/cilium
|
89b622cf4e0a960e27e5b1bf9f139abee25dfea0
|
[
"Apache-2.0"
] | 1
|
2020-06-12T19:43:52.000Z
|
2020-06-12T19:43:52.000Z
|
test/get-gh-comment-info.py
|
MQasimSarfraz/cilium
|
89b622cf4e0a960e27e5b1bf9f139abee25dfea0
|
[
"Apache-2.0"
] | null | null | null |
test/get-gh-comment-info.py
|
MQasimSarfraz/cilium
|
89b622cf4e0a960e27e5b1bf9f139abee25dfea0
|
[
"Apache-2.0"
] | 1
|
2020-06-17T07:06:27.000Z
|
2020-06-17T07:06:27.000Z
|
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('ghcomment', type=str) # this is for test-me-please phrases
parser.add_argument('--focus', type=str, default="")
parser.add_argument('--version', type=str, default="")
parser.add_argument('--retrieve', type=str, default="focus")
args = parser.parse_args()
print args.__dict__[args.retrieve]
| 30.416667
| 79
| 0.750685
| 49
| 365
| 5.408163
| 0.489796
| 0.135849
| 0.256604
| 0.150943
| 0.233962
| 0.233962
| 0
| 0
| 0
| 0
| 0
| 0
| 0.082192
| 365
| 11
| 80
| 33.181818
| 0.791045
| 0.093151
| 0
| 0
| 0
| 0
| 0.121581
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.125
| null | null | 0.125
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
fc371494e70184822be6d1e222d5e8799a784228
| 973
|
py
|
Python
|
neorl/rl/baselines/readme.py
|
evdcush/neorl
|
a1af069072e752ab79e7279a88ad95d195a81821
|
[
"MIT"
] | 20
|
2021-04-20T19:15:33.000Z
|
2022-03-19T17:00:12.000Z
|
neorl/rl/baselines/readme.py
|
evdcush/neorl
|
a1af069072e752ab79e7279a88ad95d195a81821
|
[
"MIT"
] | 17
|
2021-04-07T21:52:41.000Z
|
2022-03-06T16:05:31.000Z
|
neorl/rl/baselines/readme.py
|
evdcush/neorl
|
a1af069072e752ab79e7279a88ad95d195a81821
|
[
"MIT"
] | 8
|
2021-05-07T03:36:30.000Z
|
2021-12-15T03:41:41.000Z
|
# This file is part of NEORL.
# Copyright (c) 2021 Exelon Corporation and MIT Nuclear Science and Engineering
# NEORL is free software: you can redistribute it and/or modify
# it under the terms of the MIT LICENSE
# 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.
#NEORL team thanks stable-baselines as we have used their own implementation of different RL
#algorathims to establish NEORL optimizers. We have used the files in this open-source repo:
#https://github.com/hill-a/stable-baselines
| 54.055556
| 94
| 0.74409
| 149
| 973
| 4.85906
| 0.651007
| 0.04558
| 0.027624
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005208
| 0.210689
| 973
| 18
| 95
| 54.055556
| 0.9375
| 0.946557
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
fc3d8c49e88cab357d3bb76422dab0b50f4b1b22
| 702
|
py
|
Python
|
pynotes/note/models.py
|
wallaceleonel/Flash-Cards
|
fd563455d437f77e42ddf96133214cf752b62bb6
|
[
"MIT"
] | 2
|
2020-08-06T15:03:31.000Z
|
2020-10-18T14:40:19.000Z
|
pynotes/note/models.py
|
wallaceleonel/Flash-Cards
|
fd563455d437f77e42ddf96133214cf752b62bb6
|
[
"MIT"
] | 1
|
2020-08-06T16:15:12.000Z
|
2020-08-06T16:15:12.000Z
|
pynotes/note/models.py
|
wallaceleonel/Flash-Cards
|
fd563455d437f77e42ddf96133214cf752b62bb6
|
[
"MIT"
] | null | null | null |
from django.contrib.auth.models import User
from django.db import models
from django.urls import reverse
# Create your models here.
class Post(models.Model):
title = models.CharField(max_length=255)
slug = models.SlugField(max_length=255,unique=True)
#meusite.com/blog;introducao-ao-django
author = models.ForeignKey(User, on_delete=models.CASCADE)
body = models.TextField()
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
class Meta:
ordering = ("-created",)
def __str__(self):
return self.title
def get_absolute_url(self):
return reverse("note:detail", kwargs={"slug": self.slug})
| 27
| 65
| 0.710826
| 92
| 702
| 5.293478
| 0.597826
| 0.061602
| 0.049281
| 0.106776
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010399
| 0.178063
| 702
| 25
| 66
| 28.08
| 0.833622
| 0.086895
| 0
| 0
| 0
| 0
| 0.03605
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0.1875
| 0.125
| 0.9375
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 2
|
fc44182959538bc560fdd3758022cac4683b26ba
| 737
|
py
|
Python
|
api/views/todo_views.py
|
felipe-menelau/todo-list-web
|
9b60a549dc6d5bdd88e1a584b8bb2c4f56131cb5
|
[
"MIT"
] | null | null | null |
api/views/todo_views.py
|
felipe-menelau/todo-list-web
|
9b60a549dc6d5bdd88e1a584b8bb2c4f56131cb5
|
[
"MIT"
] | null | null | null |
api/views/todo_views.py
|
felipe-menelau/todo-list-web
|
9b60a549dc6d5bdd88e1a584b8bb2c4f56131cb5
|
[
"MIT"
] | null | null | null |
from django.contrib.auth.models import User
from rest_framework import viewsets, status
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticated, IsAdminUser
from api.serializers import TODOListSerializer
from api.models import TODOList
class TODOListViewSet(viewsets.ModelViewSet):
permission_classes = [IsAuthenticated]
serializer_class = TODOListSerializer
def get_queryset(self):
user = self.request.user
return TODOList.objects.filter(owner=self.request.user).order_by('created_at')
def create(self, request, *args, **kwargs):
request.data['owner'] = request.user.id
return super(self.__class__, self).create(request, *args, **kwargs)
| 33.5
| 86
| 0.766621
| 87
| 737
| 6.356322
| 0.505747
| 0.0434
| 0.092224
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14654
| 737
| 21
| 87
| 35.095238
| 0.879173
| 0
| 0
| 0
| 0
| 0
| 0.02038
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.133333
| false
| 0
| 0.4
| 0
| 0.866667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 2
|
fc4c938deecee815416606c1468c7d127f759b88
| 364
|
py
|
Python
|
tests/test_langs_fr.py
|
honzajavorek/tipi
|
cbe51192725608b6fba1244a48610ae231b13e08
|
[
"MIT"
] | 3
|
2016-04-13T17:49:09.000Z
|
2017-11-10T22:26:17.000Z
|
tests/test_langs_fr.py
|
honzajavorek/tipi
|
cbe51192725608b6fba1244a48610ae231b13e08
|
[
"MIT"
] | null | null | null |
tests/test_langs_fr.py
|
honzajavorek/tipi
|
cbe51192725608b6fba1244a48610ae231b13e08
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from tipi import tipi as _tipi
tipi = lambda s: _tipi(s, lang='fr')
def test_double_quotes():
assert tipi('''"brutal" "quote's"''') == (
'''«brutal» «quote's»'''
)
def test_single_quotes():
assert tipi("""'brutal' 'quote's'""") == (
"""‹brutal› ‹quote's›"""
)
| 17.333333
| 46
| 0.56044
| 53
| 364
| 3.792453
| 0.490566
| 0.119403
| 0.159204
| 0.218905
| 0.278607
| 0.278607
| 0
| 0
| 0
| 0
| 0
| 0.003534
| 0.222527
| 364
| 20
| 47
| 18.2
| 0.678445
| 0.057692
| 0
| 0
| 0
| 0
| 0.129693
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 1
| 0.222222
| false
| 0
| 0.222222
| 0
| 0.444444
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
fc534b79cb83ef68a1a71a69fd50a17561f7b0a3
| 5,894
|
py
|
Python
|
src/_main_/settings.py
|
gregory-chekler/api
|
11ecbea945e7eb6fa677a0c0bb32bda51ba15f28
|
[
"MIT"
] | null | null | null |
src/_main_/settings.py
|
gregory-chekler/api
|
11ecbea945e7eb6fa677a0c0bb32bda51ba15f28
|
[
"MIT"
] | null | null | null |
src/_main_/settings.py
|
gregory-chekler/api
|
11ecbea945e7eb6fa677a0c0bb32bda51ba15f28
|
[
"MIT"
] | null | null | null |
"""
Django settings for massenergize_portal_backend project.
Generated by 'django-admin startproject' using Django 2.1.4.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
import firebase_admin
from firebase_admin import credentials
from .utils.utils import load_json
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# ******** LOAD CONFIG DATA ***********#
IS_PROD = False
path_to_config = '/_main_/config/massenergizeProdConfig.json' if IS_PROD else '/_main_/config/massenergizeProjectConfig.json'
CONFIG_DATA = load_json(BASE_DIR + path_to_config)
os.environ.update(CONFIG_DATA)
# ******** END LOAD CONFIG DATA ***********#
SECRET_KEY = CONFIG_DATA["SECRET_KEY"]
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = [
'localhost',
'127.0.0.1',
'api.massenergize.org',
'apis.massenergize.org',
'api.massenergize.com',
'apis.massenergize.com',
'api-prod.massenergize.org',
'api.prod.massenergize.org',
'api-dev.massenergize.org',
'api.dev.massenergize.org',
'massenergize-api.wpdvzstek2.us-east-2.elasticbeanstalk.com'
]
INSTALLED_APPS = [
'authentication',
'carbon_calculator',
'database',
'api',
'website',
'corsheaders',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
# 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
#custom middlewares
'authentication.middleware.MassenergizeJWTAuthMiddleware'
]
#-------- FILE STORAGE CONFIGURATION ---------------------#
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
#-------- FILE STORAGE CONFIGURATION ---------------------#
#-------- AWS CONFIGURATION ---------------------#
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY')
AWS_STORAGE_BUCKET_NAME = os.environ.get('AWS_STORAGE_BUCKET_NAME')
AWS_S3_SIGNATURE_VERSION = os.environ.get('AWS_S3_SIGNATURE_VERSION')
AWS_S3_REGION_NAME = os.environ.get('AWS_S3_REGION_NAME')
AWS_DEFAULT_ACL = None
#--------END AWS CONFIGURATION ---------------------#
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_CREDENTIALS = True
DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440*3
ROOT_URLCONF = '_main_.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = '_main_.wsgi.application'
CSRF_COOKIE_SECURE = False
SESSION_COOKIE_SECURE = False
# Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
DATABASES = {
'remote-default': {
'ENGINE' : os.environ.get('DATABASE_ENGINE'),
'NAME' : os.environ.get('DATABASE_NAME'),
'USER' : os.environ.get('DATABASE_USER'),
'PASSWORD' : os.environ.get('DATABASE_PASSWORD'),
'HOST' : os.environ.get('DATABASE_HOST'),
'PORT' : os.environ.get('DATABASE_PORT')
},
'default': {
'ENGINE' : os.environ.get('DATABASE_ENGINE'),
'NAME' : 'gchekler21',
'USER' : '',
'PASSWORD' : '',
'HOST' : 'localhost',
'PORT' : '5555'
},
}
firebase_service_account_path = '/_main_/config/massenergizeProdFirebaseServiceAccount.json' if IS_PROD else '/_main_/config/massenergizeFirebaseServiceAccount.json'
FIREBASE_CREDENTIALS = credentials.Certificate(BASE_DIR + firebase_service_account_path)
firebase_admin.initialize_app(FIREBASE_CREDENTIALS)
# Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = os.environ.get('EMAIL')
DEFAULT_FROM_EMAIL = os.environ.get('EMAIL')
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_PASSWORD')
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
# Simplified static file serving.
STATICFILES_LOCATION = 'static'
MEDIAFILES_LOCATION = 'media'
| 29.918782
| 165
| 0.69172
| 653
| 5,894
| 6.027565
| 0.335375
| 0.036585
| 0.045732
| 0.035569
| 0.198679
| 0.146341
| 0.092226
| 0.071646
| 0.030488
| 0
| 0
| 0.011708
| 0.159484
| 5,894
| 196
| 166
| 30.071429
| 0.782802
| 0.199864
| 0
| 0.015504
| 1
| 0
| 0.455575
| 0.338531
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.062016
| 0.031008
| 0
| 0.031008
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 2
|
fc63dea630bc5c4125015a5d1d443364d31e7cfa
| 1,853
|
py
|
Python
|
trace_analysis/trace_analysis/architecture/interface.py
|
hsgwa/trace_analysis
|
16169f84e838af5202e2be8f4883dfca5bc7f592
|
[
"Apache-2.0"
] | null | null | null |
trace_analysis/trace_analysis/architecture/interface.py
|
hsgwa/trace_analysis
|
16169f84e838af5202e2be8f4883dfca5bc7f592
|
[
"Apache-2.0"
] | null | null | null |
trace_analysis/trace_analysis/architecture/interface.py
|
hsgwa/trace_analysis
|
16169f84e838af5202e2be8f4883dfca5bc7f592
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2021 Research Institute of Systems Planning, Inc.
#
# 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 typing import List, Optional
from abc import ABCMeta, abstractmethod
from trace_analysis.callback import CallbackBase
from trace_analysis.communication import VariablePassing, Communication
from trace_analysis.node import Node
UNDEFINED_STR = "UNDEFINED"
class PathAlias:
def __init__(self, alias: str, callback_names: List[str]):
self.path_name = alias
self.callback_names = callback_names
class ArchitectureInterface(metaclass=ABCMeta):
@property
@abstractmethod
def nodes(self) -> List[Node]:
pass
@property
@abstractmethod
def path_aliases(self) -> List[PathAlias]:
pass
@property
@abstractmethod
def communications(self) -> List[Communication]:
pass
@property
@abstractmethod
def variable_passings(self) -> List[VariablePassing]:
pass
class ArchitectureImporter(ArchitectureInterface):
@abstractmethod
def __init__(self) -> None:
pass
@abstractmethod
def exec(self, path: str, ignore_topics: Optional[List[str]] = None) -> None:
pass
class ArchitectureExporter(metaclass=ABCMeta):
@abstractmethod
def exec(self, architecture: ArchitectureInterface, path) -> None:
pass
| 26.471429
| 81
| 0.72531
| 220
| 1,853
| 6.022727
| 0.490909
| 0.089811
| 0.075472
| 0.06566
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005394
| 0.199676
| 1,853
| 69
| 82
| 26.855072
| 0.888065
| 0.313546
| 0
| 0.473684
| 0
| 0
| 0.007154
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.210526
| false
| 0.236842
| 0.157895
| 0
| 0.473684
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 2
|
fc719b76ab94dd3be6cc776d78a4aa8bbc400d47
| 8,761
|
py
|
Python
|
docusign_esign/models/conditional_recipient_rule_filter.py
|
joekohlsdorf/docusign-esign-python-client
|
40407544f79c88716d36fabf36f65c3ef1a5c3ba
|
[
"MIT"
] | 58
|
2017-10-18T23:06:57.000Z
|
2021-04-15T23:14:58.000Z
|
docusign_esign/models/conditional_recipient_rule_filter.py
|
joekohlsdorf/docusign-esign-python-client
|
40407544f79c88716d36fabf36f65c3ef1a5c3ba
|
[
"MIT"
] | 49
|
2017-10-27T05:54:09.000Z
|
2021-04-29T22:06:17.000Z
|
docusign_esign/models/conditional_recipient_rule_filter.py
|
joekohlsdorf/docusign-esign-python-client
|
40407544f79c88716d36fabf36f65c3ef1a5c3ba
|
[
"MIT"
] | 49
|
2017-09-16T07:23:41.000Z
|
2021-05-07T20:21:20.000Z
|
# coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: [email protected]
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from docusign_esign.client.configuration import Configuration
class ConditionalRecipientRuleFilter(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'operator': 'str',
'recipient_id': 'str',
'scope': 'str',
'tab_id': 'str',
'tab_label': 'str',
'tab_type': 'str',
'value': 'str'
}
attribute_map = {
'operator': 'operator',
'recipient_id': 'recipientId',
'scope': 'scope',
'tab_id': 'tabId',
'tab_label': 'tabLabel',
'tab_type': 'tabType',
'value': 'value'
}
def __init__(self, _configuration=None, **kwargs): # noqa: E501
"""ConditionalRecipientRuleFilter - a model defined in Swagger""" # noqa: E501
if _configuration is None:
_configuration = Configuration()
self._configuration = _configuration
self._operator = None
self._recipient_id = None
self._scope = None
self._tab_id = None
self._tab_label = None
self._tab_type = None
self._value = None
self.discriminator = None
setattr(self, "_{}".format('operator'), kwargs.get('operator', None))
setattr(self, "_{}".format('recipient_id'), kwargs.get('recipient_id', None))
setattr(self, "_{}".format('scope'), kwargs.get('scope', None))
setattr(self, "_{}".format('tab_id'), kwargs.get('tab_id', None))
setattr(self, "_{}".format('tab_label'), kwargs.get('tab_label', None))
setattr(self, "_{}".format('tab_type'), kwargs.get('tab_type', None))
setattr(self, "_{}".format('value'), kwargs.get('value', None))
@property
def operator(self):
"""Gets the operator of this ConditionalRecipientRuleFilter. # noqa: E501
# noqa: E501
:return: The operator of this ConditionalRecipientRuleFilter. # noqa: E501
:rtype: str
"""
return self._operator
@operator.setter
def operator(self, operator):
"""Sets the operator of this ConditionalRecipientRuleFilter.
# noqa: E501
:param operator: The operator of this ConditionalRecipientRuleFilter. # noqa: E501
:type: str
"""
self._operator = operator
@property
def recipient_id(self):
"""Gets the recipient_id of this ConditionalRecipientRuleFilter. # noqa: E501
Unique for the recipient. It is used by the tab element to indicate which recipient is to sign the Document. # noqa: E501
:return: The recipient_id of this ConditionalRecipientRuleFilter. # noqa: E501
:rtype: str
"""
return self._recipient_id
@recipient_id.setter
def recipient_id(self, recipient_id):
"""Sets the recipient_id of this ConditionalRecipientRuleFilter.
Unique for the recipient. It is used by the tab element to indicate which recipient is to sign the Document. # noqa: E501
:param recipient_id: The recipient_id of this ConditionalRecipientRuleFilter. # noqa: E501
:type: str
"""
self._recipient_id = recipient_id
@property
def scope(self):
"""Gets the scope of this ConditionalRecipientRuleFilter. # noqa: E501
# noqa: E501
:return: The scope of this ConditionalRecipientRuleFilter. # noqa: E501
:rtype: str
"""
return self._scope
@scope.setter
def scope(self, scope):
"""Sets the scope of this ConditionalRecipientRuleFilter.
# noqa: E501
:param scope: The scope of this ConditionalRecipientRuleFilter. # noqa: E501
:type: str
"""
self._scope = scope
@property
def tab_id(self):
"""Gets the tab_id of this ConditionalRecipientRuleFilter. # noqa: E501
The unique identifier for the tab. The tabid can be retrieved with the [ML:GET call]. # noqa: E501
:return: The tab_id of this ConditionalRecipientRuleFilter. # noqa: E501
:rtype: str
"""
return self._tab_id
@tab_id.setter
def tab_id(self, tab_id):
"""Sets the tab_id of this ConditionalRecipientRuleFilter.
The unique identifier for the tab. The tabid can be retrieved with the [ML:GET call]. # noqa: E501
:param tab_id: The tab_id of this ConditionalRecipientRuleFilter. # noqa: E501
:type: str
"""
self._tab_id = tab_id
@property
def tab_label(self):
"""Gets the tab_label of this ConditionalRecipientRuleFilter. # noqa: E501
The label string associated with the tab. # noqa: E501
:return: The tab_label of this ConditionalRecipientRuleFilter. # noqa: E501
:rtype: str
"""
return self._tab_label
@tab_label.setter
def tab_label(self, tab_label):
"""Sets the tab_label of this ConditionalRecipientRuleFilter.
The label string associated with the tab. # noqa: E501
:param tab_label: The tab_label of this ConditionalRecipientRuleFilter. # noqa: E501
:type: str
"""
self._tab_label = tab_label
@property
def tab_type(self):
"""Gets the tab_type of this ConditionalRecipientRuleFilter. # noqa: E501
# noqa: E501
:return: The tab_type of this ConditionalRecipientRuleFilter. # noqa: E501
:rtype: str
"""
return self._tab_type
@tab_type.setter
def tab_type(self, tab_type):
"""Sets the tab_type of this ConditionalRecipientRuleFilter.
# noqa: E501
:param tab_type: The tab_type of this ConditionalRecipientRuleFilter. # noqa: E501
:type: str
"""
self._tab_type = tab_type
@property
def value(self):
"""Gets the value of this ConditionalRecipientRuleFilter. # noqa: E501
Specifies the value of the tab. # noqa: E501
:return: The value of this ConditionalRecipientRuleFilter. # noqa: E501
:rtype: str
"""
return self._value
@value.setter
def value(self, value):
"""Sets the value of this ConditionalRecipientRuleFilter.
Specifies the value of the tab. # noqa: E501
:param value: The value of this ConditionalRecipientRuleFilter. # noqa: E501
:type: str
"""
self._value = value
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(ConditionalRecipientRuleFilter, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ConditionalRecipientRuleFilter):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, ConditionalRecipientRuleFilter):
return True
return self.to_dict() != other.to_dict()
| 30.526132
| 140
| 0.604155
| 980
| 8,761
| 5.260204
| 0.154082
| 0.058972
| 0.195538
| 0.186227
| 0.543356
| 0.492338
| 0.459748
| 0.381765
| 0.264016
| 0.130941
| 0
| 0.020029
| 0.299053
| 8,761
| 286
| 141
| 30.632867
| 0.819411
| 0.415934
| 0
| 0.092437
| 0
| 0
| 0.076325
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.168067
| false
| 0
| 0.033613
| 0
| 0.344538
| 0.016807
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
fc72be3f56a4f14c061f7d67ae504148f309762b
| 407
|
py
|
Python
|
conman/routes/apps.py
|
meshy/django-conman
|
c739d09250d02d99068358e925ed8298a2a37a75
|
[
"BSD-2-Clause"
] | null | null | null |
conman/routes/apps.py
|
meshy/django-conman
|
c739d09250d02d99068358e925ed8298a2a37a75
|
[
"BSD-2-Clause"
] | 81
|
2015-07-27T23:21:49.000Z
|
2018-05-21T22:06:09.000Z
|
conman/routes/apps.py
|
meshy/django-conman
|
c739d09250d02d99068358e925ed8298a2a37a75
|
[
"BSD-2-Clause"
] | 2
|
2015-10-06T09:18:06.000Z
|
2017-03-17T08:51:56.000Z
|
from django.apps import AppConfig
from django.core.checks import register
from . import checks
class RouteConfig(AppConfig):
"""The AppConfig for conman routes."""
name = 'conman.routes'
def ready(self):
"""Register checks for conman routes."""
register(checks.polymorphic_installed)
register(checks.subclasses_available)
register(checks.subclasses_in_admin)
| 25.4375
| 48
| 0.712531
| 46
| 407
| 6.217391
| 0.521739
| 0.195804
| 0.104895
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.19656
| 407
| 15
| 49
| 27.133333
| 0.874618
| 0.164619
| 0
| 0
| 0
| 0
| 0.039514
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 2
|
fc8204c97c600cb469a44cb790b0f13a27763c8c
| 115
|
py
|
Python
|
venv/Scripts/ex049.py
|
SamuelNunesDev/starting_point_in_python
|
9a9e39cabb5f3526ee0037012e3943898c1d9dfa
|
[
"MIT"
] | null | null | null |
venv/Scripts/ex049.py
|
SamuelNunesDev/starting_point_in_python
|
9a9e39cabb5f3526ee0037012e3943898c1d9dfa
|
[
"MIT"
] | null | null | null |
venv/Scripts/ex049.py
|
SamuelNunesDev/starting_point_in_python
|
9a9e39cabb5f3526ee0037012e3943898c1d9dfa
|
[
"MIT"
] | null | null | null |
n = int(input('Digite um número para ver sua tabuada: '))
for c in range(0, 11):
print(f'{n} * {c} = {n * c}')
| 28.75
| 57
| 0.556522
| 22
| 115
| 2.909091
| 0.818182
| 0.0625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033708
| 0.226087
| 115
| 3
| 58
| 38.333333
| 0.685393
| 0
| 0
| 0
| 0
| 0
| 0.504348
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
fc8877ba165d31590d2a4b69afb04a74049c312a
| 2,374
|
py
|
Python
|
doepy/case_studies/discrete_time/MSFB2014.py
|
scwolof/doepy
|
acb2cad95428de2c14b28563cff1aa30679e1f39
|
[
"MIT"
] | 1
|
2020-04-23T13:43:35.000Z
|
2020-04-23T13:43:35.000Z
|
doepy/case_studies/discrete_time/MSFB2014.py
|
scwolof/doepy
|
acb2cad95428de2c14b28563cff1aa30679e1f39
|
[
"MIT"
] | null | null | null |
doepy/case_studies/discrete_time/MSFB2014.py
|
scwolof/doepy
|
acb2cad95428de2c14b28563cff1aa30679e1f39
|
[
"MIT"
] | 1
|
2021-06-13T14:38:32.000Z
|
2021-06-13T14:38:32.000Z
|
"""
MIT License
Copyright (c) 2019 Simon Olofsson
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.
"""
import numpy as np
from scipy.integrate import odeint
from ..continuous_time import MSFB2014
"""
A. Mesbah, S. Streif, R. Findeisen and R. D. Braatz (2014)
"Active fault diagnosis for nonlinear systems with probabilistic uncertainties"
IFAC Proceedings (2014): 7079-7084
"""
class Model (MSFB2014.Model):
def __init__ (self, name):
super().__init__(name)
def __call__ (self, x, u, p):
f = lambda x,t: self._ode_func(x,u,p)
t = np.linspace(0, self.dt, 51)
X = odeint(f, x, t)
return X[-1]
class M1 (Model):
"""
Nominal scenario (no fault)
"""
def __init__ (self):
super().__init__('M1')
self._ode_func = MSFB2014.M1()
self.p0 = self._ode_func.p0
class M2 (Model):
"""
Multiplicative actuator fault in inlet pump
"""
def __init__ (self):
super().__init__('M2')
self._ode_func = MSFB2014.M2()
self.p0 = self._ode_func.p0
class M3 (Model):
"""
Circular leak in tank
"""
def __init__ (self):
super().__init__('M3')
self._ode_func = MSFB2014.M3()
self.p0 = self._ode_func.p0
class DataGen (M2):
def __init__ (self):
super().__init__()
self.true_param = np.array([ 0.97, 0.82, 0.96, 0.67 ])
def __call__ (self, x, u):
return super().__call__(x, u, self.true_param)
def get ():
return DataGen(), [M1(), M2(), M3()]
| 27.287356
| 79
| 0.717776
| 366
| 2,374
| 4.467213
| 0.461749
| 0.053823
| 0.047095
| 0.039144
| 0.108869
| 0.044037
| 0.044037
| 0
| 0
| 0
| 0
| 0.038442
| 0.17818
| 2,374
| 87
| 80
| 27.287356
| 0.79959
| 0.490312
| 0
| 0.205882
| 0
| 0
| 0.00603
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.235294
| false
| 0
| 0.088235
| 0.058824
| 0.558824
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 2
|
fc9e61eaa32db4519807b4a581c10259cbb744fa
| 342
|
py
|
Python
|
src/framed/bioreactor/__init__.py
|
cdanielmachado/framed
|
36d56437685cbf5c7c3c8ee4f6d85b8f05f4d345
|
[
"Apache-2.0"
] | 25
|
2015-01-07T16:17:03.000Z
|
2022-01-24T09:11:50.000Z
|
src/framed/bioreactor/__init__.py
|
cdanielmachado/framed
|
36d56437685cbf5c7c3c8ee4f6d85b8f05f4d345
|
[
"Apache-2.0"
] | 12
|
2016-02-18T12:50:09.000Z
|
2020-12-18T08:56:44.000Z
|
src/framed/bioreactor/__init__.py
|
cdanielmachado/framed
|
36d56437685cbf5c7c3c8ee4f6d85b8f05f4d345
|
[
"Apache-2.0"
] | 14
|
2015-02-17T14:55:27.000Z
|
2021-08-09T17:57:57.000Z
|
from __future__ import absolute_import
__author__ = 'kaizhuang'
"""
Package implementing features for simulating bioreactor operation.
"""
from .base import Organism, Bioreactor
from .bioreactors import ANAEROBIC, AEROBIC, MICROAEROBIC
from .bioreactors import Bioreactor_ox, IdealBatch, IdealFedbatch
from framed.bioreactor.dfba import *
| 26.307692
| 66
| 0.821637
| 37
| 342
| 7.324324
| 0.648649
| 0.110701
| 0.154982
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116959
| 342
| 12
| 67
| 28.5
| 0.897351
| 0
| 0
| 0
| 0
| 0
| 0.033835
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.833333
| 0
| 0.833333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 2
|
fca090b48edd697b40f1657878d06ed9d6efca81
| 909
|
py
|
Python
|
keras_en_parser_and_analyzer/library/tests/test_detect_date.py
|
Sultan91/keras-english-resume-parser-and-analyzer
|
221407cb0231e4c21f8edc61a2b19b74f9585d6a
|
[
"MIT"
] | null | null | null |
keras_en_parser_and_analyzer/library/tests/test_detect_date.py
|
Sultan91/keras-english-resume-parser-and-analyzer
|
221407cb0231e4c21f8edc61a2b19b74f9585d6a
|
[
"MIT"
] | null | null | null |
keras_en_parser_and_analyzer/library/tests/test_detect_date.py
|
Sultan91/keras-english-resume-parser-and-analyzer
|
221407cb0231e4c21f8edc61a2b19b74f9585d6a
|
[
"MIT"
] | null | null | null |
from unittest import TestCase
from datetime import date
from keras_en_parser_and_analyzer.library.pipmp_my_cv_classify import detect_date
class DetectDate(TestCase):
def test_detect_date(self):
dates_to_test = ['10-1990', '09/12/2020', 'jan 1990', 'feb 2012', '9-12-2020']
res = detect_date(dates_to_test[0])
self.assertEqual(10, res.month)
self.assertEqual(1990, res.year)
res = detect_date(dates_to_test[1])
self.assertEqual(9, res.month)
self.assertEqual(2020, res.year)
res = detect_date(dates_to_test[2])
self.assertEqual(1, res.month)
self.assertEqual(1990, res.year)
res = detect_date(dates_to_test[3])
self.assertEqual(2, res.month)
self.assertEqual(2012, res.year)
res = detect_date(dates_to_test[4])
self.assertEqual(9, res.month)
self.assertEqual(2020, res.year)
| 36.36
| 86
| 0.669967
| 130
| 909
| 4.476923
| 0.323077
| 0.257732
| 0.113402
| 0.154639
| 0.506873
| 0.506873
| 0.465636
| 0.465636
| 0.371134
| 0.371134
| 0
| 0.084034
| 0.214521
| 909
| 24
| 87
| 37.875
| 0.731092
| 0
| 0
| 0.285714
| 0
| 0
| 0.046256
| 0
| 0
| 0
| 0
| 0
| 0.47619
| 1
| 0.047619
| false
| 0
| 0.142857
| 0
| 0.238095
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
5d8b272fb8d2699d2cf3ea1fd7de71c67f398d16
| 1,130
|
py
|
Python
|
Code/DataHandlers/__init__.py
|
aricsanders/pyMez3
|
13e2b9900af2287db0cc42a0190d31da165ce174
|
[
"Unlicense"
] | 2
|
2017-01-29T00:46:01.000Z
|
2017-07-25T17:23:04.000Z
|
Code/DataHandlers/__init__.py
|
aricsanders/pyMez3
|
13e2b9900af2287db0cc42a0190d31da165ce174
|
[
"Unlicense"
] | 1
|
2019-08-02T03:59:41.000Z
|
2019-08-02T03:59:41.000Z
|
Code/DataHandlers/__init__.py
|
aricsanders/pyMez3
|
13e2b9900af2287db0cc42a0190d31da165ce174
|
[
"Unlicense"
] | null | null | null |
"""
The DataHandlers subpackage is designed to manipulate data, by allowing different data types to be opened,
created, saved and updated. The subpackage is further divided into modules grouped by a common theme. Classes for data
that are already on disk normally follows the following pattern:
`instance=ClassName(file_path,**options)`
For Example to
open a XML file that you don't know the model, use
`xml=pyMez.Code.DataHandlers.XMLModels.XMLBase('MyXML.xml')'
or
`xml=XMLBase('MyXML.xml')`
All data models normally have save(), str() and if appropriate show() methods.
Examples
--------
<a href="../../../Examples/How_To_Open_S2p.html"> How to open a s2p file </a>
Import Structure
----------------
DataHandlers typically import from Utils but __NOT__ from Analysis, InstrumentControl or FrontEnds
Help
-----
<a href="../index.html">`pyMez.Code`</a>
<div>
<a href="../../../pyMez_Documentation.html">Documentation Home</a> |
<a href="../../index.html">API Documentation Home</a> |
<a href="../../../Examples/html/Examples_Home.html">Examples</a> |
<a href="../../../Reference_Index.html">Index </a>
</div>
"""
| 25.681818
| 118
| 0.70531
| 162
| 1,130
| 4.851852
| 0.54321
| 0.038168
| 0.022901
| 0.035623
| 0.058524
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00202
| 0.123894
| 1,130
| 43
| 119
| 26.27907
| 0.791919
| 0.986726
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
5d922c20991f9207f7464898983a068c11cac2a8
| 1,625
|
py
|
Python
|
lcls_orbit/__init__.py
|
slaclab/lcls-orbit
|
e2b8738c4af2dfed40fce4b898bf9b2a820d5f56
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
lcls_orbit/__init__.py
|
slaclab/lcls-orbit
|
e2b8738c4af2dfed40fce4b898bf9b2a820d5f56
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
lcls_orbit/__init__.py
|
slaclab/lcls-orbit
|
e2b8738c4af2dfed40fce4b898bf9b2a820d5f56
|
[
"BSD-3-Clause-LBNL"
] | 1
|
2021-11-16T01:03:53.000Z
|
2021-11-16T01:03:53.000Z
|
import numpy as np
from . import _version
__version__ = _version.get_versions()['version']
HXR_COLORS = ("#000000", "#02004a", "#030069", "#04008f", "#0500b3", "#0700ff")
SXR_COLORS = ("#000000", "#330000", "#520000", "#850000", "#ad0000", "#ff0000")
HXR_AREAS = {
"GUN" : [2017.911, 2018.712],
"L0" : [2018.712, 2024.791],
"DL1_1": [2024.791, 2031.992],
"DL1_2": [2031.992, 2035.035],
"L1": [2035.035, 2044.167],
"BC1": [2044.167, 2059.733],
"L2": [2059.733, 2410.698],
"BC2": [2410.698, 2438.400],
"L3": [2438.400, 3042.005],
"CLTH_0": [3042.005, 3050.512],
"CLTH_1": [3050.512, 3058.457],
"CLTH_2": [3058.457, 3110.961],
"BSYH_1": [3110.961, 3117.409],
"BSYH_2": [3117.409, 3224.022],
"LTUH": [3224.022, 3562.739],
"UNDH": [3562.739, 3718.483],
"DMPH_1": [3718.483, 3734.407],
"DMPH_2": [3734.407, 3765.481]
}
HXR_AREAS = {np.mean(value): key for key, value in HXR_AREAS.items()}
SXR_AREAS = {
"GUN" : [2017.911, 2017.911],
"L0" : [2018.712, 2024.791],
"DL1_1": [2024.791, 2031.992],
"DL1_2": [2031.992, 2035.035],
"L1": [2035.035, 2044.167],
"BC1": [2044.167, 2059.733],
"L2": [2059.733, 2410.698],
"BC2": [2410.698, 2438.400],
"L3": [2438.400, 3042.005],
"CLTH_0": [3042.005, 3050.512],
"CLTH_1": [3050.512, 3058.457],
"CLTS": [3177.650, 3224.022],
"BSYS": [3224.022, 3565.656],
"LTUS": [3565.656, 3718.483],
"UNDS": [3718.483, 3734.407],
"DMPS_1": [3734.407, 3734.407],
"DMPS_2": [3734.407, 3765.481]
}
SXR_AREAS = {np.mean(value): key for key, value in SXR_AREAS.items()}
| 30.660377
| 79
| 0.563077
| 248
| 1,625
| 3.568548
| 0.370968
| 0.047458
| 0.027119
| 0.033898
| 0.494915
| 0.461017
| 0.461017
| 0.461017
| 0.461017
| 0.388701
| 0
| 0.443432
| 0.189538
| 1,625
| 53
| 80
| 30.660377
| 0.22855
| 0
| 0
| 0.434783
| 0
| 0
| 0.144526
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.043478
| 0
| 0.043478
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
5d9653a594b04879fa4c04919b21be2e555546ba
| 1,033
|
py
|
Python
|
webcrawler/crawler/spiders/baselensspider.py
|
HansZimmer5000/LensComparison
|
e4d9b68211604c4569c4ca9b1e1b4fce2a8c1ea8
|
[
"Apache-2.0"
] | null | null | null |
webcrawler/crawler/spiders/baselensspider.py
|
HansZimmer5000/LensComparison
|
e4d9b68211604c4569c4ca9b1e1b4fce2a8c1ea8
|
[
"Apache-2.0"
] | null | null | null |
webcrawler/crawler/spiders/baselensspider.py
|
HansZimmer5000/LensComparison
|
e4d9b68211604c4569c4ca9b1e1b4fce2a8c1ea8
|
[
"Apache-2.0"
] | null | null | null |
# This module is about my webcrawler with the use of scrapy.
# Its a generell web crawler, but the import and use of GhAdapter makes it usefull for geizhals.de sites.
from abc import ABC, abstractmethod
import scrapy
class BaseLensSpider(scrapy.Spider, ABC):
@property
@abstractmethod
def adapter(self):
raise NotImplementedError()
#TODO: make the start_url thing abstract and initialliy with a call to adapter.START_URLS
@abstractmethod
def parse_lens_page(self, response):
raise NotImplementedError()
@abstractmethod
def create_lens_page_requests(self,response):
raise NotImplementedError()
@abstractmethod
def create_overview_page_request(self, response):
raise NotImplementedError()
def parse_overview_page(self,response):
for lens_page_request in self.create_lens_page_requests(response):
yield lens_page_request
for overview_page_request in self.create_overview_page_request(response):
yield overview_page_request
def parse(self, response):
return self.parse_overview_page(response)
| 27.184211
| 105
| 0.804453
| 140
| 1,033
| 5.735714
| 0.428571
| 0.089664
| 0.094645
| 0.134496
| 0.204234
| 0.146949
| 0.146949
| 0
| 0
| 0
| 0
| 0
| 0.135528
| 1,033
| 37
| 106
| 27.918919
| 0.899216
| 0.242014
| 0
| 0.347826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027027
| 0
| 1
| 0.26087
| false
| 0
| 0.086957
| 0.043478
| 0.434783
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
5d9ff4014ab10b4aacbc6a629a0aa9ded18d3d4a
| 895
|
py
|
Python
|
setup.py
|
philippWassibauer/django-activity-stream
|
766a372aea4803ef5fe051a5de16dde5b5efcc72
|
[
"BSD-3-Clause"
] | 4
|
2015-05-21T04:28:43.000Z
|
2019-04-27T15:12:32.000Z
|
setup.py
|
philippWassibauer/django-activity-stream
|
766a372aea4803ef5fe051a5de16dde5b5efcc72
|
[
"BSD-3-Clause"
] | null | null | null |
setup.py
|
philippWassibauer/django-activity-stream
|
766a372aea4803ef5fe051a5de16dde5b5efcc72
|
[
"BSD-3-Clause"
] | 2
|
2018-02-10T22:31:07.000Z
|
2021-02-14T07:43:35.000Z
|
from distutils.core import setup
""" django-activity-stream instalation script """
setup(
name = 'activity_stream',
description = 'generic activity feed system for users',
author = 'Philipp Wassibauer',
author_email = '[email protected]',
url='http://github.com/philippWassibauer/django-activity-stream',
download_url='http://github.com/philippWassibauer/django-activity-stream/tarball/master',
license='MIT',
version = __import__('activity_stream').__version__,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
| 33.148148
| 93
| 0.660335
| 86
| 895
| 6.732558
| 0.662791
| 0.120898
| 0.103627
| 0.055268
| 0.183074
| 0.183074
| 0.183074
| 0.183074
| 0
| 0
| 0
| 0.001412
| 0.208939
| 895
| 26
| 94
| 34.423077
| 0.816384
| 0
| 0
| 0
| 0
| 0
| 0.604982
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.095238
| 0
| 0.095238
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
5da53bca28edc1a3193db977a15e4f5897d0d909
| 2,569
|
py
|
Python
|
xl_auth/settings.py
|
libris/xl_auth
|
33d705c287d2ecd81920d37c3751d947cd52588c
|
[
"Apache-2.0"
] | 7
|
2017-09-04T10:24:02.000Z
|
2019-12-02T13:12:30.000Z
|
xl_auth/settings.py
|
libris/xl_auth
|
33d705c287d2ecd81920d37c3751d947cd52588c
|
[
"Apache-2.0"
] | 140
|
2017-09-06T07:02:18.000Z
|
2022-02-26T01:26:25.000Z
|
xl_auth/settings.py
|
libris/xl_auth
|
33d705c287d2ecd81920d37c3751d947cd52588c
|
[
"Apache-2.0"
] | 2
|
2017-09-13T16:42:57.000Z
|
2018-02-15T15:32:40.000Z
|
# -*- coding: utf-8 -*-
"""Application configuration."""
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from . import __author__, __name__, __version__
class Config(object):
"""Base configuration."""
SERVER_NAME = os.environ.get('SERVER_NAME', None)
PREFERRED_URL_SCHEME = os.environ.get('PREFERRED_URL_SCHEME', 'http')
APP_NAME = __name__
APP_VERSION = __version__
APP_AUTHOR = __author__
JSON_AS_ASCII = False
SECRET_KEY = os.environ.get('XL_AUTH_SECRET', 'secret-key') # TODO: Change me
APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory.
PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir))
BCRYPT_LOG_ROUNDS = 13
DEBUG_TB_ENABLED = False # Disable Debug toolbar.
DEBUG_TB_INTERCEPT_REDIRECTS = False
CACHE_TYPE = 'simple' # Can be "memcached", "redis", etc.
SQLALCHEMY_TRACK_MODIFICATIONS = False
WEBPACK_MANIFEST_PATH = 'webpack/manifest.json'
BABEL_DEFAULT_LOCALE = os.environ.get('BABEL_DEFAULT_LOCALE', 'sv')
BABEL_DEFAULT_TIMEZONE = 'utc'
EMAIL_DEFAULT_FROM = os.environ.get('EMAIL_DEFAULT_FROM', '[email protected]')
EMAIL_HOST = os.environ.get('EMAIL_HOST', 'smtp.kb.se')
EMAIL_PORT = int(os.environ.get('EMAIL_PORT', '25'))
EMAIL_TIMEOUT = int(os.environ.get('EMAIL_TIMEOUT', '5'))
OAUTH2_PROVIDER_TOKEN_EXPIRES_IN = 36000
XL_AUTH_MAX_ACTIVE_PASSWORD_RESETS = 2
XL_AUTH_FAILED_LOGIN_TIMEFRAME = 60 * 60
XL_AUTH_FAILED_LOGIN_MAX_ATTEMPTS = 7
class ProdConfig(Config):
"""Production configuration."""
ENV = 'prod'
DEBUG = False
SQLALCHEMY_DATABASE_URI = os.environ.get('SQLALCHEMY_DATABASE_URI',
'postgresql://localhost/example')
DEBUG_TB_ENABLED = False # Disable Debug toolbar.
class DevConfig(Config):
"""Development configuration."""
ENV = 'dev'
DEBUG = True
DB_NAME = 'dev.db'
# Put the db file in project root
DB_PATH = os.path.join(Config.PROJECT_ROOT, DB_NAME)
SQLALCHEMY_DATABASE_URI = 'sqlite:///{0}'.format(DB_PATH)
DEBUG_TB_ENABLED = True
CACHE_TYPE = 'simple' # Can be "memcached", "redis", etc.
class TestConfig(Config):
"""Test configuration."""
TESTING = True
DEBUG = True
SQLALCHEMY_DATABASE_URI = 'sqlite://'
# For faster tests; needs at least 4 to avoid "ValueError: Invalid rounds".
BCRYPT_LOG_ROUNDS = 4
WTF_CSRF_ENABLED = False # Allows form testing.
EMAIL_BACKEND = 'flask_emails.backends.DummyBackend'
| 34.716216
| 82
| 0.696769
| 329
| 2,569
| 5.069909
| 0.465046
| 0.048561
| 0.064748
| 0.040767
| 0.136691
| 0.089928
| 0.089928
| 0.044365
| 0
| 0
| 0
| 0.010091
| 0.189957
| 2,569
| 73
| 83
| 35.191781
| 0.791446
| 0.161541
| 0
| 0.12
| 0
| 0
| 0.149127
| 0.050967
| 0
| 0
| 0
| 0.013699
| 0
| 1
| 0
| false
| 0.02
| 0.06
| 0
| 0.98
| 0.02
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 2
|
5dcb43dbc68228752388169be1e8b17fd1bf9290
| 112
|
py
|
Python
|
recsys/__init__.py
|
shenghuiliuu/recsys
|
d706d1ae2558816c1e11ca790baeb7748200b404
|
[
"MIT"
] | 50
|
2016-10-27T07:28:35.000Z
|
2022-03-30T01:32:32.000Z
|
recsys/__init__.py
|
shenghuiliuu/recsys
|
d706d1ae2558816c1e11ca790baeb7748200b404
|
[
"MIT"
] | 5
|
2016-11-10T16:22:37.000Z
|
2020-09-16T10:26:59.000Z
|
recsys/__init__.py
|
shenghuiliuu/recsys
|
d706d1ae2558816c1e11ca790baeb7748200b404
|
[
"MIT"
] | 22
|
2016-11-19T08:56:22.000Z
|
2021-06-23T16:13:10.000Z
|
__all__ = ['cross_validation',
'metrics',
'datasets',
'recommender']
| 14
| 31
| 0.4375
| 6
| 112
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.4375
| 112
| 7
| 32
| 16
| 0.698413
| 0
| 0
| 0
| 0
| 0
| 0.411765
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
5dd208f2225a11d0691db8c3c2975ede5f79f7f1
| 3,470
|
py
|
Python
|
util/dataset.py
|
MTI830PyTraders/pytrade
|
33ea3e756019c999e9c3d78fca89cd72addf6ab2
|
[
"BSD-3-Clause"
] | 3
|
2017-03-08T15:42:26.000Z
|
2021-03-10T23:47:15.000Z
|
util/dataset.py
|
fraka6/pytrade
|
8a94b6e1b3922dcba95067c03abbf45975878b33
|
[
"BSD-3-Clause"
] | 15
|
2015-05-20T03:11:58.000Z
|
2018-03-30T23:42:18.000Z
|
util/dataset.py
|
MTI830PyTraders/pytrade
|
33ea3e756019c999e9c3d78fca89cd72addf6ab2
|
[
"BSD-3-Clause"
] | 7
|
2016-04-12T09:49:22.000Z
|
2021-03-10T23:47:19.000Z
|
#!/usr/bin/python
''' generate dataset '''
import csv
import argparse
import numpy as np
import sklearn.metrics
import theanets
from sklearn.metrics import accuracy_score
import logging
from trendStrategy import OptTrendStrategy, TrendStrategy
from util import visu
def compare(stock, field='orders', strategy="TrendStrategy_predicted", best=OptTrendStrategy.__name__):
best_fname="{0}_{1}_{2}.csv".format(stock, best, field)
predicted_fname="{0}_{1}_{2}.csv".format(stock, strategy, field)
print "comparing",best_fname,predicted_fname
best_data = np.loadtxt(best_fname, usecols=[1], delimiter=',')
predicted_data = np.loadtxt(predicted_fname, usecols=[1], delimiter=',')
min_size = min(len(best_data), len(predicted_data))
title = "%s vs %s" %(best, strategy)
visu.compare(best_data[-min_size:], predicted_data[-min_size:], title)
def load_dataset(stock, ratio=0.8, name=OptTrendStrategy.__name__):
''' return train, valid (x,y) '''
orders = np.loadtxt("{0}_{1}_orders.csv".format(stock, name), usecols=[1], delimiter=',')
orders[orders==-1]=0
features = np.loadtxt("{0}_input.csv".format(stock), delimiter=',')
if len(orders)!=len(features):
logging.error("len(orders)!=len(features) -> %s!=%s" %(len(orders),len(features)))
features = features.astype('f')
orders = orders.astype('i')
pos = round(len(features)*ratio)
train = (features[:pos], orders[:pos])
valid = (features[pos:], orders[pos:])
return train, valid
def evaluate(exp, dataset):
y_true = dataset[1]
y_pred = exp.network.predict(dataset[0])
print(sklearn.metrics.confusion_matrix(y_true, y_pred))
print('accuracy:',accuracy_score(y_true, y_pred))
def train_strategy(stock, ratio=0.8, min_improvement=0.001):
train, valid = load_dataset(stock)
n, n_input = train[0].shape
exp = theanets.Experiment(
theanets.Classifier,
layers=(n_input, n_input*2, 2),
)
exp.train(train, valid, min_improvement=min_improvement,
algo='sgd',
learning_rate=0.01,
momentum=0.5,
hidden_l1=0.001,
weight_l2=0.001,
num_updates=100
)
print('training:')
evaluate(exp, train)
print('validation:')
evaluate(exp, valid)
exp.save('%s.nn' %stock)
return exp
def load_strategy(name, verbose=False):
print("loading %s trained strategy" %name)
train, valid = load_dataset(name)
n, n_input = train[0].shape
exp = theanets.Experiment(
theanets.Classifier,
layers=(n_input, n_input*2, 2),
)
exp.load('%s.nn' %name)
if verbose:
print('training:')
evaluate(exp, train)
print('validation:')
evaluate(exp, valid)
return exp
if __name__ == "__main__":
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--stock', '-s', default="TSLA", help='stock')
parser.add_argument('--ratio', '-r', default=0.8, type=int, help='train/valid ratio')
parser.add_argument('--min', '-m', default=0.001, type=int, help='min improvement (stop learning)')
parser.add_argument('--field', default='orders', help='compare field')
args = parser.parse_args()
if args.field:
compare(args.stock, args.field)
train, valid = load_dataset(args.stock)
exp = train_strategy(args.stock, args.ratio, args.min)
exp = load_strategy(args.stock, True)
| 35.408163
| 103
| 0.653602
| 453
| 3,470
| 4.834437
| 0.262693
| 0.031963
| 0.025571
| 0.027397
| 0.147945
| 0.147945
| 0.147945
| 0.127854
| 0.127854
| 0.127854
| 0
| 0.019244
| 0.191354
| 3,470
| 97
| 104
| 35.773196
| 0.761226
| 0.004611
| 0
| 0.216867
| 1
| 0
| 0.10424
| 0.014429
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.108434
| null | null | 0.096386
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
5dde83861306805019c9d0827dc8148db30e9997
| 373
|
py
|
Python
|
fizzbuzz.py
|
vagnes/fizzbuzzgame
|
de72ffc5a21fbb3b1cfd930ef632b75697fa830f
|
[
"WTFPL"
] | null | null | null |
fizzbuzz.py
|
vagnes/fizzbuzzgame
|
de72ffc5a21fbb3b1cfd930ef632b75697fa830f
|
[
"WTFPL"
] | null | null | null |
fizzbuzz.py
|
vagnes/fizzbuzzgame
|
de72ffc5a21fbb3b1cfd930ef632b75697fa830f
|
[
"WTFPL"
] | null | null | null |
print("Press q to quit")
quit = False
while quit is False:
in_val = input("Please enter a positive integer.\n > ")
if in_val is 'q':
quit = True
elif int(in_val) % 3 == 0 and int(in_val) % 5 == 0:
print("FizzBuzz")
elif int(in_val) % 5 == 0:
print("Buzz")
elif int(in_val) % 3 == 0:
print("Fizz")
else:
pass
| 23.3125
| 59
| 0.530831
| 59
| 373
| 3.254237
| 0.508475
| 0.15625
| 0.166667
| 0.1875
| 0.302083
| 0.302083
| 0
| 0
| 0
| 0
| 0
| 0.031746
| 0.324397
| 373
| 15
| 60
| 24.866667
| 0.730159
| 0
| 0
| 0
| 0
| 0
| 0.184987
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.071429
| 0
| 0
| 0
| 0.285714
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 2
|
5de7879bccf37dcddacbf558d1addbcf9aa0f808
| 1,366
|
py
|
Python
|
rhoci/test/routes.py
|
ahmedmagdyawaad/redhat-ci-dashboard
|
a9c0445add4e99bb44a8075752a62176968278df
|
[
"Apache-2.0"
] | 8
|
2017-06-29T19:38:40.000Z
|
2021-07-25T18:55:37.000Z
|
rhoci/test/routes.py
|
ahmedmagdyawaad/redhat-ci-dashboard
|
a9c0445add4e99bb44a8075752a62176968278df
|
[
"Apache-2.0"
] | 39
|
2017-06-21T07:35:02.000Z
|
2018-02-26T11:25:03.000Z
|
rhoci/test/routes.py
|
ahmedmagdyawaad/redhat-ci-dashboard
|
a9c0445add4e99bb44a8075752a62176968278df
|
[
"Apache-2.0"
] | 7
|
2018-01-24T10:31:00.000Z
|
2021-09-18T12:27:46.000Z
|
# Copyright 2019 Arie Bregman
#
# 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 __future__ import absolute_import
from flask import current_app as app
from flask import render_template
from flask import url_for
import logging
LOG = logging.getLogger(__name__)
from rhoci.test import bp # noqa
@bp.route('/index')
@bp.route('/')
def index():
"""All tests."""
jenkins_url = app.config['custom']['jenkins']['url']
uf = url_for('api.all_tests')
return render_template('tests/index.html',
jenkins_url=jenkins_url,
uf=uf)
@bp.route('/class/<class_name>/name/<name>')
def test(class_name, name):
"""Specific test summary."""
uf = url_for('api.test_to_jobs', class_name=class_name, test_name=name)
return render_template('tests/test_to_jobs.html', uf=uf)
| 32.52381
| 78
| 0.694729
| 197
| 1,366
| 4.670051
| 0.48731
| 0.065217
| 0.048913
| 0.034783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007346
| 0.202782
| 1,366
| 41
| 79
| 33.317073
| 0.837466
| 0.451684
| 0
| 0
| 0
| 0
| 0.168276
| 0.074483
| 0
| 0
| 0
| 0
| 0
| 1
| 0.105263
| false
| 0
| 0.315789
| 0
| 0.526316
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 2
|
5dfd3f4f20e57ebcb5265eb99e3913785aac266b
| 517
|
py
|
Python
|
objectModel/Python/cdm/persistence/cdmfolder/types/purpose_reference.py
|
wheatdog/CDM
|
8b6698f4a8b4f44132b12d97f9f261afcfeb798c
|
[
"CC-BY-4.0",
"MIT"
] | null | null | null |
objectModel/Python/cdm/persistence/cdmfolder/types/purpose_reference.py
|
wheatdog/CDM
|
8b6698f4a8b4f44132b12d97f9f261afcfeb798c
|
[
"CC-BY-4.0",
"MIT"
] | 3
|
2021-05-11T22:31:59.000Z
|
2021-08-04T04:04:18.000Z
|
objectModel/Python/cdm/persistence/cdmfolder/types/purpose_reference.py
|
wheatdog/CDM
|
8b6698f4a8b4f44132b12d97f9f261afcfeb798c
|
[
"CC-BY-4.0",
"MIT"
] | null | null | null |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
from typing import Union, List
from .purpose import *
from .trait_reference import TraitReference
from cdm.utilities import JObject
class PurposeReference(JObject):
def __init__(self):
super().__init__()
self.purposeReference = None # type: Union[str, Purpose]
self.appliedTraits = [] # type: List[Union[str, TraitReference]]
| 30.411765
| 94
| 0.733075
| 63
| 517
| 5.888889
| 0.666667
| 0.043127
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 517
| 16
| 95
| 32.3125
| 0.874704
| 0.415861
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.444444
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 2
|
5dffed5f88346db8858c1e4167f535bc237800cb
| 349
|
py
|
Python
|
local/utils/validate_label_locale.py
|
DewiBrynJones/docker-deepspeech-cy
|
99159a746651bd848a8309da7f676045913f3d25
|
[
"MIT"
] | 3
|
2018-10-11T20:11:28.000Z
|
2019-02-01T02:46:46.000Z
|
local/utils/validate_label_locale.py
|
DewiBrynJones/docker-deepspeech-cy
|
99159a746651bd848a8309da7f676045913f3d25
|
[
"MIT"
] | 1
|
2021-01-23T12:56:31.000Z
|
2021-01-27T15:32:38.000Z
|
local/utils/validate_label_locale.py
|
techiaith/docker-deepspeech-cy
|
99159a746651bd848a8309da7f676045913f3d25
|
[
"MIT"
] | 6
|
2018-09-24T13:59:53.000Z
|
2018-10-23T09:29:46.000Z
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from clean_transcript import clean_transcript
ALPHABET_FILE_PATH = "/DeepSpeech/bin/bangor_welsh/alphabet.txt"
def validate_label(label):
clean = clean_transcript(ALPHABET_FILE_PATH)
cleaned, transcript = clean.clean(label)
if cleaned:
return transcript.lower()
return None
| 23.266667
| 64
| 0.730659
| 44
| 349
| 5.590909
| 0.590909
| 0.182927
| 0.186992
| 0.219512
| 0.252033
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006849
| 0.163324
| 349
| 14
| 65
| 24.928571
| 0.835616
| 0.123209
| 0
| 0
| 0
| 0
| 0.134868
| 0.134868
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0.125
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
b90426c42855fd2a5119f138e577d0e9dbffc737
| 297
|
py
|
Python
|
setup.py
|
def-mycroft/rapid-plotly
|
87ba5d9e6894e2c3288435aae9a377647b006e79
|
[
"MIT"
] | 1
|
2018-11-19T16:23:31.000Z
|
2018-11-19T16:23:31.000Z
|
setup.py
|
def-mycroft/rapid-plotly
|
87ba5d9e6894e2c3288435aae9a377647b006e79
|
[
"MIT"
] | 10
|
2018-11-26T17:20:12.000Z
|
2019-05-06T14:29:54.000Z
|
setup.py
|
def-mycroft/rapid-plotly
|
87ba5d9e6894e2c3288435aae9a377647b006e79
|
[
"MIT"
] | null | null | null |
from setuptools import setup
setup(name='rapid_plotly',
version='0.1',
description='Convenience functions to rapidly create beautiful Plotly graphs',
author='Joseph Dasenbrock',
author_email='[email protected]',
packages=['rapid_plotly'],
zip_safe=False)
| 29.7
| 84
| 0.703704
| 34
| 297
| 6.029412
| 0.852941
| 0.107317
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008299
| 0.188552
| 297
| 9
| 85
| 33
| 0.842324
| 0
| 0
| 0
| 0
| 0
| 0.434343
| 0.074074
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.125
| 0
| 0.125
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
b904eadc54bfc2aeedb89068e48092d072692ffd
| 620
|
py
|
Python
|
learn/hard-way/EmptyFileError.py
|
hustbill/Python-auto
|
9f43bc2613a64a373927047ac52d8e90ffe644f8
|
[
"Apache-2.0"
] | null | null | null |
learn/hard-way/EmptyFileError.py
|
hustbill/Python-auto
|
9f43bc2613a64a373927047ac52d8e90ffe644f8
|
[
"Apache-2.0"
] | null | null | null |
learn/hard-way/EmptyFileError.py
|
hustbill/Python-auto
|
9f43bc2613a64a373927047ac52d8e90ffe644f8
|
[
"Apache-2.0"
] | null | null | null |
class EmptyFileError(Exception):
pass
filenames = ["myfile1", "nonExistent", "emptyFile", "myfile2"]
for file in filenames:
try:
f = open(file, 'r')
line = f.readline()
if line == "":
f.close()
raise EmptyFileError("%s: is empty" % file)
# except IOError as error:
# print("%s: could not be opened: %s" % (file, error.strerror)
## except EmptyFileError as error:
# print(error)
# else:
# print("%s: %s" % (file, f.readline()))
# finally:
# print("Done processing", file)
| 31
| 73
| 0.504839
| 63
| 620
| 4.968254
| 0.603175
| 0.031949
| 0.076677
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004963
| 0.35
| 620
| 19
| 74
| 32.631579
| 0.771712
| 0.469355
| 0
| 0
| 0
| 0
| 0.148265
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.1
| 0
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 2
|
b905bf0f95f0e168b31539b1c4fa3ef57493a4f1
| 1,220
|
py
|
Python
|
test/integration/languages/test_mixed.py
|
thomasrockhu/bfg9000
|
1cd1226eab9bed2fc2ec6acccf7864fdcf2ed31a
|
[
"BSD-3-Clause"
] | 72
|
2015-06-23T02:35:13.000Z
|
2021-12-08T01:47:40.000Z
|
test/integration/languages/test_mixed.py
|
thomasrockhu/bfg9000
|
1cd1226eab9bed2fc2ec6acccf7864fdcf2ed31a
|
[
"BSD-3-Clause"
] | 139
|
2015-03-01T18:48:17.000Z
|
2021-06-18T15:45:14.000Z
|
test/integration/languages/test_mixed.py
|
thomasrockhu/bfg9000
|
1cd1226eab9bed2fc2ec6acccf7864fdcf2ed31a
|
[
"BSD-3-Clause"
] | 19
|
2015-12-23T21:24:33.000Z
|
2022-01-06T04:04:41.000Z
|
import os.path
from .. import *
class TestMixed(IntegrationTest):
def __init__(self, *args, **kwargs):
super().__init__(os.path.join('languages', 'mixed'), *args, **kwargs)
def test_build(self):
self.build(executable('program'))
self.assertOutput([executable('program')], 'hello from c++!\n')
class TestMixedLibrary(IntegrationTest):
def __init__(self, *args, **kwargs):
super().__init__(os.path.join('languages', 'mixed_library'), *args,
**kwargs)
def test_build(self):
self.build(executable('program'))
self.assertOutput([executable('program')], 'hello, library!\n')
@skip_if('fortran' not in test_features, 'skipping fortran tests')
# XXX: This fails on macOS, probably because of a version mismatch somewhere.
@skip_if(env.host_platform.genus == 'darwin', 'fortran on os x is weird')
class TestMixedFortran(IntegrationTest):
def __init__(self, *args, **kwargs):
super().__init__(os.path.join('languages', 'mixed_fortran'), *args,
**kwargs)
def test_build(self):
self.build(executable('program'))
self.assertOutput([executable('program')], 'hello from f77!\n')
| 33.888889
| 77
| 0.644262
| 140
| 1,220
| 5.378571
| 0.4
| 0.079681
| 0.087649
| 0.103586
| 0.64409
| 0.64409
| 0.64409
| 0.64409
| 0.64409
| 0.64409
| 0
| 0.002043
| 0.197541
| 1,220
| 35
| 78
| 34.857143
| 0.767109
| 0.061475
| 0
| 0.458333
| 0
| 0
| 0.183727
| 0
| 0
| 0
| 0
| 0
| 0.125
| 1
| 0.25
| false
| 0
| 0.083333
| 0
| 0.458333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
f8d7e5ead057431bae183bbe4b52bcbc1bde7f4d
| 962
|
py
|
Python
|
var/spack/repos/builtin/packages/r-xts/package.py
|
kehw/spack
|
4f49b1a9301447a8cf880c99820cad65e5c2d7e3
|
[
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2
|
2020-09-10T22:50:08.000Z
|
2021-01-12T22:18:54.000Z
|
var/spack/repos/builtin/packages/r-xts/package.py
|
kehw/spack
|
4f49b1a9301447a8cf880c99820cad65e5c2d7e3
|
[
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 14
|
2021-07-20T01:04:53.000Z
|
2022-03-02T01:08:36.000Z
|
var/spack/repos/builtin/packages/r-xts/package.py
|
kehw/spack
|
4f49b1a9301447a8cf880c99820cad65e5c2d7e3
|
[
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1
|
2021-05-06T00:17:46.000Z
|
2021-05-06T00:17:46.000Z
|
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RXts(RPackage):
"""Provide for uniform handling of R's different time-based data classes by
extending zoo, maximizing native format information preservation and
allowing for user level customization and extension, while simplifying
cross-class interoperability."""
homepage = "http://r-forge.r-project.org/projects/xts/"
url = "https://cloud.r-project.org/src/contrib/xts_0.11-2.tar.gz"
list_url = "https://cloud.r-project.org/src/contrib/Archive/xts"
version('0.11-2', sha256='12772f6a66aab5b84b0665c470f11a3d8d8a992955c027261cfe8e6077ee13b8')
version('0.9-7', sha256='f11f7cb98f4b92b7f6632a2151257914130880c267736ef5a264b5dc2dfb7098')
depends_on('[email protected]:', type=('build', 'run'))
| 41.826087
| 96
| 0.748441
| 124
| 962
| 5.782258
| 0.717742
| 0.033473
| 0.046025
| 0.039052
| 0.09484
| 0.09484
| 0.09484
| 0.09484
| 0
| 0
| 0
| 0.143029
| 0.135135
| 962
| 22
| 97
| 43.727273
| 0.71875
| 0.449064
| 0
| 0
| 0
| 0.125
| 0.609037
| 0.251473
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.125
| 0
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 2
|
f8dde6ce7a9ea138ac9fe3fc5e28f791075d3425
| 454
|
py
|
Python
|
src/site/config.py
|
ninaamorim/sentiment-analysis-2018-president-election
|
a5c12f1b659186edbc2dfa916bc82a2cfa2dd67f
|
[
"MIT"
] | 39
|
2018-09-05T14:42:05.000Z
|
2021-09-24T20:21:56.000Z
|
src/site/config.py
|
ninaamorim/sentiment-analysis-2018-president-election
|
a5c12f1b659186edbc2dfa916bc82a2cfa2dd67f
|
[
"MIT"
] | null | null | null |
src/site/config.py
|
ninaamorim/sentiment-analysis-2018-president-election
|
a5c12f1b659186edbc2dfa916bc82a2cfa2dd67f
|
[
"MIT"
] | 11
|
2018-12-07T19:43:44.000Z
|
2021-05-21T21:54:43.000Z
|
from starlette.applications import Starlette
from starlette.middleware.gzip import GZipMiddleware
from starlette.middleware.cors import CORSMiddleware
from starlette.staticfiles import StaticFiles
app = Starlette(debug=False, template_directory='src/site/templates')
app.add_middleware(GZipMiddleware, minimum_size=500)
app.add_middleware(CORSMiddleware, allow_origins=['*'])
app.mount('/static', StaticFiles(directory='src/site/media'), name='static')
| 45.4
| 76
| 0.830396
| 54
| 454
| 6.888889
| 0.518519
| 0.139785
| 0.123656
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007042
| 0.061674
| 454
| 9
| 77
| 50.444444
| 0.866197
| 0
| 0
| 0
| 0
| 0
| 0.101322
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 2
|
f8f72bfabd477794319287090180fb8cb1c3008e
| 2,059
|
py
|
Python
|
Sec_10_expr_lambdas_fun_integradas/a_lambdas.py
|
PauloAlexSilva/Python
|
690913cdcfd8bde52d9ddd15e3c838e6aef27730
|
[
"MIT"
] | null | null | null |
Sec_10_expr_lambdas_fun_integradas/a_lambdas.py
|
PauloAlexSilva/Python
|
690913cdcfd8bde52d9ddd15e3c838e6aef27730
|
[
"MIT"
] | null | null | null |
Sec_10_expr_lambdas_fun_integradas/a_lambdas.py
|
PauloAlexSilva/Python
|
690913cdcfd8bde52d9ddd15e3c838e6aef27730
|
[
"MIT"
] | null | null | null |
"""
Utilizando Lambdas
Conhecidas por Expressões Lambdas, ou simplesmente Lambdas, são funções sem nome, ou seja,
funções anónimas.
# Função em Python
def funcao(x):
return 3 * x + 1
print(funcao(4))
print(funcao(7))
# Expressão Lambda
lambda x: 3 * x + 1
# Como utlizar a expressão lambda?
calc = lambda x: 3 * x + 1
print(calc(4))
print(calc(7))
# Podemos ter expressões lambdas com múltiplas entradas
nome_compelto = lambda nome, sobrenome: nome.strip().title() + ' ' + sobrenome.strip().title()
print(nome_compelto(' paulo', ' SILVA '))
print(nome_compelto(' MARIA ', ' albertina '))
# Em funções Python podemos ter nenhuma ou várias entradas. Em Lambdas também
hello = lambda: 'Hello World!'
uma = lambda x: 3 * x + 1
duas = lambda x, y: (x * y) ** 0.5
tres = lambda x, y, z: 3 / (1 / x + 1 / 7 + 1 / z)
# n = lambda x1, x2, ..., xn: <expressão>
print(hello())
print(uma(6))
print(duas(5, 7))
print(tres(3, 6, 9))
# OBS: Se passarmos mais argumentos do que parâmetros esperados teremos TypeError
# Exemplo
autores = ['Paulo Silva', 'Maria Albertina', 'Luis Marques Nunes', 'Carlos Nunes',
'Ana S. Leitão', 'Inês Garcia', 'Claudia Sofia', 'I. L. Antunes',
'Américo Silva']
print(autores)
# ['Paulo Silva', 'Maria Albertina', 'Luis Marques Nunes', 'Carlos Nunes',
# 'Ana S. Leitão', 'Inês Garcia', 'Claudia Sofia', 'I. L. Antunes', 'Américo Silva']
# Ordenar pelo sobrenome
autores.sort(key=lambda sobrenome: sobrenome.split(' ')[-1].lower())
print(autores)
# ['Maria Albertina', 'I. L. Antunes', 'Inês Garcia', 'Ana S. Leitão',
# 'Luis Marques Nunes', 'Carlos Nunes', 'Paulo Silva', 'Américo Silva', 'Claudia Sofia']
"""
# Função Quadrática
# f(x) = a * x ** 2 + b * x + c
# Definindo a função
def geradora_funcao_quadratica(a, b, c):
"""
Retorna a função f(x) = a * x ** 2 + b * x + c
"""
return lambda x: a * x ** 2 + b * x + c
teste = geradora_funcao_quadratica(2, 3, -5)
print(teste(0))
print(teste(1))
print(teste(2))
print(geradora_funcao_quadratica(3, 0, 1)(2))
| 20.79798
| 94
| 0.641088
| 303
| 2,059
| 4.326733
| 0.349835
| 0.032037
| 0.009153
| 0.020595
| 0.230359
| 0.18688
| 0.18688
| 0.181541
| 0.169336
| 0.169336
| 0
| 0.024848
| 0.19864
| 2,059
| 98
| 95
| 21.010204
| 0.769697
| 0.86984
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0
| 0
| 0.285714
| 0.571429
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 2
|
5d0c13bd9ead504a51ba033deca97415ff355734
| 17,858
|
py
|
Python
|
Titanic/class_create_model_of_logistic_regression.py
|
ysh329/Titanic-Machine-Learning-from-Disaster
|
d2ba330625e40b648b2946a8ca221198af148368
|
[
"MIT"
] | 1
|
2018-07-23T08:41:02.000Z
|
2018-07-23T08:41:02.000Z
|
Titanic/class_create_model_of_logistic_regression.py
|
ysh329/Titanic-Machine-Learning-from-Disaster
|
d2ba330625e40b648b2946a8ca221198af148368
|
[
"MIT"
] | null | null | null |
Titanic/class_create_model_of_logistic_regression.py
|
ysh329/Titanic-Machine-Learning-from-Disaster
|
d2ba330625e40b648b2946a8ca221198af148368
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# !/usr/bin/python
################################### PART0 DESCRIPTION #################################
# Filename: class_create_model_of_logistic_regression.py
# Description:
#
# Author: Shuai Yuan
# E-mail: [email protected]
# Create: 2016-01-23 23:32:49
# Last:
__author__ = 'yuens'
################################### PART1 IMPORT ######################################
import MySQLdb
import logging
import time
import pylab
from numpy import *
from math import exp
import csv
import decorator_of_function
################################### PART2 CLASS && FUNCTION ###########################
class CreateLogisticRegressionModel(object):
Decorator = decorator_of_function.CreateDecorator()
@Decorator.log_of_function
def __init__(self):
self.start = time.clock()
logging.basicConfig(level = logging.INFO,
format = '%(asctime)s %(levelname)5s %(filename)19s[line:%(lineno)3d] %(funcName)s %(message)s',
datefmt = '%y-%m-%d %H:%M:%S',
filename = 'main.log',
filemode = 'a')
console = logging.StreamHandler()
console.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s %(levelname)5s %(filename)19s[line:%(lineno)3d] %(funcName)s %(message)s')
console.setFormatter(formatter)
logging.getLogger('').addHandler(console)
logging.info("START CLASS {class_name}.".format(class_name = CreateLogisticRegressionModel.__name__))
try:
self.con = MySQLdb.connect(host='localhost', user='root', passwd='931209', charset='utf8')
logging.info("Success in connecting MySQL.")
except MySQLdb.Error, e:
logging.error("Fail in connecting MySQL.")
logging.error("MySQL Error {error_num}: {error_info}.".format(error_num = e.args[0], error_info = e.args[1]))
@Decorator.log_of_function
def __del__(self):
try:
self.con.close()
logging.info("Success in quiting MySQL.")
except MySQLdb.Error, e:
self.con.rollback()
logging.error("Fail in quiting MySQL.")
logging.error("MySQL Error {error_num}: {error_info}.".format(error_num = e.args[0], error_info = e.args[1]))
logging.info("END CLASS {class_name}.".format(class_name = CreateLogisticRegressionModel.__name__))
self.end = time.clock()
logging.info("The class {class_name} run time is : {delta_time} seconds".format(class_name = CreateLogisticRegressionModel.__name__, delta_time = self.end - self.start))
@Decorator.log_of_function
def get_data_from_database(self, database_name, passenger_table_name):
cursor = self.con.cursor()
sql_list = []
# training set
sql_list.append("""SELECT PassengerId, Survived, Pclass, Sex, Age, SibSp, Parch FROM {database_name}.{table_name} WHERE Is_train=1"""\
.format(database_name = database_name,\
table_name = passenger_table_name)\
)
# test set
sql_list.append("""SELECT PassengerId, Survived, Pclass, Sex, Age, SibSp, Parch FROM {database_name}.{table_name} WHERE Is_train=0"""\
.format(database_name = database_name,\
table_name = passenger_table_name)\
)
for sql_idx in xrange(len(sql_list)):
sql = sql_list[sql_idx]
try:
cursor.execute(sql)
if sql_idx == 0:
train_data = cursor.fetchall()
logging.info("len(train_data):{0}".format(len(train_data)))
logging.info("train_data[0]:{0}".format(train_data[0]))
logging.info("type(train_data[0]):{0}".format(type(train_data[0])))
elif sql_idx == 1:
test_data = cursor.fetchall()
logging.info("len(test_data):{0}".format(len(test_data)))
logging.info("test_data[0]:{0}".format(test_data[0]))
logging.info("type(test_data[0]):{0}".format(type(test_data[0])))
except MySQLdb.Error, e:
self.con.rollback()
logging.error("Fail in fetch data from MySQL.")
logging.error("MySQL Error {error_num}: {error_info}.".format(error_num = e.args[0], error_info = e.args[1]))
train_data = map(lambda (PassengerId, Survived, Pclass, Sex, Age, SibSp, Parch):\
(int(PassengerId),\
int(Survived),\
int(Pclass),\
Sex,\
int(Age),\
int(SibSp),\
int(Parch)\
),\
train_data)
logging.info("len(train_data):{0}".format(len(train_data)))
logging.info("train_data[0]:{0}".format(train_data[0]))
logging.info("type(train_data[0]):{0}".format(type(train_data[0])))
test_data = map(lambda (PassengerId, Survived, Pclass, Sex, Age, SibSp, Parch):\
(int(PassengerId),\
int(Survived),\
int(Pclass),\
Sex,\
int(Age),\
int(SibSp),\
int(Parch)\
),\
test_data)
logging.info("len(test_data):{0}".format(len(test_data)))
logging.info("test_data[0]:{0}".format(test_data[0]))
logging.info("type(test_data[0]):{0}".format(type(test_data[0])))
return train_data, test_data
@Decorator.log_of_function
def add_intercept_term(self, train_feature_tuple_list, test_feature_tuple_list):
logging.info("len(train_feature_tuple_list[0]):{0}".format(len(train_feature_tuple_list[0])))
logging.info("len(train_feature_tuple_list):{0}".format(len(train_feature_tuple_list)))
logging.info("train_feature_tuple_list[0]:{0}".format(train_feature_tuple_list[0]))
logging.info("test_feature_tuple_list[0]:{0}".format(len(test_feature_tuple_list[0])))
logging.info("len(test_feature_tuple_list):{0}".format(len(test_feature_tuple_list)))
logging.info("test_feature_tuple_list[0]:{0}".format(test_feature_tuple_list[0]))
# len(train_feature_tuple_list[0]): 7
# PassengerId, Pclass, Sex, Age, SibSp, Parch, Fare
train_feature_intercept_term_added_tuple_list = map(lambda (PassengerId, Pclass, Sex, Age, SibSp, Parch, Fare): \
(PassengerId, 1.0, Pclass, Sex, Age, SibSp, Parch, Fare),\
train_feature_tuple_list)
test_feature_intercept_term_added_tuple_list = map(lambda (PassengerId, Pclass, Sex, Age, SibSp, Parch, Fare): \
(PassengerId, 1.0, Pclass, Sex, Age, SibSp, Parch, Fare),\
test_feature_tuple_list)
logging.info("len(train_feature_intercept_term_added_tuple_list):{0}".format(len(train_feature_intercept_term_added_tuple_list)))
logging.info("train_feature_intercept_term_added_tuple_list[0]:{0}".format(train_feature_intercept_term_added_tuple_list[0]))
logging.info("len(test_feature_intercept_term_added_tuple_list):{0}".format(len(test_feature_intercept_term_added_tuple_list)))
logging.info("test_feature_intercept_term_added_tuple_list[0]:{0}".format(test_feature_intercept_term_added_tuple_list[0]))
return train_feature_intercept_term_added_tuple_list,\
test_feature_intercept_term_added_tuple_list
@Decorator.log_of_function
def sigmoid_function(self, inX):
return 1.0 / (1.0 + exp(-inX))
@Decorator.log_of_function
def gradient_descent(self, train_feature_tuple_list, train_label_list, learning_rate = 0.01, max_iteration_time = 500, lambda_regularization = 0.1):
############################
# Initial parameters
# learning_rate = 0.01
# max_iteration_time = 500
############################
'''
train_feature_tuple_list_without_PassengerId = map(lambda (PassengerId, InterceptTerm, Pclass, Sex, Age, SibSp, Parch, Fare):\
(InterceptTerm, Pclass, Sex, Age, SibSp, Parch, Fare),\
train_feature_tuple_list)
'''
train_feature_tuple_list_without_PassengerId = map(lambda (PassengerId, InterceptTerm, Pclass, Sex, Age, SibSp, Parch, Fare):\
(InterceptTerm, Sex, Fare),\
train_feature_tuple_list)
# [891, 7]
train_input_matrix = mat(train_feature_tuple_list_without_PassengerId)
# [891, 1]
train_label_matrix = mat(train_label_list).transpose()
train_sample_num, feature_num = shape(train_input_matrix)
weight_matrix = ones((feature_num, 1))
cost_list = []
error_list = []
optimal_solution = {}
for cur_iter in xrange(max_iteration_time):
# [891, 1] <- [891, 7]*[7, 1]
hypothesis = self.sigmoid_function(train_input_matrix * weight_matrix)
# real <- sum([891, 1]T*[891, 1] + [891, 1]T*[891, 1])
cost = -float(1) / (train_sample_num) * \
sum( train_label_matrix.transpose()*log(hypothesis) + (1-train_label_matrix.transpose())*log(1-hypothesis) ) + \
lambda_regularization / (2*train_sample_num) * (array(weight_matrix[1:]) * array(weight_matrix[1:])).sum()
cost_list.append(cost)
# [891, 1]
error = train_label_matrix - hypothesis
error_list.append(error)
logging.info("cur_iter:{0}, cost:{1}, sum(error):{2}".format(cur_iter+1, cost, sum(error)))
# 1 = 1 + 1 * [891, 1].T *[891, 1]
weight_matrix[0] = weight_matrix[0] + learning_rate * (float(1)/train_sample_num) * train_input_matrix[:, 0].transpose() * error
# [6, 1] = [6, 1] + 1 * \
# ( 1 / 1 * [891, 6].T * [891, 1]
# )
weight_matrix[1:] = weight_matrix[1:] + learning_rate * \
( (float(1)/train_sample_num) * train_input_matrix[:, 1::].transpose() * error - \
float(lambda_regularization) / train_sample_num * weight_matrix[1:] \
)
#weight_matrix = weight_matrix + learning_rate * train_input_matrix.transpose() * error
#"""
# find optimal solution
if cur_iter == 0:
optimal_solution['cur_iter'] = cur_iter
optimal_solution['cost'] = cost
optimal_solution['abs(error.sum())'] = abs(error.sum())
optimal_solution['weight_matrix'] = weight_matrix
elif cur_iter != 0 and optimal_solution['abs(error.sum())'] > abs(error.sum()):
optimal_solution['cur_iter'] = cur_iter
optimal_solution['cost'] = cost
optimal_solution['abs(error.sum())'] = abs(error.sum())
optimal_solution['weight_matrix'] = weight_matrix
logging.info("optimal_solution['cur_iter']:{0}".format(optimal_solution['cur_iter']))
logging.info("optimal_solution['cost':{0}".format(optimal_solution['cost']))
logging.info("optimal_solution['abs(error.sum())']:{0}".format(optimal_solution['abs(error.sum())']))
logging.info("optimal_solution['weight_matrix'].tolist():{0}".format(optimal_solution['weight_matrix'].tolist()))
#"""
pylab.plot(cost_list)
pylab.show()
return weight_matrix
#return optimal_solution['weight_matrix']
@Decorator.log_of_function
def predict(self, train_feature_tuple_list, weight_matrix):
'''
train_feature_tuple_list_without_PassengerId = map(lambda (PassengerId, InterceptTerm, Pclass, Sex, Age, SibSp, Parch, Fare):\
(InterceptTerm, Pclass, Sex, Age, SibSp, Parch, Fare),\
train_feature_tuple_list)
'''
train_feature_tuple_list_without_PassengerId = map(lambda (PassengerId, InterceptTerm, Pclass, Sex, Age, SibSp, Parch, Fare):\
(InterceptTerm, Sex, Fare),\
train_feature_tuple_list)
train_input_matrix = mat(train_feature_tuple_list_without_PassengerId)
predict_prob_matrix = self.sigmoid_function(train_input_matrix * weight_matrix)
'''
row, col = shape(predict_label_matrix)
for i in xrange(row):
print i+1, predict_label_matrix[i][0]
'''
predict_prob_list = predict_prob_matrix.transpose().tolist()[0]
predict_label_list = []
for prob_idx in xrange(len(predict_prob_list)):
predict_prob = predict_prob_list[prob_idx]
if predict_prob > 0.5:
predict_label_list.append(1)
else:
predict_label_list.append(0)
return predict_label_list
@Decorator.log_of_function
def accuracy(self, train_label_list, predict_label_list):
logging.info("len(train_label_list):{0}".format(len(train_label_list)))
logging.info("len(predict_label_list):{0}".format(len(predict_label_list)))
# compute accuracy
def compute_accuracy(train_label_list, predict_label_list):
right_predict_num = 0
if len(train_label_list) == len(predict_label_list):
for idx in xrange(len(train_label_list)):
if train_label_list[idx] == predict_label_list[idx]:
right_predict_num = right_predict_num + 1
accuracy = float(right_predict_num)/len(train_label_list)
return right_predict_num, accuracy
def compute_precision_and_recall_and_F1(train_label_list, predict_label_list):
if len(train_label_list) == len(predict_label_list):
# compute precision and recall
true_positive_num = 10E-10
true_negative_num = 10E-10
predicted_positive_num = predict_label_list.count(1)
predicted_negative_num = predict_label_list.count(0)
for idx in xrange(len(train_label_list)):
if predict_label_list[idx] == train_label_list[idx] == 1:
true_positive_num = true_positive_num + 1
elif predict_label_list[idx] == train_label_list[idx] == 0:
true_negative_num = true_negative_num + 1
precision = float(true_positive_num) / (predicted_positive_num + 10E-10)
recall = float(true_negative_num) / (predicted_negative_num + 10E-10)
F1 = 2 * precision * recall / (precision + recall)
return precision, recall, F1
right_predict_num, accuracy = compute_accuracy(train_label_list = train_label_list,\
predict_label_list = predict_label_list)
logging.info("right_predict_num:{0}".format(right_predict_num))
logging.info("accuracy:{0}".format(accuracy))
precision, recall, F1 = compute_precision_and_recall_and_F1(train_label_list = train_label_list,\
predict_label_list = predict_label_list)
logging.info("precision:{0}".format(precision))
logging.info("recall:{0}".format(recall))
logging.info("F1:{0}".format(F1))
return accuracy, precision, recall, F1
@Decorator.log_of_function
def write_csv_file(self, start_id, predict_label_list, result_csv_dir):
# open csv file
try:
result_csv_handle = file(result_csv_dir, 'wb')
logging.info("Success in attaining file handle of {0}.".format(result_csv_dir))
except Exception as e:
logging.error("Fail in attaining file handle of {0}.".format(result_csv_dir))
logging.error(e)
return -1
# create csv writer
result_csv_writer = csv.writer(result_csv_handle)
# write csv file
result_csv_writer.writerow(["PassengerId", "Survived"])
for list_idx in xrange(len(predict_label_list)):
PassengerId = start_id + list_idx
predict_label = predict_label_list[list_idx]
result_csv_writer.writerow([PassengerId, predict_label])
# close csv file
try:
result_csv_handle.close()
logging.info("Success in closing file handle of {0}.".format(result_csv_dir))
except Exception as e:
logging.error("Fail in closing file handle of {0}.".format(result_csv_dir))
logging.error(e)
@Decorator.log_of_function
def plot_decision_bondary(self, weight_matrix):
pass
################################### PART3 CLASS TEST ##################################
"""
# Initial parameters
database_name = "TitanicDB"
passenger_table_name = "passenger_table"
LRModel = CreateLogisticRegressionModel()
"""
| 48.005376
| 177
| 0.57302
| 1,986
| 17,858
| 4.8429
| 0.12286
| 0.049179
| 0.048243
| 0.045852
| 0.633604
| 0.524849
| 0.496985
| 0.470576
| 0.400395
| 0.337804
| 0
| 0.020973
| 0.297794
| 17,858
| 372
| 178
| 48.005376
| 0.746013
| 0.051294
| 0
| 0.345679
| 0
| 0.016461
| 0.130502
| 0.053253
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.090535
| 0.032922
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 2
|
5d147935a791e2ef09a425d200ac60697365562a
| 7,380
|
py
|
Python
|
sdk/python/pulumi_azure/containerservice/get_registry.py
|
aangelisc/pulumi-azure
|
71dd9c75403146e16f7480e5a60b08bc0329660e
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_azure/containerservice/get_registry.py
|
aangelisc/pulumi-azure
|
71dd9c75403146e16f7480e5a60b08bc0329660e
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_azure/containerservice/get_registry.py
|
aangelisc/pulumi-azure
|
71dd9c75403146e16f7480e5a60b08bc0329660e
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = [
'GetRegistryResult',
'AwaitableGetRegistryResult',
'get_registry',
]
@pulumi.output_type
class GetRegistryResult:
"""
A collection of values returned by getRegistry.
"""
def __init__(__self__, admin_enabled=None, admin_password=None, admin_username=None, id=None, location=None, login_server=None, name=None, resource_group_name=None, sku=None, storage_account_id=None, tags=None):
if admin_enabled and not isinstance(admin_enabled, bool):
raise TypeError("Expected argument 'admin_enabled' to be a bool")
pulumi.set(__self__, "admin_enabled", admin_enabled)
if admin_password and not isinstance(admin_password, str):
raise TypeError("Expected argument 'admin_password' to be a str")
pulumi.set(__self__, "admin_password", admin_password)
if admin_username and not isinstance(admin_username, str):
raise TypeError("Expected argument 'admin_username' to be a str")
pulumi.set(__self__, "admin_username", admin_username)
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if location and not isinstance(location, str):
raise TypeError("Expected argument 'location' to be a str")
pulumi.set(__self__, "location", location)
if login_server and not isinstance(login_server, str):
raise TypeError("Expected argument 'login_server' to be a str")
pulumi.set(__self__, "login_server", login_server)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
if resource_group_name and not isinstance(resource_group_name, str):
raise TypeError("Expected argument 'resource_group_name' to be a str")
pulumi.set(__self__, "resource_group_name", resource_group_name)
if sku and not isinstance(sku, str):
raise TypeError("Expected argument 'sku' to be a str")
pulumi.set(__self__, "sku", sku)
if storage_account_id and not isinstance(storage_account_id, str):
raise TypeError("Expected argument 'storage_account_id' to be a str")
pulumi.set(__self__, "storage_account_id", storage_account_id)
if tags and not isinstance(tags, dict):
raise TypeError("Expected argument 'tags' to be a dict")
pulumi.set(__self__, "tags", tags)
@property
@pulumi.getter(name="adminEnabled")
def admin_enabled(self) -> bool:
"""
Is the Administrator account enabled for this Container Registry.
"""
return pulumi.get(self, "admin_enabled")
@property
@pulumi.getter(name="adminPassword")
def admin_password(self) -> str:
"""
The Password associated with the Container Registry Admin account - if the admin account is enabled.
"""
return pulumi.get(self, "admin_password")
@property
@pulumi.getter(name="adminUsername")
def admin_username(self) -> str:
"""
The Username associated with the Container Registry Admin account - if the admin account is enabled.
"""
return pulumi.get(self, "admin_username")
@property
@pulumi.getter
def id(self) -> str:
"""
The provider-assigned unique ID for this managed resource.
"""
return pulumi.get(self, "id")
@property
@pulumi.getter
def location(self) -> str:
"""
The Azure Region in which this Container Registry exists.
"""
return pulumi.get(self, "location")
@property
@pulumi.getter(name="loginServer")
def login_server(self) -> str:
"""
The URL that can be used to log into the container registry.
"""
return pulumi.get(self, "login_server")
@property
@pulumi.getter
def name(self) -> str:
return pulumi.get(self, "name")
@property
@pulumi.getter(name="resourceGroupName")
def resource_group_name(self) -> str:
return pulumi.get(self, "resource_group_name")
@property
@pulumi.getter
def sku(self) -> str:
"""
The SKU of this Container Registry, such as `Basic`.
"""
return pulumi.get(self, "sku")
@property
@pulumi.getter(name="storageAccountId")
def storage_account_id(self) -> str:
"""
The ID of the Storage Account used for this Container Registry. This is only returned for `Classic` SKU's.
"""
return pulumi.get(self, "storage_account_id")
@property
@pulumi.getter
def tags(self) -> Mapping[str, str]:
"""
A map of tags assigned to the Container Registry.
"""
return pulumi.get(self, "tags")
class AwaitableGetRegistryResult(GetRegistryResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetRegistryResult(
admin_enabled=self.admin_enabled,
admin_password=self.admin_password,
admin_username=self.admin_username,
id=self.id,
location=self.location,
login_server=self.login_server,
name=self.name,
resource_group_name=self.resource_group_name,
sku=self.sku,
storage_account_id=self.storage_account_id,
tags=self.tags)
def get_registry(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegistryResult:
"""
Use this data source to access information about an existing Container Registry.
## Example Usage
```python
import pulumi
import pulumi_azure as azure
example = azure.containerservice.get_registry(name="testacr",
resource_group_name="test")
pulumi.export("loginServer", example.login_server)
```
:param str name: The name of the Container Registry.
:param str resource_group_name: The Name of the Resource Group where this Container Registry exists.
"""
__args__ = dict()
__args__['name'] = name
__args__['resourceGroupName'] = resource_group_name
if opts is None:
opts = pulumi.InvokeOptions()
if opts.version is None:
opts.version = _utilities.get_version()
__ret__ = pulumi.runtime.invoke('azure:containerservice/getRegistry:getRegistry', __args__, opts=opts, typ=GetRegistryResult).value
return AwaitableGetRegistryResult(
admin_enabled=__ret__.admin_enabled,
admin_password=__ret__.admin_password,
admin_username=__ret__.admin_username,
id=__ret__.id,
location=__ret__.location,
login_server=__ret__.login_server,
name=__ret__.name,
resource_group_name=__ret__.resource_group_name,
sku=__ret__.sku,
storage_account_id=__ret__.storage_account_id,
tags=__ret__.tags)
| 36.716418
| 215
| 0.65813
| 879
| 7,380
| 5.255973
| 0.175199
| 0.047836
| 0.058874
| 0.071429
| 0.220346
| 0.172511
| 0.1171
| 0.073593
| 0.041558
| 0.041558
| 0
| 0.00018
| 0.246206
| 7,380
| 200
| 216
| 36.9
| 0.830307
| 0.186585
| 0
| 0.124031
| 1
| 0
| 0.155715
| 0.016253
| 0
| 0
| 0
| 0
| 0
| 1
| 0.108527
| false
| 0.069767
| 0.03876
| 0.015504
| 0.263566
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 2
|
5d3f6e4da89be36858bff2a63bb4de2ff240849a
| 244
|
py
|
Python
|
config.py
|
ggiaquin16/GroupProject19
|
f491abc4e8f127552dc7384f3378e14029da8008
|
[
"CC-BY-3.0"
] | null | null | null |
config.py
|
ggiaquin16/GroupProject19
|
f491abc4e8f127552dc7384f3378e14029da8008
|
[
"CC-BY-3.0"
] | null | null | null |
config.py
|
ggiaquin16/GroupProject19
|
f491abc4e8f127552dc7384f3378e14029da8008
|
[
"CC-BY-3.0"
] | null | null | null |
api_key = "9N7hvPP9yFrjBnELpBdthluBjiOWzJZw"
mongo_url = 'mongodb://localhost:27017'
mongo_db = 'CarPopularity'
mongo_collections = ['CarSalesByYear', 'PopularCarsByRegion']
years_data = ['2019', '2018', '2017', '2016', '2015']
test_mode = True
| 40.666667
| 61
| 0.75
| 25
| 244
| 7.08
| 0.92
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126126
| 0.090164
| 244
| 6
| 62
| 40.666667
| 0.671171
| 0
| 0
| 0
| 0
| 0
| 0.502041
| 0.232653
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
5d42291558faa9e742ab82a57f0f93c0ba5ed168
| 66
|
py
|
Python
|
birdy/__init__.py
|
tkiapril/birdy
|
cf6a8f8d31c9363dbf7398ae3d78fe3069a5a936
|
[
"MIT"
] | 1
|
2015-01-07T17:47:54.000Z
|
2015-01-07T17:47:54.000Z
|
birdy/__init__.py
|
tkiapril/birdy
|
cf6a8f8d31c9363dbf7398ae3d78fe3069a5a936
|
[
"MIT"
] | null | null | null |
birdy/__init__.py
|
tkiapril/birdy
|
cf6a8f8d31c9363dbf7398ae3d78fe3069a5a936
|
[
"MIT"
] | null | null | null |
__author__ = 'Mitja Pagon <[email protected]>'
__version__ = '0.2'
| 22
| 45
| 0.712121
| 9
| 66
| 4.333333
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034483
| 0.121212
| 66
| 2
| 46
| 33
| 0.637931
| 0
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
5d6066cbcb225097d2a844447d53060bd3350b74
| 1,969
|
py
|
Python
|
demo/other_demo.py
|
Heartfilia/lite_tools
|
b3432ba7cb60502ac64d45e23022e20555fb1588
|
[
"MIT"
] | 5
|
2021-05-10T07:35:47.000Z
|
2022-03-07T01:31:12.000Z
|
demo/other_demo.py
|
Heartfilia/lite_tools
|
b3432ba7cb60502ac64d45e23022e20555fb1588
|
[
"MIT"
] | null | null | null |
demo/other_demo.py
|
Heartfilia/lite_tools
|
b3432ba7cb60502ac64d45e23022e20555fb1588
|
[
"MIT"
] | 1
|
2022-03-03T03:23:26.000Z
|
2022-03-03T03:23:26.000Z
|
# -*- coding: utf-8 -*-
from lite_tools import get_md5, get_sha, get_sha3, get_b64e, get_b64d
# about hashlib ==> get_md5, get_sha, get_sha3 || default mode=256
s = "test_information" # 这里只能丢字符串
print(get_md5(s)) # 5414ffd88fcb58417e64ecec51bb3a6b
print(get_md5(s, upper=True)) # 5414FFD88FCB58417E64ECEC51BB3A6B
print(get_md5(s, to_bin=True)) # b'T\x14\xff\xd8\x8f\xcbXA~d\xec\xecQ\xbb:k' # 转成二进制的需求没什么用但是可以保留
print(get_sha(s)) # d09869fdf901465c8566f0e2debfa3f6a3d878a8157e199c7c4c6dd755617f33
print(get_sha(s, to_bin=True)) # b'\xd0\x98i\xfd\xf9\x01F\\\x85f\xf0\xe2\xde\xbf\xa3\xf6\xa3\xd8x\xa8\x15~\x19\x9c|Lm\xd7Ua\x7f3'
print(get_sha(s, mode=1)) # ada5dfdf0c9a76a84958310b838a70b6fd6d01f6 # default mode=256 // mode: 1 224 256 384 512
print(get_sha3(s)) # 9c539ca35c6719f546e67837ff37fe7791e53fe40715cd4da0167c78c9adc2e8
print(get_sha3(s, to_bin=True)) # b'\x9cS\x9c\xa3\\g\x19\xf5F\xe6x7\xff7\xfew\x91\xe5?\xe4\x07\x15\xcdM\xa0\x16|x\xc9\xad\xc2\xe8'
print(get_sha3(s, mode=1)) # return "" // SUPPORT: sha3_224 sha3_256 sha3_384 sha3_512// only need inputting: 224 256 384 512 # default mode=256 // mode: 224 256 384 512
print(get_sha3(s, mode=384)) # 95c09e20a139843eae877a64cd95d6a629b3c9ff383b5460557aab2612682d4228d05fe41606a79acf5ae1c4de35160c
# about base64 ==> get_b64e, get_b64d
res_b64_encode = get_b64e(s)
print(res_b64_encode) # dGVzdF9pbmZvcm1hdGlvbg==
res_b64_bin = get_b64e(s, to_bin=True)
print(res_b64_bin) # b'dGVzdF9pbmZvcm1hdGlvbg=='
res_b32_encode = get_b64e(s, mode=32) # default mode=64 // mode: 16 32 64 85
print(res_b32_encode) # ORSXG5C7NFXGM33SNVQXI2LPNY======
res_b64_decode = get_b64d(res_b64_encode)
print(res_b64_decode) # test_information
res_b32_decode = get_b64d(res_b32_encode, mode=32) # default mode=64 // mode: 16 32 64 85
print(res_b32_decode) # test_information
| 57.911765
| 176
| 0.718639
| 278
| 1,969
| 4.870504
| 0.374101
| 0.059084
| 0.017725
| 0.029542
| 0.259232
| 0.127031
| 0.098966
| 0.098966
| 0.062038
| 0.062038
| 0
| 0.247123
| 0.161503
| 1,969
| 33
| 177
| 59.666667
| 0.572986
| 0.565262
| 0
| 0
| 0
| 0
| 0.019254
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.045455
| 0
| 0.045455
| 0.681818
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 2
|
5d72ba13d02bd291e6fb1bfd1e3d024e5c0779f3
| 316
|
py
|
Python
|
workalendar/usa/colorado.py
|
vanadium23/workalendar
|
4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7
|
[
"MIT"
] | null | null | null |
workalendar/usa/colorado.py
|
vanadium23/workalendar
|
4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7
|
[
"MIT"
] | null | null | null |
workalendar/usa/colorado.py
|
vanadium23/workalendar
|
4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from .core import UnitedStates
class Colorado(UnitedStates):
"""Colorado"""
# Colorado has only federal state holidays.
# NOTE: Cesar Chavez Day is an optional holiday
| 26.333333
| 66
| 0.677215
| 35
| 316
| 5.914286
| 0.828571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004132
| 0.234177
| 316
| 11
| 67
| 28.727273
| 0.85124
| 0.376582
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.75
| 0.25
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 2
|
5d72e502922a05a806cd65843fb08ea2947b5e7b
| 3,358
|
py
|
Python
|
dataloaders/augmentation.py
|
thierrypin/gei-pool
|
0a9e79b01148735f0e975c50d2476e41ba20af4f
|
[
"MIT"
] | null | null | null |
dataloaders/augmentation.py
|
thierrypin/gei-pool
|
0a9e79b01148735f0e975c50d2476e41ba20af4f
|
[
"MIT"
] | null | null | null |
dataloaders/augmentation.py
|
thierrypin/gei-pool
|
0a9e79b01148735f0e975c50d2476e41ba20af4f
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import random
import numpy as np
# Generic data augmentation
class Augmenter:
""" Generic data augmentation class with chained operations
"""
def __init__(self, ops=[]):
if not isinstance(ops, list):
print("Error: ops must be a list of functions")
quit()
self.ops = ops
def add(self, op):
self.ops.append(op)
def augment(self, img):
aug = img.copy()
for op in self.ops:
aug = op(aug)
return aug
def __call__(self, img):
return self.augment(img)
##########
# Images #
##########
def horizontal_flip(p=0.5):
def fc(img):
if random.random() < p:
return img[..., ::-1]
else:
return img
return fc
def vertical_flip(p=0.5):
def fc(img):
if random.random() < p:
return img[..., ::-1, :]
else:
return img
return fc
def gaussian_noise(p=0.5, mean=0, sigma=0.02):
def fc(img):
if random.random() < p:
gauss = np.random.normal(mean, sigma, img.shape).astype(np.float32)
return img + gauss
else:
return img
return fc
def black_vstripe(p=0.5, size=10):
def fc(img):
if random.random() < p:
j = int(random.random() * (img.shape[1]-size))
img[..., j:j+size] = 0
return img
else:
return img
return fc
def black_hstripe(p=0.5, size=10):
def fc(img):
if random.random() < p:
j = int(random.random() * (img.shape[0]-size))
img[..., j:j+size, :] = 0
return img
else:
return img
return fc
def default_augmenter(p=0.5, strip_size=3, mean=0, sigma=0.02):
"""Default data augmentation with horizontal flip, vertical flip, gaussian noise, black hstripe, and black vstripe.
Returns:
Augmenter object. Use as: aug.augment(img)
"""
print("Using default image augmenter")
return Augmenter([ horizontal_flip(p), gaussian_noise(p, mean, sigma), black_hstripe(p, size=strip_size), black_vstripe(p, size=strip_size) ])
##########
# Videos #
##########
def horizontal_flip_vid(p=0.5):
def fc(vid):
if random.random() < p:
return vid[..., ::-1]
else:
return vid
return fc
def black_vstripe_vid(p=0.5, size=10):
def fc(batch):
if random.random() < p:
j = int(random.random() * (batch.shape[-1]-size))
batch[..., j:j+size] = 0
return batch
else:
return batch
return fc
def black_hstripe_vid(p=0.5, size=10):
def fc(batch):
if random.random() < p:
j = int(random.random() * (batch.shape[-2]-size))
batch[..., j:j+size, :] = 0
return batch
else:
return batch
return fc
def default_augmenter_vid(p=0.5, strip_size=3, mean=0, sigma=0.02):
"""Default data augmentation with horizontal flip, gaussian noise, black hstripe, and black vstripe.
Returns:
Augmenter object. Use as: aug.augment(img)
"""
return Augmenter([ horizontal_flip_vid(p), gaussian_noise(p, mean, sigma), black_hstripe_vid(p, size=strip_size), black_vstripe_vid(p, size=strip_size) ])
| 25.24812
| 158
| 0.549136
| 450
| 3,358
| 4.011111
| 0.193333
| 0.079778
| 0.016621
| 0.066482
| 0.658172
| 0.578947
| 0.550139
| 0.51856
| 0.47867
| 0.47867
| 0
| 0.024117
| 0.308517
| 3,358
| 132
| 159
| 25.439394
| 0.75323
| 0.139666
| 0
| 0.482759
| 0
| 0
| 0.024032
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.252874
| false
| 0
| 0.022989
| 0.011494
| 0.609195
| 0.022989
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 2
|
5d7393f1d5071cf9d02bab3da993f038421d4d57
| 1,175
|
py
|
Python
|
robosuite/models/grippers/__init__.py
|
kyungjaelee/robosuite
|
0d73fcca9ed8e638632f4bd7b0f1b8ebf4640fb1
|
[
"MIT"
] | 397
|
2020-09-28T02:49:58.000Z
|
2022-03-30T18:08:19.000Z
|
robosuite/models/grippers/__init__.py
|
kyungjaelee/robosuite
|
0d73fcca9ed8e638632f4bd7b0f1b8ebf4640fb1
|
[
"MIT"
] | 169
|
2020-09-28T02:17:59.000Z
|
2022-03-29T13:32:43.000Z
|
robosuite/models/grippers/__init__.py
|
kyungjaelee/robosuite
|
0d73fcca9ed8e638632f4bd7b0f1b8ebf4640fb1
|
[
"MIT"
] | 131
|
2020-09-28T14:50:35.000Z
|
2022-03-31T02:27:33.000Z
|
from .gripper_model import GripperModel
from .gripper_factory import gripper_factory
from .gripper_tester import GripperTester
from .panda_gripper import PandaGripper
from .rethink_gripper import RethinkGripper
from .robotiq_85_gripper import Robotiq85Gripper
from .robotiq_three_finger_gripper import RobotiqThreeFingerGripper, RobotiqThreeFingerDexterousGripper
from .panda_gripper import PandaGripper
from .jaco_three_finger_gripper import JacoThreeFingerGripper, JacoThreeFingerDexterousGripper
from .robotiq_140_gripper import Robotiq140Gripper
from .wiping_gripper import WipingGripper
from .null_gripper import NullGripper
GRIPPER_MAPPING = {
"RethinkGripper": RethinkGripper,
"PandaGripper": PandaGripper,
"JacoThreeFingerGripper": JacoThreeFingerGripper,
"JacoThreeFingerDexterousGripper": JacoThreeFingerDexterousGripper,
"WipingGripper": WipingGripper,
"Robotiq85Gripper": Robotiq85Gripper,
"Robotiq140Gripper": Robotiq140Gripper,
"RobotiqThreeFingerGripper": RobotiqThreeFingerGripper,
"RobotiqThreeFingerDexterousGripper": RobotiqThreeFingerDexterousGripper,
None: NullGripper,
}
ALL_GRIPPERS = GRIPPER_MAPPING.keys()
| 39.166667
| 103
| 0.846809
| 96
| 1,175
| 10.135417
| 0.34375
| 0.120247
| 0.032888
| 0.045221
| 0.078109
| 0.078109
| 0
| 0
| 0
| 0
| 0
| 0.018975
| 0.102979
| 1,175
| 29
| 104
| 40.517241
| 0.904175
| 0
| 0
| 0.08
| 0
| 0
| 0.156596
| 0.095319
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.48
| 0
| 0.48
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 2
|
538362192f9fc22f5fcaa82bb61990dd548e6c63
| 3,947
|
py
|
Python
|
utils.py
|
bianan/cfl
|
e09043d213c7330d5410e27ba90c943d4323dbe8
|
[
"Apache-2.0"
] | 4
|
2020-07-29T10:18:59.000Z
|
2021-06-27T22:57:37.000Z
|
utils.py
|
bianan/cfl
|
e09043d213c7330d5410e27ba90c943d4323dbe8
|
[
"Apache-2.0"
] | null | null | null |
utils.py
|
bianan/cfl
|
e09043d213c7330d5410e27ba90c943d4323dbe8
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2018 Google Inc.
#
# 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.
"""Utility functions for manipulating variables in Federated personalization."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
TRAIN_NAME = "Train"
VALIDATION_NAME = "Validation"
TEST_NAME = "Test"
LOSS_NAME = "loss"
LOSS_SUMMARY_NAME = "perplexity"
# Vars type.
VARS_TYPE_ALL = "all"
VARS_TYPE_SHARED = "shared"
VARS_TYPE_PERSONAL = "personal"
def get_train_name_scope(var_scope):
return "/".join((var_scope, TRAIN_NAME))
def get_validation_name_scope(var_scope):
return "/".join((var_scope, VALIDATION_NAME))
def get_test_name_scope(var_scope):
return "/".join((var_scope, TEST_NAME))
def get_model_name_scope(var_scope):
return "/".join((var_scope, "Model"))
def get_update_name_scope(var_scope):
return "/".join((var_scope, "Update"))
def get_var_dict(vars_):
"""Gets a dict of var base_name (e.g. 'w') to the variable."""
var_dict = {}
for v in vars_:
var_base_name = get_base_name(v)
var_dict[var_base_name] = v
return var_dict
def get_var_value_ops(var_dict):
return {k: v.value() for k, v in var_dict.items()}
def get_base_name(var):
return var.name.split("/")[-1].split(":")[0]
def get_update_name(var, var_scope):
var_base_name = get_base_name(var)
var_update_name = "update_%s_%s" % (var_scope, var_base_name)
return var_update_name
def get_update_placeholder_name(var):
var_base_name = get_base_name(var)
placeholder_name = "placeholder_%s" % var_base_name
return placeholder_name
def generate_update_ops(vars_):
"""Generates update ops and placeholders.
For each var, it generates a placeholder to feed in the new values.
Then it takes the mean of the inputs along dimension 0.
Args:
vars_: Vars for which the update ops will be generated.
Returns:
update_ops: A list of update ops.
dict_update_placeholders: A dict of var base name to its update-placeholder.
"""
update_ops = []
dict_update_placeholders = {}
for v in vars_:
# For every var in the scope, add a placeholder to feed in the new values.
# The placeholder may need to hold multiple values, this happens
# when updating the server from many clients.
var_in_shape = [None] + v.shape.as_list()
var_in_name = get_update_placeholder_name(v)
var_in = tf.placeholder(v.dtype, shape=var_in_shape, name=var_in_name)
var_in_mean = tf.reduce_mean(var_in, 0)
update_op = v.assign(var_in_mean)
update_ops.append(update_op)
dict_update_placeholders[get_base_name(v)] = var_in
return update_ops, dict_update_placeholders
def print_vars_on_clients(clients, sess):
for c in clients.values():
print("client %d:" % c.id)
print(sess.run(c.read_ops_all_vars))
def add_prefix(prefix, name):
"""Adds prefix to name."""
return "/".join((prefix, name))
def add_suffix(suffix, name):
"""Adds subfix to name."""
return "/".join((name, suffix))
def get_attribute_dict(class_instance):
"""Gets a dict of attributeds of a class instance."""
# first start by grabbing the Class items
attribute_dict = dict((x, y)
for x, y in class_instance.__class__.__dict__.items()
if x[:2] != "__")
# then update the class items with the instance items
attribute_dict.update(class_instance.__dict__)
return attribute_dict
| 28.395683
| 80
| 0.727135
| 612
| 3,947
| 4.405229
| 0.285948
| 0.038576
| 0.032641
| 0.031528
| 0.180267
| 0.128709
| 0.107196
| 0.08865
| 0
| 0
| 0
| 0.003984
| 0.173296
| 3,947
| 138
| 81
| 28.601449
| 0.822249
| 0.35698
| 0
| 0.060606
| 0
| 0
| 0.043689
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.227273
| false
| 0
| 0.060606
| 0.106061
| 0.5
| 0.060606
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 2
|
53901ad02fc361ceba4528f28baf2995acc82248
| 1,422
|
py
|
Python
|
leetcode/medium/best-time-to-buy-and-sell-stock-ii.py
|
rainzhop/cumulus-tank
|
09ebc7858ea53630e30606945adfea856a80faa3
|
[
"MIT"
] | null | null | null |
leetcode/medium/best-time-to-buy-and-sell-stock-ii.py
|
rainzhop/cumulus-tank
|
09ebc7858ea53630e30606945adfea856a80faa3
|
[
"MIT"
] | null | null | null |
leetcode/medium/best-time-to-buy-and-sell-stock-ii.py
|
rainzhop/cumulus-tank
|
09ebc7858ea53630e30606945adfea856a80faa3
|
[
"MIT"
] | null | null | null |
# https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/
#
# Say you have an array for which the ith element is the price of a given stock on day i.
#
# Design an algorithm to find the maximum profit.
# You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times).
# However, you may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).
class Solution(object):
def maxProfit(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
if prices == []:
return 0
profit_list = []
min_val = prices[0]
max_val = prices[0]
tend = 0 # 0:down, 1:up
for i in range(1, len(prices)):
if prices[i] < prices[i - 1]:
# go down
if tend == 1:
max_val = prices[i - 1]
profit_list.append(max_val - min_val)
tend = 0
pass
if prices[i] > prices[i - 1]:
# go up
if tend == 0:
min_val = prices[i - 1]
tend = 1
pass
if tend == 1:
profit_list.append(prices[i] - min_val)
return sum(profit_list)
if __name__ == '__main__':
prices = [8,9,2,5]
s = Solution()
print s.maxProfit(prices)
| 32.318182
| 123
| 0.524613
| 196
| 1,422
| 3.709184
| 0.459184
| 0.0674
| 0.044017
| 0.041265
| 0.05227
| 0.05227
| 0.05227
| 0
| 0
| 0
| 0
| 0.022573
| 0.376934
| 1,422
| 43
| 124
| 33.069767
| 0.797968
| 0.324895
| 0
| 0.222222
| 0
| 0
| 0.00907
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.074074
| 0
| null | null | 0.037037
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 2
|
53a26f62743c91c61bf312038531a22cbbef6701
| 151
|
py
|
Python
|
r2c_isg/functions/__init__.py
|
returntocorp/inputset-generator
|
c33952cc5683e9e70b24f76936c42ec8e354d121
|
[
"MIT"
] | 3
|
2019-11-02T20:14:34.000Z
|
2020-01-23T21:47:20.000Z
|
r2c_isg/functions/__init__.py
|
returntocorp/inputset-generator
|
c33952cc5683e9e70b24f76936c42ec8e354d121
|
[
"MIT"
] | 19
|
2019-09-18T01:48:07.000Z
|
2021-11-04T11:20:48.000Z
|
r2c_isg/functions/__init__.py
|
returntocorp/inputset-generator
|
c33952cc5683e9e70b24f76936c42ec8e354d121
|
[
"MIT"
] | 3
|
2019-11-15T22:31:13.000Z
|
2020-03-10T10:19:39.000Z
|
from .trim import trim
from .sample import sample
from .sort import sort
function_map = {
'trim': trim,
'sample': sample,
'sort': sort
}
| 13.727273
| 26
| 0.649007
| 20
| 151
| 4.85
| 0.35
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.238411
| 151
| 10
| 27
| 15.1
| 0.843478
| 0
| 0
| 0
| 0
| 0
| 0.092715
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.375
| 0
| 0.375
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 2
|
53a74fabccfed340e02d074e5c163a36783d5463
| 1,102
|
py
|
Python
|
custom_components/purrsong/__init__.py
|
RobertD502/home-assistant-lavviebot
|
5c69f474786f043773cba42b7806fb77d4f89672
|
[
"MIT"
] | 3
|
2021-04-15T21:23:26.000Z
|
2021-12-18T07:45:40.000Z
|
custom_components/purrsong/__init__.py
|
RobertD502/home-assistant-lavviebot
|
5c69f474786f043773cba42b7806fb77d4f89672
|
[
"MIT"
] | 2
|
2021-10-21T12:08:32.000Z
|
2021-11-12T19:13:11.000Z
|
custom_components/purrsong/__init__.py
|
RobertD502/home-assistant-lavviebot
|
5c69f474786f043773cba42b7806fb77d4f89672
|
[
"MIT"
] | null | null | null |
"""Support for Purrsong LavvieBot S"""
import asyncio
import logging
import voluptuous as vol
from lavviebot import LavvieBotApi
import homeassistant.helpers.config_validation as cv
from homeassistant import config_entries
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.const import (
CONF_PASSWORD,
CONF_USERNAME
)
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
def setup(hass, config):
"""Setup of the component"""
return True
async def async_setup_entry(hass, config_entry):
"""Set up Lavviebot integration from a config entry."""
username = config_entry.data.get(CONF_USERNAME)
password = config_entry.data.get(CONF_PASSWORD)
_LOGGER.info("Initializing the Lavviebot API")
lavviebot = await hass.async_add_executor_job(LavvieBotApi, username, password)
_LOGGER.info("Connected to API")
hass.data[DOMAIN] = lavviebot
hass.async_add_job(
hass.config_entries.async_forward_entry_setup(config_entry, "sensor")
)
return True
| 26.238095
| 83
| 0.772232
| 138
| 1,102
| 5.949275
| 0.42029
| 0.066991
| 0.053593
| 0.06821
| 0.053593
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155172
| 1,102
| 41
| 84
| 26.878049
| 0.881847
| 0.049909
| 0
| 0.074074
| 0
| 0
| 0.053007
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.037037
| false
| 0.111111
| 0.37037
| 0
| 0.481481
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 2
|
53b911e92af8c5251a19a68b93418217d94e2790
| 310
|
py
|
Python
|
cogdl/modules/conv/__init__.py
|
awesome-archive/cogdl
|
0a354eaaaf851e7218197508e7e85a81d3fb5753
|
[
"MIT"
] | 8
|
2020-06-03T00:55:09.000Z
|
2022-01-23T16:06:56.000Z
|
cogdl/modules/conv/__init__.py
|
awesome-archive/cogdl
|
0a354eaaaf851e7218197508e7e85a81d3fb5753
|
[
"MIT"
] | null | null | null |
cogdl/modules/conv/__init__.py
|
awesome-archive/cogdl
|
0a354eaaaf851e7218197508e7e85a81d3fb5753
|
[
"MIT"
] | 6
|
2020-06-03T00:55:11.000Z
|
2022-03-16T01:14:36.000Z
|
from .message_passing import MessagePassing
from .gcn_conv import GCNConv
from .gat_conv import GATConv
from .se_layer import SELayer
from .aggregator import Meanaggregator
from .maggregator import meanaggr
__all__ = [
'MessagePassing',
'GCNConv',
'GATConv',
'SELayer',
'Meanaggregator'
]
| 20.666667
| 43
| 0.751613
| 34
| 310
| 6.617647
| 0.529412
| 0.088889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174194
| 310
| 14
| 44
| 22.142857
| 0.878906
| 0
| 0
| 0
| 0
| 0
| 0.158065
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.153846
| 0.461538
| 0
| 0.461538
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 2
|
53cba4400da1d1c4d684c06ae9715e48948281c2
| 568
|
py
|
Python
|
polls/models.py
|
mmeooo/test_django
|
0364f43549d4082df7100d11c67dd42dc2a82b32
|
[
"Apache-2.0"
] | null | null | null |
polls/models.py
|
mmeooo/test_django
|
0364f43549d4082df7100d11c67dd42dc2a82b32
|
[
"Apache-2.0"
] | null | null | null |
polls/models.py
|
mmeooo/test_django
|
0364f43549d4082df7100d11c67dd42dc2a82b32
|
[
"Apache-2.0"
] | null | null | null |
from django.db import models
# Create your models here.
# 클래스의 기능: 상속
class Question(models.Model): # Table
question_text= models.CharField(max_length= 100) # column, datatype
public_date= models.CharField(max_length= 100)
votes= models.DecimalField(max_digits= 20, decimal_places= 10)
# 위의 2개 타입으로 클래스 만들면 ok
# link, string-> CharField, data-> DecimalField
# 보통 max_length= 100으로 함
class Economics(models.Model):
title= models.CharField(max_length= 100)
href= models.CharField(max_length= 100)
create_date= models.CharField(max_length= 100)
| 33.411765
| 71
| 0.746479
| 81
| 568
| 5.098765
| 0.567901
| 0.130751
| 0.217918
| 0.290557
| 0.346247
| 0.150121
| 0
| 0
| 0
| 0
| 0
| 0.047718
| 0.151408
| 568
| 16
| 72
| 35.5
| 0.809129
| 0.264085
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.111111
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
53d57360a984bc0c7e7afecf352b5a5635dc9a06
| 3,303
|
py
|
Python
|
cms/test_utils/project/placeholderapp/models.py
|
stefanw/django-cms
|
048ec9e7a529549d51f4805fdfbcd50ea1e624b0
|
[
"BSD-3-Clause"
] | null | null | null |
cms/test_utils/project/placeholderapp/models.py
|
stefanw/django-cms
|
048ec9e7a529549d51f4805fdfbcd50ea1e624b0
|
[
"BSD-3-Clause"
] | null | null | null |
cms/test_utils/project/placeholderapp/models.py
|
stefanw/django-cms
|
048ec9e7a529549d51f4805fdfbcd50ea1e624b0
|
[
"BSD-3-Clause"
] | null | null | null |
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from cms.models.fields import PlaceholderField
from cms.utils import get_language_from_request
from cms.utils.urlutils import admin_reverse
from hvad.models import TranslatableModel, TranslatedFields
def dynamic_placeholder_1(instance):
return instance.char_1
def dynamic_placeholder_2(instance):
return instance.char_2
@python_2_unicode_compatible
class Example1(models.Model):
char_1 = models.CharField(u'char_1', max_length=255)
char_2 = models.CharField(u'char_2', max_length=255)
char_3 = models.CharField(u'char_3', max_length=255)
char_4 = models.CharField(u'char_4', max_length=255)
date_field = models.DateField(null=True)
placeholder = PlaceholderField('placeholder')
static_admin_url = ''
def __init__(self, *args, **kwargs):
super(Example1, self).__init__(*args, **kwargs)
def callable_item(self, request):
return self.char_1
def __str__(self):
return self.char_1
def get_absolute_url(self):
return reverse("example_detail", args=(self.pk,))
def get_draft_url(self):
return self.get_absolute_url()
def get_public_url(self):
return '/public/view/'
def set_static_url(self, request):
language = get_language_from_request(request)
if self.pk:
self.static_admin_url = admin_reverse('placeholderapp_example1_edit_field', args=(self.pk, language))
return self.pk
def dynamic_url(self, request):
language = get_language_from_request(request)
return admin_reverse('placeholderapp_example1_edit_field', args=(self.pk, language))
class TwoPlaceholderExample(models.Model):
char_1 = models.CharField(u'char_1', max_length=255)
char_2 = models.CharField(u'char_2', max_length=255)
char_3 = models.CharField(u'char_3', max_length=255)
char_4 = models.CharField(u'char_4', max_length=255)
placeholder_1 = PlaceholderField('placeholder_1', related_name='p1')
placeholder_2 = PlaceholderField('placeholder_2', related_name='p2')
class DynamicPlaceholderSlotExample(models.Model):
char_1 = models.CharField(u'char_1', max_length=255)
char_2 = models.CharField(u'char_2', max_length=255)
placeholder_1 = PlaceholderField(dynamic_placeholder_1, related_name='dynamic_pl_1')
placeholder_2 = PlaceholderField(dynamic_placeholder_2, related_name='dynamic_pl_2')
@python_2_unicode_compatible
class CharPksExample(models.Model):
char_1 = models.CharField(u'char_1', max_length=255)
slug = models.SlugField(u'char_1', max_length=255, primary_key=True)
placeholder_1 = PlaceholderField('placeholder_1', related_name='charpk_p1')
def __str__(self):
return "%s - %s" % (self.char_1, self.pk)
@python_2_unicode_compatible
class MultilingualExample1(TranslatableModel):
translations = TranslatedFields(
char_1=models.CharField(u'char_1', max_length=255),
char_2=models.CharField(u'char_2', max_length=255),
)
placeholder_1 = PlaceholderField('placeholder_1')
def __str__(self):
return self.char_1
def get_absolute_url(self):
return reverse("detail_multi", args=(self.pk,))
| 33.363636
| 113
| 0.737511
| 445
| 3,303
| 5.14382
| 0.191011
| 0.03495
| 0.073395
| 0.113587
| 0.512014
| 0.493228
| 0.459152
| 0.432066
| 0.409786
| 0.365225
| 0
| 0.03705
| 0.158341
| 3,303
| 98
| 114
| 33.704082
| 0.786331
| 0
| 0
| 0.342857
| 0
| 0
| 0.090221
| 0.020587
| 0
| 0
| 0
| 0
| 0
| 1
| 0.185714
| false
| 0
| 0.1
| 0.142857
| 0.842857
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 2
|
53e0d34e58ad9e0686dc6ee3e5a7f6fc0076f469
| 55
|
py
|
Python
|
django_reporter_pro/config/model_configs.py
|
shamilison/django-reporter-pro
|
0c6f60bbae939d318e7aafaec83613d2768a4f63
|
[
"Apache-2.0"
] | null | null | null |
django_reporter_pro/config/model_configs.py
|
shamilison/django-reporter-pro
|
0c6f60bbae939d318e7aafaec83613d2768a4f63
|
[
"Apache-2.0"
] | null | null | null |
django_reporter_pro/config/model_configs.py
|
shamilison/django-reporter-pro
|
0c6f60bbae939d318e7aafaec83613d2768a4f63
|
[
"Apache-2.0"
] | null | null | null |
# Created by shamilsakib at 04/10/20
BASE_MODEL = None
| 18.333333
| 36
| 0.763636
| 10
| 55
| 4.1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 0.163636
| 55
| 3
| 37
| 18.333333
| 0.76087
| 0.618182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
9900a4818a6a2131c9358bacda678af44a4371c0
| 4,056
|
py
|
Python
|
testcases/cloud_admin/services_up_test.py
|
tbeckham/eutester
|
1440187150ce284bd87147e71ac7f0fda194b4d9
|
[
"BSD-2-Clause"
] | null | null | null |
testcases/cloud_admin/services_up_test.py
|
tbeckham/eutester
|
1440187150ce284bd87147e71ac7f0fda194b4d9
|
[
"BSD-2-Clause"
] | null | null | null |
testcases/cloud_admin/services_up_test.py
|
tbeckham/eutester
|
1440187150ce284bd87147e71ac7f0fda194b4d9
|
[
"BSD-2-Clause"
] | null | null | null |
#!/usr/bin/python
# Software License Agreement (BSD License)
#
# Copyright (c) 2009-2011, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms, with or
# without modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source code must retain the above
# copyright notice, this list of conditions and the
# following disclaimer.
#
# Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the
# following disclaimer in the documentation and/or other
# materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Author: clarkmatthew
import eucaops
from eutester.eutestcase import EutesterTestCase
import time
class MyTestCase(EutesterTestCase):
def __init__(self, config_file=None, password=None):
self.setuptestcase()
self.setup_parser()
self.parser.add_argument("--timeout", default=600)
self.get_args()
def clean_method(self):
self.debug('No clean_method defined for this test')
pass
def wait_for_services_operational(self, timeout=None):
"""
Definition:
Test attempts to query the state of a subset of core services. The test will continue to poll the system
until it finds an ENABLED instance of each service. In the HA case it will wait for an ENABLED and DISABLED
instance of each.
"""
timeout= timeout or self.args.timeout
last_err = ""
elapsed = 0
start = time.time()
self.tester = None
while (not self.tester and elapsed < timeout):
elapsed = int(time.time() - start)
self.status('Attempting to create tester object. Elapsed:' + str(elapsed))
try:
self.tester = eucaops.Eucaops(config_file=self.args.config_file, password=self.args.password)
except Exception, e:
tb = eucaops.Eucaops.get_traceback()
last_err = str(tb) + "\n" + str(e)
print 'Services not up because of: ' + last_err + '\n'
if not self.tester:
raise Exception(str(last_err) + 'Could not create tester object after elapsed:' + str(elapsed))
timeout = timeout - elapsed
self.status('starting wait for all services operational, timeout:' + str(timeout))
self.tester.service_manager.wait_for_all_services_operational(timeout)
self.status('All services are up')
self.tester.service_manager.print_services_list()
if __name__ == "__main__":
testcase = MyTestCase()
### Use the list of tests passed from config/command line to determine what subset of tests to run
### or use a predefined list "VolumeTagging", "InstanceTagging", "SnapshotTagging", "ImageTagging"
list = testcase.args.tests or ["wait_for_services_operational"]
### Convert test suite methods to EutesterUnitTest objects
unit_list = [ ]
for test in list:
unit_list.append( testcase.create_testunit_by_name(test) )
### Run the EutesterUnitTest objects, dont worry about clean on exit until we need it for this method
result = testcase.run_test_case_list(unit_list,clean_on_exit=False)
exit(result)
| 42.25
| 115
| 0.704389
| 535
| 4,056
| 5.246729
| 0.431776
| 0.021375
| 0.006413
| 0.012113
| 0.091201
| 0.0741
| 0.04845
| 0.04845
| 0.04845
| 0.04845
| 0
| 0.003796
| 0.220661
| 4,056
| 95
| 116
| 42.694737
| 0.884214
| 0.43146
| 0
| 0
| 0
| 0
| 0.139523
| 0.014713
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.071429
| 0.071429
| null | null | 0.047619
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 2
|
54c99a336aaeb2a2bf8fbb1530f743b492eca07a
| 2,019
|
py
|
Python
|
data/analyzer/linux/lib/common/abstracts.py
|
iswenhao/Panda-Sandbox
|
a04069d404cb4326ff459e703f14625dc45759ed
|
[
"MIT"
] | 2
|
2021-01-12T15:42:05.000Z
|
2021-01-13T04:59:39.000Z
|
data/analyzer/linux/lib/common/abstracts.py
|
iswenhao/Panda-Sandbox
|
a04069d404cb4326ff459e703f14625dc45759ed
|
[
"MIT"
] | null | null | null |
data/analyzer/linux/lib/common/abstracts.py
|
iswenhao/Panda-Sandbox
|
a04069d404cb4326ff459e703f14625dc45759ed
|
[
"MIT"
] | null | null | null |
# Copyright (C) 2014-2016 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
from lib.api.process import Process
from lib.exceptions.exceptions import CuckooPackageError
class Package(object):
"""Base abstract analysis package."""
PATHS = []
def __init__(self, options={}):
"""@param options: options dict."""
self.options = options
self.pids = []
def set_pids(self, pids):
"""Update list of monitored PIDs in the package context.
@param pids: list of pids.
"""
self.pids = pids
def start(self):
"""Run analysis package.
@raise NotImplementedError: this method is abstract.
"""
raise NotImplementedError
def check(self):
"""Check."""
return True
def execute(self, cmd):
"""Start an executable for analysis.
@param path: executable path
@param args: executable arguments
@return: process pid
"""
p = Process()
if not p.execute(cmd):
raise CuckooPackageError("Unable to execute the initial process, "
"analysis aborted.")
return p.pid
def package_files(self):
"""A list of files to upload to host.
The list should be a list of tuples (<path on guest>, <name of file in package_files folder>).
(package_files is a folder that will be created in analysis folder).
"""
return None
def finish(self):
"""Finish run.
If specified to do so, this method dumps the memory of
all running processes.
"""
if self.options.get("procmemdump"):
for pid in self.pids:
p = Process(pid=pid)
p.dump_memory()
return True
def get_pids(self):
return []
class Auxiliary(object):
priority = 0
def get_pids(self):
return []
| 27.657534
| 102
| 0.583952
| 237
| 2,019
| 4.92827
| 0.434599
| 0.027397
| 0.020548
| 0.023973
| 0.034247
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006569
| 0.321446
| 2,019
| 72
| 103
| 28.041667
| 0.845985
| 0.393759
| 0
| 0.181818
| 0
| 0
| 0.06297
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0.060606
| 0.060606
| 0.636364
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 2
|
54d0e7ae83bd72293871a6d51b4fbe8e0a0e701d
| 142
|
py
|
Python
|
examples/ingenerator.py
|
quynhanh-ngx/pytago
|
de976ad8d85702ae665e97978bc4a75d282c857f
|
[
"MIT"
] | 206
|
2021-06-24T16:16:13.000Z
|
2022-03-31T07:44:17.000Z
|
examples/ingenerator.py
|
quynhanh-ngx/pytago
|
de976ad8d85702ae665e97978bc4a75d282c857f
|
[
"MIT"
] | 13
|
2021-06-24T17:51:36.000Z
|
2022-02-23T10:07:17.000Z
|
examples/ingenerator.py
|
quynhanh-ngx/pytago
|
de976ad8d85702ae665e97978bc4a75d282c857f
|
[
"MIT"
] | 14
|
2021-06-26T02:19:45.000Z
|
2022-03-30T03:02:49.000Z
|
def main():
n = 111
gen = (n * 7 for x in range(10))
if 777 in gen:
print("Yes!")
if __name__ == '__main__':
main()
| 14.2
| 36
| 0.485915
| 22
| 142
| 2.772727
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097826
| 0.352113
| 142
| 9
| 37
| 15.777778
| 0.565217
| 0
| 0
| 0
| 0
| 0
| 0.084507
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0
| 0
| 0.142857
| 0.142857
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
54d95a6a219b638ddca6d85bef7b830f95b22592
| 2,426
|
py
|
Python
|
pharmrep/forum/models.py
|
boyombo/pharmrep
|
2293ceb235dec949c58fa40d1ee43fce172e0ceb
|
[
"MIT"
] | null | null | null |
pharmrep/forum/models.py
|
boyombo/pharmrep
|
2293ceb235dec949c58fa40d1ee43fce172e0ceb
|
[
"MIT"
] | null | null | null |
pharmrep/forum/models.py
|
boyombo/pharmrep
|
2293ceb235dec949c58fa40d1ee43fce172e0ceb
|
[
"MIT"
] | null | null | null |
from django.db import models
from django.contrib.auth.models import User
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
class Forum(models.Model):
title = models.CharField(max_length=60)
description = models.TextField(blank=True, default='')
updated = models.DateTimeField(auto_now=True)
created = models.DateTimeField(auto_now=True)
creator = models.ForeignKey(User, blank=True, null=True)
def __unicode__(self):
return self.title
def num_posts(self):
return sum([t.num_posts() for t in self.topic_set.all()])
def last_post(self):
if self.topic_set.count():
last = None
for t in self.topic_set.all():
l = t.last_post()
if l:
if not last: last = l
elif l.created > last.created: last = l
return last
class Topic(models.Model):
title = models.CharField(max_length=60)
description = models.TextField(max_length=10000, blank=True, null=True)
forum = models.ForeignKey(Forum)
created = models.DateTimeField(auto_now=True)
creator = models.ForeignKey(User, blank=True, null=True)
updated = models.DateTimeField(auto_now=True)
closed = models.BooleanField(blank=True, default=False)
def num_posts(self):
return self.post_set.count()
def num_replies(self):
return max(0, self.post_set.count() - 1)
def last_post(self):
if self.post_set.count():
return self.post_set.order_by("created")[0]
def __unicode__(self):
return unicode(self.creator) + " - " + self.title
class Post(models.Model):
title = models.CharField(max_length=60)
created = models.DateTimeField(auto_now_add=True)
creator = models.ForeignKey(User, blank=True, null=True)
updated = models.DateTimeField(auto_now=True)
topic = models.ForeignKey(Topic)
body = models.TextField(max_length=10000)
user_ip = models.GenericIPAddressField(blank=True, null=True)
def __unicode__(self):
return u"%s - %s - %s" % (self.creator, self.topic, self.title)
def short(self):
return u"%s - %s\n%s" % (self.creator, self.title, self.created.strftime("%b %d, %I:%M %p"))
short.allow_tags = True
class ProfaneWord(models.Model):
word = models.CharField(max_length=60)
def __unicode__(self):
return self.word
| 32.783784
| 100
| 0.659934
| 323
| 2,426
| 4.80805
| 0.256966
| 0.051513
| 0.08886
| 0.100451
| 0.533162
| 0.412106
| 0.361236
| 0.334192
| 0.270444
| 0.270444
| 0
| 0.011129
| 0.222176
| 2,426
| 73
| 101
| 33.232877
| 0.811871
| 0
| 0
| 0.333333
| 0
| 0
| 0.019786
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.175439
| false
| 0
| 0.070175
| 0.140351
| 0.842105
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 2
|
54db89c835de6895b4c1b46df78297a288ccdb1f
| 3,254
|
py
|
Python
|
dev/unittest/update.py
|
PowerDNS/exabgp
|
bbf69f25853e10432fbe588b5bc2f8d9f1e5dda2
|
[
"BSD-3-Clause"
] | 8
|
2015-01-11T09:57:26.000Z
|
2019-07-05T05:57:02.000Z
|
dev/unittest/update.py
|
Acidburn0zzz/exabgp
|
bbf69f25853e10432fbe588b5bc2f8d9f1e5dda2
|
[
"BSD-3-Clause"
] | 1
|
2018-11-15T22:10:09.000Z
|
2018-11-15T22:20:31.000Z
|
dev/unittest/update.py
|
Acidburn0zzz/exabgp
|
bbf69f25853e10432fbe588b5bc2f8d9f1e5dda2
|
[
"BSD-3-Clause"
] | 6
|
2015-09-11T01:51:06.000Z
|
2020-03-10T19:16:18.000Z
|
#!/usr/bin/env python
# encoding: utf-8
"""
update.py
Created by Thomas Mangin on 2009-09-06.
Copyright (c) 2009-2013 Exa Networks. All rights reserved.
"""
import unittest
from exabgp.configuration.environment import environment
env = environment.setup('')
from exabgp.bgp.message.update.update import *
from exabgp.bgp.message.update.attribute.community import to_Community
from exabgp.bgp.message.update.attribute.community import Community, Communities
class TestData (unittest.TestCase):
def test_2_prefix (self):
self.assertEqual(str(to_NLRI('10.0.0.0','24')),'10.0.0.0/24')
def test_6_prefix (self):
self.assertEqual(to_NLRI('1.2.3.4','0').pack(),''.join([chr(c) for c in [0,]]))
def test_7_prefix (self):
self.assertEqual(to_NLRI('1.2.3.4','8').pack(),''.join([chr(c) for c in [8,1,]]))
def test_8_prefix (self):
self.assertEqual(to_NLRI('1.2.3.4','16').pack(),''.join([chr(c) for c in [16,1,2]]))
def test_9_prefix (self):
self.assertEqual(to_NLRI('1.2.3.4','24').pack(),''.join([chr(c) for c in [24,1,2,3]]))
def test_10_prefix (self):
self.assertEqual(to_NLRI('1.2.3.4','32').pack(),''.join([chr(c) for c in [32,1,2,3,4]]))
def test_1_community (self):
self.assertEqual(Community(256),256)
def test_2_community (self):
self.assertEqual(to_Community('0x100'),256)
def test_3_community (self):
self.assertEqual(to_Community('1:1'),65537)
def test_4_community (self):
communities = Communities()
community = to_Community('1:1')
communities.add(community)
self.assertEqual(communities.pack(),''.join([chr(c) for c in [0xc0,0x08,0x04,0x00,0x01,0x00,0x01]]))
def test_1_ipv4 (self):
header = ''.join([chr(c) for c in [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x22, 0x2]])
message = ''.join([chr(c) for c in [0x0, 0x0, 0x0, 0xb, 0x40, 0x1, 0x1, 0x0, 0x40, 0x2, 0x4, 0x2, 0x1, 0xfd, 0xe8, 0x18, 0xa, 0x0, 0x1]])
update = new_Update(message)
self.assertEqual(str(update.nlri[0]),'10.0.1.0/24')
def test_1_ipv6_1 (self):
header = ''.join([chr(c) for c in [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x47, 0x2]])
message = ''.join([chr(c) for c in [0x0, 0x0, 0x0, 0x30, 0x40, 0x1, 0x1, 0x0, 0x50, 0x2, 0x0, 0x4, 0x2, 0x1, 0xff, 0xfe, 0x80, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, 0x80, 0xe, 0x1a, 0x0, 0x2, 0x1, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x12, 0x34, 0x56, 0x78]])
update = to_Update([],[to_NLRI('1234:5678::',32)])
self.assertEqual(str(update.nlri[0]),'1234:5678::/32')
def test_1_ipv6_2 (self):
route = RouteIP('1234:5678::',64)
route.next_hop = '8765:4321::1'
announced = route.announce(1,1)
message = announced[19:]
update = new_Update(message)
print update.nlri
print update.withdraw
print update.attributes[MPRNLRI.ID][0]
# def test_2_ipv4_broken (self):
# header = ''.join([chr(c) for c in h])
# message = ''.join([chr(c) for c in m])
# message = ''.join([chr(c) for c in [0x0, 0x0, 0x0, 0xf, 0x40, 0x1, 0x1, 0x0, 0x40, 0x2, 0x4, 0x2, 0x1, 0xfd, 0xe8, 0x0, 0x0, 0x0, 0x0, 0x18, 0xa, 0x0, 0x1]])
# update = new_Update(message)
if __name__ == '__main__':
unittest.main()
| 38.282353
| 313
| 0.667486
| 555
| 3,254
| 3.814414
| 0.228829
| 0.113368
| 0.158715
| 0.196504
| 0.508739
| 0.489844
| 0.425602
| 0.364667
| 0.273028
| 0.273028
| 0
| 0.155025
| 0.137677
| 3,254
| 84
| 314
| 38.738095
| 0.59943
| 0.103258
| 0
| 0.039216
| 0
| 0
| 0.050823
| 0
| 0
| 0
| 0.147817
| 0
| 0.235294
| 0
| null | null | 0
| 0.098039
| null | null | 0.058824
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
54e0e5e26d187af365758e0bf02412dfcafdb712
| 1,028
|
py
|
Python
|
hkube_python_wrapper/storage/base_storage_manager.py
|
kube-HPC/python-wrapper.hkube
|
74713d9fea6689c116ade7d67b7ab67373a79d3b
|
[
"MIT"
] | 1
|
2021-03-20T06:18:57.000Z
|
2021-03-20T06:18:57.000Z
|
hkube_python_wrapper/storage/base_storage_manager.py
|
kube-HPC/python-wrapper.hkube
|
74713d9fea6689c116ade7d67b7ab67373a79d3b
|
[
"MIT"
] | 10
|
2020-04-24T06:58:59.000Z
|
2022-03-30T14:42:55.000Z
|
hkube_python_wrapper/storage/base_storage_manager.py
|
kube-HPC/python-wrapper.hkube
|
74713d9fea6689c116ade7d67b7ab67373a79d3b
|
[
"MIT"
] | null | null | null |
class BaseStorageManager(object):
def __init__(self, adpter):
self.adapter = adpter
def put(self, options):
try:
return self.adapter.put(options)
except Exception:
raise Exception('Failed to write data to storage')
def get(self, options):
try:
data = self.adapter.get(options)
return data
except Exception as e:
raise Exception('Failed to read data from storage' + str(e))
def list(self, options):
try:
return self.adapter.list(options)
except Exception:
raise Exception('Failed to list storage data')
def listPrefix(self, options):
try:
return self.adapter.listPrefix(options)
except Exception:
raise Exception('Failed to listPrefix storage data')
def delete(self, options):
try:
self.adapter.delete(options)
except Exception:
raise Exception('Failed to delete storage data')
| 27.783784
| 72
| 0.59144
| 112
| 1,028
| 5.392857
| 0.258929
| 0.109272
| 0.115894
| 0.182119
| 0.445364
| 0.445364
| 0.291391
| 0
| 0
| 0
| 0
| 0
| 0.327821
| 1,028
| 36
| 73
| 28.555556
| 0.874096
| 0
| 0
| 0.310345
| 0
| 0
| 0.148004
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.206897
| false
| 0
| 0
| 0
| 0.37931
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
54e0f7ad3e850fa6d21aab5200a2493a26332352
| 3,324
|
py
|
Python
|
cle/cle/backends/relocations/generic.py
|
Ruide/angr-dev
|
964dc80c758e25c698c2cbcc454ef5954c5fa0a0
|
[
"BSD-2-Clause"
] | null | null | null |
cle/cle/backends/relocations/generic.py
|
Ruide/angr-dev
|
964dc80c758e25c698c2cbcc454ef5954c5fa0a0
|
[
"BSD-2-Clause"
] | null | null | null |
cle/cle/backends/relocations/generic.py
|
Ruide/angr-dev
|
964dc80c758e25c698c2cbcc454ef5954c5fa0a0
|
[
"BSD-2-Clause"
] | null | null | null |
from ...address_translator import AT
from ...errors import CLEOperationError
from . import Relocation
import struct
import logging
l = logging.getLogger('cle.relocations.generic')
class GenericAbsoluteReloc(Relocation):
@property
def value(self):
return self.resolvedby.rebased_addr
class GenericAbsoluteAddendReloc(Relocation):
@property
def value(self):
return self.resolvedby.rebased_addr + self.addend
class GenericPCRelativeAddendReloc(Relocation):
@property
def value(self):
return self.resolvedby.rebased_addr + self.addend - self.rebased_addr
class GenericJumpslotReloc(Relocation):
@property
def value(self):
if self.is_rela:
return self.resolvedby.rebased_addr + self.addend
else:
return self.resolvedby.rebased_addr
class GenericRelativeReloc(Relocation):
@property
def value(self):
return self.owner_obj.mapped_base + self.addend
def resolve_symbol(self, solist, bypass_compatibility=False):
self.resolve(None)
return True
class GenericCopyReloc(Relocation):
@property
def value(self):
return self.resolvedby.owner_obj.memory.read_addr_at(self.resolvedby.relative_addr)
class MipsGlobalReloc(GenericAbsoluteReloc):
pass
class MipsLocalReloc(Relocation):
def relocate(self, solist, bypass_compatibility=False): # pylint: disable=unused-argument
if self.owner_obj.mapped_base == 0:
self.resolve(None)
return True # don't touch local relocations on the main bin
delta = self.owner_obj.mapped_base - self.owner_obj._dynamic['DT_MIPS_BASE_ADDRESS']
if delta == 0:
self.resolve(None)
return True
val = self.owner_obj.memory.read_addr_at(self.relative_addr)
newval = val + delta
self.owner_obj.memory.write_addr_at(self.relative_addr, newval)
self.resolve(None)
return True
class RelocTruncate32Mixin(object):
"""
A mix-in class for relocations that cover a 32-bit field regardless of the architecture's address word length.
"""
# If True, 32-bit truncated value must equal to its original when zero-extended
check_zero_extend = False
# If True, 32-bit truncated value must equal to its original when sign-extended
check_sign_extend = False
def relocate(self, solist, bypass_compatibility=False): # pylint: disable=unused-argument
if not self.resolve_symbol(solist):
return False
arch_bits = self.owner_obj.arch.bits
assert arch_bits >= 32 # 16-bit makes no sense here
val = self.value % (2**arch_bits) # we must truncate it to native range first
if (self.check_zero_extend and val >> 32 != 0 or
self.check_sign_extend and val >> 32 != ((1 << (arch_bits - 32)) - 1)
if ((val >> 31) & 1) == 1 else 0):
raise CLEOperationError("relocation truncated to fit: %s; consider making"
" relevant addresses fit in the 32-bit address space." % self.__class__.__name__)
by = struct.pack(self.owner_obj.arch.struct_fmt(32), val % (2**32))
self.owner_obj.memory.write_bytes(self.dest_addr, by)
| 36.130435
| 117
| 0.666968
| 410
| 3,324
| 5.256098
| 0.331707
| 0.037123
| 0.050116
| 0.07239
| 0.472854
| 0.411601
| 0.296984
| 0.233411
| 0.210209
| 0.210209
| 0
| 0.014412
| 0.248496
| 3,324
| 91
| 118
| 36.527473
| 0.848279
| 0.134176
| 0
| 0.382353
| 0
| 0
| 0.05007
| 0.008053
| 0
| 0
| 0
| 0
| 0.014706
| 1
| 0.132353
| false
| 0.058824
| 0.073529
| 0.073529
| 0.544118
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 2
|
54e3b8446107d9bccd2d0bc314395d7a3117387b
| 7,069
|
py
|
Python
|
src/resources/clients/python_client/visitstate.py
|
visit-dav/vis
|
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
|
[
"BSD-3-Clause"
] | 226
|
2018-12-29T01:13:49.000Z
|
2022-03-30T19:16:31.000Z
|
src/resources/clients/python_client/visitstate.py
|
visit-dav/vis
|
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
|
[
"BSD-3-Clause"
] | 5,100
|
2019-01-14T18:19:25.000Z
|
2022-03-31T23:08:36.000Z
|
src/resources/clients/python_client/visitstate.py
|
visit-dav/vis
|
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
|
[
"BSD-3-Clause"
] | 84
|
2019-01-24T17:41:50.000Z
|
2022-03-10T10:01:46.000Z
|
import sys
class RPCType(object):
CloseRPC = 0
DetachRPC = 1
AddWindowRPC = 2
DeleteWindowRPC = 3
SetWindowLayoutRPC = 4
SetActiveWindowRPC = 5
ClearWindowRPC = 6
ClearAllWindowsRPC = 7
OpenDatabaseRPC = 8
CloseDatabaseRPC = 9
ActivateDatabaseRPC = 10
CheckForNewStatesRPC = 11
CreateDatabaseCorrelationRPC = 12
AlterDatabaseCorrelationRPC = 13
DeleteDatabaseCorrelationRPC = 14
ReOpenDatabaseRPC = 15
ReplaceDatabaseRPC = 16
OverlayDatabaseRPC = 17
OpenComputeEngineRPC = 18
CloseComputeEngineRPC = 19
AnimationSetNFramesRPC = 20
AnimationPlayRPC = 21
AnimationReversePlayRPC = 22
AnimationStopRPC = 23
TimeSliderNextStateRPC = 24
TimeSliderPreviousStateRPC = 25
SetTimeSliderStateRPC = 26
SetActiveTimeSliderRPC = 27
AddPlotRPC = 28
SetPlotFrameRangeRPC = 29
DeletePlotKeyframeRPC = 30
MovePlotKeyframeRPC = 31
DeleteActivePlotsRPC = 32
HideActivePlotsRPC = 33
DrawPlotsRPC = 34
DisableRedrawRPC = 35
RedrawRPC = 36
SetActivePlotsRPC = 37
ChangeActivePlotsVarRPC = 38
AddOperatorRPC = 39
AddInitializedOperatorRPC = 40
PromoteOperatorRPC = 41
DemoteOperatorRPC = 42
RemoveOperatorRPC = 43
RemoveLastOperatorRPC = 44
RemoveAllOperatorsRPC = 45
SaveWindowRPC = 46
SetDefaultPlotOptionsRPC = 47
SetPlotOptionsRPC = 48
SetDefaultOperatorOptionsRPC = 49
SetOperatorOptionsRPC = 50
WriteConfigFileRPC = 51
ConnectToMetaDataServerRPC = 52
IconifyAllWindowsRPC = 53
DeIconifyAllWindowsRPC = 54
ShowAllWindowsRPC = 55
HideAllWindowsRPC = 56
UpdateColorTableRPC = 57
SetAnnotationAttributesRPC = 58
SetDefaultAnnotationAttributesRPC = 59
ResetAnnotationAttributesRPC = 60
SetKeyframeAttributesRPC = 61
SetPlotSILRestrictionRPC = 62
SetViewAxisArrayRPC = 63
SetViewCurveRPC = 64
SetView2DRPC = 65
SetView3DRPC = 66
ResetPlotOptionsRPC = 67
ResetOperatorOptionsRPC = 68
SetAppearanceRPC = 69
ProcessExpressionsRPC = 70
SetLightListRPC = 71
SetDefaultLightListRPC = 72
ResetLightListRPC = 73
SetAnimationAttributesRPC = 74
SetWindowAreaRPC = 75
PrintWindowRPC = 76
ResetViewRPC = 77
RecenterViewRPC = 78
ToggleAllowPopupRPC = 79
ToggleMaintainViewModeRPC = 80
ToggleBoundingBoxModeRPC = 81
ToggleCameraViewModeRPC = 82
TogglePerspectiveViewRPC = 83
ToggleSpinModeRPC = 84
ToggleLockTimeRPC = 85
ToggleLockToolsRPC = 86
ToggleLockViewModeRPC = 87
ToggleFullFrameRPC = 88
UndoViewRPC = 89
RedoViewRPC = 90
InvertBackgroundRPC = 91
ClearPickPointsRPC = 92
SetWindowModeRPC = 93
EnableToolRPC = 94
SetToolUpdateModeRPC = 95
CopyViewToWindowRPC = 96
CopyLightingToWindowRPC = 97
CopyAnnotationsToWindowRPC = 98
CopyPlotsToWindowRPC = 99
ClearCacheRPC = 100
ClearCacheForAllEnginesRPC = 101
SetViewExtentsTypeRPC = 102
ClearRefLinesRPC = 103
SetRenderingAttributesRPC = 104
QueryRPC = 105
CloneWindowRPC = 106
SetMaterialAttributesRPC = 107
SetDefaultMaterialAttributesRPC = 108
ResetMaterialAttributesRPC = 109
SetPlotDatabaseStateRPC = 110
DeletePlotDatabaseKeyframeRPC = 111
MovePlotDatabaseKeyframeRPC = 112
ClearViewKeyframesRPC = 113
DeleteViewKeyframeRPC = 114
MoveViewKeyframeRPC = 115
SetViewKeyframeRPC = 116
OpenMDServerRPC = 117
EnableToolbarRPC = 118
HideToolbarsRPC = 119
HideToolbarsForAllWindowsRPC = 120
ShowToolbarsRPC = 121
ShowToolbarsForAllWindowsRPC = 122
SetToolbarIconSizeRPC = 123
SaveViewRPC = 124
SetGlobalLineoutAttributesRPC = 125
SetPickAttributesRPC = 126
ExportColorTableRPC = 127
ExportEntireStateRPC = 128
ImportEntireStateRPC = 129
ImportEntireStateWithDifferentSourcesRPC = 130
ResetPickAttributesRPC = 131
AddAnnotationObjectRPC = 132
HideActiveAnnotationObjectsRPC = 133
DeleteActiveAnnotationObjectsRPC = 134
RaiseActiveAnnotationObjectsRPC = 135
LowerActiveAnnotationObjectsRPC = 136
SetAnnotationObjectOptionsRPC = 137
SetDefaultAnnotationObjectListRPC = 138
ResetAnnotationObjectListRPC = 139
ResetPickLetterRPC = 140
SetDefaultPickAttributesRPC = 141
ChooseCenterOfRotationRPC = 142
SetCenterOfRotationRPC = 143
SetQueryOverTimeAttributesRPC = 144
SetDefaultQueryOverTimeAttributesRPC = 145
ResetQueryOverTimeAttributesRPC = 146
ResetLineoutColorRPC = 147
SetInteractorAttributesRPC = 148
SetDefaultInteractorAttributesRPC = 149
ResetInteractorAttributesRPC = 150
GetProcInfoRPC = 151
SendSimulationCommandRPC = 152
UpdateDBPluginInfoRPC = 153
ExportDBRPC = 154
SetTryHarderCyclesTimesRPC = 155
OpenClientRPC = 156
OpenGUIClientRPC = 157
OpenCLIClientRPC = 158
SuppressQueryOutputRPC = 159
SetQueryFloatFormatRPC = 160
SetMeshManagementAttributesRPC = 161
SetDefaultMeshManagementAttributesRPC = 162
ResetMeshManagementAttributesRPC = 163
ResizeWindowRPC = 164
MoveWindowRPC = 165
MoveAndResizeWindowRPC = 166
SetStateLoggingRPC = 167
ConstructDataBinningRPC = 168
RequestMetaDataRPC = 169
SetTreatAllDBsAsTimeVaryingRPC = 170
SetCreateMeshQualityExpressionsRPC = 171
SetCreateTimeDerivativeExpressionsRPC = 172
SetCreateVectorMagnitudeExpressionsRPC = 173
CopyActivePlotsRPC = 174
SetPlotFollowsTimeRPC = 175
TurnOffAllLocksRPC = 176
SetDefaultFileOpenOptionsRPC = 177
SetSuppressMessagesRPC = 178
ApplyNamedSelectionRPC = 179
CreateNamedSelectionRPC = 180
DeleteNamedSelectionRPC = 181
LoadNamedSelectionRPC = 182
SaveNamedSelectionRPC = 183
SetNamedSelectionAutoApplyRPC = 184
UpdateNamedSelectionRPC = 185
InitializeNamedSelectionVariablesRPC = 186
MenuQuitRPC = 187
SetPlotDescriptionRPC = 188
MovePlotOrderTowardFirstRPC = 189
MovePlotOrderTowardLastRPC = 190
SetPlotOrderToFirstRPC = 191
SetPlotOrderToLastRPC = 192
RenamePickLabelRPC = 193
GetQueryParametersRPC = 194
DDTConnectRPC = 195
DDTFocusRPC = 196
ReleaseToDDTRPC = 197
MaxRPC = 198
| 34.651961
| 54
| 0.660914
| 403
| 7,069
| 11.593052
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.100328
| 0.310511
| 7,069
| 203
| 55
| 34.82266
| 0.858227
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.014925
| 0
| 1.00995
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 2
|
54ec18e7d2fb320aa765697469037a76c03cbf50
| 535
|
py
|
Python
|
resources/migrations/0126_add_field_disallow_overlapping_reservations_per_user.py
|
codepointtku/respa
|
bb9cd8459d5562569f976dbc609ec41ceecc8023
|
[
"MIT"
] | 1
|
2019-12-17T10:02:17.000Z
|
2019-12-17T10:02:17.000Z
|
resources/migrations/0126_add_field_disallow_overlapping_reservations_per_user.py
|
codepointtku/respa
|
bb9cd8459d5562569f976dbc609ec41ceecc8023
|
[
"MIT"
] | 38
|
2020-01-24T11:30:53.000Z
|
2022-01-28T12:42:47.000Z
|
resources/migrations/0126_add_field_disallow_overlapping_reservations_per_user.py
|
digipointtku/respa
|
a529e0df4d3f072df7801adb5bf97a5f4abd1243
|
[
"MIT"
] | 14
|
2020-02-26T08:17:34.000Z
|
2021-09-14T07:57:21.000Z
|
# Generated by Django 2.2.21 on 2021-06-23 12:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('resources', '0125_add_timmi_payload_model'),
]
operations = [
migrations.AddField(
model_name='unit',
name='disallow_overlapping_reservations_per_user',
field=models.BooleanField(default=False, verbose_name='Disallow overlapping reservations in this unit per user.'),
),
]
| 26.75
| 126
| 0.676636
| 61
| 535
| 5.770492
| 0.688525
| 0.045455
| 0.130682
| 0.198864
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.048309
| 0.226168
| 535
| 19
| 127
| 28.157895
| 0.801932
| 0.085981
| 0
| 0
| 1
| 0
| 0.285421
| 0.143737
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.153846
| 0
| 0.384615
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
54f79d31af30b3622247fe2c6abad64bc05814e8
| 231
|
py
|
Python
|
Python_Exercicios/calcula_terreno.py
|
thalles-dreissig20/Quebra_Cabeca
|
eeb9458dbabac72d9867e5ec5d7f1aa9b5993d79
|
[
"MIT"
] | null | null | null |
Python_Exercicios/calcula_terreno.py
|
thalles-dreissig20/Quebra_Cabeca
|
eeb9458dbabac72d9867e5ec5d7f1aa9b5993d79
|
[
"MIT"
] | 1
|
2021-11-29T18:37:14.000Z
|
2021-11-29T18:37:14.000Z
|
Python_Exercicios/calcula_terreno.py
|
thalles-dreissig20/Quebra_Cabeca
|
eeb9458dbabac72d9867e5ec5d7f1aa9b5993d79
|
[
"MIT"
] | null | null | null |
def area(larg, comp):
a = larg * comp
print(f'A dimensão é {a}')
print('Controle de terrenos')
print('-' * 20)
l = float(input('qual a largura do terreno: '))
c = float(input('qual o comprimento do terreno: '))
area(l , c)
| 25.666667
| 51
| 0.627706
| 38
| 231
| 3.815789
| 0.605263
| 0.110345
| 0.193103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010753
| 0.194805
| 231
| 9
| 52
| 25.666667
| 0.768817
| 0
| 0
| 0
| 0
| 0
| 0.409483
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0
| 0
| 0.125
| 0.375
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
0704c30e12f5e2ffe2ea17cf59fe41a9fd37e4af
| 565
|
py
|
Python
|
speech_to_text/views.py
|
zace3d/video_analysis
|
9001486ae64160ca497f6b9a99df5d9a5c5422cc
|
[
"Apache-2.0"
] | null | null | null |
speech_to_text/views.py
|
zace3d/video_analysis
|
9001486ae64160ca497f6b9a99df5d9a5c5422cc
|
[
"Apache-2.0"
] | 9
|
2019-12-04T22:38:16.000Z
|
2021-06-10T17:51:32.000Z
|
speech_to_text/views.py
|
zace3d/video_analysis
|
9001486ae64160ca497f6b9a99df5d9a5c5422cc
|
[
"Apache-2.0"
] | null | null | null |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt
from . import helpers
# Create your views here.
@csrf_exempt
def convert_video(request, version):
# Get video
video = request.FILES['video']
# Transcribe video and extract audio
response = helpers.transcribe_file(video)
context = response
# return render(request, 'api/v1/result_successful.html', context)
return JsonResponse(context, safe=False)
| 25.681818
| 70
| 0.766372
| 72
| 565
| 5.930556
| 0.569444
| 0.093677
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002101
| 0.157522
| 565
| 22
| 71
| 25.681818
| 0.894958
| 0.235398
| 0
| 0
| 0
| 0
| 0.011682
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.090909
| false
| 0
| 0.454545
| 0
| 0.636364
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 2
|
0708b3e7b515fbe0913b6b5bb88c0fbd4c828abe
| 501
|
py
|
Python
|
app/main/form.py
|
hussein18149/PITCHBOARD
|
9aa515f8dd18464830bdf80488a317e8e791bd1b
|
[
"MIT"
] | null | null | null |
app/main/form.py
|
hussein18149/PITCHBOARD
|
9aa515f8dd18464830bdf80488a317e8e791bd1b
|
[
"MIT"
] | null | null | null |
app/main/form.py
|
hussein18149/PITCHBOARD
|
9aa515f8dd18464830bdf80488a317e8e791bd1b
|
[
"MIT"
] | null | null | null |
from flask_wtf import FlaskForm
from wtforms import StringField,TextAreaField,SubmitField
from wtforms.validators import Required
class UpdateProfile(FlaskForm):
about = TextAreaField('Tell us about you.',validators = [Required()])
submit = SubmitField('Submit')
class PitchForm(FlaskForm):
pitch = TextAreaField('Write a pitch')
submit = SubmitField('Submit')
class PitchComForm(FlaskForm):
pitchcom = TextAreaField('comment on your pitch ')
submit = SubmitField('Submit')
| 31.3125
| 73
| 0.754491
| 53
| 501
| 7.113208
| 0.509434
| 0.135279
| 0.183024
| 0.148541
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147705
| 501
| 15
| 74
| 33.4
| 0.882904
| 0
| 0
| 0.25
| 0
| 0
| 0.141717
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 2
|
070c8541550d5f85dceb7ec0adf8c900bec0c786
| 303
|
py
|
Python
|
Desafio Python/Aula 22 des109.py
|
ayresmajor/Curso-python
|
006229cec38ea365bf43b19e3ce93fbd32e1dca6
|
[
"MIT"
] | null | null | null |
Desafio Python/Aula 22 des109.py
|
ayresmajor/Curso-python
|
006229cec38ea365bf43b19e3ce93fbd32e1dca6
|
[
"MIT"
] | null | null | null |
Desafio Python/Aula 22 des109.py
|
ayresmajor/Curso-python
|
006229cec38ea365bf43b19e3ce93fbd32e1dca6
|
[
"MIT"
] | null | null | null |
from des109 import moeda
preco = float(input('Digite o preço pretendido: €'))
print(f'''A metade do preço é {(moeda.metade(preco))}
O dobro do preço é {(moeda.dobra(preco))}
Aumentando o preço 10% temos {(moeda.aumentar(preco, 10))}
Diminuindo o preço 13% temos {(moeda.aumentar(preco, 13))}''')
| 37.875
| 64
| 0.693069
| 48
| 303
| 4.395833
| 0.541667
| 0.085308
| 0.075829
| 0.123223
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042471
| 0.145215
| 303
| 7
| 65
| 43.285714
| 0.76834
| 0
| 0
| 0
| 0
| 0
| 0.782178
| 0.30033
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 0.166667
| 0.166667
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
070fb86171845062c7fc24a28acd90660006212e
| 521
|
py
|
Python
|
ufdl-core-app/src/ufdl/core_app/models/mixins/_UserRestrictedQuerySet.py
|
waikato-ufdl/ufdl-backend
|
776fc906c61eba6c2f2e6324758e7b8a323e30d7
|
[
"Apache-2.0"
] | null | null | null |
ufdl-core-app/src/ufdl/core_app/models/mixins/_UserRestrictedQuerySet.py
|
waikato-ufdl/ufdl-backend
|
776fc906c61eba6c2f2e6324758e7b8a323e30d7
|
[
"Apache-2.0"
] | 85
|
2020-07-24T00:04:28.000Z
|
2022-02-10T10:35:15.000Z
|
ufdl-core-app/src/ufdl/core_app/models/mixins/_UserRestrictedQuerySet.py
|
waikato-ufdl/ufdl-backend
|
776fc906c61eba6c2f2e6324758e7b8a323e30d7
|
[
"Apache-2.0"
] | null | null | null |
from django.db import models
class UserRestrictedQuerySet(models.QuerySet):
"""
Query-set base class for models which apply per-instance permissions
based on the user accessing them.
"""
def for_user(self, user):
"""
Filters the query-set to those instances that the
given user is allowed to access.
:param user: The user.
:return: The filtered query-set.
"""
raise NotImplementedError(UserRestrictedQuerySet.for_user.__qualname__)
| 28.944444
| 79
| 0.658349
| 61
| 521
| 5.52459
| 0.655738
| 0.071217
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.270633
| 521
| 17
| 80
| 30.647059
| 0.886842
| 0.483685
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 2
|
0711bae755946fd50e5034659184b298bbe243f6
| 1,786
|
py
|
Python
|
src/scs_core/osio/data/abstract_topic.py
|
seoss/scs_core
|
0d4323c5697a39eb44a887f179ba5dca3716c1d2
|
[
"MIT"
] | 3
|
2019-03-12T01:59:58.000Z
|
2020-09-12T07:27:42.000Z
|
src/scs_core/osio/data/abstract_topic.py
|
seoss/scs_core
|
0d4323c5697a39eb44a887f179ba5dca3716c1d2
|
[
"MIT"
] | 1
|
2018-04-20T07:58:38.000Z
|
2021-03-27T08:52:45.000Z
|
src/scs_core/osio/data/abstract_topic.py
|
seoss/scs_core
|
0d4323c5697a39eb44a887f179ba5dca3716c1d2
|
[
"MIT"
] | 4
|
2017-09-29T13:08:43.000Z
|
2019-10-09T09:13:58.000Z
|
"""
Created on 2 Apr 2017
@author: Bruno Beloff ([email protected])
"""
from collections import OrderedDict
from scs_core.data.json import JSONable
# --------------------------------------------------------------------------------------------------------------------
class AbstractTopic(JSONable):
"""
classdocs
"""
# ----------------------------------------------------------------------------------------------------------------
def __init__(self, path, name, description, is_public, info):
"""
Constructor
"""
self.__path = path # string
self.__name = name # string
self.__description = description # string
self.__is_public = is_public # bool
self.__info = info # TopicInfo
# ----------------------------------------------------------------------------------------------------------------
def as_json(self):
jdict = OrderedDict()
if self.path is not None:
jdict['topic'] = self.path
jdict['name'] = self.name
jdict['description'] = self.description
jdict['public'] = self.is_public
jdict['topic-info'] = self.info
return jdict
# ----------------------------------------------------------------------------------------------------------------
@property
def path(self):
return self.__path
@property
def name(self):
return self.__name
@property
def description(self):
return self.__description
@property
def is_public(self):
return self.__is_public
@property
def info(self):
return self.__info
| 23.194805
| 118
| 0.403135
| 132
| 1,786
| 5.212121
| 0.325758
| 0.069767
| 0.101744
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003867
| 0.276036
| 1,786
| 76
| 119
| 23.5
| 0.528229
| 0.333707
| 0
| 0.151515
| 0
| 0
| 0.03169
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.212121
| false
| 0
| 0.060606
| 0.151515
| 0.484848
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 2
|
072b5dc94ce99e8f35df268838491f8bfa5d061f
| 239
|
py
|
Python
|
app/src/server/hoge/hoge_api.py
|
jacob327/docker-flask-nginx-uwsgi-mysql
|
4b0731f746d6fda7bfecd082ddef53a9c5ec8f75
|
[
"MIT"
] | null | null | null |
app/src/server/hoge/hoge_api.py
|
jacob327/docker-flask-nginx-uwsgi-mysql
|
4b0731f746d6fda7bfecd082ddef53a9c5ec8f75
|
[
"MIT"
] | null | null | null |
app/src/server/hoge/hoge_api.py
|
jacob327/docker-flask-nginx-uwsgi-mysql
|
4b0731f746d6fda7bfecd082ddef53a9c5ec8f75
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# [Import start]
from flask import Blueprint, jsonify
# [Import end]
app = Blueprint(
'hoge',
__name__,
url_prefix='/hoge'
)
@app.route('/test')
def hoge():
return "\nhogehoge"
| 13.277778
| 36
| 0.606695
| 29
| 239
| 4.827586
| 0.793103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005263
| 0.205021
| 239
| 17
| 37
| 14.058824
| 0.731579
| 0.276151
| 0
| 0
| 0
| 0
| 0.142012
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0
| 0.111111
| 0.111111
| 0.333333
| 0.222222
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 2
|
072eb9a21b6f104ebeda43ae8b0c58030a13066f
| 18,159
|
py
|
Python
|
corehq/apps/app_manager/tests/test_form_workflow.py
|
kkrampa/commcare-hq
|
d64d7cad98b240325ad669ccc7effb07721b4d44
|
[
"BSD-3-Clause"
] | 1
|
2020-05-05T13:10:01.000Z
|
2020-05-05T13:10:01.000Z
|
corehq/apps/app_manager/tests/test_form_workflow.py
|
kkrampa/commcare-hq
|
d64d7cad98b240325ad669ccc7effb07721b4d44
|
[
"BSD-3-Clause"
] | 1
|
2019-12-09T14:00:14.000Z
|
2019-12-09T14:00:14.000Z
|
corehq/apps/app_manager/tests/test_form_workflow.py
|
MaciejChoromanski/commcare-hq
|
fd7f65362d56d73b75a2c20d2afeabbc70876867
|
[
"BSD-3-Clause"
] | 5
|
2015-11-30T13:12:45.000Z
|
2019-07-01T19:27:07.000Z
|
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
class TestFormWorkflow(SimpleTestCase, TestXmlMixin):
file_path = ('data', 'form_workflow')
def test_basic(self):
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('m0', 'frog')
m1, m1f0 = factory.new_basic_module('m1', 'frog')
m0f0.post_form_workflow = WORKFLOW_FORM
m0f0.form_links = [
FormLink(xpath="(today() - dob) < 7", form_id=m1f0.unique_id)
]
self.assertXmlPartialEqual(self.get_xml('form_link_basic'), factory.app.create_suite(), "./entry[1]")
def test_with_case_management_both_update(self):
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('m0', 'frog')
factory.form_requires_case(m0f0)
m1, m1f0 = factory.new_basic_module('m1', 'frog')
factory.form_requires_case(m1f0)
m0f0.post_form_workflow = WORKFLOW_FORM
m0f0.form_links = [
FormLink(xpath="(today() - dob) > 7", form_id=m1f0.unique_id)
]
self.assertXmlPartialEqual(self.get_xml('form_link_update_case'), factory.app.create_suite(), "./entry[1]")
def test_with_case_management_create_update(self):
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('m0', 'frog')
factory.form_opens_case(m0f0)
m1, m1f0 = factory.new_basic_module('m1', 'frog')
factory.form_requires_case(m1f0)
m0f0.post_form_workflow = WORKFLOW_FORM
m0f0.form_links = [
FormLink(xpath='true()', form_id=m1f0.unique_id)
]
self.assertXmlPartialEqual(self.get_xml('form_link_create_update_case'), factory.app.create_suite(), "./entry[1]")
def test_with_case_management_multiple_links(self):
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('m0', 'frog')
factory.form_opens_case(m0f0)
m1, m1f0 = factory.new_basic_module('m1', 'frog')
factory.form_requires_case(m1f0)
m1f1 = factory.new_form(m1)
factory.form_opens_case(m1f1)
m0f0.post_form_workflow = WORKFLOW_FORM
m0f0.form_links = [
FormLink(xpath="a = 1", form_id=m1f0.unique_id),
FormLink(xpath="a = 2", form_id=m1f1.unique_id)
]
self.assertXmlPartialEqual(self.get_xml('form_link_multiple'), factory.app.create_suite(), "./entry[1]")
def test_link_to_child_module(self):
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('enroll child', 'child')
factory.form_opens_case(m0f0)
m1, m1f0 = factory.new_basic_module('child visit', 'child')
factory.form_requires_case(m1f0)
factory.form_opens_case(m1f0, case_type='visit', is_subcase=True)
m2, m2f0 = factory.new_advanced_module('visit history', 'visit', parent_module=m1)
factory.form_requires_case(m2f0, 'child')
factory.form_requires_case(m2f0, 'visit', parent_case_type='child')
m0f0.post_form_workflow = WORKFLOW_FORM
m0f0.form_links = [
FormLink(xpath="true()", form_id=m1f0.unique_id),
]
m1f0.post_form_workflow = WORKFLOW_FORM
m1f0.form_links = [
FormLink(xpath="true()", form_id=m2f0.unique_id),
]
self.assertXmlPartialEqual(self.get_xml('form_link_tdh'), factory.app.create_suite(), "./entry")
def test_manual_form_link(self):
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('enroll child', 'child')
factory.form_opens_case(m0f0)
m1, m1f0 = factory.new_basic_module('child visit', 'child')
factory.form_requires_case(m1f0)
factory.form_opens_case(m1f0, case_type='visit', is_subcase=True)
m2, m2f0 = factory.new_advanced_module('visit history', 'visit', parent_module=m1)
factory.form_requires_case(m2f0, 'child')
factory.form_requires_case(m2f0, 'visit', parent_case_type='child')
m0f0.post_form_workflow = WORKFLOW_FORM
m0f0.form_links = [
FormLink(xpath="true()", form_id=m1f0.unique_id, datums=[
FormDatum(name='case_id', xpath="instance('commcaresession')/session/data/case_id_new_child_0")
]),
]
m1f0.post_form_workflow = WORKFLOW_FORM
m1f0.form_links = [
FormLink(xpath="true()", form_id=m2f0.unique_id, datums=[
FormDatum(name='case_id', xpath="instance('commcaresession')/session/data/case_id"),
FormDatum(name='case_id_load_visit_0', xpath="instance('commcaresession')/session/data/case_id_new_visit_0"),
]),
]
self.assertXmlPartialEqual(self.get_xml('form_link_tdh'), factory.app.create_suite(), "./entry")
def test_manual_form_link_with_fallback(self):
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('enroll child', 'child')
factory.form_opens_case(m0f0)
m1, m1f0 = factory.new_basic_module('child visit', 'child')
factory.form_requires_case(m1f0)
factory.form_opens_case(m1f0, case_type='visit', is_subcase=True)
m2, m2f0 = factory.new_advanced_module('visit history', 'visit', parent_module=m1)
factory.form_requires_case(m2f0, 'child')
factory.form_requires_case(m2f0, 'visit', parent_case_type='child')
m0f0.post_form_workflow = WORKFLOW_FORM
m0f0.form_links = [
FormLink(xpath="true()", form_id=m1f0.unique_id, datums=[
FormDatum(name='case_id', xpath="instance('commcaresession')/session/data/case_id_new_child_0")
]),
]
m1f0.post_form_workflow = WORKFLOW_FORM
condition_for_xpath = "instance('casedb')/casedb/case[@case_id = " \
"instance('commcaresession')/session/data/case_id]/prop = 'value'"
m1f0.form_links = [
FormLink(xpath="true()", form_id=m2f0.unique_id, datums=[
FormDatum(name='case_id', xpath="instance('commcaresession')/session/data/case_id"),
FormDatum(name='case_id_load_visit_0',
xpath="instance('commcaresession')/session/data/case_id_new_visit_0"),
]),
FormLink(xpath=condition_for_xpath, form_id=m2f0.unique_id, datums=[
FormDatum(name='case_id', xpath="instance('commcaresession')/session/data/case_id"),
FormDatum(name='case_id_load_visit_0',
xpath="instance('commcaresession')/session/data/case_id_new_visit_0"),
]),
]
m1f0.post_form_workflow_fallback = WORKFLOW_PREVIOUS
self.assertXmlPartialEqual(self.get_xml('form_link_tdh_with_fallback_previous'),
factory.app.create_suite(), "./entry")
m1f0.post_form_workflow_fallback = WORKFLOW_MODULE
self.assertXmlPartialEqual(self.get_xml('form_link_tdh_with_fallback_module'),
factory.app.create_suite(), "./entry")
m1f0.post_form_workflow_fallback = WORKFLOW_ROOT
self.assertXmlPartialEqual(self.get_xml('form_link_tdh_with_fallback_root'),
factory.app.create_suite(), "./entry")
def test_reference_to_missing_session_variable_in_stack(self):
# http://manage.dimagi.com/default.asp?236750
#
# Stack create blocks do not update the session after each datum
# so items put into the session in one step aren't available later steps
#
# <datum id="case_id_A" value="instance('commcaresession')/session/data/case_id_new_A"/>
# - <datum id="case_id_B" value="instance('casedb')/casedb/case[@case_id=instance('commcaresession')/session/data/case_id_A]/index/host"/>
# + <datum id="case_id_B" value="instance('casedb')/casedb/case[@case_id=instance('commcaresession')/session/data/case_id_new_A]/index/host"/>
#
# in the above example ``case_id_A`` is being added to the session and then
# later referenced. However since the session doesn't get updated
# the value isn't available in the session.
#
# To fix this we need to replace any references to previous variables with the full xpath which
# that session variable references.
#
# See corehq.apps.app_manager.suite_xml.post_process.workflow._replace_session_references_in_stack
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('person registration', 'person')
factory.form_opens_case(m0f0)
m1, m1f0 = factory.new_advanced_module('episode registration', 'episode')
factory.form_requires_case(m1f0, case_type='person')
factory.form_opens_case(m1f0, case_type='episode', is_subcase=True, is_extension=True)
m2, m2f0 = factory.new_advanced_module('tests', 'episode')
factory.form_requires_case(m2f0, 'episode')
factory.advanced_form_autoloads(m2f0, AUTO_SELECT_CASE, 'host', 'load_episode_0')
m1f0.post_form_workflow = WORKFLOW_FORM
m1f0.form_links = [
FormLink(xpath="true()", form_id=m2f0.unique_id, datums=[
FormDatum(name='case_id_load_episode_0', xpath="instance('commcaresession')/session/data/case_id_new_episode_0")
]),
]
self.assertXmlPartialEqual(self.get_xml('form_link_enikshay'), factory.app.create_suite(), "./entry")
def test_return_to_parent_module(self):
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('enroll child', 'child')
factory.form_opens_case(m0f0)
m1, m1f0 = factory.new_basic_module('child visit', 'child')
factory.form_requires_case(m1f0)
factory.form_opens_case(m1f0, case_type='visit', is_subcase=True)
m2, m2f0 = factory.new_advanced_module('visit history', 'visit', parent_module=m1)
factory.form_requires_case(m2f0, 'child')
factory.form_requires_case(m2f0, 'visit', parent_case_type='child')
m2f0.post_form_workflow = WORKFLOW_PARENT_MODULE
expected = """
<partial>
<stack>
<create>
<command value="'m1'"/>
<datum id="case_id" value="instance('commcaresession')/session/data/case_id"/>
<datum id="case_id_new_visit_0" value="uuid()"/>
</create>
</stack>
</partial>
"""
self.assertXmlPartialEqual(expected, factory.app.create_suite(), "./entry[3]/stack")
def test_return_to_child_module(self):
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('enroll child', 'child')
factory.form_opens_case(m0f0)
m1, m1f0 = factory.new_basic_module('child visit', 'child')
factory.form_requires_case(m1f0)
factory.form_opens_case(m1f0, case_type='visit', is_subcase=True)
m2, m2f0 = factory.new_advanced_module('visit history', 'visit', parent_module=m1)
factory.form_requires_case(m2f0, 'child')
factory.form_requires_case(m2f0, 'visit', parent_case_type='child')
m2f0.post_form_workflow = WORKFLOW_MODULE
expected = """
<partial>
<stack>
<create>
<command value="'m1'"/>
<datum id="case_id" value="instance('commcaresession')/session/data/case_id"/>
<datum id="case_id_new_visit_0" value="uuid()"/>
<command value="'m2'"/>
</create>
</stack>
</partial>
"""
self.assertXmlPartialEqual(expected, factory.app.create_suite(), "./entry[3]/stack")
def test_link_to_form_in_parent_module(self):
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('enroll child', 'child')
factory.form_opens_case(m0f0)
m1, m1f0 = factory.new_basic_module('child visit', 'child')
factory.form_requires_case(m1f0)
m2, m2f0 = factory.new_advanced_module('visit history', 'visit', parent_module=m1)
factory.form_requires_case(m2f0, 'child')
# link to child -> edit child
m2f0.post_form_workflow = WORKFLOW_FORM
m2f0.form_links = [
FormLink(xpath="true()", form_id=m1f0.unique_id),
]
self.assertXmlPartialEqual(self.get_xml('form_link_child_modules'), factory.app.create_suite(), "./entry[3]")
def test_form_links_submodule(self):
# Test that when linking between two forms in a submodule we match up the
# session variables between the source and target form correctly
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('child visit', 'child')
factory.form_requires_case(m0f0)
factory.form_opens_case(m0f0, 'visit', is_subcase=True)
m1, m1f0 = factory.new_advanced_module('visit histroy', 'visit', parent_module=m0)
factory.form_requires_case(m1f0, 'child')
factory.form_requires_case(m1f0, 'visit', parent_case_type='child')
m1f1 = factory.new_form(m1)
factory.form_requires_case(m1f1, 'child')
factory.form_requires_case(m1f1, 'visit', parent_case_type='child')
m1f0.post_form_workflow = WORKFLOW_FORM
m1f0.form_links = [
FormLink(xpath="true()", form_id=m1f1.unique_id),
]
self.assertXmlPartialEqual(self.get_xml('form_link_submodule'), factory.app.create_suite(), "./entry")
def _build_workflow_app(self, mode):
factory = AppFactory(build_version='2.9.0')
m0, m0f0 = factory.new_basic_module('m0', '')
factory.new_form(m0)
m1, m1f0 = factory.new_basic_module('m1', 'patient')
m1f1 = factory.new_form(m1)
factory.form_opens_case(m1f0)
factory.form_requires_case(m1f1)
m2, m2f0 = factory.new_basic_module('m2', 'patient')
m2f1 = factory.new_form(m2)
factory.form_requires_case(m2f0)
factory.form_requires_case(m2f1)
m3, m3f0 = factory.new_basic_module('m3', 'child')
m3f1 = factory.new_form(m3)
factory.form_requires_case(m3f0, parent_case_type='patient')
factory.form_requires_case(m3f1)
m4, m4f0 = factory.new_advanced_module('m4', 'patient')
factory.form_requires_case(m4f0, case_type='patient')
factory.form_requires_case(m4f0, case_type='patient')
m4f1 = factory.new_form(m4)
factory.form_requires_case(m4f1, case_type='patient')
factory.form_requires_case(m4f1, case_type='patient')
factory.form_requires_case(m4f1, case_type='patient')
m4f2 = factory.new_form(m4)
factory.form_requires_case(m4f2, case_type='patient')
factory.form_requires_case(m4f2, case_type='patient')
factory.advanced_form_autoloads(m4f2, AUTO_SELECT_RAW, 'case_id')
m5, m5f0 = factory.new_basic_module('m5', 'patient', parent_module=m1)
factory.form_requires_case(m5f0)
for module in factory.app.get_modules():
for form in module.get_forms():
form.post_form_workflow = mode
return factory.app
def test_form_workflow_previous(self):
app = self._build_workflow_app(WORKFLOW_PREVIOUS)
self.assertXmlPartialEqual(self.get_xml('suite-workflow-previous'), app.create_suite(), "./entry")
def test_form_workflow_module(self):
app = self._build_workflow_app(WORKFLOW_MODULE)
self.assertXmlPartialEqual(self.get_xml('suite-workflow-module'), app.create_suite(), "./entry")
def test_form_workflow_module_in_root(self):
app = self._build_workflow_app(WORKFLOW_PREVIOUS)
for m in [1, 2]:
module = app.get_module(m)
module.put_in_root = True
self.assertXmlPartialEqual(self.get_xml('suite-workflow-module-in-root'), app.create_suite(), "./entry")
def test_form_workflow_root(self):
app = self._build_workflow_app(WORKFLOW_ROOT)
self.assertXmlPartialEqual(self.get_xml('suite-workflow-root'), app.create_suite(), "./entry")
class TestReplaceSessionRefs(SimpleTestCase):
def test_replace_session_references_in_stack(self):
children = [
CommandId('m0'),
StackDatum(id='a', value=session_var('new_a')),
StackDatum(id='b', value=session_var('new_b')),
StackDatum(id='c', value="instance('casedb')/case/[@case_id = {a}]/index/parent".format(a=session_var('a'))),
StackDatum(id='d', value="if({c}, {c}, {a}]".format(a=session_var('a'), c=session_var('c')))
]
clean = _replace_session_references_in_stack(children)
clean_raw = []
for child in clean:
if isinstance(child, CommandId):
clean_raw.append(child.id)
else:
clean_raw.append((child.id, child.value))
new_c = "instance('casedb')/case/[@case_id = {a}]/index/parent".format(a=session_var('new_a'))
self.assertEqual(clean_raw, [
'm0',
('a', session_var('new_a')),
('b', session_var('new_b')),
('c', new_c),
('d', "if({c}, {c}, {a}]".format(a=session_var('new_a'), c=new_c))
])
| 43.546763
| 151
| 0.654937
| 2,267
| 18,159
| 4.937362
| 0.094398
| 0.057983
| 0.069597
| 0.084249
| 0.791477
| 0.736978
| 0.713839
| 0.671402
| 0.625838
| 0.578219
| 0
| 0.031453
| 0.220882
| 18,159
| 416
| 152
| 43.651442
| 0.759683
| 0.061402
| 0
| 0.517572
| 0
| 0
| 0.180579
| 0.064501
| 0
| 0
| 0
| 0
| 0.060703
| 1
| 0.057508
| false
| 0
| 0.031949
| 0
| 0.102236
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
0734fb5dd4a56bdb2ef242b87aea0bcbb002a5dc
| 142,160
|
py
|
Python
|
models_SHOT_convex/syn30m03hfsg.py
|
grossmann-group/pyomo-MINLP-benchmarking
|
714f0a0dffd61675649a805683c0627af6b4929e
|
[
"MIT"
] | null | null | null |
models_SHOT_convex/syn30m03hfsg.py
|
grossmann-group/pyomo-MINLP-benchmarking
|
714f0a0dffd61675649a805683c0627af6b4929e
|
[
"MIT"
] | null | null | null |
models_SHOT_convex/syn30m03hfsg.py
|
grossmann-group/pyomo-MINLP-benchmarking
|
714f0a0dffd61675649a805683c0627af6b4929e
|
[
"MIT"
] | null | null | null |
# 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)
| 36.090378
| 120
| 0.639913
| 25,143
| 142,160
| 3.618104
| 0.098676
| 0.043377
| 0.226393
| 0.150379
| 0.581895
| 0.475662
| 0.450731
| 0.412883
| 0.354578
| 0.004485
| 0
| 0.24113
| 0.156218
| 142,160
| 3,938
| 121
| 36.099543
| 0.517257
| 0.004783
| 0
| 0.008642
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.000412
| 0
| 0.000412
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
0737281036977c90f04b5a6cdebc502ad5e24b6d
| 293
|
py
|
Python
|
slogviz/config.py
|
mariusfrinken/slogviz
|
0557eda336c257245eefe75699eb2479eb672ca1
|
[
"MIT"
] | 1
|
2021-05-11T06:54:28.000Z
|
2021-05-11T06:54:28.000Z
|
slogviz/config.py
|
mariusfrinken/slogviz
|
0557eda336c257245eefe75699eb2479eb672ca1
|
[
"MIT"
] | null | null | null |
slogviz/config.py
|
mariusfrinken/slogviz
|
0557eda336c257245eefe75699eb2479eb672ca1
|
[
"MIT"
] | null | null | null |
# -*- 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;
| 29.3
| 107
| 0.744027
| 44
| 293
| 4.954545
| 0.613636
| 0.045872
| 0.155963
| 0.229358
| 0.284404
| 0.284404
| 0
| 0
| 0
| 0
| 0
| 0.004115
| 0.170648
| 293
| 10
| 108
| 29.3
| 0.893004
| 0.829352
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
073abd8b8de49a73d08e10cf329cea3aaaac91fa
| 491
|
py
|
Python
|
tests/integration/agenda/test_models.py
|
rolandgeider/OpenSlides
|
331141c17cb23da26e377d4285efdb4a50753a59
|
[
"MIT"
] | null | null | null |
tests/integration/agenda/test_models.py
|
rolandgeider/OpenSlides
|
331141c17cb23da26e377d4285efdb4a50753a59
|
[
"MIT"
] | null | null | null |
tests/integration/agenda/test_models.py
|
rolandgeider/OpenSlides
|
331141c17cb23da26e377d4285efdb4a50753a59
|
[
"MIT"
] | null | null | null |
from openslides.agenda.models import Item
from openslides.core.models import CustomSlide
from openslides.utils.test import TestCase
class TestItemManager(TestCase):
def test_get_root_and_children_db_queries(self):
"""
Test that get_root_and_children needs only one db query.
"""
for i in range(10):
CustomSlide.objects.create(title='item{}'.format(i))
with self.assertNumQueries(1):
Item.objects.get_root_and_children()
| 30.6875
| 64
| 0.700611
| 63
| 491
| 5.269841
| 0.603175
| 0.126506
| 0.090361
| 0.162651
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007772
| 0.213849
| 491
| 15
| 65
| 32.733333
| 0.852332
| 0.114053
| 0
| 0
| 0
| 0
| 0.014599
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 1
| 0.111111
| false
| 0
| 0.333333
| 0
| 0.555556
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 2
|
07571f5303eed07dcbb7a47a5145eef3cd7c884f
| 536
|
py
|
Python
|
medium/151.py
|
pisskidney/leetcode
|
08c19cbf3d7afc897908ea05db4ad11a5487f523
|
[
"MIT"
] | null | null | null |
medium/151.py
|
pisskidney/leetcode
|
08c19cbf3d7afc897908ea05db4ad11a5487f523
|
[
"MIT"
] | null | null | null |
medium/151.py
|
pisskidney/leetcode
|
08c19cbf3d7afc897908ea05db4ad11a5487f523
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
class Solution(object):
def reverseWords(self, s):
if s == '':
return s
res = []
i = len(s) - 2
while i >= -1:
if s[i] == ' ' or i == -1:
word = ''
j = i + 1
while j < len(s) and s[j] != ' ':
word += s[j]
j += 1
if word:
res.append(word)
i -= 1
return ' '.join(res)
s = Solution()
print s.reverseWords('a x')
| 20.615385
| 49
| 0.33209
| 61
| 536
| 2.918033
| 0.442623
| 0.044944
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023438
| 0.522388
| 536
| 25
| 50
| 21.44
| 0.671875
| 0.029851
| 0
| 0
| 0
| 0
| 0.011583
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.052632
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
075a282b1afd93e2cc9af2acd58c24b3702f7904
| 93
|
py
|
Python
|
CAMPODETIRO/test.py
|
Arguel/old-projects
|
2e5f594a6303b2e137acf555569eca98aab08054
|
[
"Apache-2.0"
] | null | null | null |
CAMPODETIRO/test.py
|
Arguel/old-projects
|
2e5f594a6303b2e137acf555569eca98aab08054
|
[
"Apache-2.0"
] | null | null | null |
CAMPODETIRO/test.py
|
Arguel/old-projects
|
2e5f594a6303b2e137acf555569eca98aab08054
|
[
"Apache-2.0"
] | null | null | null |
entrada = input("palabra")
listaDeLetras = []
for i in entrada:
listaDeLetras.append(i)
| 15.5
| 27
| 0.698925
| 11
| 93
| 5.909091
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172043
| 93
| 5
| 28
| 18.6
| 0.844156
| 0
| 0
| 0
| 0
| 0
| 0.076087
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
075ee89278e2e099ce3c9cbc108dfe159e2012f2
| 3,284
|
py
|
Python
|
ppcls/data/preprocess/__init__.py
|
zhusonghe/PaddleClas-1
|
e2e492f9c78ed5084cc50d7c45eef4cc41e1eeaf
|
[
"Apache-2.0"
] | 3,763
|
2020-04-10T04:48:11.000Z
|
2022-03-31T13:24:37.000Z
|
ppcls/data/preprocess/__init__.py
|
zhusonghe/PaddleClas-1
|
e2e492f9c78ed5084cc50d7c45eef4cc41e1eeaf
|
[
"Apache-2.0"
] | 633
|
2020-04-08T18:27:31.000Z
|
2022-03-31T01:09:43.000Z
|
ppcls/data/preprocess/__init__.py
|
zhusonghe/PaddleClas-1
|
e2e492f9c78ed5084cc50d7c45eef4cc41e1eeaf
|
[
"Apache-2.0"
] | 846
|
2020-04-08T08:13:18.000Z
|
2022-03-31T12:28:37.000Z
|
# 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
class AutoAugment(RawImageNetPolicy):
""" ImageNetPolicy wrapper to auto fit different img types """
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def __call__(self, img):
if not isinstance(img, Image.Image):
img = np.ascontiguousarray(img)
img = Image.fromarray(img)
img = super().__call__(img)
if isinstance(img, Image.Image):
img = np.asarray(img)
return img
class RandAugment(RawRandAugment):
""" RandAugment wrapper to auto fit different img types """
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def __call__(self, img):
if not isinstance(img, Image.Image):
img = np.ascontiguousarray(img)
img = Image.fromarray(img)
img = super().__call__(img)
if isinstance(img, Image.Image):
img = np.asarray(img)
return img
class TimmAutoAugment(RawTimmAutoAugment):
""" TimmAutoAugment wrapper to auto fit different img tyeps. """
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def __call__(self, img):
if not isinstance(img, Image.Image):
img = np.ascontiguousarray(img)
img = Image.fromarray(img)
img = super().__call__(img)
if isinstance(img, Image.Image):
img = np.asarray(img)
return img
| 32.514851
| 114
| 0.715286
| 416
| 3,284
| 5.516827
| 0.314904
| 0.062745
| 0.090632
| 0.160349
| 0.517211
| 0.437909
| 0.425708
| 0.282789
| 0.282789
| 0.282789
| 0
| 0.00302
| 0.193362
| 3,284
| 100
| 115
| 32.84
| 0.863345
| 0.232034
| 0
| 0.545455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.127273
| false
| 0
| 0.327273
| 0
| 0.581818
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 2
|
076975f577d6632b0b1b26b10892f5123c387c67
| 1,286
|
py
|
Python
|
010-round.py
|
richardvecsey/python-basics
|
b66abef77bce2ddd6f2f39b631e1dd97a9aa2fac
|
[
"MIT"
] | 3
|
2019-12-29T18:52:21.000Z
|
2020-02-20T09:18:08.000Z
|
010-round.py
|
richardvecsey/python-basics
|
b66abef77bce2ddd6f2f39b631e1dd97a9aa2fac
|
[
"MIT"
] | null | null | null |
010-round.py
|
richardvecsey/python-basics
|
b66abef77bce2ddd6f2f39b631e1dd97a9aa2fac
|
[
"MIT"
] | 2
|
2020-02-20T09:18:13.000Z
|
2020-06-04T04:51:44.000Z
|
"""
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)))
| 33.842105
| 80
| 0.64619
| 152
| 1,286
| 5.388158
| 0.230263
| 0.253968
| 0.166056
| 0.117216
| 0.630037
| 0.590965
| 0.590965
| 0.590965
| 0.590965
| 0.590965
| 0
| 0.018072
| 0.225505
| 1,286
| 37
| 81
| 34.756757
| 0.804217
| 0.342924
| 0
| 0.470588
| 0
| 0
| 0.39196
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.470588
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 2
|
4aca7d77d6d130f3025fa754e718e7148f830e41
| 3,558
|
py
|
Python
|
skcriteria/preprocessing/push_negatives.py
|
elcolie/scikit-criteria
|
216674d699b60d68fefa98d44afd619943f3bb00
|
[
"BSD-3-Clause"
] | null | null | null |
skcriteria/preprocessing/push_negatives.py
|
elcolie/scikit-criteria
|
216674d699b60d68fefa98d44afd619943f3bb00
|
[
"BSD-3-Clause"
] | null | null | null |
skcriteria/preprocessing/push_negatives.py
|
elcolie/scikit-criteria
|
216674d699b60d68fefa98d44afd619943f3bb00
|
[
"BSD-3-Clause"
] | null | null | null |
#!/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
class PushNegatives(SKCMatrixAndWeightTransformerABC):
r"""Increment the matrix/weights until all the valuer are sean >= 0.
If the matrix/weights has negative values this function increment the
values proportionally to made all the matrix/weights 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}
"""
@doc_inherit(SKCMatrixAndWeightTransformerABC._transform_weights)
def _transform_weights(self, weights):
return push_negatives(weights, axis=None)
@doc_inherit(SKCMatrixAndWeightTransformerABC._transform_matrix)
def _transform_matrix(self, matrix):
return push_negatives(matrix, axis=0)
| 30.93913
| 79
| 0.522766
| 388
| 3,558
| 4.703608
| 0.368557
| 0.016438
| 0.043836
| 0.006575
| 0.263014
| 0.263014
| 0.263014
| 0.263014
| 0.233425
| 0.233425
| 0
| 0.018162
| 0.241709
| 3,558
| 114
| 80
| 31.210526
| 0.658265
| 0.744238
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.176471
| false
| 0
| 0.176471
| 0.117647
| 0.588235
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 2
|
4acbbae7f94e1d806015de62ee5a96d02c3544d7
| 301
|
py
|
Python
|
inserter.py
|
pirate/macOS-global-autocomplete
|
4ba8c3efdd34e7b4c0044c50f47d21a1bafd9aac
|
[
"MIT"
] | 23
|
2018-12-28T17:33:33.000Z
|
2022-03-07T21:25:31.000Z
|
inserter.py
|
pirate/osx-global-autocomplete
|
4ba8c3efdd34e7b4c0044c50f47d21a1bafd9aac
|
[
"MIT"
] | null | null | null |
inserter.py
|
pirate/osx-global-autocomplete
|
4ba8c3efdd34e7b4c0044c50f47d21a1bafd9aac
|
[
"MIT"
] | 2
|
2017-02-27T18:08:12.000Z
|
2018-08-27T00:40:10.000Z
|
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)
| 21.5
| 80
| 0.770764
| 50
| 301
| 4.56
| 0.56
| 0.092105
| 0.192982
| 0.096491
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015385
| 0.136213
| 301
| 13
| 81
| 23.153846
| 0.861538
| 0.368771
| 0
| 0
| 0
| 0
| 0.187166
| 0
| 0
| 0
| 0
| 0.076923
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 0.125
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
4acdd598615906ddfbcd01ae7441ccbc9e89653b
| 899
|
py
|
Python
|
payabbhi/error.py
|
ppm-avinder/payabbhi-python
|
0f84f01349e365753f4b83eee584618e1a855567
|
[
"MIT"
] | 1
|
2018-03-06T08:30:38.000Z
|
2018-03-06T08:30:38.000Z
|
payabbhi/error.py
|
ppm-avinder/payabbhi-python
|
0f84f01349e365753f4b83eee584618e1a855567
|
[
"MIT"
] | null | null | null |
payabbhi/error.py
|
ppm-avinder/payabbhi-python
|
0f84f01349e365753f4b83eee584618e1a855567
|
[
"MIT"
] | 5
|
2018-10-08T05:56:44.000Z
|
2020-05-22T11:31:07.000Z
|
class PayabbhiError(Exception):
def __init__(self, description=None, http_status=None,
field=None):
self.description = description
self.http_status = http_status
self.field = field
self._message = self.error_message()
super(PayabbhiError, self).__init__(self._message)
def error_message(self):
msg = "message: " + self.description
msg = (msg + ", http_code: " + str(self.http_status)) if self.http_status else msg
msg = (msg + ", field: " + self.field) if self.field else msg
return msg + "\n"
class APIError(PayabbhiError):
pass
class APIConnectionError(PayabbhiError):
pass
class AuthenticationError(PayabbhiError):
pass
class InvalidRequestError(PayabbhiError):
pass
class GatewayError(PayabbhiError):
pass
class SignatureVerificationError(PayabbhiError):
pass
| 22.475
| 90
| 0.669633
| 94
| 899
| 6.212766
| 0.297872
| 0.174658
| 0.188356
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.235818
| 899
| 39
| 91
| 23.051282
| 0.850073
| 0
| 0
| 0.24
| 0
| 0
| 0.036707
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.08
| false
| 0.24
| 0
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 2
|
4ace0f44b44658df4422d4f5661978d41ce06350
| 1,923
|
py
|
Python
|
src/mpu/__init__.py
|
TsinghuaAI/CPM-2-Pretrain
|
33003865239e7ba13a12aabf9ec2735cef66bf3b
|
[
"MIT"
] | 54
|
2021-06-17T09:05:11.000Z
|
2022-03-18T09:12:14.000Z
|
src/mpu/__init__.py
|
TsinghuaAI/CPM-2-Pretrain
|
33003865239e7ba13a12aabf9ec2735cef66bf3b
|
[
"MIT"
] | 25
|
2021-06-29T02:58:28.000Z
|
2022-03-30T04:45:06.000Z
|
src/mpu/__init__.py
|
TsinghuaAI/CPM-2-Pretrain
|
33003865239e7ba13a12aabf9ec2735cef66bf3b
|
[
"MIT"
] | 11
|
2021-06-22T08:00:25.000Z
|
2022-03-04T05:41:50.000Z
|
# 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
| 36.980769
| 74
| 0.841914
| 272
| 1,923
| 5.709559
| 0.433824
| 0.108822
| 0.128783
| 0.10367
| 0.322601
| 0.275596
| 0.104314
| 0
| 0
| 0
| 0
| 0.0053
| 0.117005
| 1,923
| 51
| 75
| 37.705882
| 0.909305
| 0.328133
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 2
|
4acfc9cbd59d86d35555e057b3b06babb6b17219
| 1,091
|
py
|
Python
|
python/test/test_tree_dp.py
|
EQt/treelas
|
24a5cebf101180822198806c0a4131b0efb7a36d
|
[
"MIT"
] | 3
|
2020-06-18T13:31:26.000Z
|
2021-04-05T17:42:56.000Z
|
python/test/test_tree_dp.py
|
EQt/treelas
|
24a5cebf101180822198806c0a4131b0efb7a36d
|
[
"MIT"
] | null | null | null |
python/test/test_tree_dp.py
|
EQt/treelas
|
24a5cebf101180822198806c0a4131b0efb7a36d
|
[
"MIT"
] | null | null | null |
import numpy as np
from treelas import post_order, TreeInstance
def test_demo_3x7_postord():
parent = np.array([0, 4, 5, 0, 3, 4, 7, 8, 5, 6, 7, 8,
9, 14, 17, 12, 15, 16, 19, 16, 17])
po = post_order(parent, include_root=True)
expect = np.array([12, 11, 19, 20, 21, 14, 15, 18, 17, 16, 13,
10, 7, 8, 9, 3, 6, 2, 5, 4, 1], dtype='i4') - 1
assert (po == expect).all()
def test_demo_3x7():
y = np.fromstring("0.62 0.73 0.71 1.5 1.17 0.43 1.08 0.62 " +
"1.73 0.95 1.46 1.6 1.16 0.38 0.9 0.32 " +
"-0.48 0.95 1.08 0.02 0.4", sep=" ")
parent = np.array([0, 4, 5, 0, 3, 4, 7, 8, 5, 6, 7, 8,
9, 14, 17, 12, 15, 16, 19, 16, 17])
lam = 1.0
prob = TreeInstance(y, parent, lam=lam)
assert prob.root == 0
assert prob.parent.dtype == np.int32
prob.solve()
assert abs(prob.x.mean() - prob.y.mean()) < 1e-15
assert len(np.unique(prob.x)) == 2
assert max(np.abs(prob.dual[2:]) - lam) < 1e-12
assert max(np.abs(prob.gamma)) < 1e-15
| 37.62069
| 70
| 0.508708
| 207
| 1,091
| 2.642512
| 0.357488
| 0.018282
| 0.016453
| 0.051188
| 0.219378
| 0.153565
| 0.153565
| 0.153565
| 0.153565
| 0.153565
| 0
| 0.227815
| 0.307974
| 1,091
| 28
| 71
| 38.964286
| 0.496689
| 0
| 0
| 0.166667
| 0
| 0.083333
| 0.095325
| 0
| 0
| 0
| 0
| 0
| 0.291667
| 1
| 0.083333
| false
| 0
| 0.083333
| 0
| 0.166667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
4aef5ae78252c6d6372a39f824e9c27cc8e4b322
| 2,764
|
py
|
Python
|
lib/common/app.py
|
auho/python-ETL
|
761589814b04e076ba6fa1c0e64b83ce62ce8556
|
[
"Apache-2.0"
] | null | null | null |
lib/common/app.py
|
auho/python-ETL
|
761589814b04e076ba6fa1c0e64b83ce62ce8556
|
[
"Apache-2.0"
] | null | null | null |
lib/common/app.py
|
auho/python-ETL
|
761589814b04e076ba6fa1c0e64b83ce62ce8556
|
[
"Apache-2.0"
] | null | null | null |
import argparse
import yaml
import sys
from .conf import MysqlConf
from lib.db import mysql
parser = argparse.ArgumentParser()
parser.add_argument("--config", help="config file name", type=str, required=False, default='office')
input_args = parser.parse_args()
class PartConfig:
def __init__(self):
self._mysqlDbConf = MysqlConf()
self._yamlConfig = None
def parse(self, conf_name, module_path):
self._parse_yaml(conf_name, module_path)
self._mysqlDbConf.load(self.get('mysql'))
def get(self, name):
return self._yamlConfig[name]
def _parse_yaml(self, conf_name, module_path):
yaml_file = module_path + f"/conf/db_{conf_name}.yml"
f = open(yaml_file, 'r', encoding='utf-8')
yaml_content = f.read()
self._yamlConfig = yaml.safe_load(yaml_content)
@property
def mysql_db_conf(self):
return self._mysqlDbConf
class App:
configName = None
moduleImport = None
moduleName = None
modulePath = None
mysqlDb = None
mysqlDbConf = None
ENV = 'dev'
DEBUG = True
ENV_DEBUG = False
def __init__(self, module_path, root_path):
self.configName = input_args.config
self.modulePath = module_path
self.moduleName = self.modulePath.replace(root_path + '/', '')
self.moduleImport = self.moduleName.replace('/', '.')
part_conf = PartConfig() # type:PartConfig
part_conf.parse(conf_name=input_args.config, module_path=module_path)
self.mysqlDbConf = part_conf.mysql_db_conf # type:MysqlConf
self.mysqlDb = mysql.Mysql(self.mysqlDbConf) # type: mysql.Mysql
self.mysqlDb.connect()
self.DEBUG = bool(part_conf.get('debug'))
self.ENV = part_conf.get('env')
if self.ENV == 'dev':
self.ENV_DEBUG = True
def get_db(self):
return self.mysqlDb
def get_sub_import(self, sub):
return self.moduleImport + '.' + sub
def get_sub_path(self, sub):
return self.modulePath + '/' + sub
def get_conf_path(self):
return self.get_sub_path(sub='conf')
def get_data_path(self):
return self.get_sub_path(sub='data')
def get_data_file_path(self, file):
return self.get_data_path() + '/' + file
def log(self):
self._init_info()
def _init_info(self):
print("=" * 50)
print("=" * 2 + f" MODULE PATH:: {self.modulePath}")
print("=" * 2 + f" FILE PATH:: {' '.join(sys.argv)}")
print(f" config file: {self.configName}")
print(f" db:: {self.mysqlDbConf.db}")
print(f" debug:: {str(int(self.DEBUG))}")
print(f" env_debug:: {str(int(self.ENV_DEBUG))}")
print("=" * 50)
print("\n")
| 28.791667
| 100
| 0.624096
| 353
| 2,764
| 4.66289
| 0.220963
| 0.053463
| 0.042527
| 0.032807
| 0.080194
| 0.037667
| 0.037667
| 0.037667
| 0
| 0
| 0
| 0.003354
| 0.244935
| 2,764
| 95
| 101
| 29.094737
| 0.785338
| 0.017366
| 0
| 0.027397
| 0
| 0
| 0.10767
| 0.034292
| 0
| 0
| 0
| 0
| 0
| 1
| 0.191781
| false
| 0
| 0.123288
| 0.109589
| 0.575342
| 0.123288
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 2
|
ab106d29ef2283cbdeaf70023cd678e7c5de8158
| 842
|
py
|
Python
|
cf_step/metrics.py
|
dpoulopoulos/cf_step
|
c0ed1d0fbdedb863a630e90a7c7b6f95141a3e30
|
[
"Apache-2.0"
] | 25
|
2020-02-16T10:14:17.000Z
|
2022-03-08T07:15:55.000Z
|
cf_step/metrics.py
|
dpoulopoulos/cf_step
|
c0ed1d0fbdedb863a630e90a7c7b6f95141a3e30
|
[
"Apache-2.0"
] | 2
|
2020-05-19T15:42:58.000Z
|
2021-10-02T23:36:23.000Z
|
cf_step/metrics.py
|
dpoulopoulos/cf_step
|
c0ed1d0fbdedb863a630e90a7c7b6f95141a3e30
|
[
"Apache-2.0"
] | 7
|
2020-02-24T04:35:00.000Z
|
2022-01-20T03:26:51.000Z
|
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/metrics.ipynb (unless otherwise specified).
__all__ = ['recall_at_k', 'precision_at_k']
# Cell
from typing import List
# Cell
def recall_at_k(predictions: List[int], targets: List[int], k: int = 10) -> float:
"""Computes `Recall@k` from the given predictions and targets sets."""
predictions_set = set(predictions[:k])
targets_set = set(targets)
result = len(targets_set & predictions_set) / float(len(targets_set))
return result
# Cell
def precision_at_k(predictions: List[int], targets: List[int], k: int = 10) -> float:
"""Computes `Precision@k` from the given predictions and targets sets."""
predictions_set = set(predictions[:k])
targets_set = set(targets)
result = len(targets_set & predictions_set) / float(len(predictions_set))
return result
| 38.272727
| 91
| 0.709026
| 117
| 842
| 4.91453
| 0.316239
| 0.121739
| 0.067826
| 0.062609
| 0.633043
| 0.633043
| 0.633043
| 0.633043
| 0.633043
| 0.633043
| 0
| 0.00569
| 0.165083
| 842
| 22
| 92
| 38.272727
| 0.812233
| 0.28266
| 0
| 0.5
| 1
| 0
| 0.042301
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.083333
| 0
| 0.416667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
ab124c9df35a8bbc9dcccb03c7e6c3a2b66cccd5
| 277
|
py
|
Python
|
celery-getting-started/celeryconfig.py
|
hustbeta/python-examples
|
9052a080cb27b1c8c2bc36222ece409e236ba076
|
[
"MIT"
] | null | null | null |
celery-getting-started/celeryconfig.py
|
hustbeta/python-examples
|
9052a080cb27b1c8c2bc36222ece409e236ba076
|
[
"MIT"
] | null | null | null |
celery-getting-started/celeryconfig.py
|
hustbeta/python-examples
|
9052a080cb27b1c8c2bc36222ece409e236ba076
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
BROKER_URL = 'amqp://guest@localhost//'
CELERY_ACCEPT_CONTENT = ['json'],
CELERY_RESULT_BACKEND = 'amqp://guest@localhost//'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TASK_SERIALIZER = 'json'
CELERY_TIMEZONE = 'Asia/Shanghai'
CELERY_ENABLE_UTC = False
| 25.181818
| 50
| 0.740072
| 34
| 277
| 5.676471
| 0.647059
| 0.15544
| 0.186529
| 0.248705
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004016
| 0.101083
| 277
| 10
| 51
| 27.7
| 0.771084
| 0.075812
| 0
| 0
| 0
| 0
| 0.287402
| 0.188976
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
ab12e147b947ecb1407493bd0e3516505005e115
| 476
|
py
|
Python
|
smartnlp/utils/basic_log.py
|
msgi/nlp-tour
|
ffed8c32da69c2427c92a7043f47bfc91e7feb64
|
[
"Apache-2.0"
] | 1,559
|
2019-05-27T03:43:29.000Z
|
2022-03-31T05:35:04.000Z
|
smartnlp/utils/basic_log.py
|
msgi/nlp-tour
|
ffed8c32da69c2427c92a7043f47bfc91e7feb64
|
[
"Apache-2.0"
] | 5
|
2019-07-10T11:55:05.000Z
|
2020-05-08T12:01:31.000Z
|
smartnlp/utils/basic_log.py
|
msgi/nlp-tour
|
ffed8c32da69c2427c92a7043f47bfc91e7feb64
|
[
"Apache-2.0"
] | 403
|
2019-06-14T03:36:17.000Z
|
2022-03-30T08:09:08.000Z
|
import logging as log
class Log:
def __init__(self, level):
self.level = level
log.basicConfig(format='%(asctime)s - %(pathname)s[line:%(lineno)d] - %(levelname)s: %(message)s',
level=level)
self.log = log
def info(self, msg):
self.log.info(msg)
def debug(self, msg):
self.log.debug(msg)
def warn(self, msg):
self.log.warn(msg)
def error(self, msg):
self.log.error(msg)
| 21.636364
| 106
| 0.55042
| 64
| 476
| 4.03125
| 0.375
| 0.135659
| 0.170543
| 0.217054
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.302521
| 476
| 21
| 107
| 22.666667
| 0.777108
| 0
| 0
| 0
| 0
| 0.066667
| 0.151261
| 0.060924
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.066667
| 0
| 0.466667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 2
|
ab191577acbffa7ecc550d7138ce7e0984e85baf
| 2,380
|
py
|
Python
|
virt/ansible-latest/lib/python2.7/site-packages/ansible/plugins/become/runas.py
|
lakhlaifi/RedHat-Ansible
|
27c5077cced9d416081fcd5d69ea44bca0317fa4
|
[
"Apache-2.0"
] | 1
|
2020-03-29T18:41:01.000Z
|
2020-03-29T18:41:01.000Z
|
ansible/ansible/plugins/become/runas.py
|
SergeyCherepanov/ansible
|
875711cd2fd6b783c812241c2ed7a954bf6f670f
|
[
"MIT"
] | 7
|
2020-09-07T17:27:56.000Z
|
2022-03-02T06:25:46.000Z
|
ansible/ansible/plugins/become/runas.py
|
SergeyCherepanov/ansible
|
875711cd2fd6b783c812241c2ed7a954bf6f670f
|
[
"MIT"
] | 1
|
2020-03-22T01:04:48.000Z
|
2020-03-22T01:04:48.000Z
|
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
become: runas
short_description: Run As user
description:
- This become plugins allows your remote/login user to execute commands as another user via the windows runas facility.
author: ansible (@core)
version_added: "2.8"
options:
become_user:
description: User you 'become' to execute the task
ini:
- section: privilege_escalation
key: become_user
- section: runas_become_plugin
key: user
vars:
- name: ansible_become_user
- name: ansible_runas_user
env:
- name: ANSIBLE_BECOME_USER
- name: ANSIBLE_RUNAS_USER
required: True
become_flags:
description: Options to pass to runas, a space delimited list of k=v pairs
default: ''
ini:
- section: privilege_escalation
key: become_flags
- section: runas_become_plugin
key: flags
vars:
- name: ansible_become_flags
- name: ansible_runas_flags
env:
- name: ANSIBLE_BECOME_FLAGS
- name: ANSIBLE_RUNAS_FLAGS
become_pass:
description: password
ini:
- section: runas_become_plugin
key: password
vars:
- name: ansible_become_password
- name: ansible_become_pass
- name: ansible_runas_runas
env:
- name: ANSIBLE_BECOME_PASS
- name: ANSIBLE_RUNAS_PASS
notes:
- runas is really implemented in the powershell module handler and as such can only be used with winrm connections.
- This plugin ignores the 'become_exe' setting as it uses an API and not an executable.
"""
from ansible.plugins.become import BecomeBase
class BecomeModule(BecomeBase):
name = 'runas'
def build_become_command(self, cmd, shell):
# runas is implemented inside the winrm connection plugin
return cmd
| 34
| 127
| 0.589496
| 260
| 2,380
| 5.188462
| 0.476923
| 0.106004
| 0.088213
| 0.053373
| 0.295775
| 0.23573
| 0.179392
| 0.124537
| 0
| 0
| 0
| 0.007124
| 0.351261
| 2,380
| 69
| 128
| 34.492754
| 0.86658
| 0.086134
| 0
| 0.237288
| 0
| 0.033898
| 0.867281
| 0.010599
| 0
| 0
| 0
| 0
| 0
| 1
| 0.016949
| false
| 0.135593
| 0.033898
| 0.016949
| 0.101695
| 0.016949
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 2
|
ab1bca899ba1f440651e92b900de789b742e59bc
| 7,742
|
py
|
Python
|
bytecode2ast/parsers/bases.py
|
Cologler/bytecode2ast-python
|
407b261a493e018bc86388040ddfb6fb0e4b96d9
|
[
"MIT"
] | null | null | null |
bytecode2ast/parsers/bases.py
|
Cologler/bytecode2ast-python
|
407b261a493e018bc86388040ddfb6fb0e4b96d9
|
[
"MIT"
] | null | null | null |
bytecode2ast/parsers/bases.py
|
Cologler/bytecode2ast-python
|
407b261a493e018bc86388040ddfb6fb0e4b96d9
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019~2999 - Cologler <[email protected]>
# ----------
# some object for parser
# ----------
from typing import List
import enum
import dis
from collections import defaultdict
class ID:
def __init__(self, name):
self._name = name # a name use to debug
def __repr__(self):
return f'ID({self._name})'
def __str__(self):
return repr(self)
class Scope(enum.IntEnum):
NONE = enum.auto()
LOOP = enum.auto()
WITH = enum.auto()
EXCEPT = enum.auto()
FINALLY = enum.auto()
class CodeState:
def __init__(self, *, scope=Scope.NONE):
self._ast_stack = []
self._load_stack = []
self._scope = scope
self._state: dict = None if scope is Scope.NONE else {}
self._blocks = [[]] # ensure has last block
self._instrs = [] # all handled instrs in this state
def __repr__(self):
return f'b({self._blocks!r}), l({self._load_stack!r})'
@property
def scope(self):
return self._scope
# state
@property
def state(self):
return self._state
def add_state(self, id, value):
''' add a state, also ensure it does not exists. '''
assert id not in self._state
self._state[id] = value
# instrs
def add_instr(self, instr: dis.Instruction):
''' add a handled instruction in this state '''
self._instrs.append(instr)
def get_instrs(self, key=None) -> List[dis.Instruction]:
''' get all instructions by key from this state '''
if key is None:
return self._instrs.copy()
else:
return [i for i in self._instrs if i.opcode == key or i.opname == key]
def copy(self):
''' copy a `CodeState` '''
state = CodeState()
state._load_stack = self._load_stack.copy()
state._ast_stack = self._ast_stack.copy()
return state
def copy_with_load(self, load_count):
''' copy a `CodeState` with empty ast stack. '''
state = CodeState()
state._load_stack = self._load_stack[-load_count:]
return state
def push(self, node):
''' push a node into load stack. '''
self._load_stack.append(node)
def pop(self):
''' pop the top node from load stack. '''
return self._load_stack.pop()
def pop_seq(self, count: int) -> list:
''' pop a list of top nodes from load stack. '''
assert count >= 0
if count > 0:
items = self._load_stack[-count:]
self._load_stack = self._load_stack[0:-count]
return items
else:
return []
def dup_top(self):
''' repeat top once. '''
self._load_stack.append(self._load_stack[-1])
def store(self, node):
''' store a node '''
self.add_node(node)
def add_node(self, node):
''' add a final node into ast stmt tree '''
self._blocks[-1].append(node)
def get_value(self) -> list:
''' get stmts from single block. '''
# ensure all status was handled
assert not self._state, self._state
assert not self._load_stack, self._load_stack
# get value
assert len(self._blocks) == 1, self._blocks
return self._blocks[-1]
def new_block(self):
''' make a new stmts block '''
self._blocks.append([])
def get_blocks(self) -> list:
''' get all stmts blocks. '''
# ensure all status was handled
assert not self._state, self._state
assert not self._load_stack, self._load_stack
# get value
return self._blocks
def get_block_count(self) -> int:
''' get count of stmts blocks. '''
return len(self._blocks)
class CodeReaderIter:
__slots__ = ('_reader', '_condition')
def __init__(self, reader, condition):
self._reader: CodeReader = reader
self._condition = condition
def __iter__(self):
while self._condition():
yield self._reader.pop()
def fill_state(self, state: CodeState):
''' iter self into the `CodeState` and return it. '''
for instr in self:
handler = get_instr_handler(instr)
handler(self._reader, state, instr)
state.add_instr(instr)
return state
def get_state(self, *, scope=Scope.NONE):
''' iter self into a new `CodeState`, return the `CodeState` '''
state = CodeState(scope=scope)
return self.fill_state(state)
def get_value(self, *, scope=Scope.NONE):
''' iter self into a new `CodeState`, return value from `CodeState`. '''
return self.get_state(scope=scope).get_value()
def get_blocks(self, *, scope=Scope.NONE):
''' iter self into a new `CodeState`, return blocks from `CodeState`. '''
return self.get_state(scope=scope).get_blocks()
class CodeReader:
def __init__(self, instructions):
# reversed will fast
self._instructions = list(reversed(instructions))
self._lineno = None
def __bool__(self):
return bool(self._instructions)
def __repr__(self):
return repr(list(reversed(self._instructions)))
@property
def co_consts(self):
return self._co_consts
def get_instrs_count(self) -> int:
return len(self._instructions)
def get_lineno(self) -> int:
return self._lineno
def peek(self) -> dis.Instruction:
''' peek one instr '''
if not self._instructions:
return None
return self._instructions[-1]
def pop(self) -> dis.Instruction:
''' pop one instr '''
instr = self._instructions.pop()
if instr.starts_line is not None:
self._lineno = instr.starts_line
return instr
def pop_assert(self, opcode: int) -> dis.Instruction:
instr = self.pop()
assert instr.opcode == opcode
return instr
def pop_if(self, opcode: int) -> dis.Instruction:
if self._instructions and self._instructions[-1].opcode == opcode:
return self.pop()
# read methods
def read_until_end(self):
''' read until reader end. '''
return CodeReaderIter(self, lambda: self)
def read_until_offset(self, offset: int):
''' read until come to the offset '''
return CodeReaderIter(self, lambda: self.peek().offset != offset)
def read_until_opcodes(self, *opcodes):
''' read until visit some opcodes '''
return CodeReaderIter(self, lambda: self.peek().opcode not in opcodes)
def read_until_count(self, count: int):
''' read until handled count of instrs '''
end_count = self.get_instrs_count() - count
return CodeReaderIter(self, lambda: self.get_instrs_count() > end_count)
def read_until_scoped_count(self, count: int):
''' read until handled count of instrs in current scope. '''
if count <= 0:
raise ValueError(count)
def cond():
nonlocal count
count -= 1
return count >= 0
return CodeReaderIter(self, cond)
_OPCODE_MAP = {}
def op(opname, opcode, **kwargs):
def wrapper(func):
def func_wrapper(reader, state, instr: dis.Instruction):
func(reader, state, instr, **kwargs)
assert opcode not in _OPCODE_MAP
_OPCODE_MAP[(opname, opcode)] = func_wrapper
return func
return wrapper
def get_instr_handler(instr):
'''
the return function `(reader, state, instr) -> None`
'''
k = (instr.opname, instr.opcode)
try:
return _OPCODE_MAP[k]
except KeyError:
raise NotImplementedError(k, instr)
| 28.050725
| 82
| 0.597778
| 962
| 7,742
| 4.608108
| 0.170478
| 0.040605
| 0.043988
| 0.028423
| 0.198737
| 0.158132
| 0.135123
| 0.135123
| 0.116625
| 0.096774
| 0
| 0.003804
| 0.287006
| 7,742
| 275
| 83
| 28.152727
| 0.799275
| 0.167269
| 0
| 0.113772
| 0
| 0
| 0.012302
| 0.003675
| 0
| 0
| 0
| 0
| 0.05988
| 1
| 0.287425
| false
| 0
| 0.023952
| 0.05988
| 0.60479
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 2
|
ab2add18b201d727e235b13fba3fa52b34c35680
| 404
|
py
|
Python
|
TreeModelLib/BelowgroundCompetition/__init__.py
|
jvollhueter/pyMANGA-1
|
414204a394d44405225b4b8224b19464c1006f1d
|
[
"MIT"
] | null | null | null |
TreeModelLib/BelowgroundCompetition/__init__.py
|
jvollhueter/pyMANGA-1
|
414204a394d44405225b4b8224b19464c1006f1d
|
[
"MIT"
] | null | null | null |
TreeModelLib/BelowgroundCompetition/__init__.py
|
jvollhueter/pyMANGA-1
|
414204a394d44405225b4b8224b19464c1006f1d
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 8 15:25:03 2018
@author: bathmann
"""
from .BelowgroundCompetition import BelowgroundCompetition
from .SimpleTest import SimpleTest
from .FON import FON
from .OGSWithoutFeedback import OGSWithoutFeedback
from .OGSLargeScale3D import OGSLargeScale3D
from .OGS.helpers import CellInformation
from .FixedSalinity import FixedSalinity
| 25.25
| 58
| 0.799505
| 47
| 404
| 6.87234
| 0.595745
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042254
| 0.121287
| 404
| 15
| 59
| 26.933333
| 0.867606
| 0.242574
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 2
|
ab36d85f43aaa15a75066ac03e9bf9c7135fde35
| 893
|
py
|
Python
|
eve/workers/pykmip/bin/run_server.py
|
mmg-3/cloudserver
|
9ff6364b2ed4f33a5135d86311a72de4caff51c1
|
[
"Apache-2.0"
] | 762
|
2016-06-08T19:51:51.000Z
|
2018-08-02T09:05:38.000Z
|
eve/workers/pykmip/bin/run_server.py
|
mmg-3/cloudserver
|
9ff6364b2ed4f33a5135d86311a72de4caff51c1
|
[
"Apache-2.0"
] | 1,252
|
2018-08-03T18:27:31.000Z
|
2022-03-31T20:22:55.000Z
|
eve/workers/pykmip/bin/run_server.py
|
mmg-3/cloudserver
|
9ff6364b2ed4f33a5135d86311a72de4caff51c1
|
[
"Apache-2.0"
] | 170
|
2016-06-14T17:09:39.000Z
|
2018-06-30T12:48:19.000Z
|
#!/usr/bin/env python
# Copyright (c) 2016 The Johns Hopkins University/Applied Physics Laboratory
# 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.
import logging # noqa: E402
logging.basicConfig(level=logging.DEBUG)
from kmip.services.server import server # noqa: E402
if __name__ == '__main__':
print('Starting PyKMIP server on 0.0.0.0:5696')
server.main()
| 33.074074
| 76
| 0.75252
| 135
| 893
| 4.918519
| 0.688889
| 0.090361
| 0.039157
| 0.048193
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.029491
| 0.164614
| 893
| 26
| 77
| 34.346154
| 0.86059
| 0.737962
| 0
| 0
| 0
| 0
| 0.211982
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.166667
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 2
|
ab386b22c54d5affe44957aab20ea4dc3913a866
| 1,159
|
py
|
Python
|
tensorflow_quantum/python/differentiators/__init__.py
|
PyJedi/quantum
|
3f4a3c320e048b8a8faf3a10339975d2d5366fb6
|
[
"Apache-2.0"
] | 1,501
|
2020-03-09T00:40:31.000Z
|
2022-03-28T19:59:57.000Z
|
tensorflow_quantum/python/differentiators/__init__.py
|
tappinganalytics/quantum
|
ef3a34341d997d485a7e43335a8ed61a8e7c6ea6
|
[
"Apache-2.0"
] | 381
|
2020-03-09T18:31:04.000Z
|
2022-03-28T18:47:32.000Z
|
tensorflow_quantum/python/differentiators/__init__.py
|
tappinganalytics/quantum
|
ef3a34341d997d485a7e43335a8ed61a8e7c6ea6
|
[
"Apache-2.0"
] | 410
|
2020-03-09T03:05:48.000Z
|
2022-03-31T12:08:14.000Z
|
# Copyright 2020 The TensorFlow Quantum 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.
# ==============================================================================
"""Module functions for tfq.differentiators.*"""
from tensorflow_quantum.python.differentiators.adjoint import (
Adjoint,)
from tensorflow_quantum.python.differentiators.linear_combination import (
ForwardDifference,
CentralDifference,
LinearCombination,
)
from tensorflow_quantum.python.differentiators.parameter_shift import (
ParameterShift,)
from tensorflow_quantum.python.differentiators.differentiator import (
Differentiator,)
| 37.387097
| 80
| 0.729077
| 136
| 1,159
| 6.169118
| 0.617647
| 0.071514
| 0.100119
| 0.128725
| 0.200238
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008016
| 0.138913
| 1,159
| 30
| 81
| 38.633333
| 0.832665
| 0.614323
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.363636
| 0
| 0.363636
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 2
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.