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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0293a253619a11988d47abce2d445f20f1d026f6 | 304 | py | Python | src/tributaries/utils/universalmodules.py | akilby/tributary-cache | f4884a2aa49685b9e8aeb925c50afda887db1b18 | [
"MIT"
] | null | null | null | src/tributaries/utils/universalmodules.py | akilby/tributary-cache | f4884a2aa49685b9e8aeb925c50afda887db1b18 | [
"MIT"
] | null | null | null | src/tributaries/utils/universalmodules.py | akilby/tributary-cache | f4884a2aa49685b9e8aeb925c50afda887db1b18 | [
"MIT"
] | null | null | null | import os
import sys
import time
def hash_id():
return str(hash(time.time()) % ((sys.maxsize + 1) * 2))
def hash_write_to_dta(df, tempdir, write_index=True):
filepath = os.path.join(tempdir, 'dtafile_%s.dta' % hash_id())
df.to_stata(filepath, write_index=write_index)
return filepath
| 21.714286 | 66 | 0.697368 | 48 | 304 | 4.208333 | 0.520833 | 0.148515 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007874 | 0.164474 | 304 | 13 | 67 | 23.384615 | 0.787402 | 0 | 0 | 0 | 0 | 0 | 0.046053 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.333333 | 0.111111 | 0.777778 | 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 | 1 | 1 | 0 | 0 | 0 | 3 |
029d02e7c8eeaac0797693dd174266aabf956ee1 | 141 | py | Python | variable.py | hitanshkadakia/Python_Tutorial | 2d653cd5eb7ecd19de26ffd447d18fbae8eb7af6 | [
"Apache-2.0"
] | 3 | 2021-01-26T09:36:22.000Z | 2021-07-16T07:52:22.000Z | variable.py | rahulhgdev/Python_Tutorial | de9a05a6c841614edac6cfa9cf8fb697dd512190 | [
"Apache-2.0"
] | 1 | 2021-02-12T13:47:58.000Z | 2021-02-12T14:00:41.000Z | variable.py | rahulhgdev/Python_Tutorial | de9a05a6c841614edac6cfa9cf8fb697dd512190 | [
"Apache-2.0"
] | 1 | 2021-02-13T14:04:43.000Z | 2021-02-13T14:04:43.000Z | x=100
text="python tutorial"
print(x)
print(text)
# Assign values to multiple variables
x,y,z=10,20,30
print(x)
print(y)
print(z) | 12.818182 | 38 | 0.673759 | 26 | 141 | 3.653846 | 0.615385 | 0.126316 | 0.231579 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.078261 | 0.184397 | 141 | 11 | 39 | 12.818182 | 0.747826 | 0.248227 | 0 | 0.25 | 0 | 0 | 0.157895 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.625 | 1 | 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 | 0 | 1 | 0 | 3 |
02c93a8a22f8c1ef4b9c15e58c0df5933fc75ba0 | 83 | py | Python | redditBot/BotMain.py | Squadella/ArisSuggestionBot | f00366f74f06080d29eec53c6700472c1afe2fe6 | [
"MIT"
] | null | null | null | redditBot/BotMain.py | Squadella/ArisSuggestionBot | f00366f74f06080d29eec53c6700472c1afe2fe6 | [
"MIT"
] | null | null | null | redditBot/BotMain.py | Squadella/ArisSuggestionBot | f00366f74f06080d29eec53c6700472c1afe2fe6 | [
"MIT"
] | null | null | null | from Bot import Bot
if __name__ == '__main__':
bot = Bot()
bot.startBot()
| 13.833333 | 26 | 0.614458 | 11 | 83 | 3.909091 | 0.636364 | 0.27907 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.253012 | 83 | 5 | 27 | 16.6 | 0.693548 | 0 | 0 | 0 | 0 | 0 | 0.096386 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 1 | 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 | 3 |
02d4c9f246a8bcc4ee71bd0380a654244a1607f4 | 3,028 | py | Python | sample/driver-clean.py | BenGriffith/covid | b3ac889c5e72acc5897100362cd0161e60517786 | [
"BSD-2-Clause"
] | null | null | null | sample/driver-clean.py | BenGriffith/covid | b3ac889c5e72acc5897100362cd0161e60517786 | [
"BSD-2-Clause"
] | null | null | null | sample/driver-clean.py | BenGriffith/covid | b3ac889c5e72acc5897100362cd0161e60517786 | [
"BSD-2-Clause"
] | null | null | null | import sys
import clean
from datetime import datetime, date, timedelta
if sys.argv[1] == "initial":
# Populate county table
clean.Population("tmp/initial/county/population.csv", "csv", "data/initial/county", 1)
# Clean
clean.Texas("tmp/initial/county/texas.xlsx", "data/initial/county", None)
clean.Florida("tmp/initial/county/florida2020.json", "json", "data/initial/county", None)
clean.Florida("tmp/initial/county/florida2021.json", "json", "data/initial/county", None)
clean.NewYork("tmp/initial/county/new-york.json", "json", "data/initial/county", None)
clean.Pennsylvania("tmp/initial/county/pennsylvania.json", "json", "data/initial/county", None)
clean.Ohio("tmp/initial/county/ohio.csv", "csv", "data/initial/county", None)
clean.Georgia("tmp/initial/county/georgia.json", "json", "data/initial/county", None)
clean.Cases("tmp/initial/county/cases.csv", "csv", "data/initial/county", None)
clean.Deaths("tmp/initial/county/deaths.csv", "csv", "data/initial/county", None)
clean.Population("tmp/initial/county/population.csv", "csv", "data/initial/county", 0)
clean.Stocks("tmp/initial/financial/stocks", "data/initial/financial/stocks")
clean.Indicator("tmp/initial/financial/indicators/unemployment.json", "json", "data/initial/financial/indicators", "unemployment")
clean.Indicator("tmp/initial/financial/indicators/inflation.json", "json", "data/initial/financial/indicators", "inflation")
clean.Indicator("tmp/initial/financial/indicators/sentiment.json", "json", "data/initial/financial/indicators", "sentiment")
clean.Indicator("tmp/initial/financial/indicators/mortgage.json", "json", "data/initial/financial/indicators", "mortgage")
else:
# Yesterday's date and Georgia date
run_date = date.today() - timedelta(days=1)
ga_run_date = date.today() - timedelta(days=2)
# Clean Covid data
clean.Texas(f"tmp/incremental/county/{run_date}/texas.xlsx", f"data/incremental/county/{run_date}", run_date)
clean.Florida(f"tmp/incremental/county/{run_date}/florida2020.json", "json", f"data/incremental/county/{run_date}", run_date)
clean.Florida(f"tmp/incremental/county/{run_date}/florida2021.json", "json", f"data/incremental/county/{run_date}", run_date)
clean.NewYork(f"tmp/incremental/county/{run_date}/new-york.json", "json", f"data/incremental/county/{run_date}", run_date)
clean.Pennsylvania(f"tmp/incremental/county/{run_date}/pennsylvania.json", "json", f"data/incremental/county/{run_date}", run_date)
clean.Ohio(f"tmp/incremental/county/{run_date}/ohio.csv", "csv", f"data/incremental/county/{run_date}", run_date)
clean.Georgia(f"tmp/incremental/county/{ga_run_date}/georgia.json", "json", f"data/incremental/county/{ga_run_date}", ga_run_date)
clean.Cases(f"tmp/incremental/county/{run_date}/cases.csv", "csv", f"data/incremental/county/{run_date}", run_date)
clean.Deaths(f"tmp/incremental/county/{run_date}/deaths.csv", "csv", f"data/incremental/county/{run_date}", run_date) | 72.095238 | 135 | 0.732497 | 416 | 3,028 | 5.252404 | 0.129808 | 0.092906 | 0.146453 | 0.175744 | 0.695195 | 0.679176 | 0.41373 | 0.306178 | 0.306178 | 0.261327 | 0 | 0.007603 | 0.087847 | 3,028 | 42 | 136 | 72.095238 | 0.78349 | 0.02576 | 0 | 0 | 0 | 0 | 0.607604 | 0.494229 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.09375 | 0 | 0.09375 | 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 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
02db725413178c90489b66872718043dc938844e | 493 | py | Python | catalyst_gan/nn/criterion/__init__.py | WilliamAshbee/gan | ab75e87681b9113d3af8df8a3cd97bf3bd69c6ac | [
"Apache-2.0"
] | 6 | 2020-01-27T11:25:12.000Z | 2020-08-16T02:35:46.000Z | catalyst_gan/nn/criterion/__init__.py | WilliamAshbee/gan | ab75e87681b9113d3af8df8a3cd97bf3bd69c6ac | [
"Apache-2.0"
] | 1 | 2020-04-30T18:27:46.000Z | 2020-06-08T09:38:22.000Z | catalyst_gan/nn/criterion/__init__.py | WilliamAshbee/gan | ab75e87681b9113d3af8df8a3cd97bf3bd69c6ac | [
"Apache-2.0"
] | 3 | 2020-06-23T13:35:34.000Z | 2020-12-10T20:22:28.000Z | from .bce_gan import (
BCELossDiscriminator, BCELossGenerator,
BCELossDiscriminatorFake, BCELossDiscriminatorReal
)
from .hinge import (
HingeLossDiscriminator, HingeLossGenerator,
HingeLossDiscriminatorFake, HingeLossDiscriminatorReal
)
from .wasserstein import (
WassersteinLossDiscriminator, WassersteinLossGenerator,
WassersteinLossDiscriminatorFake, WassersteinLossDiscriminatorReal,
WassersteinDistance
)
from .metrics import AverageValue, AverageProbability
| 32.866667 | 71 | 0.833671 | 28 | 493 | 14.642857 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.123732 | 493 | 14 | 72 | 35.214286 | 0.949074 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.285714 | 0 | 0.285714 | 0 | 1 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
02dd0fa801138033b8e8e9e20a490e5095cc5807 | 55 | py | Python | dbmanager/__init__.py | yupix/db-manager | 93258484bcfe90a6ca10850cb121cfb993ec1039 | [
"BSL-1.0"
] | null | null | null | dbmanager/__init__.py | yupix/db-manager | 93258484bcfe90a6ca10850cb121cfb993ec1039 | [
"BSL-1.0"
] | null | null | null | dbmanager/__init__.py | yupix/db-manager | 93258484bcfe90a6ca10850cb121cfb993ec1039 | [
"BSL-1.0"
] | null | null | null | from .dbmanager import DbManager
__version__ = '0.0.1' | 18.333333 | 32 | 0.763636 | 8 | 55 | 4.75 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0625 | 0.127273 | 55 | 3 | 33 | 18.333333 | 0.729167 | 0 | 0 | 0 | 0 | 0 | 0.089286 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
02eeaa9da7d61201c6afcfcd0afd348e90fa2c0c | 220 | py | Python | pypy/module/pypyjit/test/conftest.py | microvm/pypy-mu | 6b03fbe93052d0eb3a4c67152c987c16837b3484 | [
"Apache-2.0",
"OpenSSL"
] | 34 | 2015-07-09T04:53:27.000Z | 2021-07-19T05:22:27.000Z | pypy/module/pypyjit/test/conftest.py | microvm/pypy-mu | 6b03fbe93052d0eb3a4c67152c987c16837b3484 | [
"Apache-2.0",
"OpenSSL"
] | 6 | 2015-05-30T17:20:45.000Z | 2017-06-12T14:29:23.000Z | pypy/module/pypyjit/test/conftest.py | microvm/pypy-mu | 6b03fbe93052d0eb3a4c67152c987c16837b3484 | [
"Apache-2.0",
"OpenSSL"
] | 11 | 2015-09-07T14:26:08.000Z | 2020-04-10T07:20:41.000Z | def pytest_addoption(parser):
group = parser.getgroup("pypyjit options")
group.addoption("--pypy", action="store", default=None, dest="pypy_c",
help="the location of the JIT enabled pypy-c")
| 36.666667 | 74 | 0.65 | 28 | 220 | 5.035714 | 0.75 | 0.070922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.209091 | 220 | 5 | 75 | 44 | 0.810345 | 0 | 0 | 0 | 0 | 0 | 0.319635 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.25 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
02f57717e77b011e0c745f94bccb5a18599f46f7 | 180 | py | Python | settings_test/settings_test/urls.py | joshourisman/django-pydantic-settings | 39e403a70d39855485a13219a2550b50e22c48c9 | [
"MIT"
] | 5 | 2021-01-20T03:51:52.000Z | 2021-04-25T09:58:21.000Z | settings_test/settings_test/urls.py | joshourisman/django-pydantic-settings | 39e403a70d39855485a13219a2550b50e22c48c9 | [
"MIT"
] | 7 | 2021-05-07T06:50:19.000Z | 2021-09-23T01:05:42.000Z | settings_test/settings_test/urls.py | joshourisman/django-pydantic-settings | 39e403a70d39855485a13219a2550b50e22c48c9 | [
"MIT"
] | null | null | null | from django.http import JsonResponse
from django.urls import path
def test_view(request):
return JsonResponse({"success": True})
urlpatterns = [
path("", test_view),
]
| 15 | 42 | 0.711111 | 22 | 180 | 5.727273 | 0.681818 | 0.15873 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.172222 | 180 | 11 | 43 | 16.363636 | 0.845638 | 0 | 0 | 0 | 0 | 0 | 0.038889 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.285714 | 0.142857 | 0.571429 | 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 | 0 | 1 | 1 | 0 | 0 | 3 |
f31fdab424acd5900e3d4aa92d89654ff39a7665 | 93 | py | Python | Week_1/ex6.py | babosina/Coursera-Python-HSE | 3629c49df906324d14e8e591264b0f71d295a114 | [
"MIT"
] | null | null | null | Week_1/ex6.py | babosina/Coursera-Python-HSE | 3629c49df906324d14e8e591264b0f71d295a114 | [
"MIT"
] | null | null | null | Week_1/ex6.py | babosina/Coursera-Python-HSE | 3629c49df906324d14e8e591264b0f71d295a114 | [
"MIT"
] | null | null | null | # Дано натуральное число. Выведите его последнюю цифру.
num = int(input())
print(num % 10)
| 15.5 | 55 | 0.709677 | 13 | 93 | 5.076923 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025974 | 0.172043 | 93 | 5 | 56 | 18.6 | 0.831169 | 0.569892 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 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 | 1 | 0 | 3 |
b8279c79aa2680dd86497876009dc12259a0b194 | 319 | py | Python | source/scripts/python/classname/source/classname.py | Zedonboy/core | 79a4d959659a0f96b940b28d44476943de120d95 | [
"Apache-2.0"
] | null | null | null | source/scripts/python/classname/source/classname.py | Zedonboy/core | 79a4d959659a0f96b940b28d44476943de120d95 | [
"Apache-2.0"
] | null | null | null | source/scripts/python/classname/source/classname.py | Zedonboy/core | 79a4d959659a0f96b940b28d44476943de120d95 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3.5
class MyClass:
"This is a class"
a = 10;
def func(self):
print('Hello World');
return 3;
def my_function(a: MyClass):
return a.func();
def other_function(b: my_function):
a = MyClass();
return my_function(a);
def object_function(obj: object):
return 3;
| 16.789474 | 35 | 0.61442 | 47 | 319 | 4.06383 | 0.510638 | 0.157068 | 0.172775 | 0.188482 | 0.251309 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025 | 0.247649 | 319 | 18 | 36 | 17.722222 | 0.770833 | 0.109718 | 0 | 0.153846 | 0 | 0 | 0.086957 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.307692 | false | 0 | 0 | 0.153846 | 0.769231 | 0.076923 | 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 | 1 | 0 | 0 | 0 | 3 |
b82e865ba91ceb36af2de3dc000374c9fcb7dc5b | 523 | py | Python | flask_app/wsgi.py | lveagithub/InnoSpark-docker | 565d8d3349a878c0c2c6f28833ff1b0f895feaf5 | [
"MIT"
] | 1 | 2021-04-28T15:18:17.000Z | 2021-04-28T15:18:17.000Z | flask_app/wsgi.py | lveagithub/InnoSpark-docker | 565d8d3349a878c0c2c6f28833ff1b0f895feaf5 | [
"MIT"
] | null | null | null | flask_app/wsgi.py | lveagithub/InnoSpark-docker | 565d8d3349a878c0c2c6f28833ff1b0f895feaf5 | [
"MIT"
] | null | null | null | from app import app as application
app = application
print ("wsgi_print_main")
print(__name__)
if __name__ == "__main__":
print ("wsgi_print_main_1")
app.run(host='0.0.0.0', port=8001)
print ("wsgi_print_main_2")
if __name__ == "wsgi":
print ("wsgi_print_main_3")
app.run(host='0.0.0.0', port=8001)
#app.run
print ("wsgi_print_main_4")
#if __name__ == "__main__":
# print ("wsgi_print_main_1")
# app.run(host='0.0.0.0', port=8001)
# print ("wsgi_print_main_2")
| 23.772727 | 40 | 0.630975 | 82 | 523 | 3.487805 | 0.231707 | 0.062937 | 0.342657 | 0.440559 | 0.566434 | 0.566434 | 0.566434 | 0.566434 | 0.566434 | 0.48951 | 0 | 0.072289 | 0.206501 | 523 | 21 | 41 | 24.904762 | 0.616867 | 0.254302 | 0 | 0.166667 | 0 | 0 | 0.299451 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.083333 | 0 | 0.083333 | 0.5 | 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 | 1 | 0 | 3 |
b83fe0b2526b2c804b613f7a185e65c35b2efdec | 126 | py | Python | institutions/mapping/urls.py | sephcoster/mapusaurus | 5515f0d89ff7b7cbc796af25b3d45950c8ed882f | [
"CC0-1.0"
] | null | null | null | institutions/mapping/urls.py | sephcoster/mapusaurus | 5515f0d89ff7b7cbc796af25b3d45950c8ed882f | [
"CC0-1.0"
] | null | null | null | institutions/mapping/urls.py | sephcoster/mapusaurus | 5515f0d89ff7b7cbc796af25b3d45950c8ed882f | [
"CC0-1.0"
] | null | null | null | from django.conf.urls import patterns, url
urlpatterns = patterns(
'',
url(r'^$', 'mapping.views.map', name='map')
)
| 18 | 47 | 0.634921 | 16 | 126 | 5 | 0.8125 | 0.275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.174603 | 126 | 6 | 48 | 21 | 0.769231 | 0 | 0 | 0 | 0 | 0 | 0.174603 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.2 | 0 | 1 | 0 | 0 | null | 1 | 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 | 3 |
b84011551e3cd05efff54d507956228584998527 | 315 | py | Python | problem1.py | ATMS-207-Fall-2020/lab-2-ShaySen | 4e388d070d6c69f339cd60455ed4a3b039b99e76 | [
"MIT"
] | null | null | null | problem1.py | ATMS-207-Fall-2020/lab-2-ShaySen | 4e388d070d6c69f339cd60455ed4a3b039b99e76 | [
"MIT"
] | null | null | null | problem1.py | ATMS-207-Fall-2020/lab-2-ShaySen | 4e388d070d6c69f339cd60455ed4a3b039b99e76 | [
"MIT"
] | null | null | null | ### PROBLEM 1
def main():
print("Name: Shaymae Senhaji")
print("Favorite Food: Brie Cheese")
print("Favorite Color: Red")
print("Favorite Hobby: Traveling")
if __name__ == "__main__":
main()
#Name: Shaymae Senhaji
#Favorite Food: Brie Cheese
#Favorite Color: Red
#Favorite Hobby: Traveling
| 19.6875 | 39 | 0.67619 | 38 | 315 | 5.394737 | 0.447368 | 0.190244 | 0.17561 | 0.214634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003937 | 0.193651 | 315 | 15 | 40 | 21 | 0.80315 | 0.320635 | 0 | 0 | 0 | 0 | 0.482927 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | true | 0 | 0 | 0 | 0.142857 | 0.571429 | 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 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
b864582ff004c56f29062b2f79db812dc48ce353 | 148 | py | Python | moderate/apps.py | sandnima/blog-with-Django | 77cb90f4e3aa70efa8d5190146f6acb4cd22d9a7 | [
"MIT"
] | null | null | null | moderate/apps.py | sandnima/blog-with-Django | 77cb90f4e3aa70efa8d5190146f6acb4cd22d9a7 | [
"MIT"
] | null | null | null | moderate/apps.py | sandnima/blog-with-Django | 77cb90f4e3aa70efa8d5190146f6acb4cd22d9a7 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class ModerateConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'moderate'
| 21.142857 | 56 | 0.763514 | 17 | 148 | 6.529412 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148649 | 148 | 6 | 57 | 24.666667 | 0.880952 | 0 | 0 | 0 | 0 | 0 | 0.25 | 0.195946 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 1 | 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 | 1 | 0 | 0 | 3 |
b86dc9800f073a41499f81a7a11c7c9b74ff80fa | 266 | py | Python | tools/build/packages/Setuptools.py | drm42/fvm-drm | c9b940e593034f1aa3020d63ff1e09ebef9c182a | [
"MIT"
] | null | null | null | tools/build/packages/Setuptools.py | drm42/fvm-drm | c9b940e593034f1aa3020d63ff1e09ebef9c182a | [
"MIT"
] | null | null | null | tools/build/packages/Setuptools.py | drm42/fvm-drm | c9b940e593034f1aa3020d63ff1e09ebef9c182a | [
"MIT"
] | null | null | null | from build_packages import *
class Setuptools(BuildPkg):
requires = ['python']
def _installed(self):
return python_package('setuptools', [0,6])
def _install(self):
return self.sys_log("python setup.py install --prefix=%s" % self.blddir)
| 29.555556 | 80 | 0.672932 | 33 | 266 | 5.272727 | 0.727273 | 0.114943 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009346 | 0.195489 | 266 | 8 | 81 | 33.25 | 0.803738 | 0 | 0 | 0 | 0 | 0 | 0.191729 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0.142857 | 0.285714 | 1 | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
b8756b98985ce22cc95cf64a3b4f2df03231016d | 343 | py | Python | seo/bin/test.py | yerkesobservatory/variousnsundry | c757a628b1c66be08c4ac15fb0dda26af61aebd8 | [
"MIT"
] | null | null | null | seo/bin/test.py | yerkesobservatory/variousnsundry | c757a628b1c66be08c4ac15fb0dda26af61aebd8 | [
"MIT"
] | null | null | null | seo/bin/test.py | yerkesobservatory/variousnsundry | c757a628b1c66be08c4ac15fb0dda26af61aebd8 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
#
## the mock-0.3.1 dir contains testcase.py, testutils.py & mock.py
#sys.path.append('/home/mcnowinski/.local/lib/python2.7/')
import astropy
from astropy.io import fits
from astropy import wcs
from astropy.io.fits import getheader
import astropy.coordinates as coord
import astropy.units as u
astropy.test()
| 20.176471 | 66 | 0.766764 | 56 | 343 | 4.696429 | 0.625 | 0.148289 | 0.098859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.016556 | 0.119534 | 343 | 16 | 67 | 21.4375 | 0.854305 | 0.399417 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.875 | 0 | 0.875 | 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 | 1 | 0 | 0 | 3 |
b876802acb728d3181559d9b082b50dc6b8a3380 | 130 | py | Python | Training/MOOC Tensorflow 2.0/BeiDa/class1/p31_matmul.py | church06/Pythons | 87271619abb2dd6398fbe08d746d4b03c54bcd4d | [
"MIT"
] | 177 | 2020-05-16T00:22:37.000Z | 2022-03-13T15:44:27.000Z | Training/MOOC Tensorflow 2.0/BeiDa/class1/p31_matmul.py | church06/Pythons | 87271619abb2dd6398fbe08d746d4b03c54bcd4d | [
"MIT"
] | 1 | 2020-07-09T12:42:53.000Z | 2020-07-09T12:42:53.000Z | Training/MOOC Tensorflow 2.0/BeiDa/class1/p31_matmul.py | church06/Pythons | 87271619abb2dd6398fbe08d746d4b03c54bcd4d | [
"MIT"
] | 123 | 2020-05-15T18:31:49.000Z | 2022-02-10T09:20:06.000Z | import tensorflow as tf
a = tf.ones([3, 2])
b = tf.fill([2, 3], 3.)
print("a:", a)
print("b:", b)
print("a*b:", tf.matmul(a, b))
| 16.25 | 30 | 0.538462 | 28 | 130 | 2.5 | 0.428571 | 0.085714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.045872 | 0.161538 | 130 | 7 | 31 | 18.571429 | 0.59633 | 0 | 0 | 0 | 0 | 0 | 0.061538 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 0.166667 | 0.5 | 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 | 1 | 0 | 3 |
b879e3d4d491a375a6c1105d8345c8c04fc2d8b4 | 193 | py | Python | basichashmap.py | kasyap1234/dsa- | 495d48d84058c30cc10caea0bf05aa41e2dd48f4 | [
"MIT"
] | 2 | 2021-04-15T16:09:56.000Z | 2021-12-23T08:00:40.000Z | basichashmap.py | kasyap1234/dsa- | 495d48d84058c30cc10caea0bf05aa41e2dd48f4 | [
"MIT"
] | null | null | null | basichashmap.py | kasyap1234/dsa- | 495d48d84058c30cc10caea0bf05aa41e2dd48f4 | [
"MIT"
] | null | null | null | def hashfunction(key):
sum=0
for i in key:
sum+=ord(i)
return sum%100
hashtable=[]
def insertkey(key,value):
hashkey=hashfunction(key)
return hashtable[hashkey].append(value)
| 17.545455 | 41 | 0.694301 | 28 | 193 | 4.785714 | 0.571429 | 0.223881 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025157 | 0.176166 | 193 | 10 | 42 | 19.3 | 0.81761 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0 | 0 | 0.444444 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b88248a7e769bedb3c5390e408c0b96ff005c6f7 | 3,141 | py | Python | youtube_livechat_messages/cursor.py | uehara1414/youtube-livestreaming-api-python | f981a928f07919fe076b0dbf14bfe9679c3cbb52 | [
"MIT"
] | 15 | 2018-10-05T05:29:55.000Z | 2020-07-20T12:11:21.000Z | youtube_livechat_messages/cursor.py | uehara1414/youtube-livestreaming-api-python | f981a928f07919fe076b0dbf14bfe9679c3cbb52 | [
"MIT"
] | 2 | 2019-04-19T05:06:17.000Z | 2021-02-08T20:44:13.000Z | youtube_livechat_messages/cursor.py | uehara1414/youtube_livechat_messages | f981a928f07919fe076b0dbf14bfe9679c3cbb52 | [
"MIT"
] | null | null | null | import time
import collections
import itertools
from youtube_livechat_messages.models import LiveChatEvent, EventType
class LiveChatEventCursor:
def __init__(self, request):
self.request = request
def events(self, include=None):
return ChatEventIterator(self.request, include)
def text_messages(self):
return ChatEventIterator(self.request, include=[EventType.textMessageEvent])
def super_chats(self):
return ChatEventIterator(self.request, include=[EventType.superChatEvent])
def fan_fundings(self):
return ChatEventIterator(self.request, include=[EventType.fanFundingEvent])
def raw(self):
return RawChatEventCursor(request=self.request)
class RawChatEventCursor:
def __init__(self, request):
self.request = request
def events(self, include=None):
return RawEventIterator(self.request, include)
def text_messages(self):
return RawEventIterator(self.request, include=[EventType.textMessageEvent])
def super_chats(self):
return RawEventIterator(self.request, include=[EventType.superChatEvent])
def fan_fundings(self):
return RawEventIterator(self.request, include=[EventType.fanFundingEvent])
class ChatEventIterator:
def __init__(self, request, include=None):
self.request = request
self.index = None
self._events = collections.OrderedDict()
self.include = include or []
self.update_events()
if self._events:
self.index = list(self._events.keys())[0]
def update_events(self):
res = self.request.call()
for item in res.json()['items']:
item = LiveChatEvent(item)
self._events[item.id] = item
def wait_while_index_set(self):
"""最初の1コメント目を待つ"""
while True:
if self.index is None:
if self._events:
self.index = list(self._events.keys())[0]
return
else:
self.update_events()
time.sleep(1)
else:
return
def wait_for_next_item(self):
while True:
item_iter = itertools.dropwhile(lambda item_id: item_id != self.index, self._events)
next(item_iter)
try:
self.index = next(item_iter)
item = self._events[self.index]
if not self.include or item.type in self.include:
return item
except StopIteration:
time.sleep(1)
self.update_events()
def __next__(self) -> LiveChatEvent:
if not self._events:
time.sleep(1)
self.update_events()
self.wait_while_index_set()
item = self.wait_for_next_item()
return item
def __iter__(self):
return self
class RawEventIterator(ChatEventIterator):
def __init__(self, request, include=None):
super().__init__(request, include=include)
def __next__(self) -> object:
item = super().__next__()
return item.raw_json
| 27.077586 | 96 | 0.618274 | 329 | 3,141 | 5.671733 | 0.206687 | 0.100214 | 0.096463 | 0.086817 | 0.493033 | 0.459271 | 0.431404 | 0.300107 | 0.254019 | 0.254019 | 0 | 0.002693 | 0.290672 | 3,141 | 115 | 97 | 27.313043 | 0.834829 | 0.00382 | 0 | 0.425 | 0 | 0 | 0.001601 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2375 | false | 0 | 0.05 | 0.125 | 0.525 | 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 | 1 | 0 | 0 | 3 |
b88d30097ca5fd41f25d049478f6032e33a651ff | 129 | py | Python | lazypage/apps.py | taojy123/django-lazypage | 83c4c92ac9f9f051f57bcb2457e922dfb93a1fff | [
"MIT"
] | 1 | 2018-11-28T09:45:10.000Z | 2018-11-28T09:45:10.000Z | lazypage/apps.py | taojy123/django-lazypage | 83c4c92ac9f9f051f57bcb2457e922dfb93a1fff | [
"MIT"
] | null | null | null | lazypage/apps.py | taojy123/django-lazypage | 83c4c92ac9f9f051f57bcb2457e922dfb93a1fff | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class LazypageConfig(AppConfig):
name = "lazypage"
verbose_name = "Django Lazy Page"
| 18.428571 | 37 | 0.736434 | 15 | 129 | 6.266667 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.186047 | 129 | 6 | 38 | 21.5 | 0.895238 | 0 | 0 | 0 | 0 | 0 | 0.186047 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 1 | 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 | 1 | 0 | 0 | 3 |
b8926b5ee83e01093c676c7ae2325e170f830ddd | 6,161 | py | Python | ReaderWriterLockUnitTest.py | duvni/ReaderWriterLock | 9cf835f33a6112da10960a283e866b4a4a8addc2 | [
"MIT"
] | null | null | null | ReaderWriterLockUnitTest.py | duvni/ReaderWriterLock | 9cf835f33a6112da10960a283e866b4a4a8addc2 | [
"MIT"
] | 1 | 2017-10-10T14:07:55.000Z | 2018-03-31T08:55:49.000Z | ReaderWriterLockUnitTest.py | duvni/ReaderWriterLock | 9cf835f33a6112da10960a283e866b4a4a8addc2 | [
"MIT"
] | null | null | null | import unittest
import threading
import time
from ReaderWriterLock import ReaderWriterLock
class WriterThread(threading.Thread):
def __init__(self, rw_lock: ReaderWriterLock, lock_timeout: float, wait_timeout: float, working_list: list,
new_value):
self.write_acquired = False
self.write_lock_held = False
self._rw_lock = rw_lock
self._lock_timeout = lock_timeout
self._wait_timeout = wait_timeout
self.working_list = working_list
self._new_value = new_value
threading.Thread.__init__(self)
def run(self):
self.write_acquired = self._rw_lock.enter_write_lock(self._lock_timeout)
self.write_lock_held = self._rw_lock.is_write_lock_held
if not self.write_acquired:
return
time.sleep(self._wait_timeout)
self.working_list[0] = self._new_value
self._rw_lock.exit_write_lock()
class ReaderThread(threading.Thread):
def __init__(self, rw_lock: ReaderWriterLock, lock_timeout: float, wait_timeout: float, working_list: list):
self.read_acquired = False
self.read_lock_held = False
self._rw_lock = rw_lock
self._lock_timeout = lock_timeout
self._wait_timeout = wait_timeout
self.working_list = working_list
self.value_read = None
threading.Thread.__init__(self)
def run(self):
self.read_acquired = self._rw_lock.enter_read_lock(self._lock_timeout)
self.read_lock_held = self._rw_lock.is_read_lock_held
if not self.read_acquired:
return
time.sleep(self._wait_timeout)
self.value_read = self.working_list[0]
self._rw_lock.exit_read_lock()
class TestReaderWriterLock(unittest.TestCase):
def test_reading_before_writing(self):
rw_lock = ReaderWriterLock()
working_list = [1]
writer1 = WriterThread(rw_lock, -1, 0, working_list, 2)
writer1.start()
writer1.join()
self.assertTrue(writer1.write_acquired)
self.assertEqual(working_list[0], 2)
reader1 = ReaderThread(rw_lock, -1, 3, working_list)
reader1.start()
time.sleep(1)
writer2 = WriterThread(rw_lock, -1, 0, working_list, 3)
writer2.start()
reader1.join()
writer2.join()
self.assertTrue(reader1.read_acquired)
self.assertEqual(reader1.value_read, 2)
self.assertTrue(writer2.write_acquired)
self.assertEqual(working_list[0], 3)
def test_writing_before_reading(self):
rw_lock = ReaderWriterLock()
working_list = [1]
writer1 = WriterThread(rw_lock, -1, 3, working_list, 2)
writer1.start()
time.sleep(1)
reader1 = ReaderThread(rw_lock, -1, 0, working_list)
reader1.start()
reader1.join()
writer1.join()
self.assertTrue(reader1.read_acquired)
self.assertTrue(writer1.write_acquired)
self.assertEqual(reader1.value_read, 2)
self.assertEqual(working_list[0], 2)
def test_write_starvation(self):
rw_lock = ReaderWriterLock()
working_list = [1]
reader1 = ReaderThread(rw_lock, -1, 5, working_list)
reader1.start()
time.sleep(1)
writer1 = WriterThread(rw_lock, -1, 0, working_list, 2)
writer1.start()
time.sleep(1)
reader2 = ReaderThread(rw_lock, -1, 0, working_list)
reader2.start()
reader1.join()
reader2.join()
writer1.join()
self.assertEqual(reader1.value_read, 1)
self.assertEqual(reader2.value_read, 2)
self.assertEqual(working_list[0], 2)
def test_enter_timeout(self):
rw_lock = ReaderWriterLock()
working_list = [1]
writer1 = WriterThread(rw_lock, -1, 3, working_list, 2)
writer1.start()
time.sleep(1)
reader1 = ReaderThread(rw_lock, 0.1, 0, working_list)
reader1.start()
writer2 = WriterThread(rw_lock, 0.1, 0, working_list, 3)
writer2.start()
reader1.join()
writer2.join()
writer1.join()
self.assertTrue(writer1.write_acquired)
self.assertFalse(reader1.read_acquired)
self.assertFalse(writer2.write_acquired)
self.assertEqual(working_list[0], 2)
def test_waiting_writer_timeout(self):
rw_lock = ReaderWriterLock()
working_list = [1]
reader1 = ReaderThread(rw_lock, -1, 5, working_list)
reader1.start()
time.sleep(1)
writer1 = WriterThread(rw_lock, -1, 0, working_list, 2)
writer1.start()
time.sleep(1)
reader2 = ReaderThread(rw_lock, 0.1, 0, working_list)
reader2.start()
reader1.join()
reader2.join()
writer1.join()
self.assertTrue(reader1.read_acquired)
self.assertFalse(reader2.read_acquired)
self.assertTrue(writer1.write_acquired)
self.assertEqual(reader1.value_read, 1)
self.assertEqual(working_list[0], 2)
def test_properties(self):
rw_lock = ReaderWriterLock()
working_list = [1]
self.assertEqual(rw_lock.current_read_count, 0)
reader1 = ReaderThread(rw_lock, -1, 3, working_list)
reader1.start()
time.sleep(1)
self.assertFalse(rw_lock.is_read_lock_held)
self.assertEqual(rw_lock.current_read_count, 1)
writer1 = WriterThread(rw_lock, -1, 3, working_list, 2)
writer1.start()
time.sleep(1)
self.assertFalse(rw_lock.is_write_lock_held)
reader1.join()
writer1.join()
self.assertTrue(reader1.read_lock_held)
self.assertTrue(writer1.write_lock_held)
def test_upgrade_read_to_write_lock(self):
rw_lock = ReaderWriterLock()
rw_lock.enter_read_lock()
self.assertTrue(rw_lock.is_read_lock_held)
rw_lock.upgrade_read_to_write_lock()
self.assertTrue(rw_lock.is_write_lock_held)
self.assertFalse(rw_lock.is_read_lock_held)
rw_lock.downgrade_write_to_read_lock()
self.assertTrue(rw_lock.is_read_lock_held)
self.assertFalse(rw_lock.is_write_lock_held)
| 35.612717 | 112 | 0.654602 | 762 | 6,161 | 4.976378 | 0.085302 | 0.074367 | 0.044831 | 0.061709 | 0.844409 | 0.799051 | 0.746835 | 0.698576 | 0.515032 | 0.484705 | 0 | 0.031351 | 0.24931 | 6,161 | 172 | 113 | 35.819767 | 0.788541 | 0 | 0 | 0.658065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.212903 | 1 | 0.070968 | false | 0 | 0.025806 | 0 | 0.129032 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 3 |
b8b059c217a852f127dd6fac46069c999695a335 | 555 | py | Python | exercises/test_01_01.py | DayMath82/www.warmups.dev | 2a1f3f7b2e1e066b3033366a91512c1b1be824ce | [
"MIT"
] | 5 | 2021-05-03T05:09:17.000Z | 2021-05-05T11:45:12.000Z | exercises/test_01_01.py | DayMath82/www.warmups.dev | 2a1f3f7b2e1e066b3033366a91512c1b1be824ce | [
"MIT"
] | 13 | 2021-06-10T20:10:25.000Z | 2021-07-12T18:59:15.000Z | exercises/test_01_01.py | DayMath82/www.warmups.dev | 2a1f3f7b2e1e066b3033366a91512c1b1be824ce | [
"MIT"
] | 3 | 2021-05-01T00:08:07.000Z | 2021-05-21T03:36:46.000Z | def test():
# if an assertion fails, the message will be displayed
# --> must have the output in a comment
assert "Mean: 5.0" in __solution__, "Did you record the correct program output as a comment?"
# --> must have the correct arithmetic mean
assert mean == 5.0, "Are you calculating the arithmetic mean?"
# --> must not have a TODO marker in the solution
assert "TODO" not in __solution__, "Did you remove the TODO marker when finished?"
# display a congratulations for a correct solution
__msg__.good("Well done!")
| 50.454545 | 97 | 0.695495 | 83 | 555 | 4.506024 | 0.53012 | 0.042781 | 0.058824 | 0.064171 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009281 | 0.223423 | 555 | 10 | 98 | 55.5 | 0.858469 | 0.412613 | 0 | 0 | 0 | 0 | 0.509375 | 0 | 0 | 0 | 0 | 0.1 | 0.6 | 1 | 0.2 | true | 0 | 0 | 0 | 0.2 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b238ded9e59e1f11acb9f5f854d0f96993be9636 | 101 | py | Python | asnets/experiments/actprop_5l_h_add_no_lmcut.py | xf1590281/ASNets | 5f4b29fb62a5e72004b813228442d06246c9ec33 | [
"MIT"
] | 21 | 2017-12-05T13:27:36.000Z | 2021-11-16T20:32:33.000Z | asnets/experiments/actprop_5l_h_add_no_lmcut.py | xf1590281/ASNets | 5f4b29fb62a5e72004b813228442d06246c9ec33 | [
"MIT"
] | 2 | 2018-07-16T12:15:46.000Z | 2020-10-31T00:02:49.000Z | asnets/experiments/actprop_5l_h_add_no_lmcut.py | xf1590281/ASNets | 5f4b29fb62a5e72004b813228442d06246c9ec33 | [
"MIT"
] | 7 | 2018-03-19T13:45:13.000Z | 2022-03-24T07:52:20.000Z | """For monster problem."""
from .actprop_5l_h_add import * # noqa F401
USE_LMCUT_FEATURES = False
| 16.833333 | 44 | 0.732673 | 15 | 101 | 4.6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.047059 | 0.158416 | 101 | 5 | 45 | 20.2 | 0.764706 | 0.306931 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
b23ccecb657a95001da14fbcb3f6dca2ef245ae0 | 345 | py | Python | pkgit/env_builders/typescript.py | Cologler/pkgit-python | f9ef74e3520c8d31ac1e93aea86f9e362d8553f4 | [
"MIT"
] | null | null | null | pkgit/env_builders/typescript.py | Cologler/pkgit-python | f9ef74e3520c8d31ac1e93aea86f9e362d8553f4 | [
"MIT"
] | null | null | null | pkgit/env_builders/typescript.py | Cologler/pkgit-python | f9ef74e3520c8d31ac1e93aea86f9e362d8553f4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2019~2999 - Cologler <skyoflw@gmail.com>
# ----------
#
# ----------
from click import style
from ..core.envs import Envs
from . import IEnvBuilder
class TypeScriptBuilder(IEnvBuilder):
env = Envs.TYPE_SCRIPT
def init(self):
with self.open_proc(['tsc', '--init']):
pass
| 17.25 | 56 | 0.591304 | 40 | 345 | 5.05 | 0.775 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.03321 | 0.214493 | 345 | 19 | 57 | 18.157895 | 0.712177 | 0.284058 | 0 | 0 | 0 | 0 | 0.037657 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0.125 | 0.375 | 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 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
b258bb07dd96b02243360995517ab6fafc36ac39 | 352 | py | Python | JugandoCodewars/ResueltosCodeWars/SortOddNumbers.py | blukitas/JugandoCodewars | aa4938fbba3911ba2d5f6fea2ff35fe3cbbf37b0 | [
"MIT"
] | null | null | null | JugandoCodewars/ResueltosCodeWars/SortOddNumbers.py | blukitas/JugandoCodewars | aa4938fbba3911ba2d5f6fea2ff35fe3cbbf37b0 | [
"MIT"
] | null | null | null | JugandoCodewars/ResueltosCodeWars/SortOddNumbers.py | blukitas/JugandoCodewars | aa4938fbba3911ba2d5f6fea2ff35fe3cbbf37b0 | [
"MIT"
] | null | null | null | # You have an array of numbers.
# Your task is to sort ascending odd numbers but even numbers must be on their places.
# Zero isn't an odd number and you don't need to move it. If you have an empty array, you need to return it.
# Example
# sort_array([5, 3, 2, 8, 1, 4]) == [1, 3, 2, 8, 5, 4]
# https://www.codewars.com/kata/578aa45ee9fd15ff4600090d | 39.111111 | 108 | 0.698864 | 68 | 352 | 3.602941 | 0.661765 | 0.057143 | 0.073469 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.09507 | 0.193182 | 352 | 9 | 109 | 39.111111 | 0.767606 | 0.957386 | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b27ed1f549bbfe6d8fc3366ff1f890649ae8cdd8 | 122 | py | Python | junk_drawer/easypost_testing.py | wantsomechocolate/3Muses | f195bb4d8f71be09467981e0aea7726951bf1c9a | [
"BSD-3-Clause"
] | null | null | null | junk_drawer/easypost_testing.py | wantsomechocolate/3Muses | f195bb4d8f71be09467981e0aea7726951bf1c9a | [
"BSD-3-Clause"
] | 26 | 2015-01-02T13:35:48.000Z | 2015-06-10T14:39:07.000Z | junk_drawer/easypost_testing.py | wantsomechocolate/3Muses | f195bb4d8f71be09467981e0aea7726951bf1c9a | [
"BSD-3-Clause"
] | null | null | null | import easypost
import os
easypost.api_key=os.environ['EASYPOST_KEY']
shipment=easypost.Shipment.retrieve('shp_sq2zuZ8d')
| 24.4 | 51 | 0.836066 | 17 | 122 | 5.823529 | 0.588235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017241 | 0.04918 | 122 | 4 | 52 | 30.5 | 0.836207 | 0 | 0 | 0 | 0 | 0 | 0.196721 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
b297bf104c1010ccfd8dfd09abd42f129775093f | 23,409 | py | Python | 3.py | znuxor/adventofcode2016 | 43c1da30cf3b0bca0d9daeddd5692ce2787b544a | [
"BSD-3-Clause"
] | null | null | null | 3.py | znuxor/adventofcode2016 | 43c1da30cf3b0bca0d9daeddd5692ce2787b544a | [
"BSD-3-Clause"
] | null | null | null | 3.py | znuxor/adventofcode2016 | 43c1da30cf3b0bca0d9daeddd5692ce2787b544a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
theInput = """785 516 744
272 511 358
801 791 693
572 150 74
644 534 138
191 396 196
860 92 399
233 321 823
720 333 570
308 427 572
246 206 66
156 261 595
336 810 505
810 210 938
615 987 820
117 22 519
412 990 256
405 996 423
55 366 418
290 402 810
313 608 755
740 421 321
255 322 582
990 174 658
609 818 360
565 831 87
146 94 313
895 439 866
673 3 211
517 439 733
281 651 582
601 711 257
467 262 375
33 52 584
281 418 395
278 438 917
397 413 991
495 306 757
232 542 800
686 574 729
101 642 506
785 898 932
975 924 106
889 792 114
287 901 144
586 399 529
619 307 456
287 508 88
159 175 190
195 261 148
348 195 270
905 600 686
847 396 680
59 421 879
969 343 600
969 361 585
95 115 209
512 831 395
172 774 662
372 396 290
957 281 445
745 525 297
489 630 225
81 138 18
694 114 404
764 196 383
607 861 94
896 92 140
786 862 123
389 449 298
795 339 780
863 507 892
589 850 759
273 645 371
368 884 486
637 553 423
391 630 950
442 950 581
383 650 712
538 844 405
353 261 544
682 60 336
750 308 698
177 369 643
479 919 137
482 598 184
275 726 55
139 874 850
456 195 839
385 766 205
561 751 249
397 764 714
508 856 876
478 410 12
686 230 267
876 247 272
160 436 673
466 798 278
487 839 773
754 780 900
45 983 801
800 595 188
523 408 239
269 609 216
745 692 237
15 588 840
702 583 298
707 150 859
835 750 375
211 754 368
892 434 152
521 659 592
683 573 904
902 544 412
718 218 502
379 227 292
482 87 780
903 433 382
223 196 369
824 588 734
342 396 279
164 561 918
409 841 918
893 409 204
33 435 169
858 423 74
134 797 255
517 881 109
466 373 193
379 180 973
620 467 941
260 512 298
993 461 89
111 986 990
946 668 987
26 65 110
223 55 372
235 103 473
288 244 964
343 199 25
62 213 984
602 117 311
624 142 356
65 130 248
709 95 376
316 897 723
420 840 349
159 460 208
385 445 929
408 13 791
149 92 682
791 253 440
870 196 395
651 347 49
738 362 536
392 226 485
683 642 938
332 890 393
954 394 971
279 217 309
610 429 747
588 219 959
840 565 791
671 624 380
384 426 485
407 323 226
780 290 428
539 41 571
455 267 306
48 607 250
432 567 400
851 507 477
853 456 923
615 416 838
245 496 353
253 325 926
159 716 989
488 216 473
808 222 742
395 178 798
514 383 732
478 845 728
508 486 4
230 643 35
151 298 584
123 906 576
583 682 294
580 605 784
624 517 984
911 778 745
9 897 325
913 357 501
27 221 249
798 669 614
824 777 397
749 461 304
734 769 1
447 543 306
454 200 19
551 134 674
562 329 665
352 188 281
808 151 622
834 255 648
352 199 340
429 182 121
585 223 382
524 977 225
520 156 532
827 929 419
429 175 759
284 376 877
312 548 751
571 507 529
390 503 483
710 1 146
938 421 582
975 981 186
118 771 531
328 490 638
452 743 750
511 772 242
957 850 177
669 750 665
975 296 664
228 35 159
763 347 650
752 315 557
366 530 294
828 154 645
730 388 763
744 298 774
459 508 375
449 485 748
537 819 907
526 259 551
773 890 650
523 839 473
645 928 485
333 109 115
403 952 399
229 50 606
377 900 212
693 731 399
682 103 579
441 764 471
481 114 267
196 567 591
353 495 798
436 348 30
794 88 526
926 411 524
1 862 754
839 440 848
839 458 109
961 799 930
944 692 853
168 520 788
579 920 687
32 930 283
575 759 747
857 705 926
842 674 925
233 163 29
544 409 719
266 643 767
315 323 56
754 135 658
99 757 569
818 832 207
296 602 519
316 371 301
409 879 747
765 696 151
960 836 689
526 564 790
33 954 343
548 203 379
545 797 622
550 122 105
606 538 12
686 434 102
595 820 249
642 215 221
120 703 124
972 440 214
444 544 447
963 225 373
904 628 271
733 109 374
193 673 588
446 724 945
246 771 901
389 900 339
331 323 756
245 428 969
565 457 539
977 743 742
26 199 543
960 804 405
795 914 721
454 695 816
984 422 849
437 495 803
237 106 58
221 442 834
638 278 21
697 880 830
818 953 849
276 335 944
152 650 953
232 972 23
675 991 179
741 579 408
164 741 285
682 156 113
71 607 759
740 692 644
284 229 308
681 114 133
961 232 394
214 653 533
240 863 332
115 651 664
396 356 477
308 220 134
283 505 569
286 400 234
413 830 734
534 877 619
293 562 171
862 216 186
819 427 63
491 121 321
139 108 142
438 39 219
345 120 486
367 91 482
400 61 605
780 858 434
854 188 478
141 726 62
600 904 292
312 328 103
648 896 200
304 299 382
372 325 229
625 114 513
95 742 875
432 99 818
510 731 863
353 520 495
501 335 400
411 187 358
612 274 381
658 586 774
908 858 876
162 722 881
604 277 772
677 484 369
964 772 239
973 618 388
463 799 264
262 49 691
800 816 875
827 820 394
828 682 576
571 670 724
322 910 202
12 72 856
529 771 829
520 830 38
796 154 681
662 160 750
193 314 633
772 925 453
769 769 427
318 182 338
552 366 505
82 205 468
486 218 352
542 633 640
612 625 879
69 715 867
233 571 479
818 703 639
866 989 856
285 504 265
981 758 773
920 716 904
698 390 977
336 1 838
563 391 169
692 87 692
17 75 754
691 100 143
605 754 711
844 724 864
261 457 167
640 655 371
554 294 874
777 541 528
902 595 406
774 309 254
322 721 257
638 883 617
278 793 525
779 669 120
144 539 722
106 533 242
187 925 743
221 863 490
284 899 481
186 82 103
102 143 562
306 494 540
352 574 239
885 218 247
551 750 123
859 634 206
391 513 363
361 608 410
390 303 93
353 111 592
472 450 724
395 507 621
494 19 266
184 416 881
330 402 821
999 82 370
613 165 722
572 141 978
361 202 671
975 376 474
878 445 216
925 529 713
499 522 338
891 315 749
712 539 290
382 388 479
806 394 342
273 56 594
213 3 226
359 52 693
637 612 601
792 336 253
223 380 699
189 101 265
812 297 699
635 255 739
885 653 957
165 873 646
883 444 400
982 789 89
6 922 192
990 310 109
159 595 656
884 640 514
876 44 671
288 569 864
108 255 977
237 819 178
417 923 144
231 444 375
452 951 241
947 724 475
569 243 481
646 678 7
282 474 921
830 520 36
961 461 957
333 955 876
359 778 909
128 276 70
914 961 185
606 942 453
373 323 614
270 170 447
745 480 454
499 649 95
468 127 922
436 722 121
202 773 971
307 127 21
11 122 90
305 54 93
266 543 113
931 735 706
931 480 683
306 433 158
155 35 379
343 401 321
880 477 516
226 996 282
778 531 528
722 313 162
975 489 594
406 312 635
106 191 147
180 731 20
249 869 140
336 359 426
266 580 403
569 702 587
740 913 549
197 372 292
585 964 683
340 532 249
592 588 910
280 78 824
675 892 101
642 718 222
393 359 157
714 442 999
851 425 954
487 545 408
504 759 191
509 179 626
774 859 455
335 476 523
573 622 288
518 561 504
812 100 602
433 455 676
565 453 112
282 266 523
642 508 440
558 512 102
109 685 128
291 903 221
254 370 275
300 398 431
341 809 383
622 948 79
813 961 308
972 451 601
390 877 719
988 448 275
184 229 542
902 307 761
587 575 909
442 648 331
424 98 620
512 106 578
411 219 614
577 294 104
81 916 468
84 842 287
96 261 678
34 323 226
943 321 29
906 619 258
924 503 215
929 149 431
56 505 511
876 769 999
994 714 980
416 495 355
79 265 420
37 917 286
53 782 558
868 327 59
926 27 398
704 348 370
773 909 356
969 799 551
282 138 448
808 51 437
417 277 372
806 291 537
818 510 460
945 372 38
127 191 422
100 287 753
341 510 391
317 252 884
629 201 567
164 10 560
632 205 370
353 891 990
609 391 12
889 564 990
74 820 241
356 636 389
309 232 292
654 294 199
45 226 362
645 308 329
955 891 186
180 78 115
842 938 141
141 179 159
401 227 573
372 73 681
562 216 682
184 526 998
530 450 357
296 812 233
398 287 530
613 539 372
523 719 554
377 735 429
854 319 362
445 828 221
506 485 402
519 603 250
490 421 819
638 204 983
664 585 407
434 503 124
512 551 153
135 449 30
673 10 513
682 45 265
32 44 498
168 415 698
151 821 711
179 682 145
800 471 326
376 893 698
885 523 390
992 49 159
949 8 59
83 47 107
871 46 660
610 954 892
352 956 637
12 139 444
517 748 733
502 731 354
368 754 687
197 759 584
292 25 928
197 319 514
359 824 99
458 827 546
681 543 197
160 492 603
634 82 455
456 96 53
399 94 836
702 2 814
614 422 467
161 290 252
506 605 591
8 454 407
46 544 489
42 491 477
772 602 767
359 465 769
970 360 114
959 552 83
945 581 284
26 314 286
153 708 707
444 681 830
400 65 430
22 993 185
327 525 125
321 665 106
538 632 959
552 220 966
17 787 5
561 309 865
997 652 785
678 924 297
772 290 460
322 347 473
811 393 92
283 398 625
349 50 528
385 403 544
404 671 204
430 214 286
798 480 219
430 440 811
240 249 442
223 510 411
590 18 592
468 166 556
542 165 708
93 12 480
893 355 601
822 348 850
431 606 256
367 819 690
188 247 644
766 199 514
384 469 416
412 520 459
261 326 646
746 533 31
972 788 664
465 548 470
257 371 412
633 703 817
525 26 466
6 667 539
532 692 356
891 468 602
709 24 599
275 449 2
674 471 289
683 549 57
177 917 270
954 311 715
991 921 707
115 946 6
745 615 446
646 288 148
725 333 588
933 915 326
828 947 286
350 59 117
598 98 286
436 127 91
461 223 198
334 167 679
506 86 803
254 237 989
878 248 371
416 757 398
721 841 757
761 303 973
24 76 928
749 280 886
194 695 42
134 261 752
134 557 727
345 367 861
380 87 425
685 424 723
17 738 451
902 886 569
920 272 125
239 222 797
361 951 767
273 835 197
696 235 427
247 212 922
706 389 739
480 893 290
877 177 494
450 864 281
392 164 313
799 233 293
416 168 35
860 290 4
989 284 124
710 88 120
431 307 526
515 417 528
442 400 566
108 858 371
47 472 519
147 627 386
644 481 315
168 838 337
675 409 29
130 117 449
959 401 512
963 416 667
729 166 375
843 452 322
749 325 88
978 850 511
91 789 818
993 552 510
741 512 45
836 644 865
136 851 903
711 818 984
933 760 333
461 66 945
285 198 321
726 577 317
952 421 2
278 961 835
995 134 148
805 999 760
542 731 575
657 754 721
135 43 343
755 179 318
372 24 646
577 194 595
277 7 440
530 48 416
257 54 634
772 302 492
789 397 21
532 270 499
145 511 583
600 286 402
628 449 621
577 588 199
485 965 239
765 760 422
709 284 676
962 672 786
760 716 362
511 254 53
626 96 383
488 316 340
19 256 733
680 798 260
693 578 908
810 216 783
485 703 650
965 741 152
44 544 334
880 702 451
887 581 132
476 77 741
661 24 435
858 68 607
943 416 836
936 334 662
5 397 348
452 838 182
801 89 369
781 853 284
969 23 717
482 493 611
560 483 394
221 642 492
641 393 428
491 752 98
710 791 437
615 198 656
146 646 943
218 385 132
934 209 589
863 299 513
941 624 167
648 514 553
724 157 441
389 733 241
236 109 421
607 816 536
363 877 317
508 493 332
782 929 79
535 607 463
877 32 399
637 626 172
511 865 972
560 916 928
599 325 80
809 477 224
724 60 279
524 454 262
960 517 994
216 42 880
969 487 190
977 329 652
916 539 696
271 581 76
660 74 681
768 761 323
108 821 440
224 478 560
373 567 614
417 716 566
178 155 529
994 670 562
987 621 375
161 498 922
527 843 478
495 975 788
528 11 567
713 744 575
268 746 35
802 53 869
789 717 381
437 703 871
177 220 104
638 684 79
807 535 71
525 978 321
576 696 351
928 572 83
414 437 25
75 371 320
338 89 327
376 90 239
363 330 126
12 260 210
284 21 356
403 54 748
551 49 530
530 461 249
640 450 399
153 754 393
548 774 958
602 773 906
417 11 377
188 879 740
486 105 649
426 929 107
848 677 563
913 728 646
700 116 390
148 425 782
564 335 839
584 652 155
707 887 518
489 250 857
979 726 399
113 305 420
402 396 742
479 99 950
753 425 677
88 533 246
804 138 554
76 734 294
472 550 372
415 621 525
76 617 903
821 145 901
876 539 35
91 745 637
871 604 106
811 466 729
694 153 573
100 735 306
660 640 817
927 55 814
852 30 289
741 33 898
193 57 636
260 208 711
172 215 152
790 262 520
92 511 437
726 622 89
709 848 318
269 960 557
940 814 793
286 59 993
529 6 870
415 58 850
578 13 524
261 258 423
695 247 290
512 229 270
485 271 272
118 461 3
757 679 808
830 886 324
913 315 870
414 229 764
386 567 738
32 657 59
336 169 14
821 494 667
815 606 674
20 654 529
482 674 49
476 321 512
661 466 229
869 974 565
205 686 438
466 218 494
567 519 761
257 658 648
546 491 467
102 526 542
542 949 126
608 999 976
867 666 798
421 801 941
825 589 335
871 93 179
491 670 303
464 256 249
318 650 322
168 807 391
513 5 179
770 8 127
960 9 82
561 661 885
176 670 865
468 382 20
811 732 457
709 856 356
713 378 649
306 510 409
963 269 649
988 749 782
208 173 181
679 734 178
884 870 45
763 290 80
228 495 689
736 653 771
325 948 972
985 132 914
770 859 360
382 859 755
781 866 681
922 20 119
628 584 547
584 262 320
62 407 277
831 531 304
979 31 842
194 538 646
77 61 758
245 247 620
175 298 876
315 121 893
185 404 558
222 359 367
901 873 23
109 560 553
819 848 567
509 184 809
188 194 46
405 255 773
333 734 547
283 750 154
115 220 406
551 373 358
851 505 478
961 847 160
661 295 417
489 136 814
192 307 866
976 763 437
255 964 24
786 900 454
727 560 520
814 169 504
882 573 524
550 409 236
567 647 258
155 576 474
508 455 921
718 197 9
331 356 917
344 78 748
204 6 937
187 83 648
138 81 913
314 972 914
286 971 4
677 344 702
326 452 163
407 131 576
560 351 137
701 839 354
475 503 263
606 504 651
919 601 112
709 224 732
714 184 103
261 554 192
766 381 290
388 784 853
447 869 923
504 124 571
923 643 251
323 679 152
847 477 171
796 368 649
80 716 799
771 677 294
270 364 957
253 591 959
17 756 22
121 466 617
401 838 752
350 604 913
393 811 828
646 949 940
328 230 516
794 443 695
136 429 579
657 140 613
803 177 821
829 564 440
560 469 853
961 693 979
382 661 84
630 180 995
626 353 575
616 502 687
264 223 764
64 507 569
575 427 662
619 807 506
663 203 959
978 775 783
317 749 481
3 581 875
320 828 793
317 838 107
671 603 282
524 581 326
619 728 57
91 937 198
182 353 260
226 759 244
140 153 149
387 732 239
427 761 138
339 447 421
278 439 647
82 135 839
824 513 865
117 310 825
838 670 58
183 82 130
212 209 749
118 151 861
978 275 262
273 747 689
916 739 878
689 270 339
358 268 750
966 97 753
161 685 813
174 396 866
70 861 132
866 117 790
737 201 723
209 85 468
821 948 557
182 374 327
912 671 412
444 592 746
567 613 415
561 75 393
631 428 740
976 362 326
504 171 911
753 886 430
738 680 494
839 371 481
979 537 330
333 886 216
669 357 476
107 186 484
302 327 78
400 231 541
159 873 75
744 684 46
592 363 80
944 670 496
811 292 699
545 959 949
299 552 632
683 94 14
418 603 646
370 781 758
364 236 619
107 837 860
106 409 344
492 713 36
398 460 375
730 569 497
733 409 499
577 349 19
652 182 824
768 822 363
207 862 535
911 344 372
868 814 640
68 792 781
674 787 205
182 852 241
725 665 43
187 852 838
615 856 418
632 277 593
654 386 27
805 801 218
328 416 226
76 206 209
81 209 660
31 231 523
569 910 110
815 106 675
739 830 604
534 724 869
379 460 782
549 270 934
324 105 218
841 218 205
739 259 232
572 504 356
66 459 486
504 66 344
873 117 119
261 245 916
621 157 915
220 648 409
630 192 549
440 773 415
816 468 543
475 374 845
446 219 487
999 434 835
304 444 775
698 203 348
715 544 424
206 628 403
760 782 86
651 599 486
973 404 562
614 229 172
396 460 782
434 339 349
88 790 818
925 685 952
922 381 967
723 870 704
94 145 400
308 686 530
288 716 629
867 678 982
554 414 584
942 429 931
608 828 977
599 663 620
867 330 419
200 740 588
225 213 673
146 675 372
302 792 589
299 948 809
16 942 797
262 796 418
591 828 555
532 403 619
694 289 960
801 532 203
918 746 870
127 617 829
350 179 938
326 510 128
432 714 226
948 786 102
866 664 162
302 115 584
714 623 211
829 582 543
173 321 260
47 284 919
133 35 880
614 25 827
768 490 998
825 502 252
275 750 219
716 140 453
758 864 541
563 352 768
197 800 911
670 540 302
307 237 726
76 667 665
322 617 207
118 298 820
283 548 228
381 502 797
990 491 579
250 474 670
784 55 283
729 933 464
255 765 347
807 818 198
594 601 446
374 725 121
591 760 424
480 456 809
974 408 234
876 153 811
540 263 238
535 68 556
21 293 527
613 39 765
761 255 406
596 279 414
772 451 527
258 554 169
958 697 445
127 9 107
607 445 305
695 435 396
487 224 873
671 199 792
739 37 85
859 744 284
947 299 230
755 817 226
827 207 658
882 709 567
303 509 790
73 262 270
917 112 21
949 277 281
559 557 918
668 875 906
308 669 543
479 563 879
311 317 834
534 751 50
275 774 278
200 642 690
293 196 466
780 804 135
866 162 122
916 783 58
631 477 70
878 375 67
425 621 4
826 161 926
147 884 139
717 936 799
140 703 405
284 168 89
144 738 315
418 417 564
439 357 820
73 113 702
163 550 647
144 780 984
34 592 770
696 167 452
666 541 973
314 622 567
986 92 636
301 171 1
812 146 637
673 395 895
583 283 510
380 482 907
953 189 148
513 372 455
923 505 387
525 45 877
630 816 797
119 776 276
540 139 396
560 62 596
502 97 876
431 977 533
867 782 484
844 409 190
46 63 700
102 972 421
110 987 312
58 543 365
657 248 64
613 658 340
605 875 408
746 653 401
898 980 5
449 371 108
496 690 91
672 657 184
816 48 744
121 109 689
849 88 201
982 268 418
569 193 589
630 267 676
690 453 47
496 369 792
677 412 833
95 316 802
957 774 647
966 842 861
233 737 194
260 605 424
266 274 310
874 365 762
411 87 704
477 356 739
554 598 454
107 540 64
641 631 470
444 387 133
277 704 401
226 869 475
299 986 127
831 706 60
899 442 111
414 281 804
579 702 597
587 807 932
755 649 537
844 439 295
979 235 417
821 852 719
546 59 716
607 889 8
851 534 334
926 234 50
184 710 286
152 872 638
132 517 712
21 970 152
801 701 104
438 845 30
966 454 106
37 894 741
276 896 923
274 6 535
339 346 129
141 566 488
386 418 551
160 69 822
586 589 634
443 633 319
466 944 856
704 6 944
438 937 229
47 201 738
283 102 389
305 168 844
760 854 880
827 903 750
612 138 163
658 57 491
622 91 900
233 144 773
113 85 645
399 129 190
497 49 481
85 698 906
604 146 968
653 767 92
130 260 706
288 396 267
268 625 621
6 283 805
992 917 363
985 716 887
900 677 593
892 668 406
40 259 733
572 860 510
154 225 479
575 750 809
938 312 243
36 294 461
973 150 452
226 270 159
66 81 520
247 346 496
58 864 207
395 140 524
438 901 717
491 838 807
85 203 859
541 931 704
764 26 272
912 250 107
512 278 182
910 89 345
242 826 85
687 889 267
112 610 93
445 882 337
532 746 381
689 526 854
696 858 351
778 798 801
255 8 362
200 45 44
203 50 342
520 236 135
228 35 196
421 236 120
689 653 418
692 773 233
898 438 334
32 821 511
419 55 31
449 776 496
617 857 815
691 530 996
105 959 469
403 371 317
309 394 366
207 449 84
902 419 633
361 480 733
987 318 213
722 531 649
600 600 12
954 968 654
436 429 111
169 205 606
331 227 610
943 543 304
146 666 412
998 544 402
459 475 58
269 455 55
388 98 38
243 675 858
172 732 707
188 120 313
959 887 640
719 968 101
752 83 547
477 517 337
908 620 289
869 878 321
738 33 20
817 227 913
469 260 898
138 329 593
23 459 967
159 339 524
681 669 674
216 619 673
740 360 420
302 875 950
539 759 635
430 548 612
239 841 169
323 702 113
374 615 255
457 851 958
721 40 270
495 842 808
745 939 343
484 408 610
554 739 576
539 695 49
535 745 493
117 88 444
554 939 3
665 470 581
133 876 580
268 430 703
436 883 249
448 823 862
3 218 505
85 944 264
81 994 367
673 488 484
506 901 694
847 914 612
426 423 29
971 214 741
589 221 732
20 853 541
995 783 448
983 854 858
446 523 27
418 52 118
73 566 122
438 74 361
354 136 981
399 183 794
888 816 366
863 586 878
388 254 979
430 735 19
922 536 47
750 686 60
545 836 683
828 748 301
678 297 546
493 567 351
514 643 523
58 191 768
418 778 387
273 925 613
651 160 330
859 215 624
750 876 36
138 836 637
906 550 568
46 520 876
928 79 632
400 610 906
380 471 22
163 624 931
822 507 661
49 89 414
874 593 476
958 895 660
910 783 691
341 147 325
751 767 297
194 81 335
633 808 345
726 290 602
550 102 207
345 194 542
217 68 103
290 441 451
239 464 407
987 401 195
300 341 313
797 409 430
471 607 441
82 153 439
511 578 399
634 593 414
630 113 776
448 679 413
346 784 577
320 851 645
584 584 73
603 742 196
165 758 361
624 23 262
626 90 435
943 647 702
446 598 392
993 579 904
41 608 924
979 209 371
654 642 136
776 518 520
787 369 444
518 543 529
824 974 110
415 582 629
651 356 869
903 347 977
345 269 581
549 840 613
433 209 891
407 630 900
509 95 409
510 103 362
194 69 754"""
theInput = theInput.split('\n')
theInput2 = [i.split(' ') for i in theInput]
totalPossible = 0
for triangle in theInput2:
triangle.sort()
print(triangle)
if len(triangle) == 3:
side1, side2, side3 = triangle
else:
nullStr, side1, side2, side3 = triangle
if int(side1)+int(side2) > int(side3) and \
int(side1)+int(side3) > int(side2) and \
int(side2)+int(side3) > int(side1):
totalPossible += 1
print(totalPossible)
| 14.127339 | 47 | 0.622795 | 4,970 | 23,409 | 2.9334 | 0.204628 | 0.001646 | 0.002058 | 0.003155 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.974347 | 0.373873 | 23,409 | 1,656 | 48 | 14.13587 | 0.020332 | 0.000897 | 0 | 0 | 0 | 0 | 0.978877 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.001212 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b2a0ccc733bb409bbff0d61f325cec707acb2099 | 2,286 | py | Python | address/migrations/0003_auto_20210830_1305.py | theonlykingpin/snapfoodclone | 0c1a7839424e89d9bc7bfb55c150a92055759702 | [
"MIT"
] | 11 | 2021-09-17T07:44:05.000Z | 2022-02-06T08:33:30.000Z | address/migrations/0003_auto_20210830_1305.py | theonlykingpin/snapfoodclone | 0c1a7839424e89d9bc7bfb55c150a92055759702 | [
"MIT"
] | 1 | 2021-10-09T07:37:14.000Z | 2021-10-09T07:37:14.000Z | address/migrations/0003_auto_20210830_1305.py | theonlykingpin/snapfoodclone | 0c1a7839424e89d9bc7bfb55c150a92055759702 | [
"MIT"
] | 3 | 2021-09-27T14:12:13.000Z | 2021-10-18T12:21:37.000Z | # Generated by Django 3.2 on 2021-08-30 08:35
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('service', '0002_alter_service_address'),
('address', '0002_auto_20210830_1305'),
('accounts', '0001_initial'),
('payment', '0002_alter_invoice_address'),
]
operations = [
migrations.DeleteModel(
name='Address',
),
migrations.AddField(
model_name='serviceaddress',
name='area',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='s_addresses', to='address.area', verbose_name='area'),
),
migrations.AddField(
model_name='serviceaddress',
name='city',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='s_addresses', to='address.city', verbose_name='city'),
),
migrations.AddField(
model_name='serviceaddress',
name='state',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='s_addresses', to='address.state', verbose_name='state'),
),
migrations.AddField(
model_name='customeraddress',
name='area',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='c_addresses', to='address.area', verbose_name='area'),
),
migrations.AddField(
model_name='customeraddress',
name='city',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='c_addresses', to='address.city', verbose_name='city'),
),
migrations.AddField(
model_name='customeraddress',
name='state',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='c_addresses', to='address.state', verbose_name='state'),
),
migrations.AddField(
model_name='customeraddress',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='c_addresses', to='accounts.customer', verbose_name='customer'),
),
]
| 40.821429 | 158 | 0.631671 | 239 | 2,286 | 5.853556 | 0.221757 | 0.051465 | 0.080057 | 0.125804 | 0.766262 | 0.766262 | 0.695497 | 0.695497 | 0.695497 | 0.695497 | 0 | 0.024014 | 0.234908 | 2,286 | 55 | 159 | 41.563636 | 0.775872 | 0.01881 | 0 | 0.571429 | 1 | 0 | 0.203927 | 0.033467 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.040816 | 0 | 0.102041 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 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 | 3 |
b2a132f958abdfeb33ef41003247778f85af3a02 | 203 | py | Python | src/processrunner/settings.py | arobb/python-process-runner | e5265a052f501f533f6d0c8bbe3d70ab120b679f | [
"MIT"
] | 3 | 2019-07-16T17:32:29.000Z | 2021-11-08T05:00:26.000Z | src/processrunner/settings.py | arobb/python-process-runner | e5265a052f501f533f6d0c8bbe3d70ab120b679f | [
"MIT"
] | null | null | null | src/processrunner/settings.py | arobb/python-process-runner | e5265a052f501f533f6d0c8bbe3d70ab120b679f | [
"MIT"
] | 2 | 2017-07-06T23:59:12.000Z | 2019-07-16T17:32:32.000Z | # -*- coding: utf-8 -*-
"""Holder for shared Configuration"""
def init():
"""Holder for shared Configuration"""
global config
try:
config
except NameError:
config = {}
| 15.615385 | 41 | 0.566502 | 20 | 203 | 5.75 | 0.7 | 0.156522 | 0.26087 | 0.486957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006944 | 0.29064 | 203 | 12 | 42 | 16.916667 | 0.791667 | 0.423645 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0 | 0 | 0.166667 | 0 | 1 | 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 | 3 |
b2aa1a69f0283a960fafa6ac8874aa1bd16124f3 | 917 | py | Python | src/Phidget22/BridgeGain.py | MikaSoftware/mikathing | 60621b01e2fcbeefe2181a58fb0f6104115d1ae6 | [
"BSD-3-Clause"
] | 1 | 2020-02-26T12:43:07.000Z | 2020-02-26T12:43:07.000Z | Phidget22/BridgeGain.py | keysie/phidget-python-interface | ebf392fe6d8d25bd5c178edbf095cf29e0daa4af | [
"MIT"
] | null | null | null | Phidget22/BridgeGain.py | keysie/phidget-python-interface | ebf392fe6d8d25bd5c178edbf095cf29e0daa4af | [
"MIT"
] | 1 | 2020-02-26T12:43:12.000Z | 2020-02-26T12:43:12.000Z | import sys
import ctypes
class BridgeGain:
# 1x Amplificaion
BRIDGE_GAIN_1 = 1
# 2x Amplification
BRIDGE_GAIN_2 = 2
# 4x Amplification
BRIDGE_GAIN_4 = 3
# 8x Amplification
BRIDGE_GAIN_8 = 4
# 16x Amplification
BRIDGE_GAIN_16 = 5
# 32x Amplification
BRIDGE_GAIN_32 = 6
# 64x Amplification
BRIDGE_GAIN_64 = 7
# 128x Amplification
BRIDGE_GAIN_128 = 8
@classmethod
def getName(self, val):
if val == self.BRIDGE_GAIN_1:
return "BRIDGE_GAIN_1"
if val == self.BRIDGE_GAIN_2:
return "BRIDGE_GAIN_2"
if val == self.BRIDGE_GAIN_4:
return "BRIDGE_GAIN_4"
if val == self.BRIDGE_GAIN_8:
return "BRIDGE_GAIN_8"
if val == self.BRIDGE_GAIN_16:
return "BRIDGE_GAIN_16"
if val == self.BRIDGE_GAIN_32:
return "BRIDGE_GAIN_32"
if val == self.BRIDGE_GAIN_64:
return "BRIDGE_GAIN_64"
if val == self.BRIDGE_GAIN_128:
return "BRIDGE_GAIN_128"
return "<invalid enumeration value>"
| 22.925 | 38 | 0.732824 | 143 | 917 | 4.363636 | 0.272727 | 0.384615 | 0.115385 | 0.192308 | 0.24359 | 0 | 0 | 0 | 0 | 0 | 0 | 0.080429 | 0.186478 | 917 | 39 | 39 | 23.512821 | 0.756032 | 0.151581 | 0 | 0 | 0 | 0 | 0.176853 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.033333 | false | 0 | 0.066667 | 0 | 0.7 | 0 | 0 | 0 | 0 | null | 1 | 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 | 0 | 0 | 1 | 0 | 0 | 3 |
a22e5bc3c9d28c69269e64ca456ddfa8f68045db | 466 | py | Python | utils.py | NicChoo96/Graph_Unweighted_Hospitals | c88d6e2caca4e1fdab0549a041ac9856266847fb | [
"MIT"
] | null | null | null | utils.py | NicChoo96/Graph_Unweighted_Hospitals | c88d6e2caca4e1fdab0549a041ac9856266847fb | [
"MIT"
] | null | null | null | utils.py | NicChoo96/Graph_Unweighted_Hospitals | c88d6e2caca4e1fdab0549a041ac9856266847fb | [
"MIT"
] | 1 | 2021-05-22T09:06:56.000Z | 2021-05-22T09:06:56.000Z | import os
import json
def write_data_json_file(output_directory, file_name, writePath):
# Load in existing file record
if os.path.isfile('./' + output_directory + file_name):
with open(output_directory + file_name) as json_file:
f_data = json.load(json_file)
if len(f_data) != 0:
data = f_data
data = writePath
with open(output_directory + file_name, 'w') as outfile:
json.dump(data, outfile) | 33.285714 | 65 | 0.648069 | 65 | 466 | 4.4 | 0.415385 | 0.20979 | 0.265734 | 0.321678 | 0.216783 | 0.216783 | 0 | 0 | 0 | 0 | 0 | 0.002899 | 0.259657 | 466 | 14 | 66 | 33.285714 | 0.826087 | 0.060086 | 0 | 0 | 0 | 0 | 0.006865 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0.181818 | 0 | 0.272727 | 0 | 0 | 0 | 0 | null | 1 | 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 | 3 |
a239d91665c7248fe6c890e52a667518e7363190 | 121 | py | Python | data.py | yu961549745/tfnote | df21c414eecfd4e94dd0097f1d57dc2ff1546b70 | [
"MIT"
] | null | null | null | data.py | yu961549745/tfnote | df21c414eecfd4e94dd0097f1d57dc2ff1546b70 | [
"MIT"
] | null | null | null | data.py | yu961549745/tfnote | df21c414eecfd4e94dd0097f1d57dc2ff1546b70 | [
"MIT"
] | null | null | null | from tensorflow.examples.tutorials.mnist import input_data
data = input_data.read_data_sets("MNIST_data/", one_hot=True)
| 40.333333 | 61 | 0.834711 | 19 | 121 | 5 | 0.684211 | 0.189474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.066116 | 121 | 2 | 62 | 60.5 | 0.840708 | 0 | 0 | 0 | 0 | 0 | 0.090909 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
a2465c0b7415a6950c64687797b10b5274abc98d | 707 | py | Python | nonrelated_inlines/tests/settings.py | diegodirob/django-nonrelated-inlines | 3fef685cc84ea3148323260fd88697c909b545b4 | [
"MIT"
] | 17 | 2020-10-07T07:33:27.000Z | 2022-02-17T04:50:30.000Z | nonrelated_inlines/tests/settings.py | diegodirob/django-nonrelated-inlines | 3fef685cc84ea3148323260fd88697c909b545b4 | [
"MIT"
] | 1 | 2020-12-11T15:40:19.000Z | 2021-04-03T12:45:12.000Z | nonrelated_inlines/tests/settings.py | diegodirob/django-nonrelated-inlines | 3fef685cc84ea3148323260fd88697c909b545b4 | [
"MIT"
] | 8 | 2020-09-11T07:58:17.000Z | 2022-02-04T15:11:54.000Z | DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:'
}
}
SECRET_KEY = 'supersecret'
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'nonrelated_inlines.tests.testapp'
]
ROOT_URLCONF = 'nonrelated_inlines.tests.urls'
MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware'
]
TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,
}]
| 22.806452 | 65 | 0.687412 | 65 | 707 | 7.384615 | 0.6 | 0.216667 | 0.070833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001689 | 0.162659 | 707 | 30 | 66 | 23.566667 | 0.809122 | 0 | 0 | 0 | 0 | 0 | 0.640736 | 0.485149 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a2474995fc8c86ff6ab1143913d7983f54ec8c90 | 465 | py | Python | hassio-google-drive-backup/backup/model/__init__.py | voxipbx/hassio-addons | ddf2f1745f4240c2905f9f9d7616a927fb8934e4 | [
"MIT"
] | 1 | 2022-01-22T18:27:04.000Z | 2022-01-22T18:27:04.000Z | hassio-google-drive-backup/backup/model/__init__.py | voxipbx/hassio-addons | ddf2f1745f4240c2905f9f9d7616a927fb8934e4 | [
"MIT"
] | 19 | 2021-09-29T06:13:25.000Z | 2022-03-08T06:13:49.000Z | hassio-google-drive-backup/backup/model/__init__.py | voxipbx/hassio-addons | ddf2f1745f4240c2905f9f9d7616a927fb8934e4 | [
"MIT"
] | null | null | null | # flake8: noqa
from .backupscheme import GenerationalScheme, OldestScheme, GenConfig, BackupScheme
from .coordinator import Coordinator
from .model import BackupSource, BackupDestination, Model
from .syncer import Scyncer
from .backups import AbstractBackup, Backup
from .drivebackup import DriveBackup
from .dummybackup import DummyBackup
from .dummybackupsource import DummyBackupSource
from .habackup import HABackup
from .simulatedsource import SimulatedSource
| 38.75 | 83 | 0.855914 | 48 | 465 | 8.291667 | 0.458333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002404 | 0.105376 | 465 | 11 | 84 | 42.272727 | 0.954327 | 0.025806 | 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 | 1 | 0 | 0 | 3 |
a24e32edbb183ef01cf9d0fb4db7dab5b4b26cb6 | 69 | py | Python | beecrowd/extremamentebasico.py | mtsamorim/python | 88c08ee9be0d8f809a19ddf0ac5ee94e08587cb6 | [
"MIT"
] | null | null | null | beecrowd/extremamentebasico.py | mtsamorim/python | 88c08ee9be0d8f809a19ddf0ac5ee94e08587cb6 | [
"MIT"
] | null | null | null | beecrowd/extremamentebasico.py | mtsamorim/python | 88c08ee9be0d8f809a19ddf0ac5ee94e08587cb6 | [
"MIT"
] | null | null | null | num1 = int(input())
num2 = int(input())
print(f'X = {num1 + num2}')
| 13.8 | 27 | 0.565217 | 11 | 69 | 3.545455 | 0.636364 | 0.410256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.070175 | 0.173913 | 69 | 4 | 28 | 17.25 | 0.614035 | 0 | 0 | 0 | 0 | 0 | 0.246377 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0 | 0 | null | 1 | 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 | 3 |
a2596df4d7cf98f3fa2962ca83cf0ac228043316 | 85 | py | Python | houdini_manage/__init__.py | NiklasRosenstein/houdini-manage | cf6216cb914b97677a0831e490f9943eabed8d79 | [
"MIT"
] | 7 | 2018-02-01T05:41:25.000Z | 2020-04-03T08:37:05.000Z | houdini_manage/__init__.py | jonbjornn/houdini-manage | cf6216cb914b97677a0831e490f9943eabed8d79 | [
"MIT"
] | 1 | 2017-07-19T00:16:03.000Z | 2017-07-19T00:16:03.000Z | houdini_manage/__init__.py | jonbjornn/houdini-manage | cf6216cb914b97677a0831e490f9943eabed8d79 | [
"MIT"
] | 2 | 2020-02-02T09:57:26.000Z | 2020-02-14T10:16:45.000Z |
__author__ = 'Niklas Rosenstein <rosensteinniklas@gmail.com>'
__version__ = '1.0.0'
| 21.25 | 61 | 0.752941 | 10 | 85 | 5.6 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.039474 | 0.105882 | 85 | 3 | 62 | 28.333333 | 0.697368 | 0 | 0 | 0 | 0 | 0 | 0.607143 | 0.333333 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a27c675795d8aca03098ac13ac4cce453e6f99a5 | 2,045 | py | Python | tests/conftest.py | weilin2018/pyextremes | f68a5cba4f31a7170bfc02287d9ee0f7926b10bc | [
"MIT"
] | null | null | null | tests/conftest.py | weilin2018/pyextremes | f68a5cba4f31a7170bfc02287d9ee0f7926b10bc | [
"MIT"
] | null | null | null | tests/conftest.py | weilin2018/pyextremes | f68a5cba4f31a7170bfc02287d9ee0f7926b10bc | [
"MIT"
] | 1 | 2021-05-07T12:01:45.000Z | 2021-05-07T12:01:45.000Z | import pathlib
import pandas as pd
import pytest
root_directory = pathlib.Path(__file__).parent.resolve()
@pytest.fixture(scope="session")
def shared_data_folder() -> pathlib.Path:
return root_directory / "_shared_data"
@pytest.fixture(scope="function")
def battery_wl(shared_data_folder) -> pd.Series:
return (
pd.read_csv(
shared_data_folder / "battery_wl.csv",
index_col=0,
parse_dates=True,
squeeze=True,
)
.dropna()
.sort_index(ascending=True)
)
@pytest.fixture(scope="function")
def battery_wl_preprocessed(shared_data_folder) -> pd.Series:
ts = (
pd.read_csv(
shared_data_folder / "battery_wl.csv",
index_col=0,
parse_dates=True,
squeeze=True,
)
.dropna()
.sort_index(ascending=True)
)
ts = ts.loc[ts.index.year >= 1925]
slr = (
(ts.index.array - pd.to_datetime("1992-01-01"))
/ pd.to_timedelta("1Y")
* 2.87e-3
)
ts -= slr
return ts
@pytest.fixture(scope="function")
def extremes_bm_high(shared_data_folder) -> pd.Series:
return pd.read_csv(
shared_data_folder / "extremes_bm_high.csv",
index_col=0,
parse_dates=True,
squeeze=True,
)
@pytest.fixture(scope="function")
def extremes_bm_low(shared_data_folder) -> pd.Series:
return pd.read_csv(
shared_data_folder / "extremes_bm_high.csv",
index_col=0,
parse_dates=True,
squeeze=True,
)
@pytest.fixture(scope="function")
def extremes_pot_high(shared_data_folder) -> pd.Series:
return pd.read_csv(
shared_data_folder / "extremes_pot_high.csv",
index_col=0,
parse_dates=True,
squeeze=True,
)
@pytest.fixture(scope="function")
def extremes_pot_low(shared_data_folder) -> pd.Series:
return pd.read_csv(
shared_data_folder / "extremes_pot_low.csv",
index_col=0,
parse_dates=True,
squeeze=True,
)
| 23.238636 | 61 | 0.622005 | 257 | 2,045 | 4.649805 | 0.22179 | 0.117155 | 0.174059 | 0.130544 | 0.771548 | 0.751464 | 0.751464 | 0.653556 | 0.653556 | 0.622594 | 0 | 0.015222 | 0.261125 | 2,045 | 87 | 62 | 23.505747 | 0.775645 | 0 | 0 | 0.535211 | 0 | 0 | 0.091932 | 0.010269 | 0 | 0 | 0 | 0 | 0 | 1 | 0.098592 | false | 0 | 0.042254 | 0.084507 | 0.239437 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 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 | 3 |
a288a4eddb23a7c6de4d6837386bb803fa62054f | 148 | py | Python | TopQuarkAnalysis/Configuration/python/patRefSel_outputModule_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | TopQuarkAnalysis/Configuration/python/patRefSel_outputModule_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | TopQuarkAnalysis/Configuration/python/patRefSel_outputModule_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from TopQuarkAnalysis.Configuration.patRefSel_outputModule_cfi import out
outpath = cms.EndPath(
out
)
| 18.5 | 73 | 0.831081 | 18 | 148 | 6.722222 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.114865 | 148 | 7 | 74 | 21.142857 | 0.923664 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
a29859f5c9a41883d2ab83ed3a243833e393887b | 236 | py | Python | examples/webExample/server.py | isthisgood/ofxXmlGui | 0f470b10348c8eae09891dca50931cc7aab8ffc9 | [
"MIT"
] | 7 | 2015-03-15T11:59:02.000Z | 2020-01-15T22:21:29.000Z | examples/webExample/server.py | isthisgood/ofxXmlGui | 0f470b10348c8eae09891dca50931cc7aab8ffc9 | [
"MIT"
] | null | null | null | examples/webExample/server.py | isthisgood/ofxXmlGui | 0f470b10348c8eae09891dca50931cc7aab8ffc9 | [
"MIT"
] | 1 | 2018-07-16T11:22:41.000Z | 2018-07-16T11:22:41.000Z | import BaseHTTPServer
import cgi, random, sys
import SimpleHTTPServer
import os
PORT = 8000
httpd = BaseHTTPServer.HTTPServer(("", PORT), SimpleHTTPServer.SimpleHTTPRequestHandler)
print "Serving at port", PORT
httpd.serve_forever()
| 19.666667 | 88 | 0.800847 | 26 | 236 | 7.230769 | 0.653846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019139 | 0.114407 | 236 | 11 | 89 | 21.454545 | 0.880383 | 0 | 0 | 0 | 0 | 0 | 0.063559 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.5 | null | null | 0.125 | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
a2b2c814b1b6b47797cf2b70565767f6797ecd87 | 70 | py | Python | scripts/quest/q53445s.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | scripts/quest/q53445s.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | scripts/quest/q53445s.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | # All-Seer (53445)
sm.startQuest(parentID)
sm.completeQuest(parentID) | 17.5 | 26 | 0.785714 | 9 | 70 | 6.111111 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 0.071429 | 70 | 4 | 26 | 17.5 | 0.769231 | 0.228571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a2d4e8c4f0919fed4da4c2cd6aefdb5cb1902d78 | 852 | py | Python | nxmetis/metis.py | sclable/networkx-metis | 34398b7046d71b62c5bd3b90b35f4fe02fb5abc7 | [
"Apache-2.0"
] | 69 | 2015-05-23T16:24:37.000Z | 2022-03-14T14:04:08.000Z | nxmetis/metis.py | sclable/networkx-metis | 34398b7046d71b62c5bd3b90b35f4fe02fb5abc7 | [
"Apache-2.0"
] | 68 | 2015-05-23T14:16:14.000Z | 2021-10-11T10:59:47.000Z | nxmetis/metis.py | sclable/networkx-metis | 34398b7046d71b62c5bd3b90b35f4fe02fb5abc7 | [
"Apache-2.0"
] | 25 | 2015-05-23T05:58:34.000Z | 2022-03-09T17:31:55.000Z | """
This module is a wrapper of the ``_metis`` extension generated
from ``_metis.pyx``. This is to let sphinx import the module for
documentation builds with or without the ``_metis`` extension.
"""
try:
from nxmetis import _metis
except ImportError:
def node_nd(*args, **kwargs):
raise Exception("NetworkX-METIS not installed!")
def part_graph(*args, **kwargs):
raise Exception("NetworkX-METIS not installed!")
def compute_vertex_separator(*args, **kwargs):
raise Exception("NetworkX-METIS not installed!")
def set_default_options(*args, **kwargs):
raise Exception("NetworkX-METIS not installed!")
else:
node_nd = _metis.node_nd
part_graph = _metis.part_graph
compute_vertex_separator = _metis.compute_vertex_separator
set_default_options = _metis.set_default_options
| 34.08 | 68 | 0.711268 | 108 | 852 | 5.37037 | 0.416667 | 0.068966 | 0.103448 | 0.165517 | 0.353448 | 0.353448 | 0.353448 | 0.353448 | 0.268966 | 0 | 0 | 0 | 0.190141 | 852 | 24 | 69 | 35.5 | 0.84058 | 0.223005 | 0 | 0.25 | 1 | 0 | 0.180685 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.125 | 0 | 0.375 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a2e3e0144791eaa87dbc04d153a2cbfec515248e | 49,625 | py | Python | authnzerver/actions/email.py | waqasbhatti/authnzerver | d40fa38601f4f11e966fc52e11ad6fe1116bb145 | [
"MIT"
] | 3 | 2019-06-02T12:57:08.000Z | 2020-04-01T14:00:12.000Z | authnzerver/actions/email.py | waqasbhatti/authnzerver | d40fa38601f4f11e966fc52e11ad6fe1116bb145 | [
"MIT"
] | 7 | 2020-03-17T21:55:41.000Z | 2020-07-07T22:58:48.000Z | authnzerver/actions/email.py | waqasbhatti/authnzerver | d40fa38601f4f11e966fc52e11ad6fe1116bb145 | [
"MIT"
] | 2 | 2020-03-04T06:56:27.000Z | 2020-03-24T08:39:11.000Z | # -*- coding: utf-8 -*-
# actions_email.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Aug 2018
# License: MIT - see the LICENSE file for the full text.
"""This contains functions to drive email-related auth actions.
"""
#############
## LOGGING ##
#############
import logging
# get a logger
LOGGER = logging.getLogger(__name__)
#############
## IMPORTS ##
#############
try:
from datetime import datetime, timezone, timedelta
utc = timezone.utc
except Exception:
from datetime import datetime, timedelta, tzinfo
ZERO = timedelta(0)
class UTC(tzinfo):
"""UTC"""
def utcoffset(self, dt):
return ZERO
def tzname(self, dt):
return "UTC"
def dst(self, dt):
return ZERO
utc = UTC()
import multiprocessing as mp
from email.mime.text import MIMEText
from email.utils import formatdate, make_msgid
import smtplib
import time
import re
import textwrap
from sqlalchemy import select
from .. import authdb
from .session import auth_session_exists
from ..permissions import pii_hash
from ..validators import validate_email_address
from .email_templates import (
SIGNUP_VERIFICATION_EMAIL_SUBJECT,
SIGNUP_VERIFICATION_EMAIL_TEMPLATE,
FORGOTPASS_VERIFICATION_EMAIL_SUBJECT,
FORGOTPASS_VERIFICATION_EMAIL_TEMPLATE
)
####################
## SENDING EMAILS ##
####################
def send_email(
sender,
subject,
text,
recipients,
server,
user,
password,
pii_salt,
bcc=False,
port=587
):
"""
This is a utility function to send email.
Parameters
----------
sender : str
The name and email address of the entity sending the email in the
following form::
"Sender Name <senderemail@example.com>"
subject : str
The subject of the email.
text : str
The text of the email.
recipients : list of str
A list of the email addresses to send the email to. Use either of the
formats below for each email address::
"Recipient Name <recipient@example.com>"
"recipient@example.com"
server : str
The address of the email server to use.
user : str
The username to use when logging into the email server via SMTP.
password : str
The password to use when logging into the email server via SMTP.
pii_salt : str
The PII salt value passed in from a wrapping function. Used to censor
personally identifying information in the logs emitted from this
function.
bcc : bool or list of str
If True, will set the To: field in the email itself to
"undisclosed-recipients" and send the email to all recipients such that
none of them know who the message was sent to (effectively BCCs all the
recipients). If this is set to a list of email addresses in RFC822
format as strings, will only BCC those email addresses. If this is set
to False, the To: field in the email itself will contain the addresses
of all recipients.
port : int
The SMTP port to use when logging into the email server via SMTP.
Returns
-------
sent_ok : bool
Returns True if email sending succeeded. False otherwise.
"""
# validate the sender's email address
if '<' in sender and '>' in sender:
sender_email = re.findall(r'<(\S+)>', sender)
if not sender_email:
LOGGER.error("Invalid sender email address. Can't send this email.")
return False
else:
sender_email = sender_email[0]
else:
sender_email = sender
valid_sender_email = validate_email_address(sender_email)
if not valid_sender_email:
LOGGER.error("Invalid sender email address. Can't send this email.")
return False
# remove all newlines from the subject, the sender's email address,
# and all the recipient email address to prevent header injection attacks
cleaned_sender = sender.replace('\n', '')
cleaned_subject = subject.replace('\n', '')
cleaned_recipients = [x.replace('\n', '') for x in recipients]
# validate the recipients' email addresses
validated_recipients = []
for recipient in cleaned_recipients:
if '<' in recipient and '>' in recipient:
recipient_email = re.findall(r'<(\S+)>', recipient)
if recipient_email:
recipient_email = recipient_email[0]
else:
LOGGER.warning(
"Recipient email address: %s is not valid, skipping..." %
pii_hash(recipient, pii_salt)
)
continue
else:
recipient_email = recipient
recipient_email_valid = validate_email_address(recipient_email)
if not recipient_email_valid:
LOGGER.warning(
"Recipient email address: %s not valid, skipping..." %
pii_hash(recipient, pii_salt)
)
else:
validated_recipients.append(recipient)
if not validated_recipients:
LOGGER.error("No valid recipients found for this email.")
return False
#
# construct the message
#
msg = MIMEText(text)
msg['From'] = cleaned_sender
msg['To'] = ', '.join(recipients)
msg['Message-Id'] = make_msgid()
msg['Subject'] = cleaned_subject
msg['Date'] = formatdate(time.time())
msg['Sender'] = sender_email
#
# handle the BCC kwarg
#
# if everyone is to be BCCed, remove all the recipients from the "To: "
# field
if bcc is True:
msg['To'] = "undisclosed-recipients"
# if there are specific people who need to be BCCed, clean their addresses,
# validate them, and then add them to the validated_recipients list
elif isinstance(bcc, (list, tuple)):
for bcc_recipient in bcc:
cleaned_bcc_recipient = bcc_recipient.replace('\n', '')
if '<' in cleaned_bcc_recipient and '>' in cleaned_bcc_recipient:
bcc_recipient_email = re.findall(r'<(\S+)>',
cleaned_bcc_recipient)
if bcc_recipient_email:
bcc_recipient_email = bcc_recipient_email[0]
else:
LOGGER.warning(
"BCC email address: %s is not valid, skipping..." %
pii_hash(bcc_recipient, pii_salt)
)
continue
else:
bcc_recipient_email = cleaned_bcc_recipient
bcc_email_valid = validate_email_address(bcc_recipient_email)
if not bcc_email_valid:
LOGGER.warning(
"BCC email address: %s not valid, skipping..." %
pii_hash(bcc_recipient, pii_salt)
)
else:
validated_recipients.append(cleaned_bcc_recipient)
#
# finally, send the emails
#
# next, we'll try to login to the SMTP server
try:
server = smtplib.SMTP(server, port)
server.ehlo()
if server.has_extn('STARTTLS'):
# try to send the email
try:
server.starttls()
server.ehlo()
if (server.has_extn('AUTH') and
user is not None and
password is not None):
server.login(
user,
password
)
server.sendmail(
cleaned_sender,
validated_recipients,
msg.as_string()
)
server.quit()
return True
# if it fails, bail out
except Exception as e:
LOGGER.error(
"Could not send the email to recipients: %s "
"with subject: %s because of an exception: %r"
% (', '.join([pii_hash(x, pii_salt) for x in recipients]),
subject, e)
)
server.quit()
return False
else:
LOGGER.error('Email server: %s does not support STARTTLS, '
'refusing to send an insecure email.' % server)
server.quit()
return False
except Exception as e:
LOGGER.error(
"Could not send the email to recipients: %s "
"with subject: %s because of an exception: %r"
% (', '.join([pii_hash(x, pii_salt) for x in recipients]),
subject, e)
)
try:
server.quit()
except Exception:
pass
return False
def send_signup_verification_email(payload,
raiseonfail=False,
override_authdb_path=None,
config=None):
"""Sends an account verification email.
Parameters
-----------
payload : dict
Keys expected in this dict from a client are:
- email_address: str, the email address to send the email to
- session_token: str, session token of the user being sent the email
- created_info: dict, the dict returned by ``users.auth_create_user()``
- server_name: str, the name of the frontend server
- server_baseurl: str, the base URL of the frontend server
- account_verify_url: str, the URL fragment of the frontend verification
endpoint
- verification_token: str, a verification token generated by frontend
- verification_expiry: int, number of seconds after which the token
expires
In addition, the following optional items must be provided by a wrapper
function to set up the email server.
- emailuser
- emailpass
- emailserver
- emailport
- emailsender
These can be provided as part of the payload as dict keys or as
attributes in the SimpleNamespace object passed in the config kwarg. The
config object will be checked first, and the payload items will override
it.
Finally, the payload must also include the following keys (usually added
in by a wrapping function):
- reqid: int or str
- pii_salt: str
override_authdb_path : str or None
If given as a str, is the alternative path to the auth DB.
raiseonfail : bool
If True, will raise an Exception if something goes wrong.
config : SimpleNamespace object or None
An object containing systemwide config variables as attributes. This is
useful when the wrapping function needs to pass in some settings
directly from environment variables.
Returns
-------
dict
Returns a dict containing the user_id, email_address, and the
emailverify_sent_datetime value if email was sent successfully.
"""
for key in ('reqid', 'pii_salt'):
if key not in payload:
LOGGER.error(
"Missing %s in payload dict. Can't process this request." % key
)
return {
'success': False,
'failure_reason': (
"invalid request: missing '%s' in request" % key
),
'user_id': None,
'email_address': None,
'emailverify_sent_datetime': None,
'messages': ["Invalid verify email request."],
}
for key in ('email_address',
'session_token',
'server_name',
'server_baseurl',
'account_verify_url',
'verification_token',
'verification_expiry',
'created_info'):
if key not in payload:
LOGGER.error(
'[%s] Invalid verify email request, missing %s.' %
(payload['reqid'], key)
)
return {
'success': False,
'failure_reason': (
"invalid request: missing '%s' in request" % key
),
'user_id': None,
'email_address': None,
'emailverify_sent_datetime': None,
'messages': ([
"Invalid verify email request."
])
}
# now check for the SMTP server config items in the payload or in config
if config is not None:
emailsender = getattr(config, "emailsender", None)
emailuser = getattr(config, "emailuser", None)
emailpass = getattr(config, "emailpass", None)
emailserver = getattr(config, "emailserver", None)
emailport = getattr(config, "emailport", None)
else:
emailsender, emailuser, emailpass, emailserver, emailport = (
None, None, None, None, None
)
# override with payload values
if 'emailsender' in payload:
emailsender = payload['emailsender']
if 'emailuser' in payload:
emailuser = payload['emailuser']
if 'emailpass' in payload:
emailpass = payload['emailpass']
if 'emailserver' in payload:
emailserver = payload['emailserver']
if 'emailport' in payload:
emailport = payload['emailport']
if (emailsender is None or
emailserver is None or
emailport is None):
LOGGER.error(
"[%s] Invalid email server settings "
"provided. Can't send an email." %
payload['reqid']
)
return {
'success': False,
'failure_reason': (
"invalid request: missing 'emailsender', "
"'emailserver', or 'emailport' in request"
),
'user_id': None,
'email_address': None,
'emailverify_sent_datetime': None,
'messages': ([
"Invalid email server settings provided. Can't send an email."
])
}
# check if we don't need to send an email to this user
if payload['created_info']['send_verification'] is False:
LOGGER.error(
'[%s] Verify email request failed for '
'user_id: %s, email: %s, session_token: %s.'
'Not allowed to send a verification email to this user.' %
(payload['reqid'],
pii_hash(payload['created_info']['user_id'], payload['pii_salt']),
pii_hash(payload['email_address'], payload['pii_salt']),
pii_hash(payload['session_token'], payload['pii_salt']))
)
return {
'success': False,
'failure_reason': (
"not allowed to send verification email to target user, "
"send_verification = False"
),
'user_id': None,
'email_address': None,
'emailverify_sent_datetime': None,
'messages': ([
"Not allowed to send an email verification request."
])
}
# this checks if the database connection is live
currproc = mp.current_process()
engine = getattr(currproc, 'authdb_engine', None)
if override_authdb_path:
currproc.auth_db_path = override_authdb_path
if not engine:
currproc.authdb_engine, currproc.authdb_conn, currproc.authdb_meta = (
authdb.get_auth_db(
currproc.auth_db_path,
echo=raiseonfail
)
)
users = currproc.authdb_meta.tables['users']
# first, we'll verify the user was created successfully, their account is
# currently set to inactive and their role is 'locked'. then, we'll verify
# if the session token provided exists and get the IP address and the
# browser identifier out of it.
# look up the provided user
user_sel = select([
users.c.user_id,
users.c.email,
users.c.is_active,
users.c.user_role,
]).select_from(users).where(
users.c.email == payload['email_address']
).where(
users.c.user_id == payload['created_info']['user_id']
)
user_results = currproc.authdb_conn.execute(user_sel)
user_info = user_results.fetchone()
user_results.close()
if not user_info:
LOGGER.error(
'[%s] Verify email request failed for '
'user_id: %s, email: %s, session_token: %s.'
'The specified user does not exist.' %
(payload['reqid'],
pii_hash(payload['created_info']['user_id'], payload['pii_salt']),
pii_hash(payload['email_address'], payload['pii_salt']),
pii_hash(payload['session_token'], payload['pii_salt']))
)
return {
'success': False,
'failure_reason': (
"target user for verification email does not exist"
),
'user_id': None,
'email_address': None,
'emailverify_sent_datetime': None,
'messages': ([
"Invalid verify email request."
])
}
if user_info['is_active'] or user_info['user_role'] != 'locked':
LOGGER.error(
'[%s] Verify email request failed for '
'user_id: %s, email: %s, session_token: %s.'
'The specified user is already active and '
'does not need a verification email.' %
(payload['reqid'],
pii_hash(payload['created_info']['user_id'], payload['pii_salt']),
pii_hash(payload['email_address'], payload['pii_salt']),
pii_hash(payload['session_token'], payload['pii_salt']))
)
return {
'success': False,
'failure_reason': (
"target user for verification email already active and verified"
),
'user_id': None,
'email_address': None,
'emailverify_sent_datetime': None,
'messages': ([
"Not sending an verify email request to an existing user."
])
}
# check the session
session_info = auth_session_exists(
{'session_token': payload['session_token'],
'pii_salt': payload['pii_salt'],
'reqid': payload['reqid']},
raiseonfail=raiseonfail,
override_authdb_path=override_authdb_path
)
if not session_info['success']:
LOGGER.error(
'[%s] Verify email request failed for '
'user_id: %s, email: %s, session_token: %s.'
'The session requesting a verify email is not valid.' %
(payload['reqid'],
pii_hash(payload['created_info']['user_id'], payload['pii_salt']),
pii_hash(payload['email_address'], payload['pii_salt']),
pii_hash(payload['session_token'], payload['pii_salt']))
)
return {
'success': False,
'failure_reason': (
"invalid session for requesting a verification email"
),
'user_id': None,
'email_address': None,
'emailverify_sent_datetime': None,
'messages': ([
"Invalid verify email request."
])
}
# get the IP address and browser ID from the session
ip_addr = session_info['session_info']['ip_address']
browser = session_info['session_info']['user_agent']
# TODO: we'll use geoip to get the location of the person who initiated the
# request.
# get the verification token's expiry datetime
verification_expiry_td = timedelta(seconds=payload['verification_expiry'])
verification_expiry_dt = (
datetime.utcnow() + verification_expiry_td
).isoformat()
# format the verification token and wrap it to 70 chars per line because now
# it's a bit too long for one line. we'll use a textbox on the verification
# page to let people to paste this in
if isinstance(payload['verification_token'], bytes):
payload['verification_token'] = (
payload['verification_token'].decode('utf-8')
)
formatted_verification_token = '\n'.join(
textwrap.wrap(payload['verification_token'])
)
# generate the email message
msgtext = SIGNUP_VERIFICATION_EMAIL_TEMPLATE.format(
server_baseurl=payload['server_baseurl'],
server_name=payload['server_name'],
account_verify_url=payload['account_verify_url'],
verification_code=formatted_verification_token,
verification_expiry='%s (UTC time)' % verification_expiry_dt,
browser_identifier=browser.replace('_', '.'),
ip_address=ip_addr,
user_email=payload['email_address'],
)
recipients = [user_info['email']]
subject = SIGNUP_VERIFICATION_EMAIL_SUBJECT.format(
server_name=payload['server_name']
)
# send the email
email_sent = send_email(
emailsender,
subject,
msgtext,
recipients,
emailserver,
emailuser,
emailpass,
payload['pii_salt'],
port=emailport
)
if email_sent:
emailverify_sent_datetime = datetime.utcnow()
# finally, we'll update the users table with the actual
# emailverify_sent_datetime if sending succeeded.
upd = users.update(
).where(
users.c.user_id == payload['created_info']['user_id']
).where(
users.c.is_active.is_(False)
).where(
users.c.email == payload['created_info']['user_email']
).values({
'emailverify_sent_datetime': emailverify_sent_datetime,
})
result = currproc.authdb_conn.execute(upd)
result.close()
LOGGER.info(
'[%s] Verify email request succeeded for '
'user_id: %s, email: %s, session_token: %s. '
'Email sent on: %s UTC.' %
(payload['reqid'],
pii_hash(payload['created_info']['user_id'], payload['pii_salt']),
pii_hash(payload['email_address'], payload['pii_salt']),
pii_hash(payload['session_token'], payload['pii_salt']),
emailverify_sent_datetime.isoformat())
)
return {
'success': True,
'user_id': user_info['user_id'],
'email_address': user_info['email'],
'emailverify_sent_datetime': emailverify_sent_datetime,
'messages': ([
"Verify email sent successfully."
])
}
else:
LOGGER.error(
'[%s] Verify email request failed for '
'user_id: %s, email: %s, session_token: %s.'
'The email server could not send the email '
'to the specified address.' %
(payload['reqid'],
pii_hash(payload['created_info']['user_id'], payload['pii_salt']),
pii_hash(payload['email_address'], payload['pii_salt']),
pii_hash(payload['session_token'], payload['pii_salt']))
)
return {
'success': False,
'failure_reason': (
"verification email could not be sent "
"because of an email server problem"
),
'user_id': None,
'email_address': None,
'emailverify_sent_datetime': None,
'messages': ([
"Could not send email for the verify email request."
])
}
def set_user_emailaddr_verified(payload,
raiseonfail=False,
override_authdb_path=None,
config=None):
"""Sets the verification status of the email address of the user.
This is called by the frontend after it verifies that the token challenge to
verify the user's email succeeded and has not yet expired. This will set the
user_role to 'authenticated' (or the previous user role before locking) and
the is_active column to True.
Parameters
----------
payload : dict
This is a dict with the following key:
- email
Finally, the payload must also include the following keys (usually added
in by a wrapping function):
- reqid: int or str
- pii_salt: str
override_authdb_path : str or None
If given as a str, is the alternative path to the auth DB.
raiseonfail : bool
If True, will raise an Exception if something goes wrong.
config : SimpleNamespace object or None
An object containing systemwide config variables as attributes. This is
useful when the wrapping function needs to pass in some settings
directly from environment variables.
Returns
-------
dict
Returns a dict containing the user_id, is_active, and user_role values
if verification status is successfully set.
"""
for key in ('reqid', 'pii_salt'):
if key not in payload:
LOGGER.error(
"Missing %s in payload dict. Can't process this request." % key
)
return {
'success': False,
'failure_reason': (
"invalid request: missing '%s' in request" % key
),
'user_id': None,
'is_active': False,
'user_role': 'locked',
'messages': ["Invalid email verification toggle request."],
}
if 'email' not in payload:
LOGGER.error(
'[%s] Invalid email verification toggle request, missing %s.' %
(payload['reqid'], 'email')
)
return {
'success': False,
'failure_reason': (
"invalid request: missing '%s' in request" % 'email'
),
'user_id': None,
'is_active': False,
'user_role': 'locked',
'messages': ["Invalid email verification toggle request."]
}
# this checks if the database connection is live
currproc = mp.current_process()
engine = getattr(currproc, 'authdb_engine', None)
if override_authdb_path:
currproc.auth_db_path = override_authdb_path
if not engine:
currproc.authdb_engine, currproc.authdb_conn, currproc.authdb_meta = (
authdb.get_auth_db(
currproc.auth_db_path,
echo=raiseonfail
)
)
users = currproc.authdb_meta.tables['users']
sel = select(
[users.c.user_id, users.c.user_role, users.c.extra_info]
).select_from(
users
).where(
users.c.email == payload["email"]
)
result = currproc.authdb_conn.execute(sel)
row = result.first()
if row is None:
LOGGER.error(
'[%s] Email verification toggle request failed for '
'email: %s.'
'The database rows corresponding to '
'the user do not exist.' %
(payload['reqid'],
pii_hash(payload['email'], payload['pii_salt']))
)
return {
'success': False,
'failure_reason': (
"could not find user in DB by email"
),
'user_id': None,
'is_active': False,
'user_role': 'locked',
'messages': ["Email verification toggle request failed."]
}
#
# get the previous user_role if any
#
current_user_role = row["user_role"]
user_extra_info = row["extra_info"]
previous_user_roles = user_extra_info.get("previous_user_roles",
["locked"])
if current_user_role != "locked":
user_role_to_set = current_user_role
elif previous_user_roles[-1] != "locked":
user_role_to_set = previous_user_roles[-1]
else:
user_role_to_set = "authenticated"
# update the table for this user
upd = users.update(
).where(
users.c.is_active.is_(False)
).where(
users.c.email == payload['email']
).values({
'is_active': True,
'email_verified': True,
'user_role': user_role_to_set
})
currproc.authdb_conn.execute(upd)
sel = select([
users.c.user_id,
users.c.is_active,
users.c.user_role,
]).select_from(users).where(
(users.c.email == payload['email'])
)
result = currproc.authdb_conn.execute(sel)
rows = result.fetchone()
result.close()
if rows:
LOGGER.info(
'[%s] Email verification toggle request succeeded for '
'user_id: %s, email: %s, role: %s, is_active: %s.' %
(payload['reqid'],
pii_hash(rows['user_id'], payload['pii_salt']),
pii_hash(payload['email'], payload['pii_salt']),
rows['user_role'],
rows['is_active'])
)
return {
'success': True,
'user_id': rows['user_id'],
'is_active': rows['is_active'],
'user_role': rows['user_role'],
'messages': ["Email verification toggle request succeeded."]
}
else:
LOGGER.error(
'[%s] Email verification toggle request failed for '
'email: %s.'
'The database rows corresponding to '
'the user could not be updated.' %
(payload['reqid'],
pii_hash(payload['email'], payload['pii_salt']))
)
return {
'success': False,
'failure_reason': (
"could not update user verified status in DB"
),
'user_id': None,
'is_active': False,
'user_role': 'locked',
'messages': ["Email verification toggle request failed."]
}
def set_user_email_sent(payload,
raiseonfail=False,
override_authdb_path=None,
config=None):
"""Sets the verify/forgot email sent flag & time for the newly created user.
This is useful when some other way of emailing the user to verify their sign
up or their password forgot request is used, external to authnzerver. Use
this function to let the authnzerver know that an email has been sent so it
knows the correct move if someone tries to sign up for an account with the
same email address later.
Parameters
----------
payload : dict
This is a dict with the following key:
- email, str
- email_type, str: one of "signup", "forgotpass"
Finally, the payload must also include the following keys (usually added
in by a wrapping function):
- reqid: int or str
- pii_salt: str
override_authdb_path : str or None
If given as a str, is the alternative path to the auth DB.
raiseonfail : bool
If True, will raise an Exception if something goes wrong.
config : SimpleNamespace object or None
An object containing systemwide config variables as attributes. This is
useful when the wrapping function needs to pass in some settings
directly from environment variables.
Returns
-------
dict
Returns a dict containing the email address and
email*_sent_datetime values if the sent-email notification was
successfully set.
"""
for key in ('reqid', 'pii_salt'):
if key not in payload:
LOGGER.error(
"Missing %s in payload dict. Can't process this request." % key
)
return {
'success': False,
'failure_reason': (
"invalid request: missing '%s' in request" % key
),
'messages': ["Invalid email sent notification request."],
}
for key in ('email', 'email_type'):
if key not in payload:
LOGGER.error(
'[%s] Invalid email sent notification request, missing %s.' %
(payload['reqid'], key)
)
return {
'success': False,
'failure_reason': (
"invalid request: missing '%s' in request" % key
),
'messages': ["Invalid email sent notification request."]
}
# this checks if the database connection is live
currproc = mp.current_process()
engine = getattr(currproc, 'authdb_engine', None)
if override_authdb_path:
currproc.auth_db_path = override_authdb_path
if not engine:
currproc.authdb_engine, currproc.authdb_conn, currproc.authdb_meta = (
authdb.get_auth_db(
currproc.auth_db_path,
echo=raiseonfail
)
)
users = currproc.authdb_meta.tables['users']
email_sent_datetime = datetime.utcnow()
if payload["email_type"] == "signup":
update_col = "emailverify_sent_datetime"
elif payload["email_type"] == "forgotpass":
update_col = "emailforgotpass_sent_datetime"
else:
LOGGER.error(
'[%s] Invalid email sent notification request, '
'incorrect email_type.' % payload['reqid']
)
return {
'success': False,
'failure_reason': (
"invalid request: invalid email_type requested"
),
'messages': ["Invalid email sent notification request."]
}
# update the table for this user
upd = users.update(
).where(
users.c.email == payload['email']
).values({
update_col: email_sent_datetime,
})
currproc.authdb_conn.execute(upd)
sel = select([
users.c.user_id,
users.c.is_active,
users.c.user_role,
users.c.email,
users.c.emailverify_sent_datetime,
users.c.emailforgotpass_sent_datetime,
]).select_from(users).where(
(users.c.email == payload['email'])
)
result = currproc.authdb_conn.execute(sel)
rows = result.fetchone()
result.close()
if rows:
LOGGER.info(
'[%s] Email sent notification request succeeded for '
'user_id: %s, email: %s, role: %s, is_active: %s.' %
(payload['reqid'],
pii_hash(rows['user_id'], payload['pii_salt']),
pii_hash(payload['email'], payload['pii_salt']),
pii_hash(rows['user_role'], payload['pii_salt']),
rows['is_active'])
)
return {
'success': True,
'email': rows['email'],
'emailverify_sent_datetime': rows['emailverify_sent_datetime'],
'emailforgotpass_sent_datetime': (
rows['emailforgotpass_sent_datetime']
),
'user_id': rows['user_id'],
'is_active': rows['is_active'],
'user_role': rows['user_role'],
'messages': ["Email sent notification request succeeded."]
}
else:
LOGGER.error(
'[%s] Email sent notification request failed for '
'email: %s.'
'The database rows corresponding to '
'the user could not be updated.' %
(payload['reqid'],
pii_hash(rows['user_id'], payload['pii_salt']))
)
return {
'success': False,
'failure_reason': (
"could not update the email sent status in DB"
),
'messages': ["Email sent notification request failed."]
}
##############################
## FORGOT PASSWORD HANDLING ##
##############################
def send_forgotpass_verification_email(payload,
raiseonfail=False,
override_authdb_path=None,
config=None):
"""This actually sends the forgot password email.
Parameters
-----------
payload : dict
Keys expected in this dict from a client are:
- email_address: str, the email address to send the email to
- session_token: str, session token of the user being sent the email
- server_name: str, the name of the frontend server
- server_baseurl: str, the base URL of the frontend server
- password_forgot_url: str, the URL fragment of the frontend
forgot-password process initiation endpoint
- verification_token: str, a verification token generated by frontend
- verification_expiry: int, number of seconds after which the token
expires
In addition, the following items must be provided by a wrapper function
to set up the email server.
- emailuser
- emailpass
- emailserver
- emailport
- emailsender
These can be provided as part of the payload as dict keys or as
attributes in the SimpleNamespace object passed in the config kwarg. The
config object will be checked first, and the payload items will override
it.
Finally, the payload must also include the following keys (usually added
in by a wrapping function):
- reqid: int or str
- pii_salt: str
override_authdb_path : str or None
If given as a str, is the alternative path to the auth DB.
raiseonfail : bool
If True, will raise an Exception if something goes wrong.
config : SimpleNamespace object or None
An object containing systemwide config variables as attributes. This is
useful when the wrapping function needs to pass in some settings
directly from environment variables.
Returns
-------
dict
Returns a dict containing the user_id, email_address, and the
emailforgotpass_sent_datetime value if email was sent successfully.
"""
for key in ('reqid', 'pii_salt'):
if key not in payload:
LOGGER.error(
"Missing %s in payload dict. Can't process this request." % key
)
return {
'success': False,
'failure_reason': (
"invalid request: missing '%s' in request" % key
),
'user_id': None,
'email_address': None,
'emailforgotpass_sent_datetime': None,
'messages': ["Invalid forgot-password email request."],
}
for key in ('email_address',
'session_token',
'server_name',
'server_baseurl',
'password_forgot_url',
'verification_token',
'verification_expiry'):
if key not in payload:
LOGGER.error(
'[%s] Invalid forgot-password request, missing %s.' %
(payload['reqid'], key)
)
return {
'success': False,
'failure_reason': (
"invalid request: missing '%s' in request" % key
),
'user_id': None,
'email_address': None,
'emailforgotpass_sent_datetime': None,
'messages': ([
"Invalid forgot-password email request."
])
}
# now check for the SMTP server config items in the payload or in config
if config is not None:
emailsender = getattr(config, "emailsender", None)
emailuser = getattr(config, "emailuser", None)
emailpass = getattr(config, "emailpass", None)
emailserver = getattr(config, "emailserver", None)
emailport = getattr(config, "emailport", None)
else:
emailsender, emailuser, emailpass, emailserver, emailport = (
None, None, None, None, None
)
# override with payload values
if 'emailsender' in payload:
emailsender = payload['emailsender']
if 'emailuser' in payload:
emailuser = payload['emailuser']
if 'emailpass' in payload:
emailpass = payload['emailpass']
if 'emailserver' in payload:
emailserver = payload['emailserver']
if 'emailport' in payload:
emailport = payload['emailport']
if (emailsender is None or
emailserver is None or
emailport is None):
LOGGER.error(
"[%s] Invalid email server settings "
"provided. Can't send an email." %
payload['reqid']
)
return {
'success': False,
'failure_reason': (
"missing 'emailserver', 'emailsender', 'emailport' in request"
),
'user_id': None,
'email_address': None,
'emailforgotpass_sent_datetime': None,
'messages': ([
"Invalid email server settings provided. Can't send an email."
])
}
# this checks if the database connection is live
currproc = mp.current_process()
engine = getattr(currproc, 'authdb_engine', None)
if override_authdb_path:
currproc.auth_db_path = override_authdb_path
if not engine:
currproc.authdb_engine, currproc.authdb_conn, currproc.authdb_meta = (
authdb.get_auth_db(
currproc.auth_db_path,
echo=raiseonfail
)
)
users = currproc.authdb_meta.tables['users']
user_sel = select([
users.c.user_id,
users.c.email,
users.c.is_active,
users.c.user_role,
users.c.emailforgotpass_sent_datetime,
]).select_from(users).where(
users.c.email == payload['email_address']
).where(
users.c.is_active.is_(True)
).where(
users.c.user_role != 'locked'
).where(
users.c.user_role != 'anonymous'
)
user_results = currproc.authdb_conn.execute(user_sel)
user_info = user_results.fetchone()
user_results.close()
if not user_info:
LOGGER.error(
"[%s] Forgot-password email request failed for "
"email: %s, session_token: %s."
"User matching the provided email address "
"doesn't exist or is not active." %
(payload['reqid'],
pii_hash(payload['email_address'], payload['pii_salt']),
pii_hash(payload['session_token'], payload['pii_salt']))
)
return {
'success': False,
'failure_reason': (
"invalid user for forgot-pass email request"
),
'user_id': None,
'email_address': None,
'emailforgotpass_sent_datetime': None,
'messages': ([
"Invalid password reset email request."
])
}
# check the last time we sent a forgot password email to this user
if user_info['emailforgotpass_sent_datetime'] is not None:
check_elapsed = (
datetime.utcnow() - user_info['emailforgotpass_sent_datetime']
) > timedelta(hours=24)
if check_elapsed:
send_forgotpass_email = True
else:
send_forgotpass_email = False
# if we've never sent a forgot-password email before, it's OK to send it
else:
send_forgotpass_email = True
if not send_forgotpass_email:
LOGGER.error(
"[%s] Forgot-password email request failed for "
"email: %s, session_token: %s."
"A forgot-password email was already sent to "
"this user within the last 24 hours." %
(payload['reqid'],
pii_hash(payload['email_address'], payload['pii_salt']),
pii_hash(payload['session_token'], payload['pii_salt']))
)
return {
'success': False,
'failure_reason': (
"forgot-pass verification email sent less than 24 hours ago"
),
'user_id': None,
'email_address': None,
'emailforgotpass_sent_datetime': None,
'messages': ([
"Invalid password reset email request."
])
}
# check the session
session_info = auth_session_exists(
{'session_token': payload['session_token'],
'pii_salt': payload['pii_salt'],
'reqid': payload['reqid']},
raiseonfail=raiseonfail,
override_authdb_path=override_authdb_path
)
if not session_info['success']:
LOGGER.error(
"[%s] Forgot-password email request failed for "
"email: %s, session_token: %s."
"The session associated with the request is not valid." %
(payload['reqid'],
pii_hash(payload['email_address'], payload['pii_salt']),
pii_hash(payload['session_token'], payload['pii_salt']))
)
return {
'success': False,
'failure_reason': (
"invalid session for forgot-pass request"
),
'user_id': None,
'email_address': None,
'emailforgotpass_sent_datetime': None,
'messages': ([
"Invalid verification email request."
])
}
#
# finally! we'll process the email sending request
#
# get the IP address and browser ID from the session
ip_addr = session_info['session_info']['ip_address']
browser = session_info['session_info']['user_agent']
# TODO: we'll use geoip to get the location of the person who initiated the
# request.
# get the verification token's expiry datetime
verification_expiry_td = timedelta(seconds=payload['verification_expiry'])
verification_expiry_dt = (
datetime.utcnow() + verification_expiry_td
).isoformat()
# format the verification token and wrap it to 70 chars per line because now
# it's a bit too long for one line. we'll use a textbox on the verification
# page to let people to paste this in
if isinstance(payload['verification_token'], bytes):
payload['verification_token'] = (
payload['verification_token'].decode('utf-8')
)
formatted_verification_token = '\n'.join(
textwrap.wrap(payload['verification_token'])
)
# generate the email message
msgtext = FORGOTPASS_VERIFICATION_EMAIL_TEMPLATE.format(
server_baseurl=payload['server_baseurl'],
password_forgot_url=payload['password_forgot_url'],
server_name=payload['server_name'],
verification_code=formatted_verification_token,
verification_expiry='%s (UTC time)' % verification_expiry_dt,
browser_identifier=browser.replace('_', '.'),
ip_address=ip_addr,
user_email=payload['email_address'],
)
recipients = [user_info['email']]
subject = FORGOTPASS_VERIFICATION_EMAIL_SUBJECT.format(
server_name=payload['server_name']
)
# send the email
email_sent = send_email(
emailsender,
subject,
msgtext,
recipients,
emailserver,
emailuser,
emailpass,
payload['pii_salt'],
port=emailport
)
if email_sent:
emailforgotpass_sent_datetime = datetime.utcnow()
# finally, we'll update the users table with the actual
# emailforgotpass_sent_datetime if sending succeeded.
upd = users.update(
).where(
users.c.is_active.is_(True)
).where(
users.c.email == payload['email_address']
).values({
'emailforgotpass_sent_datetime': emailforgotpass_sent_datetime,
})
result = currproc.authdb_conn.execute(upd)
result.close()
LOGGER.info(
'[%s] Forgot-password email request succeeded for '
'email: %s, session_token: %s. '
'Email sent on: %s UTC.' %
(payload['reqid'],
pii_hash(payload['email_address'], payload['pii_salt']),
pii_hash(payload['session_token'], payload['pii_salt']),
emailforgotpass_sent_datetime.isoformat())
)
return {
'success': True,
'user_id': user_info['user_id'],
'email_address': user_info['email'],
'emailforgotpass_sent_datetime': emailforgotpass_sent_datetime,
'messages': ([
"Password reset request sent successfully to %s"
% recipients
])
}
else:
LOGGER.error(
'[%s] Forgot-password email request failed for '
'email: %s, session_token: %s.'
'The email server could not send the '
'email to the specified address.' %
(payload['reqid'],
pii_hash(payload['email_address'], payload['pii_salt']),
pii_hash(payload['session_token'], payload['pii_salt']))
)
return {
'success': False,
'failure_reason': (
"forgot-pass verification email "
"could not be sent because email server issue"
),
'user_id': None,
'email_address': None,
'emailforgotpass_sent_datetime': None,
'messages': ([
"Could not send email to %s for "
"the user password reset request."
% recipients
])
}
| 31.954282 | 80 | 0.565602 | 5,354 | 49,625 | 5.087411 | 0.087785 | 0.026434 | 0.02056 | 0.02111 | 0.746127 | 0.70967 | 0.689662 | 0.678133 | 0.6651 | 0.647368 | 0 | 0.000884 | 0.339023 | 49,625 | 1,552 | 81 | 31.974871 | 0.829517 | 0.213662 | 0 | 0.682759 | 0 | 0 | 0.26746 | 0.019815 | 0 | 0 | 0 | 0.001289 | 0 | 1 | 0.007882 | false | 0.060099 | 0.015764 | 0.002956 | 0.061084 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 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 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
a2ee5016384c0140b5c9af1a1dcb15da9f449e54 | 277 | py | Python | molo/core/mixins.py | Ishma59/molo | 4fd31df9266bc251e09e9339a132d3ccd4143c69 | [
"BSD-2-Clause"
] | 25 | 2015-09-26T13:45:30.000Z | 2018-09-13T14:12:20.000Z | molo/core/mixins.py | Ishma59/molo | 4fd31df9266bc251e09e9339a132d3ccd4143c69 | [
"BSD-2-Clause"
] | 510 | 2015-05-29T09:30:44.000Z | 2018-12-11T09:08:11.000Z | molo/core/mixins.py | Ishma59/molo | 4fd31df9266bc251e09e9339a132d3ccd4143c69 | [
"BSD-2-Clause"
] | 5 | 2020-03-26T19:30:13.000Z | 2020-09-04T16:35:59.000Z | class PageEffectiveImageMixin(object):
def get_effective_image(self):
if self.image:
return self.image
page = self.get_main_language_page()
if page.specific.image:
return page.specific.get_effective_image()
return ''
| 30.777778 | 54 | 0.642599 | 31 | 277 | 5.516129 | 0.451613 | 0.192982 | 0.19883 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.277978 | 277 | 8 | 55 | 34.625 | 0.855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0 | 0 | 0.625 | 0 | 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 | 1 | 0 | 0 | 3 |
a2f1c23efb3f7a0be3a4f09ee0e3475fc0996382 | 4,521 | py | Python | docs/tutorials/blackboxoptimization.py | schaul/pybrain | 6e1bd1e9b232044a4e0498fd63799b31ce50f460 | [
"BSD-3-Clause"
] | 4 | 2015-01-01T14:57:38.000Z | 2018-07-12T04:21:36.000Z | docs/tutorials/blackboxoptimization.py | abhishekgahlot/pybrain | c54661f13857d5bcb0095ba2fb12f5a403a4a70f | [
"BSD-3-Clause"
] | null | null | null | docs/tutorials/blackboxoptimization.py | abhishekgahlot/pybrain | c54661f13857d5bcb0095ba2fb12f5a403a4a70f | [
"BSD-3-Clause"
] | 2 | 2015-01-23T09:23:58.000Z | 2019-02-22T05:42:29.000Z | ############################################################################
# PyBrain Tutorial "Black Box Optimization"
#
# Author: Tom Schaul, tom@idsia.ch
############################################################################
__author__ = 'Tom Schaul, tom@idsia.ch'
""" A script that attempts to illustrate a large variety of
use-cases for different kinds of black-box learning algorithms.
"""
from pybrain.structure.networks.network import Network
from pybrain.optimization import * #@UnusedWildImport
""" The problem we would like to solve can be anything that
has something like a fitness function.
The following switches between two different examples.
The variable 'theparams' contains the trainable
parameters that affect the fitness. """
if False:
""" Simple function optimization:
here the parameters are learned directly. """
from scipy import randn
from pybrain.rl.environments.functions import SphereFunction
thetask = SphereFunction(3)
theparams = randn(3)
else:
""" Simple pole-balancing task:
here we learn the weights of a neural network controller."""
from pybrain.tools.shortcuts import buildNetwork
from pybrain.rl.environments.cartpole.balancetask import BalanceTask
thetask = BalanceTask()
theparams = buildNetwork(thetask.outdim, thetask.indim, bias=False)
print 'Subsequently, we attempt to solve the following task:'
print thetask.__class__.__name__
if isinstance(theparams, Network):
print '\nby finding good weights for this (simple) network:'
print theparams
print '\nwhich has', theparams.paramdim, 'trainable parameters. (the dimensions of its layers are:',
for m in theparams.modules:
print m.indim, ',',
print ')\n'
""" We allow every algorithm a limited number of evaluations. """
maxEvals = 1000
""" Standard function minimization: """
print 'fmin', NelderMead(thetask, theparams, maxEvaluations=maxEvals).learn()
""" The same, using some other algorithms
(note that the syntax for invoking them is always the same) """
print 'CMA', CMAES(thetask, theparams, maxEvaluations=maxEvals).learn()
print 'NES', ExactNES(thetask, theparams, maxEvaluations=maxEvals).learn()
print 'FEM', FEM(thetask, theparams, maxEvaluations=maxEvals).learn()
print 'Finite Differences', FiniteDifferences(thetask, theparams, maxEvaluations=maxEvals).learn()
print 'SPSA', SimpleSPSA(thetask, theparams, maxEvaluations=maxEvals).learn()
print 'PGPE', PGPE(thetask, theparams, maxEvaluations=maxEvals).learn()
""" Evolutionary methods fall in the Learner framework as well.
All the following are examples."""
print 'HillClimber', HillClimber(thetask, theparams, maxEvaluations=maxEvals).learn()
print 'WeightGuessing', WeightGuessing(thetask, theparams, maxEvaluations=maxEvals).learn()
print 'ES 50+50', ES(thetask, theparams, maxEvaluations=maxEvals).learn()
""" We can change some default parameters, e.g."""
print 'ES 5+5', ES(thetask, theparams, mu=5, lambada=5, maxEvaluations=maxEvals).learn()
""" Memetic algorithms are a kind of meta-algorithm, doing topology mutations
on the top-level, and using other algorithms internally
as a kind of local search (default there: hill-climbing)."""
print 'Memetic Climber', MemeticSearch(thetask, theparams, maxEvaluations=maxEvals).learn()
print 'Memetic ES 50+50', MemeticSearch(thetask, theparams, maxEvaluations=maxEvals,
localSearch=ES, localSteps=200).learn()
print 'Memetic ES 5+5', MemeticSearch(thetask, theparams, maxEvaluations=maxEvals,
localSearch=ES,
localSearchArgs={'mu': 5, 'lambada': 5}).learn()
print 'Memetic NES', MemeticSearch(thetask, theparams, maxEvaluations=maxEvals,
localSearch=ExactNES,
localSearchArgs={'batchSize': 20}).learn()
""" Inner memetic is the population based variant (on the topology level). """
print 'Inner Memetic Climber', InnerMemeticSearch(thetask, theparams, maxEvaluations=maxEvals).learn()
print 'Inner Memetic CMA', InnerMemeticSearch(thetask, theparams, maxEvaluations=maxEvals,
localSearch=CMAES).learn()
""" Inverse memetic algorithms do local search on topology mutations,
and weight changes in the top-level search. """
print 'Inverse Memetic Climber', InverseMemeticSearch(thetask, theparams, maxEvaluations=maxEvals).learn()
| 43.471154 | 106 | 0.693209 | 498 | 4,521 | 6.269076 | 0.38755 | 0.092249 | 0.163357 | 0.206919 | 0.30173 | 0.215247 | 0.040999 | 0 | 0 | 0 | 0 | 0.007256 | 0.176952 | 4,521 | 103 | 107 | 43.893204 | 0.831766 | 0.020349 | 0 | 0 | 0 | 0 | 0.139245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.12766 | null | null | 0.531915 | 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 | 1 | 0 | 3 |
a2f24cf445d3bd7d09e63d88b2006458760e0a2c | 170 | py | Python | pythonexercicios/ex074.py | andrebatist4/cursoemvideo-python | a12b0023f01a38cc3fc5bb59aad5ad8a3e54f6d3 | [
"MIT"
] | null | null | null | pythonexercicios/ex074.py | andrebatist4/cursoemvideo-python | a12b0023f01a38cc3fc5bb59aad5ad8a3e54f6d3 | [
"MIT"
] | null | null | null | pythonexercicios/ex074.py | andrebatist4/cursoemvideo-python | a12b0023f01a38cc3fc5bb59aad5ad8a3e54f6d3 | [
"MIT"
] | null | null | null | import numpy as np
alea = (np.random.randint(0, 10, (5)))
print(alea)
print(f'O maior número sorteado foi {max(alea)}')
print(f'O menor número sorteado foi {min(alea)}')
| 28.333333 | 49 | 0.7 | 31 | 170 | 3.83871 | 0.645161 | 0.151261 | 0.168067 | 0.184874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027027 | 0.129412 | 170 | 5 | 50 | 34 | 0.777027 | 0 | 0 | 0 | 0 | 0 | 0.458824 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.2 | 0.6 | 0 | 0 | 0 | null | 0 | 0 | 1 | 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 | 1 | 0 | 3 |
0c0ab7a2bcfba9f1be100583a32b86d155acf84e | 255 | py | Python | Singleton/module.py | Supegg/Python_demo | 0ef0ba9edd2fa7e96b197549187292981bbdaf88 | [
"MIT"
] | null | null | null | Singleton/module.py | Supegg/Python_demo | 0ef0ba9edd2fa7e96b197549187292981bbdaf88 | [
"MIT"
] | null | null | null | Singleton/module.py | Supegg/Python_demo | 0ef0ba9edd2fa7e96b197549187292981bbdaf88 | [
"MIT"
] | null | null | null | class Singleton(object):
def __init__(self):
self.x = 0
def foo(self):
pass
singleton = Singleton()
'''
Python 的模块就是天然的单例模式,因为模块在第一次导入时,会生成 .pyc 文件,
当第二次导入时,就会直接加载 .pyc 文件,而不会再次执行模块代码。
因此,我们只需把相关的函数和数据定义在一个模块中,就可以获得一个单例对象了。
''' | 17 | 44 | 0.682353 | 29 | 255 | 5.862069 | 0.758621 | 0.058824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004878 | 0.196078 | 255 | 15 | 45 | 17 | 0.82439 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0.166667 | 0 | 0 | 0.5 | 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 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
0c0ad941b0c1c18d762cf50bdf2528c20056a0c7 | 908 | py | Python | model/sha.py | Manu343726/biicode-common | 91b32c6fd1e4a72ce5451183f1766d313cd0e420 | [
"MIT"
] | 17 | 2015-04-15T09:40:23.000Z | 2017-05-17T20:34:49.000Z | model/sha.py | Manu343726/biicode-common | 91b32c6fd1e4a72ce5451183f1766d313cd0e420 | [
"MIT"
] | 2 | 2015-04-22T11:29:36.000Z | 2018-09-25T09:31:09.000Z | model/sha.py | bowlofstew/common | 45e9ca902be7bbbdd73dafe3ab8957bc4a006020 | [
"MIT"
] | 22 | 2015-04-15T09:46:00.000Z | 2020-09-29T17:03:31.000Z |
import hashlib
import bson
class SHABuilder(object):
def __init__(self, value=None):
self.md = hashlib.sha1()
if value:
self.md.update(value)
def __iadd__(self, item):
if isinstance(item, (set, list, tuple)):
for elem in sorted(item):
self.md.update(elem)
else:
self.md.update(item)
return self
def sha(self):
return SHA(self.md.hexdigest())
class SHA(str):
'''IMportant: This class CANNOT implement __str__ for easy reading the string
as it destroy the behaviour'''
def __new__(cls, value):
if value is None:
return None
return str.__new__(SHA, value)
def __repr__(self):
return self.encode('hex_codec')
def serialize(self):
return bson.Binary(self)
@staticmethod
def deserialize(data):
return SHA(data)
| 21.619048 | 81 | 0.590308 | 112 | 908 | 4.5625 | 0.482143 | 0.058708 | 0.07045 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001597 | 0.310573 | 908 | 41 | 82 | 22.146341 | 0.814696 | 0.112335 | 0 | 0 | 0 | 0 | 0.011321 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.071429 | 0.142857 | 0.642857 | 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 | 1 | 0 | 0 | 3 |
0c223b5b283383a30c7e4b5589fdce131d3c18f0 | 3,622 | py | Python | civet/minc.py | FNNDSC/pycivet | 440839d8dcb3413ec96d06945498a6a9ec710204 | [
"MIT"
] | null | null | null | civet/minc.py | FNNDSC/pycivet | 440839d8dcb3413ec96d06945498a6a9ec710204 | [
"MIT"
] | null | null | null | civet/minc.py | FNNDSC/pycivet | 440839d8dcb3413ec96d06945498a6a9ec710204 | [
"MIT"
] | null | null | null | """
Defines types and operations related to MINC files.
"""
from dataclasses import dataclass
from os import PathLike
from typing import Literal, TypeVar, Generic, Optional
from civet.bases import DataFile
from civet.extraction.kernels import ngh_count_kernel
_M = TypeVar('_M', bound='GenericMinc')
_V = TypeVar('_V', bound='GenericMinc')
@dataclass(frozen=True)
class GenericMinc(DataFile[_M], Generic[_M]):
preferred_suffix = '.mnc'
def mincresample(self, like_volume: _V) -> _V:
def command(output):
return (
'mincresample', '-clobber', '-quiet',
'-like', like_volume, self, output
)
return like_volume.create_command(command)
def reshape255(self) -> 'GenericMask':
def command(output):
return (
'mincreshape', '-quiet', '-clobber', '-unsigned', '-byte',
'-image_range', '0', '255', '-valid_range', '0', '255',
self, output
)
return GenericMask(self).create_command(command)
def resamplef64(self, *extra_flags: str) -> 'GenericFloatMinc':
def command(output):
return 'mincresample', '-quiet', '-double', *extra_flags, self, output
return GenericFloatMinc(self).create_command(command)
_MA = TypeVar('_MA', bound='GenericMask')
class GenericMask(GenericMinc[_MA], Generic[_MA]):
def dilate_volume(self, dilation_value: int, neighbors: Literal[6, 26], n_dilations: int) -> _MA:
def command(output):
return (
'dilate_volume', self, output,
str(dilation_value), str(neighbors), str(n_dilations)
)
return self.create_command(command)
def minccalc_u8(self, expression: str, *other_volumes: 'GenericMask') -> _MA:
def command(output):
return (
'minccalc', '-clobber', '-quiet',
'-unsigned', '-byte',
'-expression', expression,
self, *other_volumes, output
)
return self.create_command(command)
def mincdefrag(self, label: int, stencil: Literal[6, 19, 27], max_connect: Optional[int] = None) -> _MA:
def command(output):
cmd = ['mincdefrag', self, output, str(label), str(stencil)]
if max_connect is not None:
cmd.append(str(max_connect))
return cmd
return self.create_command(command)
def reshape_bbox(self) -> _MA:
def command(output):
return 'mincreshape_bbox_helper', self, output
return self.create_command(command)
def mincmorph_convolve_u8(self, kernel: str | PathLike = ngh_count_kernel) -> _MA:
def command(output):
return (
'mincmorph',
'-unsigned', '-byte',
'-convolve',
'-kernel', kernel,
self, output
)
return self.create_command(command)
class Mask(GenericMask['Mask']):
"""
A `Mask` represents a volume (`.mnc`) with discrete intensities (segmentation volume or brain mask).
"""
pass
_F = TypeVar('_F', bound='GenericFloatMinc')
class GenericFloatMinc(GenericMinc[_F], Generic[_F]):
def mincblur(self, fwhm: float) -> _F:
# result is not a binary mask, it has float values in [0, 1],
# maybe define a unique type?
def command(output):
return 'mincblur_correct_name.sh', '-quiet', '-fwhm', str(fwhm), self, output
return self.create_command(command)
class FloatMinc(GenericFloatMinc['FloatMinc']):
pass
| 32.339286 | 108 | 0.597736 | 384 | 3,622 | 5.476563 | 0.328125 | 0.085592 | 0.068474 | 0.08369 | 0.224917 | 0.113172 | 0.081788 | 0.042796 | 0 | 0 | 0 | 0.009571 | 0.278851 | 3,622 | 111 | 109 | 32.630631 | 0.795559 | 0.066538 | 0 | 0.333333 | 0 | 0 | 0.121239 | 0.014001 | 0 | 0 | 0 | 0 | 0 | 1 | 0.230769 | false | 0.025641 | 0.064103 | 0.102564 | 0.602564 | 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 | 1 | 0 | 0 | 3 |
0c33a6ce2d16563f97f43f77f5013b9f95d0eed3 | 98 | py | Python | django_day07/related_demo/apps.py | maoxuelin083/Django-Study | 6eb332a97c898b11e6d1c1faf80dbb14f4f835c6 | [
"Apache-2.0"
] | null | null | null | django_day07/related_demo/apps.py | maoxuelin083/Django-Study | 6eb332a97c898b11e6d1c1faf80dbb14f4f835c6 | [
"Apache-2.0"
] | null | null | null | django_day07/related_demo/apps.py | maoxuelin083/Django-Study | 6eb332a97c898b11e6d1c1faf80dbb14f4f835c6 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class RelatedDemoConfig(AppConfig):
name = 'related_demo'
| 16.333333 | 35 | 0.77551 | 11 | 98 | 6.818182 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153061 | 98 | 5 | 36 | 19.6 | 0.903614 | 0 | 0 | 0 | 0 | 0 | 0.122449 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 1 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
0c34fd59f716fd2db93dffd8611e610c2e33e856 | 1,575 | py | Python | Notatki/Obliczenia-naukowe/NumPy/NumPy.py | bzglinicki/python-trainin | 4839514572cfd484f17f8a6473d259f807b9f690 | [
"MIT"
] | 1 | 2021-03-10T22:32:40.000Z | 2021-03-10T22:32:40.000Z | Notatki/Obliczenia-naukowe/NumPy/NumPy.py | bzglinicki/python-trainin | 4839514572cfd484f17f8a6473d259f807b9f690 | [
"MIT"
] | null | null | null | Notatki/Obliczenia-naukowe/NumPy/NumPy.py | bzglinicki/python-trainin | 4839514572cfd484f17f8a6473d259f807b9f690 | [
"MIT"
] | 1 | 2021-03-20T21:01:37.000Z | 2021-03-20T21:01:37.000Z | # Programowanie I R
# Pakiet NumPy
import numpy as np
arr_list = np.array([1, 2, 3, 4, 5])
print(arr_list)
print(type(arr_list))
print()
arr_tuple = np.array((1, 2, 3, 4, 5))
print(arr_tuple)
print(type(arr_tuple))
print()
arr = np.array(42)
print(arr)
print(arr.ndim)
print()
arr = np.array([[1, 2, 3], [4, 5, 6]])
print(arr)
print(arr.ndim)
print()
arr = np.array([[[1, 2, 3], [4, 5, 6]], [[1, 2, 3], [4, 5, 6]]])
print(arr)
print(arr.ndim)
print()
arr = np.array([1, 2, 3, 4], ndmin = 5)
print(arr)
print(arr.ndim)
print()
#***********************************************************************************
arr = np.array([1, 2, 3, 4])
print(arr[0])
print(arr[2] + arr[3])
print()
arr = np.array([[1,2,3,4,5], [6,7,8,9,10]])
print(arr[1, 3])
print(arr[1, 2])
print(arr[1, -1])
print()
arr = np.array([[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]])
print(arr[0, 1, 2])
print()
#***********************************************************************************
arr = np.array([1, 2, 3, 4, 5, 6, 7])
print(arr[1:5])
print(arr[4:])
print(arr[:4])
print(arr[1:5:2])
print()
arr = np.array([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
print(arr[1, 1:4])
print(arr[0:2, 1:4])
#***********************************************************************************
arr1 = np.array([10, 11, 12, 13, 14, 15])
arr2 = np.array([20, 21, 22, 23, 24, 25])
newarr = np.add(arr1, arr2)
print(newarr)
print()
newarr = np.subtract(arr1, arr2)
print(newarr)
print()
newarr = np.multiply(arr1, arr2)
print(newarr)
print()
newarr = np.divide(arr1, arr2)
print(newarr)
print() | 18.313953 | 84 | 0.486349 | 267 | 1,575 | 2.846442 | 0.172285 | 0.336842 | 0.043421 | 0.057895 | 0.621053 | 0.555263 | 0.555263 | 0.428947 | 0.428947 | 0.376316 | 0 | 0.104839 | 0.133968 | 1,575 | 86 | 85 | 18.313953 | 0.452346 | 0.177143 | 0 | 0.466667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.016667 | 0 | 0.016667 | 0.7 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 1 | 0 | 3 |
0c37f3da8b9d4fa16078e5a88468209236dbddd2 | 1,033 | py | Python | qcloudsdkds/MngCountQueryRequest.py | f3n9/qcloudcli | b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19 | [
"Apache-2.0"
] | null | null | null | qcloudsdkds/MngCountQueryRequest.py | f3n9/qcloudcli | b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19 | [
"Apache-2.0"
] | null | null | null | qcloudsdkds/MngCountQueryRequest.py | f3n9/qcloudcli | b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from qcloudsdkcore.request import Request
class MngCountQueryRequest(Request):
def __init__(self):
super(MngCountQueryRequest, self).__init__(
'ds', 'qcloudcliV1', 'MngCountQuery', 'ds.api.qcloud.com')
def get_beginTime(self):
return self.get_params().get('beginTime')
def set_beginTime(self, beginTime):
self.add_param('beginTime', beginTime)
def get_endTime(self):
return self.get_params().get('endTime')
def set_endTime(self, endTime):
self.add_param('endTime', endTime)
def get_module(self):
return self.get_params().get('module')
def set_module(self, module):
self.add_param('module', module)
def get_operation(self):
return self.get_params().get('operation')
def set_operation(self, operation):
self.add_param('operation', operation)
def get_type(self):
return self.get_params().get('type')
def set_type(self, type):
self.add_param('type', type)
| 25.825 | 70 | 0.649564 | 125 | 1,033 | 5.144 | 0.24 | 0.046656 | 0.108865 | 0.132193 | 0.202177 | 0.202177 | 0 | 0 | 0 | 0 | 0 | 0.002463 | 0.21394 | 1,033 | 39 | 71 | 26.487179 | 0.789409 | 0.020329 | 0 | 0 | 0 | 0 | 0.111881 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.44 | false | 0 | 0.04 | 0.2 | 0.72 | 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 | 1 | 0 | 0 | 3 |
0c48928f28f2c61afde2d61eedf6ce41abd62963 | 62 | py | Python | flatpak_indexer/datasource/fedora/__init__.py | kalev/flatpak-indexer | 540bdb465e73b0c4627ddbeb649dddcca4b24b59 | [
"MIT"
] | null | null | null | flatpak_indexer/datasource/fedora/__init__.py | kalev/flatpak-indexer | 540bdb465e73b0c4627ddbeb649dddcca4b24b59 | [
"MIT"
] | null | null | null | flatpak_indexer/datasource/fedora/__init__.py | kalev/flatpak-indexer | 540bdb465e73b0c4627ddbeb649dddcca4b24b59 | [
"MIT"
] | null | null | null | from .updater import FedoraUpdater
__all__ = [FedoraUpdater]
| 15.5 | 34 | 0.806452 | 6 | 62 | 7.666667 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.129032 | 62 | 3 | 35 | 20.666667 | 0.851852 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
0c5442bfc1ee309f4ca9f49956688b283d424edc | 1,687 | py | Python | eva/catalog/df_schema.py | LordDarkula/eva | 93433bc88f361c277690c9e31f1b8de657f25823 | [
"Apache-2.0"
] | null | null | null | eva/catalog/df_schema.py | LordDarkula/eva | 93433bc88f361c277690c9e31f1b8de657f25823 | [
"Apache-2.0"
] | null | null | null | eva/catalog/df_schema.py | LordDarkula/eva | 93433bc88f361c277690c9e31f1b8de657f25823 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018-2020 EVA
#
# 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
from eva.catalog.models.df_column import DataFrameColumn
from eva.catalog.schema_utils import SchemaUtils
class DataFrameSchema(object):
def __init__(self, name: str, column_list: List[DataFrameColumn]):
self._name = name
self._column_list = column_list
self._petastorm_schema = SchemaUtils \
.get_petastorm_schema(self._name, self._column_list)
self._pyspark_schema = self._petastorm_schema.as_spark_schema()
def __str__(self):
schema_str = "SCHEMA:: (" + self._name + ")\n"
for column in self._column_list:
schema_str += str(column)
return schema_str
@property
def name(self):
return self._name
@property
def column_list(self):
return self._column_list
@property
def petastorm_schema(self):
return self._petastorm_schema
@property
def pyspark_schema(self):
return self._pyspark_schema
def __eq__(self, other):
return self.name == other.name and \
self._column_list == other.column_list
| 29.596491 | 74 | 0.700059 | 225 | 1,687 | 5.022222 | 0.422222 | 0.079646 | 0.061947 | 0.028319 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009901 | 0.221695 | 1,687 | 56 | 75 | 30.125 | 0.850724 | 0.330765 | 0 | 0.133333 | 0 | 0 | 0.01167 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.233333 | false | 0 | 0.1 | 0.166667 | 0.566667 | 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 | 1 | 0 | 0 | 3 |
0c641125a598ebb1a1b2a1ccdcd0e78f374defe8 | 1,203 | py | Python | system_monitor/tests/test_exception_handling.py | weijia/system-monitor | 1f7f7275905d32e0d76e446609a681a728042fbd | [
"MIT"
] | null | null | null | system_monitor/tests/test_exception_handling.py | weijia/system-monitor | 1f7f7275905d32e0d76e446609a681a728042fbd | [
"MIT"
] | null | null | null | system_monitor/tests/test_exception_handling.py | weijia/system-monitor | 1f7f7275905d32e0d76e446609a681a728042fbd | [
"MIT"
] | null | null | null | from django.test import TestCase
from system_monitor.cmd_handler_with_alarm_report import CmdHandlerWithAlarmReport
# noinspection PyMethodMayBeStatic
class HandlerClassBaseStub(object):
def get_task_object_ufs_url(self):
return "ufs://handler_class_stub"
def get_subject_for_error(self):
return "test subject for error"
def get_subject_for_success(self):
return "test subject for success"
class HandlerClassStubEndsNormally(HandlerClassBaseStub):
def msg_loop(self):
return
class HandlerClassStubRaisingException(HandlerClassBaseStub):
def msg_loop(self):
raise IOError
class NormalCmdHandlerTestClass(CmdHandlerWithAlarmReport):
handler_class = HandlerClassStubEndsNormally
class CmdHandlerRaisingExceptionTestClass(CmdHandlerWithAlarmReport):
handler_class = HandlerClassStubRaisingException
# noinspection PyMethodMayBeStatic
class MailHandlerExceptionTestCase(TestCase):
def setUp(self):
pass
def test_exception_handling(self):
t = CmdHandlerRaisingExceptionTestClass()
t.msg_loop()
def test_normal_operation(self):
t = NormalCmdHandlerTestClass()
t.msg_loop()
| 25.0625 | 82 | 0.768911 | 112 | 1,203 | 8.017857 | 0.410714 | 0.044543 | 0.080178 | 0.035635 | 0.129176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.173732 | 1,203 | 47 | 83 | 25.595745 | 0.903421 | 0.054032 | 0 | 0.142857 | 0 | 0 | 0.061674 | 0.021145 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0.035714 | 0.071429 | 0.142857 | 0.785714 | 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 | 1 | 0 | 0 | 3 |
a759467b5f569ab342151510b3bf8f6e3b52449e | 404 | py | Python | 519-DeepLearning/assignment1/NN/Loss.py | neale/CS-program | 6fef9c39579143bde0ab5d1ec5fedc7210e55814 | [
"Unlicense"
] | 1 | 2016-10-24T13:36:23.000Z | 2016-10-24T13:36:23.000Z | 519-DeepLearning/assignment1/NN/Loss.py | neale/CS-program | 6fef9c39579143bde0ab5d1ec5fedc7210e55814 | [
"Unlicense"
] | null | null | null | 519-DeepLearning/assignment1/NN/Loss.py | neale/CS-program | 6fef9c39579143bde0ab5d1ec5fedc7210e55814 | [
"Unlicense"
] | null | null | null | import numpy as np
class CrossEntropy(object):
def __init__(self):
pass
def forward(self, out, y):
loss = lambda x, y: -(y*np.log(x +.0001)) - ((1.01 - y) * np.log(1.01 - x))
if out.ndim > 1:
return np.mean(loss(out, y))
else:
return loss(out, y)
def backward(self, out, y):
return np.subtract(out, y)
| 18.363636 | 83 | 0.490099 | 58 | 404 | 3.344828 | 0.482759 | 0.103093 | 0.082474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.042969 | 0.366337 | 404 | 21 | 84 | 19.238095 | 0.714844 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0.083333 | 0.083333 | 0.083333 | 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 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
a75990ee887c616128c3876060a09c657908324b | 2,359 | py | Python | src/tests/test_Problem41.py | Joyce-NL/gep-python-coding-challenge | 58639076537535870eedb9909135788909fb6fc3 | [
"MIT"
] | null | null | null | src/tests/test_Problem41.py | Joyce-NL/gep-python-coding-challenge | 58639076537535870eedb9909135788909fb6fc3 | [
"MIT"
] | null | null | null | src/tests/test_Problem41.py | Joyce-NL/gep-python-coding-challenge | 58639076537535870eedb9909135788909fb6fc3 | [
"MIT"
] | null | null | null | import unittest
from Problem41 import find_largest_pandigital_prime, is_prime_number
class TestProblem41(unittest.TestCase):
def test_main_function(self):
self.assertEqual(find_largest_pandigital_prime(1, 9), 7652413, 'the result of the function does not match the expected result.')
self.assertEqual(find_largest_pandigital_prime(1, 3), "NA", 'the result of the function does not match the expected result.')
self.assertEqual(find_largest_pandigital_prime(5, 6), "NA", 'the result of the funtion does not match the expected result.')
self.assertEqual(find_largest_pandigital_prime(8, 9), "NA", 'the result of the function does not match the expeced result.')
self.assertEqual(find_largest_pandigital_prime(5, 7), 7652413, 'the result of the function does not match the expected result.')
def test_input_type(self):
with self.assertRaises(TypeError):
find_largest_pandigital_prime(5j, 5)
find_largest_pandigital_prime(1, 2j)
find_largest_pandigital_prime("yes", 5)
find_largest_pandigital_prime(1, "no")
def test_input_value(self):
with self.assertRaises(ValueError):
find_largest_pandigital_prime(-1, 2)
find_largest_pandigital_prime(1, 0)
find_largest_pandigital_prime(8, 2)
find_largest_pandigital_prime(1, 10)
find_largest_pandigital_prime(0, 7)
def test_is_prime_number_function(self):
self.assertEqual(is_prime_number(1), False,'the result of the function does not match the expected result.')
self.assertEqual(is_prime_number(2), True, 'the result of the function does not match the expected result.')
self.assertEqual(is_prime_number(3), True, 'the result of the function does not match the expected result.')
self.assertEqual(is_prime_number(4), False, 'the result of the function does not match the expected result.')
self.assertEqual(is_prime_number(7919), True, 'the result of the function does not match the expected result.')
self.assertEqual(is_prime_number(123456), False, 'the result of the function does not match the expected result.')
self.assertEqual(is_prime_number(7652413), True, 'the result of the function does not match the expected result.')
if __name__ == '__main__':
unittest.main()
| 60.487179 | 136 | 0.726155 | 331 | 2,359 | 4.936556 | 0.175227 | 0.100979 | 0.192778 | 0.238678 | 0.746022 | 0.685435 | 0.616891 | 0.590575 | 0.560588 | 0.560588 | 0 | 0.034573 | 0.190759 | 2,359 | 38 | 137 | 62.078947 | 0.821372 | 0 | 0 | 0 | 0 | 0 | 0.322594 | 0 | 0 | 0 | 0 | 0 | 0.4375 | 1 | 0.125 | false | 0 | 0.0625 | 0 | 0.21875 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a75a81a34e3334c7472b1edc99a625a2bb63418b | 408 | py | Python | Data Structures/Array/ElementInInfiniteArray.py | prabhupant/daily-coding-problem | b3775dd0ad823823e60100624ccf14235c446098 | [
"MIT"
] | null | null | null | Data Structures/Array/ElementInInfiniteArray.py | prabhupant/daily-coding-problem | b3775dd0ad823823e60100624ccf14235c446098 | [
"MIT"
] | null | null | null | Data Structures/Array/ElementInInfiniteArray.py | prabhupant/daily-coding-problem | b3775dd0ad823823e60100624ccf14235c446098 | [
"MIT"
] | null | null | null | def binary_search(arr, l, r, x):
while l =< r:
mid = l + (r-l)/2
if arr[mid] == x:
return mid
elif arr[mid] > x:
r = mid - 1
else:
l = mid + 1
return -1
def find_pos(arr, key):
l = 0
h = 1
val = arr[0]
while val < key:
l = h
h = 2*h
val = arr[h]
return binary_search(arr, l, h, key)
| 17 | 40 | 0.401961 | 64 | 408 | 2.515625 | 0.328125 | 0.037267 | 0.186335 | 0.198758 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.037037 | 0.470588 | 408 | 23 | 41 | 17.73913 | 0.708333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a774603173901e2d73069f0e8070e5c90eecb671 | 4,939 | py | Python | src/Core/DevOps/Locust/common/store_api.py | michielkalle/platform | 72987304b01c1c666c7ac2896ac4157f2e1468c1 | [
"MIT"
] | null | null | null | src/Core/DevOps/Locust/common/store_api.py | michielkalle/platform | 72987304b01c1c666c7ac2896ac4157f2e1468c1 | [
"MIT"
] | null | null | null | src/Core/DevOps/Locust/common/store_api.py | michielkalle/platform | 72987304b01c1c666c7ac2896ac4157f2e1468c1 | [
"MIT"
] | null | null | null | import random
import json
import uuid
import time
import requests
from locust.exception import RescheduleTask
class StoreApi:
context: None
def __init__(self, client, context):
self.context = context
self.client = client
self.currency_id = random.choice(self.context.sales_channel['currencies'])
self.language_id = random.choice(self.context.sales_channel['languages'])
self.token = str(uuid.uuid4()).replace('-', '')
self.switch_context({
'currencyId': self.currency_id,
'languageId': self.language_id
})
def home(self):
return self.request('/store-api/category/home', name='home')
def navigation(self, activeId = 'main-navigation'):
return self.request('/store-api/navigation/' + activeId + '/main-navigation', name = 'main-navigation')
def footer(self, activeId = 'footer-navigation'):
return self.request('/store-api/navigation/' + activeId + '/footer-navigation', name = 'footer-navigation')
def service(self, activeId = 'service-navigation'):
return self.request('/store-api/navigation/' + activeId + '/service-navigation', name = 'service-navigation')
def shipping_methods(self):
return self.request('/store-api/shipping-method', name='shipping-methods')
def payment_methods(self):
return self.request('/store-api/payment-method', name='payment-methods')
def languages(self):
return self.request('/store-api/language', name='languages')
def currencies(self):
return self.request('/store-api/currency', name='currencies')
def salutations(self):
return self.request('/store-api/salutation', name='salutations')
def countries(self):
return self.request('/store-api/country', name='countries')
def search(self):
return self.request('/store-api/search', name='search', parameters = {'search': random.choice(self.context.keywords)})
def suggest(self):
return self.request('/store-api/search-suggest', name='suggest', parameters = {'search': random.choice(self.context.keywords)})
def cart(self):
return self.request('/store-api/checkout/cart', name='cart')
def product(self):
return self.request('/store-api/product/' + random.choice(self.context.product_ids), name='product')
def listing(self):
return self.request('/store-api/category/' + random.choice(self.context.category_ids), name='listing')
def add_product_to_cart(self):
id = random.choice(self.context.product_ids)
return self.request(
'/store-api/checkout/cart/line-item',
name='add-product-to-cart',
parameters = {
'items': [{'type': 'product', 'id': id, 'referencedId': id}]
}
)
def order(self):
return self.request('/store-api/checkout/order', name='order')
def register(self):
self.email = 'user-' + str(uuid.uuid4()).replace('-', '') + '@example.com'
response = self.request('/store-api/account/register', name='register', parameters={
'storefrontUrl': self.context.sales_channel['domain'],
'salutationId': self.context.sales_channel['salutationId'],
'firstName': 'Firstname',
'lastName': 'Lastname',
'email': self.email,
'password': 'shopware',
'acceptedDataProtection': True,
'billingAddress': {
'salutationId': self.context.sales_channel['salutationId'],
'street': 'Test street',
'zipcode': '11111',
'city': 'Test city',
'countryId': self.context.sales_channel['countryId']
}
})
self.token = response.headers['sw-context-token']
return response
def switch_context(self, parameters):
response = self.request('/store-api/context', name='context-switch', parameters=parameters, method='PATCH')
self.token = response.headers['sw-context-token']
return response
def get_headers(self):
return {
'Accept': 'application/json',
'Content-Type': 'application/json',
'sw-context-token': self.token,
'sw-access-key': self.context.sales_channel['access_key']
}
def request(self, url, name, parameters = {}, method = 'POST'):
headers = self.get_headers()
if method == 'POST':
response = self.client.post(self.context.url + url, json=parameters, headers=headers, name=name)
elif method == 'PATCH':
response = self.client.patch(self.context.url + url, json=parameters, headers=headers, name=name)
else:
response = self.client.get(self.context.url + url, headers=headers, name=name)
if response.status_code in [200, 204]:
return response
return response
| 36.858209 | 135 | 0.620166 | 533 | 4,939 | 5.692308 | 0.210131 | 0.068886 | 0.100198 | 0.118985 | 0.409031 | 0.390574 | 0.290046 | 0.156559 | 0.071193 | 0.071193 | 0 | 0.003429 | 0.232436 | 4,939 | 133 | 136 | 37.135338 | 0.796887 | 0 | 0 | 0.09901 | 0 | 0 | 0.240583 | 0.064601 | 0 | 0 | 0 | 0 | 0 | 1 | 0.217822 | false | 0.009901 | 0.059406 | 0.168317 | 0.514851 | 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 | 1 | 0 | 0 | 3 |
a77c4356baff61d2b6990feb7435af8aa0153e4c | 1,750 | py | Python | Project Code/Statistic with Numpy/Project 3 Election Results/script.py | BIGG000/Data-Science-Learning-Track | 46df939699fd6b2c1ee3ce5d35c51a250faa1bce | [
"MIT"
] | 2 | 2020-10-15T22:52:00.000Z | 2020-11-22T16:13:20.000Z | Project Code/Statistic with Numpy/Project 3 Election Results/script.py | BIGG000/Data-Science-Learning-Track | 46df939699fd6b2c1ee3ce5d35c51a250faa1bce | [
"MIT"
] | null | null | null | Project Code/Statistic with Numpy/Project 3 Election Results/script.py | BIGG000/Data-Science-Learning-Track | 46df939699fd6b2c1ee3ce5d35c51a250faa1bce | [
"MIT"
] | null | null | null | import codecademylib
import numpy as np
import matplotlib.pyplot as plt
survey_responses = ['Ceballos', 'Kerrigan', 'Ceballos', 'Ceballos', 'Ceballos','Kerrigan', 'Kerrigan', 'Ceballos', 'Ceballos', 'Ceballos',
'Kerrigan', 'Kerrigan', 'Ceballos', 'Ceballos', 'Kerrigan', 'Kerrigan', 'Ceballos', 'Ceballos', 'Kerrigan', 'Kerrigan', 'Kerrigan', 'Kerrigan', 'Kerrigan', 'Kerrigan', 'Ceballos', 'Ceballos', 'Ceballos', 'Ceballos', 'Ceballos', 'Ceballos',
'Kerrigan', 'Kerrigan', 'Ceballos', 'Ceballos', 'Ceballos', 'Kerrigan', 'Kerrigan', 'Ceballos', 'Ceballos', 'Kerrigan', 'Kerrigan', 'Ceballos', 'Ceballos', 'Kerrigan', 'Kerrigan', 'Kerrigan', 'Kerrigan', 'Kerrigan', 'Kerrigan', 'Ceballos',
'Kerrigan', 'Kerrigan', 'Ceballos', 'Ceballos', 'Ceballos', 'Kerrigan', 'Kerrigan', 'Ceballos', 'Ceballos', 'Kerrigan', 'Kerrigan', 'Ceballos', 'Ceballos', 'Kerrigan', 'Kerrigan', 'Kerrigan', 'Kerrigan', 'Kerrigan', 'Kerrigan', 'Ceballos']
total_ceballos = sum([1 for i in survey_responses if i =='Ceballos'])
print('count ceballos '+str(total_ceballos))
percentage_ceballos = total_ceballos/float(len(survey_responses))
print('percentage ceballos '+ str(percentage_ceballos))
possible_surveys = np.random.binomial(float(len((survey_responses))),0.54,size=10000)/float(len(survey_responses))
# plt.hist(possible_surveys,bins=20,range=(0,1))
# plt.show()
ceballos_loss_surveys = np.mean(possible_surveys < 0.5)
print('loss percentage '+str (ceballos_loss_surveys))
large_survey = np.random.binomial(7000,0.5,size=10000)/7000
print('large_survey'+str(large_survey))
plt.hist(possible_surveys,bins=20,range=(0,1))
plt.hist(large_survey,alpha=.4,bins=20,range=(0,1))
plt.show()
ceballos_loss_new = np.mean(large_survey < 0.5)
print(ceballos_loss_new)
| 51.470588 | 239 | 0.724 | 211 | 1,750 | 5.876777 | 0.218009 | 0.309677 | 0.232258 | 0.283871 | 0.545161 | 0.532258 | 0.532258 | 0.532258 | 0.525806 | 0.487097 | 0 | 0.025498 | 0.081143 | 1,750 | 33 | 240 | 53.030303 | 0.745647 | 0.032571 | 0 | 0 | 0 | 0 | 0.373373 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.142857 | 0 | 0.142857 | 0.238095 | 0 | 0 | 0 | null | 1 | 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 | 3 |
a7aeafb18ee175e470c2818aad6a821f78ee2207 | 115 | py | Python | deploy/virenv/lib/python2.7/site-packages/ptrace/version.py | wangvictor2012/liuwei | 0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1 | [
"BSD-3-Clause"
] | null | null | null | deploy/virenv/lib/python2.7/site-packages/ptrace/version.py | wangvictor2012/liuwei | 0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1 | [
"BSD-3-Clause"
] | null | null | null | deploy/virenv/lib/python2.7/site-packages/ptrace/version.py | wangvictor2012/liuwei | 0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1 | [
"BSD-3-Clause"
] | null | null | null | PACKAGE = "python-ptrace"
VERSION = "0.9"
WEBSITE = "http://python-ptrace.readthedocs.org/"
LICENSE = "GNU GPL v2"
| 23 | 49 | 0.695652 | 16 | 115 | 5 | 0.875 | 0.3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.029703 | 0.121739 | 115 | 4 | 50 | 28.75 | 0.762376 | 0 | 0 | 0 | 0 | 0 | 0.547826 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 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 | 3 |
a7be5b85b4ff0b938aed4d77c1eb70318f8a2920 | 52 | py | Python | datacoco_email_tools/__init__.py | equinoxfitness/datacoco-email_tools | 4ed70d3d57d40954622e1a0a22dda2c0619b9e7a | [
"MIT"
] | 2 | 2020-01-09T09:25:11.000Z | 2020-01-15T13:33:16.000Z | datacoco_email_tools/__init__.py | meikalei/datacoco-email_tools | fd230187589293ace9f67cec8e1c71765e959e08 | [
"MIT"
] | null | null | null | datacoco_email_tools/__init__.py | meikalei/datacoco-email_tools | fd230187589293ace9f67cec8e1c71765e959e08 | [
"MIT"
] | 2 | 2020-01-08T14:00:21.000Z | 2021-06-23T10:59:38.000Z | from .email_tools import Email
__all__ = ["Email"]
| 13 | 30 | 0.730769 | 7 | 52 | 4.714286 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 52 | 3 | 31 | 17.333333 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0.096154 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
a7c0d21cad36acc10da2753e5d9383bc15620a24 | 771 | py | Python | PlanheatMappingModule/PlanHeatDMM/model/refurbishment_level.py | Planheat/Planheat-Tool | 9764fcb86d3898b232c4cc333dab75ebe41cd421 | [
"MIT"
] | 2 | 2020-04-07T03:43:33.000Z | 2021-03-23T13:17:42.000Z | PlanheatMappingModule/PlanHeatDMM/model/refurbishment_level.py | Planheat/Planheat-Tool | 9764fcb86d3898b232c4cc333dab75ebe41cd421 | [
"MIT"
] | 1 | 2020-07-20T09:56:13.000Z | 2020-07-22T10:26:06.000Z | PlanheatMappingModule/PlanHeatDMM/model/refurbishment_level.py | Planheat/Planheat-Tool | 9764fcb86d3898b232c4cc333dab75ebe41cd421 | [
"MIT"
] | 1 | 2020-07-20T09:40:15.000Z | 2020-07-20T09:40:15.000Z | # -*- coding: utf-8 -*-
"""
Model Map refurbishment_level table
:author: Sergio Aparicio Vegas
:version: 0.2
:date: 29 Nov 2017
"""
__docformat__ = "restructuredtext"
class RefurbishmentLevel():
""" Refurbishment level options """
def __init__(self):
self.__id = 0
self.__level = ""
def __str__(self):
return "id:" + str(self.__id) + " level:" + self.__level
@property
def id(self):
return self.__id
@id.setter
def id(self, val):
self.__id = val
@property
def level(self):
return self.__level
@level.setter
def level(self, val):
self.__level = val
| 19.275 | 68 | 0.50454 | 77 | 771 | 4.675325 | 0.428571 | 0.066667 | 0.05 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.021097 | 0.385214 | 771 | 40 | 69 | 19.275 | 0.738397 | 0.203632 | 0 | 0.105263 | 0 | 0 | 0.044143 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.315789 | false | 0 | 0 | 0.157895 | 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 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
a7caf594d96d04a564b9da163b1661cf7ae48cfe | 92 | py | Python | med_files_api/medicine/apps.py | TheProrok29/med-files-api | 4f00ea016143f04106fce34e86c630081ed6d46a | [
"MIT"
] | null | null | null | med_files_api/medicine/apps.py | TheProrok29/med-files-api | 4f00ea016143f04106fce34e86c630081ed6d46a | [
"MIT"
] | 6 | 2021-03-30T13:02:39.000Z | 2022-03-12T00:24:41.000Z | med_files_api/medicine/apps.py | TheProrok29/med-files-api | 4f00ea016143f04106fce34e86c630081ed6d46a | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class MedicinesConfig(AppConfig):
name = 'medicine'
| 15.333333 | 33 | 0.76087 | 10 | 92 | 7 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.163043 | 92 | 5 | 34 | 18.4 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0.086957 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 1 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
a7d69a02c31fbc23a5869db104324cb1fbba9dab | 1,003 | py | Python | users/migrations/0005_auto_20210214_0117.py | LuisManuelGlz/twitter-clone-server | a794f3322b9a02b480f026e4ce1342f9c4641d7d | [
"MIT"
] | null | null | null | users/migrations/0005_auto_20210214_0117.py | LuisManuelGlz/twitter-clone-server | a794f3322b9a02b480f026e4ce1342f9c4641d7d | [
"MIT"
] | null | null | null | users/migrations/0005_auto_20210214_0117.py | LuisManuelGlz/twitter-clone-server | a794f3322b9a02b480f026e4ce1342f9c4641d7d | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2021-02-14 01:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0004_auto_20210212_0515'),
]
operations = [
migrations.AddField(
model_name='profile',
name='followers',
field=models.ManyToManyField(blank=True, null=True, related_name='_profile_followers_+', to='users.Profile'),
),
migrations.AddField(
model_name='profile',
name='followers_total',
field=models.IntegerField(default=0),
),
migrations.AddField(
model_name='profile',
name='following',
field=models.ManyToManyField(blank=True, null=True, related_name='_profile_following_+', to='users.Profile'),
),
migrations.AddField(
model_name='profile',
name='following_total',
field=models.IntegerField(default=0),
),
]
| 29.5 | 121 | 0.591226 | 97 | 1,003 | 5.938144 | 0.443299 | 0.114583 | 0.159722 | 0.1875 | 0.711806 | 0.711806 | 0.586806 | 0.392361 | 0.392361 | 0.211806 | 0 | 0.046154 | 0.287139 | 1,003 | 33 | 122 | 30.393939 | 0.759441 | 0.044865 | 0 | 0.518519 | 1 | 0 | 0.177824 | 0.024059 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.037037 | 0 | 0.148148 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 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 | 3 |
a7d8c6b26c4932d169601dc3941f353ab4be4cb1 | 852 | py | Python | src/model/create_dataset.py | Nix-code/Nix-code-Neural-Machine-Translation-communication-system-to-diminish-language-barrier | f54d3ad007a3a6b20101522bf9cc6300fb89cdf7 | [
"MIT"
] | 9 | 2021-12-31T01:31:41.000Z | 2022-01-09T12:24:28.000Z | src/model/create_dataset.py | Nix-code/Nix-code-Neural-Machine-Translation-communication-system-to-diminish-language-barrier | f54d3ad007a3a6b20101522bf9cc6300fb89cdf7 | [
"MIT"
] | null | null | null | src/model/create_dataset.py | Nix-code/Nix-code-Neural-Machine-Translation-communication-system-to-diminish-language-barrier | f54d3ad007a3a6b20101522bf9cc6300fb89cdf7 | [
"MIT"
] | 2 | 2021-12-31T01:31:44.000Z | 2022-01-04T11:41:39.000Z | # Neural Machine Translation communication system
from preprocess import*
"""
Cleaning the messages for better data processing.
Making two langauge pairs
"""
def create_dataset(location, sample_size):
"""Location is the path of the data and
sample_size is the total size we are taking
from entire dataset. Simply, size of the sample."""
lines = io.open(location, encoding='UTF-8').read().strip().split('\n')
# play around the function
# print(lines)
""" lan_pair is the pair of two langauges.
For example: Nepali:English / French:German"""
lan_pair = [[preprocess_data(w) for w in l.split('\t')] for l in lines[:sample_size]]
return zip(*lan_pair)
sample_size = 50000
sent, received = create_dataset(data_location, sample_size)
#print(sent[-1])
def max_length(tensor):
return max(len(t) for t in tensor)
| 29.37931 | 89 | 0.710094 | 128 | 852 | 4.625 | 0.554688 | 0.084459 | 0.060811 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009986 | 0.17723 | 852 | 28 | 90 | 30.428571 | 0.834522 | 0.271127 | 0 | 0 | 0 | 0 | 0.021077 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.111111 | 0.111111 | 0.555556 | 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 | 1 | 0 | 0 | 3 |
a7d9b4905a19b571128e06acc5f63faa268622ea | 87 | py | Python | 2 semester/PW/Coursera/Python/5 Week/8.py | kurpenok/Labs | 069c92b7964a1445d093313b38ebdc56318d2a73 | [
"MIT"
] | 1 | 2022-02-06T17:50:25.000Z | 2022-02-06T17:50:25.000Z | 2 semester/PW/Coursera/Python/5 Week/8.py | kurpenok/Labs | 069c92b7964a1445d093313b38ebdc56318d2a73 | [
"MIT"
] | null | null | null | 2 semester/PW/Coursera/Python/5 Week/8.py | kurpenok/Labs | 069c92b7964a1445d093313b38ebdc56318d2a73 | [
"MIT"
] | 1 | 2022-03-02T06:45:06.000Z | 2022-03-02T06:45:06.000Z | a = list(map(int, input().split()))
print(max(a), len(a) - a[::-1].index(max(a)) - 1)
| 21.75 | 49 | 0.528736 | 17 | 87 | 2.705882 | 0.647059 | 0.173913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.026316 | 0.126437 | 87 | 3 | 50 | 29 | 0.578947 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 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 | 1 | 0 | 3 |
a7dcfaa1aacc650fb632393dfedcdb4b5e0f1eb7 | 549 | py | Python | Model/User.py | TheConstructRIT/Machine-Swipe-System | 857e5c5205638a212736d58ac9e1ae27fa300946 | [
"MIT"
] | null | null | null | Model/User.py | TheConstructRIT/Machine-Swipe-System | 857e5c5205638a212736d58ac9e1ae27fa300946 | [
"MIT"
] | null | null | null | Model/User.py | TheConstructRIT/Machine-Swipe-System | 857e5c5205638a212736d58ac9e1ae27fa300946 | [
"MIT"
] | null | null | null | """
Zachary Cook
Class representing a lab user.
"""
"""
Class for a user.
"""
class User():
"""
Constructor for the user.
"""
def __init__(self,id,maxSessionTime,accessType="UNAUTHORIZED"):
self.id = id
self.accessType = accessType
self.maxSessionTime = maxSessionTime
"""
Returns the user's id.
"""
def getId(self):
return self.id
"""
Returns the access type of the user.
"""
def getAccessType(self):
return self.accessType
"""
Returns the max session time.
"""
def getSessionTime(self):
return self.maxSessionTime | 15.25 | 64 | 0.68306 | 68 | 549 | 5.455882 | 0.426471 | 0.056604 | 0.113208 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.183971 | 549 | 36 | 65 | 15.25 | 0.828125 | 0.127505 | 0 | 0 | 0 | 0 | 0.037383 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.363636 | false | 0 | 0 | 0.272727 | 0.727273 | 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 | 1 | 0 | 0 | 3 |
38ef2f6abf203e5524bd4b5ec3b28f9fb7b7e241 | 36,490 | py | Python | pycatia/hybrid_shape_interfaces/hybrid_shape_sweep_conic.py | evereux/catia_python | 08948585899b12587b0415ce3c9191a408b34897 | [
"MIT"
] | 90 | 2019-02-21T10:05:28.000Z | 2022-03-19T01:53:41.000Z | pycatia/hybrid_shape_interfaces/hybrid_shape_sweep_conic.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | 99 | 2019-05-21T08:29:12.000Z | 2022-03-25T09:55:15.000Z | pycatia/hybrid_shape_interfaces/hybrid_shape_sweep_conic.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | 26 | 2019-04-04T06:31:36.000Z | 2022-03-30T07:24:47.000Z | #! usr/bin/python3.6
"""
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-07-06 14:02:20.222384
.. warning::
The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
They are there as a guide as to how the visual basic / catscript functions work
and thus help debugging in pycatia.
"""
from pycatia.hybrid_shape_interfaces.hybrid_shape_sweep import HybridShapeSweep
from pycatia.in_interfaces.reference import Reference
from pycatia.knowledge_interfaces.angle import Angle
from pycatia.knowledge_interfaces.length import Length
class HybridShapeSweepConic(HybridShapeSweep):
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| System.IUnknown
| System.IDispatch
| System.CATBaseUnknown
| System.CATBaseDispatch
| System.AnyObject
| MecModInterfaces.HybridShape
| CATGSMIDLItf.HybridShapeSweep
| HybridShapeSweepConic
|
| Represents the hybrid shape conic sweep feature.
| Role: To access the data of the conic sweep feature .
|
| Use the HybridShapeFactory.AddNewSweepConic to create a HybridShapeConicSweep
| object.
"""
def __init__(self, com_object):
super().__init__(com_object)
self.hybrid_shape_sweep_conic = com_object
@property
def canonical_detection(self) -> int:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property CanonicalDetection() As long
|
| Returns or sets whether canonical surfaces of the swept surface are
| detected.
| Legal values:
| 0 No detection of canonical surface is performed.
| 2 Detection of canonical surfaces is performed.
:return: int
:rtype: int
"""
return self.hybrid_shape_sweep_conic.CanonicalDetection
@canonical_detection.setter
def canonical_detection(self, value: int):
"""
:param int value:
"""
self.hybrid_shape_sweep_conic.CanonicalDetection = value
@property
def fifth_guide_crv(self) -> Reference:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property FifthGuideCrv() As Reference
|
| Returns or sets the fifth guide curve.
:return: Reference
:rtype: Reference
"""
return Reference(self.hybrid_shape_sweep_conic.FifthGuideCrv)
@fifth_guide_crv.setter
def fifth_guide_crv(self, reference_curve: Reference):
"""
:param Reference reference_curve:
"""
self.hybrid_shape_sweep_conic.FifthGuideCrv = reference_curve.com_object
@property
def first_guide_crv(self) -> Reference:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property FirstGuideCrv() As Reference
|
| Returns or sets the first guide curve.
:return: Reference
:rtype: Reference
"""
return Reference(self.hybrid_shape_sweep_conic.FirstGuideCrv)
@first_guide_crv.setter
def first_guide_crv(self, reference_curve: Reference):
"""
:param Reference reference_curve:
"""
self.hybrid_shape_sweep_conic.FirstGuideCrv = reference_curve.com_object
@property
def fourth_guide_crv(self) -> Reference:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property FourthGuideCrv() As Reference
|
| Returns or sets the fourth guide curve.
:return: Reference
:rtype: Reference
"""
return Reference(self.hybrid_shape_sweep_conic.FourthGuideCrv)
@fourth_guide_crv.setter
def fourth_guide_crv(self, reference_curve: Reference):
"""
:param Reference reference_curve:
"""
self.hybrid_shape_sweep_conic.FourthGuideCrv = reference_curve.com_object
@property
def guide_deviation(self) -> Length:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property GuideDeviation() As Length (Read Only)
|
| Returns deviation value (length) from guide curves allowed during sweeping
| operation in order to smooth it.
:return: Length
:rtype: Length
"""
return Length(self.hybrid_shape_sweep_conic.GuideDeviation)
@property
def guide_deviation_activity(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property GuideDeviationActivity() As boolean
|
| Returns or sets information whether a deviation from guide curves is
| allowed or not.
| Gives the information on performing smoothinh during sweeping
| operation.
| TRUE or FALSE (FALSE if not specified).
:return: bool
:rtype: bool
"""
return self.hybrid_shape_sweep_conic.GuideDeviationActivity
@guide_deviation_activity.setter
def guide_deviation_activity(self, value: bool):
"""
:param bool value:
"""
self.hybrid_shape_sweep_conic.GuideDeviationActivity = value
@property
def parameter(self) -> float:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property Parameter() As double
|
| Returns or sets the parameter for conic sweep operation.
| if the parameter is a law, the method returns FALSE see
| HybridShapeLawDistProj
:return: float
:rtype: float
"""
return self.hybrid_shape_sweep_conic.Parameter
@parameter.setter
def parameter(self, value: float):
"""
:param float value:
"""
self.hybrid_shape_sweep_conic.Parameter = value
@property
def parameter_law(self) -> Reference:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property ParameterLaw() As Reference
|
| Returns or sets the parameter law useful in conic sweep operation.
:return: Reference
:rtype: Reference
"""
return Reference(self.hybrid_shape_sweep_conic.ParameterLaw)
@parameter_law.setter
def parameter_law(self, reference_law: Reference):
"""
:param Reference reference_law:
"""
self.hybrid_shape_sweep_conic.ParameterLaw = reference_law.com_object
@property
def parameter_law_inversion(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property ParameterLawInversion() As boolean
|
| Returns or sets the parameter law inversion flag of conic sweep
| operation.
| TRUE if parameter law is inverted. Else it is FALSE. see
| HybridShapeLawDistProj
:return: bool
:rtype: bool
"""
return self.hybrid_shape_sweep_conic.ParameterLawInversion
@parameter_law_inversion.setter
def parameter_law_inversion(self, value: bool):
"""
:param bool value:
"""
self.hybrid_shape_sweep_conic.ParameterLawInversion = value
@property
def parameter_law_type(self) -> int:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property ParameterLawType() As long
|
| Returns or sets the parameter law type in conic sweep operation.
:return: int
:rtype: int
"""
return self.hybrid_shape_sweep_conic.ParameterLawType
@parameter_law_type.setter
def parameter_law_type(self, value: int):
"""
:param int value:
"""
self.hybrid_shape_sweep_conic.ParameterLawType = value
@property
def second_guide_crv(self) -> Reference:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property SecondGuideCrv() As Reference
|
| Returns or sets the second guide curve.
:return: Reference
:rtype: Reference
"""
return Reference(self.hybrid_shape_sweep_conic.SecondGuideCrv)
@second_guide_crv.setter
def second_guide_crv(self, reference_curve: Reference):
"""
:param Reference reference_curve:
"""
self.hybrid_shape_sweep_conic.SecondGuideCrv = reference_curve.com_object
@property
def smooth_activity(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property SmoothActivity() As boolean
|
| Returns or sets information whether sweeping operation is smoothed or
| not.
| TRUE or FALSE (FALSE if not specified).
:return: bool
:rtype: bool
"""
return self.hybrid_shape_sweep_conic.SmoothActivity
@smooth_activity.setter
def smooth_activity(self, value: bool):
"""
:param bool value:
"""
self.hybrid_shape_sweep_conic.SmoothActivity = value
@property
def smooth_angle_threshold(self) -> Angle:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property SmoothAngleThreshold() As Angle (Read Only)
|
| Returns angular threshold under which discontinuities .
| moving frame,tangency net on reference surface will be smoothed when
| sweeping.
:return: Angle
:rtype: Angle
"""
return Angle(self.hybrid_shape_sweep_conic.SmoothAngleThreshold)
@property
def spine(self) -> Reference:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property Spine() As Reference
|
| Returns or sets the spine (optional) for sweep operation.
| param : oElem Spine curve.
|
| See also:
| Reference
:return: Reference
:rtype: Reference
"""
return Reference(self.hybrid_shape_sweep_conic.Spine)
@spine.setter
def spine(self, reference_spine: Reference):
"""
:param Reference reference_spine:
"""
self.hybrid_shape_sweep_conic.Spine = reference_spine.com_object
@property
def third_guide_crv(self) -> Reference:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property ThirdGuideCrv() As Reference
|
| Returns or sets the third guide curve.
:return: Reference
:rtype: Reference
"""
return Reference(self.hybrid_shape_sweep_conic.ThirdGuideCrv)
@third_guide_crv.setter
def third_guide_crv(self, reference_curve: Reference):
"""
:param Reference reference_curve:
"""
self.hybrid_shape_sweep_conic.ThirdGuideCrv = reference_curve.com_object
def get_longitudinal_relimiters(self, op_ia_elem1: Reference, op_ia_elem2: Reference) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub GetLongitudinalRelimiters(Reference opIAElem1,
| Reference opIAElem2)
|
| Deprecated:
| V5R16 CATHybridShapeSweepConic#GetRelimiters Gets the elements
| relimiting the spine (or the default spine).
| param : opIAElem1 First relimiting feature (plane or point)
| param : opIAElem2 Second relimiting feature (plane or point)
:param Reference op_ia_elem1:
:param Reference op_ia_elem2:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.GetLongitudinalRelimiters(op_ia_elem1.com_object, op_ia_elem2.com_object)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'get_longitudinal_relimiters'
# # vba_code = """
# # Public Function get_longitudinal_relimiters(hybrid_shape_sweep_conic)
# # Dim opIAElem1 (2)
# # hybrid_shape_sweep_conic.GetLongitudinalRelimiters opIAElem1
# # get_longitudinal_relimiters = opIAElem1
# # End Function
# # """
# # system_service = self.application.system_service
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def get_nb_guides(self, o_num: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub GetNbGuides(long oNum)
|
| Gets the number of guides.
| param : oNum Number of guides curve.
:param int o_num:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.GetNbGuides(o_num)
def get_parameter_law(self, o_param_start: float, o_param_end: float, o_law_type: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub GetParameterLaw(double oParamStart,
| double oParamEnd,
| long oLawType)
|
| Gets the parameter law used in conic sweep operation.
| param : oParamStart Parameter law start value.
| param : oParamEnd Parameter law end value.
| param : oLawType Parameter law type.
:param float o_param_start:
:param float o_param_end:
:param int o_law_type:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.GetParameterLaw(o_param_start, o_param_end, o_law_type)
def get_relimiters(self, op_ia_elem1: Reference, op_orient1: int, op_ia_elem2: Reference, op_orient2: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub GetRelimiters(Reference opIAElem1,
| long opOrient1,
| Reference opIAElem2,
| long opOrient2)
|
| Retrieves the elements relimiting the spine (or the default
| spine).
|
| Parameters:
|
| opIAElem1
| The first relimiting feature (plane or point)
| opOrient1
| Split direction for the first relimitation
| 0 means that the beginning of the spine (considering its
| orientation) is removed, 1 means that the end of the spine is removed
|
| opIAElem2
| The second relimiting feature (plane or point)
| opOrient2
| Split direction for the second relimitation
:param Reference op_ia_elem1:
:param int op_orient1:
:param Reference op_ia_elem2:
:param int op_orient2:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.GetRelimiters(op_ia_elem1.com_object, op_orient1, op_ia_elem2.com_object,
op_orient2)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'get_relimiters'
# # vba_code = """
# # Public Function get_relimiters(hybrid_shape_sweep_conic)
# # Dim opIAElem1 (2)
# # hybrid_shape_sweep_conic.GetRelimiters opIAElem1
# # get_relimiters = opIAElem1
# # End Function
# # """
# # system_service = self.application.system_service
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def get_tangency(self, op_ia_elem: Reference, op_ia_angle_start: Angle, op_ia_angle_end: Angle, o_law_type: int,
i_index: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub GetTangency(Reference opIAElem,
| Angle opIAAngleStart,
| Angle opIAAngleEnd,
| long oLawType,
| long iIndex)
|
| Gets tangency surface or curve and its angle given the guide curve
| index.
| param : opIAElem
| param : opIAAngleStart Start tangency angle from surface or curve reference.
| param : opIAAngleEnd End tangency angle from surface or curve reference.
| param : oLawType Type of law used for tangency angle from surface or curve reference.
| param : iIndex Guide curve index : 1 to 5.
:param Reference op_ia_elem:
:param Angle op_ia_angle_start:
:param Angle op_ia_angle_end:
:param int o_law_type:
:param int i_index:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.GetTangency(op_ia_elem.com_object, op_ia_angle_start.com_object,
op_ia_angle_end.com_object, o_law_type, i_index)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'get_tangency'
# # vba_code = """
# # Public Function get_tangency(hybrid_shape_sweep_conic)
# # Dim opIAElem (2)
# # hybrid_shape_sweep_conic.GetTangency opIAElem
# # get_tangency = opIAElem
# # End Function
# # """
# # system_service = self.application.system_service
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def get_tangency_angle_law_inversion(self, i_index: int, o_inversion: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub GetTangencyAngleLawInversion(long iIndex,
| long oInversion)
|
| Gets information whether tangency angle law has to be inverted or not for a
| specified guide curve.
| param : iIndex Guide curve index : 1 to 5
| param : oInversion Non-Zero for TRUE and 0 for FALSE.
:param int i_index:
:param int o_inversion:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.GetTangencyAngleLawInversion(i_index, o_inversion)
def get_tangency_law(self, op_ia_elem: Reference, op_ia_law: Reference, i_index: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub GetTangencyLaw(Reference opIAElem,
| Reference opIALaw,
| long iIndex)
|
| Gets tangency surface or curve and its angle given the guide curve
| index.
| param : opIAElem Tangency surface or curve feature.
| param : opIALaw Start tangency angle from surface or curve reference.
| param : iIndex Guide curve index : 1 to 5.
:param Reference op_ia_elem:
:param Reference op_ia_law:
:param int i_index:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.GetTangencyLaw(op_ia_elem.com_object, op_ia_law.com_object, i_index)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'get_tangency_law'
# # vba_code = """
# # Public Function get_tangency_law(hybrid_shape_sweep_conic)
# # Dim opIAElem (2)
# # hybrid_shape_sweep_conic.GetTangencyLaw opIAElem
# # get_tangency_law = opIAElem
# # End Function
# # """
# # system_service = self.application.system_service
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def remove_guide(self, i_index: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub RemoveGuide(long iIndex)
|
| Removes a guide curve given its index.
| it removes also tangency element if specified.
| param : iIndex Guide curve index : 1 to 5. If 0, all guides are removed.
:param int i_index:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.RemoveGuide(i_index)
def remove_parameter(self) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub RemoveParameter()
|
| Removes conical sweep parameter, whether it is a single value or a law.
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.RemoveParameter()
def remove_tangency(self, i_index: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub RemoveTangency(long iIndex)
|
| removes tangency surface or curve and its angle given the guide curve
| index.
| param : iIndex Guide curve index : 1 to 5.
:param int i_index:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.RemoveTangency(i_index)
def set_guide_deviation(self, i_length: float) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub SetGuideDeviation(double iLength)
|
| Sets deviation value (length) from guide curves allowed during sweeping
| operation in order to smooth it.
| param : iLength Numerical value.
:param float i_length:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.SetGuideDeviation(i_length)
def set_longitudinal_relimiters(self, ip_ia_elem1: Reference, ip_ia_elem2: Reference) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub SetLongitudinalRelimiters(Reference ipIAElem1,
| Reference ipIAElem2)
|
| Deprecated:
| V5R16 CATHybridShapeSweepConic#SetRelimiters Sets the elements
| relimiting the spine (or the default spine).
| param : ipIAElem1 First relimiting feature (plane or point)
| param : ipIAElem2 Second relimiting feature (plane or point)
:param Reference ip_ia_elem1:
:param Reference ip_ia_elem2:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.SetLongitudinalRelimiters(ip_ia_elem1.com_object, ip_ia_elem2.com_object)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_longitudinal_relimiters'
# # vba_code = """
# # Public Function set_longitudinal_relimiters(hybrid_shape_sweep_conic)
# # Dim ipIAElem1 (2)
# # hybrid_shape_sweep_conic.SetLongitudinalRelimiters ipIAElem1
# # set_longitudinal_relimiters = ipIAElem1
# # End Function
# # """
# # system_service = self.application.system_service
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_parameter_law(self, i_param_start: float, i_param_end: float, i_law_type: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub SetParameterLaw(double iParamStart,
| double iParamEnd,
| long iLawType)
|
| Sets the parameter law that will be used in conic sweep
| operation.
| param : iParamStart Parameter law start value.
| param : iParamEnd Parameter law end value.
| param : iLawType Parameter law type.
:param float i_param_start:
:param float i_param_end:
:param int i_law_type:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.SetParameterLaw(i_param_start, i_param_end, i_law_type)
def set_relimiters(self, ip_ia_elem1: Reference, ip_orient1: int, ip_ia_elem2: Reference, ip_orient2: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub SetRelimiters(Reference ipIAElem1,
| long ipOrient1,
| Reference ipIAElem2,
| long ipOrient2)
|
| Sets the elements relimiting the spine (or the default
| spine).
|
| Parameters:
|
| ipIAElem1
| The first relimiting feature (plane or point)
| ipOrient1
| Split direction for the first relimitation
| 0 means that the beginning of the spine (considering its
| orientation) is removed, 1 means that the end of the spine is removed
|
| ipIAElem2
| The second relimiting feature (plane or point)
| ipOrient2
| Split direction for the second relimitation
:param Reference ip_ia_elem1:
:param int ip_orient1:
:param Reference ip_ia_elem2:
:param int ip_orient2:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.SetRelimiters(ip_ia_elem1.com_object, ip_orient1, ip_ia_elem2.com_object,
ip_orient2)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_relimiters'
# # vba_code = """
# # Public Function set_relimiters(hybrid_shape_sweep_conic)
# # Dim ipIAElem1 (2)
# # hybrid_shape_sweep_conic.SetRelimiters ipIAElem1
# # set_relimiters = ipIAElem1
# # End Function
# # """
# # system_service = self.application.system_service
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_smooth_angle_threshold(self, i_angle: float) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub SetSmoothAngleThreshold(double iAngle)
|
| Sets angular threshold under which discontinuities.
| note: moving frame,tangency net on reference surface will be smoothed when
| sweeping.
| param : iAngle Numerical value.
:param float i_angle:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.SetSmoothAngleThreshold(i_angle)
def set_tangency(self, ip_ia_elem: Reference, i_angle_start: float, i_angle_end: float, ilaw_type: int,
i_index: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub SetTangency(Reference ipIAElem,
| double iAngleStart,
| double iAngleEnd,
| long ilawType,
| long iIndex)
|
| Sets tangency surface or curve and its angle given the guide curve
| index.
| param : ipIAElem Tangency surface or curve feature.
| param : iAngleStart Start tangency angle from surface or curve reference.
| param : iAngleEnd End tangency angle from surface or curve reference.
| param : iAngleLawType Type of law used for tangency angle from surface or curve reference.
| param : iIndex Guide curve index : 1 to 5.
:param Reference ip_ia_elem:
:param float i_angle_start:
:param float i_angle_end:
:param int ilaw_type:
:param int i_index:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.SetTangency(ip_ia_elem.com_object, i_angle_start, i_angle_end, ilaw_type,
i_index)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_tangency'
# # vba_code = """
# # Public Function set_tangency(hybrid_shape_sweep_conic)
# # Dim ipIAElem (2)
# # hybrid_shape_sweep_conic.SetTangency ipIAElem
# # set_tangency = ipIAElem
# # End Function
# # """
# # system_service = self.application.system_service
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_tangency_angle_law_inversion(self, i_index: int, i_inversion: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub SetTangencyAngleLawInversion(long iIndex,
| long iInversion)
|
| Sets information whether tangency angle law has to be inverted or not for a
| specified guide curve.
| param : iIndex Guide curve index : 1 to 5
| param : iInversion 1 for TRUE and 0 for FALSE.
:param int i_index:
:param int i_inversion:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.SetTangencyAngleLawInversion(i_index, i_inversion)
def set_tangency_law(self, ip_ia_elem: Reference, ip_ia_law: Reference, i_index: int) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub SetTangencyLaw(Reference ipIAElem,
| Reference ipIALaw,
| long iIndex)
|
| Sets tangency surface or curve and its angle given the guide curve
| index.
| param : ipIAElem Tangency surface or curve feature.
| param : ipIALaw Start tangency angle from surface or curve reference.
| param : iIndex Guide curve index : 1 to 5.
:param Reference ip_ia_elem:
:param Reference ip_ia_law:
:param int i_index:
:return: None
:rtype: None
"""
return self.hybrid_shape_sweep_conic.SetTangencyLaw(ip_ia_elem.com_object, ip_ia_law.com_object, i_index)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_tangency_law'
# # vba_code = """
# # Public Function set_tangency_law(hybrid_shape_sweep_conic)
# # Dim ipIAElem (2)
# # hybrid_shape_sweep_conic.SetTangencyLaw ipIAElem
# # set_tangency_law = ipIAElem
# # End Function
# # """
# # system_service = self.application.system_service
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def __repr__(self):
return f'HybridShapeSweepConic(name="{self.name}")'
| 37.425641 | 119 | 0.565799 | 3,890 | 36,490 | 5.133933 | 0.084576 | 0.036353 | 0.051274 | 0.066246 | 0.735517 | 0.676531 | 0.602173 | 0.57223 | 0.557208 | 0.546142 | 0 | 0.036992 | 0.362154 | 36,490 | 974 | 120 | 37.464066 | 0.821053 | 0.60929 | 0 | 0.125 | 1 | 0 | 0.004293 | 0.004293 | 0 | 0 | 0 | 0 | 0 | 1 | 0.352941 | false | 0 | 0.029412 | 0.007353 | 0.639706 | 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 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
ac131b8245d5044a1d1954cbe329ce3bab401b27 | 242 | py | Python | {{cookiecutter.project_slug}}/src/users/factory.py | nvo87/django | fd07fb74ab59e868c73512cd0ca4952129b44cd8 | [
"MIT"
] | 98 | 2020-04-21T20:22:16.000Z | 2021-06-07T12:33:51.000Z | {{cookiecutter.project_slug}}/src/users/factory.py | nvo87/django | fd07fb74ab59e868c73512cd0ca4952129b44cd8 | [
"MIT"
] | 70 | 2020-04-21T21:59:49.000Z | 2021-06-13T13:35:01.000Z | {{cookiecutter.project_slug}}/src/users/factory.py | ginsenghillock/django | 65ab4f52897ca7efdfde347383153fca4f2d2c14 | [
"MIT"
] | 23 | 2020-04-23T06:03:13.000Z | 2021-06-09T06:59:34.000Z | from django.contrib.auth.models import AnonymousUser
from app.testing import register
@register
def user(self, **kwargs):
return self.mixer.blend('users.User', **kwargs)
@register
def anon(self, **kwargs):
return AnonymousUser()
| 17.285714 | 52 | 0.735537 | 31 | 242 | 5.741935 | 0.612903 | 0.123596 | 0.179775 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.140496 | 242 | 13 | 53 | 18.615385 | 0.855769 | 0 | 0 | 0.25 | 0 | 0 | 0.041322 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0.25 | 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 | 1 | 1 | 0 | 0 | 3 |
ac383c785b7e03f22fe53c30a131bdc8776ecf99 | 186 | py | Python | amazon/sentiment.py | chanduparmar/Amazon_Website_Scraping_Scrapy | e63dd2592bc1ba9de26d091f398f29a8200592b6 | [
"MIT"
] | 4 | 2018-06-27T15:52:17.000Z | 2020-01-11T14:44:09.000Z | amazon/sentiment.py | chanduparmar/Amazon_Website_Scraping_Scrapy | e63dd2592bc1ba9de26d091f398f29a8200592b6 | [
"MIT"
] | null | null | null | amazon/sentiment.py | chanduparmar/Amazon_Website_Scraping_Scrapy | e63dd2592bc1ba9de26d091f398f29a8200592b6 | [
"MIT"
] | 2 | 2018-08-24T03:27:42.000Z | 2020-09-01T00:46:01.000Z | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import nltk
from nltk.corpus import stopwords
amazon = pd.read_csv('amazon.csv')
print(amazon.head())
| 20.666667 | 35 | 0.736559 | 29 | 186 | 4.689655 | 0.62069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.188172 | 186 | 8 | 36 | 23.25 | 0.900662 | 0 | 0 | 0 | 0 | 0 | 0.05618 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.714286 | 0 | 0.714286 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
ac48806aabb549d4efbed82ef7a386e8484be02c | 152 | py | Python | HSInfo/projeto/apps.py | burgues0/django-basic-site | 3ea157f0c8aa3dd02c42edb2d448e6e2bddf7c07 | [
"MIT"
] | null | null | null | HSInfo/projeto/apps.py | burgues0/django-basic-site | 3ea157f0c8aa3dd02c42edb2d448e6e2bddf7c07 | [
"MIT"
] | null | null | null | HSInfo/projeto/apps.py | burgues0/django-basic-site | 3ea157f0c8aa3dd02c42edb2d448e6e2bddf7c07 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class ProjetoConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'projeto'
| 21.714286 | 57 | 0.730263 | 17 | 152 | 6.411765 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.184211 | 152 | 6 | 58 | 25.333333 | 0.879032 | 0 | 0 | 0 | 0 | 0 | 0.246575 | 0.19863 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 1 | 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 | 1 | 0 | 0 | 3 |
ac66701fa623f9a900363e426640453944b4eaa4 | 1,114 | py | Python | petra_viewer/widgets/batch_progress.py | yamedvedya/data_viewer | c6238b71edcf0178ebe8ab8f9bf6e56e41cd4916 | [
"MIT"
] | null | null | null | petra_viewer/widgets/batch_progress.py | yamedvedya/data_viewer | c6238b71edcf0178ebe8ab8f9bf6e56e41cd4916 | [
"MIT"
] | null | null | null | petra_viewer/widgets/batch_progress.py | yamedvedya/data_viewer | c6238b71edcf0178ebe8ab8f9bf6e56e41cd4916 | [
"MIT"
] | null | null | null | # Created by matveyev at 06.05.2021
from PyQt5 import QtCore, QtWidgets
from petra_viewer.gui.batch_ui import Ui_batch
# ----------------------------------------------------------------------
class BatchProgress(QtWidgets.QWidget):
stop_batch = QtCore.pyqtSignal()
# ----------------------------------------------------------------------
def __init__(self):
super(BatchProgress, self).__init__()
self._ui = Ui_batch()
self._ui.setupUi(self)
self._ui.but_box.clicked.connect(self._button_clicked)
# --------------------------------------------------------------------
def clear(self):
self._ui.tx_status.clear()
self._ui.pb_progress.setValue(0)
# ----------------------------------------------------------------------
def add_values(self, text, progress):
self._ui.tx_status.append(text)
self._ui.pb_progress.setValue(progress*100)
# ----------------------------------------------------------------------
def _button_clicked(self, button):
pass
self.stop_batch.emit()
self.close() | 30.944444 | 76 | 0.443447 | 98 | 1,114 | 4.72449 | 0.479592 | 0.090713 | 0.043197 | 0.060475 | 0.103672 | 0 | 0 | 0 | 0 | 0 | 0 | 0.014054 | 0.169659 | 1,114 | 36 | 77 | 30.944444 | 0.486486 | 0.346499 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.210526 | false | 0.052632 | 0.105263 | 0 | 0.421053 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
ac6729f293b2af4b4c8b40274b0a9e23f390dbd2 | 2,167 | py | Python | src/xsd_members/migrations/0005_auto_djfb_to_allauth.py | minyiky/xSACdb | 8c407e9a9da196750a66ad53613ad67c8c56e1c3 | [
"MIT"
] | 2 | 2017-08-14T14:40:17.000Z | 2019-02-07T13:10:23.000Z | src/xsd_members/migrations/0005_auto_djfb_to_allauth.py | minyiky/xSACdb | 8c407e9a9da196750a66ad53613ad67c8c56e1c3 | [
"MIT"
] | 19 | 2016-02-07T18:02:53.000Z | 2019-11-03T17:48:13.000Z | src/xsd_members/migrations/0005_auto_djfb_to_allauth.py | minyiky/xSACdb | 8c407e9a9da196750a66ad53613ad67c8c56e1c3 | [
"MIT"
] | 4 | 2015-10-19T17:24:35.000Z | 2021-05-12T07:30:32.000Z | # -*- coding: utf-8 -*-
from django.db import models, migrations
from allauth.socialaccount.models import SocialAccount
def copy_fb_data(apps, schema_editor):
model = apps.get_model('xsd_members', 'MemberProfile')
db_alias = schema_editor.connection.alias
objects = model.objects.using(db_alias).all()
for obj in objects:
if obj.facebook_id:
sa = SocialAccount(
user_id = obj.user.pk,
provider = 'facebook',
uid = obj.facebook_id,
last_login = obj.user.last_login,
date_joined = obj.user.date_joined,
extra_data = obj.raw_data
)
sa.save()
class Migration(migrations.Migration):
dependencies = [
('xsd_members', '0004_auto_20141115_1625'),
]
operations = [
migrations.RunPython(copy_fb_data),
migrations.RemoveField(
model_name='memberprofile',
name='about_me',
),
migrations.RemoveField(
model_name='memberprofile',
name='access_token',
),
migrations.RemoveField(
model_name='memberprofile',
name='blog_url',
),
migrations.RemoveField(
model_name='memberprofile',
name='facebook_id',
),
migrations.RemoveField(
model_name='memberprofile',
name='facebook_name',
),
migrations.RemoveField(
model_name='memberprofile',
name='facebook_open_graph',
),
migrations.RemoveField(
model_name='memberprofile',
name='facebook_profile_url',
),
migrations.RemoveField(
model_name='memberprofile',
name='image',
),
migrations.RemoveField(
model_name='memberprofile',
name='new_token_required',
),
migrations.RemoveField(
model_name='memberprofile',
name='raw_data',
),
migrations.RemoveField(
model_name='memberprofile',
name='website_url',
),
]
| 27.782051 | 58 | 0.552377 | 189 | 2,167 | 6.084656 | 0.37037 | 0.20087 | 0.248696 | 0.286957 | 0.489565 | 0.489565 | 0.326087 | 0 | 0 | 0 | 0 | 0.011989 | 0.345639 | 2,167 | 77 | 59 | 28.142857 | 0.799013 | 0.009691 | 0 | 0.485294 | 0 | 0 | 0.159515 | 0.010728 | 0 | 0 | 0 | 0 | 0 | 1 | 0.014706 | false | 0 | 0.029412 | 0 | 0.088235 | 0 | 0 | 0 | 0 | null | 1 | 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 | 3 |
ac6da854a5c70eca78a1ec0e02d5e686614664c1 | 225 | py | Python | Files_WebScraping/Task8.py | VikashK21/Coders_Life | 89af8bba2163d6331b760de33786caa49892da33 | [
"MIT"
] | 1 | 2021-11-30T10:30:16.000Z | 2021-11-30T10:30:16.000Z | Files_WebScraping/Task8.py | VikashK21/WebScraping | 560f316a787c4c3e8b51fc83a23acbc80cdb8fe5 | [
"MIT"
] | null | null | null | Files_WebScraping/Task8.py | VikashK21/WebScraping | 560f316a787c4c3e8b51fc83a23acbc80cdb8fe5 | [
"MIT"
] | null | null | null |
# This question is just about the json files that is also known as cache files.
# Which we have already used in the previous tasks, the json files.
# In the json file we can easily access the data without any network issue.
| 45 | 79 | 0.768889 | 41 | 225 | 4.219512 | 0.731707 | 0.121387 | 0.138728 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 225 | 4 | 80 | 56.25 | 0.961111 | 0.964444 | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
ac78faaba19c9f97aad2d30987c5c2da9d0d658b | 108 | py | Python | factorial.py | varunverma760/Python | c55ad3aeb4c752c2b0a9e665631f1f7ead0b3390 | [
"MIT"
] | null | null | null | factorial.py | varunverma760/Python | c55ad3aeb4c752c2b0a9e665631f1f7ead0b3390 | [
"MIT"
] | null | null | null | factorial.py | varunverma760/Python | c55ad3aeb4c752c2b0a9e665631f1f7ead0b3390 | [
"MIT"
] | null | null | null | result =1
i=1
while i<=100:
result=result*i
i=i+1
pass
print("the factorial is {}".format(result)) | 15.428571 | 44 | 0.638889 | 20 | 108 | 3.45 | 0.55 | 0.057971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.068966 | 0.194444 | 108 | 7 | 44 | 15.428571 | 0.724138 | 0 | 0 | 0 | 0 | 0 | 0.184466 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.142857 | 0 | 0 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
3bb500d29f1b13b4e466a76752e72eeea0bd74be | 223 | py | Python | src/wsgi.py | Shroud007/cappa | f820423374fa7914e66e4e16ad275fd53621c43c | [
"MIT"
] | null | null | null | src/wsgi.py | Shroud007/cappa | f820423374fa7914e66e4e16ad275fd53621c43c | [
"MIT"
] | null | null | null | src/wsgi.py | Shroud007/cappa | f820423374fa7914e66e4e16ad275fd53621c43c | [
"MIT"
] | null | null | null | import os
import sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "src.settings")
sys.path[0:0] = [os.path.expanduser("~/django")]
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
| 24.777778 | 63 | 0.784753 | 32 | 223 | 5.28125 | 0.53125 | 0.08284 | 0.213018 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009756 | 0.080717 | 223 | 8 | 64 | 27.875 | 0.814634 | 0 | 0 | 0 | 0 | 0 | 0.189189 | 0.099099 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
3bbc1b0e8e151488a8053085791b77987f8188dc | 175,375 | py | Python | models_all_solvable2/rsyn0830m02h.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | 7 | 2019-05-08T19:14:34.000Z | 2021-12-24T00:00:40.000Z | models_all_solvable2/rsyn0830m02h.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | null | null | null | models_all_solvable2/rsyn0830m02h.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | 2 | 2020-05-21T22:15:51.000Z | 2020-06-02T23:02:08.000Z | # MINLP written by GAMS Convert at 05/15/20 00:51:16
#
# Equation counts
# Total E G L N X C B
# 1795 749 86 960 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc si
# Total cont binary integer sos1 sos2 scont sint
# 1173 925 248 0 0 0 0 0
# FX 0 0 0 0 0 0 0 0
#
# Nonzero counts
# Total const NL DLL
# 4245 4125 120 0
#
# Reformulation has removed 1 variable and 1 equation
from pyomo.environ import *
model = m = ConcreteModel()
m.x2 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x3 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x4 = Var(within=Reals,bounds=(0,None),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,None),initialize=0)
m.x36 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x37 = Var(within=Reals,bounds=(0,None),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,None),initialize=0)
m.x87 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x88 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x89 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x90 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x91 = Var(within=Reals,bounds=(0,None),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,None),initialize=0)
m.x171 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x172 = Var(within=Reals,bounds=(0,None),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.b470 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b471 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b472 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b473 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b474 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b475 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b476 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b477 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b478 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b479 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b480 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b481 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b482 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b483 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b484 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b485 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b486 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b487 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b488 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b489 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b490 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b491 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b492 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b493 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b494 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b495 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b496 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b497 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b498 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b499 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b500 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b501 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b502 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b503 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b504 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b505 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b506 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b507 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b508 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b509 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b510 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b511 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b512 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b513 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b514 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b515 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b516 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b517 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b518 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b519 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b520 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b521 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b522 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b523 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b524 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b525 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b526 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b527 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b528 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b529 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b530 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b531 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b532 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b533 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b534 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b535 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b536 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b537 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b538 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b539 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b540 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b541 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b542 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b543 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b544 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b545 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b546 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b547 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b548 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b549 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b550 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b551 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b552 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b553 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b554 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b555 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b556 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b557 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b558 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b559 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b560 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b561 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b562 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b563 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b564 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b565 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b566 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b567 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b568 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b569 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b570 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b571 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b572 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b573 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b574 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b575 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b576 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b577 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b578 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b579 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b580 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b581 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b582 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b583 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b584 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b585 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b586 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b587 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b588 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b589 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b590 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b591 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b592 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b593 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b594 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b595 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b596 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b597 = Var(within=Binary,bounds=(0,1),initialize=0)
m.x598 = Var(within=Reals,bounds=(0,40),initialize=0)
m.x599 = Var(within=Reals,bounds=(0,40),initialize=0)
m.x600 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x601 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x602 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x603 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x604 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x605 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x606 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x607 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x608 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x609 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x610 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x611 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x612 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x613 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x614 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x615 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x616 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x617 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x618 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x619 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x620 = Var(within=Reals,bounds=(0,30),initialize=0)
m.x621 = Var(within=Reals,bounds=(0,30),initialize=0)
m.x622 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x623 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x624 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x625 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x626 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x627 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x628 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x629 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x630 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x631 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x632 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x633 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x634 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x635 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x636 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x637 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x638 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x639 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x640 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x641 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x642 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x643 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x644 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x645 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x646 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x647 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x648 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x649 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x650 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x651 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x652 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x653 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x654 = Var(within=Reals,bounds=(0,20),initialize=0)
m.x655 = Var(within=Reals,bounds=(0,20),initialize=0)
m.x656 = Var(within=Reals,bounds=(0,20),initialize=0)
m.x657 = Var(within=Reals,bounds=(0,20),initialize=0)
m.x658 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x659 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x660 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x661 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x662 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x663 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x664 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x665 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x666 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x667 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x668 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x669 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x670 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x671 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x672 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x673 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x674 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x675 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x676 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x677 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x678 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x679 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x680 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x681 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x682 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x683 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x684 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x685 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x686 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x687 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x688 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x689 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x690 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x691 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x692 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x693 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x694 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x695 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x696 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x697 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x698 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x699 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x700 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x701 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x702 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x703 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x704 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x705 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x706 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x707 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x708 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x709 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x710 = Var(within=Reals,bounds=(0,30),initialize=0)
m.x711 = Var(within=Reals,bounds=(0,30),initialize=0)
m.x712 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x713 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x714 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x715 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x716 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x717 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x718 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x719 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x720 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x721 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x722 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x723 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x724 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x725 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x726 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x727 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x728 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x729 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x730 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x731 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x732 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x733 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x734 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x735 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x736 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x737 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x738 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x739 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x740 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x741 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x742 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x743 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x744 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x745 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x746 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x747 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x748 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x749 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x750 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x751 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x752 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x753 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x754 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x755 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x756 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x757 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x758 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x759 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x760 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x761 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x762 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x763 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x764 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x765 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x766 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x767 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x768 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x769 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x770 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x771 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x772 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x773 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x774 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x775 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x776 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x777 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x778 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x779 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x780 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x781 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x782 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x783 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x784 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x785 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x786 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x787 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x788 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x789 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x790 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x791 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x792 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x793 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x794 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x795 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x796 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x797 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x798 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x799 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x800 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x801 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x802 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x803 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x804 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x805 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x806 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x807 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x808 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x809 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x810 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x811 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x812 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x813 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x814 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x815 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x816 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x817 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x818 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x819 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x820 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x821 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x822 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x823 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x824 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x825 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x826 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x827 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x828 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x829 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x830 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x831 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x832 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x833 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x834 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x835 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x836 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x837 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x838 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x839 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x840 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x841 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x842 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x843 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x844 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x845 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x846 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x847 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x848 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x849 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x850 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x851 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x852 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x853 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x854 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x855 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x856 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x857 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x858 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x859 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x860 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x861 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x862 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x863 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x864 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x865 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x866 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x867 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x868 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x869 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x870 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x871 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x872 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x873 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x874 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x875 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x876 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x877 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x878 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x879 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x880 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x881 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x882 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x883 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x884 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x885 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x886 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x887 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x888 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x889 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x890 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x891 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x892 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x893 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x894 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x895 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x896 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x897 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x898 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x899 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x900 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x901 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x902 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x903 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x904 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x905 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x906 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x907 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x908 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x909 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x910 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x911 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x912 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x913 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x914 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x915 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x916 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x917 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x918 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x919 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x920 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x921 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x922 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x923 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x924 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x925 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x926 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x927 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x928 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x929 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x930 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x931 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x932 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x933 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x934 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x935 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x936 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x937 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x938 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x939 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x940 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x941 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x942 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x943 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x944 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x945 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x946 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x947 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x948 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x949 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x950 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x951 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x952 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x953 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x954 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x955 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x956 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x957 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x958 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x959 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x960 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x961 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x962 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x963 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x964 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x965 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x966 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x967 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x968 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x969 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x970 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x971 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x972 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x973 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x974 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x975 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x976 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x977 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x978 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x979 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x980 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x981 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x982 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x983 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x984 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x985 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x986 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x987 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x988 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x989 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x990 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x991 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x992 = Var(within=Reals,bounds=(0,None),initialize=0)
m.x993 = Var(within=Reals,bounds=(0,None),initialize=0)
m.b994 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b995 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b996 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b997 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b998 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b999 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1000 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1001 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1002 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1003 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1004 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1005 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1006 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1007 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1008 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1009 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1010 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1011 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1012 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1013 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1014 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1015 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1016 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1017 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1018 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1019 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1020 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1021 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1022 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1023 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1024 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1025 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1026 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1027 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1028 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1029 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1030 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1031 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1032 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1033 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1034 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1035 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1036 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1037 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1038 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1039 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1040 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1041 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1042 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1043 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1044 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1045 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1046 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1047 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1048 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1049 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1050 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1051 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1052 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1053 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1054 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1055 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1056 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1057 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1058 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1059 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1060 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1061 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1062 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1063 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1064 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1065 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1066 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1067 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1068 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1069 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1070 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1071 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1072 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1073 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1074 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1075 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1076 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1077 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1078 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1079 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1080 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1081 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1082 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1083 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1084 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1085 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1086 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1087 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1088 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1089 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1090 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1091 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1092 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1093 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1094 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1095 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1096 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1097 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1098 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1099 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1100 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1101 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1102 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1103 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1104 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1105 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1106 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1107 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1108 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1109 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1110 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1111 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1112 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b1113 = Var(within=Binary,bounds=(0,1),initialize=0)
m.x1114 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1115 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1116 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1117 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1118 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1119 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1120 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1121 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1122 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1123 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1124 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1125 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1126 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1127 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1128 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1129 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1130 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1131 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1132 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1133 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1134 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1135 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1136 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1137 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1138 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1139 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1140 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1141 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1142 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1143 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1144 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1145 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1146 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1147 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1148 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1149 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1150 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1151 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1152 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1153 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1154 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1155 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1156 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1157 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1158 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1159 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1160 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1161 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1162 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1163 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1164 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1165 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1166 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1167 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1168 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1169 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1170 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1171 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1172 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x1173 = Var(within=Reals,bounds=(None,None),initialize=0)
m.obj = Objective(expr= - 20*m.x2 - 17*m.x3 - 20*m.x12 - 21*m.x13 - 18*m.x20 - 20*m.x21 - 16*m.x44 - 19*m.x45 + 26*m.x52
+ 31*m.x53 + 30*m.x56 + 29*m.x57 - 20*m.x58 - 18*m.x59 + 2*m.x64 + 2*m.x65 + 3*m.x66 + 2*m.x67
+ 3*m.x68 + 3*m.x69 + 2*m.x70 + 2*m.x71 - 6*m.b536 - 4*m.b537 - 40*m.b538 - 35*m.b539
- 46*m.b540 - 39*m.b541 - 7*m.b544 - 4*m.b545 - 30*m.b546 - 25*m.b547 - 37*m.b548 - 29*m.b549
- 7*m.b552 - 5*m.b553 - 15*m.b554 - 5*m.b555 - 22*m.b556 - 10*m.b557 - 11*m.b560 - 8*m.b561
- 13*m.b562 - 8*m.b563 - 24*m.b564 - 16*m.b565 - 10*m.b568 - 7*m.b569 - 13*m.b570 - 8*m.b571
- 23*m.b572 - 15*m.b573 - 9*m.b576 - 9*m.b577 - 30*m.b578 - 30*m.b579 - 39*m.b580 - 39*m.b581
- 8*m.b584 - 7*m.b585 - 20*m.b586 - 15*m.b587 - 28*m.b588 - 22*m.b589 - 8*m.b592 - 6*m.b593
- 15*m.b594 - 10*m.b595 - 23*m.b596 - 16*m.b597 - m.x598 - m.x599 + 5*m.x610 + 10*m.x611
- 2*m.x620 - m.x621 - 10*m.x654 - 5*m.x655 - 5*m.x656 - 5*m.x657 + 40*m.x670 + 30*m.x671
+ 15*m.x672 + 20*m.x673 + 10*m.x674 + 30*m.x675 + 30*m.x676 + 20*m.x677 + 35*m.x678 + 50*m.x679
+ 20*m.x680 + 30*m.x681 + 25*m.x682 + 50*m.x683 + 15*m.x684 + 20*m.x685 + 30*m.x700 + 40*m.x701
- m.x710 - m.x711 + 80*m.x726 + 90*m.x727 + 285*m.x728 + 390*m.x729 + 290*m.x730 + 405*m.x731
+ 280*m.x732 + 400*m.x733 + 290*m.x734 + 300*m.x735 + 350*m.x736 + 250*m.x737 - 5*m.b1054
- 4*m.b1055 - 8*m.b1056 - 7*m.b1057 - 6*m.b1058 - 9*m.b1059 - 10*m.b1060 - 9*m.b1061 - 6*m.b1062
- 10*m.b1063 - 7*m.b1064 - 7*m.b1065 - 4*m.b1066 - 3*m.b1067 - 5*m.b1068 - 6*m.b1069 - 2*m.b1070
- 5*m.b1071 - 4*m.b1072 - 7*m.b1073 - 3*m.b1074 - 9*m.b1075 - 7*m.b1076 - 2*m.b1077 - 3*m.b1078
- m.b1079 - 2*m.b1080 - 6*m.b1081 - 4*m.b1082 - 8*m.b1083 - 2*m.b1084 - 5*m.b1085 - 3*m.b1086
- 4*m.b1087 - 5*m.b1088 - 7*m.b1089 - 2*m.b1090 - 8*m.b1091 - m.b1092 - 4*m.b1093 - 2*m.b1094
- 5*m.b1095 - 9*m.b1096 - 2*m.b1097 - 5*m.b1098 - 8*m.b1099 - 2*m.b1100 - 3*m.b1101 - 10*m.b1102
- 6*m.b1103 - 4*m.b1104 - 8*m.b1105 - 7*m.b1106 - 3*m.b1107 - 4*m.b1108 - 8*m.b1109 - 2*m.b1110
- m.b1111 - 8*m.b1112 - 3*m.b1113, sense=maximize)
m.c2 = Constraint(expr= m.x2 - 0.2*m.x72 == 0)
m.c3 = Constraint(expr= m.x3 - 0.2*m.x73 == 0)
m.c4 = Constraint(expr= m.x4 - 0.2*m.x74 == 0)
m.c5 = Constraint(expr= m.x5 - 0.2*m.x75 == 0)
m.c6 = Constraint(expr= m.x6 - 0.2*m.x76 == 0)
m.c7 = Constraint(expr= m.x7 - 0.2*m.x77 == 0)
m.c8 = Constraint(expr= m.x8 - 0.2*m.x78 == 0)
m.c9 = Constraint(expr= m.x9 - 0.2*m.x79 == 0)
m.c10 = Constraint(expr= m.x10 - 0.2*m.x80 == 0)
m.c11 = Constraint(expr= m.x11 - 0.2*m.x81 == 0)
m.c12 = Constraint(expr= m.x12 - 0.5*m.x82 == 0)
m.c13 = Constraint(expr= m.x13 - 0.5*m.x83 == 0)
m.c14 = Constraint(expr= m.x14 - 0.5*m.x84 == 0)
m.c15 = Constraint(expr= m.x15 - 0.5*m.x85 == 0)
m.c16 = Constraint(expr= m.x16 - 0.7*m.x86 == 0)
m.c17 = Constraint(expr= m.x17 - 0.7*m.x87 == 0)
m.c18 = Constraint(expr= m.x18 - 0.7*m.x88 == 0)
m.c19 = Constraint(expr= m.x19 - 0.7*m.x89 == 0)
m.c20 = Constraint(expr= m.x20 - 1.2*m.x90 == 0)
m.c21 = Constraint(expr= m.x21 - 1.2*m.x91 == 0)
m.c22 = Constraint(expr= m.x22 - 1.2*m.x92 == 0)
m.c23 = Constraint(expr= m.x23 - 1.2*m.x93 == 0)
m.c24 = Constraint(expr= m.x24 - 0.5*m.x94 == 0)
m.c25 = Constraint(expr= m.x25 - 0.5*m.x95 == 0)
m.c26 = Constraint(expr= m.x26 - 0.7*m.x96 == 0)
m.c27 = Constraint(expr= m.x27 - 0.7*m.x97 == 0)
m.c28 = Constraint(expr= m.x28 - 1.2*m.x98 == 0)
m.c29 = Constraint(expr= m.x29 - 1.2*m.x99 == 0)
m.c30 = Constraint(expr= m.x30 - 1.2*m.x100 == 0)
m.c31 = Constraint(expr= m.x31 - 1.2*m.x101 == 0)
m.c32 = Constraint(expr= m.x32 - 1.2*m.x102 == 0)
m.c33 = Constraint(expr= m.x33 - 1.2*m.x103 == 0)
m.c34 = Constraint(expr= m.x34 - 1.2*m.x104 == 0)
m.c35 = Constraint(expr= m.x35 - 1.2*m.x105 == 0)
m.c36 = Constraint(expr= m.x36 - 0.3*m.x106 == 0)
m.c37 = Constraint(expr= m.x37 - 0.3*m.x107 == 0)
m.c38 = Constraint(expr= m.x38 - 0.9*m.x108 == 0)
m.c39 = Constraint(expr= m.x39 - 0.9*m.x109 == 0)
m.c40 = Constraint(expr= m.x40 - 0.3*m.x110 == 0)
m.c41 = Constraint(expr= m.x41 - 0.3*m.x111 == 0)
m.c42 = Constraint(expr= m.x42 - 0.9*m.x112 == 0)
m.c43 = Constraint(expr= m.x43 - 0.9*m.x113 == 0)
m.c44 = Constraint(expr= m.x44 - 0.4*m.x114 == 0)
m.c45 = Constraint(expr= m.x45 - 0.4*m.x115 == 0)
m.c46 = Constraint(expr= m.x46 - 0.4*m.x116 == 0)
m.c47 = Constraint(expr= m.x47 - 0.4*m.x117 == 0)
m.c48 = Constraint(expr= m.x48 - 0.4*m.x118 == 0)
m.c49 = Constraint(expr= m.x49 - 0.4*m.x119 == 0)
m.c50 = Constraint(expr= m.x50 - 1.6*m.x120 == 0)
m.c51 = Constraint(expr= m.x51 - 1.6*m.x121 == 0)
m.c52 = Constraint(expr= m.x52 - 1.6*m.x122 == 0)
m.c53 = Constraint(expr= m.x53 - 1.6*m.x123 == 0)
m.c54 = Constraint(expr= m.x54 - 1.1*m.x124 == 0)
m.c55 = Constraint(expr= m.x55 - 1.1*m.x125 == 0)
m.c56 = Constraint(expr= m.x56 - 1.1*m.x126 == 0)
m.c57 = Constraint(expr= m.x57 - 1.1*m.x127 == 0)
m.c58 = Constraint(expr= m.x58 - 0.7*m.x128 == 0)
m.c59 = Constraint(expr= m.x59 - 0.7*m.x129 == 0)
m.c60 = Constraint(expr= m.x60 - 0.7*m.x130 == 0)
m.c61 = Constraint(expr= m.x61 - 0.7*m.x131 == 0)
m.c62 = Constraint(expr= m.x62 - 0.7*m.x132 == 0)
m.c63 = Constraint(expr= m.x63 - 0.7*m.x133 == 0)
m.c64 = Constraint(expr= m.x64 - 0.2*m.x134 == 0)
m.c65 = Constraint(expr= m.x65 - 0.2*m.x135 == 0)
m.c66 = Constraint(expr= m.x66 - 0.7*m.x136 == 0)
m.c67 = Constraint(expr= m.x67 - 0.7*m.x137 == 0)
m.c68 = Constraint(expr= m.x68 - 0.3*m.x138 == 0)
m.c69 = Constraint(expr= m.x69 - 0.3*m.x139 == 0)
m.c70 = Constraint(expr= m.x70 - 0.9*m.x140 == 0)
m.c71 = Constraint(expr= m.x71 - 0.9*m.x141 == 0)
m.c72 = Constraint(expr= m.x52 >= 1.2)
m.c73 = Constraint(expr= m.x53 >= 1.15)
m.c74 = Constraint(expr= m.x56 >= 1.2)
m.c75 = Constraint(expr= m.x57 >= 1.15)
m.c76 = Constraint(expr= m.x64 >= 1.1)
m.c77 = Constraint(expr= m.x65 >= 1.1)
m.c78 = Constraint(expr= m.x66 >= 1.1)
m.c79 = Constraint(expr= m.x67 >= 1.1)
m.c80 = Constraint(expr= m.x68 >= 1.4)
m.c81 = Constraint(expr= m.x69 >= 1.3)
m.c82 = Constraint(expr= m.x70 >= 1.3)
m.c83 = Constraint(expr= m.x71 >= 1.2)
m.c84 = Constraint(expr= m.x2 <= 55)
m.c85 = Constraint(expr= m.x3 <= 40)
m.c86 = Constraint(expr= m.x12 <= 46)
m.c87 = Constraint(expr= m.x13 <= 41)
m.c88 = Constraint(expr= m.x20 <= 45)
m.c89 = Constraint(expr= m.x21 <= 62)
m.c90 = Constraint(expr= m.x44 <= 54)
m.c91 = Constraint(expr= m.x45 <= 51)
m.c92 = Constraint(expr= m.x58 <= 40)
m.c93 = Constraint(expr= m.x59 <= 45)
m.c94 = Constraint(expr= m.x2 - m.x4 - m.x6 == 0)
m.c95 = Constraint(expr= m.x3 - m.x5 - m.x7 == 0)
m.c96 = Constraint(expr= m.x8 - m.x10 == 0)
m.c97 = Constraint(expr= m.x9 - m.x11 == 0)
m.c98 = Constraint(expr= m.x12 - m.x14 + m.x24 == 0)
m.c99 = Constraint(expr= m.x13 - m.x15 + m.x25 == 0)
m.c100 = Constraint(expr= m.x16 - m.x18 + m.x26 == 0)
m.c101 = Constraint(expr= m.x17 - m.x19 + m.x27 == 0)
m.c102 = Constraint(expr= m.x20 - m.x22 - m.x28 == 0)
m.c103 = Constraint(expr= m.x21 - m.x23 - m.x29 == 0)
m.c104 = Constraint(expr= m.x30 - m.x32 - m.x34 == 0)
m.c105 = Constraint(expr= m.x31 - m.x33 - m.x35 == 0)
m.c106 = Constraint(expr= m.x36 - m.x40 == 0)
m.c107 = Constraint(expr= m.x37 - m.x41 == 0)
m.c108 = Constraint(expr= m.x38 - m.x42 == 0)
m.c109 = Constraint(expr= m.x39 - m.x43 == 0)
m.c110 = Constraint(expr= m.x44 - m.x46 - m.x48 == 0)
m.c111 = Constraint(expr= m.x45 - m.x47 - m.x49 == 0)
m.c112 = Constraint(expr= m.x50 - m.x52 == 0)
m.c113 = Constraint(expr= m.x51 - m.x53 == 0)
m.c114 = Constraint(expr= m.x54 - m.x56 == 0)
m.c115 = Constraint(expr= m.x55 - m.x57 == 0)
m.c116 = Constraint(expr= m.x58 - m.x60 == 0)
m.c117 = Constraint(expr= m.x59 - m.x61 == 0)
m.c118 = Constraint(expr= m.x4 - m.x8 - m.x142 == 0)
m.c119 = Constraint(expr= m.x5 - m.x9 - m.x143 == 0)
m.c120 = Constraint(expr= m.x6 + m.x14 - m.x16 - m.x144 == 0)
m.c121 = Constraint(expr= m.x7 + m.x15 - m.x17 - m.x145 == 0)
m.c122 = Constraint(expr= m.x22 - m.x24 - m.x26 - m.x146 == 0)
m.c123 = Constraint(expr= m.x23 - m.x25 - m.x27 - m.x147 == 0)
m.c124 = Constraint(expr= m.x28 - m.x30 - m.x148 == 0)
m.c125 = Constraint(expr= m.x29 - m.x31 - m.x149 == 0)
m.c126 = Constraint(expr= m.x34 - m.x36 - m.x38 - m.x150 == 0)
m.c127 = Constraint(expr= m.x35 - m.x37 - m.x39 - m.x151 == 0)
m.c128 = Constraint(expr= m.x32 + m.x46 - m.x50 - m.x152 == 0)
m.c129 = Constraint(expr= m.x33 + m.x47 - m.x51 - m.x153 == 0)
m.c130 = Constraint(expr= m.x48 - m.x54 + m.x62 - m.x154 == 0)
m.c131 = Constraint(expr= m.x49 - m.x55 + m.x63 - m.x155 == 0)
m.c132 = Constraint(expr= m.x60 - m.x62 - m.x156 == 0)
m.c133 = Constraint(expr= m.x61 - m.x63 - m.x157 == 0)
m.c134 = Constraint(expr= m.x76 - m.x84 <= 0)
m.c135 = Constraint(expr= m.x77 - m.x85 <= 0)
m.c136 = Constraint(expr= m.x102 - m.x116 <= 0)
m.c137 = Constraint(expr= m.x103 - m.x117 <= 0)
m.c138 = Constraint(expr= m.x118 - m.x132 <= 0)
m.c139 = Constraint(expr= m.x119 - m.x133 <= 0)
m.c140 = Constraint(expr= m.x78 - m.x278 - m.x280 - m.x282 - m.x284 == 0)
m.c141 = Constraint(expr= m.x79 - m.x279 - m.x281 - m.x283 - m.x285 == 0)
m.c142 = Constraint(expr= m.x74 - m.x262 - m.x264 - m.x266 - m.x268 == 0)
m.c143 = Constraint(expr= m.x75 - m.x263 - m.x265 - m.x267 - m.x269 == 0)
m.c144 = Constraint(expr= m.x86 - m.x286 - m.x288 - m.x290 - m.x292 == 0)
m.c145 = Constraint(expr= m.x87 - m.x287 - m.x289 - m.x291 - m.x293 == 0)
m.c146 = Constraint(expr= m.x76 - m.x270 - m.x272 - m.x274 - m.x276 == 0)
m.c147 = Constraint(expr= m.x77 - m.x271 - m.x273 - m.x275 - m.x277 == 0)
m.c148 = Constraint(expr= m.x94 - m.x302 - m.x304 - m.x306 - m.x308 == 0)
m.c149 = Constraint(expr= m.x95 - m.x303 - m.x305 - m.x307 - m.x309 == 0)
m.c150 = Constraint(expr= m.x96 - m.x310 - m.x312 - m.x314 - m.x316 == 0)
m.c151 = Constraint(expr= m.x97 - m.x311 - m.x313 - m.x315 - m.x317 == 0)
m.c152 = Constraint(expr= m.x92 - m.x294 - m.x296 - m.x298 - m.x300 == 0)
m.c153 = Constraint(expr= m.x93 - m.x295 - m.x297 - m.x299 - m.x301 == 0)
m.c154 = Constraint(expr= m.x100 - m.x326 - m.x328 - m.x330 - m.x332 == 0)
m.c155 = Constraint(expr= m.x101 - m.x327 - m.x329 - m.x331 - m.x333 == 0)
m.c156 = Constraint(expr= m.x98 - m.x318 - m.x320 - m.x322 - m.x324 == 0)
m.c157 = Constraint(expr= m.x99 - m.x319 - m.x321 - m.x323 - m.x325 == 0)
m.c158 = Constraint(expr= m.x106 - m.x350 - m.x352 - m.x354 - m.x356 == 0)
m.c159 = Constraint(expr= m.x107 - m.x351 - m.x353 - m.x355 - m.x357 == 0)
m.c160 = Constraint(expr= m.x108 - m.x358 - m.x360 - m.x362 - m.x364 == 0)
m.c161 = Constraint(expr= m.x109 - m.x359 - m.x361 - m.x363 - m.x365 == 0)
m.c162 = Constraint(expr= m.x104 - m.x342 - m.x344 - m.x346 - m.x348 == 0)
m.c163 = Constraint(expr= m.x105 - m.x343 - m.x345 - m.x347 - m.x349 == 0)
m.c164 = Constraint(expr= m.x120 - m.x374 - m.x376 - m.x378 - m.x380 == 0)
m.c165 = Constraint(expr= m.x121 - m.x375 - m.x377 - m.x379 - m.x381 == 0)
m.c166 = Constraint(expr= m.x102 - m.x334 - m.x336 - m.x338 - m.x340 == 0)
m.c167 = Constraint(expr= m.x103 - m.x335 - m.x337 - m.x339 - m.x341 == 0)
m.c168 = Constraint(expr= m.x124 - m.x382 - m.x384 - m.x386 - m.x388 == 0)
m.c169 = Constraint(expr= m.x125 - m.x383 - m.x385 - m.x387 - m.x389 == 0)
m.c170 = Constraint(expr= m.x118 - m.x366 - m.x368 - m.x370 - m.x372 == 0)
m.c171 = Constraint(expr= m.x119 - m.x367 - m.x369 - m.x371 - m.x373 == 0)
m.c172 = Constraint(expr= m.x132 - m.x398 - m.x400 - m.x402 - m.x404 == 0)
m.c173 = Constraint(expr= m.x133 - m.x399 - m.x401 - m.x403 - m.x405 == 0)
m.c174 = Constraint(expr= m.x130 - m.x390 - m.x392 - m.x394 - m.x396 == 0)
m.c175 = Constraint(expr= m.x131 - m.x391 - m.x393 - m.x395 - m.x397 == 0)
m.c176 = Constraint(expr= m.x278 - 233.75*m.b470 <= 0)
m.c177 = Constraint(expr= m.x279 - 170*m.b471 <= 0)
m.c178 = Constraint(expr= m.x280 - 233.75*m.b472 <= 0)
m.c179 = Constraint(expr= m.x281 - 170*m.b473 <= 0)
m.c180 = Constraint(expr= m.x282 - 233.75*m.b474 <= 0)
m.c181 = Constraint(expr= m.x283 - 170*m.b475 <= 0)
m.c182 = Constraint(expr= m.x284 - 233.75*m.b476 <= 0)
m.c183 = Constraint(expr= m.x285 - 170*m.b477 <= 0)
m.c184 = Constraint(expr= m.x286 - 383.5625*m.b478 <= 0)
m.c185 = Constraint(expr= m.x287 - 316.001666666667*m.b479 <= 0)
m.c186 = Constraint(expr= m.x288 - 383.5625*m.b480 <= 0)
m.c187 = Constraint(expr= m.x289 - 316.001666666667*m.b481 <= 0)
m.c188 = Constraint(expr= m.x290 - 383.5625*m.b482 <= 0)
m.c189 = Constraint(expr= m.x291 - 316.001666666667*m.b483 <= 0)
m.c190 = Constraint(expr= m.x292 - 383.5625*m.b484 <= 0)
m.c191 = Constraint(expr= m.x293 - 316.001666666667*m.b485 <= 0)
m.c192 = Constraint(expr= m.x302 - 36.75*m.b486 <= 0)
m.c193 = Constraint(expr= m.x303 - 50.6333333333333*m.b487 <= 0)
m.c194 = Constraint(expr= m.x304 - 36.75*m.b488 <= 0)
m.c195 = Constraint(expr= m.x305 - 50.6333333333333*m.b489 <= 0)
m.c196 = Constraint(expr= m.x306 - 36.75*m.b490 <= 0)
m.c197 = Constraint(expr= m.x307 - 50.6333333333333*m.b491 <= 0)
m.c198 = Constraint(expr= m.x308 - 36.75*m.b492 <= 0)
m.c199 = Constraint(expr= m.x309 - 50.6333333333333*m.b493 <= 0)
m.c200 = Constraint(expr= m.x310 - 36.75*m.b486 <= 0)
m.c201 = Constraint(expr= m.x311 - 50.6333333333333*m.b487 <= 0)
m.c202 = Constraint(expr= m.x312 - 36.75*m.b488 <= 0)
m.c203 = Constraint(expr= m.x313 - 50.6333333333333*m.b489 <= 0)
m.c204 = Constraint(expr= m.x314 - 36.75*m.b490 <= 0)
m.c205 = Constraint(expr= m.x315 - 50.6333333333333*m.b491 <= 0)
m.c206 = Constraint(expr= m.x316 - 36.75*m.b492 <= 0)
m.c207 = Constraint(expr= m.x317 - 50.6333333333333*m.b493 <= 0)
m.c208 = Constraint(expr= m.x326 - 33.75*m.b494 <= 0)
m.c209 = Constraint(expr= m.x327 - 46.5*m.b495 <= 0)
m.c210 = Constraint(expr= m.x328 - 33.75*m.b496 <= 0)
m.c211 = Constraint(expr= m.x329 - 46.5*m.b497 <= 0)
m.c212 = Constraint(expr= m.x330 - 33.75*m.b498 <= 0)
m.c213 = Constraint(expr= m.x331 - 46.5*m.b499 <= 0)
m.c214 = Constraint(expr= m.x332 - 33.75*m.b500 <= 0)
m.c215 = Constraint(expr= m.x333 - 46.5*m.b501 <= 0)
m.c216 = Constraint(expr= m.x350 - 32.0625*m.b502 <= 0)
m.c217 = Constraint(expr= m.x351 - 44.175*m.b503 <= 0)
m.c218 = Constraint(expr= m.x352 - 32.0625*m.b504 <= 0)
m.c219 = Constraint(expr= m.x353 - 44.175*m.b505 <= 0)
m.c220 = Constraint(expr= m.x354 - 32.0625*m.b506 <= 0)
m.c221 = Constraint(expr= m.x355 - 44.175*m.b507 <= 0)
m.c222 = Constraint(expr= m.x356 - 32.0625*m.b508 <= 0)
m.c223 = Constraint(expr= m.x357 - 44.175*m.b509 <= 0)
m.c224 = Constraint(expr= m.x358 - 32.0625*m.b502 <= 0)
m.c225 = Constraint(expr= m.x359 - 44.175*m.b503 <= 0)
m.c226 = Constraint(expr= m.x360 - 32.0625*m.b504 <= 0)
m.c227 = Constraint(expr= m.x361 - 44.175*m.b505 <= 0)
m.c228 = Constraint(expr= m.x362 - 32.0625*m.b506 <= 0)
m.c229 = Constraint(expr= m.x363 - 44.175*m.b507 <= 0)
m.c230 = Constraint(expr= m.x364 - 32.0625*m.b508 <= 0)
m.c231 = Constraint(expr= m.x365 - 44.175*m.b509 <= 0)
m.c232 = Constraint(expr= m.x374 - 143.4375*m.b510 <= 0)
m.c233 = Constraint(expr= m.x375 - 147.9*m.b511 <= 0)
m.c234 = Constraint(expr= m.x376 - 143.4375*m.b512 <= 0)
m.c235 = Constraint(expr= m.x377 - 147.9*m.b513 <= 0)
m.c236 = Constraint(expr= m.x378 - 143.4375*m.b514 <= 0)
m.c237 = Constraint(expr= m.x379 - 147.9*m.b515 <= 0)
m.c238 = Constraint(expr= m.x380 - 143.4375*m.b516 <= 0)
m.c239 = Constraint(expr= m.x381 - 147.9*m.b517 <= 0)
m.c240 = Constraint(expr= m.x382 - 178.192857142857*m.b518 <= 0)
m.c241 = Constraint(expr= m.x383 - 177.310714285714*m.b519 <= 0)
m.c242 = Constraint(expr= m.x384 - 178.192857142857*m.b520 <= 0)
m.c243 = Constraint(expr= m.x385 - 177.310714285714*m.b521 <= 0)
m.c244 = Constraint(expr= m.x386 - 178.192857142857*m.b522 <= 0)
m.c245 = Constraint(expr= m.x387 - 177.310714285714*m.b523 <= 0)
m.c246 = Constraint(expr= m.x388 - 178.192857142857*m.b524 <= 0)
m.c247 = Constraint(expr= m.x389 - 177.310714285714*m.b525 <= 0)
m.c248 = Constraint(expr= m.x398 - 52.5714285714286*m.b526 <= 0)
m.c249 = Constraint(expr= m.x399 - 59.1428571428572*m.b527 <= 0)
m.c250 = Constraint(expr= m.x400 - 52.5714285714286*m.b528 <= 0)
m.c251 = Constraint(expr= m.x401 - 59.1428571428572*m.b529 <= 0)
m.c252 = Constraint(expr= m.x402 - 52.5714285714286*m.b530 <= 0)
m.c253 = Constraint(expr= m.x403 - 59.1428571428572*m.b531 <= 0)
m.c254 = Constraint(expr= m.x404 - 52.5714285714286*m.b532 <= 0)
m.c255 = Constraint(expr= m.x405 - 59.1428571428572*m.b533 <= 0)
m.c256 = Constraint(expr= m.x262 - 275*m.b470 <= 0)
m.c257 = Constraint(expr= m.x263 - 200*m.b471 <= 0)
m.c258 = Constraint(expr= m.x264 - 275*m.b472 <= 0)
m.c259 = Constraint(expr= m.x265 - 200*m.b473 <= 0)
m.c260 = Constraint(expr= m.x266 - 275*m.b474 <= 0)
m.c261 = Constraint(expr= m.x267 - 200*m.b475 <= 0)
m.c262 = Constraint(expr= m.x268 - 275*m.b476 <= 0)
m.c263 = Constraint(expr= m.x269 - 200*m.b477 <= 0)
m.c264 = Constraint(expr= m.x270 - 275*m.b478 <= 0)
m.c265 = Constraint(expr= m.x271 - 200*m.b479 <= 0)
m.c266 = Constraint(expr= m.x272 - 275*m.b480 <= 0)
m.c267 = Constraint(expr= m.x273 - 200*m.b481 <= 0)
m.c268 = Constraint(expr= m.x274 - 275*m.b482 <= 0)
m.c269 = Constraint(expr= m.x275 - 200*m.b483 <= 0)
m.c270 = Constraint(expr= m.x276 - 275*m.b484 <= 0)
m.c271 = Constraint(expr= m.x277 - 200*m.b485 <= 0)
m.c272 = Constraint(expr= m.x294 - 37.5*m.b486 <= 0)
m.c273 = Constraint(expr= m.x295 - 51.6666666666667*m.b487 <= 0)
m.c274 = Constraint(expr= m.x296 - 37.5*m.b488 <= 0)
m.c275 = Constraint(expr= m.x297 - 51.6666666666667*m.b489 <= 0)
m.c276 = Constraint(expr= m.x298 - 37.5*m.b490 <= 0)
m.c277 = Constraint(expr= m.x299 - 51.6666666666667*m.b491 <= 0)
m.c278 = Constraint(expr= m.x300 - 37.5*m.b492 <= 0)
m.c279 = Constraint(expr= m.x301 - 51.6666666666667*m.b493 <= 0)
m.c280 = Constraint(expr= m.x318 - 37.5*m.b494 <= 0)
m.c281 = Constraint(expr= m.x319 - 51.6666666666667*m.b495 <= 0)
m.c282 = Constraint(expr= m.x320 - 37.5*m.b496 <= 0)
m.c283 = Constraint(expr= m.x321 - 51.6666666666667*m.b497 <= 0)
m.c284 = Constraint(expr= m.x322 - 37.5*m.b498 <= 0)
m.c285 = Constraint(expr= m.x323 - 51.6666666666667*m.b499 <= 0)
m.c286 = Constraint(expr= m.x324 - 37.5*m.b500 <= 0)
m.c287 = Constraint(expr= m.x325 - 51.6666666666667*m.b501 <= 0)
m.c288 = Constraint(expr= m.x342 - 33.75*m.b502 <= 0)
m.c289 = Constraint(expr= m.x343 - 46.5*m.b503 <= 0)
m.c290 = Constraint(expr= m.x344 - 33.75*m.b504 <= 0)
m.c291 = Constraint(expr= m.x345 - 46.5*m.b505 <= 0)
m.c292 = Constraint(expr= m.x346 - 33.75*m.b506 <= 0)
m.c293 = Constraint(expr= m.x347 - 46.5*m.b507 <= 0)
m.c294 = Constraint(expr= m.x348 - 33.75*m.b508 <= 0)
m.c295 = Constraint(expr= m.x349 - 46.5*m.b509 <= 0)
m.c296 = Constraint(expr= m.x334 - 33.75*m.b510 <= 0)
m.c297 = Constraint(expr= m.x335 - 46.5*m.b511 <= 0)
m.c298 = Constraint(expr= m.x336 - 33.75*m.b512 <= 0)
m.c299 = Constraint(expr= m.x337 - 46.5*m.b513 <= 0)
m.c300 = Constraint(expr= m.x338 - 33.75*m.b514 <= 0)
m.c301 = Constraint(expr= m.x339 - 46.5*m.b515 <= 0)
m.c302 = Constraint(expr= m.x340 - 33.75*m.b516 <= 0)
m.c303 = Constraint(expr= m.x341 - 46.5*m.b517 <= 0)
m.c304 = Constraint(expr= m.x366 - 135*m.b518 <= 0)
m.c305 = Constraint(expr= m.x367 - 127.5*m.b519 <= 0)
m.c306 = Constraint(expr= m.x368 - 135*m.b520 <= 0)
m.c307 = Constraint(expr= m.x369 - 127.5*m.b521 <= 0)
m.c308 = Constraint(expr= m.x370 - 135*m.b522 <= 0)
m.c309 = Constraint(expr= m.x371 - 127.5*m.b523 <= 0)
m.c310 = Constraint(expr= m.x372 - 135*m.b524 <= 0)
m.c311 = Constraint(expr= m.x373 - 127.5*m.b525 <= 0)
m.c312 = Constraint(expr= m.x390 - 57.1428571428571*m.b526 <= 0)
m.c313 = Constraint(expr= m.x391 - 64.2857142857143*m.b527 <= 0)
m.c314 = Constraint(expr= m.x392 - 57.1428571428571*m.b528 <= 0)
m.c315 = Constraint(expr= m.x393 - 64.2857142857143*m.b529 <= 0)
m.c316 = Constraint(expr= m.x394 - 57.1428571428571*m.b530 <= 0)
m.c317 = Constraint(expr= m.x395 - 64.2857142857143*m.b531 <= 0)
m.c318 = Constraint(expr= m.x396 - 57.1428571428571*m.b532 <= 0)
m.c319 = Constraint(expr= m.x397 - 64.2857142857143*m.b533 <= 0)
m.c320 = Constraint(expr= - 0.8*m.x262 + m.x278 == 0)
m.c321 = Constraint(expr= - 0.8*m.x263 + m.x279 == 0)
m.c322 = Constraint(expr= - 0.85*m.x264 + m.x280 == 0)
m.c323 = Constraint(expr= - 0.85*m.x265 + m.x281 == 0)
m.c324 = Constraint(expr= - 0.8*m.x266 + m.x282 == 0)
m.c325 = Constraint(expr= - 0.8*m.x267 + m.x283 == 0)
m.c326 = Constraint(expr= - 0.85*m.x268 + m.x284 == 0)
m.c327 = Constraint(expr= - 0.85*m.x269 + m.x285 == 0)
m.c328 = Constraint(expr= - 0.9*m.x270 + m.x286 == 0)
m.c329 = Constraint(expr= - 0.9*m.x271 + m.x287 == 0)
m.c330 = Constraint(expr= - 0.95*m.x272 + m.x288 == 0)
m.c331 = Constraint(expr= - 0.95*m.x273 + m.x289 == 0)
m.c332 = Constraint(expr= - 0.9*m.x274 + m.x290 == 0)
m.c333 = Constraint(expr= - 0.9*m.x275 + m.x291 == 0)
m.c334 = Constraint(expr= - 0.95*m.x276 + m.x292 == 0)
m.c335 = Constraint(expr= - 0.95*m.x277 + m.x293 == 0)
m.c336 = Constraint(expr= - 0.85*m.x294 + m.x302 == 0)
m.c337 = Constraint(expr= - 0.85*m.x295 + m.x303 == 0)
m.c338 = Constraint(expr= - 0.98*m.x296 + m.x304 == 0)
m.c339 = Constraint(expr= - 0.98*m.x297 + m.x305 == 0)
m.c340 = Constraint(expr= - 0.85*m.x298 + m.x306 == 0)
m.c341 = Constraint(expr= - 0.85*m.x299 + m.x307 == 0)
m.c342 = Constraint(expr= - 0.98*m.x300 + m.x308 == 0)
m.c343 = Constraint(expr= - 0.98*m.x301 + m.x309 == 0)
m.c344 = Constraint(expr= - 0.85*m.x294 + m.x310 == 0)
m.c345 = Constraint(expr= - 0.85*m.x295 + m.x311 == 0)
m.c346 = Constraint(expr= - 0.98*m.x296 + m.x312 == 0)
m.c347 = Constraint(expr= - 0.98*m.x297 + m.x313 == 0)
m.c348 = Constraint(expr= - 0.85*m.x298 + m.x314 == 0)
m.c349 = Constraint(expr= - 0.85*m.x299 + m.x315 == 0)
m.c350 = Constraint(expr= - 0.98*m.x300 + m.x316 == 0)
m.c351 = Constraint(expr= - 0.98*m.x301 + m.x317 == 0)
m.c352 = Constraint(expr= - 0.85*m.x318 + m.x326 == 0)
m.c353 = Constraint(expr= - 0.85*m.x319 + m.x327 == 0)
m.c354 = Constraint(expr= - 0.9*m.x320 + m.x328 == 0)
m.c355 = Constraint(expr= - 0.9*m.x321 + m.x329 == 0)
m.c356 = Constraint(expr= - 0.85*m.x322 + m.x330 == 0)
m.c357 = Constraint(expr= - 0.85*m.x323 + m.x331 == 0)
m.c358 = Constraint(expr= - 0.9*m.x324 + m.x332 == 0)
m.c359 = Constraint(expr= - 0.9*m.x325 + m.x333 == 0)
m.c360 = Constraint(expr= - 0.75*m.x342 + m.x350 == 0)
m.c361 = Constraint(expr= - 0.75*m.x343 + m.x351 == 0)
m.c362 = Constraint(expr= - 0.95*m.x344 + m.x352 == 0)
m.c363 = Constraint(expr= - 0.95*m.x345 + m.x353 == 0)
m.c364 = Constraint(expr= - 0.9*m.x346 + m.x354 == 0)
m.c365 = Constraint(expr= - 0.9*m.x347 + m.x355 == 0)
m.c366 = Constraint(expr= - 0.95*m.x348 + m.x356 == 0)
m.c367 = Constraint(expr= - 0.95*m.x349 + m.x357 == 0)
m.c368 = Constraint(expr= - 0.75*m.x342 + m.x358 == 0)
m.c369 = Constraint(expr= - 0.75*m.x343 + m.x359 == 0)
m.c370 = Constraint(expr= - 0.95*m.x344 + m.x360 == 0)
m.c371 = Constraint(expr= - 0.95*m.x345 + m.x361 == 0)
m.c372 = Constraint(expr= - 0.9*m.x346 + m.x362 == 0)
m.c373 = Constraint(expr= - 0.9*m.x347 + m.x363 == 0)
m.c374 = Constraint(expr= - 0.95*m.x348 + m.x364 == 0)
m.c375 = Constraint(expr= - 0.95*m.x349 + m.x365 == 0)
m.c376 = Constraint(expr= - 0.8*m.x334 + m.x374 == 0)
m.c377 = Constraint(expr= - 0.8*m.x335 + m.x375 == 0)
m.c378 = Constraint(expr= - 0.85*m.x336 + m.x376 == 0)
m.c379 = Constraint(expr= - 0.85*m.x337 + m.x377 == 0)
m.c380 = Constraint(expr= - 0.8*m.x338 + m.x378 == 0)
m.c381 = Constraint(expr= - 0.8*m.x339 + m.x379 == 0)
m.c382 = Constraint(expr= - 0.85*m.x340 + m.x380 == 0)
m.c383 = Constraint(expr= - 0.85*m.x341 + m.x381 == 0)
m.c384 = Constraint(expr= - 0.85*m.x366 + m.x382 == 0)
m.c385 = Constraint(expr= - 0.85*m.x367 + m.x383 == 0)
m.c386 = Constraint(expr= - 0.95*m.x368 + m.x384 == 0)
m.c387 = Constraint(expr= - 0.95*m.x369 + m.x385 == 0)
m.c388 = Constraint(expr= - 0.85*m.x370 + m.x386 == 0)
m.c389 = Constraint(expr= - 0.85*m.x371 + m.x387 == 0)
m.c390 = Constraint(expr= - 0.95*m.x372 + m.x388 == 0)
m.c391 = Constraint(expr= - 0.95*m.x373 + m.x389 == 0)
m.c392 = Constraint(expr= - 0.8*m.x390 + m.x398 == 0)
m.c393 = Constraint(expr= - 0.8*m.x391 + m.x399 == 0)
m.c394 = Constraint(expr= - 0.92*m.x392 + m.x400 == 0)
m.c395 = Constraint(expr= - 0.92*m.x393 + m.x401 == 0)
m.c396 = Constraint(expr= - 0.8*m.x394 + m.x402 == 0)
m.c397 = Constraint(expr= - 0.8*m.x395 + m.x403 == 0)
m.c398 = Constraint(expr= - 0.92*m.x396 + m.x404 == 0)
m.c399 = Constraint(expr= - 0.92*m.x397 + m.x405 == 0)
m.c400 = Constraint(expr= m.x4 - m.x174 - m.x176 - m.x178 - m.x180 == 0)
m.c401 = Constraint(expr= m.x5 - m.x175 - m.x177 - m.x179 - m.x181 == 0)
m.c402 = Constraint(expr= m.x6 - m.x182 - m.x184 - m.x186 - m.x188 == 0)
m.c403 = Constraint(expr= m.x7 - m.x183 - m.x185 - m.x187 - m.x189 == 0)
m.c404 = Constraint(expr= m.x14 - m.x190 - m.x192 - m.x194 - m.x196 == 0)
m.c405 = Constraint(expr= m.x15 - m.x191 - m.x193 - m.x195 - m.x197 == 0)
m.c406 = Constraint(expr= m.x22 - m.x198 - m.x200 - m.x202 - m.x204 == 0)
m.c407 = Constraint(expr= m.x23 - m.x199 - m.x201 - m.x203 - m.x205 == 0)
m.c408 = Constraint(expr= m.x28 - m.x206 - m.x208 - m.x210 - m.x212 == 0)
m.c409 = Constraint(expr= m.x29 - m.x207 - m.x209 - m.x211 - m.x213 == 0)
m.c410 = Constraint(expr= m.x34 - m.x222 - m.x224 - m.x226 - m.x228 == 0)
m.c411 = Constraint(expr= m.x35 - m.x223 - m.x225 - m.x227 - m.x229 == 0)
m.c412 = Constraint(expr= m.x32 - m.x214 - m.x216 - m.x218 - m.x220 == 0)
m.c413 = Constraint(expr= m.x33 - m.x215 - m.x217 - m.x219 - m.x221 == 0)
m.c414 = Constraint(expr= m.x46 - m.x230 - m.x232 - m.x234 - m.x236 == 0)
m.c415 = Constraint(expr= m.x47 - m.x231 - m.x233 - m.x235 - m.x237 == 0)
m.c416 = Constraint(expr= m.x48 - m.x238 - m.x240 - m.x242 - m.x244 == 0)
m.c417 = Constraint(expr= m.x49 - m.x239 - m.x241 - m.x243 - m.x245 == 0)
m.c418 = Constraint(expr= m.x62 - m.x254 - m.x256 - m.x258 - m.x260 == 0)
m.c419 = Constraint(expr= m.x63 - m.x255 - m.x257 - m.x259 - m.x261 == 0)
m.c420 = Constraint(expr= m.x60 - m.x246 - m.x248 - m.x250 - m.x252 == 0)
m.c421 = Constraint(expr= m.x61 - m.x247 - m.x249 - m.x251 - m.x253 == 0)
m.c422 = Constraint(expr= m.x174 - 55*m.b470 <= 0)
m.c423 = Constraint(expr= m.x175 - 40*m.b471 <= 0)
m.c424 = Constraint(expr= m.x176 - 55*m.b472 <= 0)
m.c425 = Constraint(expr= m.x177 - 40*m.b473 <= 0)
m.c426 = Constraint(expr= m.x178 - 55*m.b474 <= 0)
m.c427 = Constraint(expr= m.x179 - 40*m.b475 <= 0)
m.c428 = Constraint(expr= m.x180 - 55*m.b476 <= 0)
m.c429 = Constraint(expr= m.x181 - 40*m.b477 <= 0)
m.c430 = Constraint(expr= m.x182 - 55*m.b478 <= 0)
m.c431 = Constraint(expr= m.x183 - 40*m.b479 <= 0)
m.c432 = Constraint(expr= m.x184 - 55*m.b480 <= 0)
m.c433 = Constraint(expr= m.x185 - 40*m.b481 <= 0)
m.c434 = Constraint(expr= m.x186 - 55*m.b482 <= 0)
m.c435 = Constraint(expr= m.x187 - 40*m.b483 <= 0)
m.c436 = Constraint(expr= m.x188 - 55*m.b484 <= 0)
m.c437 = Constraint(expr= m.x189 - 40*m.b485 <= 0)
m.c438 = Constraint(expr= m.x190 - 91*m.b478 <= 0)
m.c439 = Constraint(expr= m.x191 - 103*m.b479 <= 0)
m.c440 = Constraint(expr= m.x192 - 91*m.b480 <= 0)
m.c441 = Constraint(expr= m.x193 - 103*m.b481 <= 0)
m.c442 = Constraint(expr= m.x194 - 91*m.b482 <= 0)
m.c443 = Constraint(expr= m.x195 - 103*m.b483 <= 0)
m.c444 = Constraint(expr= m.x196 - 91*m.b484 <= 0)
m.c445 = Constraint(expr= m.x197 - 103*m.b485 <= 0)
m.c446 = Constraint(expr= m.x198 - 45*m.b486 <= 0)
m.c447 = Constraint(expr= m.x199 - 62*m.b487 <= 0)
m.c448 = Constraint(expr= m.x200 - 45*m.b488 <= 0)
m.c449 = Constraint(expr= m.x201 - 62*m.b489 <= 0)
m.c450 = Constraint(expr= m.x202 - 45*m.b490 <= 0)
m.c451 = Constraint(expr= m.x203 - 62*m.b491 <= 0)
m.c452 = Constraint(expr= m.x204 - 45*m.b492 <= 0)
m.c453 = Constraint(expr= m.x205 - 62*m.b493 <= 0)
m.c454 = Constraint(expr= m.x206 - 45*m.b494 <= 0)
m.c455 = Constraint(expr= m.x207 - 62*m.b495 <= 0)
m.c456 = Constraint(expr= m.x208 - 45*m.b496 <= 0)
m.c457 = Constraint(expr= m.x209 - 62*m.b497 <= 0)
m.c458 = Constraint(expr= m.x210 - 45*m.b498 <= 0)
m.c459 = Constraint(expr= m.x211 - 62*m.b499 <= 0)
m.c460 = Constraint(expr= m.x212 - 45*m.b500 <= 0)
m.c461 = Constraint(expr= m.x213 - 62*m.b501 <= 0)
m.c462 = Constraint(expr= m.x222 - 45*m.b502 <= 0)
m.c463 = Constraint(expr= m.x223 - 62*m.b503 <= 0)
m.c464 = Constraint(expr= m.x224 - 45*m.b504 <= 0)
m.c465 = Constraint(expr= m.x225 - 62*m.b505 <= 0)
m.c466 = Constraint(expr= m.x226 - 45*m.b506 <= 0)
m.c467 = Constraint(expr= m.x227 - 62*m.b507 <= 0)
m.c468 = Constraint(expr= m.x228 - 45*m.b508 <= 0)
m.c469 = Constraint(expr= m.x229 - 62*m.b509 <= 0)
m.c470 = Constraint(expr= m.x214 - 45*m.b510 <= 0)
m.c471 = Constraint(expr= m.x215 - 62*m.b511 <= 0)
m.c472 = Constraint(expr= m.x216 - 45*m.b512 <= 0)
m.c473 = Constraint(expr= m.x217 - 62*m.b513 <= 0)
m.c474 = Constraint(expr= m.x218 - 45*m.b514 <= 0)
m.c475 = Constraint(expr= m.x219 - 62*m.b515 <= 0)
m.c476 = Constraint(expr= m.x220 - 45*m.b516 <= 0)
m.c477 = Constraint(expr= m.x221 - 62*m.b517 <= 0)
m.c478 = Constraint(expr= m.x230 - 54*m.b510 <= 0)
m.c479 = Constraint(expr= m.x231 - 51*m.b511 <= 0)
m.c480 = Constraint(expr= m.x232 - 54*m.b512 <= 0)
m.c481 = Constraint(expr= m.x233 - 51*m.b513 <= 0)
m.c482 = Constraint(expr= m.x234 - 54*m.b514 <= 0)
m.c483 = Constraint(expr= m.x235 - 51*m.b515 <= 0)
m.c484 = Constraint(expr= m.x236 - 54*m.b516 <= 0)
m.c485 = Constraint(expr= m.x237 - 51*m.b517 <= 0)
m.c486 = Constraint(expr= m.x238 - 54*m.b518 <= 0)
m.c487 = Constraint(expr= m.x239 - 51*m.b519 <= 0)
m.c488 = Constraint(expr= m.x240 - 54*m.b520 <= 0)
m.c489 = Constraint(expr= m.x241 - 51*m.b521 <= 0)
m.c490 = Constraint(expr= m.x242 - 54*m.b522 <= 0)
m.c491 = Constraint(expr= m.x243 - 51*m.b523 <= 0)
m.c492 = Constraint(expr= m.x244 - 54*m.b524 <= 0)
m.c493 = Constraint(expr= m.x245 - 51*m.b525 <= 0)
m.c494 = Constraint(expr= m.x254 - 40*m.b518 <= 0)
m.c495 = Constraint(expr= m.x255 - 45*m.b519 <= 0)
m.c496 = Constraint(expr= m.x256 - 40*m.b520 <= 0)
m.c497 = Constraint(expr= m.x257 - 45*m.b521 <= 0)
m.c498 = Constraint(expr= m.x258 - 40*m.b522 <= 0)
m.c499 = Constraint(expr= m.x259 - 45*m.b523 <= 0)
m.c500 = Constraint(expr= m.x260 - 40*m.b524 <= 0)
m.c501 = Constraint(expr= m.x261 - 45*m.b525 <= 0)
m.c502 = Constraint(expr= m.x246 - 40*m.b526 <= 0)
m.c503 = Constraint(expr= m.x247 - 45*m.b527 <= 0)
m.c504 = Constraint(expr= m.x248 - 40*m.b528 <= 0)
m.c505 = Constraint(expr= m.x249 - 45*m.b529 <= 0)
m.c506 = Constraint(expr= m.x250 - 40*m.b530 <= 0)
m.c507 = Constraint(expr= m.x251 - 45*m.b531 <= 0)
m.c508 = Constraint(expr= m.x252 - 40*m.b532 <= 0)
m.c509 = Constraint(expr= m.x253 - 45*m.b533 <= 0)
m.c510 = Constraint(expr= m.x174 - 10*m.b470 <= 0)
m.c511 = Constraint(expr= m.x175 - 10*m.b471 <= 0)
m.c512 = Constraint(expr= m.x176 - 10*m.b472 <= 0)
m.c513 = Constraint(expr= m.x177 - 10*m.b473 <= 0)
m.c514 = Constraint(expr= m.x178 - 50*m.b474 <= 0)
m.c515 = Constraint(expr= m.x179 - 50*m.b475 <= 0)
m.c516 = Constraint(expr= m.x180 - 50*m.b476 <= 0)
m.c517 = Constraint(expr= m.x181 - 50*m.b477 <= 0)
m.c518 = Constraint(expr= m.x182 + m.x190 - 40*m.b478 <= 0)
m.c519 = Constraint(expr= m.x183 + m.x191 - 40*m.b479 <= 0)
m.c520 = Constraint(expr= m.x184 + m.x192 - 40*m.b480 <= 0)
m.c521 = Constraint(expr= m.x185 + m.x193 - 40*m.b481 <= 0)
m.c522 = Constraint(expr= m.x186 + m.x194 - 60*m.b482 <= 0)
m.c523 = Constraint(expr= m.x187 + m.x195 - 60*m.b483 <= 0)
m.c524 = Constraint(expr= m.x188 + m.x196 - 60*m.b484 <= 0)
m.c525 = Constraint(expr= m.x189 + m.x197 - 60*m.b485 <= 0)
m.c526 = Constraint(expr= m.x198 - 15*m.b486 <= 0)
m.c527 = Constraint(expr= m.x199 - 15*m.b487 <= 0)
m.c528 = Constraint(expr= m.x200 - 15*m.b488 <= 0)
m.c529 = Constraint(expr= m.x201 - 15*m.b489 <= 0)
m.c530 = Constraint(expr= m.x202 - 25*m.b490 <= 0)
m.c531 = Constraint(expr= m.x203 - 25*m.b491 <= 0)
m.c532 = Constraint(expr= m.x204 - 25*m.b492 <= 0)
m.c533 = Constraint(expr= m.x205 - 25*m.b493 <= 0)
m.c534 = Constraint(expr= m.x206 - 15*m.b494 <= 0)
m.c535 = Constraint(expr= m.x207 - 15*m.b495 <= 0)
m.c536 = Constraint(expr= m.x208 - 15*m.b496 <= 0)
m.c537 = Constraint(expr= m.x209 - 15*m.b497 <= 0)
m.c538 = Constraint(expr= m.x210 - 20*m.b498 <= 0)
m.c539 = Constraint(expr= m.x211 - 20*m.b499 <= 0)
m.c540 = Constraint(expr= m.x212 - 20*m.b500 <= 0)
m.c541 = Constraint(expr= m.x213 - 20*m.b501 <= 0)
m.c542 = Constraint(expr= m.x222 - 10*m.b502 <= 0)
m.c543 = Constraint(expr= m.x223 - 10*m.b503 <= 0)
m.c544 = Constraint(expr= m.x224 - 10*m.b504 <= 0)
m.c545 = Constraint(expr= m.x225 - 10*m.b505 <= 0)
m.c546 = Constraint(expr= m.x226 - 20*m.b506 <= 0)
m.c547 = Constraint(expr= m.x227 - 20*m.b507 <= 0)
m.c548 = Constraint(expr= m.x228 - 20*m.b508 <= 0)
m.c549 = Constraint(expr= m.x229 - 20*m.b509 <= 0)
m.c550 = Constraint(expr= m.x214 + m.x230 - 20*m.b510 <= 0)
m.c551 = Constraint(expr= m.x215 + m.x231 - 20*m.b511 <= 0)
m.c552 = Constraint(expr= m.x216 + m.x232 - 20*m.b512 <= 0)
m.c553 = Constraint(expr= m.x217 + m.x233 - 20*m.b513 <= 0)
m.c554 = Constraint(expr= m.x218 + m.x234 - 55*m.b514 <= 0)
m.c555 = Constraint(expr= m.x219 + m.x235 - 55*m.b515 <= 0)
m.c556 = Constraint(expr= m.x220 + m.x236 - 55*m.b516 <= 0)
m.c557 = Constraint(expr= m.x221 + m.x237 - 55*m.b517 <= 0)
m.c558 = Constraint(expr= m.x238 + m.x254 - 25*m.b518 <= 0)
m.c559 = Constraint(expr= m.x239 + m.x255 - 25*m.b519 <= 0)
m.c560 = Constraint(expr= m.x240 + m.x256 - 25*m.b520 <= 0)
m.c561 = Constraint(expr= m.x241 + m.x257 - 25*m.b521 <= 0)
m.c562 = Constraint(expr= m.x242 + m.x258 - 50*m.b522 <= 0)
m.c563 = Constraint(expr= m.x243 + m.x259 - 50*m.b523 <= 0)
m.c564 = Constraint(expr= m.x244 + m.x260 - 50*m.b524 <= 0)
m.c565 = Constraint(expr= m.x245 + m.x261 - 50*m.b525 <= 0)
m.c566 = Constraint(expr= m.x246 - 15*m.b526 <= 0)
m.c567 = Constraint(expr= m.x247 - 15*m.b527 <= 0)
m.c568 = Constraint(expr= m.x248 - 15*m.b528 <= 0)
m.c569 = Constraint(expr= m.x249 - 15*m.b529 <= 0)
m.c570 = Constraint(expr= m.x250 - 35*m.b530 <= 0)
m.c571 = Constraint(expr= m.x251 - 35*m.b531 <= 0)
m.c572 = Constraint(expr= m.x252 - 35*m.b532 <= 0)
m.c573 = Constraint(expr= m.x253 - 35*m.b533 <= 0)
m.c574 = Constraint(expr= m.x158 - m.x406 - m.x408 - m.x410 - m.x412 == 0)
m.c575 = Constraint(expr= m.x159 - m.x407 - m.x409 - m.x411 - m.x413 == 0)
m.c576 = Constraint(expr= m.x160 - m.x414 - m.x416 - m.x418 - m.x420 == 0)
m.c577 = Constraint(expr= m.x161 - m.x415 - m.x417 - m.x419 - m.x421 == 0)
m.c578 = Constraint(expr= m.x162 - m.x422 - m.x424 - m.x426 - m.x428 == 0)
m.c579 = Constraint(expr= m.x163 - m.x423 - m.x425 - m.x427 - m.x429 == 0)
m.c580 = Constraint(expr= m.x164 - m.x430 - m.x432 - m.x434 - m.x436 == 0)
m.c581 = Constraint(expr= m.x165 - m.x431 - m.x433 - m.x435 - m.x437 == 0)
m.c582 = Constraint(expr= m.x166 - m.x438 - m.x440 - m.x442 - m.x444 == 0)
m.c583 = Constraint(expr= m.x167 - m.x439 - m.x441 - m.x443 - m.x445 == 0)
m.c584 = Constraint(expr= m.x168 - m.x446 - m.x448 - m.x450 - m.x452 == 0)
m.c585 = Constraint(expr= m.x169 - m.x447 - m.x449 - m.x451 - m.x453 == 0)
m.c586 = Constraint(expr= m.x170 - m.x454 - m.x456 - m.x458 - m.x460 == 0)
m.c587 = Constraint(expr= m.x171 - m.x455 - m.x457 - m.x459 - m.x461 == 0)
m.c588 = Constraint(expr= m.x172 - m.x462 - m.x464 - m.x466 - m.x468 == 0)
m.c589 = Constraint(expr= m.x173 - m.x463 - m.x465 - m.x467 - m.x469 == 0)
m.c590 = Constraint(expr= m.x406 <= 0)
m.c591 = Constraint(expr= m.x407 <= 0)
m.c592 = Constraint(expr= m.x408 - 6*m.b536 <= 0)
m.c593 = Constraint(expr= m.x409 - 4*m.b537 <= 0)
m.c594 = Constraint(expr= m.x410 - 40*m.b538 <= 0)
m.c595 = Constraint(expr= m.x411 - 35*m.b539 <= 0)
m.c596 = Constraint(expr= m.x412 - 46*m.b540 <= 0)
m.c597 = Constraint(expr= m.x413 - 39*m.b541 <= 0)
m.c598 = Constraint(expr= m.x414 <= 0)
m.c599 = Constraint(expr= m.x415 <= 0)
m.c600 = Constraint(expr= m.x416 - 7*m.b544 <= 0)
m.c601 = Constraint(expr= m.x417 - 4*m.b545 <= 0)
m.c602 = Constraint(expr= m.x418 - 30*m.b546 <= 0)
m.c603 = Constraint(expr= m.x419 - 25*m.b547 <= 0)
m.c604 = Constraint(expr= m.x420 - 37*m.b548 <= 0)
m.c605 = Constraint(expr= m.x421 - 29*m.b549 <= 0)
m.c606 = Constraint(expr= m.x422 <= 0)
m.c607 = Constraint(expr= m.x423 <= 0)
m.c608 = Constraint(expr= m.x424 - 7*m.b552 <= 0)
m.c609 = Constraint(expr= m.x425 - 5*m.b553 <= 0)
m.c610 = Constraint(expr= m.x426 - 15*m.b554 <= 0)
m.c611 = Constraint(expr= m.x427 - 5*m.b555 <= 0)
m.c612 = Constraint(expr= m.x428 - 22*m.b556 <= 0)
m.c613 = Constraint(expr= m.x429 - 10*m.b557 <= 0)
m.c614 = Constraint(expr= m.x430 <= 0)
m.c615 = Constraint(expr= m.x431 <= 0)
m.c616 = Constraint(expr= m.x432 - 11*m.b560 <= 0)
m.c617 = Constraint(expr= m.x433 - 8*m.b561 <= 0)
m.c618 = Constraint(expr= m.x434 - 13*m.b562 <= 0)
m.c619 = Constraint(expr= m.x435 - 8*m.b563 <= 0)
m.c620 = Constraint(expr= m.x436 - 24*m.b564 <= 0)
m.c621 = Constraint(expr= m.x437 - 16*m.b565 <= 0)
m.c622 = Constraint(expr= m.x438 <= 0)
m.c623 = Constraint(expr= m.x439 <= 0)
m.c624 = Constraint(expr= m.x440 - 10*m.b568 <= 0)
m.c625 = Constraint(expr= m.x441 - 7*m.b569 <= 0)
m.c626 = Constraint(expr= m.x442 - 13*m.b570 <= 0)
m.c627 = Constraint(expr= m.x443 - 8*m.b571 <= 0)
m.c628 = Constraint(expr= m.x444 - 23*m.b572 <= 0)
m.c629 = Constraint(expr= m.x445 - 15*m.b573 <= 0)
m.c630 = Constraint(expr= m.x446 <= 0)
m.c631 = Constraint(expr= m.x447 <= 0)
m.c632 = Constraint(expr= m.x448 - 9*m.b576 <= 0)
m.c633 = Constraint(expr= m.x449 - 9*m.b577 <= 0)
m.c634 = Constraint(expr= m.x450 - 30*m.b578 <= 0)
m.c635 = Constraint(expr= m.x451 - 30*m.b579 <= 0)
m.c636 = Constraint(expr= m.x452 - 39*m.b580 <= 0)
m.c637 = Constraint(expr= m.x453 - 39*m.b581 <= 0)
m.c638 = Constraint(expr= m.x454 <= 0)
m.c639 = Constraint(expr= m.x455 <= 0)
m.c640 = Constraint(expr= m.x456 - 8*m.b584 <= 0)
m.c641 = Constraint(expr= m.x457 - 7*m.b585 <= 0)
m.c642 = Constraint(expr= m.x458 - 20*m.b586 <= 0)
m.c643 = Constraint(expr= m.x459 - 15*m.b587 <= 0)
m.c644 = Constraint(expr= m.x460 - 28*m.b588 <= 0)
m.c645 = Constraint(expr= m.x461 - 22*m.b589 <= 0)
m.c646 = Constraint(expr= m.x462 <= 0)
m.c647 = Constraint(expr= m.x463 <= 0)
m.c648 = Constraint(expr= m.x464 - 8*m.b592 <= 0)
m.c649 = Constraint(expr= m.x465 - 6*m.b593 <= 0)
m.c650 = Constraint(expr= m.x466 - 15*m.b594 <= 0)
m.c651 = Constraint(expr= m.x467 - 10*m.b595 <= 0)
m.c652 = Constraint(expr= m.x468 - 23*m.b596 <= 0)
m.c653 = Constraint(expr= m.x469 - 16*m.b597 <= 0)
m.c654 = Constraint(expr= m.x406 == 0)
m.c655 = Constraint(expr= m.x407 == 0)
m.c656 = Constraint(expr= m.x408 - 6*m.b536 == 0)
m.c657 = Constraint(expr= m.x409 - 4*m.b537 == 0)
m.c658 = Constraint(expr= m.x410 - 40*m.b538 == 0)
m.c659 = Constraint(expr= m.x411 - 35*m.b539 == 0)
m.c660 = Constraint(expr= m.x412 - 46*m.b540 == 0)
m.c661 = Constraint(expr= m.x413 - 39*m.b541 == 0)
m.c662 = Constraint(expr= m.x414 == 0)
m.c663 = Constraint(expr= m.x415 == 0)
m.c664 = Constraint(expr= m.x416 - 7*m.b544 == 0)
m.c665 = Constraint(expr= m.x417 - 4*m.b545 == 0)
m.c666 = Constraint(expr= m.x418 - 30*m.b546 == 0)
m.c667 = Constraint(expr= m.x419 - 25*m.b547 == 0)
m.c668 = Constraint(expr= m.x420 - 37*m.b548 == 0)
m.c669 = Constraint(expr= m.x421 - 29*m.b549 == 0)
m.c670 = Constraint(expr= m.x422 == 0)
m.c671 = Constraint(expr= m.x423 == 0)
m.c672 = Constraint(expr= m.x424 - 7*m.b552 == 0)
m.c673 = Constraint(expr= m.x425 - 5*m.b553 == 0)
m.c674 = Constraint(expr= m.x426 - 15*m.b554 == 0)
m.c675 = Constraint(expr= m.x427 - 5*m.b555 == 0)
m.c676 = Constraint(expr= m.x428 - 22*m.b556 == 0)
m.c677 = Constraint(expr= m.x429 - 10*m.b557 == 0)
m.c678 = Constraint(expr= m.x430 == 0)
m.c679 = Constraint(expr= m.x431 == 0)
m.c680 = Constraint(expr= m.x432 - 11*m.b560 == 0)
m.c681 = Constraint(expr= m.x433 - 8*m.b561 == 0)
m.c682 = Constraint(expr= m.x434 - 13*m.b562 == 0)
m.c683 = Constraint(expr= m.x435 - 8*m.b563 == 0)
m.c684 = Constraint(expr= m.x436 - 24*m.b564 == 0)
m.c685 = Constraint(expr= m.x437 - 16*m.b565 == 0)
m.c686 = Constraint(expr= m.x438 == 0)
m.c687 = Constraint(expr= m.x439 == 0)
m.c688 = Constraint(expr= m.x440 - 10*m.b568 == 0)
m.c689 = Constraint(expr= m.x441 - 7*m.b569 == 0)
m.c690 = Constraint(expr= m.x442 - 13*m.b570 == 0)
m.c691 = Constraint(expr= m.x443 - 8*m.b571 == 0)
m.c692 = Constraint(expr= m.x444 - 23*m.b572 == 0)
m.c693 = Constraint(expr= m.x445 - 15*m.b573 == 0)
m.c694 = Constraint(expr= m.x446 == 0)
m.c695 = Constraint(expr= m.x447 == 0)
m.c696 = Constraint(expr= m.x448 - 9*m.b576 == 0)
m.c697 = Constraint(expr= m.x449 - 9*m.b577 == 0)
m.c698 = Constraint(expr= m.x450 - 30*m.b578 == 0)
m.c699 = Constraint(expr= m.x451 - 30*m.b579 == 0)
m.c700 = Constraint(expr= m.x452 - 39*m.b580 == 0)
m.c701 = Constraint(expr= m.x453 - 39*m.b581 == 0)
m.c702 = Constraint(expr= m.x454 == 0)
m.c703 = Constraint(expr= m.x455 == 0)
m.c704 = Constraint(expr= m.x456 - 8*m.b584 == 0)
m.c705 = Constraint(expr= m.x457 - 7*m.b585 == 0)
m.c706 = Constraint(expr= m.x458 - 20*m.b586 == 0)
m.c707 = Constraint(expr= m.x459 - 15*m.b587 == 0)
m.c708 = Constraint(expr= m.x460 - 28*m.b588 == 0)
m.c709 = Constraint(expr= m.x461 - 22*m.b589 == 0)
m.c710 = Constraint(expr= m.x462 == 0)
m.c711 = Constraint(expr= m.x463 == 0)
m.c712 = Constraint(expr= m.x464 - 8*m.b592 == 0)
m.c713 = Constraint(expr= m.x465 - 6*m.b593 == 0)
m.c714 = Constraint(expr= m.x466 - 15*m.b594 == 0)
m.c715 = Constraint(expr= m.x467 - 10*m.b595 == 0)
m.c716 = Constraint(expr= m.x468 - 23*m.b596 == 0)
m.c717 = Constraint(expr= m.x469 - 16*m.b597 == 0)
m.c718 = Constraint(expr= 20*m.x2 + 20*m.x12 + 18*m.x20 + 16*m.x44 + 20*m.x58 + m.x158 + m.x160 + m.x162 + m.x164
+ m.x166 + m.x168 + m.x170 + m.x172 <= 4000)
m.c719 = Constraint(expr= 17*m.x3 + 21*m.x13 + 20*m.x21 + 19*m.x45 + 18*m.x59 + m.x159 + m.x161 + m.x163 + m.x165
+ m.x167 + m.x169 + m.x171 + m.x173 <= 3800)
m.c720 = Constraint(expr= m.b470 + m.b472 + m.b474 + m.b476 == 1)
m.c721 = Constraint(expr= m.b471 + m.b473 + m.b475 + m.b477 == 1)
m.c722 = Constraint(expr= m.b478 + m.b480 + m.b482 + m.b484 == 1)
m.c723 = Constraint(expr= m.b479 + m.b481 + m.b483 + m.b485 == 1)
m.c724 = Constraint(expr= m.b486 + m.b488 + m.b490 + m.b492 == 1)
m.c725 = Constraint(expr= m.b487 + m.b489 + m.b491 + m.b493 == 1)
m.c726 = Constraint(expr= m.b494 + m.b496 + m.b498 + m.b500 == 1)
m.c727 = Constraint(expr= m.b495 + m.b497 + m.b499 + m.b501 == 1)
m.c728 = Constraint(expr= m.b502 + m.b504 + m.b506 + m.b508 == 1)
m.c729 = Constraint(expr= m.b503 + m.b505 + m.b507 + m.b509 == 1)
m.c730 = Constraint(expr= m.b510 + m.b512 + m.b514 + m.b516 == 1)
m.c731 = Constraint(expr= m.b511 + m.b513 + m.b515 + m.b517 == 1)
m.c732 = Constraint(expr= m.b518 + m.b520 + m.b522 + m.b524 == 1)
m.c733 = Constraint(expr= m.b519 + m.b521 + m.b523 + m.b525 == 1)
m.c734 = Constraint(expr= m.b526 + m.b528 + m.b530 + m.b532 == 1)
m.c735 = Constraint(expr= m.b527 + m.b529 + m.b531 + m.b533 == 1)
m.c736 = Constraint(expr= m.b534 + m.b536 + m.b538 + m.b540 == 1)
m.c737 = Constraint(expr= m.b535 + m.b537 + m.b539 + m.b541 == 1)
m.c738 = Constraint(expr= m.b542 + m.b544 + m.b546 + m.b548 == 1)
m.c739 = Constraint(expr= m.b543 + m.b545 + m.b547 + m.b549 == 1)
m.c740 = Constraint(expr= m.b550 + m.b552 + m.b554 + m.b556 == 1)
m.c741 = Constraint(expr= m.b551 + m.b553 + m.b555 + m.b557 == 1)
m.c742 = Constraint(expr= m.b558 + m.b560 + m.b562 + m.b564 == 1)
m.c743 = Constraint(expr= m.b559 + m.b561 + m.b563 + m.b565 == 1)
m.c744 = Constraint(expr= m.b566 + m.b568 + m.b570 + m.b572 == 1)
m.c745 = Constraint(expr= m.b567 + m.b569 + m.b571 + m.b573 == 1)
m.c746 = Constraint(expr= m.b574 + m.b576 + m.b578 + m.b580 == 1)
m.c747 = Constraint(expr= m.b575 + m.b577 + m.b579 + m.b581 == 1)
m.c748 = Constraint(expr= m.b582 + m.b584 + m.b586 + m.b588 == 1)
m.c749 = Constraint(expr= m.b583 + m.b585 + m.b587 + m.b589 == 1)
m.c750 = Constraint(expr= m.b590 + m.b592 + m.b594 + m.b596 == 1)
m.c751 = Constraint(expr= m.b591 + m.b593 + m.b595 + m.b597 == 1)
m.c752 = Constraint(expr= m.b472 - m.b473 <= 0)
m.c753 = Constraint(expr= m.b474 - m.b475 <= 0)
m.c754 = Constraint(expr= m.b476 - m.b477 <= 0)
m.c755 = Constraint(expr= m.b480 - m.b481 <= 0)
m.c756 = Constraint(expr= m.b482 - m.b483 <= 0)
m.c757 = Constraint(expr= m.b484 - m.b485 <= 0)
m.c758 = Constraint(expr= m.b488 - m.b489 <= 0)
m.c759 = Constraint(expr= m.b490 - m.b491 <= 0)
m.c760 = Constraint(expr= m.b492 - m.b493 <= 0)
m.c761 = Constraint(expr= m.b496 - m.b497 <= 0)
m.c762 = Constraint(expr= m.b498 - m.b499 <= 0)
m.c763 = Constraint(expr= m.b500 - m.b501 <= 0)
m.c764 = Constraint(expr= m.b504 - m.b505 <= 0)
m.c765 = Constraint(expr= m.b506 - m.b507 <= 0)
m.c766 = Constraint(expr= m.b508 - m.b509 <= 0)
m.c767 = Constraint(expr= m.b512 - m.b513 <= 0)
m.c768 = Constraint(expr= m.b514 - m.b515 <= 0)
m.c769 = Constraint(expr= m.b516 - m.b517 <= 0)
m.c770 = Constraint(expr= m.b520 - m.b521 <= 0)
m.c771 = Constraint(expr= m.b522 - m.b523 <= 0)
m.c772 = Constraint(expr= m.b524 - m.b525 <= 0)
m.c773 = Constraint(expr= m.b528 - m.b529 <= 0)
m.c774 = Constraint(expr= m.b530 - m.b531 <= 0)
m.c775 = Constraint(expr= m.b532 - m.b533 <= 0)
m.c776 = Constraint(expr= - m.b535 + m.b536 <= 0)
m.c777 = Constraint(expr= - m.b534 + m.b537 <= 0)
m.c778 = Constraint(expr= - m.b535 + m.b538 <= 0)
m.c779 = Constraint(expr= - m.b534 + m.b539 <= 0)
m.c780 = Constraint(expr= - m.b535 + m.b540 <= 0)
m.c781 = Constraint(expr= - m.b534 + m.b541 <= 0)
m.c782 = Constraint(expr= - m.b543 + m.b544 <= 0)
m.c783 = Constraint(expr= - m.b542 + m.b545 <= 0)
m.c784 = Constraint(expr= - m.b543 + m.b546 <= 0)
m.c785 = Constraint(expr= - m.b542 + m.b547 <= 0)
m.c786 = Constraint(expr= - m.b543 + m.b548 <= 0)
m.c787 = Constraint(expr= - m.b542 + m.b549 <= 0)
m.c788 = Constraint(expr= - m.b551 + m.b552 <= 0)
m.c789 = Constraint(expr= - m.b550 + m.b553 <= 0)
m.c790 = Constraint(expr= - m.b551 + m.b554 <= 0)
m.c791 = Constraint(expr= - m.b550 + m.b555 <= 0)
m.c792 = Constraint(expr= - m.b551 + m.b556 <= 0)
m.c793 = Constraint(expr= - m.b550 + m.b557 <= 0)
m.c794 = Constraint(expr= - m.b559 + m.b560 <= 0)
m.c795 = Constraint(expr= - m.b558 + m.b561 <= 0)
m.c796 = Constraint(expr= - m.b559 + m.b562 <= 0)
m.c797 = Constraint(expr= - m.b558 + m.b563 <= 0)
m.c798 = Constraint(expr= - m.b559 + m.b564 <= 0)
m.c799 = Constraint(expr= - m.b558 + m.b565 <= 0)
m.c800 = Constraint(expr= - m.b567 + m.b568 <= 0)
m.c801 = Constraint(expr= - m.b566 + m.b569 <= 0)
m.c802 = Constraint(expr= - m.b567 + m.b570 <= 0)
m.c803 = Constraint(expr= - m.b566 + m.b571 <= 0)
m.c804 = Constraint(expr= - m.b567 + m.b572 <= 0)
m.c805 = Constraint(expr= - m.b566 + m.b573 <= 0)
m.c806 = Constraint(expr= - m.b575 + m.b576 <= 0)
m.c807 = Constraint(expr= - m.b574 + m.b577 <= 0)
m.c808 = Constraint(expr= - m.b575 + m.b578 <= 0)
m.c809 = Constraint(expr= - m.b574 + m.b579 <= 0)
m.c810 = Constraint(expr= - m.b575 + m.b580 <= 0)
m.c811 = Constraint(expr= - m.b574 + m.b581 <= 0)
m.c812 = Constraint(expr= - m.b583 + m.b584 <= 0)
m.c813 = Constraint(expr= - m.b582 + m.b585 <= 0)
m.c814 = Constraint(expr= - m.b583 + m.b586 <= 0)
m.c815 = Constraint(expr= - m.b582 + m.b587 <= 0)
m.c816 = Constraint(expr= - m.b583 + m.b588 <= 0)
m.c817 = Constraint(expr= - m.b582 + m.b589 <= 0)
m.c818 = Constraint(expr= - m.b591 + m.b592 <= 0)
m.c819 = Constraint(expr= - m.b590 + m.b593 <= 0)
m.c820 = Constraint(expr= - m.b591 + m.b594 <= 0)
m.c821 = Constraint(expr= - m.b590 + m.b595 <= 0)
m.c822 = Constraint(expr= - m.b591 + m.b596 <= 0)
m.c823 = Constraint(expr= - m.b590 + m.b597 <= 0)
m.c824 = Constraint(expr= m.b470 - m.b534 <= 0)
m.c825 = Constraint(expr= m.b471 - m.b535 <= 0)
m.c826 = Constraint(expr= m.b478 - m.b542 <= 0)
m.c827 = Constraint(expr= m.b479 - m.b543 <= 0)
m.c828 = Constraint(expr= m.b486 - m.b550 <= 0)
m.c829 = Constraint(expr= m.b487 - m.b551 <= 0)
m.c830 = Constraint(expr= m.b494 - m.b558 <= 0)
m.c831 = Constraint(expr= m.b495 - m.b559 <= 0)
m.c832 = Constraint(expr= m.b502 - m.b566 <= 0)
m.c833 = Constraint(expr= m.b503 - m.b567 <= 0)
m.c834 = Constraint(expr= m.b510 - m.b574 <= 0)
m.c835 = Constraint(expr= m.b511 - m.b575 <= 0)
m.c836 = Constraint(expr= m.b518 - m.b582 <= 0)
m.c837 = Constraint(expr= m.b519 - m.b583 <= 0)
m.c838 = Constraint(expr= m.b526 - m.b590 <= 0)
m.c839 = Constraint(expr= m.b527 - m.b591 <= 0)
m.c840 = Constraint(expr= m.b472 - m.b536 <= 0)
m.c841 = Constraint(expr= - m.b472 + m.b473 - m.b537 <= 0)
m.c842 = Constraint(expr= m.b474 - m.b538 <= 0)
m.c843 = Constraint(expr= - m.b474 + m.b475 - m.b539 <= 0)
m.c844 = Constraint(expr= m.b476 - m.b540 <= 0)
m.c845 = Constraint(expr= - m.b476 + m.b477 - m.b541 <= 0)
m.c846 = Constraint(expr= m.b480 - m.b544 <= 0)
m.c847 = Constraint(expr= - m.b480 + m.b481 - m.b545 <= 0)
m.c848 = Constraint(expr= m.b482 - m.b546 <= 0)
m.c849 = Constraint(expr= - m.b482 + m.b483 - m.b547 <= 0)
m.c850 = Constraint(expr= m.b484 - m.b548 <= 0)
m.c851 = Constraint(expr= - m.b484 + m.b485 - m.b549 <= 0)
m.c852 = Constraint(expr= m.b488 - m.b552 <= 0)
m.c853 = Constraint(expr= - m.b488 + m.b489 - m.b553 <= 0)
m.c854 = Constraint(expr= m.b490 - m.b554 <= 0)
m.c855 = Constraint(expr= - m.b490 + m.b491 - m.b555 <= 0)
m.c856 = Constraint(expr= m.b492 - m.b556 <= 0)
m.c857 = Constraint(expr= - m.b492 + m.b493 - m.b557 <= 0)
m.c858 = Constraint(expr= m.b496 - m.b560 <= 0)
m.c859 = Constraint(expr= - m.b496 + m.b497 - m.b561 <= 0)
m.c860 = Constraint(expr= m.b498 - m.b562 <= 0)
m.c861 = Constraint(expr= - m.b498 + m.b499 - m.b563 <= 0)
m.c862 = Constraint(expr= m.b500 - m.b564 <= 0)
m.c863 = Constraint(expr= - m.b500 + m.b501 - m.b565 <= 0)
m.c864 = Constraint(expr= m.b504 - m.b568 <= 0)
m.c865 = Constraint(expr= - m.b504 + m.b505 - m.b569 <= 0)
m.c866 = Constraint(expr= m.b506 - m.b570 <= 0)
m.c867 = Constraint(expr= - m.b506 + m.b507 - m.b571 <= 0)
m.c868 = Constraint(expr= m.b508 - m.b572 <= 0)
m.c869 = Constraint(expr= - m.b508 + m.b509 - m.b573 <= 0)
m.c870 = Constraint(expr= m.b512 - m.b576 <= 0)
m.c871 = Constraint(expr= - m.b512 + m.b513 - m.b577 <= 0)
m.c872 = Constraint(expr= m.b514 - m.b578 <= 0)
m.c873 = Constraint(expr= - m.b514 + m.b515 - m.b579 <= 0)
m.c874 = Constraint(expr= m.b516 - m.b580 <= 0)
m.c875 = Constraint(expr= - m.b516 + m.b517 - m.b581 <= 0)
m.c876 = Constraint(expr= m.b520 - m.b584 <= 0)
m.c877 = Constraint(expr= - m.b520 + m.b521 - m.b585 <= 0)
m.c878 = Constraint(expr= m.b522 - m.b586 <= 0)
m.c879 = Constraint(expr= - m.b522 + m.b523 - m.b587 <= 0)
m.c880 = Constraint(expr= m.b524 - m.b588 <= 0)
m.c881 = Constraint(expr= - m.b524 + m.b525 - m.b589 <= 0)
m.c882 = Constraint(expr= m.b528 - m.b592 <= 0)
m.c883 = Constraint(expr= - m.b528 + m.b529 - m.b593 <= 0)
m.c884 = Constraint(expr= m.b530 - m.b594 <= 0)
m.c885 = Constraint(expr= - m.b530 + m.b531 - m.b595 <= 0)
m.c886 = Constraint(expr= m.b532 - m.b596 <= 0)
m.c887 = Constraint(expr= - m.b532 + m.b533 - m.b597 <= 0)
m.c888 = Constraint(expr= m.x10 - m.x64 - m.x598 == 0)
m.c889 = Constraint(expr= m.x11 - m.x65 - m.x599 == 0)
m.c890 = Constraint(expr= m.x18 - m.x66 - m.x620 == 0)
m.c891 = Constraint(expr= m.x19 - m.x67 - m.x621 == 0)
m.c892 = Constraint(expr= m.x40 - m.x68 - m.x654 == 0)
m.c893 = Constraint(expr= m.x41 - m.x69 - m.x655 == 0)
m.c894 = Constraint(expr= m.x42 - m.x70 - m.x656 == 0)
m.c895 = Constraint(expr= m.x43 - m.x71 - m.x657 == 0)
m.c896 = Constraint(expr= m.x598 - m.x600 - m.x602 == 0)
m.c897 = Constraint(expr= m.x599 - m.x601 - m.x603 == 0)
m.c898 = Constraint(expr= - m.x604 - m.x606 + m.x608 == 0)
m.c899 = Constraint(expr= - m.x605 - m.x607 + m.x609 == 0)
m.c900 = Constraint(expr= m.x608 - m.x610 - m.x612 == 0)
m.c901 = Constraint(expr= m.x609 - m.x611 - m.x613 == 0)
m.c902 = Constraint(expr= m.x612 - m.x614 - m.x616 - m.x618 == 0)
m.c903 = Constraint(expr= m.x613 - m.x615 - m.x617 - m.x619 == 0)
m.c904 = Constraint(expr= m.x622 - m.x628 - m.x630 == 0)
m.c905 = Constraint(expr= m.x623 - m.x629 - m.x631 == 0)
m.c906 = Constraint(expr= m.x626 - m.x632 - m.x634 - m.x636 == 0)
m.c907 = Constraint(expr= m.x627 - m.x633 - m.x635 - m.x637 == 0)
m.c908 = Constraint(expr= m.x642 - m.x650 - m.x652 == 0)
m.c909 = Constraint(expr= m.x643 - m.x651 - m.x653 == 0)
m.c910 = Constraint(expr= - m.x644 - m.x656 + m.x658 == 0)
m.c911 = Constraint(expr= - m.x645 - m.x657 + m.x659 == 0)
m.c912 = Constraint(expr= m.x646 - m.x660 - m.x662 == 0)
m.c913 = Constraint(expr= m.x647 - m.x661 - m.x663 == 0)
m.c914 = Constraint(expr= m.x648 - m.x664 - m.x666 - m.x668 == 0)
m.c915 = Constraint(expr= m.x649 - m.x665 - m.x667 - m.x669 == 0)
m.c916 = Constraint(expr= m.x686 - m.x688 == 0)
m.c917 = Constraint(expr= m.x687 - m.x689 == 0)
m.c918 = Constraint(expr= m.x688 - m.x690 - m.x692 == 0)
m.c919 = Constraint(expr= m.x689 - m.x691 - m.x693 == 0)
m.c920 = Constraint(expr= - m.x694 - m.x696 + m.x698 == 0)
m.c921 = Constraint(expr= - m.x695 - m.x697 + m.x699 == 0)
m.c922 = Constraint(expr= m.x698 - m.x700 - m.x702 == 0)
m.c923 = Constraint(expr= m.x699 - m.x701 - m.x703 == 0)
m.c924 = Constraint(expr= m.x702 - m.x704 - m.x706 - m.x708 == 0)
m.c925 = Constraint(expr= m.x703 - m.x705 - m.x707 - m.x709 == 0)
m.c926 = Constraint(expr= m.x712 - m.x718 - m.x720 == 0)
m.c927 = Constraint(expr= m.x713 - m.x719 - m.x721 == 0)
m.c928 = Constraint(expr= m.x716 - m.x722 - m.x724 - m.x726 == 0)
m.c929 = Constraint(expr= m.x717 - m.x723 - m.x725 - m.x727 == 0)
m.c930 = Constraint(expr=(m.x746/(1e-6 + m.b994) - log(1 + m.x738/(1e-6 + m.b994)))*(1e-6 + m.b994) <= 0)
m.c931 = Constraint(expr=(m.x747/(1e-6 + m.b995) - log(1 + m.x739/(1e-6 + m.b995)))*(1e-6 + m.b995) <= 0)
m.c932 = Constraint(expr= m.x740 == 0)
m.c933 = Constraint(expr= m.x741 == 0)
m.c934 = Constraint(expr= m.x748 == 0)
m.c935 = Constraint(expr= m.x749 == 0)
m.c936 = Constraint(expr= m.x600 - m.x738 - m.x740 == 0)
m.c937 = Constraint(expr= m.x601 - m.x739 - m.x741 == 0)
m.c938 = Constraint(expr= m.x604 - m.x746 - m.x748 == 0)
m.c939 = Constraint(expr= m.x605 - m.x747 - m.x749 == 0)
m.c940 = Constraint(expr= m.x738 - 40*m.b994 <= 0)
m.c941 = Constraint(expr= m.x739 - 40*m.b995 <= 0)
m.c942 = Constraint(expr= m.x740 + 40*m.b994 <= 40)
m.c943 = Constraint(expr= m.x741 + 40*m.b995 <= 40)
m.c944 = Constraint(expr= m.x746 - 3.71357206670431*m.b994 <= 0)
m.c945 = Constraint(expr= m.x747 - 3.71357206670431*m.b995 <= 0)
m.c946 = Constraint(expr= m.x748 + 3.71357206670431*m.b994 <= 3.71357206670431)
m.c947 = Constraint(expr= m.x749 + 3.71357206670431*m.b995 <= 3.71357206670431)
m.c948 = Constraint(expr=(m.x750/(1e-6 + m.b996) - 1.2*log(1 + m.x742/(1e-6 + m.b996)))*(1e-6 + m.b996) <= 0)
m.c949 = Constraint(expr=(m.x751/(1e-6 + m.b997) - 1.2*log(1 + m.x743/(1e-6 + m.b997)))*(1e-6 + m.b997) <= 0)
m.c950 = Constraint(expr= m.x744 == 0)
m.c951 = Constraint(expr= m.x745 == 0)
m.c952 = Constraint(expr= m.x752 == 0)
m.c953 = Constraint(expr= m.x753 == 0)
m.c954 = Constraint(expr= m.x602 - m.x742 - m.x744 == 0)
m.c955 = Constraint(expr= m.x603 - m.x743 - m.x745 == 0)
m.c956 = Constraint(expr= m.x606 - m.x750 - m.x752 == 0)
m.c957 = Constraint(expr= m.x607 - m.x751 - m.x753 == 0)
m.c958 = Constraint(expr= m.x742 - 40*m.b996 <= 0)
m.c959 = Constraint(expr= m.x743 - 40*m.b997 <= 0)
m.c960 = Constraint(expr= m.x744 + 40*m.b996 <= 40)
m.c961 = Constraint(expr= m.x745 + 40*m.b997 <= 40)
m.c962 = Constraint(expr= m.x750 - 4.45628648004517*m.b996 <= 0)
m.c963 = Constraint(expr= m.x751 - 4.45628648004517*m.b997 <= 0)
m.c964 = Constraint(expr= m.x752 + 4.45628648004517*m.b996 <= 4.45628648004517)
m.c965 = Constraint(expr= m.x753 + 4.45628648004517*m.b997 <= 4.45628648004517)
m.c966 = Constraint(expr= - 0.75*m.x754 + m.x770 == 0)
m.c967 = Constraint(expr= - 0.75*m.x755 + m.x771 == 0)
m.c968 = Constraint(expr= m.x756 == 0)
m.c969 = Constraint(expr= m.x757 == 0)
m.c970 = Constraint(expr= m.x772 == 0)
m.c971 = Constraint(expr= m.x773 == 0)
m.c972 = Constraint(expr= m.x614 - m.x754 - m.x756 == 0)
m.c973 = Constraint(expr= m.x615 - m.x755 - m.x757 == 0)
m.c974 = Constraint(expr= m.x622 - m.x770 - m.x772 == 0)
m.c975 = Constraint(expr= m.x623 - m.x771 - m.x773 == 0)
m.c976 = Constraint(expr= m.x754 - 4.45628648004517*m.b998 <= 0)
m.c977 = Constraint(expr= m.x755 - 4.45628648004517*m.b999 <= 0)
m.c978 = Constraint(expr= m.x756 + 4.45628648004517*m.b998 <= 4.45628648004517)
m.c979 = Constraint(expr= m.x757 + 4.45628648004517*m.b999 <= 4.45628648004517)
m.c980 = Constraint(expr= m.x770 - 3.34221486003388*m.b998 <= 0)
m.c981 = Constraint(expr= m.x771 - 3.34221486003388*m.b999 <= 0)
m.c982 = Constraint(expr= m.x772 + 3.34221486003388*m.b998 <= 3.34221486003388)
m.c983 = Constraint(expr= m.x773 + 3.34221486003388*m.b999 <= 3.34221486003388)
m.c984 = Constraint(expr=(m.x774/(1e-6 + m.b1000) - 1.5*log(1 + m.x758/(1e-6 + m.b1000)))*(1e-6 + m.b1000) <= 0)
m.c985 = Constraint(expr=(m.x775/(1e-6 + m.b1001) - 1.5*log(1 + m.x759/(1e-6 + m.b1001)))*(1e-6 + m.b1001) <= 0)
m.c986 = Constraint(expr= m.x760 == 0)
m.c987 = Constraint(expr= m.x761 == 0)
m.c988 = Constraint(expr= m.x778 == 0)
m.c989 = Constraint(expr= m.x779 == 0)
m.c990 = Constraint(expr= m.x616 - m.x758 - m.x760 == 0)
m.c991 = Constraint(expr= m.x617 - m.x759 - m.x761 == 0)
m.c992 = Constraint(expr= m.x624 - m.x774 - m.x778 == 0)
m.c993 = Constraint(expr= m.x625 - m.x775 - m.x779 == 0)
m.c994 = Constraint(expr= m.x758 - 4.45628648004517*m.b1000 <= 0)
m.c995 = Constraint(expr= m.x759 - 4.45628648004517*m.b1001 <= 0)
m.c996 = Constraint(expr= m.x760 + 4.45628648004517*m.b1000 <= 4.45628648004517)
m.c997 = Constraint(expr= m.x761 + 4.45628648004517*m.b1001 <= 4.45628648004517)
m.c998 = Constraint(expr= m.x774 - 2.54515263975353*m.b1000 <= 0)
m.c999 = Constraint(expr= m.x775 - 2.54515263975353*m.b1001 <= 0)
m.c1000 = Constraint(expr= m.x778 + 2.54515263975353*m.b1000 <= 2.54515263975353)
m.c1001 = Constraint(expr= m.x779 + 2.54515263975353*m.b1001 <= 2.54515263975353)
m.c1002 = Constraint(expr= - m.x762 + m.x782 == 0)
m.c1003 = Constraint(expr= - m.x763 + m.x783 == 0)
m.c1004 = Constraint(expr= - 0.5*m.x766 + m.x782 == 0)
m.c1005 = Constraint(expr= - 0.5*m.x767 + m.x783 == 0)
m.c1006 = Constraint(expr= m.x764 == 0)
m.c1007 = Constraint(expr= m.x765 == 0)
m.c1008 = Constraint(expr= m.x768 == 0)
m.c1009 = Constraint(expr= m.x769 == 0)
m.c1010 = Constraint(expr= m.x784 == 0)
m.c1011 = Constraint(expr= m.x785 == 0)
m.c1012 = Constraint(expr= m.x618 - m.x762 - m.x764 == 0)
m.c1013 = Constraint(expr= m.x619 - m.x763 - m.x765 == 0)
m.c1014 = Constraint(expr= m.x620 - m.x766 - m.x768 == 0)
m.c1015 = Constraint(expr= m.x621 - m.x767 - m.x769 == 0)
m.c1016 = Constraint(expr= m.x626 - m.x782 - m.x784 == 0)
m.c1017 = Constraint(expr= m.x627 - m.x783 - m.x785 == 0)
m.c1018 = Constraint(expr= m.x762 - 4.45628648004517*m.b1002 <= 0)
m.c1019 = Constraint(expr= m.x763 - 4.45628648004517*m.b1003 <= 0)
m.c1020 = Constraint(expr= m.x764 + 4.45628648004517*m.b1002 <= 4.45628648004517)
m.c1021 = Constraint(expr= m.x765 + 4.45628648004517*m.b1003 <= 4.45628648004517)
m.c1022 = Constraint(expr= m.x766 - 30*m.b1002 <= 0)
m.c1023 = Constraint(expr= m.x767 - 30*m.b1003 <= 0)
m.c1024 = Constraint(expr= m.x768 + 30*m.b1002 <= 30)
m.c1025 = Constraint(expr= m.x769 + 30*m.b1003 <= 30)
m.c1026 = Constraint(expr= m.x782 - 15*m.b1002 <= 0)
m.c1027 = Constraint(expr= m.x783 - 15*m.b1003 <= 0)
m.c1028 = Constraint(expr= m.x784 + 15*m.b1002 <= 15)
m.c1029 = Constraint(expr= m.x785 + 15*m.b1003 <= 15)
m.c1030 = Constraint(expr=(m.x806/(1e-6 + m.b1004) - 1.25*log(1 + m.x786/(1e-6 + m.b1004)))*(1e-6 + m.b1004) <= 0)
m.c1031 = Constraint(expr=(m.x807/(1e-6 + m.b1005) - 1.25*log(1 + m.x787/(1e-6 + m.b1005)))*(1e-6 + m.b1005) <= 0)
m.c1032 = Constraint(expr= m.x788 == 0)
m.c1033 = Constraint(expr= m.x789 == 0)
m.c1034 = Constraint(expr= m.x810 == 0)
m.c1035 = Constraint(expr= m.x811 == 0)
m.c1036 = Constraint(expr= m.x628 - m.x786 - m.x788 == 0)
m.c1037 = Constraint(expr= m.x629 - m.x787 - m.x789 == 0)
m.c1038 = Constraint(expr= m.x638 - m.x806 - m.x810 == 0)
m.c1039 = Constraint(expr= m.x639 - m.x807 - m.x811 == 0)
m.c1040 = Constraint(expr= m.x786 - 3.34221486003388*m.b1004 <= 0)
m.c1041 = Constraint(expr= m.x787 - 3.34221486003388*m.b1005 <= 0)
m.c1042 = Constraint(expr= m.x788 + 3.34221486003388*m.b1004 <= 3.34221486003388)
m.c1043 = Constraint(expr= m.x789 + 3.34221486003388*m.b1005 <= 3.34221486003388)
m.c1044 = Constraint(expr= m.x806 - 1.83548069293539*m.b1004 <= 0)
m.c1045 = Constraint(expr= m.x807 - 1.83548069293539*m.b1005 <= 0)
m.c1046 = Constraint(expr= m.x810 + 1.83548069293539*m.b1004 <= 1.83548069293539)
m.c1047 = Constraint(expr= m.x811 + 1.83548069293539*m.b1005 <= 1.83548069293539)
m.c1048 = Constraint(expr=(m.x814/(1e-6 + m.b1006) - 0.9*log(1 + m.x790/(1e-6 + m.b1006)))*(1e-6 + m.b1006) <= 0)
m.c1049 = Constraint(expr=(m.x815/(1e-6 + m.b1007) - 0.9*log(1 + m.x791/(1e-6 + m.b1007)))*(1e-6 + m.b1007) <= 0)
m.c1050 = Constraint(expr= m.x792 == 0)
m.c1051 = Constraint(expr= m.x793 == 0)
m.c1052 = Constraint(expr= m.x818 == 0)
m.c1053 = Constraint(expr= m.x819 == 0)
m.c1054 = Constraint(expr= m.x630 - m.x790 - m.x792 == 0)
m.c1055 = Constraint(expr= m.x631 - m.x791 - m.x793 == 0)
m.c1056 = Constraint(expr= m.x640 - m.x814 - m.x818 == 0)
m.c1057 = Constraint(expr= m.x641 - m.x815 - m.x819 == 0)
m.c1058 = Constraint(expr= m.x790 - 3.34221486003388*m.b1006 <= 0)
m.c1059 = Constraint(expr= m.x791 - 3.34221486003388*m.b1007 <= 0)
m.c1060 = Constraint(expr= m.x792 + 3.34221486003388*m.b1006 <= 3.34221486003388)
m.c1061 = Constraint(expr= m.x793 + 3.34221486003388*m.b1007 <= 3.34221486003388)
m.c1062 = Constraint(expr= m.x814 - 1.32154609891348*m.b1006 <= 0)
m.c1063 = Constraint(expr= m.x815 - 1.32154609891348*m.b1007 <= 0)
m.c1064 = Constraint(expr= m.x818 + 1.32154609891348*m.b1006 <= 1.32154609891348)
m.c1065 = Constraint(expr= m.x819 + 1.32154609891348*m.b1007 <= 1.32154609891348)
m.c1066 = Constraint(expr=(m.x822/(1e-6 + m.b1008) - log(1 + m.x776/(1e-6 + m.b1008)))*(1e-6 + m.b1008) <= 0)
m.c1067 = Constraint(expr=(m.x823/(1e-6 + m.b1009) - log(1 + m.x777/(1e-6 + m.b1009)))*(1e-6 + m.b1009) <= 0)
m.c1068 = Constraint(expr= m.x780 == 0)
m.c1069 = Constraint(expr= m.x781 == 0)
m.c1070 = Constraint(expr= m.x824 == 0)
m.c1071 = Constraint(expr= m.x825 == 0)
m.c1072 = Constraint(expr= m.x624 - m.x776 - m.x780 == 0)
m.c1073 = Constraint(expr= m.x625 - m.x777 - m.x781 == 0)
m.c1074 = Constraint(expr= m.x642 - m.x822 - m.x824 == 0)
m.c1075 = Constraint(expr= m.x643 - m.x823 - m.x825 == 0)
m.c1076 = Constraint(expr= m.x776 - 2.54515263975353*m.b1008 <= 0)
m.c1077 = Constraint(expr= m.x777 - 2.54515263975353*m.b1009 <= 0)
m.c1078 = Constraint(expr= m.x780 + 2.54515263975353*m.b1008 <= 2.54515263975353)
m.c1079 = Constraint(expr= m.x781 + 2.54515263975353*m.b1009 <= 2.54515263975353)
m.c1080 = Constraint(expr= m.x822 - 1.26558121681553*m.b1008 <= 0)
m.c1081 = Constraint(expr= m.x823 - 1.26558121681553*m.b1009 <= 0)
m.c1082 = Constraint(expr= m.x824 + 1.26558121681553*m.b1008 <= 1.26558121681553)
m.c1083 = Constraint(expr= m.x825 + 1.26558121681553*m.b1009 <= 1.26558121681553)
m.c1084 = Constraint(expr= - 0.9*m.x794 + m.x826 == 0)
m.c1085 = Constraint(expr= - 0.9*m.x795 + m.x827 == 0)
m.c1086 = Constraint(expr= m.x796 == 0)
m.c1087 = Constraint(expr= m.x797 == 0)
m.c1088 = Constraint(expr= m.x828 == 0)
m.c1089 = Constraint(expr= m.x829 == 0)
m.c1090 = Constraint(expr= m.x632 - m.x794 - m.x796 == 0)
m.c1091 = Constraint(expr= m.x633 - m.x795 - m.x797 == 0)
m.c1092 = Constraint(expr= m.x644 - m.x826 - m.x828 == 0)
m.c1093 = Constraint(expr= m.x645 - m.x827 - m.x829 == 0)
m.c1094 = Constraint(expr= m.x794 - 15*m.b1010 <= 0)
m.c1095 = Constraint(expr= m.x795 - 15*m.b1011 <= 0)
m.c1096 = Constraint(expr= m.x796 + 15*m.b1010 <= 15)
m.c1097 = Constraint(expr= m.x797 + 15*m.b1011 <= 15)
m.c1098 = Constraint(expr= m.x826 - 13.5*m.b1010 <= 0)
m.c1099 = Constraint(expr= m.x827 - 13.5*m.b1011 <= 0)
m.c1100 = Constraint(expr= m.x828 + 13.5*m.b1010 <= 13.5)
m.c1101 = Constraint(expr= m.x829 + 13.5*m.b1011 <= 13.5)
m.c1102 = Constraint(expr= - 0.6*m.x798 + m.x830 == 0)
m.c1103 = Constraint(expr= - 0.6*m.x799 + m.x831 == 0)
m.c1104 = Constraint(expr= m.x800 == 0)
m.c1105 = Constraint(expr= m.x801 == 0)
m.c1106 = Constraint(expr= m.x832 == 0)
m.c1107 = Constraint(expr= m.x833 == 0)
m.c1108 = Constraint(expr= m.x634 - m.x798 - m.x800 == 0)
m.c1109 = Constraint(expr= m.x635 - m.x799 - m.x801 == 0)
m.c1110 = Constraint(expr= m.x646 - m.x830 - m.x832 == 0)
m.c1111 = Constraint(expr= m.x647 - m.x831 - m.x833 == 0)
m.c1112 = Constraint(expr= m.x798 - 15*m.b1012 <= 0)
m.c1113 = Constraint(expr= m.x799 - 15*m.b1013 <= 0)
m.c1114 = Constraint(expr= m.x800 + 15*m.b1012 <= 15)
m.c1115 = Constraint(expr= m.x801 + 15*m.b1013 <= 15)
m.c1116 = Constraint(expr= m.x830 - 9*m.b1012 <= 0)
m.c1117 = Constraint(expr= m.x831 - 9*m.b1013 <= 0)
m.c1118 = Constraint(expr= m.x832 + 9*m.b1012 <= 9)
m.c1119 = Constraint(expr= m.x833 + 9*m.b1013 <= 9)
m.c1120 = Constraint(expr=(m.x834/(1e-6 + m.b1014) - 1.1*log(1 + m.x802/(1e-6 + m.b1014)))*(1e-6 + m.b1014) <= 0)
m.c1121 = Constraint(expr=(m.x835/(1e-6 + m.b1015) - 1.1*log(1 + m.x803/(1e-6 + m.b1015)))*(1e-6 + m.b1015) <= 0)
m.c1122 = Constraint(expr= m.x804 == 0)
m.c1123 = Constraint(expr= m.x805 == 0)
m.c1124 = Constraint(expr= m.x836 == 0)
m.c1125 = Constraint(expr= m.x837 == 0)
m.c1126 = Constraint(expr= m.x636 - m.x802 - m.x804 == 0)
m.c1127 = Constraint(expr= m.x637 - m.x803 - m.x805 == 0)
m.c1128 = Constraint(expr= m.x648 - m.x834 - m.x836 == 0)
m.c1129 = Constraint(expr= m.x649 - m.x835 - m.x837 == 0)
m.c1130 = Constraint(expr= m.x802 - 15*m.b1014 <= 0)
m.c1131 = Constraint(expr= m.x803 - 15*m.b1015 <= 0)
m.c1132 = Constraint(expr= m.x804 + 15*m.b1014 <= 15)
m.c1133 = Constraint(expr= m.x805 + 15*m.b1015 <= 15)
m.c1134 = Constraint(expr= m.x834 - 3.04984759446376*m.b1014 <= 0)
m.c1135 = Constraint(expr= m.x835 - 3.04984759446376*m.b1015 <= 0)
m.c1136 = Constraint(expr= m.x836 + 3.04984759446376*m.b1014 <= 3.04984759446376)
m.c1137 = Constraint(expr= m.x837 + 3.04984759446376*m.b1015 <= 3.04984759446376)
m.c1138 = Constraint(expr= - 0.9*m.x808 + m.x874 == 0)
m.c1139 = Constraint(expr= - 0.9*m.x809 + m.x875 == 0)
m.c1140 = Constraint(expr= - m.x846 + m.x874 == 0)
m.c1141 = Constraint(expr= - m.x847 + m.x875 == 0)
m.c1142 = Constraint(expr= m.x812 == 0)
m.c1143 = Constraint(expr= m.x813 == 0)
m.c1144 = Constraint(expr= m.x848 == 0)
m.c1145 = Constraint(expr= m.x849 == 0)
m.c1146 = Constraint(expr= m.x876 == 0)
m.c1147 = Constraint(expr= m.x877 == 0)
m.c1148 = Constraint(expr= m.x638 - m.x808 - m.x812 == 0)
m.c1149 = Constraint(expr= m.x639 - m.x809 - m.x813 == 0)
m.c1150 = Constraint(expr= m.x654 - m.x846 - m.x848 == 0)
m.c1151 = Constraint(expr= m.x655 - m.x847 - m.x849 == 0)
m.c1152 = Constraint(expr= m.x670 - m.x874 - m.x876 == 0)
m.c1153 = Constraint(expr= m.x671 - m.x875 - m.x877 == 0)
m.c1154 = Constraint(expr= m.x808 - 1.83548069293539*m.b1016 <= 0)
m.c1155 = Constraint(expr= m.x809 - 1.83548069293539*m.b1017 <= 0)
m.c1156 = Constraint(expr= m.x812 + 1.83548069293539*m.b1016 <= 1.83548069293539)
m.c1157 = Constraint(expr= m.x813 + 1.83548069293539*m.b1017 <= 1.83548069293539)
m.c1158 = Constraint(expr= m.x846 - 20*m.b1016 <= 0)
m.c1159 = Constraint(expr= m.x847 - 20*m.b1017 <= 0)
m.c1160 = Constraint(expr= m.x848 + 20*m.b1016 <= 20)
m.c1161 = Constraint(expr= m.x849 + 20*m.b1017 <= 20)
m.c1162 = Constraint(expr= m.x874 - 20*m.b1016 <= 0)
m.c1163 = Constraint(expr= m.x875 - 20*m.b1017 <= 0)
m.c1164 = Constraint(expr= m.x876 + 20*m.b1016 <= 20)
m.c1165 = Constraint(expr= m.x877 + 20*m.b1017 <= 20)
m.c1166 = Constraint(expr=(m.x878/(1e-6 + m.b1018) - log(1 + m.x816/(1e-6 + m.b1018)))*(1e-6 + m.b1018) <= 0)
m.c1167 = Constraint(expr=(m.x879/(1e-6 + m.b1019) - log(1 + m.x817/(1e-6 + m.b1019)))*(1e-6 + m.b1019) <= 0)
m.c1168 = Constraint(expr= m.x820 == 0)
m.c1169 = Constraint(expr= m.x821 == 0)
m.c1170 = Constraint(expr= m.x880 == 0)
m.c1171 = Constraint(expr= m.x881 == 0)
m.c1172 = Constraint(expr= m.x640 - m.x816 - m.x820 == 0)
m.c1173 = Constraint(expr= m.x641 - m.x817 - m.x821 == 0)
m.c1174 = Constraint(expr= m.x672 - m.x878 - m.x880 == 0)
m.c1175 = Constraint(expr= m.x673 - m.x879 - m.x881 == 0)
m.c1176 = Constraint(expr= m.x816 - 1.32154609891348*m.b1018 <= 0)
m.c1177 = Constraint(expr= m.x817 - 1.32154609891348*m.b1019 <= 0)
m.c1178 = Constraint(expr= m.x820 + 1.32154609891348*m.b1018 <= 1.32154609891348)
m.c1179 = Constraint(expr= m.x821 + 1.32154609891348*m.b1019 <= 1.32154609891348)
m.c1180 = Constraint(expr= m.x878 - 0.842233385663186*m.b1018 <= 0)
m.c1181 = Constraint(expr= m.x879 - 0.842233385663186*m.b1019 <= 0)
m.c1182 = Constraint(expr= m.x880 + 0.842233385663186*m.b1018 <= 0.842233385663186)
m.c1183 = Constraint(expr= m.x881 + 0.842233385663186*m.b1019 <= 0.842233385663186)
m.c1184 = Constraint(expr=(m.x882/(1e-6 + m.b1020) - 0.7*log(1 + m.x838/(1e-6 + m.b1020)))*(1e-6 + m.b1020) <= 0)
m.c1185 = Constraint(expr=(m.x883/(1e-6 + m.b1021) - 0.7*log(1 + m.x839/(1e-6 + m.b1021)))*(1e-6 + m.b1021) <= 0)
m.c1186 = Constraint(expr= m.x840 == 0)
m.c1187 = Constraint(expr= m.x841 == 0)
m.c1188 = Constraint(expr= m.x884 == 0)
m.c1189 = Constraint(expr= m.x885 == 0)
m.c1190 = Constraint(expr= m.x650 - m.x838 - m.x840 == 0)
m.c1191 = Constraint(expr= m.x651 - m.x839 - m.x841 == 0)
m.c1192 = Constraint(expr= m.x674 - m.x882 - m.x884 == 0)
m.c1193 = Constraint(expr= m.x675 - m.x883 - m.x885 == 0)
m.c1194 = Constraint(expr= m.x838 - 1.26558121681553*m.b1020 <= 0)
m.c1195 = Constraint(expr= m.x839 - 1.26558121681553*m.b1021 <= 0)
m.c1196 = Constraint(expr= m.x840 + 1.26558121681553*m.b1020 <= 1.26558121681553)
m.c1197 = Constraint(expr= m.x841 + 1.26558121681553*m.b1021 <= 1.26558121681553)
m.c1198 = Constraint(expr= m.x882 - 0.572481933717686*m.b1020 <= 0)
m.c1199 = Constraint(expr= m.x883 - 0.572481933717686*m.b1021 <= 0)
m.c1200 = Constraint(expr= m.x884 + 0.572481933717686*m.b1020 <= 0.572481933717686)
m.c1201 = Constraint(expr= m.x885 + 0.572481933717686*m.b1021 <= 0.572481933717686)
m.c1202 = Constraint(expr=(m.x886/(1e-6 + m.b1022) - 0.65*log(1 + m.x842/(1e-6 + m.b1022)))*(1e-6 + m.b1022) <= 0)
m.c1203 = Constraint(expr=(m.x887/(1e-6 + m.b1023) - 0.65*log(1 + m.x843/(1e-6 + m.b1023)))*(1e-6 + m.b1023) <= 0)
m.c1204 = Constraint(expr=(m.x886/(1e-6 + m.b1022) - 0.65*log(1 + m.x850/(1e-6 + m.b1022)))*(1e-6 + m.b1022) <= 0)
m.c1205 = Constraint(expr=(m.x887/(1e-6 + m.b1023) - 0.65*log(1 + m.x851/(1e-6 + m.b1023)))*(1e-6 + m.b1023) <= 0)
m.c1206 = Constraint(expr= m.x844 == 0)
m.c1207 = Constraint(expr= m.x845 == 0)
m.c1208 = Constraint(expr= m.x852 == 0)
m.c1209 = Constraint(expr= m.x853 == 0)
m.c1210 = Constraint(expr= m.x888 == 0)
m.c1211 = Constraint(expr= m.x889 == 0)
m.c1212 = Constraint(expr= m.x652 - m.x842 - m.x844 == 0)
m.c1213 = Constraint(expr= m.x653 - m.x843 - m.x845 == 0)
m.c1214 = Constraint(expr= m.x658 - m.x850 - m.x852 == 0)
m.c1215 = Constraint(expr= m.x659 - m.x851 - m.x853 == 0)
m.c1216 = Constraint(expr= m.x676 - m.x886 - m.x888 == 0)
m.c1217 = Constraint(expr= m.x677 - m.x887 - m.x889 == 0)
m.c1218 = Constraint(expr= m.x842 - 1.26558121681553*m.b1022 <= 0)
m.c1219 = Constraint(expr= m.x843 - 1.26558121681553*m.b1023 <= 0)
m.c1220 = Constraint(expr= m.x844 + 1.26558121681553*m.b1022 <= 1.26558121681553)
m.c1221 = Constraint(expr= m.x845 + 1.26558121681553*m.b1023 <= 1.26558121681553)
m.c1222 = Constraint(expr= m.x850 - 33.5*m.b1022 <= 0)
m.c1223 = Constraint(expr= m.x851 - 33.5*m.b1023 <= 0)
m.c1224 = Constraint(expr= m.x852 + 33.5*m.b1022 <= 33.5)
m.c1225 = Constraint(expr= m.x853 + 33.5*m.b1023 <= 33.5)
m.c1226 = Constraint(expr= m.x886 - 2.30162356062425*m.b1022 <= 0)
m.c1227 = Constraint(expr= m.x887 - 2.30162356062425*m.b1023 <= 0)
m.c1228 = Constraint(expr= m.x888 + 2.30162356062425*m.b1022 <= 2.30162356062425)
m.c1229 = Constraint(expr= m.x889 + 2.30162356062425*m.b1023 <= 2.30162356062425)
m.c1230 = Constraint(expr= - m.x854 + m.x890 == 0)
m.c1231 = Constraint(expr= - m.x855 + m.x891 == 0)
m.c1232 = Constraint(expr= m.x856 == 0)
m.c1233 = Constraint(expr= m.x857 == 0)
m.c1234 = Constraint(expr= m.x892 == 0)
m.c1235 = Constraint(expr= m.x893 == 0)
m.c1236 = Constraint(expr= m.x660 - m.x854 - m.x856 == 0)
m.c1237 = Constraint(expr= m.x661 - m.x855 - m.x857 == 0)
m.c1238 = Constraint(expr= m.x678 - m.x890 - m.x892 == 0)
m.c1239 = Constraint(expr= m.x679 - m.x891 - m.x893 == 0)
m.c1240 = Constraint(expr= m.x854 - 9*m.b1024 <= 0)
m.c1241 = Constraint(expr= m.x855 - 9*m.b1025 <= 0)
m.c1242 = Constraint(expr= m.x856 + 9*m.b1024 <= 9)
m.c1243 = Constraint(expr= m.x857 + 9*m.b1025 <= 9)
m.c1244 = Constraint(expr= m.x890 - 9*m.b1024 <= 0)
m.c1245 = Constraint(expr= m.x891 - 9*m.b1025 <= 0)
m.c1246 = Constraint(expr= m.x892 + 9*m.b1024 <= 9)
m.c1247 = Constraint(expr= m.x893 + 9*m.b1025 <= 9)
m.c1248 = Constraint(expr= - m.x858 + m.x894 == 0)
m.c1249 = Constraint(expr= - m.x859 + m.x895 == 0)
m.c1250 = Constraint(expr= m.x860 == 0)
m.c1251 = Constraint(expr= m.x861 == 0)
m.c1252 = Constraint(expr= m.x896 == 0)
m.c1253 = Constraint(expr= m.x897 == 0)
m.c1254 = Constraint(expr= m.x662 - m.x858 - m.x860 == 0)
m.c1255 = Constraint(expr= m.x663 - m.x859 - m.x861 == 0)
m.c1256 = Constraint(expr= m.x680 - m.x894 - m.x896 == 0)
m.c1257 = Constraint(expr= m.x681 - m.x895 - m.x897 == 0)
m.c1258 = Constraint(expr= m.x858 - 9*m.b1026 <= 0)
m.c1259 = Constraint(expr= m.x859 - 9*m.b1027 <= 0)
m.c1260 = Constraint(expr= m.x860 + 9*m.b1026 <= 9)
m.c1261 = Constraint(expr= m.x861 + 9*m.b1027 <= 9)
m.c1262 = Constraint(expr= m.x894 - 9*m.b1026 <= 0)
m.c1263 = Constraint(expr= m.x895 - 9*m.b1027 <= 0)
m.c1264 = Constraint(expr= m.x896 + 9*m.b1026 <= 9)
m.c1265 = Constraint(expr= m.x897 + 9*m.b1027 <= 9)
m.c1266 = Constraint(expr=(m.x898/(1e-6 + m.b1028) - 0.75*log(1 + m.x862/(1e-6 + m.b1028)))*(1e-6 + m.b1028) <= 0)
m.c1267 = Constraint(expr=(m.x899/(1e-6 + m.b1029) - 0.75*log(1 + m.x863/(1e-6 + m.b1029)))*(1e-6 + m.b1029) <= 0)
m.c1268 = Constraint(expr= m.x864 == 0)
m.c1269 = Constraint(expr= m.x865 == 0)
m.c1270 = Constraint(expr= m.x900 == 0)
m.c1271 = Constraint(expr= m.x901 == 0)
m.c1272 = Constraint(expr= m.x664 - m.x862 - m.x864 == 0)
m.c1273 = Constraint(expr= m.x665 - m.x863 - m.x865 == 0)
m.c1274 = Constraint(expr= m.x682 - m.x898 - m.x900 == 0)
m.c1275 = Constraint(expr= m.x683 - m.x899 - m.x901 == 0)
m.c1276 = Constraint(expr= m.x862 - 3.04984759446376*m.b1028 <= 0)
m.c1277 = Constraint(expr= m.x863 - 3.04984759446376*m.b1029 <= 0)
m.c1278 = Constraint(expr= m.x864 + 3.04984759446376*m.b1028 <= 3.04984759446376)
m.c1279 = Constraint(expr= m.x865 + 3.04984759446376*m.b1029 <= 3.04984759446376)
m.c1280 = Constraint(expr= m.x898 - 1.04900943706034*m.b1028 <= 0)
m.c1281 = Constraint(expr= m.x899 - 1.04900943706034*m.b1029 <= 0)
m.c1282 = Constraint(expr= m.x900 + 1.04900943706034*m.b1028 <= 1.04900943706034)
m.c1283 = Constraint(expr= m.x901 + 1.04900943706034*m.b1029 <= 1.04900943706034)
m.c1284 = Constraint(expr=(m.x902/(1e-6 + m.b1030) - 0.8*log(1 + m.x866/(1e-6 + m.b1030)))*(1e-6 + m.b1030) <= 0)
m.c1285 = Constraint(expr=(m.x903/(1e-6 + m.b1031) - 0.8*log(1 + m.x867/(1e-6 + m.b1031)))*(1e-6 + m.b1031) <= 0)
m.c1286 = Constraint(expr= m.x868 == 0)
m.c1287 = Constraint(expr= m.x869 == 0)
m.c1288 = Constraint(expr= m.x904 == 0)
m.c1289 = Constraint(expr= m.x905 == 0)
m.c1290 = Constraint(expr= m.x666 - m.x866 - m.x868 == 0)
m.c1291 = Constraint(expr= m.x667 - m.x867 - m.x869 == 0)
m.c1292 = Constraint(expr= m.x684 - m.x902 - m.x904 == 0)
m.c1293 = Constraint(expr= m.x685 - m.x903 - m.x905 == 0)
m.c1294 = Constraint(expr= m.x866 - 3.04984759446376*m.b1030 <= 0)
m.c1295 = Constraint(expr= m.x867 - 3.04984759446376*m.b1031 <= 0)
m.c1296 = Constraint(expr= m.x868 + 3.04984759446376*m.b1030 <= 3.04984759446376)
m.c1297 = Constraint(expr= m.x869 + 3.04984759446376*m.b1031 <= 3.04984759446376)
m.c1298 = Constraint(expr= m.x902 - 1.11894339953103*m.b1030 <= 0)
m.c1299 = Constraint(expr= m.x903 - 1.11894339953103*m.b1031 <= 0)
m.c1300 = Constraint(expr= m.x904 + 1.11894339953103*m.b1030 <= 1.11894339953103)
m.c1301 = Constraint(expr= m.x905 + 1.11894339953103*m.b1031 <= 1.11894339953103)
m.c1302 = Constraint(expr=(m.x906/(1e-6 + m.b1032) - 0.85*log(1 + m.x870/(1e-6 + m.b1032)))*(1e-6 + m.b1032) <= 0)
m.c1303 = Constraint(expr=(m.x907/(1e-6 + m.b1033) - 0.85*log(1 + m.x871/(1e-6 + m.b1033)))*(1e-6 + m.b1033) <= 0)
m.c1304 = Constraint(expr= m.x872 == 0)
m.c1305 = Constraint(expr= m.x873 == 0)
m.c1306 = Constraint(expr= m.x908 == 0)
m.c1307 = Constraint(expr= m.x909 == 0)
m.c1308 = Constraint(expr= m.x668 - m.x870 - m.x872 == 0)
m.c1309 = Constraint(expr= m.x669 - m.x871 - m.x873 == 0)
m.c1310 = Constraint(expr= m.x686 - m.x906 - m.x908 == 0)
m.c1311 = Constraint(expr= m.x687 - m.x907 - m.x909 == 0)
m.c1312 = Constraint(expr= m.x870 - 3.04984759446376*m.b1032 <= 0)
m.c1313 = Constraint(expr= m.x871 - 3.04984759446376*m.b1033 <= 0)
m.c1314 = Constraint(expr= m.x872 + 3.04984759446376*m.b1032 <= 3.04984759446376)
m.c1315 = Constraint(expr= m.x873 + 3.04984759446376*m.b1033 <= 3.04984759446376)
m.c1316 = Constraint(expr= m.x906 - 1.18887736200171*m.b1032 <= 0)
m.c1317 = Constraint(expr= m.x907 - 1.18887736200171*m.b1033 <= 0)
m.c1318 = Constraint(expr= m.x908 + 1.18887736200171*m.b1032 <= 1.18887736200171)
m.c1319 = Constraint(expr= m.x909 + 1.18887736200171*m.b1033 <= 1.18887736200171)
m.c1320 = Constraint(expr=(m.x918/(1e-6 + m.b1034) - log(1 + m.x910/(1e-6 + m.b1034)))*(1e-6 + m.b1034) <= 0)
m.c1321 = Constraint(expr=(m.x919/(1e-6 + m.b1035) - log(1 + m.x911/(1e-6 + m.b1035)))*(1e-6 + m.b1035) <= 0)
m.c1322 = Constraint(expr= m.x912 == 0)
m.c1323 = Constraint(expr= m.x913 == 0)
m.c1324 = Constraint(expr= m.x920 == 0)
m.c1325 = Constraint(expr= m.x921 == 0)
m.c1326 = Constraint(expr= m.x690 - m.x910 - m.x912 == 0)
m.c1327 = Constraint(expr= m.x691 - m.x911 - m.x913 == 0)
m.c1328 = Constraint(expr= m.x694 - m.x918 - m.x920 == 0)
m.c1329 = Constraint(expr= m.x695 - m.x919 - m.x921 == 0)
m.c1330 = Constraint(expr= m.x910 - 1.18887736200171*m.b1034 <= 0)
m.c1331 = Constraint(expr= m.x911 - 1.18887736200171*m.b1035 <= 0)
m.c1332 = Constraint(expr= m.x912 + 1.18887736200171*m.b1034 <= 1.18887736200171)
m.c1333 = Constraint(expr= m.x913 + 1.18887736200171*m.b1035 <= 1.18887736200171)
m.c1334 = Constraint(expr= m.x918 - 0.78338879230327*m.b1034 <= 0)
m.c1335 = Constraint(expr= m.x919 - 0.78338879230327*m.b1035 <= 0)
m.c1336 = Constraint(expr= m.x920 + 0.78338879230327*m.b1034 <= 0.78338879230327)
m.c1337 = Constraint(expr= m.x921 + 0.78338879230327*m.b1035 <= 0.78338879230327)
m.c1338 = Constraint(expr=(m.x922/(1e-6 + m.b1036) - 1.2*log(1 + m.x914/(1e-6 + m.b1036)))*(1e-6 + m.b1036) <= 0)
m.c1339 = Constraint(expr=(m.x923/(1e-6 + m.b1037) - 1.2*log(1 + m.x915/(1e-6 + m.b1037)))*(1e-6 + m.b1037) <= 0)
m.c1340 = Constraint(expr= m.x916 == 0)
m.c1341 = Constraint(expr= m.x917 == 0)
m.c1342 = Constraint(expr= m.x924 == 0)
m.c1343 = Constraint(expr= m.x925 == 0)
m.c1344 = Constraint(expr= m.x692 - m.x914 - m.x916 == 0)
m.c1345 = Constraint(expr= m.x693 - m.x915 - m.x917 == 0)
m.c1346 = Constraint(expr= m.x696 - m.x922 - m.x924 == 0)
m.c1347 = Constraint(expr= m.x697 - m.x923 - m.x925 == 0)
m.c1348 = Constraint(expr= m.x914 - 1.18887736200171*m.b1036 <= 0)
m.c1349 = Constraint(expr= m.x915 - 1.18887736200171*m.b1037 <= 0)
m.c1350 = Constraint(expr= m.x916 + 1.18887736200171*m.b1036 <= 1.18887736200171)
m.c1351 = Constraint(expr= m.x917 + 1.18887736200171*m.b1037 <= 1.18887736200171)
m.c1352 = Constraint(expr= m.x922 - 0.940066550763924*m.b1036 <= 0)
m.c1353 = Constraint(expr= m.x923 - 0.940066550763924*m.b1037 <= 0)
m.c1354 = Constraint(expr= m.x924 + 0.940066550763924*m.b1036 <= 0.940066550763924)
m.c1355 = Constraint(expr= m.x925 + 0.940066550763924*m.b1037 <= 0.940066550763924)
m.c1356 = Constraint(expr= - 0.75*m.x926 + m.x942 == 0)
m.c1357 = Constraint(expr= - 0.75*m.x927 + m.x943 == 0)
m.c1358 = Constraint(expr= m.x928 == 0)
m.c1359 = Constraint(expr= m.x929 == 0)
m.c1360 = Constraint(expr= m.x944 == 0)
m.c1361 = Constraint(expr= m.x945 == 0)
m.c1362 = Constraint(expr= m.x704 - m.x926 - m.x928 == 0)
m.c1363 = Constraint(expr= m.x705 - m.x927 - m.x929 == 0)
m.c1364 = Constraint(expr= m.x712 - m.x942 - m.x944 == 0)
m.c1365 = Constraint(expr= m.x713 - m.x943 - m.x945 == 0)
m.c1366 = Constraint(expr= m.x926 - 0.940066550763924*m.b1038 <= 0)
m.c1367 = Constraint(expr= m.x927 - 0.940066550763924*m.b1039 <= 0)
m.c1368 = Constraint(expr= m.x928 + 0.940066550763924*m.b1038 <= 0.940066550763924)
m.c1369 = Constraint(expr= m.x929 + 0.940066550763924*m.b1039 <= 0.940066550763924)
m.c1370 = Constraint(expr= m.x942 - 0.705049913072943*m.b1038 <= 0)
m.c1371 = Constraint(expr= m.x943 - 0.705049913072943*m.b1039 <= 0)
m.c1372 = Constraint(expr= m.x944 + 0.705049913072943*m.b1038 <= 0.705049913072943)
m.c1373 = Constraint(expr= m.x945 + 0.705049913072943*m.b1039 <= 0.705049913072943)
m.c1374 = Constraint(expr=(m.x946/(1e-6 + m.b1040) - 1.5*log(1 + m.x930/(1e-6 + m.b1040)))*(1e-6 + m.b1040) <= 0)
m.c1375 = Constraint(expr=(m.x947/(1e-6 + m.b1041) - 1.5*log(1 + m.x931/(1e-6 + m.b1041)))*(1e-6 + m.b1041) <= 0)
m.c1376 = Constraint(expr= m.x932 == 0)
m.c1377 = Constraint(expr= m.x933 == 0)
m.c1378 = Constraint(expr= m.x950 == 0)
m.c1379 = Constraint(expr= m.x951 == 0)
m.c1380 = Constraint(expr= m.x706 - m.x930 - m.x932 == 0)
m.c1381 = Constraint(expr= m.x707 - m.x931 - m.x933 == 0)
m.c1382 = Constraint(expr= m.x714 - m.x946 - m.x950 == 0)
m.c1383 = Constraint(expr= m.x715 - m.x947 - m.x951 == 0)
m.c1384 = Constraint(expr= m.x930 - 0.940066550763924*m.b1040 <= 0)
m.c1385 = Constraint(expr= m.x931 - 0.940066550763924*m.b1041 <= 0)
m.c1386 = Constraint(expr= m.x932 + 0.940066550763924*m.b1040 <= 0.940066550763924)
m.c1387 = Constraint(expr= m.x933 + 0.940066550763924*m.b1041 <= 0.940066550763924)
m.c1388 = Constraint(expr= m.x946 - 0.994083415506506*m.b1040 <= 0)
m.c1389 = Constraint(expr= m.x947 - 0.994083415506506*m.b1041 <= 0)
m.c1390 = Constraint(expr= m.x950 + 0.994083415506506*m.b1040 <= 0.994083415506506)
m.c1391 = Constraint(expr= m.x951 + 0.994083415506506*m.b1041 <= 0.994083415506506)
m.c1392 = Constraint(expr= - m.x934 + m.x954 == 0)
m.c1393 = Constraint(expr= - m.x935 + m.x955 == 0)
m.c1394 = Constraint(expr= - 0.5*m.x938 + m.x954 == 0)
m.c1395 = Constraint(expr= - 0.5*m.x939 + m.x955 == 0)
m.c1396 = Constraint(expr= m.x936 == 0)
m.c1397 = Constraint(expr= m.x937 == 0)
m.c1398 = Constraint(expr= m.x940 == 0)
m.c1399 = Constraint(expr= m.x941 == 0)
m.c1400 = Constraint(expr= m.x956 == 0)
m.c1401 = Constraint(expr= m.x957 == 0)
m.c1402 = Constraint(expr= m.x708 - m.x934 - m.x936 == 0)
m.c1403 = Constraint(expr= m.x709 - m.x935 - m.x937 == 0)
m.c1404 = Constraint(expr= m.x710 - m.x938 - m.x940 == 0)
m.c1405 = Constraint(expr= m.x711 - m.x939 - m.x941 == 0)
m.c1406 = Constraint(expr= m.x716 - m.x954 - m.x956 == 0)
m.c1407 = Constraint(expr= m.x717 - m.x955 - m.x957 == 0)
m.c1408 = Constraint(expr= m.x934 - 0.940066550763924*m.b1042 <= 0)
m.c1409 = Constraint(expr= m.x935 - 0.940066550763924*m.b1043 <= 0)
m.c1410 = Constraint(expr= m.x936 + 0.940066550763924*m.b1042 <= 0.940066550763924)
m.c1411 = Constraint(expr= m.x937 + 0.940066550763924*m.b1043 <= 0.940066550763924)
m.c1412 = Constraint(expr= m.x938 - 30*m.b1042 <= 0)
m.c1413 = Constraint(expr= m.x939 - 30*m.b1043 <= 0)
m.c1414 = Constraint(expr= m.x940 + 30*m.b1042 <= 30)
m.c1415 = Constraint(expr= m.x941 + 30*m.b1043 <= 30)
m.c1416 = Constraint(expr= m.x954 - 15*m.b1042 <= 0)
m.c1417 = Constraint(expr= m.x955 - 15*m.b1043 <= 0)
m.c1418 = Constraint(expr= m.x956 + 15*m.b1042 <= 15)
m.c1419 = Constraint(expr= m.x957 + 15*m.b1043 <= 15)
m.c1420 = Constraint(expr=(m.x974/(1e-6 + m.b1044) - 1.25*log(1 + m.x958/(1e-6 + m.b1044)))*(1e-6 + m.b1044) <= 0)
m.c1421 = Constraint(expr=(m.x975/(1e-6 + m.b1045) - 1.25*log(1 + m.x959/(1e-6 + m.b1045)))*(1e-6 + m.b1045) <= 0)
m.c1422 = Constraint(expr= m.x960 == 0)
m.c1423 = Constraint(expr= m.x961 == 0)
m.c1424 = Constraint(expr= m.x976 == 0)
m.c1425 = Constraint(expr= m.x977 == 0)
m.c1426 = Constraint(expr= m.x718 - m.x958 - m.x960 == 0)
m.c1427 = Constraint(expr= m.x719 - m.x959 - m.x961 == 0)
m.c1428 = Constraint(expr= m.x728 - m.x974 - m.x976 == 0)
m.c1429 = Constraint(expr= m.x729 - m.x975 - m.x977 == 0)
m.c1430 = Constraint(expr= m.x958 - 0.705049913072943*m.b1044 <= 0)
m.c1431 = Constraint(expr= m.x959 - 0.705049913072943*m.b1045 <= 0)
m.c1432 = Constraint(expr= m.x960 + 0.705049913072943*m.b1044 <= 0.705049913072943)
m.c1433 = Constraint(expr= m.x961 + 0.705049913072943*m.b1045 <= 0.705049913072943)
m.c1434 = Constraint(expr= m.x974 - 0.666992981045719*m.b1044 <= 0)
m.c1435 = Constraint(expr= m.x975 - 0.666992981045719*m.b1045 <= 0)
m.c1436 = Constraint(expr= m.x976 + 0.666992981045719*m.b1044 <= 0.666992981045719)
m.c1437 = Constraint(expr= m.x977 + 0.666992981045719*m.b1045 <= 0.666992981045719)
m.c1438 = Constraint(expr=(m.x978/(1e-6 + m.b1046) - 0.9*log(1 + m.x962/(1e-6 + m.b1046)))*(1e-6 + m.b1046) <= 0)
m.c1439 = Constraint(expr=(m.x979/(1e-6 + m.b1047) - 0.9*log(1 + m.x963/(1e-6 + m.b1047)))*(1e-6 + m.b1047) <= 0)
m.c1440 = Constraint(expr= m.x964 == 0)
m.c1441 = Constraint(expr= m.x965 == 0)
m.c1442 = Constraint(expr= m.x980 == 0)
m.c1443 = Constraint(expr= m.x981 == 0)
m.c1444 = Constraint(expr= m.x720 - m.x962 - m.x964 == 0)
m.c1445 = Constraint(expr= m.x721 - m.x963 - m.x965 == 0)
m.c1446 = Constraint(expr= m.x730 - m.x978 - m.x980 == 0)
m.c1447 = Constraint(expr= m.x731 - m.x979 - m.x981 == 0)
m.c1448 = Constraint(expr= m.x962 - 0.705049913072943*m.b1046 <= 0)
m.c1449 = Constraint(expr= m.x963 - 0.705049913072943*m.b1047 <= 0)
m.c1450 = Constraint(expr= m.x964 + 0.705049913072943*m.b1046 <= 0.705049913072943)
m.c1451 = Constraint(expr= m.x965 + 0.705049913072943*m.b1047 <= 0.705049913072943)
m.c1452 = Constraint(expr= m.x978 - 0.480234946352917*m.b1046 <= 0)
m.c1453 = Constraint(expr= m.x979 - 0.480234946352917*m.b1047 <= 0)
m.c1454 = Constraint(expr= m.x980 + 0.480234946352917*m.b1046 <= 0.480234946352917)
m.c1455 = Constraint(expr= m.x981 + 0.480234946352917*m.b1047 <= 0.480234946352917)
m.c1456 = Constraint(expr=(m.x982/(1e-6 + m.b1048) - log(1 + m.x948/(1e-6 + m.b1048)))*(1e-6 + m.b1048) <= 0)
m.c1457 = Constraint(expr=(m.x983/(1e-6 + m.b1049) - log(1 + m.x949/(1e-6 + m.b1049)))*(1e-6 + m.b1049) <= 0)
m.c1458 = Constraint(expr= m.x952 == 0)
m.c1459 = Constraint(expr= m.x953 == 0)
m.c1460 = Constraint(expr= m.x984 == 0)
m.c1461 = Constraint(expr= m.x985 == 0)
m.c1462 = Constraint(expr= m.x714 - m.x948 - m.x952 == 0)
m.c1463 = Constraint(expr= m.x715 - m.x949 - m.x953 == 0)
m.c1464 = Constraint(expr= m.x732 - m.x982 - m.x984 == 0)
m.c1465 = Constraint(expr= m.x733 - m.x983 - m.x985 == 0)
m.c1466 = Constraint(expr= m.x948 - 0.994083415506506*m.b1048 <= 0)
m.c1467 = Constraint(expr= m.x949 - 0.994083415506506*m.b1049 <= 0)
m.c1468 = Constraint(expr= m.x952 + 0.994083415506506*m.b1048 <= 0.994083415506506)
m.c1469 = Constraint(expr= m.x953 + 0.994083415506506*m.b1049 <= 0.994083415506506)
m.c1470 = Constraint(expr= m.x982 - 0.690184503917672*m.b1048 <= 0)
m.c1471 = Constraint(expr= m.x983 - 0.690184503917672*m.b1049 <= 0)
m.c1472 = Constraint(expr= m.x984 + 0.690184503917672*m.b1048 <= 0.690184503917672)
m.c1473 = Constraint(expr= m.x985 + 0.690184503917672*m.b1049 <= 0.690184503917672)
m.c1474 = Constraint(expr= - 0.9*m.x966 + m.x986 == 0)
m.c1475 = Constraint(expr= - 0.9*m.x967 + m.x987 == 0)
m.c1476 = Constraint(expr= m.x968 == 0)
m.c1477 = Constraint(expr= m.x969 == 0)
m.c1478 = Constraint(expr= m.x988 == 0)
m.c1479 = Constraint(expr= m.x989 == 0)
m.c1480 = Constraint(expr= m.x722 - m.x966 - m.x968 == 0)
m.c1481 = Constraint(expr= m.x723 - m.x967 - m.x969 == 0)
m.c1482 = Constraint(expr= m.x734 - m.x986 - m.x988 == 0)
m.c1483 = Constraint(expr= m.x735 - m.x987 - m.x989 == 0)
m.c1484 = Constraint(expr= m.x966 - 15*m.b1050 <= 0)
m.c1485 = Constraint(expr= m.x967 - 15*m.b1051 <= 0)
m.c1486 = Constraint(expr= m.x968 + 15*m.b1050 <= 15)
m.c1487 = Constraint(expr= m.x969 + 15*m.b1051 <= 15)
m.c1488 = Constraint(expr= m.x986 - 13.5*m.b1050 <= 0)
m.c1489 = Constraint(expr= m.x987 - 13.5*m.b1051 <= 0)
m.c1490 = Constraint(expr= m.x988 + 13.5*m.b1050 <= 13.5)
m.c1491 = Constraint(expr= m.x989 + 13.5*m.b1051 <= 13.5)
m.c1492 = Constraint(expr= - 0.6*m.x970 + m.x990 == 0)
m.c1493 = Constraint(expr= - 0.6*m.x971 + m.x991 == 0)
m.c1494 = Constraint(expr= m.x972 == 0)
m.c1495 = Constraint(expr= m.x973 == 0)
m.c1496 = Constraint(expr= m.x992 == 0)
m.c1497 = Constraint(expr= m.x993 == 0)
m.c1498 = Constraint(expr= m.x724 - m.x970 - m.x972 == 0)
m.c1499 = Constraint(expr= m.x725 - m.x971 - m.x973 == 0)
m.c1500 = Constraint(expr= m.x736 - m.x990 - m.x992 == 0)
m.c1501 = Constraint(expr= m.x737 - m.x991 - m.x993 == 0)
m.c1502 = Constraint(expr= m.x970 - 15*m.b1052 <= 0)
m.c1503 = Constraint(expr= m.x971 - 15*m.b1053 <= 0)
m.c1504 = Constraint(expr= m.x972 + 15*m.b1052 <= 15)
m.c1505 = Constraint(expr= m.x973 + 15*m.b1053 <= 15)
m.c1506 = Constraint(expr= m.x990 - 9*m.b1052 <= 0)
m.c1507 = Constraint(expr= m.x991 - 9*m.b1053 <= 0)
m.c1508 = Constraint(expr= m.x992 + 9*m.b1052 <= 9)
m.c1509 = Constraint(expr= m.x993 + 9*m.b1053 <= 9)
m.c1510 = Constraint(expr= 5*m.b1054 + m.x1114 == 0)
m.c1511 = Constraint(expr= 4*m.b1055 + m.x1115 == 0)
m.c1512 = Constraint(expr= 8*m.b1056 + m.x1116 == 0)
m.c1513 = Constraint(expr= 7*m.b1057 + m.x1117 == 0)
m.c1514 = Constraint(expr= 6*m.b1058 + m.x1118 == 0)
m.c1515 = Constraint(expr= 9*m.b1059 + m.x1119 == 0)
m.c1516 = Constraint(expr= 10*m.b1060 + m.x1120 == 0)
m.c1517 = Constraint(expr= 9*m.b1061 + m.x1121 == 0)
m.c1518 = Constraint(expr= 6*m.b1062 + m.x1122 == 0)
m.c1519 = Constraint(expr= 10*m.b1063 + m.x1123 == 0)
m.c1520 = Constraint(expr= 7*m.b1064 + m.x1124 == 0)
m.c1521 = Constraint(expr= 7*m.b1065 + m.x1125 == 0)
m.c1522 = Constraint(expr= 4*m.b1066 + m.x1126 == 0)
m.c1523 = Constraint(expr= 3*m.b1067 + m.x1127 == 0)
m.c1524 = Constraint(expr= 5*m.b1068 + m.x1128 == 0)
m.c1525 = Constraint(expr= 6*m.b1069 + m.x1129 == 0)
m.c1526 = Constraint(expr= 2*m.b1070 + m.x1130 == 0)
m.c1527 = Constraint(expr= 5*m.b1071 + m.x1131 == 0)
m.c1528 = Constraint(expr= 4*m.b1072 + m.x1132 == 0)
m.c1529 = Constraint(expr= 7*m.b1073 + m.x1133 == 0)
m.c1530 = Constraint(expr= 3*m.b1074 + m.x1134 == 0)
m.c1531 = Constraint(expr= 9*m.b1075 + m.x1135 == 0)
m.c1532 = Constraint(expr= 7*m.b1076 + m.x1136 == 0)
m.c1533 = Constraint(expr= 2*m.b1077 + m.x1137 == 0)
m.c1534 = Constraint(expr= 3*m.b1078 + m.x1138 == 0)
m.c1535 = Constraint(expr= m.b1079 + m.x1139 == 0)
m.c1536 = Constraint(expr= 2*m.b1080 + m.x1140 == 0)
m.c1537 = Constraint(expr= 6*m.b1081 + m.x1141 == 0)
m.c1538 = Constraint(expr= 4*m.b1082 + m.x1142 == 0)
m.c1539 = Constraint(expr= 8*m.b1083 + m.x1143 == 0)
m.c1540 = Constraint(expr= 2*m.b1084 + m.x1144 == 0)
m.c1541 = Constraint(expr= 5*m.b1085 + m.x1145 == 0)
m.c1542 = Constraint(expr= 3*m.b1086 + m.x1146 == 0)
m.c1543 = Constraint(expr= 4*m.b1087 + m.x1147 == 0)
m.c1544 = Constraint(expr= 5*m.b1088 + m.x1148 == 0)
m.c1545 = Constraint(expr= 7*m.b1089 + m.x1149 == 0)
m.c1546 = Constraint(expr= 2*m.b1090 + m.x1150 == 0)
m.c1547 = Constraint(expr= 8*m.b1091 + m.x1151 == 0)
m.c1548 = Constraint(expr= m.b1092 + m.x1152 == 0)
m.c1549 = Constraint(expr= 4*m.b1093 + m.x1153 == 0)
m.c1550 = Constraint(expr= 2*m.b1094 + m.x1154 == 0)
m.c1551 = Constraint(expr= 5*m.b1095 + m.x1155 == 0)
m.c1552 = Constraint(expr= 9*m.b1096 + m.x1156 == 0)
m.c1553 = Constraint(expr= 2*m.b1097 + m.x1157 == 0)
m.c1554 = Constraint(expr= 5*m.b1098 + m.x1158 == 0)
m.c1555 = Constraint(expr= 8*m.b1099 + m.x1159 == 0)
m.c1556 = Constraint(expr= 2*m.b1100 + m.x1160 == 0)
m.c1557 = Constraint(expr= 3*m.b1101 + m.x1161 == 0)
m.c1558 = Constraint(expr= 10*m.b1102 + m.x1162 == 0)
m.c1559 = Constraint(expr= 6*m.b1103 + m.x1163 == 0)
m.c1560 = Constraint(expr= 4*m.b1104 + m.x1164 == 0)
m.c1561 = Constraint(expr= 8*m.b1105 + m.x1165 == 0)
m.c1562 = Constraint(expr= 7*m.b1106 + m.x1166 == 0)
m.c1563 = Constraint(expr= 3*m.b1107 + m.x1167 == 0)
m.c1564 = Constraint(expr= 4*m.b1108 + m.x1168 == 0)
m.c1565 = Constraint(expr= 8*m.b1109 + m.x1169 == 0)
m.c1566 = Constraint(expr= 2*m.b1110 + m.x1170 == 0)
m.c1567 = Constraint(expr= m.b1111 + m.x1171 == 0)
m.c1568 = Constraint(expr= 8*m.b1112 + m.x1172 == 0)
m.c1569 = Constraint(expr= 3*m.b1113 + m.x1173 == 0)
m.c1570 = Constraint(expr= m.b994 - m.b995 <= 0)
m.c1571 = Constraint(expr= m.b996 - m.b997 <= 0)
m.c1572 = Constraint(expr= m.b998 - m.b999 <= 0)
m.c1573 = Constraint(expr= m.b1000 - m.b1001 <= 0)
m.c1574 = Constraint(expr= m.b1002 - m.b1003 <= 0)
m.c1575 = Constraint(expr= m.b1004 - m.b1005 <= 0)
m.c1576 = Constraint(expr= m.b1006 - m.b1007 <= 0)
m.c1577 = Constraint(expr= m.b1008 - m.b1009 <= 0)
m.c1578 = Constraint(expr= m.b1010 - m.b1011 <= 0)
m.c1579 = Constraint(expr= m.b1012 - m.b1013 <= 0)
m.c1580 = Constraint(expr= m.b1014 - m.b1015 <= 0)
m.c1581 = Constraint(expr= m.b1016 - m.b1017 <= 0)
m.c1582 = Constraint(expr= m.b1018 - m.b1019 <= 0)
m.c1583 = Constraint(expr= m.b1020 - m.b1021 <= 0)
m.c1584 = Constraint(expr= m.b1022 - m.b1023 <= 0)
m.c1585 = Constraint(expr= m.b1024 - m.b1025 <= 0)
m.c1586 = Constraint(expr= m.b1026 - m.b1027 <= 0)
m.c1587 = Constraint(expr= m.b1028 - m.b1029 <= 0)
m.c1588 = Constraint(expr= m.b1030 - m.b1031 <= 0)
m.c1589 = Constraint(expr= m.b1032 - m.b1033 <= 0)
m.c1590 = Constraint(expr= m.b1034 - m.b1035 <= 0)
m.c1591 = Constraint(expr= m.b1036 - m.b1037 <= 0)
m.c1592 = Constraint(expr= m.b1038 - m.b1039 <= 0)
m.c1593 = Constraint(expr= m.b1040 - m.b1041 <= 0)
m.c1594 = Constraint(expr= m.b1042 - m.b1043 <= 0)
m.c1595 = Constraint(expr= m.b1044 - m.b1045 <= 0)
m.c1596 = Constraint(expr= m.b1046 - m.b1047 <= 0)
m.c1597 = Constraint(expr= m.b1048 - m.b1049 <= 0)
m.c1598 = Constraint(expr= m.b1050 - m.b1051 <= 0)
m.c1599 = Constraint(expr= m.b1052 - m.b1053 <= 0)
m.c1600 = Constraint(expr= m.b1054 + m.b1055 <= 1)
m.c1601 = Constraint(expr= m.b1054 + m.b1055 <= 1)
m.c1602 = Constraint(expr= m.b1056 + m.b1057 <= 1)
m.c1603 = Constraint(expr= m.b1056 + m.b1057 <= 1)
m.c1604 = Constraint(expr= m.b1058 + m.b1059 <= 1)
m.c1605 = Constraint(expr= m.b1058 + m.b1059 <= 1)
m.c1606 = Constraint(expr= m.b1060 + m.b1061 <= 1)
m.c1607 = Constraint(expr= m.b1060 + m.b1061 <= 1)
m.c1608 = Constraint(expr= m.b1062 + m.b1063 <= 1)
m.c1609 = Constraint(expr= m.b1062 + m.b1063 <= 1)
m.c1610 = Constraint(expr= m.b1064 + m.b1065 <= 1)
m.c1611 = Constraint(expr= m.b1064 + m.b1065 <= 1)
m.c1612 = Constraint(expr= m.b1066 + m.b1067 <= 1)
m.c1613 = Constraint(expr= m.b1066 + m.b1067 <= 1)
m.c1614 = Constraint(expr= m.b1068 + m.b1069 <= 1)
m.c1615 = Constraint(expr= m.b1068 + m.b1069 <= 1)
m.c1616 = Constraint(expr= m.b1070 + m.b1071 <= 1)
m.c1617 = Constraint(expr= m.b1070 + m.b1071 <= 1)
m.c1618 = Constraint(expr= m.b1072 + m.b1073 <= 1)
m.c1619 = Constraint(expr= m.b1072 + m.b1073 <= 1)
m.c1620 = Constraint(expr= m.b1074 + m.b1075 <= 1)
m.c1621 = Constraint(expr= m.b1074 + m.b1075 <= 1)
m.c1622 = Constraint(expr= m.b1076 + m.b1077 <= 1)
m.c1623 = Constraint(expr= m.b1076 + m.b1077 <= 1)
m.c1624 = Constraint(expr= m.b1078 + m.b1079 <= 1)
m.c1625 = Constraint(expr= m.b1078 + m.b1079 <= 1)
m.c1626 = Constraint(expr= m.b1080 + m.b1081 <= 1)
m.c1627 = Constraint(expr= m.b1080 + m.b1081 <= 1)
m.c1628 = Constraint(expr= m.b1082 + m.b1083 <= 1)
m.c1629 = Constraint(expr= m.b1082 + m.b1083 <= 1)
m.c1630 = Constraint(expr= m.b1084 + m.b1085 <= 1)
m.c1631 = Constraint(expr= m.b1084 + m.b1085 <= 1)
m.c1632 = Constraint(expr= m.b1086 + m.b1087 <= 1)
m.c1633 = Constraint(expr= m.b1086 + m.b1087 <= 1)
m.c1634 = Constraint(expr= m.b1088 + m.b1089 <= 1)
m.c1635 = Constraint(expr= m.b1088 + m.b1089 <= 1)
m.c1636 = Constraint(expr= m.b1090 + m.b1091 <= 1)
m.c1637 = Constraint(expr= m.b1090 + m.b1091 <= 1)
m.c1638 = Constraint(expr= m.b1092 + m.b1093 <= 1)
m.c1639 = Constraint(expr= m.b1092 + m.b1093 <= 1)
m.c1640 = Constraint(expr= m.b1094 + m.b1095 <= 1)
m.c1641 = Constraint(expr= m.b1094 + m.b1095 <= 1)
m.c1642 = Constraint(expr= m.b1096 + m.b1097 <= 1)
m.c1643 = Constraint(expr= m.b1096 + m.b1097 <= 1)
m.c1644 = Constraint(expr= m.b1098 + m.b1099 <= 1)
m.c1645 = Constraint(expr= m.b1098 + m.b1099 <= 1)
m.c1646 = Constraint(expr= m.b1100 + m.b1101 <= 1)
m.c1647 = Constraint(expr= m.b1100 + m.b1101 <= 1)
m.c1648 = Constraint(expr= m.b1102 + m.b1103 <= 1)
m.c1649 = Constraint(expr= m.b1102 + m.b1103 <= 1)
m.c1650 = Constraint(expr= m.b1104 + m.b1105 <= 1)
m.c1651 = Constraint(expr= m.b1104 + m.b1105 <= 1)
m.c1652 = Constraint(expr= m.b1106 + m.b1107 <= 1)
m.c1653 = Constraint(expr= m.b1106 + m.b1107 <= 1)
m.c1654 = Constraint(expr= m.b1108 + m.b1109 <= 1)
m.c1655 = Constraint(expr= m.b1108 + m.b1109 <= 1)
m.c1656 = Constraint(expr= m.b1110 + m.b1111 <= 1)
m.c1657 = Constraint(expr= m.b1110 + m.b1111 <= 1)
m.c1658 = Constraint(expr= m.b1112 + m.b1113 <= 1)
m.c1659 = Constraint(expr= m.b1112 + m.b1113 <= 1)
m.c1660 = Constraint(expr= m.b994 - m.b1054 <= 0)
m.c1661 = Constraint(expr= - m.b994 + m.b995 - m.b1055 <= 0)
m.c1662 = Constraint(expr= m.b996 - m.b1056 <= 0)
m.c1663 = Constraint(expr= - m.b996 + m.b997 - m.b1057 <= 0)
m.c1664 = Constraint(expr= m.b998 - m.b1058 <= 0)
m.c1665 = Constraint(expr= - m.b998 + m.b999 - m.b1059 <= 0)
m.c1666 = Constraint(expr= m.b1000 - m.b1060 <= 0)
m.c1667 = Constraint(expr= - m.b1000 + m.b1001 - m.b1061 <= 0)
m.c1668 = Constraint(expr= m.b1002 - m.b1062 <= 0)
m.c1669 = Constraint(expr= - m.b1002 + m.b1003 - m.b1063 <= 0)
m.c1670 = Constraint(expr= m.b1004 - m.b1064 <= 0)
m.c1671 = Constraint(expr= - m.b1004 + m.b1005 - m.b1065 <= 0)
m.c1672 = Constraint(expr= m.b1006 - m.b1066 <= 0)
m.c1673 = Constraint(expr= - m.b1006 + m.b1007 - m.b1067 <= 0)
m.c1674 = Constraint(expr= m.b1008 - m.b1068 <= 0)
m.c1675 = Constraint(expr= - m.b1008 + m.b1009 - m.b1069 <= 0)
m.c1676 = Constraint(expr= m.b1010 - m.b1070 <= 0)
m.c1677 = Constraint(expr= - m.b1010 + m.b1011 - m.b1071 <= 0)
m.c1678 = Constraint(expr= m.b1012 - m.b1072 <= 0)
m.c1679 = Constraint(expr= - m.b1012 + m.b1013 - m.b1073 <= 0)
m.c1680 = Constraint(expr= m.b1014 - m.b1074 <= 0)
m.c1681 = Constraint(expr= - m.b1014 + m.b1015 - m.b1075 <= 0)
m.c1682 = Constraint(expr= m.b1016 - m.b1076 <= 0)
m.c1683 = Constraint(expr= - m.b1016 + m.b1017 - m.b1077 <= 0)
m.c1684 = Constraint(expr= m.b1018 - m.b1078 <= 0)
m.c1685 = Constraint(expr= - m.b1018 + m.b1019 - m.b1079 <= 0)
m.c1686 = Constraint(expr= m.b1020 - m.b1080 <= 0)
m.c1687 = Constraint(expr= - m.b1020 + m.b1021 - m.b1081 <= 0)
m.c1688 = Constraint(expr= m.b1022 - m.b1082 <= 0)
m.c1689 = Constraint(expr= - m.b1022 + m.b1023 - m.b1083 <= 0)
m.c1690 = Constraint(expr= m.b1024 - m.b1084 <= 0)
m.c1691 = Constraint(expr= - m.b1024 + m.b1025 - m.b1085 <= 0)
m.c1692 = Constraint(expr= m.b1026 - m.b1086 <= 0)
m.c1693 = Constraint(expr= - m.b1026 + m.b1027 - m.b1087 <= 0)
m.c1694 = Constraint(expr= m.b1028 - m.b1088 <= 0)
m.c1695 = Constraint(expr= - m.b1028 + m.b1029 - m.b1089 <= 0)
m.c1696 = Constraint(expr= m.b1030 - m.b1090 <= 0)
m.c1697 = Constraint(expr= - m.b1030 + m.b1031 - m.b1091 <= 0)
m.c1698 = Constraint(expr= m.b1032 - m.b1092 <= 0)
m.c1699 = Constraint(expr= - m.b1032 + m.b1033 - m.b1093 <= 0)
m.c1700 = Constraint(expr= m.b1034 - m.b1094 <= 0)
m.c1701 = Constraint(expr= - m.b1034 + m.b1035 - m.b1095 <= 0)
m.c1702 = Constraint(expr= m.b1036 - m.b1096 <= 0)
m.c1703 = Constraint(expr= - m.b1036 + m.b1037 - m.b1097 <= 0)
m.c1704 = Constraint(expr= m.b1038 - m.b1098 <= 0)
m.c1705 = Constraint(expr= - m.b1038 + m.b1039 - m.b1099 <= 0)
m.c1706 = Constraint(expr= m.b1040 - m.b1100 <= 0)
m.c1707 = Constraint(expr= - m.b1040 + m.b1041 - m.b1101 <= 0)
m.c1708 = Constraint(expr= m.b1042 - m.b1102 <= 0)
m.c1709 = Constraint(expr= - m.b1042 + m.b1043 - m.b1103 <= 0)
m.c1710 = Constraint(expr= m.b1044 - m.b1104 <= 0)
m.c1711 = Constraint(expr= - m.b1044 + m.b1045 - m.b1105 <= 0)
m.c1712 = Constraint(expr= m.b1046 - m.b1106 <= 0)
m.c1713 = Constraint(expr= - m.b1046 + m.b1047 - m.b1107 <= 0)
m.c1714 = Constraint(expr= m.b1048 - m.b1108 <= 0)
m.c1715 = Constraint(expr= - m.b1048 + m.b1049 - m.b1109 <= 0)
m.c1716 = Constraint(expr= m.b1050 - m.b1110 <= 0)
m.c1717 = Constraint(expr= - m.b1050 + m.b1051 - m.b1111 <= 0)
m.c1718 = Constraint(expr= m.b1052 - m.b1112 <= 0)
m.c1719 = Constraint(expr= - m.b1052 + m.b1053 - m.b1113 <= 0)
m.c1720 = Constraint(expr= m.b994 + m.b996 == 1)
m.c1721 = Constraint(expr= m.b995 + m.b997 == 1)
m.c1722 = Constraint(expr= - m.b998 + m.b1004 + m.b1006 >= 0)
m.c1723 = Constraint(expr= - m.b999 + m.b1005 + m.b1007 >= 0)
m.c1724 = Constraint(expr= - m.b1004 + m.b1016 >= 0)
m.c1725 = Constraint(expr= - m.b1005 + m.b1017 >= 0)
m.c1726 = Constraint(expr= - m.b1006 + m.b1018 >= 0)
m.c1727 = Constraint(expr= - m.b1007 + m.b1019 >= 0)
m.c1728 = Constraint(expr= - m.b1000 + m.b1008 >= 0)
m.c1729 = Constraint(expr= - m.b1001 + m.b1009 >= 0)
m.c1730 = Constraint(expr= - m.b1008 + m.b1020 + m.b1022 >= 0)
m.c1731 = Constraint(expr= - m.b1009 + m.b1021 + m.b1023 >= 0)
m.c1732 = Constraint(expr= - m.b1002 + m.b1010 + m.b1012 + m.b1014 >= 0)
m.c1733 = Constraint(expr= - m.b1003 + m.b1011 + m.b1013 + m.b1015 >= 0)
m.c1734 = Constraint(expr= - m.b1010 + m.b1022 >= 0)
m.c1735 = Constraint(expr= - m.b1011 + m.b1023 >= 0)
m.c1736 = Constraint(expr= - m.b1012 + m.b1024 + m.b1026 >= 0)
m.c1737 = Constraint(expr= - m.b1013 + m.b1025 + m.b1027 >= 0)
m.c1738 = Constraint(expr= - m.b1014 + m.b1028 + m.b1030 + m.b1032 >= 0)
m.c1739 = Constraint(expr= - m.b1015 + m.b1029 + m.b1031 + m.b1033 >= 0)
m.c1740 = Constraint(expr= m.b994 + m.b996 - m.b998 >= 0)
m.c1741 = Constraint(expr= m.b995 + m.b997 - m.b999 >= 0)
m.c1742 = Constraint(expr= m.b994 + m.b996 - m.b1000 >= 0)
m.c1743 = Constraint(expr= m.b995 + m.b997 - m.b1001 >= 0)
m.c1744 = Constraint(expr= m.b994 + m.b996 - m.b1002 >= 0)
m.c1745 = Constraint(expr= m.b995 + m.b997 - m.b1003 >= 0)
m.c1746 = Constraint(expr= m.b998 - m.b1004 >= 0)
m.c1747 = Constraint(expr= m.b999 - m.b1005 >= 0)
m.c1748 = Constraint(expr= m.b998 - m.b1006 >= 0)
m.c1749 = Constraint(expr= m.b999 - m.b1007 >= 0)
m.c1750 = Constraint(expr= m.b1000 - m.b1008 >= 0)
m.c1751 = Constraint(expr= m.b1001 - m.b1009 >= 0)
m.c1752 = Constraint(expr= m.b1002 - m.b1010 >= 0)
m.c1753 = Constraint(expr= m.b1003 - m.b1011 >= 0)
m.c1754 = Constraint(expr= m.b1002 - m.b1012 >= 0)
m.c1755 = Constraint(expr= m.b1003 - m.b1013 >= 0)
m.c1756 = Constraint(expr= m.b1002 - m.b1014 >= 0)
m.c1757 = Constraint(expr= m.b1003 - m.b1015 >= 0)
m.c1758 = Constraint(expr= m.b1004 - m.b1016 >= 0)
m.c1759 = Constraint(expr= m.b1005 - m.b1017 >= 0)
m.c1760 = Constraint(expr= m.b1006 - m.b1018 >= 0)
m.c1761 = Constraint(expr= m.b1007 - m.b1019 >= 0)
m.c1762 = Constraint(expr= m.b1008 - m.b1020 >= 0)
m.c1763 = Constraint(expr= m.b1009 - m.b1021 >= 0)
m.c1764 = Constraint(expr= m.b1008 - m.b1022 >= 0)
m.c1765 = Constraint(expr= m.b1009 - m.b1023 >= 0)
m.c1766 = Constraint(expr= m.b1012 - m.b1024 >= 0)
m.c1767 = Constraint(expr= m.b1013 - m.b1025 >= 0)
m.c1768 = Constraint(expr= m.b1012 - m.b1026 >= 0)
m.c1769 = Constraint(expr= m.b1013 - m.b1027 >= 0)
m.c1770 = Constraint(expr= m.b1014 - m.b1028 >= 0)
m.c1771 = Constraint(expr= m.b1015 - m.b1029 >= 0)
m.c1772 = Constraint(expr= m.b1014 - m.b1030 >= 0)
m.c1773 = Constraint(expr= m.b1015 - m.b1031 >= 0)
m.c1774 = Constraint(expr= m.b1014 - m.b1032 >= 0)
m.c1775 = Constraint(expr= m.b1015 - m.b1033 >= 0)
m.c1776 = Constraint(expr= - m.b1032 + m.b1034 + m.b1036 >= 0)
m.c1777 = Constraint(expr= - m.b1033 + m.b1035 + m.b1037 >= 0)
m.c1778 = Constraint(expr= - m.b1038 + m.b1044 + m.b1046 >= 0)
m.c1779 = Constraint(expr= - m.b1039 + m.b1045 + m.b1047 >= 0)
m.c1780 = Constraint(expr= - m.b1040 + m.b1048 >= 0)
m.c1781 = Constraint(expr= - m.b1041 + m.b1049 >= 0)
m.c1782 = Constraint(expr= m.b1032 - m.b1034 >= 0)
m.c1783 = Constraint(expr= m.b1033 - m.b1035 >= 0)
m.c1784 = Constraint(expr= m.b1032 - m.b1036 >= 0)
m.c1785 = Constraint(expr= m.b1033 - m.b1037 >= 0)
m.c1786 = Constraint(expr= m.b1038 - m.b1044 >= 0)
m.c1787 = Constraint(expr= m.b1039 - m.b1045 >= 0)
m.c1788 = Constraint(expr= m.b1038 - m.b1046 >= 0)
m.c1789 = Constraint(expr= m.b1039 - m.b1047 >= 0)
m.c1790 = Constraint(expr= m.b1040 - m.b1048 >= 0)
m.c1791 = Constraint(expr= m.b1041 - m.b1049 >= 0)
m.c1792 = Constraint(expr= m.b1042 - m.b1050 >= 0)
m.c1793 = Constraint(expr= m.b1043 - m.b1051 >= 0)
m.c1794 = Constraint(expr= m.b1042 - m.b1052 >= 0)
m.c1795 = Constraint(expr= m.b1043 - m.b1053 >= 0)
| 36.460499 | 120 | 0.648964 | 31,430 | 175,375 | 3.621126 | 0.10035 | 0.047781 | 0.215751 | 0.162373 | 0.559133 | 0.470355 | 0.429867 | 0.422047 | 0.403349 | 0.001968 | 0 | 0.228884 | 0.145152 | 175,375 | 4,809 | 121 | 36.468081 | 0.530273 | 0.003877 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.000334 | 0 | 0.000334 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 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 | 3 |
3be1b2164010153e4fdee605230ce759c3718059 | 112 | py | Python | archive/deep-learning/test-tensorflow-gpu.py | ajrichards/bayesian-examples | fbd87c6f1613ea516408e9ebc3c9eff1248246e4 | [
"BSD-3-Clause"
] | 2 | 2016-01-27T08:51:23.000Z | 2017-04-17T02:21:34.000Z | archive/deep-learning/test-tensorflow-gpu.py | ajrichards/notebook | fbd87c6f1613ea516408e9ebc3c9eff1248246e4 | [
"BSD-3-Clause"
] | null | null | null | archive/deep-learning/test-tensorflow-gpu.py | ajrichards/notebook | fbd87c6f1613ea516408e9ebc3c9eff1248246e4 | [
"BSD-3-Clause"
] | null | null | null | import tensorflow as tf
tf.test.is_gpu_available(
cuda_only=False,
min_cuda_compute_capability=None
)
| 14 | 36 | 0.776786 | 17 | 112 | 4.764706 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.160714 | 112 | 7 | 37 | 16 | 0.861702 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.2 | 0 | 0.2 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3bfc6e2ca836f89035445c3b699f7a84051caa62 | 4,760 | py | Python | dev/Gems/CloudGemWebCommunicator/AWS/common-code/aws_iot_device_sdk_python/AWSIoTPythonSDK/exception/AWSIoTExceptions.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 8 | 2019-10-07T16:33:47.000Z | 2020-12-07T03:59:58.000Z | dev/Gems/CloudGemWebCommunicator/AWS/common-code/aws_iot_device_sdk_python/AWSIoTPythonSDK/exception/AWSIoTExceptions.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | null | null | null | dev/Gems/CloudGemWebCommunicator/AWS/common-code/aws_iot_device_sdk_python/AWSIoTPythonSDK/exception/AWSIoTExceptions.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 5 | 2020-08-27T20:44:18.000Z | 2021-08-21T22:54:11.000Z | # /*
# * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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.
# * A copy of the License is located at
# *
# * http://aws.amazon.com/apache2.0
# *
# * or in the "license" file accompanying this file. This file 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 AWSIoTPythonSDK.exception.operationTimeoutException as operationTimeoutException
import AWSIoTPythonSDK.exception.operationError as operationError
# Serial Exception
class acceptTimeoutException(Exception):
def __init__(self, msg="Accept Timeout"):
self.message = msg
# MQTT Operation Timeout Exception
class connectTimeoutException(operationTimeoutException.operationTimeoutException):
def __init__(self, msg="Connect Timeout"):
self.message = msg
class disconnectTimeoutException(operationTimeoutException.operationTimeoutException):
def __init__(self, msg="Disconnect Timeout"):
self.message = msg
class publishTimeoutException(operationTimeoutException.operationTimeoutException):
def __init__(self, msg="Publish Timeout"):
self.message = msg
class subscribeTimeoutException(operationTimeoutException.operationTimeoutException):
def __init__(self, msg="Subscribe Timeout"):
self.message = msg
class unsubscribeTimeoutException(operationTimeoutException.operationTimeoutException):
def __init__(self, msg="Unsubscribe Timeout"):
self.message = msg
# MQTT Operation Error
class connectError(operationError.operationError):
def __init__(self, errorCode):
self.message = "Connect Error: " + str(errorCode)
class disconnectError(operationError.operationError):
def __init__(self, errorCode):
self.message = "Disconnect Error: " + str(errorCode)
class publishError(operationError.operationError):
def __init__(self, errorCode):
self.message = "Publish Error: " + str(errorCode)
class publishQueueFullException(operationError.operationError):
def __init__(self):
self.message = "Internal Publish Queue Full"
class publishQueueDisabledException(operationError.operationError):
def __init__(self):
self.message = "Offline publish request dropped because queueing is disabled"
class subscribeError(operationError.operationError):
def __init__(self, errorCode):
self.message = "Subscribe Error: " + str(errorCode)
class subscribeQueueFullException(operationError.operationError):
def __init__(self):
self.message = "Internal Subscribe Queue Full"
class subscribeQueueDisabledException(operationError.operationError):
def __init__(self):
self.message = "Offline subscribe request dropped because queueing is disabled"
class unsubscribeError(operationError.operationError):
def __init__(self, errorCode):
self.message = "Unsubscribe Error: " + str(errorCode)
class unsubscribeQueueFullException(operationError.operationError):
def __init__(self):
self.message = "Internal Unsubscribe Queue Full"
class unsubscribeQueueDisabledException(operationError.operationError):
def __init__(self):
self.message = "Offline unsubscribe request dropped because queueing is disabled"
# Websocket Error
class wssNoKeyInEnvironmentError(operationError.operationError):
def __init__(self):
self.message = "No AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY detected in $ENV."
class wssHandShakeError(operationError.operationError):
def __init__(self):
self.message = "Error in WSS handshake."
# Greengrass Discovery Error
class DiscoveryDataNotFoundException(operationError.operationError):
def __init__(self):
self.message = "No discovery data found"
class DiscoveryTimeoutException(operationTimeoutException.operationTimeoutException):
def __init__(self, message="Discovery request timed out"):
self.message = message
class DiscoveryInvalidRequestException(operationError.operationError):
def __init__(self):
self.message = "Invalid discovery request"
class DiscoveryUnauthorizedException(operationError.operationError):
def __init__(self):
self.message = "Discovery request not authorized"
class DiscoveryThrottlingException(operationError.operationError):
def __init__(self):
self.message = "Too many discovery requests"
class DiscoveryFailure(operationError.operationError):
def __init__(self, message):
self.message = message
| 32.162162 | 89 | 0.760504 | 465 | 4,760 | 7.556989 | 0.301075 | 0.084519 | 0.078258 | 0.179283 | 0.47325 | 0.415196 | 0.293682 | 0.211725 | 0 | 0 | 0 | 0.002997 | 0.158824 | 4,760 | 147 | 90 | 32.380952 | 0.874625 | 0.143908 | 0 | 0.324675 | 0 | 0 | 0.166708 | 0.005179 | 0 | 0 | 0 | 0 | 0 | 1 | 0.324675 | false | 0 | 0.025974 | 0 | 0.675325 | 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 | 1 | 0 | 0 | 3 |
ce2e7146a4c1f5004c3c25153ec6c3c5bb5e9e80 | 101 | py | Python | django_email_test/__init__.py | morlandi/django-email-test | c59ad3652a08a7e580a6888cd9c0615d20034a1f | [
"BSD-3-Clause"
] | 1 | 2020-10-05T21:01:42.000Z | 2020-10-05T21:01:42.000Z | django_email_test/__init__.py | morlandi/django-email-test | c59ad3652a08a7e580a6888cd9c0615d20034a1f | [
"BSD-3-Clause"
] | null | null | null | django_email_test/__init__.py | morlandi/django-email-test | c59ad3652a08a7e580a6888cd9c0615d20034a1f | [
"BSD-3-Clause"
] | 1 | 2020-10-05T21:01:56.000Z | 2020-10-05T21:01:56.000Z | VERSION = (0, 0, 5)
__version__ = "".join([".".join(map(str, VERSION[0:3])), "".join(VERSION[3:])])
| 25.25 | 79 | 0.554455 | 15 | 101 | 3.466667 | 0.466667 | 0.307692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.066667 | 0.108911 | 101 | 3 | 80 | 33.666667 | 0.511111 | 0 | 0 | 0 | 0 | 0 | 0.009901 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 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 | 3 |
ce331d2683df658a6cea5c610e302e81e46f1c00 | 720 | py | Python | provy/more/centos/networking/hosts.py | timgates42/provy | ca3d5e96a2210daf3c1fd4b96e047efff152db14 | [
"MIT"
] | 15 | 2015-01-28T15:49:28.000Z | 2021-09-02T18:49:46.000Z | provy/more/centos/networking/hosts.py | timgates42/provy | ca3d5e96a2210daf3c1fd4b96e047efff152db14 | [
"MIT"
] | null | null | null | provy/more/centos/networking/hosts.py | timgates42/provy | ca3d5e96a2210daf3c1fd4b96e047efff152db14 | [
"MIT"
] | 3 | 2016-12-05T07:08:11.000Z | 2021-12-26T04:31:05.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Roles in this namespace are meant to provide hosts management operations for centos distributions.
'''
from provy.more.linux.networking.hosts import HostsRole as Hosts
class HostsRole(Hosts):
'''
This role provides hosts file management utilities for centos distributions.
This is just a class wrapper over :class:`provy.more.linux.networking.hosts.HostsRole`
Example:
::
from provy.core import Role
from provy.more.centos import HostsRole
class MySampleRole(Role):
def provision(self):
with self.using(HostsRole) as role:
role.ensure_host('localhost', '127.0.0.1')
'''
| 25.714286 | 98 | 0.659722 | 89 | 720 | 5.325843 | 0.58427 | 0.056962 | 0.092827 | 0.101266 | 0.122363 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012821 | 0.241667 | 720 | 27 | 99 | 26.666667 | 0.855311 | 0.776389 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 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 | 1 | 0 | 0 | 3 |
ce395ff788e31ac7c9bcfb124ec558832cba32f2 | 43 | py | Python | laserAtomTrap/src/__init__.py | statisdisc/modellingAndSimulation | 1458e7b7a527a4835c5a545f5899b6f1e4d80f92 | [
"Python-2.0",
"OLDAP-2.7"
] | null | null | null | laserAtomTrap/src/__init__.py | statisdisc/modellingAndSimulation | 1458e7b7a527a4835c5a545f5899b6f1e4d80f92 | [
"Python-2.0",
"OLDAP-2.7"
] | null | null | null | laserAtomTrap/src/__init__.py | statisdisc/modellingAndSimulation | 1458e7b7a527a4835c5a545f5899b6f1e4d80f92 | [
"Python-2.0",
"OLDAP-2.7"
] | null | null | null | __all__ = ["objects", "plots", "utilities"] | 43 | 43 | 0.651163 | 4 | 43 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.093023 | 43 | 1 | 43 | 43 | 0.615385 | 0 | 0 | 0 | 0 | 0 | 0.477273 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 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 | 3 |
cbed4b7641fe0e0241a0ad27502e8caa282600d5 | 1,016 | py | Python | websocket/utils/exceptions.py | shadow-share/websocket | 221f523f2973633b14d66b3890a644a0707dd18c | [
"MIT"
] | null | null | null | websocket/utils/exceptions.py | shadow-share/websocket | 221f523f2973633b14d66b3890a644a0707dd18c | [
"MIT"
] | null | null | null | websocket/utils/exceptions.py | shadow-share/websocket | 221f523f2973633b14d66b3890a644a0707dd18c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (C) 2017 ShadowMan
#
class FatalError(Exception):
pass
class FrameHeaderParseError(Exception):
pass
class ConnectClosed(Exception):
pass
class RequestError(Exception):
pass
class LoggerWarning(RuntimeWarning):
pass
class DeamonError(Exception):
pass
class SendDataPackError(Exception):
pass
class InvalidResponse(Exception):
pass
class ParameterError(Exception):
pass
def raise_parameter_error(name, except_type, got_val):
if not isinstance(got_val, except_type):
raise ParameterError(
'{name} except {except_type}, got {got_type}'.format(
name=name,
except_type=except_type.__name__,
got_type=type(got_val).__name__))
class ExitWrite(Exception):
pass
class BroadcastError(Exception):
pass
class HttpVerifierError(Exception):
pass
class FrameVerifierError(Exception):
pass
class WSSCertificateFileNotFound(Exception):
pass
| 14.724638 | 65 | 0.694882 | 103 | 1,016 | 6.660194 | 0.378641 | 0.246356 | 0.28863 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005063 | 0.222441 | 1,016 | 68 | 66 | 14.941176 | 0.863291 | 0.048228 | 0 | 0.4 | 0 | 0 | 0.044652 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.028571 | false | 0.4 | 0 | 0 | 0.428571 | 0 | 0 | 0 | 0 | null | 1 | 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 | 3 |
cbfbbdd6eed182449f7e751f423530ebe0292c93 | 511 | py | Python | 03-conditionals/check_same_case.py | alvgaona/PC | dc043861a7246c228f40d882b70faa6b9623b05b | [
"MIT"
] | 2 | 2022-03-29T16:40:32.000Z | 2022-03-29T16:42:34.000Z | 03-conditionals/check_same_case.py | alvgaona/PC | dc043861a7246c228f40d882b70faa6b9623b05b | [
"MIT"
] | null | null | null | 03-conditionals/check_same_case.py | alvgaona/PC | dc043861a7246c228f40d882b70faa6b9623b05b | [
"MIT"
] | null | null | null | def is_uppercase(letter: str):
return True if 65 <= ord(letter) <= 90 else False
def is_lowercase(letter: str):
return True if 97 <= ord(letter) <= 122 else False
def check_same_case(first: str, second: str) -> bool:
if is_uppercase(first) and is_uppercase(second):
return True
if is_lowercase(first) and is_lowercase(second):
return True
return False
def main():
same_case = check_same_case('?', '?')
print(same_case)
if __name__ == '__main__':
main()
| 19.653846 | 54 | 0.65362 | 73 | 511 | 4.30137 | 0.356164 | 0.127389 | 0.11465 | 0.121019 | 0.133758 | 0 | 0 | 0 | 0 | 0 | 0 | 0.022843 | 0.228963 | 511 | 25 | 55 | 20.44 | 0.774112 | 0 | 0 | 0.133333 | 0 | 0 | 0.019569 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.266667 | false | 0 | 0 | 0.133333 | 0.6 | 0.066667 | 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 | 1 | 0 | 0 | 3 |
020f8e24ee36befcbaf28d702ae5ee6e92843f0c | 795 | py | Python | composer/algorithms/blurpool/__init__.py | jacobfulano/composer | 4ad81df2d2ca6e5f0b4922bb2db750cd76ba34e8 | [
"Apache-2.0"
] | 2 | 2022-03-17T04:48:04.000Z | 2022-03-20T09:06:19.000Z | composer/algorithms/blurpool/__init__.py | jacobfulano/composer | 4ad81df2d2ca6e5f0b4922bb2db750cd76ba34e8 | [
"Apache-2.0"
] | null | null | null | composer/algorithms/blurpool/__init__.py | jacobfulano/composer | 4ad81df2d2ca6e5f0b4922bb2db750cd76ba34e8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 MosaicML. All Rights Reserved.
from composer.algorithms.blurpool.blurpool import BlurPool as BlurPool
from composer.algorithms.blurpool.blurpool import BlurPoolHparams as BlurPoolHparams
from composer.algorithms.blurpool.blurpool import apply_blurpool as apply_blurpool
from composer.algorithms.blurpool.blurpool_layers import BlurConv2d as BlurConv2d
from composer.algorithms.blurpool.blurpool_layers import BlurMaxPool2d as BlurMaxPool2d
from composer.algorithms.blurpool.blurpool_layers import BlurPool2d as BlurPool2d
from composer.algorithms.blurpool.blurpool_layers import blur_2d as blur_2d
_name = 'BlurPool'
_class_name = 'BlurPool'
_functional = 'apply_blurpool'
_tldr = ''
_attribution = '(Zhang, 2019)'
_link = 'https://arxiv.org/abs/1904.11486'
_method_card = ''
| 44.166667 | 87 | 0.838994 | 98 | 795 | 6.622449 | 0.367347 | 0.12943 | 0.237288 | 0.323575 | 0.53621 | 0.53621 | 0.308166 | 0 | 0 | 0 | 0 | 0.034626 | 0.091824 | 795 | 17 | 88 | 46.764706 | 0.864266 | 0.056604 | 0 | 0 | 0 | 0 | 0.100267 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 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 | 1 | 0 | 0 | 0 | 0 | 3 |
021b5920befafdce3ff24fa801b3d3045663d2fb | 1,997 | py | Python | mol/wrappers/base.py | cgrambow/mol | 47f28a3bfacefe3efb7f9dc8766841980bfc95ac | [
"MIT"
] | null | null | null | mol/wrappers/base.py | cgrambow/mol | 47f28a3bfacefe3efb7f9dc8766841980bfc95ac | [
"MIT"
] | null | null | null | mol/wrappers/base.py | cgrambow/mol | 47f28a3bfacefe3efb7f9dc8766841980bfc95ac | [
"MIT"
] | null | null | null | from __future__ import annotations
from abc import ABC, abstractmethod
from collections.abc import Sequence
from pathlib import Path
from typing import Any, Union
import numpy as np
class AbstractMol(ABC):
"""
Base class for pybel.Molecule and rdkit.Chem.Mol wrappers.
"""
@abstractmethod
def __init__(self, *args, smiles: str = None, **kwargs) -> None:
"""Should be able to instantiate subclass from SMILES"""
pass
@abstractmethod
def __len__(self) -> int:
"""Number of atoms"""
pass
@property
@abstractmethod
def name(self) -> str:
pass
@name.setter
@abstractmethod
def name(self, val: str) -> None:
pass
@property
@abstractmethod
def smiles(self) -> str:
"""Canonical SMILES"""
pass
@property
@abstractmethod
def symbols(self) -> list[str]:
"""List of atomic symbols"""
pass
@property
@abstractmethod
def coords(self) -> np.ndarray:
"""Cartesian coordinates"""
pass
@coords.setter
@abstractmethod
def coords(self, val: Union[np.ndarray, tuple[Sequence[str], np.ndarray]]) -> None:
"""Check atomic symbols if setting with tuple of symbols and coordinates"""
pass
@abstractmethod
def copy(self) -> AbstractMol:
pass
@abstractmethod
def merge(self, other: AbstractMol) -> AbstractMol:
pass
@abstractmethod
def get_prop(self, name: str) -> Any:
pass
@abstractmethod
def set_prop(self, name: str, val: Any) -> None:
pass
@abstractmethod
def to(self, frmt: str) -> str:
"""Convert to string format"""
pass
@abstractmethod
def save(self, path: Union[str, Path], frmt: str) -> None:
"""Write to file"""
pass
@abstractmethod
def generate_3d_geometry(self) -> None:
pass
@abstractmethod
def optimize_geometry(self) -> None:
pass
| 21.706522 | 87 | 0.605408 | 220 | 1,997 | 5.418182 | 0.368182 | 0.228188 | 0.158557 | 0.097315 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.000705 | 0.289434 | 1,997 | 91 | 88 | 21.945055 | 0.839323 | 0.148222 | 0 | 0.590164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.262295 | false | 0.262295 | 0.098361 | 0 | 0.377049 | 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 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
02301d8c35f4ff85398b8ef0076198e0271fad7d | 334 | py | Python | modules/api/functional_test/live_tests/internal/color_test.py | slandry90/vinyldns | bf3122bdd5058af53561224adb1984e3b9f1f5bc | [
"Apache-2.0"
] | 333 | 2018-07-27T12:58:40.000Z | 2022-03-16T23:05:37.000Z | modules/api/functional_test/live_tests/internal/color_test.py | slandry90/vinyldns | bf3122bdd5058af53561224adb1984e3b9f1f5bc | [
"Apache-2.0"
] | 1,010 | 2018-07-27T14:43:14.000Z | 2022-03-25T09:29:43.000Z | modules/api/functional_test/live_tests/internal/color_test.py | slandry90/vinyldns | bf3122bdd5058af53561224adb1984e3b9f1f5bc | [
"Apache-2.0"
] | 123 | 2018-07-26T20:06:04.000Z | 2022-02-16T17:12:17.000Z | import pytest
from hamcrest import *
from vinyldns_python import VinylDNSClient
def test_color(shared_zone_test_context):
"""
Tests that the color endpoint works appropriately
"""
client = shared_zone_test_context.ok_vinyldns_client
result = client.color()
assert_that(["green", "blue"], has_item(result))
| 22.266667 | 56 | 0.742515 | 42 | 334 | 5.619048 | 0.642857 | 0.084746 | 0.118644 | 0.177966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.173653 | 334 | 14 | 57 | 23.857143 | 0.855072 | 0.146707 | 0 | 0 | 0 | 0 | 0.033457 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 1 | 0.142857 | false | 0 | 0.428571 | 0 | 0.571429 | 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 | 1 | 0 | 0 | 3 |
023da6b06e695952dd5af6728adbc2b2bff73bc2 | 150 | py | Python | commands/ping.py | t1mosha/Helper5TGBot | ce1d958f463b2836e34b3275dd67c3b8936e4d91 | [
"MIT"
] | null | null | null | commands/ping.py | t1mosha/Helper5TGBot | ce1d958f463b2836e34b3275dd67c3b8936e4d91 | [
"MIT"
] | null | null | null | commands/ping.py | t1mosha/Helper5TGBot | ce1d958f463b2836e34b3275dd67c3b8936e4d91 | [
"MIT"
] | null | null | null | from pyrogram import Client, filters
@Client.on_message(filters.command('ping', ['!']))
def ping(client, message):
message.reply_text(f"Pong!")
| 21.428571 | 50 | 0.713333 | 20 | 150 | 5.25 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.113333 | 150 | 6 | 51 | 25 | 0.789474 | 0 | 0 | 0 | 0 | 0 | 0.066667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.5 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
024ce325492f1dccebbda1cd670c5dabe15b61ad | 514 | py | Python | advertools/__init__.py | amrrs/advertools | c89484d892965cdfa25c6260ac7f2b85ba68aaa8 | [
"MIT"
] | null | null | null | advertools/__init__.py | amrrs/advertools | c89484d892965cdfa25c6260ac7f2b85ba68aaa8 | [
"MIT"
] | null | null | null | advertools/__init__.py | amrrs/advertools | c89484d892965cdfa25c6260ac7f2b85ba68aaa8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for advertools."""
__author__ = """Elias Dabbas"""
__email__ = 'eliasdabbas@gmail.com'
__version__ = '0.3.0'
from advertools.ad_create import ad_create
from advertools.ad_from_string import ad_from_string
from advertools.extract import extract_mentions, extract_hashtags, extract_emoji
from advertools.kw_generate import *
from advertools.stopwords import stopwords
from advertools.url_builders import url_utm_ga
from advertools.word_frequency import word_frequency
| 32.125 | 80 | 0.81323 | 70 | 514 | 5.585714 | 0.514286 | 0.250639 | 0.081841 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008658 | 0.101167 | 514 | 15 | 81 | 34.266667 | 0.837662 | 0.108949 | 0 | 0 | 0 | 0 | 0.084071 | 0.04646 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.7 | 0 | 0.7 | 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 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
025b417216792358d0b13b37a7a0bc25a3fafbcd | 415 | py | Python | python practice/day9/solution.py | rezafari/raspberry | e6720780f3c65ee1809040fc538f793fe44f0111 | [
"MIT"
] | 19 | 2017-09-26T04:37:55.000Z | 2021-12-15T05:39:57.000Z | python practice/day9/solution.py | rezafari/raspberry | e6720780f3c65ee1809040fc538f793fe44f0111 | [
"MIT"
] | 44 | 2017-11-22T04:56:26.000Z | 2018-03-17T14:30:00.000Z | python practice/day9/solution.py | rezafari/raspberry | e6720780f3c65ee1809040fc538f793fe44f0111 | [
"MIT"
] | 21 | 2017-09-23T05:25:59.000Z | 2021-05-31T10:24:49.000Z | ###########################################################
# #
# Solving factorial problem with recursive function #
# #
###########################################################
def factorial(n):
if n == 2:
return 2
return n * factorial(n - 1)
print(factorial(int(input()))) | 37.727273 | 59 | 0.260241 | 23 | 415 | 4.695652 | 0.652174 | 0.185185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012 | 0.39759 | 415 | 11 | 60 | 37.727273 | 0.42 | 0.118072 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 0 | 0.6 | 0.2 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
026c95389ab3f93c3a2d284cd47cc13221cdd8ce | 4,150 | py | Python | hms/models.py | kasparov-creat/hms-api | 7cf7da5da59a8bebfd4629fd65ac159ab19319ec | [
"MIT"
] | null | null | null | hms/models.py | kasparov-creat/hms-api | 7cf7da5da59a8bebfd4629fd65ac159ab19319ec | [
"MIT"
] | null | null | null | hms/models.py | kasparov-creat/hms-api | 7cf7da5da59a8bebfd4629fd65ac159ab19319ec | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
departments=[('Cardiologist','Cardiologist'),
('Dermatologist','Dermatologist'),
('Emergency Medicine Specialist','Emergency Medicine Specialist'),
('Allergist/Immunologist','Allergist/Immunologist'),
('Anesthesiologist','Anesthesiologist'),
('Colon and Rectal Surgeon','Colon and Rectal Surgeon')
]
class Doctor(models.Model):
user=models.OneToOneField(User,on_delete=models.CASCADE)
name=models.CharField(max_length=40, default='doctor')
profile_pic= models.ImageField(upload_to='profile_photos/Doctor/', default='profile_photos/Doctor/default_ku6ks9.jpg')
address = models.CharField(max_length=40)
mobile = models.CharField(max_length=20)
department= models.CharField(max_length=50,choices=departments,default='Cardiologist')
status=models.BooleanField(default=False)
@receiver(post_save, sender=User)
def create_doctor_profile(sender, instance, created, **kwargs):
if created:
Doctor.objects.create(user=instance)
@receiver(post_save, sender=User)
def save_doctor_profile(sender, instance, created=False, **kwargs):
instance.doctor.save()
def save_doctor(self):
self.save()
def delete_doctor(self):
self.delete()
@classmethod
def find_doctor(cls,name):
return cls.objects.filter(name__icontains=name)
@classmethod
def get_patient(cls,name):
patient = cls.objects.filter(patient__name__icontains=name)
return patient
@property
def get_name(self):
return self.name
@property
def get_id(self):
return self.user.id
def __str__(self):
return self.name
class Patient(models.Model):
user=models.OneToOneField(User,on_delete=models.CASCADE)
name=models.CharField(max_length=40, default='patient')
profile_pic= models.ImageField(upload_to='profile_photos/Doctor/', default='profile_photos/Patient/default_olh4qq.jpg')
address = models.CharField(max_length=40)
mobile = models.CharField(max_length=20,null=False)
symptoms = models.CharField(max_length=100,null=False)
assignedDoctorId = models.PositiveIntegerField(null=True)
admitDate=models.DateField(auto_now=True)
status=models.BooleanField(default=False)
@receiver(post_save, sender=User)
def create_patient_profile(sender, instance, created, **kwargs):
if created:
Patient.objects.create(user=instance)
@receiver(post_save, sender=User)
def save_patient_profile(sender, instance, created=False, **kwargs):
instance.patient.save()
def save_patient(self):
self.save()
def delete_patient(self):
self.delete()
@classmethod
def find_patient(cls,name):
return cls.objects.filter(name__icontains=name)
@property
def get_name(self):
return self.user.first_name+" "+self.user.last_name
@property
def get_id(self):
return self.user.id
def __str__(self):
return self.name
class Appointment(models.Model):
patientId=models.PositiveIntegerField(null=True)
doctorId=models.PositiveIntegerField(null=True)
patientName=models.CharField(max_length=40,null=True)
doctorName=models.CharField(max_length=40,null=True)
appointmentDate=models.DateField(auto_now=True)
description=models.TextField(max_length=500)
status=models.BooleanField(default=False)
def save_appointment(self):
self.save()
def delete_appointment(self):
self.delete()
@classmethod
def find_doctor(cls,name):
return cls.objects.filter(name__icontains=name)
@classmethod
def find_patient(cls,name):
return cls.objects.filter(name__icontains=name)
@classmethod
def find_appointment(cls,patientName):
return cls.objects.filter(patientName__icontains=patientName)
def __str__(self):
return self.patientName
| 31.923077 | 123 | 0.701205 | 483 | 4,150 | 5.855072 | 0.202899 | 0.035007 | 0.063649 | 0.084866 | 0.613508 | 0.543847 | 0.538897 | 0.428571 | 0.428571 | 0.428571 | 0 | 0.008043 | 0.191084 | 4,150 | 130 | 124 | 31.923077 | 0.834376 | 0 | 0 | 0.49 | 0 | 0 | 0.092267 | 0.040713 | 0 | 0 | 0 | 0 | 0 | 1 | 0.23 | false | 0 | 0.04 | 0.12 | 0.66 | 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 | 1 | 0 | 0 | 3 |
027828d262490d6b9e60f7d2eac8c846dc4b067f | 1,404 | py | Python | formalarg/extension.py | Amande-WP5/formalarg | e0849ae6955eddec9d0f8e69b1d07f8d33798738 | [
"MIT"
] | null | null | null | formalarg/extension.py | Amande-WP5/formalarg | e0849ae6955eddec9d0f8e69b1d07f8d33798738 | [
"MIT"
] | null | null | null | formalarg/extension.py | Amande-WP5/formalarg | e0849ae6955eddec9d0f8e69b1d07f8d33798738 | [
"MIT"
] | null | null | null | from . import Relation
class Extension:
def __init__(self, *arguments):
self.arguments = arguments
def add_arguments(self, *arguments):
self.arguments += arguments
def is_conflicting(self, relations):
return any(rel for rel in relations if rel.relfrom in self.arguments and rel.relto in self.arguments)
def is_conflict_free(self, relations):
return not self.is_conflicting(relations)
def is_admissible(self, relations):
if not self.is_conflict_free(relations):
return False
return not any(arg for arg in self.arguments if not arg.is_acceptable(self, relations))
def is_complete(self, arguments, relations):
if not self.is_admissible(relations):
return False
for arg in arguments:
if arg.is_acceptable(self, relations) and not arg in self.arguments:
return False
return True
def is_stable(self, arguments, relations):
if not self.is_conflict_free(relations):
return False
arg_not_in_ext = [arg for arg in arguments if not arg in self.arguments]
atked = [rel.relto for rel in relations if rel.relfrom in self.arguments and rel.relto in arg_not_in_ext]
return not any(arg for arg in arg_not_in_ext if arg not in atked)
def __str__(self):
return ', '.join(str(arg) for arg in self.arguments) | 36.947368 | 113 | 0.674501 | 199 | 1,404 | 4.59799 | 0.180905 | 0.184699 | 0.114754 | 0.048087 | 0.634973 | 0.462295 | 0.338798 | 0.238251 | 0.238251 | 0.238251 | 0 | 0 | 0.254986 | 1,404 | 38 | 114 | 36.947368 | 0.874761 | 0 | 0 | 0.206897 | 0 | 0 | 0.001423 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.275862 | false | 0 | 0.034483 | 0.103448 | 0.689655 | 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 | 1 | 0 | 0 | 3 |
65efe2ad29f2fa8443d34f5b8553d61704e499e9 | 20,565 | py | Python | src/thsData/constants_10jqka.py | EasyStock/Bull | 388537b389646c3c315ec51de9c3856012b1f644 | [
"Apache-2.0"
] | null | null | null | src/thsData/constants_10jqka.py | EasyStock/Bull | 388537b389646c3c315ec51de9c3856012b1f644 | [
"Apache-2.0"
] | null | null | null | src/thsData/constants_10jqka.py | EasyStock/Bull | 388537b389646c3c315ec51de9c3856012b1f644 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
'''
Created on 2017年11月25日
@author: jianpinh
'''
eng_10jqka_CookieList = [
'AcL0X6qrL2k4wjM1rx64KE2PFcMhk8ameJe60Qzb7jXgX2x39CMWvUgnCuXc',
'AQI0H2rr7yl4gvABCen4aA1PVQNh0wayuNf6B0wbLnUgn6y3NGNW_YhnSiUc',
'AR0rznlCGEhb2_-QOepvqU4GKvISOlGMW261YN_iWXSjljNmp4phXOu-xTlv',
'AePVMIOgvj4xWXH-c8aJf_TEdCyI2HeWsWy7ZBVAP8K5VA3YnagHasE8S5El',
'AeHXOpWWHER_d7PExdHrFeoa9qb-jlUMfwL5vkO23ehHqg_Si95lUA9SCXTT',
'AQ85tPfMivJ9fY36Z5g9IyhgmKgcNGPp_YhnYCEcq36F8CFcKQTzpg1Y94gx',
'AQ07vgkyaBirC8_AyZcf2d62GiKC6kEDyx6luk-SSaQTRiNWFzpRjFtutXPf',
'ASwanfB9WQsSvE7DQIhOynfB-wFb5dAw0onkeYZtOFd6kcI1rvWgHyKZtPfW',
'AQw6PRCduavyHK4jYEluKleh22E7RbAQsunEmWbNGLda8aJVjlWAfwL5lFa2',
'ASsdGPvY9oY5QSkm-yxRF-wsvEQQQD89uVQDXJ2oB2rBPEUwJRDPEskkk9Ct',
'AUh-wfRJhZ-ugOrvxBzivjuNH71f8awEjlWAVQL5lEO23ebpqgF8i95lUBdS',
'AYm_Aq0uNMzHv8vM7J_TrUJinr7m1nxo58qhtiv-BXCvcqcqcyaN2HcasXC7',
'Aaie4ZRpZb8O4ErPZfgCnpvtf52_0Q277jXgdWLZ9CMWvUaJCuHcaz5FsPKy',
'AcfxzH9UUqp1FdXS_tV1izB4UHCUzJrO9aAfCJm049Z9COlkoZwr_gVwr2yp',
'AUdxTP_U0ir1lVVSfu71C7D40PAUTBsEdSCfohk0Y1b9iGnkIRyrfoXwL_Yp',
'AYSyldglgYOKdDa7MzhmMp_5UwlznagEasE8S54lEM8SySo9xq14l7rRDOru',
'AZyqzQCtKVvibN5zW6P-ekfxa7FLFUAKwrlUA3adqAdqwTLlniUQzxLJJDXG',
'AbuNqOvoZjYpkVl24IYhZ5x8TJQgEM8nySSTxq14l7rRDNVANeBfYtn0I7G9',
'Ae7Y0x73Oy1k5ky9NRIs7IErOU-177LQxLJmzRi3Wmus6oD7gH8C-ZRDtsDo',
'ASAWeVyxbZfGONJnN306piPF9yX3KQSOpg1Y95ox7DvOlc4RQjnUg_YdKCvq',
'AS0bHumSCHjLq-9gool_ef7WOsKiimHc677FMG8yaUQz5kM2N9pxLHsO1a3_',
'AUx6_dDdeWsy3G5jK5auahdhG6F7hfCv8ikE86YNWPeaMeKVzpXAv0I51C32',
'AWJUPwqLT0nY4lDhoRoYSO2vtePBs2ZFGLZa8az7js-AbgxXlEO23ehHqh98',
'Ac_59DeMyjI9vc26rHn942igWGjc9COHvUgnCuHcaz5FsOEc6cSzZs0Yt-rx',
'Aaie4ZRpZb8O4ErPb0MCnpvtf52_0QwZ7jXgX2LZ9CMWvUaJCuHcaz5FsF6y',
'AcfxzH9UUqp1FdXS9G51izB4UHCUzJts9aAfIpm049Z9COlkoZwr_gVwr8Cp',
'AebQq2afg4W8vlTVfXWkdEmDMVdtxypD_Ate5dCP0onkU4jDOFd6kcybrkag',
'AVFnaqXG7JRPJwN03j4bxfrKZlbuvsXnbzJpRDPmTZg32n-Cew7VAP-CeaHD',
'AXBGSYwB3Ye2SIJ3ZxlKthNVRzXHuVTUdp2oB2rBPEueJR5hEskkk8ateCG6',
'AY-5NHdMCnL9_Q167GS9o6jgGCictOMBfQjnyqGcK_4FcKHcqYRzJo3Yd62x',
'AWxaXbC9GctSfA4DCzOOCjeBO0GbJRAPEsgkk8ateA26wAJ17jXgX2LZ9DwW',
'ASwanfB9WQsSvE7DS75OynfB-wFb5dCQ0onkU4ZtOFd6kcI1rvWgHyKZtNTW',
'ASYQaybfQ0X8fhQVPdnktAlDcZetB2u_PEueJRDPEskkk8gDeJe60Qzb7ong',
'AUVzVhEasDAjo5cYyrzXoabOUop6AvjqQ7bd6EeqAXyL3mv-D1IJZNMG7QXX',
'AQUzllHa8HDj49fYCRuXYeYOEko6wrl8A3adqAdqwTxLniu-zxLJJJPGrUCX',
'AamfYo2O1Czn3-tsxUozTWKCvl4GdpwzB2rBPEueJRDPEseKk8ateJe60bPb',
'Acj-QXTJBR8uAGpvTG1iPrsNnz3fcS3gDtUA_4J5FMM2XWZpKoH8C17l0E_S',
'AUVzVhEasDAjo5cYyWXXoabOUop6Avm8Q7bd6EeqAXyL3mv-D1IJZNMG7YLX',
'AU17fslyKNjry48Agc5fGZ52WmLCKoBaC17l0I_SieRThmOWV3qRzJuu9Wgf',
'AcH32rU2fORf15Mk7aKLdcr61gbe7jT0X2PZ9CMWvdInG-9yaz5FsO-y6eaz',
'AYWzFtFacPBjY1dYiecX4WaOksq6Qjn8g_YdKIfqQbzLHqs-T5JJpBNGLcQX',
'ARUjpsFq4KCTs8eoeernMRbeIhrKEsiCk8ateJe60Qzb7jtOX2LZ9CMWvYQn',
'AaWTdrE6EFCDg3f4aaZ3gQYusmra4llco5Y9yKeKYVzrvsuebzJpRDPmTaU3',
'AQM1kGMAXp5R-RGeW7HpH5RklMyoeJau0Q3b7jXgX_jZ5S24vUgnCuHcax1F',
'ASQSdTgFIWMqFFbbkI_GUj-Z8ykTvUgNCuHcaz5FsO-y6codZs0Yt1rxrMWO',
'AaudmHtYdga5wammc-XRl2ysPMSQwL6MOdSD9h0oh-pBvMWwpZBPkkmkE5ct',
'AamfYo2O1Czn3-tsxfAzTWKCvl4GdpxmB2rBPEueJRDPEseKk8ateJe60d7b',
'AYK0n-prb6n4AnCBgtJ46I3P1YPhU4ZBOFd6kcybrvWgHyw3tOPWfQjnyp6c',
'AURy1RjlwcNKtHZ7cAgm8t85E8kzXWk3KoH8C17l0I_Sier9hm04V3qRzE2u',
'AXZAe1avMzWsjsQlbhE0xHnTwad9l7uSDNruNeBfYkP0MhgTSCcK4dxrPmGw',
'AaSS9biFoeOqlNZbEE5G0r8Zc6mTPclXimFc677FMG8yaUqd5k2YN9pxLKMO',
'AV1rjjmC2Aibm7_Q8NKv6Q7GajJSepA8m671oB8imbTj1nOm58qhnCv-Bauv',
'ASIUf0pLj4mYIpCh4zHYCC3vdaOBcyd92HcasWy7ThVAP8wXVAN2nagHah08',
'Adrsl9LTVyGQOth5a9kQUDWHLYv5C1-m0I7SieRThvc4RnQ_zJuu9aAfIry0',
'AUF3WjW2_GTfVxOkbFwL9Up6VoZebrSQ3-JZdKOWPcinim_y677FMG8yaZkz',
'AWBWORzxLVcG-JKn9Xt65uOFN2U3aUXD5k2YN9pxLHsO1Q5RgnkUwzZdaBkq',
'AQQyFVilAQMK9LY7saDmsh9504nzHSir6kG8yx6lkE-SSaq9Ri34FzpRjBlu',
'AfjO8cT51a_-cDrfnWFSrst9z62PYV7xvsUwbzJpRDPmTZaZ2nEsew7VACCC',
'ARch3K8kApolpYXiJkyFm2CIoIBkXOmkxTBvMmlEM-ZNmDl0cSx7DtUA_2J5',
'AffBfM9EYjoFBeVCRoel-0BogOBEvMskpZBPkkmkE0Yt-BmUUYxbbrVg36FZ',
'AUh-wfRJhZ-ugOrvzb_ivjuNH71f8a7TjlWAfwL5lEO23ebpqgF8i95lUOxS',
'AdTiZQi1cXN6hObLYfK2Qs8JoxlDLfmcOlCMW261YEXiSHoNlj3Ip4phXM2-',
'AUZwywa_Y6UcnjS1H4jEVCnjkTfNp4hJXOu-xTBvMmlEM-jjmDfacSx7DjEA',
'AXZAe1avMzWsjsQlb740xHnTwad9l7rtDNvuNeBfYtn0IxgTSCcK4dxrPgGw',
'Af7I444HK10UtnyNpwI8vDH7SR9FP8D2VAN2nagHasE8S5CLEM8SySSTxkp4',
'AWheIdQppf_OIIqPrRrCXtstP11_kc0hrvSgHyKZtHnWbAZJyqGcK_4FcIhy',
'AUl_Qu3udAyH_wuMJP2TbYKiXn6mlj9Kp4phXOu-xTBvMmfqM-ZNmDfaccd7',
'AWheIdQppf_OIIqPrRrCXtstP11_kc4ZrvWgHyKZtOPWfQZJyqGcK_4FcENy',
'AfjO8cT51a_-cDrfnfRSrst9z62PYVzXvsUwbzJpRDPmTZaZ2nEsew7VALmC',
'AbWDhiFKAIAzU2fI2DpHUbb-wjpqMmvzM-ZNmDfacSx7Dtuu_4J5FMM2XYXH',
'AbOFgDOw7q5haaGOKjFZD6TURLzY6EUdAXyL3mVQD1IJZN2o7bjX-hFMG8B1',
'ATkPMn1eRNwXLxu8tNWDnRLSTq4WRi3EFzpRjFtutWDf4lfao5Y9yKeKYRvr',
'AUZwywa_Y6UcnjS1HxHEVCnjkTfNp4iFXOu-xTBvMmlEM-jjmDfacSx7DiQA',
'AbeBvA8EonrFRSUChnhlu4CoQKAEfIjKZVAPUglk0wbtuNlUEUwbLnUgn1EZ',
'AbyKLeANybsCjP4TxireGmcRi1FrtWDj4ll0o5Y9yKeKYVJFvsUwbzJpRHrm',
'AffBfM9EYjoFBeVCud6l-0BogOBEvMhKpZBPkkmkE0Yt-BmUUYxbbrVg3xRZ',
'AaeRbJ_0skpV9TUy6U8V6xDYMNB0LHkt1QH_gnkUw6xdecmEgfwLXuXQj_uJ',
'AfXDRuGKwEBzEycIZ8GHkXa-AnqqcqrQcyaN2HcasWy7ThvuP8K5VAN2nV8H',
'Af3LbpnieOg7u9_wr9cPCa7mClLymjHQO86VwL9COdSD9hOGh-pBvMsepdpP',
'Ae7Y0x73Oy1k5ky9yA4s7IErOU-177FzxLNmzRi3WvGs-4D7gH8C-ZRDtifo',
'AT4Io05H6x1UdjzNmPR8_PG7iV-FfwLFlEO23ehHqgF8i9DLUA9SCWTTBqa4',
'Aercp0JjR1EAishJJFVgIKVXPVuJW20LYN_iWXSjlj3Ip4TPXOu-xTBvMpRE',
'AYSyldglgYOKdDa7zlJmMp_5UwlznapuasA8S54lEFUS2Co9xq14l7rRDPHu',
'AejeoVSpJX9OoAoP0k5C3lutv93_EU-lLnUgn6IZNGNW_YbJSiEcq36F8NHy',
'AZmvUh1-JPx3D_ucq1wjffIyro52JolTdxqxbLtOFUA_wrf6A3adqAdqwDtL',
'ASEX-lXW3AS_N3MEcxorVaraNuY-zpX8v0I51IP2HSiH6k8Syx6lkE-SSesT',
'AQw6PRCduavyHK4jlgJuKleh22E7RbQ3sunEs2bNGLda8aJVjlWAfwL5lUm2',
'AUN1UCNAHl6RudHe5e8pX1Qk1AzouNUqEU0bLnUgnzgZJW34_YhnSiEcq1KF',
'AQo8ByLDZ7EgKujpRHNAwEX3Xfup-4qNgH8C-ZRDtt3oR6SvfIveZVAPUwJk',
'AaOVcMNg_n7xmbG-RchJPzQENOxImDfmcSx7DtUA_4J5FM2YXWjHKoH8Cw_l',
'AUJ03yorr-m4QrBBPDc4qM0PlUOhE0MS-Bc6UYxbbrVg3-z3dKOWPcini3Bc',
'AeXTNnF60BDDQzc41my3wcbu8qoaIpmI49Z9COfKoZwr_gver3KphHMmjYp3',
'Acj-QXTJBR8uAGpvs3NiPrsNnz3fcSkCDtUA_4J5FMM2XWZpKoH8C17l0ZvS',
'AW1b3qnSyDgLa6-gnhq_ub6WegLiyqQPK_4FcK9yqYRzJoN2dxqxbLtOFFc_',
'ATsNKGto5rapEdn2nBCh5xz8zBSgkEyNSaUTRi34F6BRnVXAtWDf4ll0o7g9',
'AfbA-9Yvs7UsDkSlERm0RPlTQSf9Fz-bjFtutWDf4ll0o5iTyKeKYVzrv9ww',
'ASYQaybfQ0X8fhQVwU7ktAlDcZetB2r8PEueJRDPEskkk8gDeJe60Qzb7mDg',
'AQs9uBt41iYZIQmG7E1xd8yMnKTwoBkxmbTj1n0I58qhnCVQBXCvcqmEcjuN',
'AWdRrN-08ooVNXXyqIvVq1AY8JA07DvzlcC_QjnUg_YdKIlEQbzLHqWQT8RJ',
'ATEHCsVmzDQvh2PUAmQ7JdqqRrbOHqPeT5JJpBNGLfgXOl8iW261YN_iWGuj',
'AS8ZFNesqlKdna2asH8dw8iAuEg81IW4HSiH6kG8yx6lkEE8SaQTRi34FhpR',
'Aaie4ZRpZb8O4ErPk2QCnpvtf52_0Qzm7jXgX2LZ9CMWvUaJCuHcaz5FsLiy',
'Aaqc54Ijh5HAyggJ5WMg4OWX_RtJGyjmIJ-iGTRjVv2IZ0SPHKt-hfAv8woE',
'ARUjpsFq4KCTs8eohtrnMRbeIhrKEsqvk8eteJe60Zbb_ztOX2LZ9CMWvXgn',
'Aaie4ZRpZb8O4ErPk3gCnpvtf52_0QpI7jXgX2LZ9CMWvUaJCuHcaz5Fscuy',
'AenfIk3OlOwnn6usekVzjSJC_p5Gtt3VR6oBfIveZVAPUgfK0wbtuNf6ERQb',
'AaudmHtYdga5wammjJbRl2ysPMSQwLmTOdSD9h0oh-pBvMWwpZBPkkmkEmAt',
'AYK0n-prb6n4AnCBfcR46I3P1YPhU4C6OFd6kcybrvWgHyw3tOPWfQjny4mc',
'AQk_gi2utExHP0tMmsRTLcLiHj5mVv21Z0ohHKt-hfAv8ieq86YNWPeaMbU7',
'AW9Z1JfsahLdXW3a8yBdA4hA-Ih8FMXdXWjHKoH8C17l0IF8ieRThm04VlGR',
'AY64s37XWw0EhuzdakuMDCHL2W9VD1TiZNMG7bjX-hFMGyDbIJ-iGTRjV9GI',
'AYy6vZAdOStynC6jFDDuqtchW-G7xTaEMmlEM-ZNmDfacSLVDtUA_4J5Fe42',
'AUp8x-IDJ3Fg6qgphtuAAAW3nTvpO86owL9COdSD9h0oh-TvvMsepZBPkhKk',
'AaWTdrE6EFCDg3f4lRB3gQYusmra4lrUo5c9yKeKYcbrr8uebzJpRDPmTao3',
'AWpcJ8Ljx9GACkjJptTgoCXXvdsJ2-4I4F9i2fQjFr1IJwRP3Gs-RbDvsrXE',
'AYy6vZAdOStynC6jFHXuqtchW-G7xTaEMmlEM-ZNmDfacSLVDtUA_4J5FfE2',
'AWdRrN-08ooVNXXyq0_Vq1AY8JA07D0llcC_QjnUg_YdKIlEQbzLHqWQTqZJ',
'AefRLF80cgqVtfVyK-NVK9CYcBC0bLjuFUE_wrlUA-yduQnEwTxLniUQzyHJ',
'AamfYo2O1Czn3-tsOcozTWKCvl4GdptDB2rBPEueJRDPEseKk8ateJe60DXb',
'ASkf4g0OVKxnX2vsuWqzzeICPt6G9h6Ih-tBvMsepQpPg0cKE0Yt-Bc6Ubhb',
'Acr8R2KDp_HgaiipBtcAgIU3Hbtpu04oQD_CuVQDdp2oB2RvPEueJRDPEpYk',
'AYi-gbSJRV_uQKovcOki_vtNX_2fMerQzpXAv0I51IP2HSYp6kG8yx6lkXGS',
'AeHXOpWWHER_d7PEMaDrFeoa9qb-jlNrfwL5lEO23ehHqg_Si95lUA9SCFvT',
'ASAWeVyxbZfGONJnyMQ6piPF9yX3KQIYpg1Y95ox7DvOlc4RQjnUg_YdKcbq',
'AT8JJEf8WoINbV1qQ9ltk3hQyBjMJJUtrXiXutEM2-414FHM2fQjFr1IJkjh',
'AV5oAy4ni310ltxturJcnJHbqf-lHyRytOPWfQjnyqGcK_CrcK9yqYRzJ87Y',
'AYawi8b_I2VcXvT1IuMElOmj0XcN58xKnCv-BXCvcqmEcygj2HcasWy7T1FA',
'AYWzFtFacPBjY1dYdKIX4WaOksq6Qj8_g_YdKIfqQbzLHqs-T5JJpBNGLLIX',
'AWtd2LsYtkZ5AelmTieRV6zs_IRQgH8_-ZRDtt3oR6oBfIVwZVAPUglk02Lt',
'AXlP8j2eBJxX79v8iBzD3dKSju5WhmvTV3qRzJuu9aAfIpca49Z9COfKoNAr',
'AfDGyQyBXQc2yAL3GWrKNpPVx7VHOdcj9hwoh-pBvFEetJ7hkkmkE0Yt-CA6',
'AaKU_8rLDwkYohAhn99YiK1v9SMB86DmWPeaMew7zpXAv0yX1IP2HSiH6xC8',
'AaudmHtYdga5wammjiXRl2ysPMSQwL9_OdSD9h0oh-pBvMWwpZBPkkmkEyAt',
'AVRi5Yg18fP6BGZLHaU2wk-JI5nDrX58utEM2-414F9i2fqNFr1IJwrh3Tg-',
'AXNFwHNwLu4hqeFOlsAZz-QUBHyYqAGBwTxLniUQzxLJJJ1orXiXutEM2ro1',
'ATIEj7qbv7kI8oBxr-Mo2F2_hXMRwzX9aMYqgfwLXn_Qntwn5FOGbThXeqnM',
'AZOlIFPQzk5ByYHutn95b4S0JBy4SCHh4dxrPkWw77LpxL3IzRi3WvGs-ttV',
'Ab-JpMd82gKN7d3qwgztE_jQSJhMpBWtLfgXOlGMW261YNFMWXSjlj3IptJh',
'AQs9uBt41iYZIQmG7uJxd8yMnKTwoB8fmbTj1n0I58qhnCVQBXCvcqmEc0-N',
'AW5YU553u63kZsw9S3qsbAGruc81bzSCRDPmTZg32nEsewB7AP-CeRTDNwFo',
'Ab2LrtmiuCj7-x-wbF7Pye4myhKyWvdH-45VgH8C-ZRDttNGR6oBfIveZA4P',
'AbyKLeANybsCjP4TwgXeGmcRi1FrtWY04ll0o5Y9yKeKYVJFvsUwbzJpRVfm',
'Aaie4ZRpZb8O4ErPlvMCnpvtf52_0Qow7jXgX2LZ9CMWvUaJCuHcaz5FsYmy',
'AcfxzH9UUqp1FdXSDd51izB4UHCUzJ1F9aAfIpm049Z9COlkoZwr_gVwrhWp',
'AQg-ATQJxd9uwCqv9vGifnvN330fsWpQThVAP8K5VAN2naapasE8S54lEacS',
'AbqMN_Jzt8FwmjjZcEcwsBVnDevZaziusO-y6cSzZs0Yt1RfrPuOVYB_A5OU',
'Ae3bXilSSLiL6y8gGzE_OT4W-oJiSiEhq36F8C_yKQTzpgP295ox7DvOla-_',
'AZmvUh1-JPx3D_ucr14jffIyro52JoszdxqxbLtOFUA_wrf6A3adqAdqwFNL',
'AQE3mnV2PKSfl1NkV7DLtYq6FkYeLnPLn6IZNGNW_YhnSi-yq36F8C_yKHXz',
'AX1L7hli-Gi7O19wK7uPiS5mitJyGrLMu08VQD_Cuc4DZ5MGB2rBPEueJS3P',
'AS0bHumSCHjLq-9gWzN_ef7WOsKiimFh677FMG8yaUQz5kM2N9pxLHsO1XH_',
'AbaAOxbv8_XsToRl1NN0BDmTAee91_z6TBsudSCfohk0Y1hTiGdKIRyrf_Pw',
'AdzqjcDt6RsiLJ6z4jk-ugexq_GLVYaUAvmUQ7bd6EeqAXIl3mVQD1IJZasG',
'AW5YU553u63kZsw9TaisbAGruc81bzJURDPmTZg32nEsewB7AP-CeRTDNi5o',
'AT0LLlkiOKh7e58w6iBPSW6mSpIy2nfHew7VAP-CeRTDNlPGxyqB_Ate5KqP',
'ATsNKGto5rapEdn2mDuh5xz8zBSgkEl5SaQTRi34FzpRjFXAtWDf4ll0ou09',
'AdTiZQi1cXN6hObLm722Qs8JoxlDLf78OlGMW261YN_iWXoNlj3Ip4phXZa-',
'AQI0H2rr7yl4gvAB-cj4aA1PVQNh0wVNuNb6EUwbLu8gjqy3NGNW_YhnSh4c',
'Aa6YE163e20kJox9jarsrMFr-Q91r3KUhHMmjdh3GrFsu0C7QD_CuVQDduio',
'ARYgW7aPUxVMrmRFNb6U5JnzYccdt1warPuOVYB_AvmUQ7hz6EeqAXyL3-dQ',
'AfHHSgUmDHTvx6OUxuL75RrqBnaO3mO7D1IJZNMG7bjX-h_iGy51IJ-iGLBj',
'AURy1RjlwcNKtHZ7i1Um8t85E8kzXWtnKoD8C17l0BXSmOr9hm04V3qRzNuu',
'Ae7Y0x73Oy1k5ky9zaws7IErOU-177LUxLNmzRi3WvGs-4D7gH8C-ZRDtqro',
'AfHHSgUmDHTvx6OUxjn75RrqBnaO3mO7D1IJZNMG7bjX-h_iGy51IJ-iGL1j',
'ARAmKexhfWdWaCKXP14q1rN151Vn2fLIFr1IJwrh3Gs-Rb5BsunEs2bNGT1a',
'AQ44M_5X242EBmxd7VcMjKFLWe_Vj9Ri5FOGbThXepHMm6BboB8imbTj1_YI',
'AYawi8b_I2VcXvT1JaIElOmj0XcN58kBnCr-BXCvcjOEYigj2HcasWy7TlRA',
'Ae_ZVBds6pJd3e1adGfdgwjAeAj8lEVd3ehHqgF8i95lUAH8CWTTBu241nUR',
'Ae3bXilSSLiL6y8gGm4_OT4W-oJiSif3q36F8C_yKQTzpgP295ox7DvOlFC_',
'AevdWDuYNsb5gWnmyFUR1yxsfATQAPlpeRTDNl1oxyqB_AXw5dCP0onkUhdt',
'AQo8ByLDZ7EgKujpQX5AwEX3Xfup-4i-gH8C-ZRDtt3oR6SvfIveZVAPU5tk',
'Acj-QXTJBR8uAGpvt5NiPrsNnz3fcS_bDtQA_4J5FFk2TGZpKoH8C17l0M3S',
'Aeza3TA9mUvS_I6DcBUOircBu8EbpZakkkmkE0Yt-Bc6UYL1brVg3-JZdTWW',
'Aercp0JjR1EAishJIhpgIKVXPVuJW2heYN_iWXSjlj3Ip4TPXOu-xTBvM_5E',
'AcfxzH9UUqp1FdXSD-91izB4UHCUzJ1F9aAfIpm049Z9COlkoZwr_gVwruqp',
'AebQq2afg4W8vlTVhvSkdEmDMVdtxyxq_Ate5dCP0onkU4jDOFd6kcybr2yg',
'AQs9uBt41iYZIQmG6w9xd8yMnKTwoByCmbXj1n0I51ChjSVQBXCvcqmEc2WN',
'AQk_gi2utExHP0tMnWpTLcLiHj5mVvtjZ0ohHKt-hfAv8ieq86YNWPeaMHE7',
'Ac_59DeMyjI9vc26V2j942igWGjc9CMrvUgnCuHcaz5FsOEc6cSzZs0YtyTx',
'AeHXOpWWHER_d7PENQ7rFeoa9qb-jlNrfwL5lEO23ehHqg_Si95lUA9SCMXT',
'AU17fslyKNjry48AefZfGZ52WmLCKoJcC1_l0I_SiX5Tl2OWV3qRzJuu9eQf',
'AQcxjD-UEmq11ZUST6S1y_A4kLDUDN0FNeBfYtn0Ixa9SCmk4dxrPkWw7hHp',
'Ae_ZVBds6pJd3e1ady_dgwjAeAj8lEOL3ehHqgF8i95lUAH8CWTTBu2414UR',
'AaKU_8rLDwkYohAhmi9YiK1v9SMB86DmWPeaMew7zpXAv0yX1IP2HSiH6-W8',
'AX9J5Ac8GkJNLR2qh_qt0zgQCFgMZNXt7bjX-hFMGy51IJEMGTRjVv2IZu8h',
'AUx6_dDdeWsy3G5iVLCuahdhG6F7hfOP8igE86YNWG2aIOKVzpXAv0I51MT2',
'AdvtCMtIBpZJMXkXvx8BB7ycbDRAsOlZ6cSzZs0Yt1rxrPUgVYB_AvmUQgXd',
'AejeoVSpJX9OoAoOUFZC3lutv93_EUwmLnUgn6IZNGNW_YbJSiEcq36F8Kry',
'Aa6YE163e20kJox8CoXsrMFr-Q91r3RChHMmjdh3GrFsu0C7QD_CuVQDdyio',
'AQg-ATQJxd9uwCqucNeifnvN330fsWyGThVAP8K5VAN2naapasE8S54lEEkS',
'Ae3bXilSSLiL6y8hnSM_OT4W-oJiSif3q36F8C_yKQTzpgP295ox7DvOlHe_',
'AY64s37XWw0Ehuzc6s2MDCHL2W9VD1GpZNIG7bjX-otMCiDbIJ-iGTRjVrWI',
'AbqMN_Jzt8FwmjjY9rAwsBVnDevZaziusO-y6cSzZs0Yt1RfrPuOVYB_A0GU',
'ASgeYRTp5T-OYMpOkNSCHhtt_x0_UYxmbrVg3-JZdKOWPcYJimFc677FMOgy',
'AY-5NHdMCnL9_Q17k1G9o6jgGCictOU9fQjnyqGcK_4FcKHcqYRzJo3YdqOx',
'AUt9eNu4luZZ4cnHr9ixt4xM3OQw4FmJ2fQjFr1IJwrh3GWQRbDvsunEstzN',
'AUh-wfRJhZ-ugOrusFXivjuNH71f8azGjlWAfwL5lEO23ebpqgF8i95lUIdS',
'Ac74cz4XG81ERqwcKjvMTOGLGa-VT5SipBNGLfgXOlGMW2AbYN_iWXSjl4bI',
'AYq8h6JD5zGgqmhoRozAQMV33Xspewg-AP-CeRTDNl1oxyQv_Ate5dCP0zXk',
'AdDmaSwhvacWqGJWeFbqlvO1pxUnmbdD1nwI58qhnLH-FH4BcqmEcyaN2D4a',
'AZmvUh1-JPx3D_udKTEjffIyro52JoszdxqxbLtOFUA_wrf6A3adqAdqwIFL',
'AYm_Aq0uNMzHv8vNmXTTrUJinr7m1n0158qhnCv-BXCvcqcqcyaN2HcaseW7',
'AYu9OJv4VqaZoYkH72Lx90wMHCRwIJlPGTRjVv2IZ0ohHKXQhfAv8ikE8hgN',
'AUdxTP_U0ir1lVVTC7n1C7D40PAUTB3DdSCfohk0Y1b9iGnkIRyrfoXwLk0p',
'Acr8R2KDp_HgaiiohosAgIU3Hbtpu04oQD_CuVQDdp2oB2RvPEueJRDPEkMk',
'AevdWDuYNsb5gWnnT2AR1yxsfATQAPlveRTDNl1oxyqB_AXw5dCP0onkUkZt',
'AaeRbJ_0skpV9TUza78V6xDYMNB0LH3j1QD_gnkUwzZdaMmEgfwLXuXQjhOJ',
'Aaie4ZRpZb8O4ErOEcoCnpvtf52_0Q937jTgX2LZ9LkWrEaJCuHcaz5FsKWy',
'AbeBvA8EonrFRSUD-p9lu4CoQKAEfI0zZVAPUglk0wbtuNlUEUwbLnUgnmAZ',
'AQw6PRCduavyHK4iFatuKleh22E7RbDSsunEs2bNGLda8aJVjlWAfwL5lMi2',
'AWtd2LsYtkZ5Aelnzg6RV6zs_IRQgHnv-ZRDtt3oR6oBfIVwZVAPUglk0sXt',
'AScR7B90MsrVdbWz6t2Va5BYsFD0rP1jVYB_AvmUQ7bd6EkEAXyL3mVQDpYJ',
'Acv9-Fs4FmbZYUlHLs0xNwzMXGSwYN_cWXSjlj3Ip4phXOUQxTBvMmlEM2pN',
'Aaqc54Ijh5HAyggIZ-Yg4OWX_RtJGyiYIJ-iGTRjVv2IZ0SPHKt-hfAv8-wE',
'AYexDL8Ukuo1VRWTSpM1S3C4EDBUjF2DtWDf4ll0o5Y9yKkkYVzrvsUwbvRp',
'AQs9uBt41iYZIQmHbgdxd8yMnKTwoByOmbXj1n0I51ChjSVQBXCvcqmEc22N',
'AZag2zYP05XMLuTEMygUZBlz4UedN9ycLHsO1QD_gnkUwzjzaMcqgfwLXyLQ',
'AQw6PRCduavyHK4iFe5uKleh22E7RbDRsunEs2bNGLda8aJVjlWAfwL5lM62',
'ASkf4g0OVKxnX2vtOJ2zzeICPt6G9hvFh-pBvMsepZBPkkcKE0Yt-Bc6UERb',
'AQYwC0Z_o-Xc3nR0I8qEFGkjUfeNZ0zMHKt-hfAv8ikE86ijWPeaMew7z1zA',
'ASIUf0pLj4mYIpCgn1rYCC3vdaOBcybE2HcasWy7ThVAP8wXVAN2nagHak88',
'AZyqzQCtKVvibN5yJfz-ekfxa7FLFUbFwrlUA3adqAdqwTLlniUQzxLJJVnG',
'AXlP8j2eBJxX79v9CC3D3dKSju5WhmvCV3qRzJuu9aAfIpca49Z9COfKoFcr',
'AUt9eNu4luZZ4cnHrgOxt4xM3OQw4FzN2fUjFr1IJ5DhzWWQRbDvsunEsyrN',
'AYi-gbSJRV_uQKou8aoi_vtNX_2fMerBzpXAv0I51IP2HSYp6kG8yx6lkYOS',
'AWNVsAMgPr6x2fF_hn8J_3RE9KwIWPfTMew7zpXAv0I51I1YHSiH6kG8y5Gl',
'ARstyIuIxlaJ8TlX_gdBR3xcrHSA8CkIKQTzpg1Y95ox7DVglcC_QjnUgjsd',
'AfjO8cT51a_-cDre4chSrst9z62PYVoRvsUwbzJpRDPmTZaZ2nEsew7VATGC',
'AaSS9biFoeOqlNZabRhG0r8Zc6mTPcjuimFc677FMG8yaUqd5k2YN9pxLOsO',
'AXtN6Cuopnbp0Zk3XsXhJ9y8DFTg0IkoieRThm04V3qRzJUA9aAfIpm04hl9',
'AVhuEWSZtc9eUJq-QZbyjqtdL43vQboxHqWQT5JJpBNGLfa5OlGMW261YQ_i',
'Aa6YE163e20kJox8C1DsrMFr-Q91r3EGhHImjdh3GitsqkC7QD_CuVQDdtCo',
'AWdRrN-08ooVNXXzKrvVq1AY8JA07D00lcC_QjnUg_YdKIlEQbzLHqWQTkNJ',
'AeXTNnF60BDDQzc5VLG3wcbu8qoaIpn949Z9COfKoZwr_gver3KphHMmjUl3',
'AfrM97Kzd4GwWvgYN6hw8NUnTSsZq3h_8C_yKQTzpg1Y95Sf7DvOlcC_Q-vU',
'AdfhHO_kQtrl5cWjGvlFW6DIYEAkHK2EhfAv8ikE86YNWPk0Mew7zpXAvpE5',
'ASYQaybfQ0X8fhQUQ9bktAlDcZetB2qIPEueJRDPEskkk8gDeJe60Qzb7qfg',
'AVpsF1JT16EQulj4l6qQ0LUHrQt5i9ifUA9SCWTTBu241_S_TBsudSCfo800',
'ATcBPI-EIvpFxaWDev_lOwAowCCE_A2k5dCP0onkU4ZtOFnUkcybrvWgHveZ',
'AREnquWGLNQPZ0M1YKXbhToKJhaufoZfL_MpBPOmDcL3iz9CO86VwL9COZqD',
'AUZwywa_Y6UcnjS0YyTEVCnjkTfNp4ybXOu-xTBvMmlEM-jjmDfacSx7DwMA',
'AWheIdQppf_OIIqO1o7CXtstP11_kczSrvWgHyKZtOPWfQZJyqGcK_4FcDxy',
'AXlP8j2eBJxX79v9D1nD3dKSju5WhmvDV3qRzJuu9aAfIpca49Z9COfKoEsr',
'AVZgG3bPE9WMbiSE9CbUJFmzoQdd95zK7DvOlcC_QjnUg_izKIfqQbzLH32Q',
'AamfYo2O1Czn3-ttv2szTWKCvl4Gdp3hB2rBPEueJRDPEseKk8ateJe60Zjb',
'AdnvEt2-5Ly3z7vdbxtjvbLy7s62Zsvjt1rxrPuOVYB_Avc6Q7bd6EeqAKWL',
'AbaAOxbv8_XsToRkVCh0BDmTAee91_zqTBsudSCfohk0Y1hTiGdKIRyrf1_w',
'AXVDxmEKQMDzk6eJY2UHEfY-gvoq8iqr86cNWPeaMXY735tuv0I51IP2HWeH',
'AcXz1pGaMLCjIxeZM-1XISZO0gr6gn_vwzZdaMcqgfwLXut-j9KJ5FOGbONX',
'Aercp0JjR1EAishIoFBgIKVXPVuJW278YN_iWXSjlj3Ip4TPXOu-xTBvMvxE',
'AVhuEWSZtc9eUJq-RnryjqtdL43vQbowHqWQT5JJpBNGLfa5OlGMW261YQPi',
'ATUDBqHKgACz0-dJI0_H0TZ-Qrrqsu8_s2bNGLda8az7jlsufwL5lEO23DVH',
'ASsdGPvY9oY5QSkniblRF-wsvEQQQD-LuVQDdp2oB2rBPEUwJRDPEskkk1Ct',
'AbiOMQS5Fe--sHqepngSbgu9j21PIRpQfoXwL_IpBPOmDVZZmjHsO86VwWFC',
'AZWjJkHqYCATM0cpg4lnsZZeoppKkk9fE0Yt-Bc6UYxbbrvO3-JZdKOWPBen',
'AdjukeQZNU_e0Bo-xtJyDivdrw1vwT_kniQQzxLJJAnGvHY5utEM2-414A9i',
'AaSS9biFoeOqlNZaasZG0r8Zc6mTPc5cimFc677FMG8yaUqd5k2YN9pxLZsO',
'AWxaXbC9GctSfA4CcuKOCjeBO0GbJRCGEskkk8ateJe60QJ17jXgX2LZ9LQW',
'ATcBPI-EIvpFxaWDfWvlOwAowCCE_A2l5dCP0onkU4ZtOFnUkcybrvWgHsOZ',
'ARQiJcj1MTO6RKYKWmT2go_J41mDbT6sepHMm671oB8imbpN1n0I58qhncn-',
'AUx6_dDdeWsy3G5iUmCuahdhG6F7hfBl8ikE86YNWPeaMeKVzpXAv0I51Bv2',
'AZehXC-kghqlJQVj3WkFG-AIIADk3G3FRbDvsunEs2bNGLn08az7jlWAfuH5',
'AXRCRWiVkVMapAbquloWYm8pQznjTZ7M2nEsew7VAP-CeRptNl1oxyqB_e9e',
'ATsNKGto5rapEdn3GY-h5xz8zBSgkEw9SaUTRi34F6BRnVXAtWDf4ll0o8c9',
'AYO1EOOA3h7ReZEfoT9pnxTkFEwo-BHBUYxbbrVg3-JZdK04PcinimFc6lvF',
'AY27Pomy6Jgri09BO3mfWV42mqICasF2S54lEM8SySSTxqPWl7rRDNvuNXlf',
'ARYgW7aPUxVMrmREtFSU5JnzYccdt1wKrPuOVYB_AvmUQ7hz6EeqAXyL34NQ',
'AfPFQPPwrm6hKWHPkX2ZT2SUhPwYKIERQbzLHqWQT5JJpB3oLfgXOlGMWom1',
'Ac74cz4XG81ERqwcLF7MTOGLGa-VT5IDpBNGLfgXOlGMW2AbYN_iWXSjlqfI',
'AXZAe1avMzWsjsQkFBY0xHnTwad9l7wqDNvuNeBfYtn0IxgTSCcK4dxrP62w',
'AVNlYJOQDo4BCcGv8Xs5L8T05Nx4COExoZwr_gVwr3KphH2Ijdh3GrFsuqcV',
'AZ6ow-5nSz20VpysfHSc3FGb6T_lX2F29CIWvUgnCnvcejDrsO-y6cSzZp8Y',
'AWJUPwqLT0nY4lDg2IAYSO2vtePBs2A2GLda8az7jlWAfwxXlEO23ehHq-t8',
'Aa6YE163e20kJox8DBDsrMFr-Q91r3LihHMmjdh3GrFsu0C7QD_CuVQDdgao',
'AfXDRuGKwEBzEycJ4z2HkXa-Anqqcq9_cyaN2HcasWy7ThvuP8K5VAN2nEMH',
'AdLkbxr735mokiCQyGKI-P1fJZOx49CGCOfKoZwr_gVwr3wHhHMmjdh3G11s',
'AfDGyQyBXQc2yAL2nyTKNpPVx7VHOdTI9h0oh-pBvMsepZ7hkkmkE0Yt-Is6',
'AVZgG3bPE9WMbiSE9TrUJFmzoQdd95zK7DvOlcC_QjnUg_izKIfqQbzLH0iQ',
'ARIkL9o7n1noUuDQCcPIOL0fZdPxIxBGSCcK4dxrPkWw77xHxLNmzRi3Wx-s',
'AQI0H2rr7yl4gvAAeZT4aA1PVQNh0wVCuNb6EUwbLu8gjqy3NGNW_YhnSnIc',
'AUJ03yorr-m4QrBAuew4qM0PlUOhE0DW-Bc6UYxbbrVg3-z3dKOWPcini45c',
'AdXj5gEqIOBT8wdpwhmn8VYe4tqK0o8fU4ZtOFd6kcybrvsOHyKZtOPWfPjn',
'ATEHCsVmzDQvh2PVhsU7JdqqRrbOHqXbT5JJpBNGLfgXOl8iW261YN_iWemj',
'AZGnKmUGrFSP58O15uBbBbqKppYu_gOLr3KphHMmjdh3Gr_Cu04VQD_CuKUD',
'ATUDBqHKgACz0-dJIlvH0TZ-Qrrqsu8_s2bNGLda8az7jlsufwL5lEO23BpH',
'AXJET3rbf3lIskCwaepoGB1_xbNRA3bWqAdqwTxLniUQzxxnJJPGrXiXuk8M',
'AfHHSgUmDHTvx6OVRuL75RrqBnaO3mOrD1IJZNMG7bjX-h_iGy51IJ-iGMdj',
'AWVTtvH6UJBDw7e50qE3QUZuciqaohqbY1f9iGdKIYarb4teL_IpBPOmDQz3',
'ASEX-lXW3AS_N3MF9sUrVaraNuY-zpM7v0I51IP2HSiH6k8Syx6lkE-SSFAT',
'AbSCBSjVURNaZMYq-2pWoi_pg3kjjd6MGrFsu04VQD_CuVqtdp2oB2rBPb6e',
'AbOFgDOw7q5haaGPUO9ZD6TURLzY6EfhAXyL3mVQD1IJZN2o7bjX-hFMG7F1',
'AXBGSYwB3Ye2SIJ2H8NKthNVRzXHuVL4dp2oB2rBPEueJR5hEskkk8ateWG6',
'ARQiJcj1MTO6RKYKW2j2go_J41mDbT6sepHMm671oB8imbpN1n0I58qhndz-',
'AfTCxegVEdOaJIZqO8iW4u-pw7ljzRj8WvGs-45VgH8C-Zrttt3oR6oBfCve',
'AdDmaSwhvacWqGJWfwHqlvO1pxUnmbIY1n0I58qhnCv-BX4BcqmEcyaN2Y8a',
'Acj-QXTJBR8uAGpuN_5iPrsNnz3fcS_UDtQA_4J5FFk2TGZpKoH8C17l0NrS',
'AQA2GXzRTTemmDLGLx7aBgOl14XXieKohm04V3qRzJuu9a6xIpm049Z9CR7K',
'AZOlIFPQzk5ByYHvMEt5b4S0JBy4SCHx4dxrPkWw77LpxL3IzRi3WvGs-nRV',
'ATUDBqHKgACz0-dJIqHH0TZ-QrrqsumPs2bNGLda8az7jlsufwL5lEO23UlH',
'AS4Yk943--2kpgz8jchsLEHreY_1L_TSBPOmDVj3mjHsO8A7wL9COdSD9-Yo',
'AfPFQPPwrm6hKWHPkAmZT2SUhPwYKIERQbzLHqWQT5JJpB3oLfgXOlGMWpK1',
]
| 66.33871 | 67 | 0.868563 | 818 | 20,565 | 21.513447 | 0.9022 | 0.001534 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.145625 | 0.074058 | 20,565 | 309 | 68 | 66.553398 | 0.778542 | 0.002626 | 0 | 0 | 0 | 0 | 0.880847 | 0.880847 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
5a03d2f84e8a24c78629df8d2ec95c21181260fc | 35,517 | py | Python | tfrt/rt_lib.py | henrysky/simple_tf_raytracing | cba18dd544436f1ee44f1e9d064fd3e9e02e7dcb | [
"MIT"
] | null | null | null | tfrt/rt_lib.py | henrysky/simple_tf_raytracing | cba18dd544436f1ee44f1e9d064fd3e9e02e7dcb | [
"MIT"
] | null | null | null | tfrt/rt_lib.py | henrysky/simple_tf_raytracing | cba18dd544436f1ee44f1e9d064fd3e9e02e7dcb | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from copy import deepcopy
import numpy as np
import tensorflow as tf
# source: http://geomalgorithms.com/a06-_intersect-2.html
# source: https://www.erikrotteveel.com/python/three-dimensional-ray-tracing-in-python/
gpu_phy_devices = tf.config.list_physical_devices('GPU')
try:
for gpu in gpu_phy_devices:
tf.config.experimental.set_memory_growth(gpu, True)
except RuntimeError:
pass
faraway = 99999 # faraway distance
precision = tf.float64 # default precision
pi = tf.constant(np.pi, dtype=precision)
# for numerical stability epsilon
if precision == tf.float32:
epsilon = tf.constant(1.e-07, precision)
elif precision == tf.float64:
epsilon = tf.constant(1.e-15, precision)
def set_precision(p):
global precision
precision = p
def mag(tensor):
"""
Calculate magnitude of the vector, return scalar tensor
"""
if tf.equal(tensor.get_shape().rank, 1):
_mag = tf.sqrt(tf.tensordot(tensor, tensor, 1))
else:
_mag = tf.sqrt(tf.reduce_sum(tensor*tensor, 1))
return _mag
def ray_reflection(rays, normal):
"""
Calculate reflection of rays `rays` with normal `normal`
`
:param rays: Rays directional vector, shape Nx3
:type rays: Ray
:param normal: normal vector
:type normal: tf.Tensor
"""
ray_direction = rays.p1 - tf.multiply(normal, tf.expand_dims(tf.reduce_sum(normal * rays.p1, 1), 1)) * 2.
# if directional vector small enough, then assume 0.
ray_direction = tf.where(tf.greater(tf.abs(ray_direction), epsilon), ray_direction, tf.zeros_like(ray_direction))
return ray_direction
def norm(tensor):
"""
Calculate norm of the vector, return normalized vector
"""
_mag = mag(tensor)
if tf.equal(tensor.get_shape().rank, 1):
return tensor * (1.0 / tf.where(tf.less_equal(_mag, epsilon), tf.ones_like(_mag), _mag))
else:
return tensor * tf.expand_dims(1.0 / tf.where(tf.less_equal(_mag, epsilon), tf.ones_like(_mag), _mag), 1)
def tile_vector(tensor, num):
return tf.tile(tf.expand_dims(tensor, 0), [num, 1])
def polar(tensor):
_norm = norm(tensor)
phi, theta = tf.math.atan2((_norm[:, 0]+epsilon), _norm[:, 1]), tf.math.acos(_norm[:, 2])
return tf.where(tf.less(phi, 0.), 2*pi+phi, phi), theta
class Ray:
def __init__(self, p0, p1, intensity, interact_num):
"""
Basic Ray class, originating from `p0` with a directional vector of `p1
`
:param p0: 3D vectors for the origins of rays
:type p0: tf.Tensor
:param p1: 3D vectors for the origins of rays
:type p1: tf.Tensor
:param intensity: Initial intensity of rays
:type intensity: tf.Tensor
:param interact_num: Initial number of interaction experienced by rays
:type interact_num: tf.Tensor
"""
self.p0 = p0 # ray origins
self.p1 = p1 # ray direction
self.intensity = intensity
self.interact_num = interact_num
p0_rows, p0_columns = p0.get_shape()
tf.debugging.assert_equal(tf.size(self.p0), tf.size(self.p1), message="Rays shape not equal")
tf.debugging.assert_equal(p0_rows, tf.size(self.intensity), message="Rays shape not equal")
tf.debugging.assert_equal(p0_rows, tf.size(self.interact_num), message="Rays shape not equal")
def __getitem__(self, key):
return Ray(self.p0[key], self.p1[key], self.intensity[key], self.interact_num[key])
def __setitem__(self, key, value):
if key.dtype == tf.bool:
key_3 = tf.concat([tf.expand_dims(key, 1), tf.expand_dims(key, 1), tf.expand_dims(key, 1)], 1)
self.p0 = tf.where(key_3, value.p0, self.p0)
self.p1 = tf.where(key_3, value.p1, self.p1)
self.intensity = tf.where(key, value.intensity, self.intensity)
self.interact_num = tf.where(key, value.interact_num, self.interact_num)
else:
self.p0[key] = value.p0
self.p1[key] = value.p1
self.intensity[key] = value.intensity
self.interact_num[key] = value.interact_num
def size(self):
num_rays = tf.size(self.p0) // 3
return num_rays
def copy(self):
return deepcopy(self)
class Surface(ABC):
"""
Basic class for surfaces
"""
def __init__(self):
pass
@abstractmethod
def vertices(self):
pass
class Triangle(Surface):
def __init__(self, v0, v1, v2, reflectivity=1.):
"""
A triangle with vertices `v0`, `v1`, `v2` and `reflectivity`
:param v0: 3D vectors for a vertex
:type v0: tf.Tensor
:param v1: 3D vectors for a vertex
:type v1: tf.Tensor
:param v2: 3D vectors for a vertex
:type v2: tf.Tensor
:param reflectivity: Reflectivity of the surface
:type reflectivity: float
"""
super().__init__()
self.v0 = tf.cast(v0, precision)
self.v1 = tf.cast(v1, precision)
self.v2 = tf.cast(v2, precision)
self.u = self.v1 - self.v0
self.v = self.v2 - self.v0
self.reflectivity = reflectivity
self.normal = norm(tf.linalg.cross(self.u, self.v))
@property
def vertices(self):
return tf.stack([self.v0, self.v1, self.v2])
def intersect(self, rays):
num_rays = rays.size()
tiled_v = tile_vector(self.v, num_rays)
tiled_u = tile_vector(self.u, num_rays)
tiled_normal = tile_vector(self.normal, num_rays)
b = tf.reduce_sum(tiled_normal*rays.p1, 1)
a = tf.reduce_sum(tiled_normal*(self.v0 - rays.p0), 1)
# check if the ray is close enough to be parallel or close enough to lie in the plane
cond_0_1 = tf.greater(tf.abs(b), epsilon)
cond_0_2 = tf.greater(tf.abs(a), epsilon)
cond_0 = tf.logical_and(cond_0_1, cond_0_2)
rI = tf.expand_dims(tf.where(tf.logical_or(cond_0, tf.less(a/b, 0.)), a/b, tf.zeros_like(a)), -1)
rI = tf.where(tf.greater(tf.abs(rI), epsilon), rI, tf.zeros_like(rI))
p_intersect = rays.p0 + rays.p1 * rI
w = p_intersect - self.v0 # p0 + rI * p1 - v0
wv_dot = tf.reduce_sum(w*tiled_v, 1)
wu_dot = tf.reduce_sum(w*tiled_u, 1)
uv_dot = tf.tensordot(self.u, self.v, 1)
uu_dot = tf.tensordot(self.u, self.u, 1)
vv_dot = tf.tensordot(self.v, self.v, 1)
denom = uv_dot * uv_dot - uu_dot * vv_dot
si = (uv_dot * wv_dot - vv_dot * wu_dot) / denom
ti = (uv_dot * wu_dot - uu_dot * wv_dot) / denom
ray_direction = ray_reflection(rays, tiled_normal)
cond_1 = tf.less_equal(tf.squeeze(rI), 0.)
cond_2 = tf.less(si, 0.)
cond_3 = tf.greater(si, 1.)
cond_4 = tf.less(ti, 0.)
cond_5 = tf.greater(si + ti, 1.)
no_interaction_idx = tf.logical_or(tf.logical_or(tf.logical_or(tf.logical_or(cond_1, cond_2), cond_3), cond_4), cond_5)
no_interaction_idx_3 = tf.concat([tf.expand_dims(no_interaction_idx, 1), tf.expand_dims(no_interaction_idx, 1), tf.expand_dims(no_interaction_idx, 1)], 1)
_p_intersect = tf.where(no_interaction_idx_3, rays.p0, p_intersect)
ray_direction = tf.where(no_interaction_idx_3, rays.p1, ray_direction)
new_interact_num = tf.where(no_interaction_idx, rays.interact_num, rays.interact_num+1)
new_intensity = tf.where(no_interaction_idx, rays.intensity, rays.intensity*self.reflectivity)
return Ray(_p_intersect, ray_direction, intensity=new_intensity, interact_num=new_interact_num)
class Plane(Surface):
def __init__(self, v0, v1, v2, v3, reflectivity=1.):
"""
A plane with vertices `v0`, `v1`, `v2` and `reflectivity`
:param v0: 3D vectors for a vertex
:type v0: tf.Tensor
:param v1: 3D vectors for a vertex
:type v1: tf.Tensor
:param v2: 3D vectors for a vertex
:type v2: tf.Tensor
:param v3: 3D vectors for a vertex
:type v3: tf.Tensor
:param reflectivity: Reflectivity of the surface
:type reflectivity: tf.Tensor
"""
super().__init__()
self.v0 = tf.cast(v0, precision)
self.v1 = tf.cast(v1, precision)
self.v2 = tf.cast(v2, precision)
self.v3 = tf.cast(v3, precision)
self.u = self.v1 - self.v0
self.v = self.v3 - self.v0
self.reflectivity = reflectivity
self.normal = norm(tf.linalg.cross(self.u, self.v))
@property
def vertices(self):
return tf.stack([self.v0, self.v1, self.v2, self.v3])
def intersect(self, rays):
num_rays = rays.size()
tiled_v = tile_vector(self.v, num_rays)
tiled_u = tile_vector(self.u, num_rays)
tiled_normal = tile_vector(self.normal, num_rays)
b = tf.reduce_sum(tiled_normal*rays.p1, 1)
a = tf.reduce_sum(tiled_normal*(self.v0 - rays.p0), 1)
# check if the ray is close enough to be parallel or close enough to lie in the plane
cond_0_1 = tf.greater(tf.abs(b), epsilon)
cond_0_2 = tf.greater(tf.abs(a), epsilon)
cond_0 = tf.logical_and(cond_0_1, cond_0_2)
rI = tf.expand_dims(tf.where(tf.logical_or(cond_0, tf.less(a/b, 0.)), a/b, tf.zeros_like(a)), -1)
p_intersect = rays.p0 + rays.p1 * rI
w = p_intersect - self.v0 # p0 + rI * p1 - v0
wv_dot = tf.reduce_sum(w*tiled_v, 1)
wu_dot = tf.reduce_sum(w*tiled_u, 1)
uv_dot = tf.tensordot(self.u, self.v, 1)
uu_dot = tf.tensordot(self.u, self.u, 1)
vv_dot = tf.tensordot(self.v, self.v, 1)
denom = uv_dot * uv_dot - uu_dot * vv_dot
si = (uv_dot * wv_dot - vv_dot * wu_dot) / denom
ti = (uv_dot * wu_dot - uu_dot * wv_dot) / denom
ray_direction = ray_reflection(rays, tiled_normal)
cond_1 = tf.less(tf.squeeze(rI), epsilon)
cond_2 = tf.less(si, 0.)
cond_3 = tf.greater(si, 1.)
cond_4 = tf.less(ti, 0.)
cond_5 = tf.greater(ti, 1.)
no_interaction_idx = tf.logical_or(tf.logical_or(tf.logical_or(tf.logical_or(cond_1, cond_2), cond_3), cond_4), cond_5)
no_interaction_idx_3 = tf.concat([tf.expand_dims(no_interaction_idx, 1), tf.expand_dims(no_interaction_idx, 1), tf.expand_dims(no_interaction_idx, 1)], 1)
p_intersect = tf.where(no_interaction_idx_3, rays.p0, p_intersect)
ray_direction = tf.where(no_interaction_idx_3, rays.p1, ray_direction)
new_interact_num = tf.where(no_interaction_idx, rays.interact_num, rays.interact_num+1)
new_intensity = tf.where(no_interaction_idx, rays.intensity, rays.intensity*self.reflectivity)
return Ray(p_intersect, ray_direction, intensity=new_intensity, interact_num=new_interact_num)
class Pyramid:
def __init__(self, center, width, height, reflectivity=1.):
"""
A pyramid
:param center: 3D vectors for the center of the base
:type center: tf.Tensor
:param width: width of the base
:type width: float
:param height: height of the base
:type height: float
:param reflectivity: Reflectivity of the surface
:type reflectivity: float
"""
self.center = tf.cast(center, precision) # center of the pyramid base
self.width = tf.cast(width, precision) # width of the pyramid base
self.height = tf.cast(height, precision)
self.reflectivity = reflectivity
self.top_left = self.center + tf.stack([-1. * self.width / 2., self.width / 2., 0.])
self.top_right = self.center + tf.stack([self.width / 2., self.width / 2., 0.])
self.bottom_left = self.center + tf.stack([-1. * self.width / 2., -1. * self.width / 2., 0.])
self.bottom_right = self.center + tf.stack([self.width / 2., -1. * self.width / 2., 0.])
self.top_v = self.center + tf.stack([0., 0., self.height])
self.vertices = tf.stack([self.top_left, self.top_right, self.bottom_right, self.bottom_left, self.top_v])
self.tri_1 = Triangle(self.top_v, self.top_left, self.top_right, self.reflectivity)
self.tri_2 = Triangle(self.top_v, self.top_right, self.bottom_right, self.reflectivity)
self.tri_3 = Triangle(self.top_v, self.bottom_right, self.bottom_left, self.reflectivity)
self.tri_4 = Triangle(self.top_v, self.bottom_left, self.top_left, self.reflectivity)
self.tris = [self.tri_1, self.tri_2, self.tri_3, self.tri_4]
def intersect(self, rays):
_pt = rays.copy() # by default assume not intersecting with pyramid
distance = tf.ones(rays.size(), dtype=precision) * faraway
for tri in self.tris:
pt = tri.intersect(rays)
interacted_idx = tf.greater(pt.interact_num, rays.interact_num)
dist = mag(rays.p0-pt.p0) # get the distance
interacted_w_shortest_idx = tf.logical_and(interacted_idx, tf.less(dist, distance))
if tf.math.count_nonzero(interacted_w_shortest_idx) == 0:
continue
else:
distance = tf.where(interacted_w_shortest_idx, dist, distance)
# its fine, weird indexing
_pt[interacted_w_shortest_idx] = pt
return _pt
class Cone(Surface):
def __init__(self, center, radius, height, reflectivity=1.):
"""
A Cone where the base centered at `center` with height `height`
:param center: 3D vectors for the center of the base
:type center: tf.Tensor
:param radius: radius of the base
:type radius: float
:param height: height of the base
:type height: float
:param reflectivity: Reflectivity of the surface
:type reflectivity: float
"""
super().__init__()
self.center = tf.cast(center, precision)
self.radius = tf.cast(radius, precision)
self.height = tf.cast(height, precision)
self.reflectivity = reflectivity
self.c = self.center + tf.cast(tf.stack([0., 0., height]), precision) # vector for the tips
self.v = self.center - self.c # vector for the axis
self.halfangle = tf.atan(self.radius/self.height)
self.halfangle2 = tf.cos(self.halfangle)**2
@property
def vertices(self):
return tf.stack([self.c])
def intersect(self, rays):
# see http://lousodrome.net/blog/light/2017/01/03/intersection-of-a-ray-and-a-cone/
num_rays = rays.size()
tiled_v = tile_vector(self.v, num_rays)
tiled_c = tile_vector(self.c, num_rays)
co = rays.p0 - tiled_c
p1v_dot = tf.reduce_sum(rays.p1 * tiled_v, 1)
a = p1v_dot * tf.reduce_sum(rays.p1 * tiled_v, 1) - self.halfangle2
b = 2. * (p1v_dot * tf.reduce_sum(tiled_v * co, 1) - tf.reduce_sum(co * rays.p1, 1) * self.halfangle2)
c = tf.reduce_sum(co * tiled_v, 1) ** 2 - tf.reduce_sum(co * co, 1) * self.halfangle2
det = b * b - 4. * a * c
det = tf.where(tf.greater(det, 0.), tf.sqrt(det), tf.ones_like(det) * -1.)
t1 = (-b - det) / (2. * a)
t2 = (-b + det) / (2. * a)
# close enough to 0 then assume 0
t1 = tf.where(tf.greater(tf.abs(t1), epsilon), t1, tf.zeros_like(t1))
t2 = tf.where(tf.greater(tf.abs(t2), epsilon), t2, tf.zeros_like(t2))
good_t_idx = tf.logical_or(tf.less(t1, 0.), tf.logical_and(tf.greater(t2, 0.), tf.less(t2, t1)))
t = tf.where(good_t_idx, t2, t1)
bad_t = tf.where(good_t_idx, t1, t2)
bad_p_intersect = rays.p0 + tf.multiply(rays.p1, tf.expand_dims(bad_t, 1))
bad_cp = bad_p_intersect - tiled_c
bad_h = tf.reduce_sum(bad_cp * tiled_v, 1)
bad_cond_3 = tf.logical_or(tf.less(bad_h, 0.), tf.greater(bad_h, self.height))
p_intersect = rays.p0 + tf.multiply(rays.p1, tf.expand_dims(t, 1))
cp = p_intersect - tiled_c
h = tf.reduce_sum(cp * tiled_v, 1)
cond_3 = tf.logical_or(tf.less(h, 0.), tf.greater(h, self.height))
t_disagree_idx = tf.not_equal(cond_3, bad_cond_3)
t = tf.where(tf.logical_and(t_disagree_idx, tf.logical_not(bad_cond_3)), bad_t, t)
p_intersect = rays.p0 + tf.multiply(rays.p1, tf.expand_dims(t, 1))
cp = p_intersect - tiled_c
h = tf.reduce_sum(cp * tiled_v, 1)
cond_3 = tf.logical_or(tf.less(h, 0.), tf.greater(h, self.height))
normal = norm(tf.multiply(cp, tf.expand_dims(tf.reduce_sum(tiled_v * cp, 1) / tf.reduce_sum(cp * cp, 1), 1)) -
tiled_v)
ray_direction = ray_reflection(rays, normal)
cond_1 = tf.less(det, 0.)
cond_2 = tf.less_equal(t, 0.)
no_interaction_idx = tf.logical_or(tf.logical_or(cond_1, cond_2), cond_3)
no_interaction_idx_3 = tf.concat([tf.expand_dims(no_interaction_idx, 1), tf.expand_dims(no_interaction_idx, 1),
tf.expand_dims(no_interaction_idx, 1)], 1)
p_intersect = tf.where(no_interaction_idx_3, rays.p0, p_intersect)
ray_direction = tf.where(no_interaction_idx_3, rays.p1, ray_direction)
new_interact_num = tf.where(no_interaction_idx, rays.interact_num, rays.interact_num + 1)
new_intensity = tf.where(no_interaction_idx, rays.intensity, rays.intensity * self.reflectivity)
return Ray(p_intersect, ray_direction, intensity=new_intensity, interact_num=new_interact_num)
class PyramidArray:
def __init__(self, center, width, height, resolution, spacing=0., reflectivity=0.1):
"""
An array of pyramid
:param center: 3D vectors for the center of the base
:type center: tf.Tensor
:param width: width of the base
:type width: float
:param height: height of the base
:type height: float
:param resolution: number of pyramid at each side
:type resolution: tuple
:param spacing: spacing between each pyramid
:type spacing: float
:param reflectivity: Reflectivity of the surface
:type reflectivity: float
"""
self.center = tf.cast(center, precision) # detector center
self.width = tf.cast(width, precision) # pixel width
self.height = tf.cast(height, precision) # pixel width
self.resolution = resolution # resolution (W x H)
self.spacing = spacing # spacing between pyramids
self.reflectivity = reflectivity
self.num_pixel = tf.reduce_prod(self.resolution)
self.x_append = (self.resolution[0] - 1) * self.spacing # total extra space from spacing
self.y_append = (self.resolution[1] - 1) * self.spacing # total extra space from spacing
self.x, self.y = self.pixels_locations() # center of each pyramid
self.top_left = self.center + tf.stack([-1. * self.width * self.resolution[0] / 2. - self.x_append/2, self.width * self.resolution[1] / 2. + self.y_append/2, 0.])
self.top_right = self.center + tf.stack([self.width * self.resolution[0] / 2. + self.x_append/2, self.width * self.resolution[1] / 2. + self.x_append/2, 0.])
self.bottom_left = self.center + tf.stack([-1. * self.width * self.resolution[0] / 2. - self.x_append/2, -1. * self.width * self.resolution[1] / 2. - self.x_append/2, 0.])
self.bottom_right = self.center + tf.stack([self.width * self.resolution[0] / 2. + self.x_append/2, -1. * self.width * self.resolution[1] / 2. - self.y_append/2, 0.])
self.pyramid_list = [self.get_pyramid_from_array(i) for i in range(self.num_pixel)]
self.backplane = Plane(self.top_left, self.top_right, self.bottom_right, self.bottom_left) # the plane where pyramids are sitting on, in case spacing != 0
def pixels_locations(self):
physical_w = self.width * self.resolution[0] + self.x_append
physical_h = self.width * self.resolution[1] + self.y_append
all_w = physical_w / 2. - (tf.linspace(tf.constant(0., dtype=precision),
tf.constant(self.resolution[0]-1., dtype=precision),
self.resolution[0]) * self.width) - self.width / 2.
all_h = physical_h / 2. - (tf.linspace(tf.constant(0., dtype=precision),
tf.constant(self.resolution[1]-1., dtype=precision),
self.resolution[1]) * self.width) - self.width / 2.
all_w = all_w - (np.array([range(0, self.resolution[0])]) * self.spacing)
all_h = all_h - (np.array([range(0, self.resolution[0])]) * self.spacing)
x, y = tf.meshgrid(all_w, all_h)
return x, y
def get_pyramid_from_array(self, i):
assert i < self.num_pixel
i = np.unravel_index(i, self.resolution)
return Pyramid(self.center + tf.concat([self.x[i], self.y[i], 0.], 0), self.width, self.height, reflectivity=self.reflectivity)
def intersect(self, rays):
_pt = rays.copy() # by default assume not intersecting with pyramid
distance = tf.ones(rays.size(), dtype=precision) * faraway
for i in range(self.num_pixel):
pt = self.pyramid_list[i].intersect(rays)
interacted_idx = tf.greater(pt.interact_num, rays.interact_num)
dist = mag(rays.p0-pt.p0) # get the distance
interacted_w_shortest_idx = tf.logical_and(interacted_idx, tf.less(dist, distance))
if tf.math.count_nonzero(interacted_w_shortest_idx) == 0:
continue
else:
distance = tf.where(interacted_w_shortest_idx, dist, distance)
# its fine, weird indexing
_pt[interacted_w_shortest_idx] = pt
__pt = self.backplane.intersect(rays)
interacted_idx = tf.greater(__pt.interact_num, rays.interact_num)
dist = mag(rays.p0-__pt.p0) # get the distance
interacted_w_shortest_idx = tf.logical_and(interacted_idx, tf.less(dist, distance))
_pt[interacted_w_shortest_idx] = __pt
return _pt
class ConeArray:
def __init__(self, center, radius, height, resolution, spacing=0., reflectivity=0.1):
"""
An array of cones
:param center: 3D vectors for the center of the base
:type center: tf.Tensor
:param radius: radius of the base
:type radius: float
:param height: height of the base
:type height: float
:param resolution: number of pyramid at each side
:type resolution: tuple
:param spacing: spacing between each pyramid
:type spacing: float
:param reflectivity: Reflectivity of the surface
:type reflectivity: float
"""
self.center = tf.cast(center, precision) # detector center
self.radius = tf.cast(radius, precision) # cone base radius
self.height = tf.cast(height, precision) # cone height
self.resolution = resolution # resolution (W x H)
self.spacing = spacing # spacing between pyramids
self.reflectivity = reflectivity
self.num_pixel = tf.reduce_prod(self.resolution)
self.x_append = (self.resolution[0] - 1) * self.spacing # total extra space from spacing
self.y_append = (self.resolution[1] - 1) * self.spacing # total extra space from spacing
self.x, self.y = self.pixels_locations() # center of each cone
self.top_left = self.center + tf.stack([-2. * self.radius * self.resolution[0] / 2. - self.x_append / 2,
2. * self.radius * self.resolution[1] / 2. + self.y_append / 2,
0.])
self.top_right = self.center + tf.stack([2. * self.radius * self.resolution[0] / 2. + self.x_append / 2,
2. * self.radius * self.resolution[1] / 2. + self.x_append / 2,
0.])
self.bottom_left = self.center + tf.stack([-2. * self.radius * self.resolution[0] / 2. - self.x_append / 2,
-2. * self.radius * self.resolution[1] / 2. - self.x_append / 2,
0.])
self.bottom_right = self.center + tf.stack([2. * self.radius * self.resolution[0] / 2. + self.x_append / 2,
-2. * self.radius * self.resolution[1] / 2. - self.y_append / 2,
0.])
self.pyramid_list = [self.get_pyramid_from_array(i) for i in range(self.num_pixel)]
self.backplane = Plane(self.top_left, self.top_right, self.bottom_right,
self.bottom_left) # the plane where pyramids are sitting on, in case spacing != 0
def pixels_locations(self):
physical_w = 2 * self.radius * self.resolution[0] + self.x_append
physical_h = 2 * self.radius * self.resolution[1] + self.y_append
all_w = physical_w / 2. - (tf.linspace(tf.constant(0., dtype=precision),
tf.constant(self.resolution[0] - 1., dtype=precision),
self.resolution[0]) * self.radius * 2.) - self.radius
all_h = physical_h / 2. - (tf.linspace(tf.constant(0., dtype=precision),
tf.constant(self.resolution[1] - 1., dtype=precision),
self.resolution[1]) * self.radius * 2.) - self.radius
all_w = all_w - (np.array([range(0, self.resolution[0])]) * self.spacing)
all_h = all_h - (np.array([range(0, self.resolution[0])]) * self.spacing)
x, y = tf.meshgrid(all_w, all_h)
return x, y
def get_pyramid_from_array(self, i):
assert i < self.num_pixel
i = np.unravel_index(i, self.resolution)
return Cone(self.center + tf.concat([self.x[i], self.y[i], 0.], 0), self.radius, self.height,
reflectivity=self.reflectivity)
def intersect(self, rays):
_pt = rays.copy() # by default assume not intersecting with pyramid
distance = tf.ones(rays.size(), dtype=precision) * faraway
for i in range(self.num_pixel):
pt = self.pyramid_list[i].intersect(rays)
interacted_idx = tf.greater(pt.interact_num, rays.interact_num)
dist = mag(rays.p0 - pt.p0) # get the distance
interacted_w_shortest_idx = tf.logical_and(interacted_idx, tf.less(dist, distance))
if tf.math.count_nonzero(interacted_w_shortest_idx) == 0:
continue
else:
distance = tf.where(interacted_w_shortest_idx, dist, distance)
# its fine, weird indexing
_pt[interacted_w_shortest_idx] = pt
__pt = self.backplane.intersect(rays)
interacted_idx = tf.greater(__pt.interact_num, rays.interact_num)
dist = mag(rays.p0 - __pt.p0) # get the distance
interacted_w_shortest_idx = tf.logical_and(interacted_idx, tf.less(dist, distance))
_pt[interacted_w_shortest_idx] = __pt
return _pt
class ConeDenseArray:
def __init__(self, center, radius, coneheight, width, height, reflectivity=0.1):
"""
An array of dense cones (fit as many cone as possible automatically)
See https://www.engineeringtoolbox.com/circles-within-rectangle-d_1905.html
:param center: 3D vectors for the center of the base
:type center: tf.Tensor
:param radius: radius of the base
:type radius: float
:param coneheight: height of the base
:type coneheight: float
:param width: width of the box to be filled with cones
:type width: float
:param height: height of the base
:type height: float
:param reflectivity: Reflectivity of the surface
:type reflectivity: float
"""
self.center = tf.cast(center, precision) # detector center
self.radius = tf.cast(radius, precision) # cone base radius
self.coneheight = tf.cast(coneheight, precision) # cone height
self.height = tf.cast(height, precision) # backplane height
self.width = tf.cast(width, precision) # backplane width
self.reflectivity = reflectivity
self.x, self.y = self.pixels_locations() # center of each cone
self.num_pixel = tf.reduce_prod(tf.shape(self.x))
self.top_left = self.center + tf.stack([-1. * self.width / 2., self.height / 2., 0.])
self.top_right = self.center + tf.stack([self.width / 2., self.height / 2., 0.])
self.bottom_left = self.center + tf.stack([-1. * self.width / 2., -1. * self.height / 2., 0.])
self.bottom_right = self.center + tf.stack([self.width / 2., -1. * self.height / 2., 0.])
self.pyramid_list = [self.get_cones_from_array(i) for i in range(self.num_pixel)]
self.backplane = Plane(self.top_left, self.top_right, self.bottom_right, self.bottom_left)
def pixels_locations(self):
rw, rh = self.width, self.height
cd, cs = self.radius * 2, 0.
assert rw > 0.
triangle = 0
x_loc = np.zeros(99999)
y_loc = np.zeros(99999)
posX = cd / 2 + cs
posY = cd / 2 + cs
counter = 0
while posY+cd / 2 <= rh:
while (posX + cd /2 + cs <= rw):
x_loc[counter] = posX
y_loc[counter] = posY
counter = counter + 1
posX = posX + (cd + cs)
if triangle == 0:
posX = (cd + 1.5*cs)
triangle = 1
else:
posX = cd / 2 + cs
triangle = 0
posY = posY + np.power(np.power((cd + cs), 2) * 0.75, 0.5)
# origin was assumed as bottom left corner, need to shift origin to the center of the backplane
x_loc -= self.width/2
y_loc -= self.height/2
# multiple y by -1 to flip the array top-down
return x_loc[:counter], y_loc[:counter] * -1.
def get_cones_from_array(self, i):
assert i < self.num_pixel
return Cone(self.center + tf.concat([self.x[i], self.y[i], 0.], 0), self.radius, self.coneheight,
reflectivity=self.reflectivity)
def intersect(self, rays):
_pt = rays.copy() # by default assume not intersecting with pyramid
distance = tf.ones(rays.size(), dtype=precision) * faraway
for i in range(self.num_pixel):
pt = self.pyramid_list[i].intersect(rays)
interacted_idx = tf.greater(pt.interact_num, rays.interact_num)
dist = mag(rays.p0 - pt.p0) # get the distance
interacted_w_shortest_idx = tf.logical_and(interacted_idx, tf.less(dist, distance))
if tf.math.count_nonzero(interacted_w_shortest_idx) == 0:
continue
else:
distance = tf.where(interacted_w_shortest_idx, dist, distance)
# its fine, weird indexing
_pt[interacted_w_shortest_idx] = pt
__pt = self.backplane.intersect(rays)
interacted_idx = tf.greater(__pt.interact_num, rays.interact_num)
dist = mag(rays.p0 - __pt.p0) # get the distance
interacted_w_shortest_idx = tf.logical_and(interacted_idx, tf.less(dist, distance))
_pt[interacted_w_shortest_idx] = __pt
return _pt
class Detector:
"""
A detector lying on a horizontal plane
"""
def __init__(self, center, resolution, pixel_width, reflectivity=0.):
"""
A class for retengular detector
:param center: 3D vectors for the center of the base
:type center: tf.Tensor
:param resolution: number of pyramid at each side
:type resolution: tuple
:param pixel_width: width of the pixel
:type pixel_width: float
:param reflectivity: Reflectivity of the surface
:type reflectivity: float
"""
self.center = tf.cast(center, precision) # detector center
self.pixel_width = tf.cast(pixel_width, precision) # pixel width
self.resolution = resolution # resolution (W x H)
self.num_pixel = tf.reduce_prod(self.resolution)
self.x, self.y = self.pixels_locations()
self.reflectivity = reflectivity
self.top_left = self.center + tf.stack([-1. * self.pixel_width * self.resolution[0] / 2., self.pixel_width * self.resolution[1] / 2., 0.])
self.top_right = self.center + tf.stack([self.pixel_width * self.resolution[0] / 2., self.pixel_width * self.resolution[1] / 2., 0.])
self.bottom_left = self.center + tf.stack([-1. * self.pixel_width * self.resolution[0] / 2., -1. * self.pixel_width * self.resolution[1] / 2., 0.])
self.bottom_right = self.center + tf.stack([self.pixel_width * self.resolution[0] / 2., -1. * self.pixel_width * self.resolution[1] / 2., 0.])
self.u = self.top_right - self.top_left
self.v = self.bottom_left - self.top_left
self.normal = norm(tf.linalg.cross(self.u, self.v))
self.plane = Plane(self.top_left, self.top_right, self.bottom_right, self.bottom_left)
def pixels_locations(self):
physical_w = self.pixel_width * self.resolution[0]
physical_h = self.pixel_width * self.resolution[1]
all_w = physical_w / 2. - (tf.linspace(tf.constant(0., dtype=precision),
tf.constant(self.resolution[0]-1., dtype=precision),
self.resolution[0]) * self.pixel_width) - self.pixel_width / 2.
all_h = physical_h / 2. - (tf.linspace(tf.constant(0., dtype=precision),
tf.constant(self.resolution[1]-1., dtype=precision),
self.resolution[1]) * self.pixel_width) - self.pixel_width / 2.
x, y = tf.meshgrid(all_w, all_h)
return x, y
def get_random_rays_from_pixel(self, i, num=1):
assert i < self.num_pixel
i = np.unravel_index(i, self.resolution)
xi = tf.random.uniform([num, 1], self.x[i]-self.pixel_width/2, self.x[i]+self.pixel_width/2, precision)
yi = tf.random.uniform([num, 1], self.y[i]-self.pixel_width/2, self.y[i]+self.pixel_width/2, precision)
xdirecti = tf.random.uniform([num, 1], -10., 10., precision)
ydirecti = tf.random.uniform([num, 1], -10., 10., precision)
# hard code x-y direction minium to not waste ray??
return Ray(self.center + tf.concat([xi, yi, tf.zeros((num, 1), dtype=precision)], 1),
tf.concat([xdirecti, ydirecti, tf.ones((num, 1), dtype=precision)*-1.], 1),
intensity=tf.ones(num, dtype=precision),
interact_num=tf.zeros(num, dtype=tf.int32))
def intersect(self, rays):
return self.plane.intersect(rays)
| 44.507519 | 179 | 0.603795 | 4,958 | 35,517 | 4.156111 | 0.068374 | 0.040085 | 0.018635 | 0.023488 | 0.767446 | 0.745802 | 0.706202 | 0.688974 | 0.673639 | 0.66568 | 0 | 0.025535 | 0.277782 | 35,517 | 797 | 180 | 44.563363 | 0.777786 | 0.157418 | 0 | 0.55144 | 0 | 0 | 0.002184 | 0 | 0 | 0 | 0 | 0 | 0.016461 | 1 | 0.082305 | false | 0.006173 | 0.00823 | 0.014403 | 0.168724 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 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 | 3 |
5a0d1d0ca08a8167c7712b25fedc04a61eec3276 | 475 | py | Python | code/Python Crash Course A Hands-On/PART I-BASICS/Chapter 2/apostrophe.py | GaryWonggg/Paython-Learning | 8636358a96caf062cf68a43826810a6cf5ab2496 | [
"MIT"
] | null | null | null | code/Python Crash Course A Hands-On/PART I-BASICS/Chapter 2/apostrophe.py | GaryWonggg/Paython-Learning | 8636358a96caf062cf68a43826810a6cf5ab2496 | [
"MIT"
] | 1 | 2021-01-02T15:41:19.000Z | 2021-01-02T15:41:19.000Z | code/Python Crash Course A Hands-On/PART I-BASICS/Chapter 2/apostrophe.py | GaryWonggg/Paython-Learning | 8636358a96caf062cf68a43826810a6cf5ab2496 | [
"MIT"
] | null | null | null | """
Avoiding Syntax Errors with Strings
Here’s how to use single and double quotes correctly.
"""
message = "One of Python's strengths is its diverse community."
print(message)
"""
split line for each point
"""
print("------------------------------split line------------------------------")
'''
However, if you use single quotes, Python can’t identify where the string should end
'''
# message = 'One of Python's strengths is its diverse community.'
# print(message)
| 19.791667 | 84 | 0.629474 | 62 | 475 | 4.822581 | 0.66129 | 0.060201 | 0.080268 | 0.120401 | 0.408027 | 0.408027 | 0.408027 | 0.408027 | 0.408027 | 0.408027 | 0 | 0 | 0.153684 | 475 | 23 | 85 | 20.652174 | 0.743781 | 0.357895 | 0 | 0 | 0 | 0 | 0.715976 | 0.408284 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.666667 | 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 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
5a14a3edf9f0fd31e76bdce877f828e9a53d21cd | 2,200 | py | Python | CodeWars/ip validator.py | SabariVig/python-programs | 682f11df8157d4a070c294eded341f86845e38a8 | [
"MIT"
] | null | null | null | CodeWars/ip validator.py | SabariVig/python-programs | 682f11df8157d4a070c294eded341f86845e38a8 | [
"MIT"
] | 1 | 2018-07-11T10:49:29.000Z | 2018-07-11T10:51:25.000Z | CodeWars/ip validator.py | SabariVig/python-programs | 682f11df8157d4a070c294eded341f86845e38a8 | [
"MIT"
] | null | null | null | ################## CODE WARS KATA ##################
#KYU LEVEL : 6
#KATA TITLE :IP Validation
#KATA LINK : https://www.codewars.com/kata/ip-validation/train/python
#####################################################
import re
def is_valid_IP(ip):
"""Validates IPv4 addresses.
"""
qq=ip.split(".")
if len(qq) ==4:
pattern = re.compile(r"""
^
(?:
# Dotted variants:
(?:
# Decimal 1-255 (no leading 0's)
[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}
|
0x0*[0-9a-f]{1,2} # Hexadecimal 0x0 - 0xFF (possible leading 0's)
|
0+[1-3]?[0-7]{0,2} # Octal 0 - 0377 (possible leading 0's)
)
(?: # Repeat 0-3 times, separated by a dot
\.
(?:
[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}
|
0x0*[0-9a-f]{1,2}
|
0+[1-3]?[0-7]{0,2}
)
){0,3}
|
0x0*[0-9a-f]{1,8} # Hexadecimal notation, 0x0 - 0xffffffff
|
0+[0-3]?[0-7]{0,10} # Octal notation, 0 - 037777777777
|
# Decimal notation, 1-4294967295:
429496729[0-5]|42949672[0-8]\d|4294967[01]\d\d|429496[0-6]\d{3}|
42949[0-5]\d{4}|4294[0-8]\d{5}|429[0-3]\d{6}|42[0-8]\d{7}|
4[01]\d{8}|[1-3]\d{0,9}|[4-9]\d{0,8}
)
$
""", re.VERBOSE | re.IGNORECASE)
return pattern.match(ip) is not None
################## TEST CASES ##################
print(is_valid_IP('12.255.56.1') == True)
print(is_valid_IP('')== False)
print(is_valid_IP('abc.def.ghi.jkl')== False)
print(is_valid_IP('123.456.789.0')== False)
print(is_valid_IP('12.34.56')== False)
print(is_valid_IP('12.34.56.1')== False)
print(is_valid_IP('12.34.56.-1')== False)
print(is_valid_IP('123.045.067.089')== False)
print(is_valid_IP('127.1.1.0')== True)
print(is_valid_IP('0.0.0.0')== True)
print(is_valid_IP('0.34.82.53')== True)
print(is_valid_IP('192.168.1.300') == False) | 35.483871 | 82 | 0.431364 | 320 | 2,200 | 2.884375 | 0.328125 | 0.098592 | 0.126761 | 0.182015 | 0.345612 | 0.239437 | 0.212351 | 0.153846 | 0.126761 | 0.126761 | 0 | 0.177258 | 0.320455 | 2,200 | 62 | 83 | 35.483871 | 0.440134 | 0.075909 | 0 | 0.098039 | 0 | 0.156863 | 0.672986 | 0.124276 | 0 | 0 | 0.015271 | 0 | 0 | 1 | 0.019608 | false | 0 | 0.019608 | 0 | 0.058824 | 0.235294 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
5a150514209a5eb375f78303b39644f7f641d52a | 3,838 | py | Python | tests/test_filename.py | alepuzio/listfiles | cddc329cf773016a4703946c338a6e16d81380f5 | [
"MIT"
] | null | null | null | tests/test_filename.py | alepuzio/listfiles | cddc329cf773016a4703946c338a6e16d81380f5 | [
"MIT"
] | null | null | null | tests/test_filename.py | alepuzio/listfiles | cddc329cf773016a4703946c338a6e16d81380f5 | [
"MIT"
] | 1 | 2021-06-13T12:44:31.000Z | 2021-06-13T12:44:31.000Z | import os
import unittest
from os.path import splitext
from list_files.physical_data import PhysicalData
from list_files.physical_data import PhysicalDataFake
class Filename:
"""
class about the filename of a file
"""
def __init__(self, new_physical):
self.physical = new_physical
def name(self):
"""
@return the name of a file, with extension
"""
#print("Filename.name")
list_subdirectory = self.prepare()
return list_subdirectory[0]
def __hash__(self):
return hash(self.physical)
def extension(self):
"""
@return the extension of a file
"""
return self.prepare()[1]
def prepare(self):
"""
@return the couple <name, extension> of a file
"""
list_subdirectory = self.physical.path().split(os.sep)
list_subdirectory.reverse()
#print("Filename.prepare len:{0}".format ( len ( str ( list_subdirectory ) ) ) )
#print("Filename.prepare:{0}".format ( str ( list_subdirectory ) ) )
#if not "." in list_subdirectory[0]:#TODO move in a defensive decorator
#raise Exception ("The first element of the list {0} lacks of the dot, please control".format( str(list_subdirectory[0] ) ) )
#print ("The first element of the list {0} lacks of the dot, please control".format( str(list_subdirectory[0] ) ) )
result = SeparationDirectory ( list_subdirectory).split()
if "" == result:
resul="EMPTY-FILE-#TODO-DONT-PUT-IN-LIST"
return result
def __lt__(self, other):
return self.name() < other.name()
def __eq__(self, other):
return self.name() == self.name() and self.extension() == self.extension()
def __repr__(self):
return "Filename.repr:{0}.{1}".format(self.name(), self.extension())
def __str__(self):
return "Filename:{0}.{1}".format(self.name(), self.extension())
class SeparationDirectory:
"""
clsss about the separation of a directory in subdirectory
"""
def __init__(self, new_list_subdirectory):
self.list_subdirectory = new_list_subdirectory
def split(self):
result = None
try:
result = self.subdir().split(".")
except IndexError:
print ("SeparationDirectory.split() split dot: {0}".format( str ( self.subdir() ) ))
raise
return result
def subdir(self):
directory = None
try:
directory = self.list_subdirectory[0]
except IndexError:
print ("SeparationDirectory.split() access first element: {0}".format( str ( self.list_subdirectory) ) )
raise
return directory
def __repr__(self):
return "SeparationDirectory.repr:{0}".format(str ( self.list_subdirectory))
def __str__(self):
return "SeparationDirectory:{0}".format( str ( self.list_subdirectory))
"""
Test area
"""
def test_eq():
one = Filename ( PhysicalDataFake( "nome1.txt", "C:\\path\\") )
two = Filename ( PhysicalDataFake( "nome1.txt", "C:\\path\\") )
assert one == two
def test_not_eq():
one = Filename ( PhysicalDataFake( "nome3.txt", "C:\\path\\") )
two = Filename ( PhysicalDataFake( "nome4.txt", "C:\\path\\") )
assert (one == two)
def test_separationDirectory_split():
list_dir = ['.travis.yml', 'jcabi-dynamo', 'mio-java', 'personale', 'Documents', 'apuzielli', 'Users', 'C:']
result = SeparationDirectory(list_dir).split()
assert result == ['','travis','yml']
def test_separationDirectory_subdir():
list_dir = ['.travis.yml', 'jcabi-dynamo', 'mio-java', 'personale', 'Documents', 'apuzielli', 'Users', 'C:']
result = SeparationDirectory(list_dir).subdir()
assert result == ".travis.yml"
| 32.803419 | 137 | 0.614122 | 433 | 3,838 | 5.277136 | 0.221709 | 0.119037 | 0.037199 | 0.024508 | 0.374617 | 0.315098 | 0.203063 | 0.177681 | 0.154048 | 0.154048 | 0 | 0.00762 | 0.247785 | 3,838 | 116 | 138 | 33.086207 | 0.783859 | 0.180302 | 0 | 0.202899 | 0 | 0 | 0.146592 | 0.052614 | 0 | 0 | 0 | 0.008621 | 0.057971 | 1 | 0.26087 | false | 0 | 0.072464 | 0.101449 | 0.536232 | 0.028986 | 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 | 1 | 0 | 0 | 3 |
5a3c03f646432e8b46bd427ad6fa75d3df61de5e | 368 | py | Python | core/migrations/0028_auto_20200202_1832.py | baxtea/pipeline | 0cbdd4b3ee6d05611e1d3ed5a4936f597182e963 | [
"MIT"
] | 18 | 2018-11-14T21:52:33.000Z | 2022-03-23T08:10:54.000Z | core/migrations/0028_auto_20200202_1832.py | baxtea/pipeline | 0cbdd4b3ee6d05611e1d3ed5a4936f597182e963 | [
"MIT"
] | 83 | 2018-09-21T16:08:51.000Z | 2022-03-27T20:31:05.000Z | core/migrations/0028_auto_20200202_1832.py | baxtea/pipeline | 0cbdd4b3ee6d05611e1d3ed5a4936f597182e963 | [
"MIT"
] | 6 | 2019-09-27T20:50:54.000Z | 2020-06-12T14:07:38.000Z | # Generated by Django 2.2.9 on 2020-02-02 18:32
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("core", "0027_auto_20200202_1822")]
operations = [
migrations.RemoveField(model_name="office", name="req_nominations"),
migrations.RemoveField(model_name="officesorderable", name="electionPage"),
]
| 26.285714 | 83 | 0.714674 | 43 | 368 | 5.976744 | 0.72093 | 0.163424 | 0.202335 | 0.233463 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.100324 | 0.160326 | 368 | 13 | 84 | 28.307692 | 0.731392 | 0.122283 | 0 | 0 | 1 | 0 | 0.23676 | 0.071651 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.142857 | 0 | 0.571429 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
5a493e16c7fbe9535fb32817d79565eb88dce21c | 653 | py | Python | gpu_scraper/web/base.py | m-gentil/gpu-scraper | 0cc5061fa83fff491a0092baf81ee7f749dbb54e | [
"MIT"
] | 2 | 2021-03-26T14:04:10.000Z | 2021-04-28T07:56:49.000Z | gpu_scraper/web/base.py | m-gentil/gpu-scraper | 0cc5061fa83fff491a0092baf81ee7f749dbb54e | [
"MIT"
] | null | null | null | gpu_scraper/web/base.py | m-gentil/gpu-scraper | 0cc5061fa83fff491a0092baf81ee7f749dbb54e | [
"MIT"
] | null | null | null | import logging
from abc import ABC, abstractmethod
from tenacity import after_log, retry, wait_exponential
from gpu_scraper.product import Product
_LOGGER = logging.getLogger(__name__)
class ProductProvider(ABC):
@property
def name(self) -> str:
return self.__class__.__name__
@abstractmethod
def get_available_products(self) -> set[Product]:
pass
@retry(
wait=wait_exponential(multiplier=1, min=1, max=10), # type: ignore
after=after_log(_LOGGER, logging.WARNING), # type: ignore
)
def retry_get_available_products(self) -> set[Product]:
return self.get_available_products()
| 25.115385 | 75 | 0.709035 | 79 | 653 | 5.531646 | 0.468354 | 0.08238 | 0.1373 | 0.10984 | 0.155606 | 0.155606 | 0 | 0 | 0 | 0 | 0 | 0.007663 | 0.200613 | 653 | 25 | 76 | 26.12 | 0.829502 | 0.038285 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0.055556 | 0.222222 | 0.111111 | 0.555556 | 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 | 1 | 1 | 0 | 0 | 3 |
5a5268d5ca9c606754a79dd145ba73f2d4400164 | 297 | py | Python | data/serializer.py | DavidWz0403/Challange | a9c9051ae92e80c6c7ed849fa968a54a7949bc35 | [
"MIT"
] | null | null | null | data/serializer.py | DavidWz0403/Challange | a9c9051ae92e80c6c7ed849fa968a54a7949bc35 | [
"MIT"
] | null | null | null | data/serializer.py | DavidWz0403/Challange | a9c9051ae92e80c6c7ed849fa968a54a7949bc35 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from .models import Data
class DataSerializer(serializers.ModelSerializer):
class Meta:
model = Data
fields = ['inputName', 'inputAnswer1', 'inputAnswer2', 'inputAnswer3',
'inputAnswer4', 'inputAnswer5', 'inputAnswer6'] | 37.125 | 78 | 0.690236 | 25 | 297 | 8.16 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025532 | 0.208754 | 297 | 8 | 79 | 37.125 | 0.842553 | 0 | 0 | 0 | 0 | 0 | 0.271812 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.285714 | 0 | 0.571429 | 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 | 1 | 0 | 0 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.