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
875396509fb67856ffbf8603bcb702cbf0caf0ef
7,105
py
Python
tests/Unit/Evolution/Systems/RelativisticEuler/Valencia/BoundaryCorrections/Rusanov.py
nilsvu/spectre
1455b9a8d7e92db8ad600c66f54795c29c3052ee
[ "MIT" ]
117
2017-04-08T22:52:48.000Z
2022-03-25T07:23:36.000Z
tests/Unit/Evolution/Systems/RelativisticEuler/Valencia/BoundaryCorrections/Rusanov.py
GitHimanshuc/spectre
4de4033ba36547113293fe4dbdd77591485a4aee
[ "MIT" ]
3,177
2017-04-07T21:10:18.000Z
2022-03-31T23:55:59.000Z
tests/Unit/Evolution/Systems/RelativisticEuler/Valencia/BoundaryCorrections/Rusanov.py
geoffrey4444/spectre
9350d61830b360e2d5b273fdd176dcc841dbefb0
[ "MIT" ]
85
2017-04-07T19:36:13.000Z
2022-03-01T10:21:00.000Z
# Distributed under the MIT License. # See LICENSE.txt for details. import numpy as np import Evolution.Systems.RelativisticEuler.Valencia.TestFunctions as valencia def dg_package_data_tilde_d( tilde_d, tilde_tau, tilde_s, flux_tilde_d, flux_tilde_tau, flux_tilde_s, lapse, shift, spatial_metric, rest_mass_density, specific_internal_energy, specific_enthalpy, spatial_velocity, normal_covector, normal_vector, mesh_velocity, normal_dot_mesh_velocity, use_polytropic_fluid): return tilde_d def dg_package_data_tilde_tau( tilde_d, tilde_tau, tilde_s, flux_tilde_d, flux_tilde_tau, flux_tilde_s, lapse, shift, spatial_metric, rest_mass_density, specific_internal_energy, specific_enthalpy, spatial_velocity, normal_covector, normal_vector, mesh_velocity, normal_dot_mesh_velocity, use_polytropic_fluid): return tilde_tau def dg_package_data_tilde_s( tilde_d, tilde_tau, tilde_s, flux_tilde_d, flux_tilde_tau, flux_tilde_s, lapse, shift, spatial_metric, rest_mass_density, specific_internal_energy, specific_enthalpy, spatial_velocity, normal_covector, normal_vector, mesh_velocity, normal_dot_mesh_velocity, use_polytropic_fluid): return tilde_s def dg_package_data_normal_dot_flux_tilde_d( tilde_d, tilde_tau, tilde_s, flux_tilde_d, flux_tilde_tau, flux_tilde_s, lapse, shift, spatial_metric, rest_mass_density, specific_internal_energy, specific_enthalpy, spatial_velocity, normal_covector, normal_vector, mesh_velocity, normal_dot_mesh_velocity, use_polytropic_fluid): return np.einsum("i,i", normal_covector, flux_tilde_d) def dg_package_data_normal_dot_flux_tilde_tau( tilde_d, tilde_tau, tilde_s, flux_tilde_d, flux_tilde_tau, flux_tilde_s, lapse, shift, spatial_metric, rest_mass_density, specific_internal_energy, specific_enthalpy, spatial_velocity, normal_covector, normal_vector, mesh_velocity, normal_dot_mesh_velocity, use_polytropic_fluid): return np.einsum("i,i", normal_covector, flux_tilde_tau) def dg_package_data_normal_dot_flux_tilde_s( tilde_d, tilde_tau, tilde_s, flux_tilde_d, flux_tilde_tau, flux_tilde_s, lapse, shift, spatial_metric, rest_mass_density, specific_internal_energy, specific_enthalpy, spatial_velocity, normal_covector, normal_vector, mesh_velocity, normal_dot_mesh_velocity, use_polytropic_fluid): return np.einsum("i,ij->j", normal_covector, flux_tilde_s) def dg_package_data_abs_char_speed( tilde_d, tilde_tau, tilde_s, flux_tilde_d, flux_tilde_tau, flux_tilde_s, lapse, shift, spatial_metric, rest_mass_density, specific_internal_energy, specific_enthalpy, spatial_velocity, normal_covector, normal_vector, mesh_velocity, normal_dot_mesh_velocity, use_polytropic_fluid): spatial_velocity_squared = np.einsum("ij,i,j", spatial_metric, spatial_velocity, spatial_velocity) # Note that the relativistic sound speed squared has a 1/enthalpy if use_polytropic_fluid: polytropic_constant = 1.0e-3 polytropic_exponent = 2.0 sound_speed_squared = polytropic_constant * polytropic_exponent * pow( rest_mass_density, polytropic_exponent - 1.0) / specific_enthalpy else: adiabatic_index = 1.3 chi = specific_internal_energy * (adiabatic_index - 1.0) kappa_times_p_over_rho_squared = ((adiabatic_index - 1.0)**2 * specific_internal_energy) sound_speed_squared = ( chi + kappa_times_p_over_rho_squared) / specific_enthalpy char_speeds = valencia.characteristic_speeds(lapse, shift, spatial_velocity, spatial_velocity_squared, sound_speed_squared, normal_covector) if normal_dot_mesh_velocity is None: return np.max(np.abs(char_speeds)) else: return np.max(np.abs(char_speeds - normal_dot_mesh_velocity)) def dg_boundary_terms_tilde_d( interior_tilde_d, interior_tilde_tau, interior_tilde_s, interior_normal_dot_flux_tilde_d, interior_normal_dot_flux_tilde_tau, interior_normal_dot_flux_tilde_s, interior_abs_char_speed, exterior_tilde_d, exterior_tilde_tau, exterior_tilde_s, exterior_normal_dot_flux_tilde_d, exterior_normal_dot_flux_tilde_tau, exterior_normal_dot_flux_tilde_s, exterior_abs_char_speed, use_strong_form): if use_strong_form: return (-0.5 * (interior_normal_dot_flux_tilde_d + exterior_normal_dot_flux_tilde_d) - 0.5 * np.maximum(interior_abs_char_speed, exterior_abs_char_speed) * (exterior_tilde_d - interior_tilde_d)) else: return (0.5 * (interior_normal_dot_flux_tilde_d - exterior_normal_dot_flux_tilde_d) - 0.5 * np.maximum(interior_abs_char_speed, exterior_abs_char_speed) * (exterior_tilde_d - interior_tilde_d)) def dg_boundary_terms_tilde_tau( interior_tilde_d, interior_tilde_tau, interior_tilde_s, interior_normal_dot_flux_tilde_d, interior_normal_dot_flux_tilde_tau, interior_normal_dot_flux_tilde_s, interior_abs_char_speed, exterior_tilde_d, exterior_tilde_tau, exterior_tilde_s, exterior_normal_dot_flux_tilde_d, exterior_normal_dot_flux_tilde_tau, exterior_normal_dot_flux_tilde_s, exterior_abs_char_speed, use_strong_form): if use_strong_form: return (-0.5 * (interior_normal_dot_flux_tilde_tau + exterior_normal_dot_flux_tilde_tau) - 0.5 * np.maximum(interior_abs_char_speed, exterior_abs_char_speed) * (exterior_tilde_tau - interior_tilde_tau)) else: return (0.5 * (interior_normal_dot_flux_tilde_tau - exterior_normal_dot_flux_tilde_tau) - 0.5 * np.maximum(interior_abs_char_speed, exterior_abs_char_speed) * (exterior_tilde_tau - interior_tilde_tau)) def dg_boundary_terms_tilde_s( interior_tilde_d, interior_tilde_tau, interior_tilde_s, interior_normal_dot_flux_tilde_d, interior_normal_dot_flux_tilde_tau, interior_normal_dot_flux_tilde_s, interior_abs_char_speed, exterior_tilde_d, exterior_tilde_tau, exterior_tilde_s, exterior_normal_dot_flux_tilde_d, exterior_normal_dot_flux_tilde_tau, exterior_normal_dot_flux_tilde_s, exterior_abs_char_speed, use_strong_form): if use_strong_form: return (-0.5 * (interior_normal_dot_flux_tilde_s + exterior_normal_dot_flux_tilde_s) - 0.5 * np.maximum(interior_abs_char_speed, exterior_abs_char_speed) * (exterior_tilde_s - interior_tilde_s)) else: return (0.5 * (interior_normal_dot_flux_tilde_s - exterior_normal_dot_flux_tilde_s) - 0.5 * np.maximum(interior_abs_char_speed, exterior_abs_char_speed) * (exterior_tilde_s - interior_tilde_s))
47.366667
78
0.734975
971
7,105
4.802266
0.095778
0.110015
0.092001
0.127386
0.83294
0.814497
0.790264
0.779112
0.760455
0.757881
0
0.006914
0.206052
7,105
149
79
47.684564
0.819713
0.017875
0
0.625
0
0
0.002724
0
0
0
0
0
0
1
0.083333
false
0
0.016667
0.05
0.216667
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
875a61cb4b0d6096e19e2fc6bba23b0311b1d7d0
20,063
py
Python
tests/test_client.py
freshbooks/freshbooks-python-sdk
62a3943a968819fc52aaeac7fee4575e177e8597
[ "MIT" ]
3
2020-12-14T18:40:16.000Z
2021-11-27T14:55:48.000Z
tests/test_client.py
freshbooks/freshbooks-python-sdk
62a3943a968819fc52aaeac7fee4575e177e8597
[ "MIT" ]
8
2020-12-17T10:51:32.000Z
2021-12-14T15:45:23.000Z
tests/test_client.py
freshbooks/freshbooks-python-sdk
62a3943a968819fc52aaeac7fee4575e177e8597
[ "MIT" ]
2
2020-12-14T16:31:02.000Z
2021-08-04T19:23:41.000Z
from datetime import datetime import json from unittest.mock import patch import httpretty import pytest from freshbooks import Client as FreshBooksClient from freshbooks import FreshBooksError from freshbooks.api.accounting import AccountingResource from freshbooks.api.comments import CommentsResource, CommentsSubResource from freshbooks.api.projects import ProjectsResource from freshbooks.api.resource import HttpVerbs from freshbooks.api.timetracking import TimetrackingResource from freshbooks.client import API_BASE_URL from freshbooks.errors import FreshBooksNotImplementedError, FreshBooksClientConfigError from tests import get_fixture class TestClientAuth: def setup_method(self, method): self.freshBooksClient = FreshBooksClient( client_id="some_client", client_secret="some_secret", redirect_uri="https://example.com" ) def test_get_auth_request_url(self): auth_url = self.freshBooksClient.get_auth_request_url() assert ( auth_url == "https://auth.freshbooks.com/service/auth/oauth/authorize?" "client_id=some_client&response_type=code&redirect_uri=https%3A%2F%2Fexample.com" ) def test_get_auth_request_url__with_scopes(self): scopes = ["some:scope", "another:scope"] auth_url = self.freshBooksClient.get_auth_request_url(scopes) assert ( auth_url == "https://auth.freshbooks.com/service/auth/oauth/authorize?" "client_id=some_client&response_type=code&redirect_uri=https%3A%2F%2Fexample.com" "&scope=some%3Ascope+another%3Ascope" ) @httpretty.activate def test_get_auth_request_url__redirect_not_provided(self): freshBooksClient = FreshBooksClient(client_id="some_client", client_secret="some_secret") with pytest.raises(FreshBooksClientConfigError): freshBooksClient.get_auth_request_url() @httpretty.activate def test_get_access_token(self): url = "{}/auth/oauth/token".format(API_BASE_URL) httpretty.register_uri( httpretty.POST, url, body=json.dumps(get_fixture("auth_token_response")), status=200 ) result = self.freshBooksClient.get_access_token("some_grant") assert httpretty.last_request().body == ( "client_id=some_client&client_secret=some_secret&grant_type=authorization_code" "&redirect_uri=https%3A%2F%2Fexample.com&code=some_grant").encode("utf-8") assert self.freshBooksClient.access_token == "my_access_token" assert result.access_token == "my_access_token" assert self.freshBooksClient.refresh_token == "my_refresh_token" assert result.refresh_token == "my_refresh_token" assert self.freshBooksClient.access_token_expires_at == datetime(2010, 10, 17) assert result.access_token_expires_at == datetime(2010, 10, 17) @httpretty.activate def test_get_access_token__failure(self): url = "{}/auth/oauth/token".format(API_BASE_URL) httpretty.register_uri(httpretty.POST, url, status=500) try: self.freshBooksClient.get_access_token("some_grant") except FreshBooksError as e: assert str(e) == "Failed to fetch access_token" assert e.status_code == 500 @httpretty.activate def test_get_access_token__secret_not_provided(self): freshBooksClient = FreshBooksClient(client_id="some_client", redirect_uri="https://example.com") with pytest.raises(FreshBooksClientConfigError): freshBooksClient.get_access_token("some_grant") @httpretty.activate def test_get_access_token__redirect_not_provided(self): freshBooksClient = FreshBooksClient(client_id="some_client", client_secret="some_secret") with pytest.raises(FreshBooksClientConfigError): freshBooksClient.get_access_token("some_grant") @httpretty.activate def test_get_refresh_token(self): self.freshBooksClient = FreshBooksClient( client_id="some_client", client_secret="some_secret", redirect_uri="https://example.com", access_token="an_old_token", refresh_token="an_old_refresh_token" ) url = "{}/auth/oauth/token".format(API_BASE_URL) httpretty.register_uri( httpretty.POST, url, body=json.dumps(get_fixture("auth_token_response")), status=200 ) result = self.freshBooksClient.refresh_access_token() assert httpretty.last_request().body == ( "client_id=some_client&client_secret=some_secret&grant_type=refresh_token" "&redirect_uri=https%3A%2F%2Fexample.com&refresh_token=an_old_refresh_token").encode("utf-8") assert self.freshBooksClient.access_token == "my_access_token" assert result.access_token == "my_access_token" assert self.freshBooksClient.refresh_token == "my_refresh_token" assert result.refresh_token == "my_refresh_token" assert self.freshBooksClient.access_token_expires_at == datetime(2010, 10, 17) assert result.access_token_expires_at == datetime(2010, 10, 17) @httpretty.activate def test_get_refresh_token__uninitialized_client(self): url = "{}/auth/oauth/token".format(API_BASE_URL) httpretty.register_uri( httpretty.POST, url, body=json.dumps(get_fixture("auth_token_response")), status=200 ) result = self.freshBooksClient.refresh_access_token("an_old_refresh_token") assert httpretty.last_request().body == ( "client_id=some_client&client_secret=some_secret&grant_type=refresh_token" "&redirect_uri=https%3A%2F%2Fexample.com&refresh_token=an_old_refresh_token").encode("utf-8") assert self.freshBooksClient.access_token == "my_access_token" assert result.access_token == "my_access_token" assert self.freshBooksClient.refresh_token == "my_refresh_token" assert result.refresh_token == "my_refresh_token" assert self.freshBooksClient.access_token_expires_at == datetime(2010, 10, 17) assert result.access_token_expires_at == datetime(2010, 10, 17) @httpretty.activate def test_get_refresh_token__uninitialized_client_not_provided(self): with pytest.raises(FreshBooksClientConfigError): self.freshBooksClient.refresh_access_token() class TestClientResources: def setup_method(self, method): self.freshBooksClient = FreshBooksClient(client_id="some_client", redirect_uri="https://example.com") @pytest.mark.parametrize( "resource_name, single_name, delete_via_update", [ ("bills", "bill", True), ("bill_payments", "bill_payment", True), ("bill_vendors", "bill_vendor", True), ("clients", "client", True), ("credit_notes", "credit_note", True), ("estimates", "estimate", False), ("expenses", "expense", True), ("invoices", "invoice", False), ("invoice_profiles", "invoice_profile", True), ("items", "item", True), ("other_income", "other_income", False), ("payments", "payment", True), ("tasks", "task", True), ("taxes", "tax", False) ] ) @patch.object(AccountingResource, "_get_url", return_value="some_url") def test_accounting_resource_methods(self, mock_url, resource_name, single_name, delete_via_update): """Test general methods on accounting resources""" account_id = 1234 resource_id = 2345 resource_ = getattr(self.freshBooksClient, resource_name) list_response = {resource_name: [], "page": 1, "pages": 0, "per_page": 15, "total": 0} single_response = {single_name: {}} with patch.object(AccountingResource, "_request", return_value=list_response) as mock_request: resource_.list(account_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) with patch.object(AccountingResource, "_request", return_value=single_response) as mock_request: resource_.get(account_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) resource_.create(account_id, {}) mock_request.assert_called_with("some_url", HttpVerbs.POST, data={single_name: {}}) resource_.update(account_id, resource_id, {}) mock_request.assert_called_with("some_url", HttpVerbs.PUT, data={single_name: {}}) resource_.delete(account_id, resource_id) if delete_via_update: mock_request.assert_called_with("some_url", HttpVerbs.PUT, data={single_name: {"vis_state": 1}}) else: mock_request.assert_called_with("some_url", HttpVerbs.DELETE) @patch.object(AccountingResource, "_get_url", return_value="some_url") def test_accounting_expense_categories_resource_methods(self, mock_url): """Test methods on accounting expense categories resource, which has only list and get""" account_id = 1234 resource_id = 2345 list_response = {"categories": [], "page": 1, "pages": 0, "per_page": 15, "total": 0} single_response = {"category": {}} with patch.object(AccountingResource, "_request", return_value=list_response) as mock_request: self.freshBooksClient.expenses_categories.list(account_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) with patch.object(AccountingResource, "_request", return_value=single_response) as mock_request: self.freshBooksClient.expenses_categories.get(account_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) with pytest.raises(FreshBooksNotImplementedError): self.freshBooksClient.expenses_categories.create(account_id, {}) with pytest.raises(FreshBooksNotImplementedError): self.freshBooksClient.expenses_categories.update(account_id, resource_id, {}) with pytest.raises(FreshBooksNotImplementedError): self.freshBooksClient.expenses_categories.delete(account_id, resource_id) @patch.object(AccountingResource, "_get_url", return_value="some_url") def test_accounting_gateways_resource_methods(self, mock_url): """Test methods on accounting systems resource, which has only get""" account_id = 1234 resource_id = 2345 list_response = {"gateways": [], "page": 1, "pages": 0, "per_page": 15, "total": 0} single_response = {} with patch.object(AccountingResource, "_request", return_value=list_response) as mock_request: self.freshBooksClient.gateways.list(account_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) with patch.object(AccountingResource, "_request", return_value=single_response) as mock_request: self.freshBooksClient.gateways.delete(account_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.DELETE) with pytest.raises(FreshBooksNotImplementedError): self.freshBooksClient.gateways.get(account_id, resource_id) with pytest.raises(FreshBooksNotImplementedError): self.freshBooksClient.gateways.create(account_id, {}) with pytest.raises(FreshBooksNotImplementedError): self.freshBooksClient.gateways.update(account_id, resource_id, {}) @patch.object(AccountingResource, "_get_url", return_value="some_url") def test_accounting_staff_resource_methods(self, mock_url): """Test methods on accounting staff resource, which has no create""" account_id = 1234 resource_id = 2345 list_response = {"staffs": [], "page": 1, "pages": 0, "per_page": 15, "total": 0} single_response = {"staff": {}} with patch.object(AccountingResource, "_request", return_value=list_response) as mock_request: self.freshBooksClient.staff.list(account_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) with patch.object(AccountingResource, "_request", return_value=single_response) as mock_request: self.freshBooksClient.staff.get(account_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) with pytest.raises(FreshBooksNotImplementedError): self.freshBooksClient.staff.create(account_id, {}) self.freshBooksClient.staff.update(account_id, resource_id, {}) mock_request.assert_called_with("some_url", HttpVerbs.PUT, data={"staff": {}}) self.freshBooksClient.staff.delete(account_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.PUT, data={"staff": {"vis_state": 1}}) @patch.object(AccountingResource, "_get_url", return_value="some_url") def test_accounting_system_resource_methods(self, mock_url): """Test methods on accounting systems resource, which has only get""" account_id = 1234 resource_id = 2345 single_response = {"system": {}} with patch.object(AccountingResource, "_request", return_value=single_response) as mock_request: self.freshBooksClient.systems.get(account_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) with pytest.raises(FreshBooksNotImplementedError): self.freshBooksClient.systems.list(account_id) with pytest.raises(FreshBooksNotImplementedError): self.freshBooksClient.systems.create(account_id, {}) with pytest.raises(FreshBooksNotImplementedError): self.freshBooksClient.systems.update(account_id, resource_id, {}) with pytest.raises(FreshBooksNotImplementedError): self.freshBooksClient.systems.delete(account_id, resource_id) @pytest.mark.parametrize( "resource_name, single_name", [ ("projects", "project") ] ) @patch.object(ProjectsResource, "_get_url", return_value="some_url") def test_project_resource_methods(self, mock_url, resource_name, single_name): """Test general methods on project resources""" business_id = 1234 resource_id = 2345 resource_ = getattr(self.freshBooksClient, resource_name) list_response = {resource_name: [], "meta": {"page": 1, "pages": 0, "per_page": 15, "total": 0}} single_response = {single_name: {}} with patch.object(ProjectsResource, "_request", return_value=list_response) as mock_request: resource_.list(business_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) with patch.object(ProjectsResource, "_request", return_value=single_response) as mock_request: resource_.get(business_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) resource_.create(business_id, {}) mock_request.assert_called_with("some_url", HttpVerbs.POST, data={single_name: {}}) resource_.update(business_id, resource_id, {}) mock_request.assert_called_with("some_url", HttpVerbs.PUT, data={single_name: {}}) resource_.delete(business_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.DELETE) @pytest.mark.parametrize( "resource_name, single_name", [ ("time_entries", "time_entry") ] ) @patch.object(TimetrackingResource, "_get_url", return_value="some_url") def test_timetracking_resource_methods(self, mock_url, resource_name, single_name): """Test general methods on timetracking resources""" business_id = 1234 resource_id = 2345 resource_ = getattr(self.freshBooksClient, resource_name) list_response = {resource_name: [], "meta": {"page": 1, "pages": 0, "per_page": 15, "total": 0}} single_response = {single_name: {}} with patch.object(TimetrackingResource, "_request", return_value=list_response) as mock_request: resource_.list(business_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) with patch.object(TimetrackingResource, "_request", return_value=single_response) as mock_request: resource_.get(business_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) resource_.create(business_id, {}) mock_request.assert_called_with("some_url", HttpVerbs.POST, data={single_name: {}}) resource_.update(business_id, resource_id, {}) mock_request.assert_called_with("some_url", HttpVerbs.PUT, data={single_name: {}}) resource_.delete(business_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.DELETE) @pytest.mark.parametrize( "resource_name, single_name", [ ("services", "service"), ] ) @patch.object(CommentsResource, "_get_url", return_value="some_url") def test_comment_resource_methods(self, mock_url, resource_name, single_name): """Test general methods on comments resources""" business_id = 1234 resource_id = 2345 resource_ = getattr(self.freshBooksClient, resource_name) list_response = {resource_name: [], "meta": {"page": 1, "pages": 0, "per_page": 15, "total": 0}} single_response = {single_name: {}} with patch.object(CommentsResource, "_request", return_value=list_response) as mock_request: resource_.list(business_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) with patch.object(CommentsResource, "_request", return_value=single_response) as mock_request: resource_.get(business_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) resource_.create(business_id, {}) mock_request.assert_called_with("some_url", HttpVerbs.POST, data={single_name: {}}) resource_.update(business_id, resource_id, {}) mock_request.assert_called_with("some_url", HttpVerbs.PUT, data={single_name: {}}) resource_.delete(business_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.DELETE) @pytest.mark.parametrize( "resource_name, single_name", [ ("service_rates", "service_rate") ] ) @patch.object(CommentsSubResource, "_get_url", return_value="some_url") def test_comment_subresource_methods(self, mock_url, resource_name, single_name): """Test general methods on comments sub-resources""" business_id = 1234 resource_id = 2345 resource_ = getattr(self.freshBooksClient, resource_name) list_response = {resource_name: [], "meta": {"page": 1, "pages": 0, "per_page": 15, "total": 0}} single_response = {single_name: {}} with patch.object(CommentsSubResource, "_request", return_value=list_response) as mock_request: resource_.list(business_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) with patch.object(CommentsSubResource, "_request", return_value=single_response) as mock_request: resource_.get(business_id, resource_id) mock_request.assert_called_with("some_url", HttpVerbs.GET) resource_.create(business_id, resource_id, {}) mock_request.assert_called_with("some_url", HttpVerbs.POST, data={single_name: {}}) resource_.update(business_id, resource_id, {}) mock_request.assert_called_with("some_url", HttpVerbs.PUT, data={single_name: {}}) with pytest.raises(FreshBooksNotImplementedError): resource_.delete(business_id, resource_id)
46.016055
112
0.683946
2,236
20,063
5.80322
0.085868
0.043234
0.044544
0.060265
0.861051
0.850262
0.843018
0.797703
0.77443
0.720484
0
0.012424
0.20964
20,063
435
113
46.121839
0.80589
0.024822
0
0.55848
0
0
0.136841
0.03161
0
0
0
0
0.172515
1
0.061404
false
0
0.04386
0
0.111111
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
5e54972385b92cde578c8cdece6b9497781364d4
96
py
Python
logonet_app/w-serve.py
jagadeesh-kotra/LogoNet
c47d63a963ba76576708511ad45e452e2cedd222
[ "MIT" ]
5
2019-07-25T14:47:05.000Z
2021-10-31T13:00:46.000Z
logonet_app/w-serve.py
jagadeesh-kotra/LogoNet
c47d63a963ba76576708511ad45e452e2cedd222
[ "MIT" ]
null
null
null
logonet_app/w-serve.py
jagadeesh-kotra/LogoNet
c47d63a963ba76576708511ad45e452e2cedd222
[ "MIT" ]
1
2019-07-09T17:21:06.000Z
2019-07-09T17:21:06.000Z
from waitress import serve import ln_main_app serve(ln_main_app.app, host='0.0.0.0', port=8000)
24
49
0.78125
20
96
3.55
0.55
0.084507
0.253521
0
0
0
0
0
0
0
0
0.091954
0.09375
96
3
50
32
0.724138
0
0
0
0
0
0.072917
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
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
1
0
1
0
1
0
0
6
5eb16b730873710eef9df6ebefe0e1a6e2a904f4
96
py
Python
src/utoolbox/transform/__init__.py
liuyenting/utoolbox-legacy
dfcb24701ca25a37a223cc3c14b4433e6c296bfd
[ "Apache-2.0" ]
2
2020-09-03T06:22:14.000Z
2020-10-04T10:14:56.000Z
src/utoolbox/transform/__init__.py
liuyenting/utoolbox-legacy
dfcb24701ca25a37a223cc3c14b4433e6c296bfd
[ "Apache-2.0" ]
null
null
null
src/utoolbox/transform/__init__.py
liuyenting/utoolbox-legacy
dfcb24701ca25a37a223cc3c14b4433e6c296bfd
[ "Apache-2.0" ]
null
null
null
from .imresize import * #from .mip import * #from .pyramids import * #from .transpose import *
16
25
0.708333
12
96
5.666667
0.5
0.441176
0
0
0
0
0
0
0
0
0
0
0.177083
96
5
26
19.2
0.860759
0.677083
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
0d8ab696cc9dc5477fbdead406789ffe70f67e6a
21
py
Python
weight/visits/views/__init__.py
aleducode/lose_weightapp
1210cf3104c0fc929509ff6e51337dbd2dfa157e
[ "MIT" ]
3
2019-08-21T06:18:57.000Z
2019-11-04T03:00:43.000Z
weight/visits/serializers/__init__.py
alejandroduquec/lose_weightapp
1210cf3104c0fc929509ff6e51337dbd2dfa157e
[ "MIT" ]
11
2019-12-20T17:17:27.000Z
2022-03-12T00:09:01.000Z
weight/visits/views/__init__.py
SeptumDevs/lose_weightapp
2c39ba45aa6aef37820b385c3060c83a73f8f910
[ "MIT" ]
2
2019-08-07T14:56:57.000Z
2019-09-03T00:13:31.000Z
from .visits import *
21
21
0.761905
3
21
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
21
1
21
21
0.888889
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
0ddd30b9175786708bd8ed7ebcec8d552e95b7ca
48
py
Python
users/models/__init__.py
lynnetsy/ms_users
d51bec4bb6326752889bc9e1ea1f6fb5ecef3cbb
[ "MIT" ]
null
null
null
users/models/__init__.py
lynnetsy/ms_users
d51bec4bb6326752889bc9e1ea1f6fb5ecef3cbb
[ "MIT" ]
null
null
null
users/models/__init__.py
lynnetsy/ms_users
d51bec4bb6326752889bc9e1ea1f6fb5ecef3cbb
[ "MIT" ]
null
null
null
from .model import Model from .user import User
16
24
0.791667
8
48
4.75
0.5
0
0
0
0
0
0
0
0
0
0
0
0.166667
48
2
25
24
0.95
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
21f89e4ddd390aa80edde17e7cf787e39f018a58
154
py
Python
yaaf/agents/dqn/__init__.py
ilvieira/yaaf
931bde3dbad521bf5fb2744793f54791ca7add11
[ "Apache-2.0" ]
18
2019-06-01T17:17:25.000Z
2022-01-21T16:09:20.000Z
yaaf/agents/dqn/__init__.py
ilvieira/yaaf
931bde3dbad521bf5fb2744793f54791ca7add11
[ "Apache-2.0" ]
null
null
null
yaaf/agents/dqn/__init__.py
ilvieira/yaaf
931bde3dbad521bf5fb2744793f54791ca7add11
[ "Apache-2.0" ]
2
2021-02-15T10:11:41.000Z
2021-03-20T21:38:34.000Z
from yaaf.agents.dqn.DQNAgent import DQNAgent from yaaf.agents.dqn.DQNAgent import MLPDQNAgent from yaaf.agents.dqn.DQNAgent import DeepMindAtariDQNAgent
38.5
58
0.863636
21
154
6.333333
0.380952
0.180451
0.315789
0.383459
0.699248
0.699248
0
0
0
0
0
0
0.077922
154
3
59
51.333333
0.93662
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
1
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
1
0
1
0
0
0
0
6
df3ddf51259d657fc43f347b6e0f0c1dec459c26
160
py
Python
player/__init__.py
JosselinSomervilleRoberts/SpeechBubbleSubtitles
a4467b042919f34fdd47648ae31af7df5247b6d1
[ "MIT" ]
1
2022-01-27T19:46:02.000Z
2022-01-27T19:46:02.000Z
player/__init__.py
JosselinSomervilleRoberts/SpeechBubbleSubtitles
a4467b042919f34fdd47648ae31af7df5247b6d1
[ "MIT" ]
null
null
null
player/__init__.py
JosselinSomervilleRoberts/SpeechBubbleSubtitles
a4467b042919f34fdd47648ae31af7df5247b6d1
[ "MIT" ]
null
null
null
from player.videoPlayer import VideoPlayer from player.videoPlayerWithBubbles import VideoPlayerWithBubbles from player.videoPlayerMesh import VideoPlayerMesh
53.333333
65
0.9
15
160
9.6
0.4
0.208333
0
0
0
0
0
0
0
0
0
0
0.08125
160
3
66
53.333333
0.979592
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
df429864f7b14b85bb5b4cafa152afe464b2aa61
133
py
Python
clmm/__init__.py
lbaumo/CLMM
678422fd173c27a2bad7017b0c095a7c833bbd32
[ "BSD-3-Clause" ]
null
null
null
clmm/__init__.py
lbaumo/CLMM
678422fd173c27a2bad7017b0c095a7c833bbd32
[ "BSD-3-Clause" ]
null
null
null
clmm/__init__.py
lbaumo/CLMM
678422fd173c27a2bad7017b0c095a7c833bbd32
[ "BSD-3-Clause" ]
null
null
null
from .galaxycluster import * from .gcdata import * from .polaraveraging import * from .profilemodelling import * from . import lsst
19
31
0.774436
15
133
6.866667
0.466667
0.38835
0
0
0
0
0
0
0
0
0
0
0.157895
133
6
32
22.166667
0.919643
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
df6c154be9af00058d8372bc01a2e766e6950e29
32,868
py
Python
src/hapPyTango/AttNotification/__init__.py
mguijarr/hapPyTango
2506c8e83d93fbd2c0a0115983489d59c74caa2f
[ "MIT" ]
1
2020-10-28T16:57:36.000Z
2020-10-28T16:57:36.000Z
src/hapPyTango/AttNotification/__init__.py
mguijarr/hapPyTango
2506c8e83d93fbd2c0a0115983489d59c74caa2f
[ "MIT" ]
null
null
null
src/hapPyTango/AttNotification/__init__.py
mguijarr/hapPyTango
2506c8e83d93fbd2c0a0115983489d59c74caa2f
[ "MIT" ]
null
null
null
""" Module: IDL:att.com/AttNotification:1.0 Automagically generated by:- The ORB called Fnorb v1.1.Return.of.Fnorb """ _FNORB_ID = "IDL:att.com/AttNotification:1.0" # Fnorb modules. import Fnorb.orb.CORBA import Fnorb.orb.TypeManager import Fnorb.orb.Util # Alias: IDL:att.com/AttNotification/IactSeq:1.0 Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/IactSeq:1.0", "000000000000001300000054000000000000000E00000044000000000000002C49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F496E7465726163746976653A312E30000000000C496E7465726163746976650000000000", None) # Alias: IDL:att.com/AttNotification/NameSeq:1.0 Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/NameSeq:1.0", "00000000000000130000001000000000000000120000000000000000", None) class Interactive(Fnorb.orb.CORBA.Object): """ Interface: IDL:att.com/AttNotification/Interactive:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/Interactive:1.0" def do_command(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Interactive/do_command:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] inputs.append(Fnorb.orb.CORBA.TC_string) # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.TC_string) outputs.append(Fnorb.orb.CORBA.TC_boolean) outputs.append(Fnorb.orb.CORBA.TC_boolean) outputs.append(Fnorb.orb.CORBA.TC_Object) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("do_command", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() def my_name(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Interactive/my_name:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.typecode("IDL:att.com/AttNotification/NameSeq:1.0")) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("my_name", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() def child_names(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Interactive/child_names:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.typecode("IDL:att.com/AttNotification/NameSeq:1.0")) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("child_names", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() def children(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Interactive/children:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] inputs.append(Fnorb.orb.CORBA.TC_boolean) # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.typecode("IDL:att.com/AttNotification/IactSeq:1.0")) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("children", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() def safe_cleanup(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Interactive/safe_cleanup:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.TC_boolean) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("safe_cleanup", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/Interactive:1.0", "000000000000000E00000044000000000000002C49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F496E7465726163746976653A312E30000000000C496E74657261637469766500", Interactive) # Import base interface packages. import CosEventChannelAdmin class CosEvProxyPushSupplier(Fnorb.orb.CORBA.Object, Interactive, CosEventChannelAdmin.ProxyPushSupplier): """ Interface: IDL:att.com/AttNotification/CosEvProxyPushSupplier:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/CosEvProxyPushSupplier:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/CosEvProxyPushSupplier:1.0", "000000000000000E0000005B000000000000003749444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F436F73457650726F787950757368537570706C6965723A312E30000000000017436F73457650726F787950757368537570706C69657200", CosEvProxyPushSupplier) # Import base interface packages. import CosEventChannelAdmin class CosEvProxyPullSupplier(Fnorb.orb.CORBA.Object, Interactive, CosEventChannelAdmin.ProxyPullSupplier): """ Interface: IDL:att.com/AttNotification/CosEvProxyPullSupplier:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/CosEvProxyPullSupplier:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/CosEvProxyPullSupplier:1.0", "000000000000000E0000005B000000000000003749444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F436F73457650726F787950756C6C537570706C6965723A312E30000000000017436F73457650726F787950756C6C537570706C69657200", CosEvProxyPullSupplier) # Import base interface packages. import CosEventChannelAdmin class CosEvProxyPushConsumer(Fnorb.orb.CORBA.Object, Interactive, CosEventChannelAdmin.ProxyPushConsumer): """ Interface: IDL:att.com/AttNotification/CosEvProxyPushConsumer:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/CosEvProxyPushConsumer:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/CosEvProxyPushConsumer:1.0", "000000000000000E0000005B000000000000003749444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F436F73457650726F787950757368436F6E73756D65723A312E30000000000017436F73457650726F787950757368436F6E73756D657200", CosEvProxyPushConsumer) # Import base interface packages. import CosEventChannelAdmin class CosEvProxyPullConsumer(Fnorb.orb.CORBA.Object, Interactive, CosEventChannelAdmin.ProxyPullConsumer): """ Interface: IDL:att.com/AttNotification/CosEvProxyPullConsumer:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/CosEvProxyPullConsumer:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/CosEvProxyPullConsumer:1.0", "000000000000000E0000005B000000000000003749444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F436F73457650726F787950756C6C436F6E73756D65723A312E30000000000017436F73457650726F787950756C6C436F6E73756D657200", CosEvProxyPullConsumer) # Import base interface packages. import CosNotifyChannelAdmin class ProxyPushSupplier(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.ProxyPushSupplier): """ Interface: IDL:att.com/AttNotification/ProxyPushSupplier:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/ProxyPushSupplier:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/ProxyPushSupplier:1.0", "000000000000000E00000052000000000000003249444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F50726F787950757368537570706C6965723A312E300000000000001250726F787950757368537570706C69657200", ProxyPushSupplier) # Import base interface packages. import CosNotifyChannelAdmin class ProxyPullSupplier(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.ProxyPullSupplier): """ Interface: IDL:att.com/AttNotification/ProxyPullSupplier:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/ProxyPullSupplier:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/ProxyPullSupplier:1.0", "000000000000000E00000052000000000000003249444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F50726F787950756C6C537570706C6965723A312E300000000000001250726F787950756C6C537570706C69657200", ProxyPullSupplier) # Import base interface packages. import CosNotifyChannelAdmin class ProxyPushConsumer(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.ProxyPushConsumer): """ Interface: IDL:att.com/AttNotification/ProxyPushConsumer:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/ProxyPushConsumer:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/ProxyPushConsumer:1.0", "000000000000000E00000052000000000000003249444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F50726F787950757368436F6E73756D65723A312E300000000000001250726F787950757368436F6E73756D657200", ProxyPushConsumer) # Import base interface packages. import CosNotifyChannelAdmin class ProxyPullConsumer(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.ProxyPullConsumer): """ Interface: IDL:att.com/AttNotification/ProxyPullConsumer:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/ProxyPullConsumer:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/ProxyPullConsumer:1.0", "000000000000000E00000052000000000000003249444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F50726F787950756C6C436F6E73756D65723A312E300000000000001250726F787950756C6C436F6E73756D657200", ProxyPullConsumer) # Import base interface packages. import CosNotifyChannelAdmin class StructuredProxyPushSupplier(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.StructuredProxyPushSupplier): """ Interface: IDL:att.com/AttNotification/StructuredProxyPushSupplier:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/StructuredProxyPushSupplier:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/StructuredProxyPushSupplier:1.0", "000000000000000E00000064000000000000003C49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F5374727563747572656450726F787950757368537570706C6965723A312E30000000001C5374727563747572656450726F787950757368537570706C69657200", StructuredProxyPushSupplier) # Import base interface packages. import CosNotifyChannelAdmin class StructuredProxyPullSupplier(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.StructuredProxyPullSupplier): """ Interface: IDL:att.com/AttNotification/StructuredProxyPullSupplier:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/StructuredProxyPullSupplier:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/StructuredProxyPullSupplier:1.0", "000000000000000E00000064000000000000003C49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F5374727563747572656450726F787950756C6C537570706C6965723A312E30000000001C5374727563747572656450726F787950756C6C537570706C69657200", StructuredProxyPullSupplier) # Import base interface packages. import CosNotifyChannelAdmin class StructuredProxyPushConsumer(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.StructuredProxyPushConsumer): """ Interface: IDL:att.com/AttNotification/StructuredProxyPushConsumer:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/StructuredProxyPushConsumer:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/StructuredProxyPushConsumer:1.0", "000000000000000E00000064000000000000003C49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F5374727563747572656450726F787950757368436F6E73756D65723A312E30000000001C5374727563747572656450726F787950757368436F6E73756D657200", StructuredProxyPushConsumer) # Import base interface packages. import CosNotifyChannelAdmin class StructuredProxyPullConsumer(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.StructuredProxyPullConsumer): """ Interface: IDL:att.com/AttNotification/StructuredProxyPullConsumer:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/StructuredProxyPullConsumer:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/StructuredProxyPullConsumer:1.0", "000000000000000E00000064000000000000003C49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F5374727563747572656450726F787950756C6C436F6E73756D65723A312E30000000001C5374727563747572656450726F787950756C6C436F6E73756D657200", StructuredProxyPullConsumer) # Import base interface packages. import CosNotifyChannelAdmin class SequenceProxyPushSupplier(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.SequenceProxyPushSupplier): """ Interface: IDL:att.com/AttNotification/SequenceProxyPushSupplier:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/SequenceProxyPushSupplier:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/SequenceProxyPushSupplier:1.0", "000000000000000E00000062000000000000003A49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F53657175656E636550726F787950757368537570706C6965723A312E300000000000001A53657175656E636550726F787950757368537570706C69657200", SequenceProxyPushSupplier) # Import base interface packages. import CosNotifyChannelAdmin class SequenceProxyPullSupplier(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.SequenceProxyPullSupplier): """ Interface: IDL:att.com/AttNotification/SequenceProxyPullSupplier:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/SequenceProxyPullSupplier:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/SequenceProxyPullSupplier:1.0", "000000000000000E00000062000000000000003A49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F53657175656E636550726F787950756C6C537570706C6965723A312E300000000000001A53657175656E636550726F787950756C6C537570706C69657200", SequenceProxyPullSupplier) # Import base interface packages. import CosNotifyChannelAdmin class SequenceProxyPushConsumer(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.SequenceProxyPushConsumer): """ Interface: IDL:att.com/AttNotification/SequenceProxyPushConsumer:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/SequenceProxyPushConsumer:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/SequenceProxyPushConsumer:1.0", "000000000000000E00000062000000000000003A49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F53657175656E636550726F787950757368436F6E73756D65723A312E300000000000001A53657175656E636550726F787950757368436F6E73756D657200", SequenceProxyPushConsumer) # Import base interface packages. import CosNotifyChannelAdmin class SequenceProxyPullConsumer(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.SequenceProxyPullConsumer): """ Interface: IDL:att.com/AttNotification/SequenceProxyPullConsumer:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/SequenceProxyPullConsumer:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/SequenceProxyPullConsumer:1.0", "000000000000000E00000062000000000000003A49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F53657175656E636550726F787950756C6C436F6E73756D65723A312E300000000000001A53657175656E636550726F787950756C6C436F6E73756D657200", SequenceProxyPullConsumer) # Import base interface packages. import CosNotifyChannelAdmin class SupplierAdmin(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.SupplierAdmin): """ Interface: IDL:att.com/AttNotification/SupplierAdmin:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/SupplierAdmin:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/SupplierAdmin:1.0", "000000000000000E0000004A000000000000002E49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F537570706C69657241646D696E3A312E300000000000000E537570706C69657241646D696E00", SupplierAdmin) # Import base interface packages. import CosNotifyChannelAdmin class ConsumerAdmin(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.ConsumerAdmin): """ Interface: IDL:att.com/AttNotification/ConsumerAdmin:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/ConsumerAdmin:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/ConsumerAdmin:1.0", "000000000000000E0000004A000000000000002E49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F436F6E73756D657241646D696E3A312E300000000000000E436F6E73756D657241646D696E00", ConsumerAdmin) class ChannelStats: """ Struct: IDL:att.com/AttNotification/ChannelStats:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/ChannelStats:1.0" def __init__(self, _num_announcements, _num_notifications): """ Constructor. """ self.num_announcements = _num_announcements self.num_notifications = _num_notifications return def __getinitargs__(self): """ Return the constructor arguments for unpickling. """ return (self.num_announcements, self.num_notifications) Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/ChannelStats:1.0", "000000000000000F00000088000000000000002D49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F4368616E6E656C53746174733A312E30000000000000000D4368616E6E656C53746174730000000000000002000000126E756D5F616E6E6F756E63656D656E747300000000000003000000126E756D5F6E6F74696669636174696F6E7300000000000003", ChannelStats) # Import base interface packages. import CosNotifyChannelAdmin class EventChannel(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.EventChannel): """ Interface: IDL:att.com/AttNotification/EventChannel:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/EventChannel:1.0" def obtain_subscription_types(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/EventChannel/obtain_subscription_types:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.typecode("IDL:omg.org/CosNotification/EventTypeSeq:1.0")) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("obtain_subscription_types", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() def obtain_offered_types(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/EventChannel/obtain_offered_types:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.typecode("IDL:omg.org/CosNotification/EventTypeSeq:1.0")) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("obtain_offered_types", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() def obtain_stats(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/EventChannel/obtain_stats:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.typecode("IDL:att.com/AttNotification/ChannelStats:1.0")) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("obtain_stats", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/EventChannel:1.0", "000000000000000E00000049000000000000002D49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F4576656E744368616E6E656C3A312E30000000000000000D4576656E744368616E6E656C00", EventChannel) # Import base interface packages. import CosNotifyChannelAdmin import CosNotification import CosNotification class EventChannelFactory(Fnorb.orb.CORBA.Object, Interactive, CosNotifyChannelAdmin.EventChannelFactory, CosNotification.QoSAdmin, CosNotification.AdminPropertiesAdmin): """ Interface: IDL:att.com/AttNotification/EventChannelFactory:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/EventChannelFactory:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/EventChannelFactory:1.0", "000000000000000E00000054000000000000003449444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F4576656E744368616E6E656C466163746F72793A312E3000000000144576656E744368616E6E656C466163746F727900", EventChannelFactory) # Import base interface packages. import CosNotifyFilter class Filter(Fnorb.orb.CORBA.Object, Interactive, CosNotifyFilter.Filter): """ Interface: IDL:att.com/AttNotification/Filter:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/Filter:1.0" def MyFID(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Filter/MyFID:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.typecode("IDL:omg.org/CosNotifyFilter/FilterID:1.0")) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("MyFID", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/Filter:1.0", "000000000000000E0000003B000000000000002749444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F46696C7465723A312E3000000000000746696C74657200", Filter) # Import base interface packages. import CosNotifyFilter class MappingFilter(Fnorb.orb.CORBA.Object, Interactive, CosNotifyFilter.MappingFilter): """ Interface: IDL:att.com/AttNotification/MappingFilter:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/MappingFilter:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/MappingFilter:1.0", "000000000000000E0000004A000000000000002E49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F4D617070696E6746696C7465723A312E300000000000000E4D617070696E6746696C74657200", MappingFilter) # Import base interface packages. import CosNotifyFilter class FilterFactory(Fnorb.orb.CORBA.Object, Interactive, CosNotifyFilter.FilterFactory): """ Interface: IDL:att.com/AttNotification/FilterFactory:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/FilterFactory:1.0" pass Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/FilterFactory:1.0", "000000000000000E0000004A000000000000002E49444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F46696C746572466163746F72793A312E300000000000000E46696C746572466163746F727900", FilterFactory) # Alias: IDL:att.com/AttNotification/ServerProperties:1.0 Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/ServerProperties:1.0", "000000000000001300000168000000000000000F00000158000000000000002949444C3A6F6D672E6F72672F436F734E6F74696669636174696F6E2F50726F70657274793A312E30000000000000000950726F70657274790000000000000002000000056E616D65000000000000001500000098000000000000002D49444C3A6F6D672E6F72672F436F734E6F74696669636174696F6E2F50726F70657274794E616D653A312E30000000000000000D50726F70657274794E616D65000000000000001500000044000000000000002849444C3A6F6D672E6F72672F436F734E6F74696669636174696F6E2F49737472696E673A312E30000000000849737472696E670000000012000000000000000676616C75650000000000001500000050000000000000002E49444C3A6F6D672E6F72672F436F734E6F74696669636174696F6E2F50726F706572747956616C75653A312E300000000000000E50726F706572747956616C75650000000000000B00000000", None) class UnsupportedServerProp(Fnorb.orb.CORBA.UserException): """ Exception: IDL:att.com/AttNotification/UnsupportedServerProp:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/UnsupportedServerProp:1.0" def __init__(self, _server_prop_err): """ Constructor. """ self.server_prop_err = _server_prop_err return def __getinitargs__(self): """ Return the constructor arguments for unpickling. """ return (self.server_prop_err,) Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/UnsupportedServerProp:1.0", "00000000000000160000041C000000000000003649444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F556E737570706F7274656453657276657250726F703A312E3000000000000016556E737570706F7274656453657276657250726F7000000000000001000000107365727665725F70726F705F6572720000000015000003A0000000000000003149444C3A6F6D672E6F72672F436F734E6F74696669636174696F6E2F50726F70657274794572726F725365713A312E30000000000000001150726F70657274794572726F72536571000000000000001300000344000000000000000F00000334000000000000002E49444C3A6F6D672E6F72672F436F734E6F74696669636174696F6E2F50726F70657274794572726F723A312E300000000000000E50726F70657274794572726F720000000000000300000005636F64650000000000000011000000EA000000000000002E49444C3A6F6D672E6F72672F436F734E6F74696669636174696F6E2F516F534572726F725F636F64653A312E300000000000000E516F534572726F725F636F64650000000000000700000015554E535550504F525445445F50524F50455254590000000000000015554E415641494C41424C455F50524F50455254590000000000000012554E535550504F525445445F56414C554500000000000012554E415641494C41424C455F56414C55450000000000000D4241445F50524F504552545900000000000000094241445F54595045000000000000000A4241445F56414C5545000000000000056E616D65000000000000001500000098000000000000002D49444C3A6F6D672E6F72672F436F734E6F74696669636174696F6E2F50726F70657274794E616D653A312E30000000000000000D50726F70657274794E616D65000000000000001500000044000000000000002849444C3A6F6D672E6F72672F436F734E6F74696669636174696F6E2F49737472696E673A312E30000000000849737472696E6700000000120000000000000010617661696C61626C655F72616E6765000000000F0000011C000000000000002E49444C3A6F6D672E6F72672F436F734E6F74696669636174696F6E2F50726F706572747952616E67653A312E300000000000000E50726F706572747952616E676500000000000002000000086C6F775F76616C000000001500000050000000000000002E49444C3A6F6D672E6F72672F436F734E6F74696669636174696F6E2F50726F706572747956616C75653A312E300000000000000E50726F706572747956616C75650000000000000B00000009686967685F76616C000000000000001500000050000000000000002E49444C3A6F6D672E6F72672F436F734E6F74696669636174696F6E2F50726F706572747956616C75653A312E300000000000000E50726F706572747956616C75650000000000000B00000000", UnsupportedServerProp) class Server(Fnorb.orb.CORBA.Object, Interactive): """ Interface: IDL:att.com/AttNotification/Server:1.0 """ _FNORB_ID = "IDL:att.com/AttNotification/Server:1.0" def destroy(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Server/destroy:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("destroy", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() def get_filter_factory(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Server/get_filter_factory:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.TC_Object) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("get_filter_factory", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() def get_channel_factory(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Server/get_channel_factory:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.TC_Object) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("get_channel_factory", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() def get_default_channel(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Server/get_default_channel:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.TC_Object) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("get_default_channel", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() def results_to_file(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Server/results_to_file:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.TC_boolean) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("results_to_file", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() def get_server_props(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Server/get_server_props:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] outputs.append(Fnorb.orb.CORBA.typecode("IDL:att.com/AttNotification/ServerProperties:1.0")) # Typecodes for user exceptions. exceptions = [] # Create a request object. request = self._create_request("get_server_props", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() def set_server_props(self, *args, **kw): """ Operation: IDL:att.com/AttNotification/Server/set_server_props:1.0 """ # Typecodes for 'in' and 'inout' parameters. inputs = [] inputs.append(Fnorb.orb.CORBA.typecode("IDL:att.com/AttNotification/ServerProperties:1.0")) # Typecodes for the result, 'inout' and 'out' parameters. outputs = [] # Typecodes for user exceptions. exceptions = [] exceptions.append(Fnorb.orb.CORBA.typecode("IDL:att.com/AttNotification/UnsupportedServerProp:1.0")) # Create a request object. request = self._create_request("set_server_props", inputs, outputs, exceptions) # Make the request! apply(request.invoke, args, kw) # Return the results. return request.results() Fnorb.orb.TypeManager.TypeManager_init().add_type("IDL:att.com/AttNotification/Server:1.0", "000000000000000E0000003B000000000000002749444C3A6174742E636F6D2F4174744E6F74696669636174696F6E2F5365727665723A312E3000000000000753657276657200", Server) #############################################################################
46.423729
2,261
0.780577
2,709
32,868
9.374677
0.062385
0.009057
0.039691
0.105843
0.587927
0.576193
0.517759
0.372893
0.334108
0.317609
0
0.263106
0.128332
32,868
707
2,262
46.489392
0.623316
0.21419
0
0.510791
1
0
0.466138
0.458442
0
1
0
0
0
1
0.071942
false
0.07554
0.100719
0
0.438849
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
1
0
0
1
null
1
0
0
0
0
0
0
1
0
0
0
0
0
6
10d0f7e95d8bcd3b794892efd28748c521446d81
6,179
py
Python
src/TeamProj/myapp/view/fileprivilege.py
DbettKK/1821-D4-backend
3c06dc8080b64baaeb1d9e2663d7ac0277ea2155
[ "MIT" ]
null
null
null
src/TeamProj/myapp/view/fileprivilege.py
DbettKK/1821-D4-backend
3c06dc8080b64baaeb1d9e2663d7ac0277ea2155
[ "MIT" ]
null
null
null
src/TeamProj/myapp/view/fileprivilege.py
DbettKK/1821-D4-backend
3c06dc8080b64baaeb1d9e2663d7ac0277ea2155
[ "MIT" ]
null
null
null
from rest_framework.views import APIView, Response from myapp.models import User, File, UserBrowseFile, UserKeptFile, Team, Comment from myapp.serializers import CommentSer, FileSer from myapp.views import chk_token from .userfile import chk_file_id class SetPriviFile(APIView): def post(self, request): token = request.META.get('HTTP_TOKEN') file_id = request.POST.get('file_id') privilege = request.POST.get('privilege') if not all([privilege, file_id]): return Response({ 'info': '参数不完整', 'code': 400 }, status=400) pri = int(privilege) if pri < 1 or pri > 4: return Response({ 'info': '权限有误', 'code': 403 }, status=403) user_id = chk_token(token) if isinstance(user_id, Response): return user_id # u = User.objects.get(pk=user_id) f = chk_file_id(file_id) if isinstance(f, Response): return f f.permission = pri f.save() return Response({ 'info': 'success', 'code': 200, 'data': FileSer(f).data }, status=200) class SetPriviFileTeam(APIView): def post(self, request): token = request.META.get('HTTP_TOKEN') file_id = request.POST.get('file_id') team_id = request.POST.get('team_id') privilege = request.POST.get('privilege') pri = int(privilege) if not all([team_id, privilege, file_id]): return Response({ 'info': '参数不完整', 'code': 400 }, status=400) if pri < 1 or pri > 4: return Response({ 'info': '权限有误', 'code': 403 }, status=403) user_id = chk_token(token) if isinstance(user_id, Response): return user_id f = chk_file_id(file_id) if isinstance(f, Response): return f if f.type != 'team': return Response({ 'info': '文档类型有误', 'code': 403 }, status=403) t = Team.objects.filter(pk=team_id) if t: f.team_permission = pri f.save() return Response({ 'info': 'success', 'code': 200, 'data': FileSer(f).data }, status=200) return Response({ 'info': '不存在该团队', 'code': 403 }, status=403) class ChangeTeamToPri(APIView): def get(self, request): token = request.META.get('HTTP_TOKEN') user_id = chk_token(token) file_id = request.GET.get('file_id') if isinstance(user_id, Response): return user_id u = User.objects.get(pk=user_id) f = chk_file_id(file_id) if f.type == 'team' or f.team_belong: f.team_belong = None f.type = 'private' f.save() return Response({ 'info': 'success', 'code': 200, 'data': FileSer(f).data }, status=200) return Response({ 'info': '文档类型有误', 'code': 403 }, status=403) class ChangePriToTeam(APIView): def get(self, request): token = request.META.get('HTTP_TOKEN') user_id = chk_token(token) file_id = request.GET.get('file_id') team_id = request.GET.get('team_id') if isinstance(user_id, Response): return user_id u = User.objects.get(pk=user_id) f = chk_file_id(file_id) if isinstance(f, Response): return f t = Team.objects.get(pk=team_id) f.type = 'team' f.team_belong = t f.save() return Response({ 'info': 'success', 'code': 200, 'data': FileSer(f).data }, status=200) class JudgePriviPri(APIView): def get(self, request): token = request.META.get('HTTP_TOKEN') user_id = chk_token(token) file_id = request.GET.get('file_id') if isinstance(user_id, Response): return user_id u = User.objects.get(pk=user_id) f = chk_file_id(file_id) if isinstance(f, Response): return f if f.creator.id == user_id: f.is_edit_now = True f.save() return Response({ 'info': 'success', 'code': 200, 'data': {'pri': 4} }, status=200) else: if f.permission >= 2: f.is_edit_now = True f.save() return Response({ 'info': 'success', 'code': 200, 'data': {'pri': f.permission} }, status=200) class JudgePriviTeam(APIView): def get(self, request): token = request.META.get('HTTP_TOKEN') user_id = chk_token(token) file_id = request.GET.get('file_id') if isinstance(user_id, Response): return user_id u = User.objects.get(pk=user_id) f = chk_file_id(file_id) if isinstance(f, Response): return f if f.type != 'team': return Response({ 'info': '非团队文档', 'code': 403, }, status=403) if f.team_belong.creator.id == user_id: f.is_edit_now = True f.save() return Response({ 'info': 'success', 'code': 200, 'data': {'pri': 4} }, status=200) if f.creator.id == user_id: f.is_edit_now = True f.save() return Response({ 'info': 'success', 'code': 200, 'data': {'pri': 4} }, status=200) else: if f.team_permission >= 2: f.is_edit_now = True f.save() return Response({ 'info': 'success', 'code': 200, 'data': {'pri': f.team_permission} }, status=200)
30.741294
80
0.486648
687
6,179
4.234352
0.114993
0.055689
0.105191
0.058783
0.797525
0.788587
0.756961
0.756961
0.741836
0.741836
0
0.029592
0.392944
6,179
200
81
30.895
0.745934
0.005179
0
0.823529
0
0
0.072905
0
0
0
0
0
0
1
0.032086
false
0
0.026738
0
0.240642
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
10e21e4da45c04da6110f5dc4a65f9d10a76975a
39
py
Python
axtoolbox/__init__.py
jcsgo/axtoolbox
cd4e433dbe224bf68f5f5ffbb481cf30e5aff5c1
[ "MIT" ]
null
null
null
axtoolbox/__init__.py
jcsgo/axtoolbox
cd4e433dbe224bf68f5f5ffbb481cf30e5aff5c1
[ "MIT" ]
null
null
null
axtoolbox/__init__.py
jcsgo/axtoolbox
cd4e433dbe224bf68f5f5ffbb481cf30e5aff5c1
[ "MIT" ]
null
null
null
from .core import * from .keys import *
19.5
19
0.717949
6
39
4.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.179487
39
2
20
19.5
0.875
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
10fdb6dca3a86dff1081c09a5168caf90b9a8bbd
4,794
py
Python
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES2/OES/texture_compression_astc.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES2/OES/texture_compression_astc.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES2/OES/texture_compression_astc.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLES2 import _types as _cs # End users want this... from OpenGL.raw.GLES2._types import * from OpenGL.raw.GLES2 import _errors from OpenGL.constant import Constant as _C import ctypes _EXTENSION_NAME = 'GLES2_OES_texture_compression_astc' def _f( function ): return _p.createFunction( function,_p.PLATFORM.GLES2,'GLES2_OES_texture_compression_astc',error_checker=_errors._error_checker) GL_COMPRESSED_RGBA_ASTC_10x10_KHR=_C('GL_COMPRESSED_RGBA_ASTC_10x10_KHR',0x93BB) GL_COMPRESSED_RGBA_ASTC_10x5_KHR=_C('GL_COMPRESSED_RGBA_ASTC_10x5_KHR',0x93B8) GL_COMPRESSED_RGBA_ASTC_10x6_KHR=_C('GL_COMPRESSED_RGBA_ASTC_10x6_KHR',0x93B9) GL_COMPRESSED_RGBA_ASTC_10x8_KHR=_C('GL_COMPRESSED_RGBA_ASTC_10x8_KHR',0x93BA) GL_COMPRESSED_RGBA_ASTC_12x10_KHR=_C('GL_COMPRESSED_RGBA_ASTC_12x10_KHR',0x93BC) GL_COMPRESSED_RGBA_ASTC_12x12_KHR=_C('GL_COMPRESSED_RGBA_ASTC_12x12_KHR',0x93BD) GL_COMPRESSED_RGBA_ASTC_3x3x3_OES=_C('GL_COMPRESSED_RGBA_ASTC_3x3x3_OES',0x93C0) GL_COMPRESSED_RGBA_ASTC_4x3x3_OES=_C('GL_COMPRESSED_RGBA_ASTC_4x3x3_OES',0x93C1) GL_COMPRESSED_RGBA_ASTC_4x4_KHR=_C('GL_COMPRESSED_RGBA_ASTC_4x4_KHR',0x93B0) GL_COMPRESSED_RGBA_ASTC_4x4x3_OES=_C('GL_COMPRESSED_RGBA_ASTC_4x4x3_OES',0x93C2) GL_COMPRESSED_RGBA_ASTC_4x4x4_OES=_C('GL_COMPRESSED_RGBA_ASTC_4x4x4_OES',0x93C3) GL_COMPRESSED_RGBA_ASTC_5x4_KHR=_C('GL_COMPRESSED_RGBA_ASTC_5x4_KHR',0x93B1) GL_COMPRESSED_RGBA_ASTC_5x4x4_OES=_C('GL_COMPRESSED_RGBA_ASTC_5x4x4_OES',0x93C4) GL_COMPRESSED_RGBA_ASTC_5x5_KHR=_C('GL_COMPRESSED_RGBA_ASTC_5x5_KHR',0x93B2) GL_COMPRESSED_RGBA_ASTC_5x5x4_OES=_C('GL_COMPRESSED_RGBA_ASTC_5x5x4_OES',0x93C5) GL_COMPRESSED_RGBA_ASTC_5x5x5_OES=_C('GL_COMPRESSED_RGBA_ASTC_5x5x5_OES',0x93C6) GL_COMPRESSED_RGBA_ASTC_6x5_KHR=_C('GL_COMPRESSED_RGBA_ASTC_6x5_KHR',0x93B3) GL_COMPRESSED_RGBA_ASTC_6x5x5_OES=_C('GL_COMPRESSED_RGBA_ASTC_6x5x5_OES',0x93C7) GL_COMPRESSED_RGBA_ASTC_6x6_KHR=_C('GL_COMPRESSED_RGBA_ASTC_6x6_KHR',0x93B4) GL_COMPRESSED_RGBA_ASTC_6x6x5_OES=_C('GL_COMPRESSED_RGBA_ASTC_6x6x5_OES',0x93C8) GL_COMPRESSED_RGBA_ASTC_6x6x6_OES=_C('GL_COMPRESSED_RGBA_ASTC_6x6x6_OES',0x93C9) GL_COMPRESSED_RGBA_ASTC_8x5_KHR=_C('GL_COMPRESSED_RGBA_ASTC_8x5_KHR',0x93B5) GL_COMPRESSED_RGBA_ASTC_8x6_KHR=_C('GL_COMPRESSED_RGBA_ASTC_8x6_KHR',0x93B6) GL_COMPRESSED_RGBA_ASTC_8x8_KHR=_C('GL_COMPRESSED_RGBA_ASTC_8x8_KHR',0x93B7) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR',0x93DB) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR',0x93D8) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR',0x93D9) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR',0x93DA) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR',0x93DC) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR',0x93DD) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES',0x93E0) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES',0x93E1) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR',0x93D0) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES',0x93E2) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES',0x93E3) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR',0x93D1) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES',0x93E4) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR',0x93D2) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES',0x93E5) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES',0x93E6) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR',0x93D3) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES',0x93E7) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR',0x93D4) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES',0x93E8) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES',0x93E9) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR',0x93D5) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR',0x93D6) GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR=_C('GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR',0x93D7)
76.095238
132
0.895494
799
4,794
4.622028
0.151439
0.311942
0.207961
0.259951
0.847549
0.811265
0.451124
0
0
0
0
0.119862
0.035878
4,794
62
133
77.322581
0.679143
0.020859
0
0
1
0
0.390571
0.390571
0
0
0.062284
0
0
1
0.017544
false
0
0.105263
0.017544
0.140351
0
0
0
0
null
1
1
1
1
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
6
804b1a25ca96b35d8f8c71bc827f5a35e30fea2e
41
py
Python
projects/databricks-cli/test.py
fleimgruber/python
2e735762c73651cffc027ca850b2a58d87d54b49
[ "Unlicense" ]
25
2021-10-30T19:54:59.000Z
2022-03-29T06:11:02.000Z
projects/databricks-cli/test.py
fleimgruber/python
2e735762c73651cffc027ca850b2a58d87d54b49
[ "Unlicense" ]
21
2021-10-19T01:09:38.000Z
2022-03-24T16:08:53.000Z
projects/databricks-cli/test.py
fleimgruber/python
2e735762c73651cffc027ca850b2a58d87d54b49
[ "Unlicense" ]
3
2022-01-25T20:25:13.000Z
2022-03-08T02:58:50.000Z
import databricks_cli import integration
13.666667
21
0.902439
5
41
7.2
0.8
0
0
0
0
0
0
0
0
0
0
0
0.097561
41
2
22
20.5
0.972973
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
3379bd34a10cfa2a0dd3b45ca89e5a2f502fbd20
215
py
Python
E-Boutique/src/product/admin.py
MDRCS/Fullstack-Django
20cbae6e1b70d7051662b579e7967061e529d71f
[ "MIT" ]
null
null
null
E-Boutique/src/product/admin.py
MDRCS/Fullstack-Django
20cbae6e1b70d7051662b579e7967061e529d71f
[ "MIT" ]
19
2020-07-14T07:04:43.000Z
2022-03-12T00:41:14.000Z
E-Boutique/src/product/admin.py
MDRCS/Fullstack-Django
20cbae6e1b70d7051662b579e7967061e529d71f
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Product, Category, Brand, ProductImages admin.site.register(Product) admin.site.register(Category) admin.site.register(Brand) admin.site.register(ProductImages)
26.875
59
0.827907
28
215
6.357143
0.428571
0.202247
0.382022
0
0
0
0
0
0
0
0
0
0.074419
215
7
60
30.714286
0.894472
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
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
1
0
1
0
0
0
0
6
33829c5ce9d8017f12b87ff6ade2573165f5aee1
1,720
py
Python
toir/formats/script/script/instructions/camera.py
FistingUranus/innocence-r
786e1fca75155027e5875363f0b17e7c3cdefced
[ "MIT" ]
2
2021-06-26T16:44:58.000Z
2021-09-09T22:32:13.000Z
toir/formats/script/script/instructions/camera.py
FistingUranus/innocence-r
786e1fca75155027e5875363f0b17e7c3cdefced
[ "MIT" ]
4
2021-08-29T18:12:17.000Z
2022-03-28T08:54:29.000Z
toir/formats/script/script/instructions/camera.py
FistingUranus/innocence-r
786e1fca75155027e5875363f0b17e7c3cdefced
[ "MIT" ]
3
2021-07-20T01:00:19.000Z
2021-09-09T22:32:14.000Z
from . import ScriptInstruction, ScriptInstructionWithArgs import struct class ScriptCameraDefault(ScriptInstruction): pass class ScriptCameraLockRelease(ScriptInstruction): pass class ScriptCameraSet(ScriptInstructionWithArgs): def __init__(self, opcode): super().__init__('<B', opcode) class ScriptCameraScenePlay(ScriptInstructionWithArgs): def __init__(self, opcode): super().__init__('<B', opcode) class ScriptCameraSceneWait(ScriptInstruction): pass class ScriptCameraLockPlayer(ScriptInstruction): pass class ScriptCameraLockObject(ScriptInstructionWithArgs): def __init__(self, opcode): super().__init__('<B', opcode) class ScriptCameraShake(ScriptInstructionWithArgs): def __init__(self, opcode): super().__init__('<HH', opcode) class ScriptCameraShakeWait(ScriptInstruction): pass class ScriptCameraMoveObject(ScriptInstructionWithArgs): def __init__(self, opcode): super().__init__('<BH', opcode) class ScriptCameraMovePoint(ScriptInstructionWithArgs): def __init__(self, opcode): super().__init__('<BH', opcode) class ScriptCameraMoveWait(ScriptInstruction): pass class ScriptCameraMovePlayer(ScriptInstructionWithArgs): def __init__(self, opcode): super().__init__('<H', opcode) class ScriptCameraMovePointSpeed(ScriptInstructionWithArgs): def __init__(self, opcode): super().__init__('<BL', opcode) class ScriptCameraMovePlayerSpeed(ScriptInstructionWithArgs): def __init__(self, opcode): super().__init__('<L', opcode) class ScriptCameraMoveObjectSpeed(ScriptInstructionWithArgs): def __init__(self, opcode): super().__init__('<BL', opcode)
28.196721
61
0.744767
140
1,720
8.578571
0.242857
0.233139
0.266445
0.29975
0.489592
0.489592
0.489592
0.362198
0.362198
0.263947
0
0
0.150581
1,720
60
62
28.666667
0.82204
0
0
0.522727
0
0
0.014535
0
0
0
0
0
0
1
0.227273
false
0.136364
0.045455
0
0.636364
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
1
0
1
0
0
1
0
0
6
33977c33810486c32858470c043be702fab8ea3c
109
py
Python
app/cogs/blacklist/__init__.py
fossabot/Starboard-2
798e2d04995ae7d920e76708b9ea8fae6f4af319
[ "MIT" ]
16
2021-01-19T19:12:00.000Z
2021-12-21T12:00:04.000Z
app/cogs/blacklist/__init__.py
Davi-the-Mudkip/Starboard-2
4de3c689ffef007e4f4a279251d107d890b69b15
[ "MIT" ]
15
2021-04-02T16:58:48.000Z
2022-03-28T06:09:49.000Z
app/cogs/blacklist/__init__.py
Davi-the-Mudkip/Starboard-2
4de3c689ffef007e4f4a279251d107d890b69b15
[ "MIT" ]
13
2021-01-21T14:26:00.000Z
2021-09-29T18:55:17.000Z
from app.classes.bot import Bot from . import bl_commands def setup(bot: Bot): bl_commands.setup(bot)
13.625
31
0.733945
18
109
4.333333
0.5
0.25641
0
0
0
0
0
0
0
0
0
0
0.174312
109
7
32
15.571429
0.866667
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.5
0
0.75
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
1
0
0
1
0
1
0
0
6
1d3665b4a1a2e43a597bed16a3b6448c58cbd1d4
52
py
Python
rcnn/modeling/uv_rcnn/heads/__init__.py
rs9899/Parsing-R-CNN
a0c9ed8850abe740eedf8bfc6e1577cc0aa3fc7b
[ "MIT" ]
289
2018-10-25T09:42:57.000Z
2022-03-30T08:31:50.000Z
rcnn/modeling/uv_rcnn/heads/__init__.py
qzane/Parsing-R-CNN
8c4d940dcd322bf7a8671f8b0faaabb3259bd384
[ "MIT" ]
28
2019-01-07T02:39:49.000Z
2022-01-25T08:54:36.000Z
rcnn/modeling/uv_rcnn/heads/__init__.py
qzane/Parsing-R-CNN
8c4d940dcd322bf7a8671f8b0faaabb3259bd384
[ "MIT" ]
44
2018-12-20T07:36:46.000Z
2022-03-16T14:30:20.000Z
from .convx_heads import * from .gce_heads import *
17.333333
26
0.769231
8
52
4.75
0.625
0.578947
0
0
0
0
0
0
0
0
0
0
0.153846
52
2
27
26
0.863636
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
1d5f8b3cfcddb2805f33de85f200898cf4dae7e7
44
py
Python
code/norm/io/__init__.py
danilonumeroso/norm
aebe8c6e186723ed048ad0a9c44fbf9c3e45a78b
[ "MIT" ]
1
2022-03-04T15:32:15.000Z
2022-03-04T15:32:15.000Z
code/norm/io/__init__.py
danilonumeroso/norm
aebe8c6e186723ed048ad0a9c44fbf9c3e45a78b
[ "MIT" ]
null
null
null
code/norm/io/__init__.py
danilonumeroso/norm
aebe8c6e186723ed048ad0a9c44fbf9c3e45a78b
[ "MIT" ]
null
null
null
from ._save import dump, load # noqa: F401
22
43
0.704545
7
44
4.285714
1
0
0
0
0
0
0
0
0
0
0
0.085714
0.204545
44
1
44
44
0.771429
0.227273
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
1d76c56a35ee5a0d658b631333f29677facd30ab
102
py
Python
intvalpy/__init__.py
SShary/intvalpy
42f4c8f6b23e6481f4032b0a0f7cc0d798fda3be
[ "MIT" ]
null
null
null
intvalpy/__init__.py
SShary/intvalpy
42f4c8f6b23e6481f4032b0a0f7cc0d798fda3be
[ "MIT" ]
null
null
null
intvalpy/__init__.py
SShary/intvalpy
42f4c8f6b23e6481f4032b0a0f7cc0d798fda3be
[ "MIT" ]
null
null
null
from .MyClass import Interval from .intoper import * from .linear import * from .nonlinear import *
14.571429
29
0.754902
13
102
5.923077
0.538462
0.25974
0
0
0
0
0
0
0
0
0
0
0.176471
102
6
30
17
0.916667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
d58a4069a1205f2b05ed9a4701040cbc53c300d4
203
py
Python
yaml2sbml/__init__.py
alex-treebeard/yaml2sbml
1afbc73b81f311e1eb852fde8b6760709639669a
[ "MIT" ]
null
null
null
yaml2sbml/__init__.py
alex-treebeard/yaml2sbml
1afbc73b81f311e1eb852fde8b6760709639669a
[ "MIT" ]
null
null
null
yaml2sbml/__init__.py
alex-treebeard/yaml2sbml
1afbc73b81f311e1eb852fde8b6760709639669a
[ "MIT" ]
null
null
null
from yaml2sbml.yaml2sbml import yaml2sbml from yaml2sbml.yaml2PEtab import yaml2petab, validate_petab_tables from yaml2sbml.yaml_validation import validate_yaml from yaml2sbml.YamlModel import YamlModel
40.6
66
0.891626
25
203
7.08
0.4
0.293785
0
0
0
0
0
0
0
0
0
0.043011
0.083744
203
4
67
50.75
0.908602
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
d59ea9aa03d8bdc8818ccecebd76da8cc739b696
74
py
Python
tests/models.py
meshy/django-sans-db
ee52199adb12f4235f0a8744acc30d8aaa89ad67
[ "MIT" ]
3
2021-12-16T22:28:06.000Z
2021-12-16T22:28:26.000Z
tests/models.py
meshy/django-sans-db
ee52199adb12f4235f0a8744acc30d8aaa89ad67
[ "MIT" ]
null
null
null
tests/models.py
meshy/django-sans-db
ee52199adb12f4235f0a8744acc30d8aaa89ad67
[ "MIT" ]
null
null
null
from django.db import models class ExampleModel(models.Model): pass
12.333333
33
0.756757
10
74
5.6
0.9
0
0
0
0
0
0
0
0
0
0
0
0.175676
74
5
34
14.8
0.918033
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
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
1
1
0
1
0
0
6
63419a6d90aa7a881a5c1673fb52a0d9b1b4d3fe
146
py
Python
extoracle/__init__.py
pltrdy/extoracle_summarization
a7d94edc6d06f08aca7a25009c479ef89319e3af
[ "Apache-2.0" ]
7
2020-08-12T10:56:00.000Z
2022-01-28T21:14:44.000Z
extoracle/__init__.py
pltrdy/extoracle_summarization
a7d94edc6d06f08aca7a25009c479ef89319e3af
[ "Apache-2.0" ]
2
2020-07-29T20:14:35.000Z
2021-12-15T05:33:22.000Z
extoracle/__init__.py
pltrdy/extoracle_summarization
a7d94edc6d06f08aca7a25009c479ef89319e3af
[ "Apache-2.0" ]
1
2020-10-23T16:05:09.000Z
2020-10-23T16:05:09.000Z
import extoracle # noqa import extoracle.utils # noqa import extoracle.bin # noqa from extoracle.extoracle import METHODS, from_files # noqa
24.333333
59
0.780822
19
146
5.947368
0.421053
0.39823
0.336283
0
0
0
0
0
0
0
0
0
0.164384
146
5
60
29.2
0.92623
0.130137
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
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
1
0
1
0
0
0
0
6
636705baadb550a7532d3b7f2d79f7c8fa64ebdc
28
py
Python
shake2py/__init__.py
markreidvfx/shake2py
8965727a3baf623e0b3c35a2c298142f80242550
[ "MIT" ]
1
2016-06-22T01:23:49.000Z
2016-06-22T01:23:49.000Z
shake2py/__init__.py
markreidvfx/shake2py
8965727a3baf623e0b3c35a2c298142f80242550
[ "MIT" ]
null
null
null
shake2py/__init__.py
markreidvfx/shake2py
8965727a3baf623e0b3c35a2c298142f80242550
[ "MIT" ]
null
null
null
from script_parser import *
14
27
0.821429
4
28
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
28
1
28
28
0.916667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
639197a41a6d451910701e7fa819f6abed4aaa0e
50
py
Python
ocrsite/ocrlab/tests/__init__.py
mikesname/python-ocrlab
435cc2548b38d92f8ffdc4bee8845f5a58d655ce
[ "MIT" ]
4
2016-01-04T09:36:05.000Z
2020-10-18T01:33:39.000Z
ocrsite/ocrlab/tests/__init__.py
mikesname/python-ocrlab
435cc2548b38d92f8ffdc4bee8845f5a58d655ce
[ "MIT" ]
null
null
null
ocrsite/ocrlab/tests/__init__.py
mikesname/python-ocrlab
435cc2548b38d92f8ffdc4bee8845f5a58d655ce
[ "MIT" ]
3
2017-05-04T08:46:45.000Z
2021-10-06T19:25:11.000Z
from test_core import * from test_nodes import *
12.5
24
0.78
8
50
4.625
0.625
0.432432
0
0
0
0
0
0
0
0
0
0
0.18
50
3
25
16.666667
0.902439
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
63940635c5e7acfab8123b4c675728b636dbb35d
32
py
Python
houndify/__init__.py
oyeun/houndify
559c1c5c9be678fa8d4f29e722d2e461d7cd5159
[ "MIT" ]
null
null
null
houndify/__init__.py
oyeun/houndify
559c1c5c9be678fa8d4f29e722d2e461d7cd5159
[ "MIT" ]
null
null
null
houndify/__init__.py
oyeun/houndify
559c1c5c9be678fa8d4f29e722d2e461d7cd5159
[ "MIT" ]
null
null
null
from houndify.houndify import *
16
31
0.8125
4
32
6.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.125
32
1
32
32
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
63b459186e50708df2ea53117aa9c2d459a390e9
44
py
Python
qcodes/utils/__init__.py
nulinspiratie/Qcodes
d050d38ac83f532523a39549c3247dfa6096a36e
[ "MIT" ]
2
2017-02-27T06:02:39.000Z
2019-06-03T04:56:59.000Z
qcodes/utils/__init__.py
nulinspiratie/Qcodes
d050d38ac83f532523a39549c3247dfa6096a36e
[ "MIT" ]
50
2017-04-12T04:03:15.000Z
2022-03-09T00:41:43.000Z
qcodes/utils/__init__.py
nulinspiratie/Qcodes
d050d38ac83f532523a39549c3247dfa6096a36e
[ "MIT" ]
null
null
null
from .helpers import * from .debug import *
14.666667
22
0.727273
6
44
5.333333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.181818
44
2
23
22
0.888889
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
89400dd27ad183fdf343400f5d8621570f2d42da
5,458
py
Python
utils/dataset.py
samiemostafavi/conditional-latency-probability-prediction
a196f2db8c6f30f8613797b6a23bffd77a01e1e3
[ "MIT" ]
null
null
null
utils/dataset.py
samiemostafavi/conditional-latency-probability-prediction
a196f2db8c6f30f8613797b6a23bffd77a01e1e3
[ "MIT" ]
null
null
null
utils/dataset.py
samiemostafavi/conditional-latency-probability-prediction
a196f2db8c6f30f8613797b6a23bffd77a01e1e3
[ "MIT" ]
null
null
null
import numpy as np import pyarrow as pa import pyarrow.parquet as pq import pyarrow.compute as pc import tensorflow as tf import tensorflow_io as tfio def parquet_tf_pipeline( file_addr, feature_names, label_name, dataset_size, train_size, batch_size, dtype=tf.float32, ): # We prefetch with a buffer the same size as the dataset because th dataset # is very small and fits into memory. dataset = ( tfio.IODataset.from_parquet( filename = file_addr, ) .prefetch(buffer_size=dataset_size) ) def read_parquet(features): # features is an OrderedDict # prepare empty tensors keys = tf.TensorArray(dtype=dtype, size=0, dynamic_size=True) values_dict = {} for a in features.items(): # look for the features for idx,feature_name in enumerate(feature_names): # a is a tuple, first item is the key, second is the tensor if a[0].decode("utf-8")==feature_name: values = tf.TensorArray(dtype=dtype, size=0, dynamic_size=True) values = values.write(values.size(), tf.cast(a[1],dtype=dtype)) # important to have the squeeze to get (None,) tensor shape values_dict[feature_name] = tf.squeeze(values.stack(),axis=0) # look for the keys if a[0].decode("utf-8")==label_name: keys = keys.write(keys.size(), tf.cast(a[1],dtype=dtype)) # important to have the squeeze to get (None,) tensor shape return (values_dict, tf.squeeze(keys.stack(),axis=0)) dataset = dataset.map(read_parquet) # We shuffle with a buffer the same size as the dataset. train_dataset = ( dataset.take(train_size).cache().shuffle(buffer_size=train_size).batch(batch_size) ) test_dataset = dataset.skip(train_size).take(dataset_size-train_size).cache().shuffle(buffer_size=train_size).batch(batch_size) # to check what is being read: #for ds in train_dataset: # print(tfds.as_numpy(ds)) #for ds in test_dataset: # print(tfds.as_numpy(ds)) return train_dataset, test_dataset def parquet_tf_pipeline_2( file_addr, feature_names, label_name, dataset_size, train_size, batch_size, dtype=tf.float32, ): # We prefetch with a buffer the same size as the dataset because th dataset # is very small and fits into memory. dataset = ( tfio.IODataset.from_parquet( filename = file_addr, ) .prefetch(buffer_size=dataset_size) ) def read_parquet(features): # features is an OrderedDict # prepare empty tensors keys = tf.TensorArray(dtype=dtype, size=0, dynamic_size=True) values_dict = {} for a in features.items(): # look for the features for idx,feature_name in enumerate(feature_names): # a is a tuple, first item is the key, second is the tensor if a[0].decode("utf-8")==feature_name: values = tf.TensorArray(dtype=dtype, size=0, dynamic_size=True) values = values.write(values.size(), tf.cast(a[1],dtype=dtype)) # important to have the squeeze to get (None,) tensor shape values_dict[feature_name] = tf.squeeze(values.stack(),axis=0) # look for the keys if a[0].decode("utf-8")==label_name: keys = tf.TensorArray(dtype=dtype, size=0, dynamic_size=True) keys = keys.write(keys.size(), tf.cast(a[1],dtype=dtype)) values_dict['y_input'] = tf.squeeze(keys.stack(),axis=0) # important to have the squeeze to get (None,) tensor shape return (values_dict, tf.squeeze(keys.stack(),axis=0)) dataset = dataset.map(read_parquet) # We shuffle with a buffer the same size as the dataset. train_dataset = ( dataset.take(train_size).cache().shuffle(buffer_size=train_size).batch(batch_size) ) test_dataset = dataset.skip(train_size).take(dataset_size-train_size).cache().shuffle(buffer_size=train_size).batch(batch_size) # to check what is being read: #for ds in train_dataset: # print(tfds.as_numpy(ds)) #for ds in test_dataset: # print(tfds.as_numpy(ds)) return train_dataset, test_dataset def create_dataset(n_samples = 300, x_dim=3, x_max = 10, x_level=2, dtype = 'float64', dist = 'normal'): # generate random sample, two components X = np.array(np.random.randint(x_max, size=(n_samples, x_dim))*x_level).astype(dtype) if dist is 'normal': Y = np.array([ np.random.normal(loc=x_sample[0]+x_sample[1]+x_sample[2],scale=(x_sample[0]+x_sample[1]+x_sample[2])/5) for x_sample in X ] ).astype(dtype) elif dist is 'gamma': Y = np.array([ np.random.gamma(shape=x_sample[0]+x_sample[1]+x_sample[2],scale=(x_sample[0]+x_sample[1]+x_sample[2])/5) for x_sample in X ] ).astype(dtype) return X,Y """ load parquet dataset """ def load_parquet(file_addresses, read_columns=None): table = pa.concat_tables( pq.read_table( file_address,columns=read_columns, ) for file_address in file_addresses ) return table.to_pandas()
34.544304
131
0.619641
759
5,458
4.295125
0.183136
0.030061
0.031902
0.033129
0.828834
0.819018
0.811963
0.811963
0.811963
0.811963
0
0.012626
0.27446
5,458
157
132
34.764331
0.810606
0.212166
0
0.677083
0
0
0.012028
0
0
0
0
0
0
1
0.0625
false
0
0.0625
0
0.1875
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
89b2c76ff6bdb36e8b1787d6f3e9014856ae1f57
44
py
Python
src/__init__.py
0xffea/ray-rate-limiter
0898a7813af87bba1f0fae42ea198e17931f1003
[ "MIT" ]
null
null
null
src/__init__.py
0xffea/ray-rate-limiter
0898a7813af87bba1f0fae42ea198e17931f1003
[ "MIT" ]
null
null
null
src/__init__.py
0xffea/ray-rate-limiter
0898a7813af87bba1f0fae42ea198e17931f1003
[ "MIT" ]
null
null
null
from .leaky_bucket import LeakyBucketActor
14.666667
42
0.863636
5
44
7.4
1
0
0
0
0
0
0
0
0
0
0
0
0.113636
44
2
43
22
0.948718
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
9864249786cf44ebdab11a5c8680e377eeb4dee7
101
py
Python
argparse_compat.py
gares/coq-tools
f270f5ad7e09661e191499bc028165e71300b157
[ "MIT" ]
31
2015-11-28T18:23:20.000Z
2022-02-14T16:40:06.000Z
argparse_compat.py
gares/coq-tools
f270f5ad7e09661e191499bc028165e71300b157
[ "MIT" ]
88
2015-02-11T18:37:36.000Z
2022-03-02T01:09:04.000Z
argparse_compat.py
gares/coq-tools
f270f5ad7e09661e191499bc028165e71300b157
[ "MIT" ]
5
2015-07-07T15:08:09.000Z
2021-04-07T01:08:57.000Z
import sys if sys.version_info < (3,): import argparse_py2 as argparse else: import argparse
16.833333
35
0.722772
15
101
4.733333
0.666667
0.394366
0
0
0
0
0
0
0
0
0
0.025
0.207921
101
5
36
20.2
0.8625
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.6
0
0.6
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
1
0
1
0
1
0
0
6
7f2644e4b51ca3d29d0943c07e14ce3da4a78623
170
py
Python
accounts/forms.py
VanWade/spinach
1da5fe554e1572729c92fc6b0f39a50e286e50d2
[ "Apache-2.0" ]
null
null
null
accounts/forms.py
VanWade/spinach
1da5fe554e1572729c92fc6b0f39a50e286e50d2
[ "Apache-2.0" ]
null
null
null
accounts/forms.py
VanWade/spinach
1da5fe554e1572729c92fc6b0f39a50e286e50d2
[ "Apache-2.0" ]
null
null
null
import re from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django.conf import settings
21.25
55
0.835294
26
170
5.384615
0.615385
0.285714
0
0
0
0
0
0
0
0
0
0
0.129412
170
7
56
24.285714
0.945946
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
7f5f389161ab9a2cd6a4612c725122cb7e67860c
215
py
Python
backend/chat_user_profile/admin.py
crowdbotics-apps/dsfs-28863
fea2672275927bd37d23e2267273e0eae54340d2
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/chat_user_profile/admin.py
crowdbotics-apps/dsfs-28863
fea2672275927bd37d23e2267273e0eae54340d2
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/chat_user_profile/admin.py
crowdbotics-apps/dsfs-28863
fea2672275927bd37d23e2267273e0eae54340d2
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.contrib import admin from .models import Profile, Contact, VerificationCode admin.site.register(VerificationCode) admin.site.register(Profile) admin.site.register(Contact) # Register your models here.
23.888889
54
0.823256
27
215
6.555556
0.481481
0.152542
0.288136
0.372881
0
0
0
0
0
0
0
0
0.093023
215
8
55
26.875
0.907692
0.12093
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
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
1
0
1
0
0
0
0
6
7f75c77d3c83283bd682402cd89d9cc661b4f2a9
25
py
Python
bpemb/__init__.py
hartb/bpemb
c2f26483e61ccf8c169cd83bf316221c3226106c
[ "MIT" ]
1,080
2017-10-09T14:04:42.000Z
2022-03-24T06:10:56.000Z
bpemb/__init__.py
hartb/bpemb
c2f26483e61ccf8c169cd83bf316221c3226106c
[ "MIT" ]
60
2017-10-11T18:46:07.000Z
2021-12-09T09:15:05.000Z
bpemb/__init__.py
hartb/bpemb
c2f26483e61ccf8c169cd83bf316221c3226106c
[ "MIT" ]
87
2017-10-27T09:18:00.000Z
2022-03-20T00:43:39.000Z
from .bpemb import BPEmb
12.5
24
0.8
4
25
5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.16
25
1
25
25
0.952381
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
f68ad151d2faecc23e208fbbd5db55d75173efe9
1,916
py
Python
src/conductor/client/http/models/__init__.py
conductor-sdk/conductor-python
b3e4e0ae196f9963316a829fe42d9e7e01a390e2
[ "Apache-2.0" ]
3
2022-03-10T18:24:46.000Z
2022-03-22T20:49:30.000Z
src/conductor/client/http/models/__init__.py
conductor-sdk/conductor-python
b3e4e0ae196f9963316a829fe42d9e7e01a390e2
[ "Apache-2.0" ]
6
2022-03-08T17:48:28.000Z
2022-03-30T00:39:22.000Z
src/conductor/client/http/models/__init__.py
conductor-sdk/conductor-python
b3e4e0ae196f9963316a829fe42d9e7e01a390e2
[ "Apache-2.0" ]
null
null
null
from conductor.client.http.models.action import Action from conductor.client.http.models.bulk_response import BulkResponse from conductor.client.http.models.event_handler import EventHandler from conductor.client.http.models.external_storage_location import ExternalStorageLocation from conductor.client.http.models.health import Health from conductor.client.http.models.health_check_status import HealthCheckStatus from conductor.client.http.models.poll_data import PollData from conductor.client.http.models.rerun_workflow_request import RerunWorkflowRequest from conductor.client.http.models.search_result_task import SearchResultTask from conductor.client.http.models.search_result_task_summary import SearchResultTaskSummary from conductor.client.http.models.search_result_workflow import SearchResultWorkflow from conductor.client.http.models.search_result_workflow_summary import SearchResultWorkflowSummary from conductor.client.http.models.skip_task_request import SkipTaskRequest from conductor.client.http.models.start_workflow import StartWorkflow from conductor.client.http.models.start_workflow_request import StartWorkflowRequest from conductor.client.http.models.sub_workflow_params import SubWorkflowParams from conductor.client.http.models.task import Task from conductor.client.http.models.task_def import TaskDef from conductor.client.http.models.task_details import TaskDetails from conductor.client.http.models.task_exec_log import TaskExecLog from conductor.client.http.models.task_result import TaskResult from conductor.client.http.models.task_summary import TaskSummary from conductor.client.http.models.token import Token from conductor.client.http.models.workflow import Workflow from conductor.client.http.models.workflow_def import WorkflowDef from conductor.client.http.models.workflow_summary import WorkflowSummary from conductor.client.http.models.workflow_task import WorkflowTask
68.428571
99
0.887265
251
1,916
6.633466
0.227092
0.210811
0.308108
0.372973
0.56997
0.413213
0.163363
0.112913
0
0
0
0
0.056367
1,916
27
100
70.962963
0.920907
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
f691ea5f2f8fc99d89c9ef6d51d9219dfc37103b
123,636
py
Python
examples/readJson.py
pexip/os-pyparsing
e7230e6d9dbd50defeb1c1f1f74296c0d4c8db42
[ "MIT" ]
1
2019-01-06T21:51:21.000Z
2019-01-06T21:51:21.000Z
examples/readJson.py
pexip/os-pyparsing
e7230e6d9dbd50defeb1c1f1f74296c0d4c8db42
[ "MIT" ]
1
2019-08-24T21:25:49.000Z
2019-08-26T22:44:40.000Z
examples/readJson.py
pexip/os-pyparsing
e7230e6d9dbd50defeb1c1f1f74296c0d4c8db42
[ "MIT" ]
2
2019-03-21T03:47:03.000Z
2019-09-30T23:59:22.000Z
#~ url = "http://cmsdoc.cern.ch/cms/test/aprom/phedex/dev/gowri/datasvc/tbedi/requestDetails" #~ params = {'format':'json'} #~ import urllib #~ eparams = urllib.urlencode(params) #~ import urllib2 #~ request = urllib2.Request(url,eparams) #~ response = urllib2.urlopen(request) #~ s = response.read() #~ response.close() #~ print s s = """ {"phedex":{"request":[{"last_update":"1188037561", "numofapproved":"1", "id":"7425"}, {"last_update":"1188751826", "numofapproved":"1", "id":"8041"}, {"last_update":"1190116795", "numofapproved":"1", "id":"9281"}, {"last_update":"1190248781", "numofapproved":"1", "id":"9521"}, {"last_update":"1192615612", "numofapproved":"1", "id":"12821"}, {"last_update":"1192729887", "numofapproved":"1", "id":"13121"}, {"last_update":"1193152971", "numofapproved":"1", "id":"13501"}, {"last_update":"1194022054", "numofapproved":"1", "id":"14782"}, {"last_update":"1194429365", "numofapproved":"1", "id":"15081"}, {"last_update":"1195069848", "numofapproved":"1", "id":"16661"}, {"last_update":"1178403225", "numofapproved":"1", "id":"1281"}, {"last_update":"1179239056", "numofapproved":"1", "id":"1387"}, {"last_update":"1179842205", "numofapproved":"1", "id":"1665"}, {"last_update":"1179842040", "numofapproved":"1", "id":"1661"}, {"last_update":"1179935333", "numofapproved":"1", "id":"1741"}, {"last_update":"1183151195", "numofapproved":"1", "id":"3841"}, {"last_update":"1187031531", "numofapproved":"1", "id":"6601"}, {"last_update":"1188820478", "numofapproved":"1", "id":"8121"}, {"last_update":"1190652719", "numofapproved":"1", "id":"9983"}, {"last_update":"1192628950", "numofapproved":"1", "id":"12841"}, {"last_update":"1193075426", "numofapproved":"1", "id":"13341"}, {"last_update":"1194214609", "numofapproved":"1", "id":"14882"}, {"last_update":"1194387864", "numofapproved":"1", "id":"15062"}, {"last_update":"1195134504", "numofapproved":"1", "id":"16741"}, {"last_update":"1182431453", "numofapproved":"1", "id":"3421"}, {"last_update":"1183448188", "numofapproved":"1", "id":"4061"}, {"last_update":"1184588081", "numofapproved":"1", "id":"4908"}, {"last_update":"1184681258", "numofapproved":"1", "id":"4913"}, {"last_update":"1188039048", "numofapproved":"1", "id":"7426"}, {"last_update":"1192699041", "numofapproved":"1", "id":"12982"}, {"last_update":"1193219685", "numofapproved":"1", "id":"13529"}, {"last_update":"1193401408", "numofapproved":"1", "id":"14081"}, {"last_update":"1194454724", "numofapproved":"1", "id":"15201"}, {"last_update":"1194937690", "numofapproved":"1", "id":"16044"}, {"last_update":"1194947125", "numofapproved":"1", "id":"16103"}, {"last_update":"1195134890", "numofapproved":"1", "id":"16761"}, {"last_update":"1195486898", "numofapproved":"1", "id":"17301"}, {"last_update":"1195497774", "numofapproved":"1", "id":"17341"}, {"last_update":"1184744080", "numofapproved":"1", "id":"4941"}, {"last_update":"1186558911", "numofapproved":"1", "id":"6321"}, {"last_update":"1189524520", "numofapproved":"1", "id":"8802"}, {"last_update":"1192683178", "numofapproved":"1", "id":"12921"}, {"last_update":"1193260655", "numofapproved":"1", "id":"13530"}, {"last_update":"1194280038", "numofapproved":"1", "id":"15002"}, {"last_update":"1182077478", "numofapproved":"1", "id":"3162"}, {"last_update":"1183386650", "numofapproved":"1", "id":"3961"}, {"last_update":"1192063369", "numofapproved":"1", "id":"12182"}, {"last_update":"1181931262", "numofapproved":"1", "id":"3101"}, {"last_update":"1178648271", "numofapproved":"1", "id":"1308"}, {"last_update":"1179239923", "numofapproved":"1", "id":"1405"}, {"last_update":"1184370745", "numofapproved":"1", "id":"4861"}, {"last_update":"1185280568", "numofapproved":"1", "id":"5302"}, {"last_update":"1187875115", "numofapproved":"1", "id":"7344"}, {"last_update":"1189140441", "numofapproved":"1", "id":"8541"}, {"last_update":"1189180903", "numofapproved":"1", "id":"8661"}, {"last_update":"1189767643", "numofapproved":"1", "id":"9001"}, {"last_update":"1190726167", "numofapproved":"1", "id":"10101"}, {"last_update":"1190972990", "numofapproved":"1", "id":"10661"}, {"last_update":"1190990720", "numofapproved":"1", "id":"10712"}, {"last_update":"1192004838", "numofapproved":"1", "id":"12021"}, {"last_update":"1192612211", "numofapproved":"1", "id":"12803"}, {"last_update":"1194441407", "numofapproved":"1", "id":"15103"}, {"last_update":"1194792356", "numofapproved":"1", "id":"15681"}, {"last_update":"1194860650", "numofapproved":"1", "id":"15801"}, {"last_update":"1194877395", "numofapproved":"1", "id":"15881"}, {"last_update":"1194950552", "numofapproved":"1", "id":"16124"}, {"last_update":"1194992714", "numofapproved":"1", "id":"16421"}, {"last_update":"1195054500", "numofapproved":"1", "id":"16581"}, {"last_update":"1195228524", "numofapproved":"1", "id":"17001"}, {"last_update":"1195469382", "numofapproved":"1", "id":"17161"}, {"last_update":"1178035947", "numofapproved":"1", "id":"1202"}, {"last_update":"1178869668", "numofapproved":"1", "id":"1356"}, {"last_update":"1183563268", "numofapproved":"1", "id":"4201"}, {"last_update":"1185314677", "numofapproved":"1", "id":"5361"}, {"last_update":"1188467567", "numofapproved":"1", "id":"7781"}, {"last_update":"1190011821", "numofapproved":"1", "id":"9202"}, {"last_update":"1190206214", "numofapproved":"1", "id":"9481"}, {"last_update":"1190973037", "numofapproved":"1", "id":"10663"}, {"last_update":"1190819127", "numofapproved":"1", "id":"10342"}, {"last_update":"1192154959", "numofapproved":"1", "id":"12381"}, {"last_update":"1192634509", "numofapproved":"1", "id":"12862"}, {"last_update":"1194004677", "numofapproved":"1", "id":"14722"}, {"last_update":"1195548191", "numofapproved":"1", "id":"17501"}, {"last_update":"1195548953", "numofapproved":"1", "id":"17502"}, {"last_update":"1195559809", "numofapproved":"1", "id":"17541"}, {"last_update":"1177589103", "numofapproved":"1", "id":"1044"}, {"last_update":"1183416879", "numofapproved":"1", "id":"4041"}, {"last_update":"1186646977", "numofapproved":"1", "id":"6342"}, {"last_update":"1189656586", "numofapproved":"1", "id":"8902"}, {"last_update":"1190150645", "numofapproved":"1", "id":"9421"}, {"last_update":"1190409040", "numofapproved":"1", "id":"9741"}, {"last_update":"1190973011", "numofapproved":"1", "id":"10662"}, {"last_update":"1190993896", "numofapproved":"1", "id":"10761"}, {"last_update":"1193973610", "numofapproved":"1", "id":"14661"}, {"last_update":"1193973848", "numofapproved":"1", "id":"14664"}, {"last_update":"1194539978", "numofapproved":"1", "id":"15381"}, {"last_update":"1194947356", "numofapproved":"1", "id":"16105"}, {"last_update":"1195399589", "numofapproved":"1", "id":"17101"}, {"last_update":"1195464953", "numofapproved":"1", "id":"17141"}, {"last_update":"1171962221", "numofapproved":"1", "id":"109"}, {"last_update":"1173113812", "numofapproved":"1", "id":"247"}, {"last_update":"1173975435", "numofapproved":"1", "id":"343"}, {"last_update":"1174050971", "numofapproved":"1", "id":"353"}, {"last_update":"1174301484", "numofapproved":"1", "id":"393"}, {"last_update":"1172565853", "numofapproved":"1", "id":"208"}, {"last_update":"1172593328", "numofapproved":"1", "id":"215"}, {"last_update":"1175267391", "numofapproved":"1", "id":"565"}, {"last_update":"1171379845", "numofapproved":"1", "id":"25"}, {"last_update":"1171477466", "numofapproved":"1", "id":"53"}, {"last_update":"1171799296", "numofapproved":"1", "id":"77"}, {"last_update":"1172671474", "numofapproved":"1", "id":"223"}, {"last_update":"1174301354", "numofapproved":"1", "id":"388"}, {"last_update":"1174899552", "numofapproved":"1", "id":"511"}, {"last_update":"1174899458", "numofapproved":"1", "id":"505"}, {"last_update":"1175502936", "numofapproved":"1", "id":"604"}, {"last_update":"1175613825", "numofapproved":"1", "id":"665"}, {"last_update":"1175776232", "numofapproved":"1", "id":"673"}, {"last_update":"1171621302", "numofapproved":"1", "id":"68"}, {"last_update":"1171904738", "numofapproved":"1", "id":"98"}, {"last_update":"1171968012", "numofapproved":"1", "id":"115"}, {"last_update":"1172145037", "numofapproved":"1", "id":"168"}, {"last_update":"1172246599", "numofapproved":"1", "id":"185"}, {"last_update":"1173886280", "numofapproved":"1", "id":"318"}, {"last_update":"1174562010", "numofapproved":"1", "id":"423"}, {"last_update":"1176308974", "numofapproved":"1", "id":"884"}, {"last_update":"1176482150", "numofapproved":"1", "id":"943"}, {"last_update":"1176702424", "numofapproved":"1", "id":"1001"}, {"last_update":"1176748776", "numofapproved":"1", "id":"984"}, {"last_update":"1172669745", "numofapproved":"1", "id":"222"}, {"last_update":"1174899538", "numofapproved":"1", "id":"510"}, {"last_update":"1174899143", "numofapproved":"1", "id":"493"}, {"last_update":"1174899043", "numofapproved":"1", "id":"488"}, {"last_update":"1175711780", "numofapproved":"1", "id":"667"}, {"last_update":"1175712851", "numofapproved":"1", "id":"705"}, {"last_update":"1176296548", "numofapproved":"1", "id":"841"}, {"last_update":"1175862269", "numofapproved":"1", "id":"781"}, {"last_update":"1171483107", "numofapproved":"1", "id":"54"}, {"last_update":"1171645737", "numofapproved":"1", "id":"71"}, {"last_update":"1172253423", "numofapproved":"1", "id":"188"}, {"last_update":"1173888726", "numofapproved":"1", "id":"321"}, {"last_update":"1173975649", "numofapproved":"1", "id":"346"}, {"last_update":"1174299379", "numofapproved":"1", "id":"363"}, {"last_update":"1174301359", "numofapproved":"1", "id":"389"}, {"last_update":"1174301073", "numofapproved":"1", "id":"379"}, {"last_update":"1174300650", "numofapproved":"1", "id":"371"}, {"last_update":"1171485069", "numofapproved":"1", "id":"55"}, {"last_update":"1171799178", "numofapproved":"1", "id":"73"}, {"last_update":"1171896809", "numofapproved":"1", "id":"95"}, {"last_update":"1172672959", "numofapproved":"1", "id":"224"}, {"last_update":"1172693619", "numofapproved":"1", "id":"230"}, {"last_update":"1173207656", "numofapproved":"1", "id":"253"}, {"last_update":"1174059533", "numofapproved":"1", "id":"356"}, {"last_update":"1174300538", "numofapproved":"1", "id":"368"}, {"last_update":"1176137457", "numofapproved":"1", "id":"807"}, {"last_update":"1173728124", "numofapproved":"1", "id":"305"}, {"last_update":"1172507633", "numofapproved":"1", "id":"198"}, {"last_update":"1174301173", "numofapproved":"1", "id":"383"}, {"last_update":"1174899102", "numofapproved":"1", "id":"491"}, {"last_update":"1174301362", "numofapproved":"1", "id":"390"}, {"last_update":"1175254095", "numofapproved":"1", "id":"561"}, {"last_update":"1174037250", "numofapproved":"1", "id":"348"}, {"last_update":"1175865081", "numofapproved":"1", "id":"782"}, {"last_update":"1177591942", "numofapproved":"1", "id":"1046"}, {"last_update":"1177989191", "numofapproved":"1", "id":"1201"}, {"last_update":"1178743279", "numofapproved":"1", "id":"1323"}, {"last_update":"1178876587", "numofapproved":"1", "id":"1357"}, {"last_update":"1179239620", "numofapproved":"1", "id":"1401"}, {"last_update":"1180725458", "numofapproved":"1", "id":"2141"}, {"last_update":"1181205209", "numofapproved":"1", "id":"2421"}, {"last_update":"1181575615", "numofapproved":"1", "id":"2761"}, {"last_update":"1182184775", "numofapproved":"1", "id":"3201"}, {"last_update":"1182963728", "numofapproved":"1", "id":"3661"}, {"last_update":"1178727735", "numofapproved":"1", "id":"1349"}, {"last_update":"1182497720", "numofapproved":"1", "id":"3441"}, {"last_update":"1184381847", "numofapproved":"1", "id":"4881"}, {"last_update":"1184568423", "numofapproved":"1", "id":"4904"}, {"last_update":"1185364813", "numofapproved":"1", "id":"5421"}, {"last_update":"1188043594", "numofapproved":"1", "id":"7441"}, {"last_update":"1188675287", "numofapproved":"1", "id":"7981"}, {"last_update":"1188741594", "numofapproved":"1", "id":"8021"}, {"last_update":"1189144234", "numofapproved":"1", "id":"8561"}, {"last_update":"1189170150", "numofapproved":"1", "id":"8641"}, {"last_update":"1189501508", "numofapproved":"1", "id":"8761"}, {"last_update":"1189811918", "numofapproved":"1", "id":"9041"}, {"last_update":"1189812095", "numofapproved":"1", "id":"9042"}, {"last_update":"1177591716", "numofapproved":"1", "id":"1045"}, {"last_update":"1178040595", "numofapproved":"1", "id":"1203"}, {"last_update":"1182437936", "numofapproved":"1", "id":"3423"}, {"last_update":"1190480042", "numofapproved":"1", "id":"9781"}, {"last_update":"1190821494", "numofapproved":"1", "id":"10361"}, {"last_update":"1190959672", "numofapproved":"1", "id":"10602"}, {"last_update":"1190964023", "numofapproved":"1", "id":"10621"}, {"last_update":"1190991147", "numofapproved":"1", "id":"10721"}, {"last_update":"1190992132", "numofapproved":"1", "id":"10741"}, {"last_update":"1190990410", "numofapproved":"1", "id":"10706"}, {"last_update":"1181667132", "numofapproved":"1", "id":"2861"}, {"last_update":"1183746653", "numofapproved":"1", "id":"4321"}, {"last_update":"1191184539", "numofapproved":"1", "id":"10861"}, {"last_update":"1191490599", "numofapproved":"1", "id":"11261"}, {"last_update":"1191834884", "numofapproved":"1", "id":"11801"}, {"last_update":"1191834899", "numofapproved":"1", "id":"11802"}, {"last_update":"1191940759", "numofapproved":"1", "id":"11961"}, {"last_update":"1179971250", "numofapproved":"1", "id":"1643"}, {"last_update":"1181663618", "numofapproved":"1", "id":"2841"}, {"last_update":"1181932994", "numofapproved":"1", "id":"3102"}, {"last_update":"1182420732", "numofapproved":"1", "id":"3382"}, {"last_update":"1192118127", "numofapproved":"1", "id":"12281"}, {"last_update":"1192222036", "numofapproved":"1", "id":"12481"}, {"last_update":"1192155814", "numofapproved":"1", "id":"12364"}, {"last_update":"1192563924", "numofapproved":"1", "id":"12761"}, {"last_update":"1193124530", "numofapproved":"1", "id":"13441"}, {"last_update":"1193345545", "numofapproved":"1", "id":"13921"}, {"last_update":"1193396927", "numofapproved":"1", "id":"14041"}, {"last_update":"1180015411", "numofapproved":"1", "id":"1651"}, {"last_update":"1180107815", "numofapproved":"1", "id":"1658"}, {"last_update":"1186050394", "numofapproved":"1", "id":"6021"}, {"last_update":"1188519417", "numofapproved":"1", "id":"7841"}, {"last_update":"1193222002", "numofapproved":"1", "id":"13541"}, {"last_update":"1193965081", "numofapproved":"1", "id":"14641"}, {"last_update":"1193660582", "numofapproved":"1", "id":"14381"}, {"last_update":"1194088240", "numofapproved":"1", "id":"14821"}, {"last_update":"1194110475", "numofapproved":"1", "id":"14841"}, {"last_update":"1194246367", "numofapproved":"1", "id":"14902"}, {"last_update":"1194464283", "numofapproved":"1", "id":"15221"}, {"last_update":"1194622250", "numofapproved":"1", "id":"15461"}, {"last_update":"1194635632", "numofapproved":"1", "id":"15601"}, {"last_update":"1179147506", "numofapproved":"1", "id":"1382"}, {"last_update":"1179240025", "numofapproved":"1", "id":"1388"}, {"last_update":"1179748089", "numofapproved":"1", "id":"1561"}, {"last_update":"1179868997", "numofapproved":"1", "id":"1681"}, {"last_update":"1183019667", "numofapproved":"1", "id":"3702"}, {"last_update":"1184531598", "numofapproved":"1", "id":"4902"}, {"last_update":"1187294472", "numofapproved":"1", "id":"6841"}, {"last_update":"1189521494", "numofapproved":"1", "id":"8801"}, {"last_update":"1192726867", "numofapproved":"1", "id":"13081"}, {"last_update":"1193049178", "numofapproved":"1", "id":"13301"}, {"last_update":"1193387050", "numofapproved":"1", "id":"13947"}, {"last_update":"1194277280", "numofapproved":"1", "id":"14981"}, {"last_update":"1179150720", "numofapproved":"1", "id":"1383"}, {"last_update":"1179842104", "numofapproved":"1", "id":"1663"}, {"last_update":"1183766887", "numofapproved":"1", "id":"4341"}, {"last_update":"1185542132", "numofapproved":"1", "id":"5682"}, {"last_update":"1186737114", "numofapproved":"1", "id":"6382"}, {"last_update":"1187015679", "numofapproved":"1", "id":"6521"}, {"last_update":"1190326980", "numofapproved":"1", "id":"9641"}, {"last_update":"1191595711", "numofapproved":"1", "id":"11622"}, {"last_update":"1192106288", "numofapproved":"1", "id":"12221"}, {"last_update":"1192454432", "numofapproved":"1", "id":"12622"}, {"last_update":"1194339640", "numofapproved":"1", "id":"15021"}, {"last_update":"1177758209", "numofapproved":"1", "id":"1181"}, {"last_update":"1179842392", "numofapproved":"1", "id":"1669"}, {"last_update":"1179872870", "numofapproved":"1", "id":"1682"}, {"last_update":"1181233887", "numofapproved":"1", "id":"2541"}, {"last_update":"1182349297", "numofapproved":"1", "id":"3342"}, {"last_update":"1182375421", "numofapproved":"1", "id":"3350"}, {"last_update":"1183485259", "numofapproved":"1", "id":"4081"}, {"last_update":"1184319308", "numofapproved":"1", "id":"4821"}, {"last_update":"1187626648", "numofapproved":"1", "id":"6981"}, {"last_update":"1193153090", "numofapproved":"1", "id":"13502"}, {"last_update":"1194366368", "numofapproved":"1", "id":"15041"}, {"last_update":"1194617018", "numofapproved":"1", "id":"15421"}, {"last_update":"1195230640", "numofapproved":"1", "id":"17021"}, {"last_update":"1179908379", "numofapproved":"1", "id":"1701"}, {"last_update":"1188049228", "numofapproved":"1", "id":"7427"}, {"last_update":"1177581166", "numofapproved":"1", "id":"1061"}, {"last_update":"1187160654", "numofapproved":"1", "id":"6661"}, {"last_update":"1192983992", "numofapproved":"1", "id":"13222"}, {"last_update":"1193388978", "numofapproved":"1", "id":"13954"}, {"last_update":"1194617112", "numofapproved":"1", "id":"15422"}, {"last_update":"1195398876", "numofapproved":"1", "id":"17081"}, {"last_update":"1184262511", "numofapproved":"1", "id":"4801"}, {"last_update":"1192112284", "numofapproved":"1", "id":"12241"}, {"last_update":"1193082767", "numofapproved":"1", "id":"13401"}, {"last_update":"1193179243", "numofapproved":"1", "id":"13526"}, {"last_update":"1178142915", "numofapproved":"1", "id":"1206"}, {"last_update":"1178648333", "numofapproved":"1", "id":"1310"}, {"last_update":"1179279626", "numofapproved":"1", "id":"1391"}, {"last_update":"1182882268", "numofapproved":"1", "id":"3584"}, {"last_update":"1183128448", "numofapproved":"1", "id":"3823"}, {"last_update":"1183377394", "numofapproved":"1", "id":"3941"}, {"last_update":"1188582729", "numofapproved":"1", "id":"7902"}, {"last_update":"1189695063", "numofapproved":"1", "id":"8962"}, {"last_update":"1192001165", "numofapproved":"1", "id":"12001"}, {"last_update":"1192155647", "numofapproved":"1", "id":"12363"}, {"last_update":"1193418304", "numofapproved":"1", "id":"14202"}, {"last_update":"1193632105", "numofapproved":"1", "id":"14341"}, {"last_update":"1194011106", "numofapproved":"1", "id":"14741"}, {"last_update":"1194818628", "numofapproved":"1", "id":"15701"}, {"last_update":"1194875153", "numofapproved":"1", "id":"15861"}, {"last_update":"1194727029", "numofapproved":"1", "id":"15665"}, {"last_update":"1194950210", "numofapproved":"1", "id":"16122"}, {"last_update":"1194976681", "numofapproved":"1", "id":"16241"}, {"last_update":"1194979189", "numofapproved":"1", "id":"16281"}, {"last_update":"1194962224", "numofapproved":"1", "id":"16201"}, {"last_update":"1195046085", "numofapproved":"1", "id":"16481"}, {"last_update":"1195399919", "numofapproved":"1", "id":"17102"}, {"last_update":"1183113736", "numofapproved":"1", "id":"3782"}, {"last_update":"1183114202", "numofapproved":"1", "id":"3783"}, {"last_update":"1189017904", "numofapproved":"1", "id":"8441"}, {"last_update":"1189694944", "numofapproved":"1", "id":"8961"}, {"last_update":"1190766842", "numofapproved":"1", "id":"10181"}, {"last_update":"1190973066", "numofapproved":"1", "id":"10665"}, {"last_update":"1190990264", "numofapproved":"1", "id":"10702"}, {"last_update":"1193043204", "numofapproved":"1", "id":"13281"}, {"last_update":"1194627082", "numofapproved":"1", "id":"15561"}, {"last_update":"1194894589", "numofapproved":"1", "id":"15941"}, {"last_update":"1195485915", "numofapproved":"1", "id":"17281"}, {"last_update":"1195485806", "numofapproved":"1", "id":"17261"}, {"last_update":"1195498836", "numofapproved":"1", "id":"17361"}, {"last_update":"1195514951", "numofapproved":"1", "id":"17421"}, {"last_update":"1183722351", "numofapproved":"1", "id":"4261"}, {"last_update":"1184218083", "numofapproved":"1", "id":"4682"}, {"last_update":"1186848968", "numofapproved":"1", "id":"6441"}, {"last_update":"1187023846", "numofapproved":"1", "id":"6561"}, {"last_update":"1187870812", "numofapproved":"1", "id":"7342"}, {"last_update":"1188657717", "numofapproved":"1", "id":"7961"}, {"last_update":"1190541897", "numofapproved":"1", "id":"9841"}, {"last_update":"1190629135", "numofapproved":"1", "id":"9922"}, {"last_update":"1191226530", "numofapproved":"1", "id":"10922"}, {"last_update":"1191505214", "numofapproved":"1", "id":"11321"}, {"last_update":"1192304524", "numofapproved":"1", "id":"12541"}, {"last_update":"1193948730", "numofapproved":"1", "id":"14601"}, {"last_update":"1194073812", "numofapproved":"1", "id":"14801"}, {"last_update":"1194387224", "numofapproved":"1", "id":"14892"}, {"last_update":"1194464384", "numofapproved":"1", "id":"15223"}, {"last_update":"1194726799", "numofapproved":"1", "id":"15663"}, {"last_update":"1171969969", "numofapproved":"1", "id":"119"}, {"last_update":"1174444717", "numofapproved":"1", "id":"405"}, {"last_update":"1174899431", "numofapproved":"1", "id":"504"}, {"last_update":"1174899204", "numofapproved":"1", "id":"496"}, {"last_update":"1174925591", "numofapproved":"1", "id":"530"}, {"last_update":"1176902523", "numofapproved":"1", "id":"1008"}, {"last_update":"1172765523", "numofapproved":"1", "id":"232"}, {"last_update":"1173315950", "numofapproved":"1", "id":"260"}, {"last_update":"1174899524", "numofapproved":"1", "id":"509"}, {"last_update":"1174300691", "numofapproved":"1", "id":"373"}, {"last_update":"1175502917", "numofapproved":"1", "id":"625"}, {"last_update":"1175601578", "numofapproved":"1", "id":"662"}, {"last_update":"1175608600", "numofapproved":"1", "id":"684"}, {"last_update":"1176755309", "numofapproved":"1", "id":"985"}, {"last_update":"1171386411", "numofapproved":"1", "id":"45"}, {"last_update":"1171800366", "numofapproved":"1", "id":"81"}, {"last_update":"1172847417", "numofapproved":"1", "id":"241"}, {"last_update":"1174734904", "numofapproved":"1", "id":"462"}, {"last_update":"1174735234", "numofapproved":"1", "id":"469"}, {"last_update":"1174735074", "numofapproved":"1", "id":"465"}, {"last_update":"1175267646", "numofapproved":"1", "id":"566"}, {"last_update":"1176331857", "numofapproved":"1", "id":"888"}, {"last_update":"1176387926", "numofapproved":"1", "id":"890"}, {"last_update":"1176458401", "numofapproved":"1", "id":"904"}, {"last_update":"1173088626", "numofapproved":"1", "id":"244"}, {"last_update":"1173109009", "numofapproved":"1", "id":"246"}, {"last_update":"1173671557", "numofapproved":"1", "id":"284"}, {"last_update":"1174927658", "numofapproved":"1", "id":"532"}, {"last_update":"1175592399", "numofapproved":"1", "id":"661"}, {"last_update":"1176480402", "numofapproved":"1", "id":"941"}, {"last_update":"1176561564", "numofapproved":"1", "id":"945"}, {"last_update":"1172218707", "numofapproved":"1", "id":"180"}, {"last_update":"1172771475", "numofapproved":"1", "id":"233"}, {"last_update":"1173267863", "numofapproved":"1", "id":"257"}, {"last_update":"1176493803", "numofapproved":"1", "id":"963"}, {"last_update":"1171449646", "numofapproved":"1", "id":"49"}, {"last_update":"1171471549", "numofapproved":"1", "id":"51"}, {"last_update":"1171800487", "numofapproved":"1", "id":"88"}, {"last_update":"1171800431", "numofapproved":"1", "id":"85"}, {"last_update":"1175502995", "numofapproved":"1", "id":"627"}, {"last_update":"1175712797", "numofapproved":"1", "id":"704"}, {"last_update":"1171122384", "numofapproved":"1", "id":"3"}, {"last_update":"1171380774", "numofapproved":"1", "id":"26"}, {"last_update":"1171904757", "numofapproved":"1", "id":"99"}, {"last_update":"1174300705", "numofapproved":"1", "id":"374"}, {"last_update":"1174924802", "numofapproved":"1", "id":"526"}, {"last_update":"1175935441", "numofapproved":"1", "id":"801"}, {"last_update":"1175610915", "numofapproved":"1", "id":"686"}, {"last_update":"1171977081", "numofapproved":"1", "id":"125"}, {"last_update":"1173165324", "numofapproved":"1", "id":"249"}, {"last_update":"1173888337", "numofapproved":"1", "id":"319"}, {"last_update":"1173889473", "numofapproved":"1", "id":"331"}, {"last_update":"1172180902", "numofapproved":"1", "id":"175"}, {"last_update":"1174058063", "numofapproved":"1", "id":"354"}, {"last_update":"1174300674", "numofapproved":"1", "id":"372"}, {"last_update":"1171886332", "numofapproved":"1", "id":"93"}, {"last_update":"1176731068", "numofapproved":"1", "id":"1003"}, {"last_update":"1178645848", "numofapproved":"1", "id":"1306"}, {"last_update":"1178706683", "numofapproved":"1", "id":"1321"}, {"last_update":"1179240076", "numofapproved":"1", "id":"1406"}, {"last_update":"1180380411", "numofapproved":"1", "id":"1862"}, {"last_update":"1180683561", "numofapproved":"1", "id":"2041"}, {"last_update":"1181229731", "numofapproved":"1", "id":"2521"}, {"last_update":"1182210982", "numofapproved":"1", "id":"3203"}, {"last_update":"1182421105", "numofapproved":"1", "id":"3401"}, {"last_update":"1182199404", "numofapproved":"1", "id":"3202"}, {"last_update":"1182258596", "numofapproved":"1", "id":"3241"}, {"last_update":"1183556842", "numofapproved":"1", "id":"4161"}, {"last_update":"1184146825", "numofapproved":"1", "id":"4601"}, {"last_update":"1184771229", "numofapproved":"1", "id":"4981"}, {"last_update":"1185355415", "numofapproved":"1", "id":"5401"}, {"last_update":"1185377130", "numofapproved":"1", "id":"5481"}, {"last_update":"1185483994", "numofapproved":"1", "id":"5621"}, {"last_update":"1186496707", "numofapproved":"1", "id":"6261"}, {"last_update":"1187704347", "numofapproved":"1", "id":"7001"}, {"last_update":"1187758331", "numofapproved":"1", "id":"7101"}, {"last_update":"1187765716", "numofapproved":"1", "id":"7161"}, {"last_update":"1188284185", "numofapproved":"1", "id":"7581"}, {"last_update":"1188463286", "numofapproved":"1", "id":"7761"}, {"last_update":"1189012058", "numofapproved":"1", "id":"8421"}, {"last_update":"1189814265", "numofapproved":"1", "id":"9061"}, {"last_update":"1180880867", "numofapproved":"1", "id":"2161"}, {"last_update":"1181218244", "numofapproved":"1", "id":"2463"}, {"last_update":"1183515137", "numofapproved":"1", "id":"4141"}, {"last_update":"1183515248", "numofapproved":"1", "id":"4142"}, {"last_update":"1188311100", "numofapproved":"1", "id":"7641"}, {"last_update":"1190011501", "numofapproved":"1", "id":"9201"}, {"last_update":"1190012299", "numofapproved":"1", "id":"9221"}, {"last_update":"1190149196", "numofapproved":"1", "id":"9382"}, {"last_update":"1190202046", "numofapproved":"1", "id":"9461"}, {"last_update":"1190626607", "numofapproved":"1", "id":"9881"}, {"last_update":"1190632230", "numofapproved":"1", "id":"9941"}, {"last_update":"1190660429", "numofapproved":"1", "id":"10002"}, {"last_update":"1190819102", "numofapproved":"1", "id":"10341"}, {"last_update":"1190824319", "numofapproved":"1", "id":"10382"}, {"last_update":"1190825791", "numofapproved":"1", "id":"10402"}, {"last_update":"1190847397", "numofapproved":"1", "id":"10421"}, {"last_update":"1190876679", "numofapproved":"1", "id":"10441"}, {"last_update":"1190918894", "numofapproved":"1", "id":"10541"}, {"last_update":"1190924961", "numofapproved":"1", "id":"10582"}, {"last_update":"1190991179", "numofapproved":"1", "id":"10723"}, {"last_update":"1190663960", "numofapproved":"1", "id":"10042"}, {"last_update":"1191222270", "numofapproved":"1", "id":"10881"}, {"last_update":"1178869580", "numofapproved":"1", "id":"1355"}, {"last_update":"1180054057", "numofapproved":"1", "id":"1655"}, {"last_update":"1180428815", "numofapproved":"1", "id":"1881"}, {"last_update":"1183369278", "numofapproved":"1", "id":"3901"}, {"last_update":"1185018445", "numofapproved":"1", "id":"5163"}, {"last_update":"1185201628", "numofapproved":"1", "id":"5221"}, {"last_update":"1189345395", "numofapproved":"1", "id":"8741"}, {"last_update":"1191406141", "numofapproved":"1", "id":"11041"}, {"last_update":"1191410914", "numofapproved":"1", "id":"11067"}, {"last_update":"1191558362", "numofapproved":"1", "id":"11461"}, {"last_update":"1191584539", "numofapproved":"1", "id":"11541"}, {"last_update":"1191584660", "numofapproved":"1", "id":"11542"}, {"last_update":"1191599491", "numofapproved":"1", "id":"11661"}, {"last_update":"1191813292", "numofapproved":"1", "id":"11781"}, {"last_update":"1191856553", "numofapproved":"1", "id":"11842"}, {"last_update":"1191861142", "numofapproved":"1", "id":"11862"}, {"last_update":"1177509523", "numofapproved":"1", "id":"1041"}, {"last_update":"1190627650", "numofapproved":"1", "id":"9901"}, {"last_update":"1192034749", "numofapproved":"1", "id":"12141"}, {"last_update":"1192165574", "numofapproved":"1", "id":"12401"}, {"last_update":"1192431750", "numofapproved":"1", "id":"12581"}, {"last_update":"1192536591", "numofapproved":"1", "id":"12721"}, {"last_update":"1193035428", "numofapproved":"1", "id":"13261"}, {"last_update":"1193239266", "numofapproved":"1", "id":"13581"}, {"last_update":"1193314455", "numofapproved":"1", "id":"13841"}, {"last_update":"1193333733", "numofapproved":"1", "id":"13901"}, {"last_update":"1193389116", "numofapproved":"1", "id":"14001"}, {"last_update":"1184970339", "numofapproved":"1", "id":"5121"}, {"last_update":"1190892760", "numofapproved":"1", "id":"10481"}, {"last_update":"1192823398", "numofapproved":"1", "id":"13182"}, {"last_update":"1193911671", "numofapproved":"1", "id":"14541"}, {"last_update":"1193916761", "numofapproved":"1", "id":"14543"}, {"last_update":"1194212665", "numofapproved":"1", "id":"14881"}, {"last_update":"1194248205", "numofapproved":"1", "id":"14921"}, {"last_update":"1194513600", "numofapproved":"1", "id":"15110"}, {"last_update":"1194539704", "numofapproved":"1", "id":"15361"}, {"last_update":"1194569643", "numofapproved":"1", "id":"15112"}, {"last_update":"1194619794", "numofapproved":"1", "id":"15441"}, {"last_update":"1194623621", "numofapproved":"1", "id":"15501"}, {"last_update":"1194624477", "numofapproved":"1", "id":"15521"}, {"last_update":"1194635685", "numofapproved":"1", "id":"15602"}, {"last_update":"1179311539", "numofapproved":"1", "id":"1393"}, {"last_update":"1179672561", "numofapproved":"1", "id":"1521"}, {"last_update":"1180712413", "numofapproved":"1", "id":"2101"}, {"last_update":"1181646264", "numofapproved":"1", "id":"2821"}, {"last_update":"1181807696", "numofapproved":"1", "id":"2921"}, {"last_update":"1181824523", "numofapproved":"1", "id":"2942"}, {"last_update":"1181835089", "numofapproved":"1", "id":"2981"}, {"last_update":"1182000147", "numofapproved":"1", "id":"3141"}, {"last_update":"1182952133", "numofapproved":"1", "id":"3641"}, {"last_update":"1188811518", "numofapproved":"1", "id":"8101"}, {"last_update":"1188975549", "numofapproved":"1", "id":"8321"}, {"last_update":"1190122760", "numofapproved":"1", "id":"9301"}, {"last_update":"1190124712", "numofapproved":"1", "id":"9321"}, {"last_update":"1194526560", "numofapproved":"1", "id":"15281"}, {"last_update":"1195149112", "numofapproved":"1", "id":"16821"}, {"last_update":"1179823256", "numofapproved":"1", "id":"1602"}, {"last_update":"1186332011", "numofapproved":"1", "id":"6165"}, {"last_update":"1187263451", "numofapproved":"1", "id":"6781"}, {"last_update":"1190312346", "numofapproved":"1", "id":"9621"}, {"last_update":"1193178728", "numofapproved":"1", "id":"13525"}, {"last_update":"1193908534", "numofapproved":"1", "id":"14524"}, {"last_update":"1194279992", "numofapproved":"1", "id":"15001"}, {"last_update":"1194947169", "numofapproved":"1", "id":"16104"}, {"last_update":"1195139978", "numofapproved":"1", "id":"16801"}, {"last_update":"1195152323", "numofapproved":"1", "id":"16841"}, {"last_update":"1188086146", "numofapproved":"1", "id":"7428"}, {"last_update":"1192143475", "numofapproved":"1", "id":"12341"}, {"last_update":"1192529949", "numofapproved":"1", "id":"12664"}, {"last_update":"1192721072", "numofapproved":"1", "id":"13041"}, {"last_update":"1193844156", "numofapproved":"1", "id":"14501"}, {"last_update":"1177597683", "numofapproved":"1", "id":"1063"}, {"last_update":"1180975406", "numofapproved":"1", "id":"2184"}, {"last_update":"1184681435", "numofapproved":"1", "id":"4914"}, {"last_update":"1187596457", "numofapproved":"1", "id":"6922"}, {"last_update":"1190661113", "numofapproved":"1", "id":"10003"}, {"last_update":"1192721357", "numofapproved":"1", "id":"13042"}, {"last_update":"1193130120", "numofapproved":"1", "id":"13461"}, {"last_update":"1193388868", "numofapproved":"1", "id":"13953"}, {"last_update":"1194861534", "numofapproved":"1", "id":"15821"}, {"last_update":"1182357592", "numofapproved":"1", "id":"3345"}, {"last_update":"1183722862", "numofapproved":"1", "id":"4262"}, {"last_update":"1186066354", "numofapproved":"1", "id":"6041"}, {"last_update":"1192698982", "numofapproved":"1", "id":"12981"}, {"last_update":"1181237191", "numofapproved":"1", "id":"2561"}, {"last_update":"1184569090", "numofapproved":"1", "id":"4906"}, {"last_update":"1185397555", "numofapproved":"1", "id":"5501"}, {"last_update":"1185541935", "numofapproved":"1", "id":"5681"}, {"last_update":"1193385832", "numofapproved":"1", "id":"13941"}, {"last_update":"1185482424", "numofapproved":"1", "id":"5581"}, {"last_update":"1195508796", "numofapproved":"1", "id":"17401"}, {"last_update":"1178718386", "numofapproved":"1", "id":"1347"}, {"last_update":"1178788813", "numofapproved":"1", "id":"1351"}, {"last_update":"1178877332", "numofapproved":"1", "id":"1358"}, {"last_update":"1183208679", "numofapproved":"1", "id":"3861"}, {"last_update":"1187885439", "numofapproved":"1", "id":"7347"}, {"last_update":"1188985190", "numofapproved":"1", "id":"8341"}, {"last_update":"1189687132", "numofapproved":"1", "id":"8941"}, {"last_update":"1189864330", "numofapproved":"1", "id":"9121"}, {"last_update":"1190990605", "numofapproved":"1", "id":"10709"}, {"last_update":"1192634449", "numofapproved":"1", "id":"12861"}, {"last_update":"1194723756", "numofapproved":"1", "id":"15641"}, {"last_update":"1194792428", "numofapproved":"1", "id":"15682"}, {"last_update":"1194725734", "numofapproved":"1", "id":"15661"}, {"last_update":"1194945618", "numofapproved":"1", "id":"16061"}, {"last_update":"1194946006", "numofapproved":"1", "id":"16081"}, {"last_update":"1194949774", "numofapproved":"1", "id":"16121"}, {"last_update":"1194950925", "numofapproved":"1", "id":"16126"}, {"last_update":"1194979238", "numofapproved":"1", "id":"16282"}, {"last_update":"1195051013", "numofapproved":"1", "id":"16543"}, {"last_update":"1195050956", "numofapproved":"1", "id":"16542"}, {"last_update":"1195047036", "numofapproved":"1", "id":"16501"}, {"last_update":"1195221919", "numofapproved":"1", "id":"16942"}, {"last_update":"1178035892", "numofapproved":"1", "id":"1221"}, {"last_update":"1178570265", "numofapproved":"1", "id":"1302"}, {"last_update":"1178811921", "numofapproved":"1", "id":"1354"}, {"last_update":"1182344326", "numofapproved":"1", "id":"3321"}, {"last_update":"1184999048", "numofapproved":"1", "id":"5141"}, {"last_update":"1188994511", "numofapproved":"1", "id":"8361"}, {"last_update":"1189161726", "numofapproved":"1", "id":"8601"}, {"last_update":"1190500875", "numofapproved":"1", "id":"9803"}, {"last_update":"1190817424", "numofapproved":"1", "id":"10321"}, {"last_update":"1191327796", "numofapproved":"1", "id":"11001"}, {"last_update":"1191410544", "numofapproved":"1", "id":"11062"}, {"last_update":"1192009739", "numofapproved":"1", "id":"12062"}, {"last_update":"1193973669", "numofapproved":"1", "id":"14662"}, {"last_update":"1194035149", "numofapproved":"1", "id":"14783"}, {"last_update":"1194465519", "numofapproved":"1", "id":"15106"}, {"last_update":"1194464336", "numofapproved":"1", "id":"15222"}, {"last_update":"1194861398", "numofapproved":"1", "id":"15802"}, {"last_update":"1194950791", "numofapproved":"1", "id":"16125"}, {"last_update":"1195501394", "numofapproved":"1", "id":"17381"}, {"last_update":"1195546583", "numofapproved":"1", "id":"17461"}, {"last_update":"1177607652", "numofapproved":"1", "id":"1048"}, {"last_update":"1182349136", "numofapproved":"1", "id":"3322"}, {"last_update":"1184217665", "numofapproved":"1", "id":"4681"}, {"last_update":"1185510733", "numofapproved":"1", "id":"5641"}, {"last_update":"1187875988", "numofapproved":"1", "id":"7345"}, {"last_update":"1188384227", "numofapproved":"1", "id":"7701"}, {"last_update":"1188935650", "numofapproved":"1", "id":"8261"}, {"last_update":"1188951982", "numofapproved":"1", "id":"8301"}, {"last_update":"1190391010", "numofapproved":"1", "id":"9701"}, {"last_update":"1191169581", "numofapproved":"1", "id":"10841"}, {"last_update":"1194435269", "numofapproved":"1", "id":"15101"}, {"last_update":"1171800457", "numofapproved":"1", "id":"86"}, {"last_update":"1171968036", "numofapproved":"1", "id":"116"}, {"last_update":"1171984640", "numofapproved":"1", "id":"129"}, {"last_update":"1171987101", "numofapproved":"1", "id":"130"}, {"last_update":"1172588327", "numofapproved":"1", "id":"213"}, {"last_update":"1173736730", "numofapproved":"1", "id":"306"}, {"last_update":"1174735009", "numofapproved":"1", "id":"463"}, {"last_update":"1172314484", "numofapproved":"1", "id":"192"}, {"last_update":"1172580739", "numofapproved":"1", "id":"212"}, {"last_update":"1173889335", "numofapproved":"1", "id":"328"}, {"last_update":"1171799339", "numofapproved":"1", "id":"79"}, {"last_update":"1171882669", "numofapproved":"1", "id":"91"}, {"last_update":"1172561300", "numofapproved":"1", "id":"207"}, {"last_update":"1172565919", "numofapproved":"1", "id":"209"}, {"last_update":"1172600401", "numofapproved":"1", "id":"217"}, {"last_update":"1174040553", "numofapproved":"1", "id":"350"}, {"last_update":"1174300376", "numofapproved":"1", "id":"365"}, {"last_update":"1171800419", "numofapproved":"1", "id":"84"}, {"last_update":"1171800471", "numofapproved":"1", "id":"87"}, {"last_update":"1171904826", "numofapproved":"1", "id":"102"}, {"last_update":"1171962248", "numofapproved":"1", "id":"110"}, {"last_update":"1171968056", "numofapproved":"1", "id":"117"}, {"last_update":"1172180757", "numofapproved":"1", "id":"174"}, {"last_update":"1172249286", "numofapproved":"1", "id":"186"}, {"last_update":"1172331355", "numofapproved":"1", "id":"194"}, {"last_update":"1172838799", "numofapproved":"1", "id":"235"}, {"last_update":"1173839361", "numofapproved":"1", "id":"316"}, {"last_update":"1176141087", "numofapproved":"1", "id":"809"}, {"last_update":"1176293168", "numofapproved":"1", "id":"827"}, {"last_update":"1176314927", "numofapproved":"1", "id":"887"}, {"last_update":"1172147490", "numofapproved":"1", "id":"169"}, {"last_update":"1172673371", "numofapproved":"1", "id":"225"}, {"last_update":"1175021309", "numofapproved":"1", "id":"539"}, {"last_update":"1175719394", "numofapproved":"1", "id":"708"}, {"last_update":"1175797177", "numofapproved":"1", "id":"741"}, {"last_update":"1175797204", "numofapproved":"1", "id":"761"}, {"last_update":"1173888948", "numofapproved":"1", "id":"323"}, {"last_update":"1171050355", "numofapproved":"1", "id":"1"}, {"last_update":"1171904868", "numofapproved":"1", "id":"104"}, {"last_update":"1174301476", "numofapproved":"1", "id":"392"}, {"last_update":"1174396679", "numofapproved":"1", "id":"401"}, {"last_update":"1174735025", "numofapproved":"1", "id":"464"}, {"last_update":"1171894147", "numofapproved":"1", "id":"94"}, {"last_update":"1172226240", "numofapproved":"1", "id":"181"}, {"last_update":"1172442130", "numofapproved":"1", "id":"195"}, {"last_update":"1174300588", "numofapproved":"1", "id":"370"}, {"last_update":"1174899082", "numofapproved":"1", "id":"490"}, {"last_update":"1174899309", "numofapproved":"1", "id":"501"}, {"last_update":"1173724444", "numofapproved":"1", "id":"304"}, {"last_update":"1176314883", "numofapproved":"1", "id":"886"}, {"last_update":"1173284377", "numofapproved":"1", "id":"259"}, {"last_update":"1172244974", "numofapproved":"1", "id":"184"}, {"last_update":"1173825356", "numofapproved":"1", "id":"315"}, {"last_update":"1174898980", "numofapproved":"1", "id":"485"}, {"last_update":"1175713133", "numofapproved":"1", "id":"706"}, {"last_update":"1175872869", "numofapproved":"1", "id":"784"}, {"last_update":"1174301161", "numofapproved":"1", "id":"380"}, {"last_update":"1176710519", "numofapproved":"1", "id":"1002"}, {"last_update":"1176776871", "numofapproved":"1", "id":"1006"}, {"last_update":"1176383102", "numofapproved":"1", "id":"901"}, {"last_update":"1176391153", "numofapproved":"1", "id":"902"}, {"last_update":"1176562039", "numofapproved":"1", "id":"946"}, {"last_update":"1175713172", "numofapproved":"1", "id":"668"}, {"last_update":"1178045208", "numofapproved":"1", "id":"1204"}, {"last_update":"1178648231", "numofapproved":"1", "id":"1307"}, {"last_update":"1178876638", "numofapproved":"1", "id":"1362"}, {"last_update":"1181120419", "numofapproved":"1", "id":"2341"}, {"last_update":"1181217997", "numofapproved":"1", "id":"2462"}, {"last_update":"1181292688", "numofapproved":"1", "id":"2622"}, {"last_update":"1182246090", "numofapproved":"1", "id":"3205"}, {"last_update":"1182982710", "numofapproved":"1", "id":"3681"}, {"last_update":"1177496084", "numofapproved":"1", "id":"1021"}, {"last_update":"1177496190", "numofapproved":"1", "id":"1022"}, {"last_update":"1178310654", "numofapproved":"1", "id":"1261"}, {"last_update":"1182861963", "numofapproved":"1", "id":"3582"}, {"last_update":"1183392466", "numofapproved":"1", "id":"3981"}, {"last_update":"1183971409", "numofapproved":"1", "id":"4404"}, {"last_update":"1183984082", "numofapproved":"1", "id":"4421"}, {"last_update":"1184101764", "numofapproved":"1", "id":"4581"}, {"last_update":"1185805036", "numofapproved":"1", "id":"5821"}, {"last_update":"1186071563", "numofapproved":"1", "id":"6061"}, {"last_update":"1186331614", "numofapproved":"1", "id":"6221"}, {"last_update":"1187103429", "numofapproved":"1", "id":"6623"}, {"last_update":"1187359405", "numofapproved":"1", "id":"6901"}, {"last_update":"1187764462", "numofapproved":"1", "id":"7121"}, {"last_update":"1187765742", "numofapproved":"1", "id":"7181"}, {"last_update":"1187821663", "numofapproved":"1", "id":"7281"}, {"last_update":"1187851593", "numofapproved":"1", "id":"7301"}, {"last_update":"1188829369", "numofapproved":"1", "id":"8141"}, {"last_update":"1189006834", "numofapproved":"1", "id":"8401"}, {"last_update":"1189656411", "numofapproved":"1", "id":"8901"}, {"last_update":"1181824325", "numofapproved":"1", "id":"2961"}, {"last_update":"1184699326", "numofapproved":"1", "id":"4922"}, {"last_update":"1185981618", "numofapproved":"1", "id":"5981"}, {"last_update":"1186476979", "numofapproved":"1", "id":"6169"}, {"last_update":"1186501212", "numofapproved":"1", "id":"6301"}, {"last_update":"1187111728", "numofapproved":"1", "id":"6624"}, {"last_update":"1187275194", "numofapproved":"1", "id":"6821"}, {"last_update":"1190232587", "numofapproved":"1", "id":"9501"}, {"last_update":"1190379779", "numofapproved":"1", "id":"9661"}, {"last_update":"1190500551", "numofapproved":"1", "id":"9801"}, {"last_update":"1190555711", "numofapproved":"1", "id":"9861"}, {"last_update":"1190664200", "numofapproved":"1", "id":"10061"}, {"last_update":"1190662067", "numofapproved":"1", "id":"10021"}, {"last_update":"1190887692", "numofapproved":"1", "id":"10461"}, {"last_update":"1190887880", "numofapproved":"1", "id":"10462"}, {"last_update":"1190924576", "numofapproved":"1", "id":"10581"}, {"last_update":"1190990748", "numofapproved":"1", "id":"10713"}, {"last_update":"1190990297", "numofapproved":"1", "id":"10703"}, {"last_update":"1182792178", "numofapproved":"1", "id":"3541"}, {"last_update":"1189505682", "numofapproved":"1", "id":"8781"}, {"last_update":"1191410630", "numofapproved":"1", "id":"11081"}, {"last_update":"1191431148", "numofapproved":"1", "id":"11141"}, {"last_update":"1191446393", "numofapproved":"1", "id":"11181"}, {"last_update":"1191559326", "numofapproved":"1", "id":"11481"}, {"last_update":"1191860159", "numofapproved":"1", "id":"11861"}, {"last_update":"1191933842", "numofapproved":"1", "id":"11901"}, {"last_update":"1181765760", "numofapproved":"1", "id":"2901"}, {"last_update":"1187098770", "numofapproved":"1", "id":"6622"}, {"last_update":"1192155125", "numofapproved":"1", "id":"12382"}, {"last_update":"1192449036", "numofapproved":"1", "id":"12601"}, {"last_update":"1192604489", "numofapproved":"1", "id":"12781"}, {"last_update":"1193265229", "numofapproved":"1", "id":"13681"}, {"last_update":"1193304550", "numofapproved":"1", "id":"13781"}, {"last_update":"1193401945", "numofapproved":"1", "id":"14101"}, {"last_update":"1193305327", "numofapproved":"1", "id":"13801"}, {"last_update":"1179912412", "numofapproved":"1", "id":"1722"}, {"last_update":"1188295203", "numofapproved":"1", "id":"7621"}, {"last_update":"1188580008", "numofapproved":"1", "id":"7881"}, {"last_update":"1189115708", "numofapproved":"1", "id":"8521"}, {"last_update":"1193864375", "numofapproved":"1", "id":"14522"}, {"last_update":"1193973963", "numofapproved":"1", "id":"14666"}, {"last_update":"1194003054", "numofapproved":"1", "id":"14701"}, {"last_update":"1194262755", "numofapproved":"1", "id":"14885"}, {"last_update":"1194262860", "numofapproved":"1", "id":"14886"}, {"last_update":"1194366475", "numofapproved":"1", "id":"15042"}, {"last_update":"1194505568", "numofapproved":"1", "id":"15108"}, {"last_update":"1194507434", "numofapproved":"1", "id":"15109"}, {"last_update":"1194625505", "numofapproved":"1", "id":"15542"}, {"last_update":"1194635569", "numofapproved":"1", "id":"15583"}, {"last_update":"1179319405", "numofapproved":"1", "id":"1394"}, {"last_update":"1179409867", "numofapproved":"1", "id":"1441"}, {"last_update":"1179431647", "numofapproved":"1", "id":"1481"}, {"last_update":"1179842302", "numofapproved":"1", "id":"1667"}, {"last_update":"1180710254", "numofapproved":"1", "id":"2081"}, {"last_update":"1181855583", "numofapproved":"1", "id":"3041"}, {"last_update":"1182100211", "numofapproved":"1", "id":"3182"}, {"last_update":"1183377220", "numofapproved":"1", "id":"3921"}, {"last_update":"1184677615", "numofapproved":"1", "id":"4910"}, {"last_update":"1184679060", "numofapproved":"1", "id":"4911"}, {"last_update":"1184679348", "numofapproved":"1", "id":"4912"}, {"last_update":"1184749371", "numofapproved":"1", "id":"4943"}, {"last_update":"1186734180", "numofapproved":"1", "id":"6381"}, {"last_update":"1187012463", "numofapproved":"1", "id":"6501"}, {"last_update":"1187209404", "numofapproved":"1", "id":"6741"}, {"last_update":"1192687257", "numofapproved":"1", "id":"12941"}, {"last_update":"1193385868", "numofapproved":"1", "id":"13942"}, {"last_update":"1193386346", "numofapproved":"1", "id":"13943"}, {"last_update":"1194937571", "numofapproved":"1", "id":"16042"}, {"last_update":"1194855975", "numofapproved":"1", "id":"15761"}, {"last_update":"1194960221", "numofapproved":"1", "id":"16161"}, {"last_update":"1184058679", "numofapproved":"1", "id":"4541"}, {"last_update":"1185865315", "numofapproved":"1", "id":"5842"}, {"last_update":"1187178780", "numofapproved":"1", "id":"6681"}, {"last_update":"1194884625", "numofapproved":"1", "id":"15921"}, {"last_update":"1195134032", "numofapproved":"1", "id":"16721"}, {"last_update":"1195164570", "numofapproved":"1", "id":"16901"}, {"last_update":"1182336429", "numofapproved":"1", "id":"3301"}, {"last_update":"1182415670", "numofapproved":"1", "id":"3353"}, {"last_update":"1184575801", "numofapproved":"1", "id":"4907"}, {"last_update":"1185483718", "numofapproved":"1", "id":"5601"}, {"last_update":"1186402874", "numofapproved":"1", "id":"6166"}, {"last_update":"1186750969", "numofapproved":"1", "id":"6383"}, {"last_update":"1192725360", "numofapproved":"1", "id":"13061"}, {"last_update":"1193314911", "numofapproved":"1", "id":"13822"}, {"last_update":"1183448275", "numofapproved":"1", "id":"4062"}, {"last_update":"1187321039", "numofapproved":"1", "id":"6861"}, {"last_update":"1188287578", "numofapproved":"1", "id":"7601"}, {"last_update":"1194464420", "numofapproved":"1", "id":"15224"}, {"last_update":"1195139641", "numofapproved":"1", "id":"16781"}, {"last_update":"1186147124", "numofapproved":"1", "id":"6107"}, {"last_update":"1188821750", "numofapproved":"1", "id":"8122"}, {"last_update":"1192531864", "numofapproved":"1", "id":"12665"}, {"last_update":"1192984220", "numofapproved":"1", "id":"13223"}, {"last_update":"1195225246", "numofapproved":"1", "id":"16982"}, {"last_update":"1182410787", "numofapproved":"1", "id":"3351"}, {"last_update":"1184531419", "numofapproved":"1", "id":"4901"}, {"last_update":"1188801472", "numofapproved":"1", "id":"8081"}, {"last_update":"1192524288", "numofapproved":"1", "id":"12661"}, {"last_update":"1180950691", "numofapproved":"1", "id":"2181"}, {"last_update":"1184016732", "numofapproved":"1", "id":"4501"}, {"last_update":"1186074085", "numofapproved":"1", "id":"6081"}, {"last_update":"1194937650", "numofapproved":"1", "id":"16043"}, {"last_update":"1182937178", "numofapproved":"1", "id":"3623"}, {"last_update":"1191419601", "numofapproved":"1", "id":"11101"}, {"last_update":"1191856562", "numofapproved":"1", "id":"11843"}, {"last_update":"1192525042", "numofapproved":"1", "id":"12681"}, {"last_update":"1194625494", "numofapproved":"1", "id":"15541"}, {"last_update":"1194982850", "numofapproved":"1", "id":"16361"}, {"last_update":"1194989219", "numofapproved":"1", "id":"16401"}, {"last_update":"1195066723", "numofapproved":"1", "id":"16641"}, {"last_update":"1183971226", "numofapproved":"1", "id":"4403"}, {"last_update":"1185526866", "numofapproved":"1", "id":"5661"}, {"last_update":"1185741495", "numofapproved":"1", "id":"5741"}, {"last_update":"1185905429", "numofapproved":"1", "id":"5881"}, {"last_update":"1186137969", "numofapproved":"1", "id":"6104"}, {"last_update":"1189267536", "numofapproved":"1", "id":"8701"}, {"last_update":"1190115042", "numofapproved":"1", "id":"9261"}, {"last_update":"1190664258", "numofapproved":"1", "id":"10062"}, {"last_update":"1190774949", "numofapproved":"1", "id":"10201"}, {"last_update":"1190965042", "numofapproved":"1", "id":"10641"}, {"last_update":"1191493379", "numofapproved":"1", "id":"11301"}, {"last_update":"1191578051", "numofapproved":"1", "id":"11501"}, {"last_update":"1192188840", "numofapproved":"1", "id":"12421"}, {"last_update":"1194000252", "numofapproved":"1", "id":"14682"}, {"last_update":"1194622556", "numofapproved":"1", "id":"15462"}, {"last_update":"1194981068", "numofapproved":"1", "id":"16341"}, {"last_update":"1185795733", "numofapproved":"1", "id":"5782"}, {"last_update":"1186646854", "numofapproved":"1", "id":"6341"}, {"last_update":"1187087291", "numofapproved":"1", "id":"6621"}, {"last_update":"1187951800", "numofapproved":"1", "id":"7401"}, {"last_update":"1189170373", "numofapproved":"1", "id":"8642"}, {"last_update":"1191007934", "numofapproved":"1", "id":"10781"}, {"last_update":"1190985695", "numofapproved":"1", "id":"10681"}, {"last_update":"1192009758", "numofapproved":"1", "id":"12063"}, {"last_update":"1193062543", "numofapproved":"1", "id":"13321"}, {"last_update":"1194950304", "numofapproved":"1", "id":"16123"}, {"last_update":"1171882085", "numofapproved":"1", "id":"90"}, {"last_update":"1171962264", "numofapproved":"1", "id":"111"}, {"last_update":"1172646556", "numofapproved":"1", "id":"219"}, {"last_update":"1174040139", "numofapproved":"1", "id":"349"}, {"last_update":"1174059263", "numofapproved":"1", "id":"355"}, {"last_update":"1174899063", "numofapproved":"1", "id":"489"}, {"last_update":"1173797557", "numofapproved":"1", "id":"310"}, {"last_update":"1174735191", "numofapproved":"1", "id":"468"}, {"last_update":"1174899259", "numofapproved":"1", "id":"499"}, {"last_update":"1174899354", "numofapproved":"1", "id":"502"}, {"last_update":"1175254120", "numofapproved":"1", "id":"562"}, {"last_update":"1171126391", "numofapproved":"1", "id":"4"}, {"last_update":"1171800381", "numofapproved":"1", "id":"82"}, {"last_update":"1171799224", "numofapproved":"1", "id":"75"}, {"last_update":"1171972550", "numofapproved":"1", "id":"123"}, {"last_update":"1174301165", "numofapproved":"1", "id":"381"}, {"last_update":"1171904847", "numofapproved":"1", "id":"103"}, {"last_update":"1172260956", "numofapproved":"1", "id":"190"}, {"last_update":"1172803368", "numofapproved":"1", "id":"234"}, {"last_update":"1173199576", "numofapproved":"1", "id":"250"}, {"last_update":"1173206201", "numofapproved":"1", "id":"252"}, {"last_update":"1175258941", "numofapproved":"1", "id":"563"}, {"last_update":"1176232231", "numofapproved":"1", "id":"825"}, {"last_update":"1176475088", "numofapproved":"1", "id":"921"}, {"last_update":"1172082181", "numofapproved":"1", "id":"166"}, {"last_update":"1172595205", "numofapproved":"1", "id":"216"}, {"last_update":"1174898892", "numofapproved":"1", "id":"481"}, {"last_update":"1174899696", "numofapproved":"1", "id":"518"}, {"last_update":"1174924777", "numofapproved":"1", "id":"525"}, {"last_update":"1175598588", "numofapproved":"1", "id":"682"}, {"last_update":"1175602572", "numofapproved":"1", "id":"683"}, {"last_update":"1175707879", "numofapproved":"1", "id":"666"}, {"last_update":"1175710528", "numofapproved":"1", "id":"703"}, {"last_update":"1175715728", "numofapproved":"1", "id":"707"}, {"last_update":"1176137267", "numofapproved":"1", "id":"806"}, {"last_update":"1176306491", "numofapproved":"1", "id":"883"}, {"last_update":"1172069972", "numofapproved":"1", "id":"134"}, {"last_update":"1173889144", "numofapproved":"1", "id":"324"}, {"last_update":"1175502804", "numofapproved":"1", "id":"623"}, {"last_update":"1175772530", "numofapproved":"1", "id":"711"}, {"last_update":"1176297526", "numofapproved":"1", "id":"861"}, {"last_update":"1171445818", "numofapproved":"1", "id":"47"}, {"last_update":"1171884505", "numofapproved":"1", "id":"92"}, {"last_update":"1172250708", "numofapproved":"1", "id":"187"}, {"last_update":"1173749631", "numofapproved":"1", "id":"307"}, {"last_update":"1173889164", "numofapproved":"1", "id":"325"}, {"last_update":"1174301168", "numofapproved":"1", "id":"382"}, {"last_update":"1171904807", "numofapproved":"1", "id":"101"}, {"last_update":"1171970405", "numofapproved":"1", "id":"120"}, {"last_update":"1172218677", "numofapproved":"1", "id":"179"}, {"last_update":"1173125028", "numofapproved":"1", "id":"248"}, {"last_update":"1171978122", "numofapproved":"1", "id":"126"}, {"last_update":"1172676736", "numofapproved":"1", "id":"226"}, {"last_update":"1173975473", "numofapproved":"1", "id":"344"}, {"last_update":"1172072582", "numofapproved":"1", "id":"165"}, {"last_update":"1173888774", "numofapproved":"1", "id":"322"}, {"last_update":"1174560347", "numofapproved":"1", "id":"422"}, {"last_update":"1174899242", "numofapproved":"1", "id":"498"}, {"last_update":"1174735110", "numofapproved":"1", "id":"466"}, {"last_update":"1176735630", "numofapproved":"1", "id":"1004"}, {"last_update":"1175725931", "numofapproved":"1", "id":"670"}, {"last_update":"1176498072", "numofapproved":"1", "id":"944"}, {"last_update":"1178264233", "numofapproved":"1", "id":"1241"}, {"last_update":"1178746727", "numofapproved":"1", "id":"1350"}, {"last_update":"1178798992", "numofapproved":"1", "id":"1352"}, {"last_update":"1180011647", "numofapproved":"1", "id":"1649"}, {"last_update":"1180430823", "numofapproved":"1", "id":"1901"}, {"last_update":"1180649952", "numofapproved":"1", "id":"2021"}, {"last_update":"1180966506", "numofapproved":"1", "id":"2183"}, {"last_update":"1180987142", "numofapproved":"1", "id":"2241"}, {"last_update":"1181127788", "numofapproved":"1", "id":"2322"}, {"last_update":"1181217668", "numofapproved":"1", "id":"2461"}, {"last_update":"1182789542", "numofapproved":"1", "id":"3522"}, {"last_update":"1182851714", "numofapproved":"1", "id":"3581"}, {"last_update":"1179268837", "numofapproved":"1", "id":"1407"}, {"last_update":"1179999486", "numofapproved":"1", "id":"1645"}, {"last_update":"1180019568", "numofapproved":"1", "id":"1653"}, {"last_update":"1180082061", "numofapproved":"1", "id":"1821"}, {"last_update":"1184181871", "numofapproved":"1", "id":"4642"}, {"last_update":"1184251955", "numofapproved":"1", "id":"4741"}, {"last_update":"1184346893", "numofapproved":"1", "id":"4841"}, {"last_update":"1184773981", "numofapproved":"1", "id":"5001"}, {"last_update":"1185272905", "numofapproved":"1", "id":"5281"}, {"last_update":"1185484083", "numofapproved":"1", "id":"5622"}, {"last_update":"1185897961", "numofapproved":"1", "id":"5861"}, {"last_update":"1186951708", "numofapproved":"1", "id":"6462"}, {"last_update":"1187596311", "numofapproved":"1", "id":"6941"}, {"last_update":"1187766852", "numofapproved":"1", "id":"7201"}, {"last_update":"1188158133", "numofapproved":"1", "id":"7481"}, {"last_update":"1188233835", "numofapproved":"1", "id":"7501"}, {"last_update":"1188269273", "numofapproved":"1", "id":"7561"}, {"last_update":"1177672684", "numofapproved":"1", "id":"1141"}, {"last_update":"1178042016", "numofapproved":"1", "id":"1222"}, {"last_update":"1181646022", "numofapproved":"1", "id":"2801"}, {"last_update":"1181853920", "numofapproved":"1", "id":"3021"}, {"last_update":"1183715836", "numofapproved":"1", "id":"4241"}, {"last_update":"1183726859", "numofapproved":"1", "id":"4281"}, {"last_update":"1189860355", "numofapproved":"1", "id":"9101"}, {"last_update":"1189871747", "numofapproved":"1", "id":"9141"}, {"last_update":"1190380660", "numofapproved":"1", "id":"9681"}, {"last_update":"1190510808", "numofapproved":"1", "id":"9821"}, {"last_update":"1190542013", "numofapproved":"1", "id":"9843"}, {"last_update":"1190665412", "numofapproved":"1", "id":"10081"}, {"last_update":"1190299519", "numofapproved":"1", "id":"9601"}, {"last_update":"1191410594", "numofapproved":"1", "id":"11063"}, {"last_update":"1191505786", "numofapproved":"1", "id":"11341"}, {"last_update":"1191583652", "numofapproved":"1", "id":"11522"}, {"last_update":"1191599712", "numofapproved":"1", "id":"11681"}, {"last_update":"1191602931", "numofapproved":"1", "id":"11721"}, {"last_update":"1191762572", "numofapproved":"1", "id":"11761"}, {"last_update":"1191856256", "numofapproved":"1", "id":"11841"}, {"last_update":"1191937041", "numofapproved":"1", "id":"11921"}, {"last_update":"1179325639", "numofapproved":"1", "id":"1409"}, {"last_update":"1179912165", "numofapproved":"1", "id":"1721"}, {"last_update":"1181119430", "numofapproved":"1", "id":"2321"}, {"last_update":"1184696743", "numofapproved":"1", "id":"4921"}, {"last_update":"1192154847", "numofapproved":"1", "id":"12361"}, {"last_update":"1192237071", "numofapproved":"1", "id":"12501"}, {"last_update":"1178637394", "numofapproved":"1", "id":"1304"}, {"last_update":"1178716778", "numofapproved":"1", "id":"1344"}, {"last_update":"1182937057", "numofapproved":"1", "id":"3622"}, {"last_update":"1183113642", "numofapproved":"1", "id":"3781"}, {"last_update":"1183995467", "numofapproved":"1", "id":"4461"}, {"last_update":"1184223331", "numofapproved":"1", "id":"4721"}, {"last_update":"1190990692", "numofapproved":"1", "id":"10711"}, {"last_update":"1193269310", "numofapproved":"1", "id":"13761"}, {"last_update":"1193735756", "numofapproved":"1", "id":"14441"}, {"last_update":"1194635738", "numofapproved":"1", "id":"15603"}, {"last_update":"1194901721", "numofapproved":"1", "id":"15961"}, {"last_update":"1194949951", "numofapproved":"1", "id":"16141"}, {"last_update":"1194960695", "numofapproved":"1", "id":"16182"}, {"last_update":"1194973974", "numofapproved":"1", "id":"16221"}, {"last_update":"1194946810", "numofapproved":"1", "id":"16102"}, {"last_update":"1194977452", "numofapproved":"1", "id":"16261"}, {"last_update":"1195040385", "numofapproved":"1", "id":"16461"}, {"last_update":"1195053483", "numofapproved":"1", "id":"16561"}, {"last_update":"1195053518", "numofapproved":"1", "id":"16562"}, {"last_update":"1195218698", "numofapproved":"1", "id":"16921"}, {"last_update":"1195225049", "numofapproved":"1", "id":"16961"}, {"last_update":"1195164270", "numofapproved":"1", "id":"16881"}, {"last_update":"1195080947", "numofapproved":"1", "id":"16681"}, {"last_update":"1195469884", "numofapproved":"1", "id":"17181"}, {"last_update":"1185314804", "numofapproved":"1", "id":"5381"}, {"last_update":"1188401767", "numofapproved":"1", "id":"7721"}, {"last_update":"1190286841", "numofapproved":"1", "id":"9582"}, {"last_update":"1190733096", "numofapproved":"1", "id":"10141"}, {"last_update":"1190847451", "numofapproved":"1", "id":"10422"}, {"last_update":"1190990526", "numofapproved":"1", "id":"10707"}, {"last_update":"1192009711", "numofapproved":"1", "id":"12061"}, {"last_update":"1192155478", "numofapproved":"1", "id":"12362"}, {"last_update":"1192468382", "numofapproved":"1", "id":"12641"}, {"last_update":"1193332032", "numofapproved":"1", "id":"13881"}, {"last_update":"1195497290", "numofapproved":"1", "id":"17321"}, {"last_update":"1195519935", "numofapproved":"1", "id":"17441"}, {"last_update":"1195549826", "numofapproved":"1", "id":"17521"}, {"last_update":"1177668131", "numofapproved":"1", "id":"1101"}, {"last_update":"1186835348", "numofapproved":"1", "id":"6421"}, {"last_update":"1191057903", "numofapproved":"1", "id":"10802"}, {"last_update":"1193973906", "numofapproved":"1", "id":"14665"}, {"last_update":"1171904780", "numofapproved":"1", "id":"100"}, {"last_update":"1172677750", "numofapproved":"1", "id":"227"}, {"last_update":"1172686704", "numofapproved":"1", "id":"229"}, {"last_update":"1173101684", "numofapproved":"1", "id":"245"}, {"last_update":"1173466151", "numofapproved":"1", "id":"282"}, {"last_update":"1174301263", "numofapproved":"1", "id":"386"}, {"last_update":"1174302366", "numofapproved":"1", "id":"399"}, {"last_update":"1174501294", "numofapproved":"1", "id":"421"}, {"last_update":"1174899635", "numofapproved":"1", "id":"515"}, {"last_update":"1174924556", "numofapproved":"1", "id":"523"}, {"last_update":"1175141200", "numofapproved":"1", "id":"541"}, {"last_update":"1171799271", "numofapproved":"1", "id":"76"}, {"last_update":"1171900163", "numofapproved":"1", "id":"97"}, {"last_update":"1174301267", "numofapproved":"1", "id":"387"}, {"last_update":"1174735156", "numofapproved":"1", "id":"467"}, {"last_update":"1174899569", "numofapproved":"1", "id":"512"}, {"last_update":"1174926970", "numofapproved":"1", "id":"531"}, {"last_update":"1175502757", "numofapproved":"1", "id":"602"}, {"last_update":"1175603425", "numofapproved":"1", "id":"663"}, {"last_update":"1176194967", "numofapproved":"1", "id":"822"}, {"last_update":"1171800398", "numofapproved":"1", "id":"83"}, {"last_update":"1171968376", "numofapproved":"1", "id":"118"}, {"last_update":"1172070063", "numofapproved":"1", "id":"135"}, {"last_update":"1173821159", "numofapproved":"1", "id":"314"}, {"last_update":"1176559052", "numofapproved":"1", "id":"964"}, {"last_update":"1171299245", "numofapproved":"1", "id":"23"}, {"last_update":"1171535160", "numofapproved":"1", "id":"57"}, {"last_update":"1171564542", "numofapproved":"1", "id":"65"}, {"last_update":"1172646592", "numofapproved":"1", "id":"220"}, {"last_update":"1174899489", "numofapproved":"1", "id":"507"}, {"last_update":"1174924890", "numofapproved":"1", "id":"528"}, {"last_update":"1175687005", "numofapproved":"1", "id":"701"}, {"last_update":"1176132888", "numofapproved":"1", "id":"805"}, {"last_update":"1171286610", "numofapproved":"1", "id":"21"}, {"last_update":"1172184441", "numofapproved":"1", "id":"176"}, {"last_update":"1172187221", "numofapproved":"1", "id":"178"}, {"last_update":"1173386668", "numofapproved":"1", "id":"261"}, {"last_update":"1173809115", "numofapproved":"1", "id":"312"}, {"last_update":"1175609126", "numofapproved":"1", "id":"685"}, {"last_update":"1175791369", "numofapproved":"1", "id":"712"}, {"last_update":"1176480434", "numofapproved":"1", "id":"942"}, {"last_update":"1171503567", "numofapproved":"1", "id":"56"}, {"last_update":"1171799204", "numofapproved":"1", "id":"74"}, {"last_update":"1172236765", "numofapproved":"1", "id":"183"}, {"last_update":"1175598013", "numofapproved":"1", "id":"681"}, {"last_update":"1175610956", "numofapproved":"1", "id":"687"}, {"last_update":"1175725436", "numofapproved":"1", "id":"710"}, {"last_update":"1171905052", "numofapproved":"1", "id":"105"}, {"last_update":"1172268920", "numofapproved":"1", "id":"191"}, {"last_update":"1173264110", "numofapproved":"1", "id":"256"}, {"last_update":"1173889179", "numofapproved":"1", "id":"326"}, {"last_update":"1174301066", "numofapproved":"1", "id":"378"}, {"last_update":"1174300399", "numofapproved":"1", "id":"366"}, {"last_update":"1174387980", "numofapproved":"1", "id":"400"}, {"last_update":"1176823766", "numofapproved":"1", "id":"1007"}, {"last_update":"1171970585", "numofapproved":"1", "id":"122"}, {"last_update":"1172071500", "numofapproved":"1", "id":"145"}, {"last_update":"1172580279", "numofapproved":"1", "id":"211"}, {"last_update":"1172658493", "numofapproved":"1", "id":"221"}, {"last_update":"1174301611", "numofapproved":"1", "id":"397"}, {"last_update":"1176900132", "numofapproved":"1", "id":"989"}, {"last_update":"1171965754", "numofapproved":"1", "id":"114"}, {"last_update":"1173797482", "numofapproved":"1", "id":"309"}, {"last_update":"1174300513", "numofapproved":"1", "id":"367"}, {"last_update":"1174301493", "numofapproved":"1", "id":"395"}, {"last_update":"1174899124", "numofapproved":"1", "id":"492"}, {"last_update":"1174899677", "numofapproved":"1", "id":"517"}, {"last_update":"1174924235", "numofapproved":"1", "id":"522"}, {"last_update":"1174925568", "numofapproved":"1", "id":"529"}, {"last_update":"1174933088", "numofapproved":"1", "id":"533"}, {"last_update":"1174933338", "numofapproved":"1", "id":"538"}, {"last_update":"1174044629", "numofapproved":"1", "id":"352"}, {"last_update":"1175713207", "numofapproved":"1", "id":"669"}, {"last_update":"1178339569", "numofapproved":"1", "id":"1262"}, {"last_update":"1178611427", "numofapproved":"1", "id":"1303"}, {"last_update":"1178707269", "numofapproved":"1", "id":"1341"}, {"last_update":"1179411388", "numofapproved":"1", "id":"1461"}, {"last_update":"1180000879", "numofapproved":"1", "id":"1648"}, {"last_update":"1180097993", "numofapproved":"1", "id":"1657"}, {"last_update":"1180107947", "numofapproved":"1", "id":"1659"}, {"last_update":"1180515935", "numofapproved":"1", "id":"1922"}, {"last_update":"1180712418", "numofapproved":"1", "id":"2102"}, {"last_update":"1180731895", "numofapproved":"1", "id":"2063"}, {"last_update":"1180731763", "numofapproved":"1", "id":"2143"}, {"last_update":"1180951519", "numofapproved":"1", "id":"2201"}, {"last_update":"1180954763", "numofapproved":"1", "id":"2182"}, {"last_update":"1181134185", "numofapproved":"1", "id":"2361"}, {"last_update":"1181206368", "numofapproved":"1", "id":"2441"}, {"last_update":"1181207556", "numofapproved":"1", "id":"2442"}, {"last_update":"1183065868", "numofapproved":"1", "id":"3741"}, {"last_update":"1183124436", "numofapproved":"1", "id":"3822"}, {"last_update":"1183118631", "numofapproved":"1", "id":"3802"}, {"last_update":"1183515629", "numofapproved":"1", "id":"4144"}, {"last_update":"1184169495", "numofapproved":"1", "id":"4621"}, {"last_update":"1184777700", "numofapproved":"1", "id":"5021"}, {"last_update":"1185371099", "numofapproved":"1", "id":"5441"}, {"last_update":"1185460060", "numofapproved":"1", "id":"5521"}, {"last_update":"1185462514", "numofapproved":"1", "id":"5541"}, {"last_update":"1185573050", "numofapproved":"1", "id":"5721"}, {"last_update":"1185795586", "numofapproved":"1", "id":"5781"}, {"last_update":"1185962181", "numofapproved":"1", "id":"5901"}, {"last_update":"1185987024", "numofapproved":"1", "id":"6001"}, {"last_update":"1186138150", "numofapproved":"1", "id":"6105"}, {"last_update":"1186500528", "numofapproved":"1", "id":"6281"}, {"last_update":"1187765075", "numofapproved":"1", "id":"7141"}, {"last_update":"1188158263", "numofapproved":"1", "id":"7482"}, {"last_update":"1189094579", "numofapproved":"1", "id":"8461"}, {"last_update":"1189327635", "numofapproved":"1", "id":"8721"}, {"last_update":"1182356521", "numofapproved":"1", "id":"3344"}, {"last_update":"1185017921", "numofapproved":"1", "id":"5161"}, {"last_update":"1185271167", "numofapproved":"1", "id":"5261"}, {"last_update":"1190663796", "numofapproved":"1", "id":"10041"}, {"last_update":"1190726728", "numofapproved":"1", "id":"10121"}, {"last_update":"1190801144", "numofapproved":"1", "id":"10241"}, {"last_update":"1190894441", "numofapproved":"1", "id":"10502"}, {"last_update":"1190973098", "numofapproved":"1", "id":"10667"}, {"last_update":"1190925124", "numofapproved":"1", "id":"10584"}, {"last_update":"1191249884", "numofapproved":"1", "id":"10961"}, {"last_update":"1187732431", "numofapproved":"1", "id":"7081"}, {"last_update":"1189259179", "numofapproved":"1", "id":"8681"}, {"last_update":"1191446517", "numofapproved":"1", "id":"11183"}, {"last_update":"1191510643", "numofapproved":"1", "id":"11381"}, {"last_update":"1191529640", "numofapproved":"1", "id":"11421"}, {"last_update":"1191588726", "numofapproved":"1", "id":"11602"}, {"last_update":"1191903050", "numofapproved":"1", "id":"11881"}, {"last_update":"1181218459", "numofapproved":"1", "id":"2464"}, {"last_update":"1187024536", "numofapproved":"1", "id":"6581"}, {"last_update":"1192009094", "numofapproved":"1", "id":"12041"}, {"last_update":"1192064048", "numofapproved":"1", "id":"12183"}, {"last_update":"1192061973", "numofapproved":"1", "id":"12181"}, {"last_update":"1193026780", "numofapproved":"1", "id":"13241"}, {"last_update":"1193416409", "numofapproved":"1", "id":"14161"}, {"last_update":"1186992495", "numofapproved":"1", "id":"6481"}, {"last_update":"1191410811", "numofapproved":"1", "id":"11066"}, {"last_update":"1193440748", "numofapproved":"1", "id":"14241"}, {"last_update":"1194252005", "numofapproved":"1", "id":"14884"}, {"last_update":"1194362364", "numofapproved":"1", "id":"14889"}, {"last_update":"1179240103", "numofapproved":"1", "id":"1389"}, {"last_update":"1181812262", "numofapproved":"1", "id":"2922"}, {"last_update":"1182093916", "numofapproved":"1", "id":"3181"}, {"last_update":"1182767688", "numofapproved":"1", "id":"3501"}, {"last_update":"1184181747", "numofapproved":"1", "id":"4661"}, {"last_update":"1186505570", "numofapproved":"1", "id":"6170"}, {"last_update":"1186751068", "numofapproved":"1", "id":"6384"}, {"last_update":"1187558925", "numofapproved":"1", "id":"6921"}, {"last_update":"1188037477", "numofapproved":"1", "id":"7424"}, {"last_update":"1194937530", "numofapproved":"1", "id":"16041"}, {"last_update":"1179754250", "numofapproved":"1", "id":"1562"}, {"last_update":"1183416194", "numofapproved":"1", "id":"4021"}, {"last_update":"1185835616", "numofapproved":"1", "id":"5841"}, {"last_update":"1192731190", "numofapproved":"1", "id":"13141"}, {"last_update":"1193178120", "numofapproved":"1", "id":"13523"}, {"last_update":"1193844805", "numofapproved":"1", "id":"14503"}, {"last_update":"1193909242", "numofapproved":"1", "id":"14525"}, {"last_update":"1195474767", "numofapproved":"1", "id":"17221"}, {"last_update":"1177690781", "numofapproved":"1", "id":"1142"}, {"last_update":"1185373614", "numofapproved":"1", "id":"5461"}, {"last_update":"1192520088", "numofapproved":"1", "id":"12624"}, {"last_update":"1193194444", "numofapproved":"1", "id":"13527"}, {"last_update":"1193387684", "numofapproved":"1", "id":"13950"}, {"last_update":"1193388786", "numofapproved":"1", "id":"13952"}, {"last_update":"1194616895", "numofapproved":"1", "id":"15401"}, {"last_update":"1195034817", "numofapproved":"1", "id":"16441"}, {"last_update":"1183107374", "numofapproved":"1", "id":"3761"}, {"last_update":"1183515040", "numofapproved":"1", "id":"4121"}, {"last_update":"1184744160", "numofapproved":"1", "id":"4942"}, {"last_update":"1192094830", "numofapproved":"1", "id":"12201"}, {"last_update":"1193314411", "numofapproved":"1", "id":"13821"}, {"last_update":"1193391901", "numofapproved":"1", "id":"13957"}, {"last_update":"1193399824", "numofapproved":"1", "id":"14043"}, {"last_update":"1194450353", "numofapproved":"1", "id":"15181"}, {"last_update":"1194474719", "numofapproved":"1", "id":"15241"}, {"last_update":"1194622799", "numofapproved":"1", "id":"15481"}, {"last_update":"1194880827", "numofapproved":"1", "id":"15901"}, {"last_update":"1182363929", "numofapproved":"1", "id":"3347"}, {"last_update":"1182952243", "numofapproved":"1", "id":"3642"}, {"last_update":"1183386876", "numofapproved":"1", "id":"3962"}, {"last_update":"1193178314", "numofapproved":"1", "id":"13524"}, {"last_update":"1195376577", "numofapproved":"1", "id":"17061"}, {"last_update":"1179832847", "numofapproved":"1", "id":"1621"}, {"last_update":"1184053269", "numofapproved":"1", "id":"4521"}, {"last_update":"1185024744", "numofapproved":"1", "id":"5181"}, {"last_update":"1186130324", "numofapproved":"1", "id":"6101"}, {"last_update":"1192529640", "numofapproved":"1", "id":"12662"}, {"last_update":"1193158482", "numofapproved":"1", "id":"13521"}, {"last_update":"1194247788", "numofapproved":"1", "id":"14883"}, {"last_update":"1182363717", "numofapproved":"1", "id":"3346"}, {"last_update":"1193386824", "numofapproved":"1", "id":"13944"}, {"last_update":"1193844655", "numofapproved":"1", "id":"14502"}, {"last_update":"1180732326", "numofapproved":"1", "id":"2064"}, {"last_update":"1182247493", "numofapproved":"1", "id":"3222"}, {"last_update":"1183515318", "numofapproved":"1", "id":"4143"}, {"last_update":"1184840285", "numofapproved":"1", "id":"5061"}, {"last_update":"1188458821", "numofapproved":"1", "id":"7741"}, {"last_update":"1188919582", "numofapproved":"1", "id":"8241"}, {"last_update":"1190990231", "numofapproved":"1", "id":"10701"}, {"last_update":"1190990557", "numofapproved":"1", "id":"10708"}, {"last_update":"1191583611", "numofapproved":"1", "id":"11521"}, {"last_update":"1192031263", "numofapproved":"1", "id":"12102"}, {"last_update":"1192431349", "numofapproved":"1", "id":"12563"}, {"last_update":"1192608972", "numofapproved":"1", "id":"12801"}, {"last_update":"1193244196", "numofapproved":"1", "id":"13641"}, {"last_update":"1193733530", "numofapproved":"1", "id":"14422"}, {"last_update":"1194988770", "numofapproved":"1", "id":"16381"}, {"last_update":"1195050890", "numofapproved":"1", "id":"16541"}, {"last_update":"1195047262", "numofapproved":"1", "id":"16502"}, {"last_update":"1195221672", "numofapproved":"1", "id":"16941"}, {"last_update":"1195400016", "numofapproved":"1", "id":"17103"}, {"last_update":"1178716622", "numofapproved":"1", "id":"1343"}, {"last_update":"1183563126", "numofapproved":"1", "id":"4181"}, {"last_update":"1183970953", "numofapproved":"1", "id":"4402"}, {"last_update":"1190149151", "numofapproved":"1", "id":"9381"}, {"last_update":"1190628937", "numofapproved":"1", "id":"9921"}, {"last_update":"1190908511", "numofapproved":"1", "id":"10521"}, {"last_update":"1191365468", "numofapproved":"1", "id":"11021"}, {"last_update":"1192431054", "numofapproved":"1", "id":"12561"}, {"last_update":"1188938163", "numofapproved":"1", "id":"8281"}, {"last_update":"1192155298", "numofapproved":"1", "id":"12383"}, {"last_update":"1193223714", "numofapproved":"1", "id":"13561"}, {"last_update":"1171799359", "numofapproved":"1", "id":"80"}, {"last_update":"1171962550", "numofapproved":"1", "id":"112"}, {"last_update":"1171965210", "numofapproved":"1", "id":"113"}, {"last_update":"1171980888", "numofapproved":"1", "id":"128"}, {"last_update":"1174299174", "numofapproved":"1", "id":"361"}, {"last_update":"1174301053", "numofapproved":"1", "id":"376"}, {"last_update":"1174899661", "numofapproved":"1", "id":"516"}, {"last_update":"1172646493", "numofapproved":"1", "id":"218"}, {"last_update":"1174899018", "numofapproved":"1", "id":"487"}, {"last_update":"1175091201", "numofapproved":"1", "id":"540"}, {"last_update":"1175267243", "numofapproved":"1", "id":"564"}, {"last_update":"1176293117", "numofapproved":"1", "id":"826"}, {"last_update":"1171602873", "numofapproved":"1", "id":"67"}, {"last_update":"1172568714", "numofapproved":"1", "id":"210"}, {"last_update":"1174300556", "numofapproved":"1", "id":"369"}, {"last_update":"1174301614", "numofapproved":"1", "id":"398"}, {"last_update":"1174429050", "numofapproved":"1", "id":"404"}, {"last_update":"1175547821", "numofapproved":"1", "id":"641"}, {"last_update":"1175696551", "numofapproved":"1", "id":"702"}, {"last_update":"1176223342", "numofapproved":"1", "id":"823"}, {"last_update":"1176459077", "numofapproved":"1", "id":"905"}, {"last_update":"1172169117", "numofapproved":"1", "id":"172"}, {"last_update":"1172259821", "numofapproved":"1", "id":"189"}, {"last_update":"1172847347", "numofapproved":"1", "id":"237"}, {"last_update":"1176485274", "numofapproved":"1", "id":"961"}, {"last_update":"1176739199", "numofapproved":"1", "id":"983"}, {"last_update":"1171710108", "numofapproved":"1", "id":"72"}, {"last_update":"1172147854", "numofapproved":"1", "id":"170"}, {"last_update":"1172178657", "numofapproved":"1", "id":"173"}, {"last_update":"1174933210", "numofapproved":"1", "id":"535"}, {"last_update":"1175502973", "numofapproved":"1", "id":"626"}, {"last_update":"1172071610", "numofapproved":"1", "id":"146"}, {"last_update":"1172847402", "numofapproved":"1", "id":"240"}, {"last_update":"1173282970", "numofapproved":"1", "id":"258"}, {"last_update":"1175502729", "numofapproved":"1", "id":"621"}, {"last_update":"1173889203", "numofapproved":"1", "id":"327"}, {"last_update":"1174301604", "numofapproved":"1", "id":"396"}, {"last_update":"1176738556", "numofapproved":"1", "id":"1005"}, {"last_update":"1171287066", "numofapproved":"1", "id":"22"}, {"last_update":"1171388951", "numofapproved":"1", "id":"46"}, {"last_update":"1171645099", "numofapproved":"1", "id":"70"}, {"last_update":"1174301489", "numofapproved":"1", "id":"394"}, {"last_update":"1176109438", "numofapproved":"1", "id":"804"}, {"last_update":"1173203622", "numofapproved":"1", "id":"251"}, {"last_update":"1174300337", "numofapproved":"1", "id":"364"}, {"last_update":"1174898999", "numofapproved":"1", "id":"486"}, {"last_update":"1174899221", "numofapproved":"1", "id":"497"}, {"last_update":"1174899505", "numofapproved":"1", "id":"508"}, {"last_update":"1171905996", "numofapproved":"1", "id":"106"}, {"last_update":"1172003938", "numofapproved":"1", "id":"131"}, {"last_update":"1172134183", "numofapproved":"1", "id":"167"}, {"last_update":"1178550080", "numofapproved":"1", "id":"1301"}, {"last_update":"1178718229", "numofapproved":"1", "id":"1346"}, {"last_update":"1178725187", "numofapproved":"1", "id":"1322"}, {"last_update":"1179302219", "numofapproved":"1", "id":"1392"}, {"last_update":"1180015260", "numofapproved":"1", "id":"1650"}, {"last_update":"1180088452", "numofapproved":"1", "id":"1656"}, {"last_update":"1180719498", "numofapproved":"1", "id":"2121"}, {"last_update":"1180731930", "numofapproved":"1", "id":"2145"}, {"last_update":"1180731601", "numofapproved":"1", "id":"2142"}, {"last_update":"1181034337", "numofapproved":"1", "id":"2281"}, {"last_update":"1181222113", "numofapproved":"1", "id":"2501"}, {"last_update":"1181254636", "numofapproved":"1", "id":"2601"}, {"last_update":"1181578682", "numofapproved":"1", "id":"2762"}, {"last_update":"1181731051", "numofapproved":"1", "id":"2881"}, {"last_update":"1177673345", "numofapproved":"1", "id":"1162"}, {"last_update":"1183741680", "numofapproved":"1", "id":"4301"}, {"last_update":"1183988623", "numofapproved":"1", "id":"4441"}, {"last_update":"1184217947", "numofapproved":"1", "id":"4701"}, {"last_update":"1186260146", "numofapproved":"1", "id":"6181"}, {"last_update":"1186289860", "numofapproved":"1", "id":"6163"}, {"last_update":"1186235477", "numofapproved":"1", "id":"6161"}, {"last_update":"1186508996", "numofapproved":"1", "id":"6171"}, {"last_update":"1187626570", "numofapproved":"1", "id":"6961"}, {"last_update":"1187713755", "numofapproved":"1", "id":"7041"}, {"last_update":"1187769208", "numofapproved":"1", "id":"7222"}, {"last_update":"1187856827", "numofapproved":"1", "id":"7341"}, {"last_update":"1188053850", "numofapproved":"1", "id":"7461"}, {"last_update":"1188264856", "numofapproved":"1", "id":"7541"}, {"last_update":"1188319841", "numofapproved":"1", "id":"7681"}, {"last_update":"1188582632", "numofapproved":"1", "id":"7901"}, {"last_update":"1188734330", "numofapproved":"1", "id":"8001"}, {"last_update":"1189003562", "numofapproved":"1", "id":"8381"}, {"last_update":"1179787121", "numofapproved":"1", "id":"1581"}, {"last_update":"1181998896", "numofapproved":"1", "id":"3121"}, {"last_update":"1182274782", "numofapproved":"1", "id":"3261"}, {"last_update":"1186350397", "numofapproved":"1", "id":"6241"}, {"last_update":"1187354512", "numofapproved":"1", "id":"6881"}, {"last_update":"1188918086", "numofapproved":"1", "id":"8221"}, {"last_update":"1190392989", "numofapproved":"1", "id":"9721"}, {"last_update":"1190925022", "numofapproved":"1", "id":"10583"}, {"last_update":"1190959571", "numofapproved":"1", "id":"10601"}, {"last_update":"1190990357", "numofapproved":"1", "id":"10705"}, {"last_update":"1190990656", "numofapproved":"1", "id":"10710"}, {"last_update":"1191226364", "numofapproved":"1", "id":"10921"}, {"last_update":"1180011741", "numofapproved":"1", "id":"1761"}, {"last_update":"1180533694", "numofapproved":"1", "id":"1961"}, {"last_update":"1180731839", "numofapproved":"1", "id":"2144"}, {"last_update":"1181461876", "numofapproved":"1", "id":"2681"}, {"last_update":"1181855690", "numofapproved":"1", "id":"3061"}, {"last_update":"1189537687", "numofapproved":"1", "id":"8821"}, {"last_update":"1189937430", "numofapproved":"1", "id":"9161"}, {"last_update":"1190803903", "numofapproved":"1", "id":"10261"}, {"last_update":"1190973051", "numofapproved":"1", "id":"10664"}, {"last_update":"1191410739", "numofapproved":"1", "id":"11064"}, {"last_update":"1191426697", "numofapproved":"1", "id":"11121"}, {"last_update":"1191446459", "numofapproved":"1", "id":"11182"}, {"last_update":"1191450891", "numofapproved":"1", "id":"11201"}, {"last_update":"1191550000", "numofapproved":"1", "id":"11441"}, {"last_update":"1191588714", "numofapproved":"1", "id":"11601"}, {"last_update":"1191596815", "numofapproved":"1", "id":"11641"}, {"last_update":"1191647971", "numofapproved":"1", "id":"11741"}, {"last_update":"1191949660", "numofapproved":"1", "id":"11981"}, {"last_update":"1180641844", "numofapproved":"1", "id":"2001"}, {"last_update":"1188319710", "numofapproved":"1", "id":"7661"}, {"last_update":"1189169640", "numofapproved":"1", "id":"8621"}, {"last_update":"1192028009", "numofapproved":"1", "id":"12081"}, {"last_update":"1192116783", "numofapproved":"1", "id":"12261"}, {"last_update":"1192558715", "numofapproved":"1", "id":"12741"}, {"last_update":"1192727702", "numofapproved":"1", "id":"13101"}, {"last_update":"1193035517", "numofapproved":"1", "id":"13262"}, {"last_update":"1193080239", "numofapproved":"1", "id":"13381"}, {"last_update":"1193268912", "numofapproved":"1", "id":"13722"}, {"last_update":"1193386894", "numofapproved":"1", "id":"13946"}, {"last_update":"1193388087", "numofapproved":"1", "id":"13982"}, {"last_update":"1179841973", "numofapproved":"1", "id":"1642"}, {"last_update":"1179842066", "numofapproved":"1", "id":"1662"}, {"last_update":"1185971695", "numofapproved":"1", "id":"5941"}, {"last_update":"1186137440", "numofapproved":"1", "id":"6103"}, {"last_update":"1192823224", "numofapproved":"1", "id":"13181"}, {"last_update":"1193921116", "numofapproved":"1", "id":"14581"}, {"last_update":"1193918035", "numofapproved":"1", "id":"14544"}, {"last_update":"1193973759", "numofapproved":"1", "id":"14663"}, {"last_update":"1194004166", "numofapproved":"1", "id":"14721"}, {"last_update":"1194020795", "numofapproved":"1", "id":"14761"}, {"last_update":"1194021069", "numofapproved":"1", "id":"14781"}, {"last_update":"1194283444", "numofapproved":"1", "id":"14887"}, {"last_update":"1194436909", "numofapproved":"1", "id":"15141"}, {"last_update":"1194538247", "numofapproved":"1", "id":"15341"}, {"last_update":"1180031440", "numofapproved":"1", "id":"1801"}, {"last_update":"1181823965", "numofapproved":"1", "id":"2941"}, {"last_update":"1182846565", "numofapproved":"1", "id":"3561"}, {"last_update":"1185872587", "numofapproved":"1", "id":"5843"}, {"last_update":"1186472951", "numofapproved":"1", "id":"6168"}, {"last_update":"1189937606", "numofapproved":"1", "id":"9181"}, {"last_update":"1193389026", "numofapproved":"1", "id":"13955"}, {"last_update":"1192130592", "numofapproved":"1", "id":"12321"}, {"last_update":"1194387386", "numofapproved":"1", "id":"15061"}, {"last_update":"1179336536", "numofapproved":"1", "id":"1396"}, {"last_update":"1182280246", "numofapproved":"1", "id":"3281"}, {"last_update":"1183394591", "numofapproved":"1", "id":"4001"}, {"last_update":"1184677502", "numofapproved":"1", "id":"4909"}, {"last_update":"1186144184", "numofapproved":"1", "id":"6106"}, {"last_update":"1187191683", "numofapproved":"1", "id":"6701"}, {"last_update":"1193909594", "numofapproved":"1", "id":"14527"}, {"last_update":"1194435747", "numofapproved":"1", "id":"15121"}, {"last_update":"1184252278", "numofapproved":"1", "id":"4761"}, {"last_update":"1194854996", "numofapproved":"1", "id":"15721"}, {"last_update":"1194937730", "numofapproved":"1", "id":"16045"}, {"last_update":"1193076864", "numofapproved":"1", "id":"13361"}, {"last_update":"1194904087", "numofapproved":"1", "id":"15981"}, {"last_update":"1181853751", "numofapproved":"1", "id":"3001"}, {"last_update":"1182075529", "numofapproved":"1", "id":"3161"}, {"last_update":"1184883226", "numofapproved":"1", "id":"5081"}, {"last_update":"1186136013", "numofapproved":"1", "id":"6102"}, {"last_update":"1193147983", "numofapproved":"1", "id":"13481"}, {"last_update":"1194532658", "numofapproved":"1", "id":"15301"}, {"last_update":"1194937763", "numofapproved":"1", "id":"16046"}, {"last_update":"1195225183", "numofapproved":"1", "id":"16981"}, {"last_update":"1180616624", "numofapproved":"1", "id":"1981"}, {"last_update":"1183019269", "numofapproved":"1", "id":"3701"}, {"last_update":"1188656338", "numofapproved":"1", "id":"7941"}, {"last_update":"1178799062", "numofapproved":"1", "id":"1353"}, {"last_update":"1178905809", "numofapproved":"1", "id":"1360"}, {"last_update":"1179311575", "numofapproved":"1", "id":"1408"}, {"last_update":"1182507595", "numofapproved":"1", "id":"3461"}, {"last_update":"1184254004", "numofapproved":"1", "id":"4781"}, {"last_update":"1187938257", "numofapproved":"1", "id":"7381"}, {"last_update":"1188473327", "numofapproved":"1", "id":"7801"}, {"last_update":"1189102174", "numofapproved":"1", "id":"8481"}, {"last_update":"1191419747", "numofapproved":"1", "id":"11102"}, {"last_update":"1193389169", "numofapproved":"1", "id":"14002"}, {"last_update":"1194440930", "numofapproved":"1", "id":"15102"}, {"last_update":"1194855848", "numofapproved":"1", "id":"15741"}, {"last_update":"1194862162", "numofapproved":"1", "id":"15841"}, {"last_update":"1194923605", "numofapproved":"1", "id":"16021"}, {"last_update":"1194950051", "numofapproved":"1", "id":"16142"}, {"last_update":"1194960554", "numofapproved":"1", "id":"16181"}, {"last_update":"1194988868", "numofapproved":"1", "id":"16382"}, {"last_update":"1195058276", "numofapproved":"1", "id":"16601"}, {"last_update":"1195469960", "numofapproved":"1", "id":"17201"}, {"last_update":"1178648361", "numofapproved":"1", "id":"1311"}, {"last_update":"1183970840", "numofapproved":"1", "id":"4401"}, {"last_update":"1184838534", "numofapproved":"1", "id":"5041"}, {"last_update":"1190745858", "numofapproved":"1", "id":"10161"}, {"last_update":"1191587968", "numofapproved":"1", "id":"11581"}, {"last_update":"1189773687", "numofapproved":"1", "id":"9021"}, {"last_update":"1192612866", "numofapproved":"1", "id":"12804"}, {"last_update":"1193746024", "numofapproved":"1", "id":"14461"}, {"last_update":"1193918117", "numofapproved":"1", "id":"14561"}, {"last_update":"1194981013", "numofapproved":"1", "id":"16321"}, {"last_update":"1195546695", "numofapproved":"1", "id":"17481"}, {"last_update":"1177592107", "numofapproved":"1", "id":"1047"}, {"last_update":"1183569612", "numofapproved":"1", "id":"4221"}, {"last_update":"1186770649", "numofapproved":"1", "id":"6401"}, {"last_update":"1187707518", "numofapproved":"1", "id":"7021"}, {"last_update":"1187769297", "numofapproved":"1", "id":"7223"}, {"last_update":"1187798945", "numofapproved":"1", "id":"7241"}, {"last_update":"1187820883", "numofapproved":"1", "id":"7261"}, {"last_update":"1190286816", "numofapproved":"1", "id":"9581"}, {"last_update":"1190541964", "numofapproved":"1", "id":"9842"}, {"last_update":"1190500569", "numofapproved":"1", "id":"9802"}, {"last_update":"1190800190", "numofapproved":"1", "id":"10222"}, {"last_update":"1190965460", "numofapproved":"1", "id":"10642"}, {"last_update":"1192120899", "numofapproved":"1", "id":"12301"}, {"last_update":"1193265675", "numofapproved":"1", "id":"13701"}, {"last_update":"1194508196", "numofapproved":"1", "id":"15261"}, {"last_update":"1172503197", "numofapproved":"1", "id":"196"}, {"last_update":"1172847366", "numofapproved":"1", "id":"238"}, {"last_update":"1173975764", "numofapproved":"1", "id":"347"}, {"last_update":"1174301010", "numofapproved":"1", "id":"375"}, {"last_update":"1174899614", "numofapproved":"1", "id":"514"}, {"last_update":"1174924853", "numofapproved":"1", "id":"527"}, {"last_update":"1175270318", "numofapproved":"1", "id":"567"}, {"last_update":"1174933246", "numofapproved":"1", "id":"536"}, {"last_update":"1176369900", "numofapproved":"1", "id":"889"}, {"last_update":"1171102836", "numofapproved":"1", "id":"2"}, {"last_update":"1171970451", "numofapproved":"1", "id":"121"}, {"last_update":"1174898953", "numofapproved":"1", "id":"484"}, {"last_update":"1175610845", "numofapproved":"1", "id":"664"}, {"last_update":"1176313569", "numofapproved":"1", "id":"885"}, {"last_update":"1171878648", "numofapproved":"1", "id":"89"}, {"last_update":"1171897268", "numofapproved":"1", "id":"96"}, {"last_update":"1172326187", "numofapproved":"1", "id":"193"}, {"last_update":"1176106905", "numofapproved":"1", "id":"802"}, {"last_update":"1176389540", "numofapproved":"1", "id":"891"}, {"last_update":"1171318806", "numofapproved":"1", "id":"24"}, {"last_update":"1171601548", "numofapproved":"1", "id":"66"}, {"last_update":"1172148331", "numofapproved":"1", "id":"171"}, {"last_update":"1172686680", "numofapproved":"1", "id":"228"}, {"last_update":"1173793572", "numofapproved":"1", "id":"308"}, {"last_update":"1174899594", "numofapproved":"1", "id":"513"}, {"last_update":"1174898936", "numofapproved":"1", "id":"483"}, {"last_update":"1175502773", "numofapproved":"1", "id":"622"}, {"last_update":"1175722537", "numofapproved":"1", "id":"709"}, {"last_update":"1175764633", "numofapproved":"1", "id":"672"}, {"last_update":"1175797156", "numofapproved":"1", "id":"721"}, {"last_update":"1175899070", "numofapproved":"1", "id":"785"}, {"last_update":"1176106959", "numofapproved":"1", "id":"803"}, {"last_update":"1176228460", "numofapproved":"1", "id":"824"}, {"last_update":"1176488163", "numofapproved":"1", "id":"962"}, {"last_update":"1172068869", "numofapproved":"1", "id":"133"}, {"last_update":"1172847381", "numofapproved":"1", "id":"239"}, {"last_update":"1173888657", "numofapproved":"1", "id":"320"}, {"last_update":"1171449446", "numofapproved":"1", "id":"48"}, {"last_update":"1175287424", "numofapproved":"1", "id":"581"}, {"last_update":"1175502897", "numofapproved":"1", "id":"624"}, {"last_update":"1175503020", "numofapproved":"1", "id":"605"}, {"last_update":"1172848367", "numofapproved":"1", "id":"243"}, {"last_update":"1174301060", "numofapproved":"1", "id":"377"}, {"last_update":"1176824481", "numofapproved":"1", "id":"986"}, {"last_update":"1171275893", "numofapproved":"1", "id":"6"}, {"last_update":"1172546216", "numofapproved":"1", "id":"206"}, {"last_update":"1175502705", "numofapproved":"1", "id":"601"}, {"last_update":"1173962671", "numofapproved":"1", "id":"341"}, {"last_update":"1173975403", "numofapproved":"1", "id":"342"}, {"last_update":"1173816295", "numofapproved":"1", "id":"313"}, {"last_update":"1174301256", "numofapproved":"1", "id":"384"}, {"last_update":"1174933293", "numofapproved":"1", "id":"537"}, {"last_update":"1176899419", "numofapproved":"1", "id":"988"}, {"last_update":"1173975599", "numofapproved":"1", "id":"345"}, {"last_update":"1174041960", "numofapproved":"1", "id":"351"}, {"last_update":"1175759476", "numofapproved":"1", "id":"671"}, {"last_update":"1178195644", "numofapproved":"1", "id":"1207"}, {"last_update":"1178725318", "numofapproved":"1", "id":"1348"}, {"last_update":"1179333492", "numofapproved":"1", "id":"1421"}, {"last_update":"1179999737", "numofapproved":"1", "id":"1646"}, {"last_update":"1180710770", "numofapproved":"1", "id":"2062"}, {"last_update":"1182868347", "numofapproved":"1", "id":"3601"}, {"last_update":"1182932927", "numofapproved":"1", "id":"3621"}, {"last_update":"1183115054", "numofapproved":"1", "id":"3784"}, {"last_update":"1180000741", "numofapproved":"1", "id":"1647"}, {"last_update":"1181292582", "numofapproved":"1", "id":"2621"}, {"last_update":"1184181581", "numofapproved":"1", "id":"4641"}, {"last_update":"1185280501", "numofapproved":"1", "id":"5301"}, {"last_update":"1185471699", "numofapproved":"1", "id":"5561"}, {"last_update":"1185542771", "numofapproved":"1", "id":"5701"}, {"last_update":"1186650650", "numofapproved":"1", "id":"6361"}, {"last_update":"1186951065", "numofapproved":"1", "id":"6461"}, {"last_update":"1187769080", "numofapproved":"1", "id":"7221"}, {"last_update":"1187887905", "numofapproved":"1", "id":"7348"}, {"last_update":"1188001607", "numofapproved":"1", "id":"7423"}, {"last_update":"1188463414", "numofapproved":"1", "id":"7762"}, {"last_update":"1188555813", "numofapproved":"1", "id":"7861"}, {"last_update":"1188634622", "numofapproved":"1", "id":"7921"}, {"last_update":"1189543954", "numofapproved":"1", "id":"8841"}, {"last_update":"1177511009", "numofapproved":"1", "id":"1043"}, {"last_update":"1181898808", "numofapproved":"1", "id":"3081"}, {"last_update":"1182247483", "numofapproved":"1", "id":"3221"}, {"last_update":"1187024005", "numofapproved":"1", "id":"6562"}, {"last_update":"1189839471", "numofapproved":"1", "id":"9081"}, {"last_update":"1190018380", "numofapproved":"1", "id":"9241"}, {"last_update":"1190149586", "numofapproved":"1", "id":"9401"}, {"last_update":"1190652684", "numofapproved":"1", "id":"9981"}, {"last_update":"1190662296", "numofapproved":"1", "id":"10022"}, {"last_update":"1190813509", "numofapproved":"1", "id":"10281"}, {"last_update":"1190826005", "numofapproved":"1", "id":"10403"}, {"last_update":"1190991166", "numofapproved":"1", "id":"10722"}, {"last_update":"1191057700", "numofapproved":"1", "id":"10801"}, {"last_update":"1191161241", "numofapproved":"1", "id":"10821"}, {"last_update":"1191227885", "numofapproved":"1", "id":"10941"}, {"last_update":"1182537005", "numofapproved":"1", "id":"3481"}, {"last_update":"1185018401", "numofapproved":"1", "id":"5162"}, {"last_update":"1186752963", "numofapproved":"1", "id":"6386"}, {"last_update":"1190660077", "numofapproved":"1", "id":"10001"}, {"last_update":"1191319062", "numofapproved":"1", "id":"10981"}, {"last_update":"1191446097", "numofapproved":"1", "id":"11161"}, {"last_update":"1191446587", "numofapproved":"1", "id":"11184"}, {"last_update":"1191470824", "numofapproved":"1", "id":"11221"}, {"last_update":"1191526821", "numofapproved":"1", "id":"11401"}, {"last_update":"1191585471", "numofapproved":"1", "id":"11561"}, {"last_update":"1191602213", "numofapproved":"1", "id":"11701"}, {"last_update":"1191845720", "numofapproved":"1", "id":"11821"}, {"last_update":"1191933874", "numofapproved":"1", "id":"11902"}, {"last_update":"1191933897", "numofapproved":"1", "id":"11903"}, {"last_update":"1177673238", "numofapproved":"1", "id":"1161"}, {"last_update":"1181601542", "numofapproved":"1", "id":"2781"}, {"last_update":"1182869532", "numofapproved":"1", "id":"3583"}, {"last_update":"1183315879", "numofapproved":"1", "id":"3881"}, {"last_update":"1187097870", "numofapproved":"1", "id":"6641"}, {"last_update":"1190148660", "numofapproved":"1", "id":"9361"}, {"last_update":"1192248648", "numofapproved":"1", "id":"12521"}, {"last_update":"1192702958", "numofapproved":"1", "id":"13001"}, {"last_update":"1193387721", "numofapproved":"1", "id":"13981"}, {"last_update":"1193391276", "numofapproved":"1", "id":"14021"}, {"last_update":"1193397051", "numofapproved":"1", "id":"14061"}, {"last_update":"1193592081", "numofapproved":"1", "id":"14321"}, {"last_update":"1188474438", "numofapproved":"1", "id":"7821"}, {"last_update":"1190158372", "numofapproved":"1", "id":"9441"}, {"last_update":"1193648459", "numofapproved":"1", "id":"14361"}, {"last_update":"1193999834", "numofapproved":"1", "id":"14681"}, {"last_update":"1194200119", "numofapproved":"1", "id":"14861"}, {"last_update":"1194528747", "numofapproved":"1", "id":"15111"}, {"last_update":"1179150787", "numofapproved":"1", "id":"1384"}, {"last_update":"1179266496", "numofapproved":"1", "id":"1390"}, {"last_update":"1179508139", "numofapproved":"1", "id":"1501"}, {"last_update":"1179842157", "numofapproved":"1", "id":"1664"}, {"last_update":"1179842347", "numofapproved":"1", "id":"1668"}, {"last_update":"1181245388", "numofapproved":"1", "id":"2562"}, {"last_update":"1181311044", "numofapproved":"1", "id":"2661"}, {"last_update":"1181545818", "numofapproved":"1", "id":"2701"}, {"last_update":"1181934881", "numofapproved":"1", "id":"3103"}, {"last_update":"1187020798", "numofapproved":"1", "id":"6541"}, {"last_update":"1187271377", "numofapproved":"1", "id":"6801"}, {"last_update":"1196086904", "numofapproved":"1", "id":"17545"}, {"last_update":"1196266437", "numofapproved":"2", "id":"17662"}, {"last_update":"1196266638", "numofapproved":"2", "id":"17663"}, {"last_update":"1197533251", "numofapproved":"1", "id":"17901"}, {"last_update":"1197533384", "numofapproved":"1", "id":"17923"}, {"last_update":"1197556776", "numofapproved":"2", "id":"17941"}, {"last_update":"1200059354", "numofapproved":"1", "id":"17981"}, {"last_update":"1200576144", "numofapproved":"1", "id":"18001"}, {"last_update":"1200576230", "numofapproved":"1", "id":"18002"}, {"last_update":"1200657266", "numofapproved":"1", "id":"18041"}, {"last_update":"1201510556", "numofapproved":"1", "id":"18061"}, {"last_update":"1196087136", "numofapproved":"1", "id":"17546"}, {"last_update":"1196087269", "numofapproved":"1", "id":"17547"}, {"last_update":"1196087335", "numofapproved":"1", "id":"17548"}, {"last_update":"1196087379", "numofapproved":"1", "id":"17549"}, {"last_update":"1196087427", "numofapproved":"1", "id":"17550"}, {"last_update":"1196096347", "numofapproved":"1", "id":"17581"}, {"last_update":"1196265997", "numofapproved":"2", "id":"17661"}, {"last_update":"1196266785", "numofapproved":"1", "id":"17664"}, {"last_update":"1196270058", "numofapproved":"1", "id":"17701"}, {"last_update":"1196431875", "numofapproved":"1", "id":"17804"}, {"last_update":"1197635044", "numofapproved":"1", "id":"17961"}, {"last_update":"1202720206", "numofapproved":"2", "id":"18084"}, {"last_update":"1196267153", "numofapproved":"1", "id":"17681"}, {"last_update":"1196090749", "numofapproved":"1", "id":"17569"}, {"last_update":"1196162163", "numofapproved":"2", "id":"17641"}, {"last_update":"1196345846", "numofapproved":"1", "id":"17721"}, {"last_update":"1196088254", "numofapproved":"1", "id":"17552"}, {"last_update":"1196088437", "numofapproved":"1", "id":"17564"}, {"last_update":"1196088477", "numofapproved":"1", "id":"17565"}, {"last_update":"1196088537", "numofapproved":"1", "id":"17566"}, {"last_update":"1196088894", "numofapproved":"1", "id":"17567"}, {"last_update":"1196090414", "numofapproved":"1", "id":"17554"}, {"last_update":"1196097621", "numofapproved":"1", "id":"17601"}, {"last_update":"1196097710", "numofapproved":"1", "id":"17602"}, {"last_update":"1196098047", "numofapproved":"1", "id":"17603"}, {"last_update":"1196358376", "numofapproved":"2", "id":"17761"}, {"last_update":"1196358647", "numofapproved":"1", "id":"17762"}, {"last_update":"1196427604", "numofapproved":"1", "id":"17781"}, {"last_update":"1196429856", "numofapproved":"1", "id":"17782"}, {"last_update":"1196431068", "numofapproved":"2", "id":"17783"}, {"last_update":"1196435953", "numofapproved":"2", "id":"17821"}, {"last_update":"1204027277", "numofapproved":"1", "id":"18104"}, {"last_update":"1196090201", "numofapproved":"1", "id":"17553"}, {"last_update":"1196097095", "numofapproved":"1", "id":"17582"}, {"last_update":"1196097215", "numofapproved":"1", "id":"17583"}, {"last_update":"1196430140", "numofapproved":"2", "id":"17803"}, {"last_update":"1196436411", "numofapproved":"2", "id":"17841"}, {"last_update":"1196692298", "numofapproved":"1", "id":"17861"}, {"last_update":"1196692342", "numofapproved":"2", "id":"17862"}, {"last_update":"1196695231", "numofapproved":"2", "id":"17865"}, {"last_update":"1197533316", "numofapproved":"1", "id":"17921"}, {"last_update":"1201512744", "numofapproved":"1", "id":"18082"}, {"last_update":"1201513438", "numofapproved":"2", "id":"18083"}, {"last_update":"1196087540", "numofapproved":"1", "id":"17551"}, {"last_update":"1196156416", "numofapproved":"2", "id":"17621"}, {"last_update":"1196356717", "numofapproved":"1", "id":"17741"}, {"last_update":"1196428544", "numofapproved":"2", "id":"17801"}, {"last_update":"1196429000", "numofapproved":"2", "id":"17802"}, {"last_update":"1196692578", "numofapproved":"1", "id":"17863"}, {"last_update":"1196693445", "numofapproved":"2", "id":"17881"}, {"last_update":"1196693804", "numofapproved":"2", "id":"17864"}, {"last_update":"1197533347", "numofapproved":"1", "id":"17922"}, {"last_update":"1200591782", "numofapproved":"1", "id":"18021"}, {"last_update":"1201510930", "numofapproved":"1", "id":"18081"}, {"last_update":"1192432005", "numofapproved":"1", "id":"12582"}, {"last_update":"1192614291", "numofapproved":"1", "id":"12805"}, {"last_update":"1192624421", "numofapproved":"1", "id":"12806"}, {"last_update":"1192983623", "numofapproved":"1", "id":"13221"}, {"last_update":"1193043248", "numofapproved":"1", "id":"13282"}, {"last_update":"1193223892", "numofapproved":"1", "id":"13562"}, {"last_update":"1193239943", "numofapproved":"1", "id":"13601"}, {"last_update":"1193385960", "numofapproved":"1", "id":"13961"}, {"last_update":"1193386863", "numofapproved":"1", "id":"13945"}, {"last_update":"1193399770", "numofapproved":"1", "id":"14042"}, {"last_update":"1193417684", "numofapproved":"1", "id":"14181"}, {"last_update":"1193458402", "numofapproved":"1", "id":"14261"}, {"last_update":"1193555071", "numofapproved":"1", "id":"14301"}, {"last_update":"1185285506", "numofapproved":"1", "id":"5321"}, {"last_update":"1188250869", "numofapproved":"1", "id":"7521"}, {"last_update":"1191410480", "numofapproved":"1", "id":"11061"}, {"last_update":"1193763056", "numofapproved":"1", "id":"14482"}, {"last_update":"1193913886", "numofapproved":"1", "id":"14542"}, {"last_update":"1194366001", "numofapproved":"1", "id":"14890"}, {"last_update":"1194454607", "numofapproved":"1", "id":"15105"}, {"last_update":"1194255904", "numofapproved":"1", "id":"14941"}, {"last_update":"1179328986", "numofapproved":"1", "id":"1395"}, {"last_update":"1180377628", "numofapproved":"1", "id":"1861"}, {"last_update":"1181250011", "numofapproved":"1", "id":"2563"}, {"last_update":"1181572386", "numofapproved":"1", "id":"2741"}, {"last_update":"1183967114", "numofapproved":"1", "id":"4381"}, {"last_update":"1192512712", "numofapproved":"1", "id":"12623"}, {"last_update":"1193172621", "numofapproved":"1", "id":"13522"}, {"last_update":"1193868932", "numofapproved":"1", "id":"14523"}, {"last_update":"1194980345", "numofapproved":"1", "id":"16301"}, {"last_update":"1182280312", "numofapproved":"1", "id":"3282"}, {"last_update":"1184058726", "numofapproved":"1", "id":"4542"}, {"last_update":"1188829875", "numofapproved":"1", "id":"8161"}, {"last_update":"1190129857", "numofapproved":"1", "id":"9341"}, {"last_update":"1190652687", "numofapproved":"1", "id":"9982"}, {"last_update":"1193389082", "numofapproved":"1", "id":"13956"}, {"last_update":"1195400591", "numofapproved":"1", "id":"17121"}, {"last_update":"1184420846", "numofapproved":"1", "id":"4882"}, {"last_update":"1184532219", "numofapproved":"1", "id":"4903"}, {"last_update":"1192030476", "numofapproved":"1", "id":"12101"}, {"last_update":"1192202239", "numofapproved":"1", "id":"12461"}, {"last_update":"1192688302", "numofapproved":"1", "id":"12961"}, {"last_update":"1192703266", "numofapproved":"1", "id":"13021"}, {"last_update":"1193387096", "numofapproved":"1", "id":"13948"}, {"last_update":"1193387200", "numofapproved":"1", "id":"13949"}, {"last_update":"1193909837", "numofapproved":"1", "id":"14528"}, {"last_update":"1181062093", "numofapproved":"1", "id":"2301"}, {"last_update":"1182364431", "numofapproved":"1", "id":"3348"}, {"last_update":"1182364589", "numofapproved":"1", "id":"3349"}, {"last_update":"1184942429", "numofapproved":"1", "id":"5101"}, {"last_update":"1192682522", "numofapproved":"1", "id":"12901"}, {"last_update":"1184756287", "numofapproved":"1", "id":"4944"}, {"last_update":"1190274411", "numofapproved":"1", "id":"9541"}, {"last_update":"1193324229", "numofapproved":"1", "id":"13861"}, {"last_update":"1195163999", "numofapproved":"1", "id":"16861"}, {"last_update":"1181553321", "numofapproved":"1", "id":"2721"}, {"last_update":"1178869453", "numofapproved":"1", "id":"1361"}, {"last_update":"1181219788", "numofapproved":"1", "id":"2481"}, {"last_update":"1178140002", "numofapproved":"1", "id":"1205"}, {"last_update":"1178716891", "numofapproved":"1", "id":"1345"}, {"last_update":"1180691957", "numofapproved":"1", "id":"2061"}, {"last_update":"1182246242", "numofapproved":"1", "id":"3206"}, {"last_update":"1182882314", "numofapproved":"1", "id":"3585"}, {"last_update":"1183124192", "numofapproved":"1", "id":"3821"}, {"last_update":"1183905634", "numofapproved":"1", "id":"4361"}, {"last_update":"1191225755", "numofapproved":"1", "id":"10901"}, {"last_update":"1192635977", "numofapproved":"1", "id":"12881"}, {"last_update":"1193268752", "numofapproved":"1", "id":"13721"}, {"last_update":"1193242245", "numofapproved":"1", "id":"13621"}, {"last_update":"1193949751", "numofapproved":"1", "id":"14621"}, {"last_update":"1194635892", "numofapproved":"1", "id":"15621"}, {"last_update":"1194726918", "numofapproved":"1", "id":"15664"}, {"last_update":"1194726371", "numofapproved":"1", "id":"15662"}, {"last_update":"1194858043", "numofapproved":"1", "id":"15781"}, {"last_update":"1194946522", "numofapproved":"1", "id":"16101"}, {"last_update":"1195047359", "numofapproved":"1", "id":"16521"}, {"last_update":"1195050812", "numofapproved":"1", "id":"16503"}, {"last_update":"1195058811", "numofapproved":"1", "id":"16621"}, {"last_update":"1195476161", "numofapproved":"1", "id":"17241"}, {"last_update":"1178645683", "numofapproved":"1", "id":"1305"}, {"last_update":"1183118619", "numofapproved":"1", "id":"3801"}, {"last_update":"1186150376", "numofapproved":"1", "id":"6121"}, {"last_update":"1189114226", "numofapproved":"1", "id":"8501"}, {"last_update":"1190973079", "numofapproved":"1", "id":"10666"}, {"last_update":"1190990329", "numofapproved":"1", "id":"10704"}, {"last_update":"1191508485", "numofapproved":"1", "id":"11361"}, {"last_update":"1183054560", "numofapproved":"1", "id":"3721"}, {"last_update":"1185263889", "numofapproved":"1", "id":"5241"}, {"last_update":"1187876083", "numofapproved":"1", "id":"7346"}, {"last_update":"1189550218", "numofapproved":"1", "id":"8861"}, {"last_update":"1190800088", "numofapproved":"1", "id":"10221"}, {"last_update":"1193260528", "numofapproved":"1", "id":"13661"}, {"last_update":"1172509002", "numofapproved":"1", "id":"199"}, {"last_update":"1172509846", "numofapproved":"1", "id":"200"}, {"last_update":"1172589855", "numofapproved":"1", "id":"214"}, {"last_update":"1172847322", "numofapproved":"1", "id":"236"}, {"last_update":"1172847433", "numofapproved":"1", "id":"242"}, {"last_update":"1173607050", "numofapproved":"1", "id":"283"}, {"last_update":"1173703535", "numofapproved":"1", "id":"301"}, {"last_update":"1173719825", "numofapproved":"1", "id":"302"}, {"last_update":"1174414845", "numofapproved":"1", "id":"403"}, {"last_update":"1174650542", "numofapproved":"1", "id":"441"}, {"last_update":"1171475944", "numofapproved":"1", "id":"52"}, {"last_update":"1172746278", "numofapproved":"1", "id":"231"}, {"last_update":"1173251095", "numofapproved":"1", "id":"254"}, {"last_update":"1173259501", "numofapproved":"1", "id":"255"}, {"last_update":"1174899183", "numofapproved":"1", "id":"495"}, {"last_update":"1174924714", "numofapproved":"1", "id":"524"}, {"last_update":"1171962179", "numofapproved":"1", "id":"108"}, {"last_update":"1172522401", "numofapproved":"1", "id":"205"}, {"last_update":"1174299349", "numofapproved":"1", "id":"362"}, {"last_update":"1174899291", "numofapproved":"1", "id":"500"}, {"last_update":"1175617661", "numofapproved":"1", "id":"688"}, {"last_update":"1176302948", "numofapproved":"1", "id":"881"}, {"last_update":"1176467393", "numofapproved":"1", "id":"893"}, {"last_update":"1176737599", "numofapproved":"1", "id":"982"}, {"last_update":"1171465517", "numofapproved":"1", "id":"50"}, {"last_update":"1171924670", "numofapproved":"1", "id":"107"}, {"last_update":"1173880505", "numofapproved":"1", "id":"317"}, {"last_update":"1173889350", "numofapproved":"1", "id":"329"}, {"last_update":"1173889557", "numofapproved":"1", "id":"332"}, {"last_update":"1176391285", "numofapproved":"1", "id":"892"}, {"last_update":"1176673529", "numofapproved":"1", "id":"981"}, {"last_update":"1171643442", "numofapproved":"1", "id":"69"}, {"last_update":"1172226841", "numofapproved":"1", "id":"182"}, {"last_update":"1174899475", "numofapproved":"1", "id":"506"}, {"last_update":"1174915327", "numofapproved":"1", "id":"521"}, {"last_update":"1176194461", "numofapproved":"1", "id":"821"}, {"last_update":"1172013837", "numofapproved":"1", "id":"132"}, {"last_update":"1172184974", "numofapproved":"1", "id":"177"}, {"last_update":"1175777908", "numofapproved":"1", "id":"674"}, {"last_update":"1173460745", "numofapproved":"1", "id":"281"}, {"last_update":"1174401746", "numofapproved":"1", "id":"402"}, {"last_update":"1171274691", "numofapproved":"1", "id":"5"}, {"last_update":"1171799314", "numofapproved":"1", "id":"78"}, {"last_update":"1171979089", "numofapproved":"1", "id":"127"}, {"last_update":"1172503571", "numofapproved":"1", "id":"197"}, {"last_update":"1174301365", "numofapproved":"1", "id":"391"}, {"last_update":"1174301259", "numofapproved":"1", "id":"385"}, {"last_update":"1174899163", "numofapproved":"1", "id":"494"}, {"last_update":"1174933167", "numofapproved":"1", "id":"534"}, {"last_update":"1176139704", "numofapproved":"1", "id":"808"}, {"last_update":"1175502855", "numofapproved":"1", "id":"603"}, {"last_update":"1173721122", "numofapproved":"1", "id":"303"}, {"last_update":"1173809079", "numofapproved":"1", "id":"311"}, {"last_update":"1174734352", "numofapproved":"1", "id":"461"}, {"last_update":"1174898917", "numofapproved":"1", "id":"482"}, {"last_update":"1174899374", "numofapproved":"1", "id":"503"}, {"last_update":"1176392495", "numofapproved":"1", "id":"903"}, {"last_update":"1176829535", "numofapproved":"1", "id":"987"}, {"last_update":"1173889385", "numofapproved":"1", "id":"330"}, {"last_update":"1175869070", "numofapproved":"1", "id":"783"}, {"last_update":"1177510634", "numofapproved":"1", "id":"1042"}, {"last_update":"1177585810", "numofapproved":"1", "id":"1062"}, {"last_update":"1178648303", "numofapproved":"1", "id":"1309"}, {"last_update":"1178883682", "numofapproved":"1", "id":"1363"}, {"last_update":"1179239792", "numofapproved":"1", "id":"1402"}, {"last_update":"1179997715", "numofapproved":"1", "id":"1644"}, {"last_update":"1180031289", "numofapproved":"1", "id":"1654"}, {"last_update":"1180440758", "numofapproved":"1", "id":"1921"}, {"last_update":"1180972413", "numofapproved":"1", "id":"2221"}, {"last_update":"1181032741", "numofapproved":"1", "id":"2261"}, {"last_update":"1181198104", "numofapproved":"1", "id":"2401"}, {"last_update":"1181237541", "numofapproved":"1", "id":"2581"}, {"last_update":"1181293731", "numofapproved":"1", "id":"2641"}, {"last_update":"1182231158", "numofapproved":"1", "id":"3204"}, {"last_update":"1177668412", "numofapproved":"1", "id":"1121"}, {"last_update":"1178713554", "numofapproved":"1", "id":"1342"}, {"last_update":"1179239886", "numofapproved":"1", "id":"1404"}, {"last_update":"1184766561", "numofapproved":"1", "id":"4961"}, {"last_update":"1185293883", "numofapproved":"1", "id":"5341"}, {"last_update":"1185781181", "numofapproved":"1", "id":"5761"}, {"last_update":"1185898126", "numofapproved":"1", "id":"5862"}, {"last_update":"1186290486", "numofapproved":"1", "id":"6164"}, {"last_update":"1186260193", "numofapproved":"1", "id":"6162"}, {"last_update":"1186305362", "numofapproved":"1", "id":"6201"}, {"last_update":"1187024035", "numofapproved":"1", "id":"6563"}, {"last_update":"1187245873", "numofapproved":"1", "id":"6761"}, {"last_update":"1187765176", "numofapproved":"1", "id":"7142"}, {"last_update":"1187872548", "numofapproved":"1", "id":"7343"}, {"last_update":"1188774634", "numofapproved":"1", "id":"8061"}, {"last_update":"1188838929", "numofapproved":"1", "id":"8181"}, {"last_update":"1189608461", "numofapproved":"1", "id":"8881"}, {"last_update":"1189667694", "numofapproved":"1", "id":"8921"}, {"last_update":"1179747423", "numofapproved":"1", "id":"1541"}, {"last_update":"1181142187", "numofapproved":"1", "id":"2381"}, {"last_update":"1185965227", "numofapproved":"1", "id":"5921"}, {"last_update":"1190476977", "numofapproved":"1", "id":"9761"}, {"last_update":"1190648889", "numofapproved":"1", "id":"9961"}, {"last_update":"1190824195", "numofapproved":"1", "id":"10381"}, {"last_update":"1190825530", "numofapproved":"1", "id":"10401"}, {"last_update":"1190894398", "numofapproved":"1", "id":"10501"}, {"last_update":"1178271031", "numofapproved":"1", "id":"1242"}, {"last_update":"1178878052", "numofapproved":"1", "id":"1359"}, {"last_update":"1178967516", "numofapproved":"1", "id":"1364"}, {"last_update":"1180018261", "numofapproved":"1", "id":"1652"}, {"last_update":"1180107922", "numofapproved":"1", "id":"1841"}, {"last_update":"1180514196", "numofapproved":"1", "id":"1941"}, {"last_update":"1181901023", "numofapproved":"1", "id":"3082"}, {"last_update":"1182417878", "numofapproved":"1", "id":"3361"}, {"last_update":"1182785340", "numofapproved":"1", "id":"3521"}, {"last_update":"1183485766", "numofapproved":"1", "id":"4101"}, {"last_update":"1189526136", "numofapproved":"1", "id":"8803"}, {"last_update":"1191446636", "numofapproved":"1", "id":"11185"}, {"last_update":"1191489743", "numofapproved":"1", "id":"11241"}, {"last_update":"1191903141", "numofapproved":"1", "id":"11882"}, {"last_update":"1191940049", "numofapproved":"1", "id":"11941"}, {"last_update":"1179239857", "numofapproved":"1", "id":"1403"}, {"last_update":"1185799202", "numofapproved":"1", "id":"5801"}, {"last_update":"1190924823", "numofapproved":"1", "id":"10562"}, {"last_update":"1191410783", "numofapproved":"1", "id":"11065"}, {"last_update":"1192031578", "numofapproved":"1", "id":"12121"}, {"last_update":"1192431234", "numofapproved":"1", "id":"12562"}, {"last_update":"1192609228", "numofapproved":"1", "id":"12802"}, {"last_update":"1192742243", "numofapproved":"1", "id":"13161"}, {"last_update":"1192942532", "numofapproved":"1", "id":"13201"}, {"last_update":"1193386303", "numofapproved":"1", "id":"13962"}, {"last_update":"1193406158", "numofapproved":"1", "id":"14121"}, {"last_update":"1193418273", "numofapproved":"1", "id":"14201"}, {"last_update":"1193519213", "numofapproved":"1", "id":"14281"}, {"last_update":"1193666593", "numofapproved":"1", "id":"14401"}, {"last_update":"1193733296", "numofapproved":"1", "id":"14421"}, {"last_update":"1193760981", "numofapproved":"1", "id":"14481"}, {"last_update":"1182436569", "numofapproved":"1", "id":"3422"}, {"last_update":"1184012598", "numofapproved":"1", "id":"4481"}, {"last_update":"1189715279", "numofapproved":"1", "id":"8981"}, {"last_update":"1192528903", "numofapproved":"1", "id":"12701"}, {"last_update":"1194246273", "numofapproved":"1", "id":"14901"}, {"last_update":"1194354217", "numofapproved":"1", "id":"14888"}, {"last_update":"1194366787", "numofapproved":"1", "id":"14891"}, {"last_update":"1194445768", "numofapproved":"1", "id":"15104"}, {"last_update":"1194467580", "numofapproved":"1", "id":"15107"}, {"last_update":"1194508237", "numofapproved":"1", "id":"15262"}, {"last_update":"1194635341", "numofapproved":"1", "id":"15581"}, {"last_update":"1194635508", "numofapproved":"1", "id":"15582"}, {"last_update":"1179214538", "numofapproved":"1", "id":"1386"}, {"last_update":"1186433530", "numofapproved":"1", "id":"6167"}, {"last_update":"1187853435", "numofapproved":"1", "id":"7321"}, {"last_update":"1187972012", "numofapproved":"1", "id":"7421"}, {"last_update":"1188895906", "numofapproved":"1", "id":"8201"}, {"last_update":"1190284020", "numofapproved":"1", "id":"9561"}, {"last_update":"1190924163", "numofapproved":"1", "id":"10561"}, {"last_update":"1192529770", "numofapproved":"1", "id":"12663"}, {"last_update":"1192536538", "numofapproved":"1", "id":"12666"}, {"last_update":"1193269090", "numofapproved":"1", "id":"13741"}, {"last_update":"1193428819", "numofapproved":"1", "id":"14221"}, {"last_update":"1193860091", "numofapproved":"1", "id":"14521"}, {"last_update":"1193909426", "numofapproved":"1", "id":"14526"}, {"last_update":"1194533708", "numofapproved":"1", "id":"15321"}, {"last_update":"1179822723", "numofapproved":"1", "id":"1601"}, {"last_update":"1179842248", "numofapproved":"1", "id":"1666"}, {"last_update":"1182412362", "numofapproved":"1", "id":"3352"}, {"last_update":"1185980065", "numofapproved":"1", "id":"5961"}, {"last_update":"1186751100", "numofapproved":"1", "id":"6385"}, {"last_update":"1187202714", "numofapproved":"1", "id":"6721"}, {"last_update":"1187601864", "numofapproved":"1", "id":"6923"}, {"last_update":"1191490727", "numofapproved":"1", "id":"11281"}, {"last_update":"1194449840", "numofapproved":"1", "id":"15161"}, {"last_update":"1180028166", "numofapproved":"1", "id":"1781"}, {"last_update":"1185025939", "numofapproved":"1", "id":"5201"}, {"last_update":"1192454400", "numofapproved":"1", "id":"12621"}, {"last_update":"1193414234", "numofapproved":"1", "id":"14141"}, {"last_update":"1194270682", "numofapproved":"1", "id":"14961"}, {"last_update":"1184061669", "numofapproved":"1", "id":"4561"}, {"last_update":"1186161284", "numofapproved":"1", "id":"6141"}, {"last_update":"1187714492", "numofapproved":"1", "id":"7061"}, {"last_update":"1187893562", "numofapproved":"1", "id":"7361"}, {"last_update":"1190815311", "numofapproved":"1", "id":"10301"}, {"last_update":"1193388120", "numofapproved":"1", "id":"13951"}, {"last_update":"1195239956", "numofapproved":"1", "id":"17041"}, {"last_update":"1179147467", "numofapproved":"1", "id":"1381"}, {"last_update":"1182346611", "numofapproved":"1", "id":"3341"}, {"last_update":"1184267506", "numofapproved":"1", "id":"4802"}, {"last_update":"1192047087", "numofapproved":"1", "id":"12161"}, {"last_update":"1192198948", "numofapproved":"1", "id":"12441"}, {"last_update":"1193208717", "numofapproved":"1", "id":"13528"}, {"last_update":"1194907182", "numofapproved":"1", "id":"16001"}, {"last_update":"1179153020", "numofapproved":"1", "id":"1385"}, {"last_update":"1179835655", "numofapproved":"1", "id":"1641"}, {"last_update":"1181234739", "numofapproved":"1", "id":"2542"}, {"last_update":"1182356477", "numofapproved":"1", "id":"3343"}, {"last_update":"1182418583", "numofapproved":"1", "id":"3381"}, {"last_update":"1184568502", "numofapproved":"1", "id":"4905"}, {"last_update":"1189151603", "numofapproved":"1", "id":"8581"}, {"last_update":"1191595695", "numofapproved":"1", "id":"11621"}, {"last_update":"1193105000", "numofapproved":"1", "id":"13421"}, {"last_update":"1195104657", "numofapproved":"1", "id":"16701"}], "request_timestamp":1206363392.08521, "request_call":"requestDetails", "instance":"tbedi", "call_time":"0.10059", "request_date":"2008-03-2412:56:32 UTC", "request_url":"http://cmsdoc.cern.ch/cms/test/aprom/phedex/dev/gowri/datasvc/tbedi/requestDetails?format=json"}} """ from jsonParser import jsonObject data = jsonObject.parseString(s) #~ from pprint import pprint #~ pprint( data[0].asList() ) #~ print #~ print data.dump() print(data.phedex.call_time) print(data.phedex.instance) print(data.phedex.request_call) print(len(data.phedex.request)) for req in data.phedex.request[:10]: #~ print req.dump() print("-", req.id, req.last_update)
64.494523
197
0.631653
13,325
123,636
5.718799
0.28728
0.247366
0.391586
0.000446
0.001863
0.001863
0.001863
0.001863
0.001863
0.001863
0
0.245115
0.061972
123,636
1,916
198
64.528184
0.411954
0.003324
0
0
0
0.000527
0.997535
0.436122
0
0
0
0
0
1
0
false
0
0.000527
0
0.000527
0.002637
0
0
0
null
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
f6947cb95396093cc925da70a91acfb38312fda4
4,434
py
Python
analysis/parabola.py
keflavich/W51_VLA-16B-202
4c743c5d001e097f1d184a550e6d21441ca02f2d
[ "BSD-3-Clause" ]
null
null
null
analysis/parabola.py
keflavich/W51_VLA-16B-202
4c743c5d001e097f1d184a550e6d21441ca02f2d
[ "BSD-3-Clause" ]
null
null
null
analysis/parabola.py
keflavich/W51_VLA-16B-202
4c743c5d001e097f1d184a550e6d21441ca02f2d
[ "BSD-3-Clause" ]
null
null
null
import os from astropy.io import fits from astropy import wcs from astropy import units as u import regions import numpy as np import pylab as pl if not os.path.exists('W51e2w_ALMAB3_cutout.fits'): fh = fits.open('/Users/adam/work/w51/alma/FITS/longbaseline/w51e2_sci.spw0_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19.mfs.I.manual.image.tt0.pbcor.fits') ww = wcs.WCS(fh[0].header).celestial pr0 = regions.read_ds9('/Users/adam/work/w51/vla_q/regions/e2w_ellipse.reg')[0].to_pixel(ww) pr0.width *= 2.5 pr0.height *= 2.5 msk = pr0.to_mask() img_95ghz = msk.multiply(fh[0].data.squeeze()) header = fh[0].header ww_cutout = ww[msk.bbox.slices] header.update(ww_cutout.to_header()) fits.PrimaryHDU(data=img_95ghz, header=header).writeto('W51e2w_ALMAB3_cutout.fits', overwrite=True) else: img_95ghz = fits.getdata('W51e2w_ALMAB3_cutout.fits') if not os.path.exists('W51e2w_ALMAB6_cutout.fits'): fh = fits.open('/Users/adam/work/w51/alma/FITS/longbaseline/W51e2_cont_briggsSC_tclean_allspw.image.fits') ww = wcs.WCS(fh[0].header).celestial pr0 = regions.read_ds9('/Users/adam/work/w51/vla_q/regions/e2w_ellipse.reg')[0].to_pixel(ww) pr0.width *= 2.5 pr0.height *= 2.5 msk = pr0.to_mask() img_224ghz = msk.multiply(fh[0].data.squeeze()) header = fh[0].header ww_cutout = ww[msk.bbox.slices] header.update(ww_cutout.to_header()) fits.PrimaryHDU(data=img_224ghz, header=header).writeto('W51e2w_ALMAB6_cutout.fits', overwrite=True) else: img_224ghz = fits.getdata('W51e2w_ALMAB6_cutout.fits') if not os.path.exists('W51e2w_VLA_Q_cutout.fits'): fh = fits.open('/Users/adam/work/w51/vla_q/FITS/W51e2w_QbandAarray_cont_spws_continuum_cal_clean_2terms_robust0_wproj_selfcal9.image.tt0.pbcor.fits') ww = wcs.WCS(fh[0].header).celestial pr0 = regions.read_ds9('/Users/adam/work/w51/vla_q/regions/e2w_ellipse.reg')[0].to_pixel(ww) pr0.width *= 2.5 pr0.height *= 2.5 msk = pr0.to_mask() img_45ghz = msk.multiply(fh[0].data.squeeze()) header = fh[0].header ww_cutout = ww[msk.bbox.slices] header.update(ww_cutout.to_header()) fits.PrimaryHDU(data=img_45ghz, header=header).writeto('W51e2w_VLA_Q_cutout.fits', overwrite=True) else: img_45ghz = fits.getdata('W51e2w_VLA_Q_cutout.fits') cy,cx = 127,42 angle = (180+315) * u.deg xx = np.linspace(0,50,1000) yy = xx**2 / 28 xx_, yy_ = np.dot([[np.cos(angle), np.sin(angle)], [-np.sin(angle), np.cos(angle)]], [xx,yy]) xx2_, yy2_ = np.dot([[np.cos(angle), np.sin(angle)], [-np.sin(angle), np.cos(angle)]], [-xx,yy]) pl.figure(3) pl.clf() pl.imshow(img_95ghz, origin='lower', interpolation='none') pl.plot(xx_+cx,yy_+cy, linewidth=0.5, color='w', linestyle='--') pl.plot(xx2_+cx,yy2_+cy, linewidth=0.5, color='w', linestyle='--') data_on_path = img_95ghz[(yy_+cy).astype('int'), (xx_+cx).astype('int')] data_on_path2 = img_95ghz[(yy_+cy).astype('int'), (-xx_+cx).astype('int')] prj_dist = (xx**2+yy**2)**0.5 pl.figure(4) pl.clf() pl.plot(prj_dist, data_on_path) pl.plot(prj_dist, data_on_path2) core = data_on_path[:10].mean() profile = (core*(prj_dist/prj_dist[250])**-0.1 * (prj_dist >= prj_dist[250])/10. + core * (1-(prj_dist/prj_dist[580])**2) * (prj_dist<=prj_dist[580]) ) profile = core * (1-(prj_dist/prj_dist[580])**2) * (prj_dist<=prj_dist[580]) pl.plot(prj_dist, profile) cy,cx = 62,23 xx = np.linspace(0,25,1000) yy = xx**2 / 17 xx_, yy_ = np.dot([[np.cos(angle), np.sin(angle)], [-np.sin(angle), np.cos(angle)]], [xx,yy]) xx2_, yy2_ = np.dot([[np.cos(angle), np.sin(angle)], [-np.sin(angle), np.cos(angle)]], [-xx,yy]) pl.figure(1) pl.clf() pl.imshow(img_45ghz, origin='lower', interpolation='none') pl.plot(xx_+cx,yy_+cy, linewidth=0.5, color='w', linestyle='--') pl.plot(xx2_+cx,yy2_+cy, linewidth=0.5, color='w', linestyle='--') data_on_path = img_45ghz[(yy_+cy).astype('int'), (xx_+cx).astype('int')] data_on_path2 = img_45ghz[(yy_+cy).astype('int'), (-xx_+cx).astype('int')] prj_dist = (xx**2+yy**2)**0.5 pl.figure(2) pl.clf() pl.plot(prj_dist, data_on_path) pl.plot(prj_dist, data_on_path2) core = data_on_path[:10].mean() profile = (core*(prj_dist/prj_dist[250])**-0.1 * (prj_dist >= prj_dist[250])/10. + core * (1-(prj_dist/prj_dist[580])**2) * (prj_dist<=prj_dist[580]) ) profile = core * (1-(prj_dist/prj_dist[580])**2) * (prj_dist<=prj_dist[580]) pl.plot(prj_dist, profile)
37.260504
162
0.684032
781
4,434
3.664533
0.193342
0.078267
0.041929
0.0587
0.803634
0.780573
0.739693
0.739693
0.716632
0.704053
0
0.073345
0.117501
4,434
118
163
37.576271
0.658063
0
0
0.572917
0
0.020833
0.177041
0.164862
0
0
0
0
0
1
0
false
0
0.072917
0
0.072917
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
f6bca771c67d05d17260d3b95312bf83a4073ad8
63
py
Python
models/__init__.py
duylecampos/easy-alert
2d30793223001b5a55b34507da0bd3d200716227
[ "MIT" ]
1
2018-02-23T10:13:50.000Z
2018-02-23T10:13:50.000Z
models/__init__.py
duylecampos/easy-alert
2d30793223001b5a55b34507da0bd3d200716227
[ "MIT" ]
null
null
null
models/__init__.py
duylecampos/easy-alert
2d30793223001b5a55b34507da0bd3d200716227
[ "MIT" ]
null
null
null
from models.auth import Auth from models.channel import Channel
31.5
34
0.857143
10
63
5.4
0.5
0.37037
0
0
0
0
0
0
0
0
0
0
0.111111
63
2
34
31.5
0.964286
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
1007ddf9e529d01bcc7646bff1629ac7b421eb8e
12,569
py
Python
test/linkloading.py
Shapes/pisa-fix-django
62d7a0c1639ed8e9a45b756c30480771311e1dae
[ "Apache-2.0" ]
1
2017-04-26T17:50:10.000Z
2017-04-26T17:50:10.000Z
test/linkloading.py
Shapes/pisa-fix-django
62d7a0c1639ed8e9a45b756c30480771311e1dae
[ "Apache-2.0" ]
5
2016-05-06T00:04:03.000Z
2019-04-05T21:37:30.000Z
test/linkloading.py
Shapes/pisa-fix-django
62d7a0c1639ed8e9a45b756c30480771311e1dae
[ "Apache-2.0" ]
1
2020-07-20T13:53:15.000Z
2020-07-20T13:53:15.000Z
# -*- coding: ISO-8859-1 -*- # Copyright 2010 Dirk Holtwick, holtwick.it # # 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. __version__ = "$Revision: 194 $" __author__ = "$Author: holtwick $" __date__ = "$Date: 2008-04-18 18:59:53 +0200 (Fr, 18 Apr 2008) $" import ho.pisa as pisa import logging log = logging.getLogger(__file__) def dummyLoader(name): return '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00F\x00\x00\x00\x89\x04\x03\x00\x00\x00c\xbeS\xd6\x00\x00\x000PLTE\x00\x00\x00\n\x06\x04\x18\x14\x0f-&\x1eLB6w`E\x8f\x80q\xb2\x9c\x82\xbe\xa1{\xc7\xb0\x96\xd1\xbd\xa9\xd9\xd0\xc6\xef\xeb\xe6\xf8\xf3\xef\xff\xfb\xf7\xff\xff\xffZ\x83\x0b|\x00\x00\x0c\xedIDATx^u\x97]l\x1bWv\xc7g\xe2`\x81\xbe\xcd%Gr\xd3\xa7P\x12e\xb7\x01\x8a\xd0")E\x01\x02\x8f\xf8!\x8bI\x17\x10\xc5!))5`\xf1C\xb4\xb25`S\xb2l\xb95\x90H\xa4.\xb9/u$K3\xe3\xa2\x80W\x12\xc59L\xf6a\xb3\x8dcN\xd6@\xb7\x1f\x01\x8a\x85\x16\x9b-\xfa\x81M\xb8@\x83l\xd1\xd8\xbc|)\xd0\x97\x82\xea\xb93\x92\xec"\xce\x11 \t3?\xfe\xcf\xff\x9e{\xce\x01(\x1c>7\x18\xfb\xc2\xfaE\xffk_\xb6\x18\xeb\x1e>\x8f\xe92d\xfe%T\xa8\x98\xfa\x07\x1f $<\x0f\xe1\x91\xabT\xc1\xacT\xf2\xbfd\xec\xbb\x98\xdfM\xeb\x86aYP\xfa\xd3\xd6\xf3\x98C[\xa6\xaaU\xa1a5\xe9\x1b\xad\xef\xd0i}\x91\xccy+\xc8X\xf5E\xf6]:\xff0\xd8\x97\xce7\xb9P\xf1\xd1\xb7\x98\xaec\xe7/\xd3\xa1\xeb\x81{\x96e5\xd7.\xb6\x85\xe7\x99aO\x94\xf1R(\xfeC\xce\xd4F\xbf\xc50\x1b\xfa\xefS\xa9\xb2\x12p\x98({\x8eN\x9b\xb1\xbf\xf5O\xa5\xd7\x0b\xb4\xc9\x0f\x96\xec<G\xa7\xc5\x1e\xbf\xfa\xe2b\x90\x16\xb2\x00\x96E\x93O\x9e\xe7\xe77\x8b\xd2@ \xa3\xa7\x96\xe6\r\xab\xb9\x97\xfc\xf6\xb90WV\x0e\x8d(\xa1\xa5dd*\x06PL\xa2\xe7g\xdfw\xba\xe8\xe6o\x06\xc6\xd5\x80\xc7\xe5s\xbb|\xbd\x91\xd2\xb9 \x13\x9e1\xc2\x13\xb5\xfeN\rn\xa5\xd5a\xc5+\xe7\xb7\xf5\xa2\xcbC\xde>a\x9c\xd2\xb5\xad\x07\xdbS\x0b\xb0\xa5z\xeb\x94\xd2y\x80kD\xee<e\x10h\x7fs]\xf4g\xa7\x01\xb6\x12\x91z\xa9P\x8a\\\xcfg\xfdQ\xf6\x0c\x83\xb1CD?\x05\x80\xf2\xa4;z)\xb8\x11\xf1\x11\xf7\xe5\x8b\x9d\xff\xcf\\\x92H\x846\x80f\x91Ys/\x11\xe2r\x85\xfe\x98u\x9e\xf5\xf3_\x1eB\xd2U\x00\x9a\xf3\xc9\xc92\xb9\xbc\xbc\xec\x93N?:\xce\xd59\xect\xdb\xec_\xbdC\xa4\x1f\x99\xb9\x81\x97\xddj\xb9g\x8c\xf4\xaf\xe8\x8f\xba\xc8\x1cwy\xbb\xd3\xb8\xab.\xfb\x0bU\xd03S\xa2\xac\x96\x03k\xe1\x02\xe4\x19\xbe\x12N\xcc|3<U\xd8O\x02\xd4iQ\x12\\j\x81R\x80\xbd\x14\x16\xed\x88\xc1\xfavw&\x02isj\xa2\xa9\xd1\x12\x91\xc4\xfe$\xa5\xe1\xbc\xf2f\xbbs\xcc \xc2\xb2\xc6\xcd\xec\xe8\xfe\xa2\x05\xb4F$A\x0c\x94\n\xee\x9b\xc5\xec_\xb3\xa7\x0c\xfb\xf7q\xad\xb2\xb6b5?h\xea\xe6$\x11\t\xe9\xebs\r\xbdv\xf5\xf6\t\xd3a\xec#5\xb8\x9c\x08\xdf\xb4\xc0J\xc1\x9a$\x11\x7f8\x1c\x01\xb8\xf4\x17\xec\xb0s\xe29\x93\x18\x08\xa5\xcc\xa4eA\xaep\xd7#\xca\xa0\xeb\xd7o\xd5\x8a\xb7\x19;a:.\x1f\x11\xdd7\x1b8R\xcb\x83\xf5\xac<\xbf\x1e.,\xce~<\xff\xe3N\x9b\x1d3m\x0f\xea\x8b\x85{\xd6\xa7\xd6\xc3\xf8e}\xd9\xdc C\xd1\xd9f\xfe\x9d\x16;f\xba\x7f/\x12A\x10\xce\xe2\x88[\xffT\x9a\x99\xc8\x0co\xf5\xf5\x05g\xad\xda\x0fX\xeb\xa4\xceqQ\x10$\xb1\xb7\xd2@\xa86x\x7f8>h._\x9dh4\x8d\xa7:\x8f#X\x13At\xdb3nF\xee\xc8\x19wV^\xf4\x1b\xd6\xdc\xed\x13\xe6w\x01I\x90\x90\xa1F\x05\x99\xdc}B\x88(\x87}\xb7\xac\xda\x99\x13\xe6\xa7\xa1\xf3\x02fs\xa5)\xbd\xd70\r\xceH"\x91\xc2\x15\xc8\x1e\x9f\xbd\xbd\x17\xf7\x8b\x04m\x07\xd2\xb4\x02\xc8 !\xcf\xe1\x83\x0b\xc6\x9d+\\\x87u;\xedl\xdc{^\x12\x05\x89$\x0b\xd40\xef\x12\tu\xd2\x99!\xec\xc4\xab\x17\x8f\x98\xc7/\xc6\x07\xc6$;\xc1YZ\xd1+\n\x11E\x12\xa0\xe0\x1b\x18G\xd3\x0e\xf3\xb57\xeeN\xbc,\x89\xa2@z\xd0\x12]\xc34C\x11d\xbct\x809\x0c\xfbU N"\x1eA\x92\xf0l\x03\xd8]\xeb\nq/\xc9\xb4\xe6\x91\x13\xf2\x97\xc8t\x1dF\xea#\xa2\xc0\xebH\x06)\x98\x8b\xc4\xbd\xd73\x12\x17e\xe5\x956g\xb0C~\x15P\x89(\t<\x08\xe9\xbda\xc0]\xcf\x1f\xed\x91\xbcBd\xe5\rv\xc4\xfc:\xac\xe2Qlf\xc8G\x82\x95\xc6\'\xf1\x18(><\xa6\xfb\xc0\xf6\x83\xcc\xe7\t\xd5G\x1c&\x8d\xc3E\x1b\x0fK\x00\x8a"\xc8\xd9\xde\x93\xfb\xfa\\U\xa7\x08\xcf\x85\x96\xd3\xf9\xb1\xf4\x0f\x9b\x9c\x11\xa4q_\xf8\xe0)3\xa5\x9e\x97\x1c;^\xbaU\xa8Z[1x\x9f\xbcX$3_v9\xd3\xedt?W\xe3^\x14r\xa04T\xc0\xfad\x14\xc6r\x83\xf7\xa5\xc4\x91\x1f\xc6\x90!r\x9fs0\xb1\xa76\xdd\xb0\x1e\xc66\xcf\\\x9ay\xf5\x85\xc4\xc1aW\xb0\x97\xd355A\x88,8AjA\x1d\x1b-S\x98Ly\xe4\xe4m\xe7\xec-\xe6WU\x82%\x94\x1cF\xed\xa1Uk/\xa2\xb9\xb3\xe4T\xee\r\xf6[dZ-\x16@F\xc2{w\x92\x05C#\xd4\x1a\x1f\xae\xcbe\x8f\xff\\\xaf\xe3\xa7\xfd\xf5\xd9\xb2:\x89wu\x14\xb2\xe2\xbeqO_\xa9\x0f\xaf\xfb\xfa\x06\xe7\xae\xb4m?\xff\xdc[\x8a\xa8\xca1$\x8a!\xf2Zc\x13\xea\x17\xd6\\I(\xcd\xb4\x84\xeea\x9b}\xe4\xce\x8f\x85\x13\xce\x8d\x89\xc8HR\x10\xb2P\xa7\x19w\x0c\xf6\x93\xbf\xe4L\xeb\x12\x89\x95\\\x11\xc5\xbe1" *\xca\xc6\x80Ik\xbe\xf0\x02\xd4s\x8f\xb8\x9fo|\xbd\x83\xda\x80+\xc7\xdbPD\x10\x8f\xf8\xc2B?\xadlD\x8b\x00\x943]\xf6?\xa9\xfe\x1e\xdc\xd6\x83\x08\t\xbc\x00\xc3\x8aH\xd2\xfd\x85\x8a_\x1b?a~\xb4\xb0\x99\xf1-g\xfc\x86\x11\x1a\x1a:\xd7G\x00\xce\x8b\xbd\xef\x176a\xed\xb5f\xb3\x9e{\x9b\xe7\xda\xbde\xc1^h\x1cj\x97s*\xc69\x80]B2\x05]\xcb.\x00\xd4\xcb\xafs\x9d\xfb\xef\xe0\x90\xefG\r\x8d\xaa\xe10\x9aA\x8eH\xee\x02-\xab^\x00\xd3f\xba\xbb\xc6\xa7V\xb3\xa9Uu]\xcf\x86\xb1\xda\xf6\x8c\xbe\x90,\xe4\x16]Q\xd08s\xd8\xde\xc5=\xd0\x040\xa0\x01e\x1f\x8e\xab\xcd\x90Hr\xdd\xf4yS\xb0\xc5\x99\xc71\x04@\xdf\x1c6\x00\xeeb\x89$\xde\xb5\xc4C\xfa\x01v\x86\xd2\xb0\x8f\x9e\xbb\xffV\x05\x93\x96\t\x99\x9b\x013DPG$R\xdf\xa9bx\x85\x7f\x12\xac\x07\x9c\xf9\xa4\n:\x8d\xe3h\xcfC.\xcb\xcbH\xdc\x03j\x90\xa2]\xdd\xc0\x9de\xfe\x00\x99T\x15\xa0\xe6!\x0159\x9f\xcf\xc7\t"I\x7f\xb9@\xab\x1a\xa5Z\xf5SK{\x13\x99\xf1*\xd4\xe7\xc8 \x8e\xf0\xe5\x89p\xde#{\xe3\xe9<\xb5\xa3R\xbfgY\x9a\x1f=GQg{\xfe\x06\xc5X\xd0\xebD.\xac\xf3\xff\xcb\xaa\x9a\xac\\\xc0\x9a\x94\\\x8e\x0e\x0f\xcd\xf9\xa4G.P\x8cuU\x8dxw\x0b\r0Koq\x86\x1aO!\x9a\x90\xd3\x1c\xc9*\x84\x8c\x16/7\xabu\xfa\xe7\xc8Di\xc5fL\x8a&\xe9v8\x89\x7fscD\x92\x17&W\x1e\xde\xd3J\xaf\xd8\x0c\xad\xd8\x14\xbe\x03C_T\xf3\xf9\\\xe2eB\xdc\xb1\x84F\xf5\xf0\x1a?{\x84[D\xa4\x01u\x8a\xbf\xf6T\x1e\xb83\xce\x04\xbd\xa6\xaa\xcd\xaf}\x88\xe7:?L\xb5\xfcM\'\x1b`(X*\xf5UQL-\xf5>\x18\xce\x8c$\x99\xc0\x98\x12\xa4tJ\xbd\xac\xeb<\x1bX\xcd\x1d{w\xf2\xae\x1d\xfeI\x94,q\xa6\xa3\x04\n\xebJ\x00\x97.\xcc\xeb\xb4\n\xf0>2|d%\x12\xfbI\xbe\'\x94\xecp\x9d@j]q\x0f\x8d\xd3\x9a?\xa6\x1b\x00\xef\x11I\xe0\xbb\x91\xb8\xa6wj\xd3\xc1 \xcf\xf5sY\xcdM\x11\x12(\x94\x88\\\xb1>K\xbf\xe7\x91\x88\xc8\xb5\xdc\xc9\xd0\xb5\xec\x99\xb78\xf3\xebS\xaa\x8a\x03\x88\x8c\x87\\\xf8\xf4\xfe\xcc5\xb4\x83\x86\x029\xf7\xd4\xe9\x9b\xa1\xa5/\xb9\x9f\xff\x15#jbh(\x92\xc6\x06\t6\xe6.\xfb\xb1\xc4\xfdb\x8fV\xf2\x89\xa2\x1c\xb9\xd2\xe6\xcc\x93\xc9\x80\x8a\x81\xf5\xc5d\xd5D\xed\x0f\xefr\xdd\x0b\xb4<\x89\xae\xc8\x15\xc6\x84\x0e\xeb~\x16Bh\x8a\xa8\xe5\xb0+Y\xd9\xdc\x9b\xb5,S!7hi\nG\x92\x1cp\xe6\xf0\xb7\x1fo\xf7\xf5\xf5\xbdL\x06K\x02\xb9P\x9d\xd8\xbbeY;\xa4\x07\xef,!\x89\xd2\xe9N\xf7\x10\x99v\x13\xee\xa0K\xd2["nZ\x81M\xec\xab;\x9e42\x93\x82$\xbe\xd29\xe4\xcc\x93\x18lp\xd5`\x89\x04\x0bU\x98Z\xb1\x9a\xfex\x9a\x96\xf9\xfa#\xb79\xc3\xba\xc8\x94\xf9|\xde(\x91\xe84@\xb2a}\x9c\x0c\xdb\xa9\x04\xe1\xd4#\x9ba\xc8`k\x89\xb2^"\x91\n\xec\xa7,kiKFF\xc1\x91\xc5m\x88\xcc!{2\x08\xb4\xe4\x11\'\x00sU\xeb\xc5\xd9fx\xa6&\xd3r\x02\'Q|\xb3c3\x87\xed\xbbP_#d\xc6\x98\x93\xd3\xd5\xd5\xc0\xec\xc3\x01(\xcbeu\n\x19r\x91ul\xa6\xb3\x07u\xac\xde\xeeK\x97\x08\xf6Vpv\'\x06\xef\x8e\xe4T\x85\x88\x92\xcc\x1c\xa6\xcb\x90YC\xe6\xb4B\xc2!wa=\x07\xf5w\xc7U,\x0e\x91\xfe\xa4\xd5:a\xcc\xb2O\xde\xed%\x18=t{\x06\xb4w\x83\t\x9f\x84%\xfbY\xf7(\x17\xdbY\x00\xaa\xc8\xbbI>\xea\x11\xdee\x9a\x12T\xb0b\xe2\xf7\x0eP\xc7\xf1|\x9f3$Q\xe4\xdb9J\rd\xce\xe5}\x9c\xf9\xb36;\xd6\xb9?\x83\x8c\x18\xbe\x86\x0c\x19__\x01s\xcd\xbd\xf8\x02\xf6*\x16\x87\xb5\x8f\xfc\xd8:b\xe2\x9a$H\xaedy\x01\xccLOv@\xb2\xdb\x82u\x1d\xa6\xbd\xb3b3s(\xe3N\xa1\x9fm_$\x11\x97D^c\xac\xa0\xe3g\x0f\x00\xeb<4\x87\x1f\x95SK\xbcX\xc3XA\xe9-4s\xc4t\x9f\xf8\x01\xd6\xf0H\xd8\xc7DNfM:\xd7sF\x9d\x12\xe5\x1f?\xcb\x8c\xa2K\x91\xb8\xe6DI\x94\xd3\xa3Z\x9ex\x83\x81\xb1\x84\xf7g\xfcP\xc7L\x8c\xdf\xa9\xf0\xa2\xffUQ\x08\xa4\xce\xe6|$\x91\x95U5\xf8\x08\x99\xae\xc3`\x8f\x99\x94*\x828\x91\x11p\x80\x06}\xe2)\xf5\xd2@^M\x7f\x88\x9e\x9f\xea\xd4)\x9d#\xe2BV\x10\x02\xd9~\\\x18\xd7\xc7\x92TM\xbf\xdd:a\x0e\xbf\x18EfU +\x8b\xc8d\xb0\xbe\xc1\xa4/J\xf37^G\xe4X\xe7q\xcc\x04Z&\xc2K\x0eC\\Y\x1a\xb8`,\x9a\xb7Z\xad\xa7\xb9Fu\x13u\xa4\x97\xb26#}\xcfK#\xd4\xd85W\xdb\xec\x19\xc6\x00\r\xeb\xfaR\xc9a\xc6F\xea\xab\x9aQ\x87U\xf6\x8cN\x0c\x1a\xday"\xfe\x9e\xc3\x90k#\xf52gJWX\x17\xef\xeb\x98\x01\x9a\xc7\xfa\x95\x88\xcd\xcc\x05\xa3U\xce\xd4\xdf\xc0+\xed:3\xf8x\x14\x99u\t\xbd\x12\x11\x19W1\xd0c\xd8\x8c\xcaX\x8b9\xf3\xf5\x1f1\xa8\xd3UIt\xe1p\xb8\xb3~Z\xf1\x91\r\xcd\xa85\xcc\xdc\x01k\x1f33\x00\xda\xaa\xe4\x0e/\x12\x89\xa4\xb1V\x8b\xbe\xa2\x06\xc5\x15(\xf1\x9b?\xb4\x99\xaf\x00\x80\xc6\xdd)\xc8\x12B\xfc\xcd\n\xad\x14s\xbay\x15\'|\x98\xb1\x13\x1d\x03h$U\x1b?\'\x86C\xa4\x01\x94\xee\x8e\xe8p\x15\x1b8\x8c\xd7\xeax\xfe\xeaF\xb5^\xd1k\xe7z\xb13\xae\xfb\x1aVS\xd39\x13\x03\x9ayttv\x16\xa2\x06\x98EQ\xec\x15"xo\xb8\xa1\x00Ftc\xaf\x17\x05\xdf\xec:\xf3\xce\xa2\x94\xc2&\x1f?\x92\xa6\xd5\xcd3M\x1d`\xa62\xbf\x13Df\x03\r\xd9~\xc2i\n\x97H8\xac\x88i\xdd0\x07,]\xdfZ\xd9^\xd9\xcf\x1b\x94\x96n\x1f1\xf7\xbdUXR)}\xcf\xfe\xa27`\x81V6\xf6rZn\x85\xd2\xf2\xf7\x8f\xcf%\xc3\x05\n\xf8@\xec\x1f1`\xee\x9df}j\xc5\xdc\x18Voit\xf5\xfb-\xc7\xf3\xcf\'\x8a\x7f\x00\x1a\xa5\xeb\xc4C&\xe0\xfdY\x0b&\x0bK\x99A\xafQ\xa7k\x07-\x9e\xab\xc3\xc6\xb6\x94\xd3\x00uZ\x96T%X\xd9\x8b!\x93t\'\x06\xaf\x83I\xd7o\xb7\x9c\\\x91\xc5p\xbfa\xeat]I\xff\xc8O\xf7\x83M\xc8\x10w\xc0\xbb\xb4b\xd2\xf2\xa8\xc3\xfc\xe7|\x94\xc6\xa7ML\x86_m\xb3\x14\x96\x8cz9G\xc8\xd9\xaca\x96\xe6C\x1fr\xa6\xf5@+\x18\xa5A\xd3\x04\x9a\xed\xd9\xc8j\xb0\x1f\xa6\xd4X"\xeei0\xd6\n\xea\x01g\xday\x8dB=~\x06\x1d\x95zV\xb7\xab`\xea\x1aB\xba\xc9\x1d\x06\xdf\xb6\xeb\xf3\x9b\n4\xf9N\xd8\xc6c(Y\xb3\x02{\xf3\x0f\n\x15@\xc3\x18\xfeN\xd7f(>\xc0\x9e\xbf3\x0e\x1a\xda\xd2\xa1\xe6\xc9O\xa0\xa8\x81H\xeeb\xdb\xd6\xf9G.\x0c\xb0zU\x9e\x81\xcd\xdf7\x00\x96<\xde( \xab\xd1l\xe0\xc0\xe9\xc3\x8f\x90G\xa9\xf8\xc6\xbc\x1fv\xe5J\xb5\xba\xd9#\'\x81K\xaf\xc5>hu\xed>\xfc)\xe5a\x8cm\xc2F\xcc\x1cZ\xde\xdc\x9f\x0ef\xd1\xf8:-\xfd\xd5\x01;\xea\xc3S\xd4\x8e\xdd\xe5\x19\x80\x86\x8fd\xca\x13\xd1\x1e\xa3\x9e\x0fEX\x1b\x7f\x1c\x1dU-\xd8\xd9F5t\x95 \xa1\xa5\x89\xa8:\xddTg\xf9N\xc5\xc9\xb1\x99\xc7J\xc4\x16\x9a\xd6\xd0\x95\x99 J4\xb5\x7f\xab\x85D\x8b\xffr\xf6<{\xb8\x1d\x0e\xf9\xa9\x13\xb0GnZ\xd6/Z\xfc%\xb3\x99\xae\xcd0f\xe1c\x1e\x9f\r\r\x05\xad\x16{&\x10\xc0\xf8?Z\n\xf1+\xfb\x81\xd5F\x00\x00\x00\x00IEND\xaeB`\x82' class myLinkLoader: """ This object is just a wrapper to track additional informations and handle temporary files after they are not needed any more. """ def __init__(self, **kw): """ The self.kw could be used in getFileName if you like """ self.kw = kw self.tmpFileList = [] def __del__(self): for path in self.tmpFileList: os.remove(path) self.tmpFileList = [] def getFileName(self, path, relative=None): import os import tempfile log.info("myLinkLoader.getFileName: %r %r %r", path, relative, self.kw) try: if "." in path: new_suffix = "." + path.split(".")[-1].lower() if new_suffix in (".css", ".gif", ".jpg", ".png"): suffix = new_suffix tmpPath = tempfile.mktemp(prefix="pisa-", suffix = suffix) tmpFile = file(tmpPath, "wb") try: # Here you may add your own stuff tmpFile.write(dummyLoader(path)) finally: tmpFile.close() self.tmpFileList.append(tmpPath) return tmpPath except Exception, e: log.exception("myLinkLoader.getFileName") return None def helloWorld(): filename = __file__ + ".pdf" lc = myLinkLoader(database="some_name", port=666).getFileName pdf = pisa.CreatePDF( u""" <p> Hello <strong>World</strong> <p> <img src="apath/some.png"> """, file(filename, "wb"), link_callback = lc, ) if not pdf.err: pisa.startViewer(filename) if __name__=="__main__": pisa.showLogging() helloWorld() # print repr(open("img/denker.png", "rb").read())
133.712766
9,883
0.705148
2,595
12,569
3.393834
0.341426
0.008175
0.004088
0.003633
0
0
0
0
0
0
0
0.200867
0.064046
12,569
93
9,884
135.150538
0.547773
0.053385
0
0.081633
0
0.142857
0.698517
0.684817
0
0
0
0
0
0
null
null
0
0.081633
null
null
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
0
0
0
0
0
0
1
1
null
0
0
0
0
1
0
0
0
0
0
0
0
0
6
63e49d34613a460c644b0309a9709e16fbce1773
3,548
py
Python
tests/test_routes.py
chrishoage/arrsync
b2410ba91e4101d1f1fc7266c038891c32780a3c
[ "MIT" ]
1
2020-12-11T17:36:59.000Z
2020-12-11T17:36:59.000Z
tests/test_routes.py
chrishoage/arrsync
b2410ba91e4101d1f1fc7266c038891c32780a3c
[ "MIT" ]
6
2020-12-12T01:46:14.000Z
2020-12-13T06:57:50.000Z
tests/test_routes.py
chrishoage/arrsync
b2410ba91e4101d1f1fc7266c038891c32780a3c
[ "MIT" ]
null
null
null
#!/usr/bin/env python from contextlib import nullcontext as does_not_raise from typing import Any, Union import pytest from arrsync import routes from arrsync.common import JobType @pytest.mark.parametrize( "job_type,url,expected,excpetion", [ (JobType.Sonarr, "http://host/", "api/v3/system/status", does_not_raise()), (JobType.Radarr, "http://host/", "api/v3/system/status", does_not_raise()), (JobType.Lidarr, "http://host/", "api/v1/system/status", does_not_raise()), (None, None, None, pytest.raises(Exception)), ], ) def test_status( job_type: JobType, url: str, expected: Union[str, None], excpetion: Any ) -> None: with excpetion: assert routes.status(job_type, url) == f"{url}{expected}" @pytest.mark.parametrize( "job_type,url,expected,excpetion", [ (JobType.Sonarr, "http://host/", "api/v3/series", does_not_raise()), (JobType.Radarr, "http://host/", "api/v3/movie", does_not_raise()), (JobType.Lidarr, "http://host/", "api/v1/artist", does_not_raise()), (None, None, None, pytest.raises(Exception)), ], ) def test_content( job_type: JobType, url: str, expected: Union[str, None], excpetion: Any ) -> None: with excpetion: assert routes.content(job_type, url) == f"{url}{expected}" @pytest.mark.parametrize( "job_type,url,expected,excpetion", [ (JobType.Sonarr, "http://host/", "api/v3/qualityprofile", does_not_raise()), (JobType.Radarr, "http://host/", "api/v3/qualityprofile", does_not_raise()), (JobType.Lidarr, "http://host/", "api/v1/qualityprofile", does_not_raise()), (None, None, None, pytest.raises(Exception)), ], ) def test_profile( job_type: JobType, url: str, expected: Union[str, None], excpetion: Any ) -> None: with excpetion: assert routes.profile(job_type, url) == f"{url}{expected}" @pytest.mark.parametrize( "job_type,url,expected,excpetion", [ (JobType.Sonarr, "http://host/", "api/v3/tag", does_not_raise()), (JobType.Radarr, "http://host/", "api/v3/tag", does_not_raise()), (JobType.Lidarr, "http://host/", "api/v1/tag", does_not_raise()), (None, None, None, pytest.raises(Exception)), ], ) def test_tag( job_type: JobType, url: str, expected: Union[str, None], excpetion: Any ) -> None: with excpetion: assert routes.tag(job_type, url) == f"{url}{expected}" @pytest.mark.parametrize( "job_type,url,expected,excpetion", [ (JobType.Sonarr, "http://host/", "api/v3/languageprofile", does_not_raise()), (JobType.Radarr, "http://host/", "api/v3/language", does_not_raise()), (JobType.Lidarr, None, None, pytest.raises(Exception)), (None, None, None, pytest.raises(Exception)), ], ) def test_language( job_type: JobType, url: str, expected: Union[str, None], excpetion: Any ) -> None: with excpetion: assert routes.language(job_type, url) == f"{url}{expected}" @pytest.mark.parametrize( "job_type,url,expected,excpetion", [ (JobType.Sonarr, None, None, pytest.raises(Exception)), (JobType.Radarr, None, None, pytest.raises(Exception)), (JobType.Lidarr, "http://host/", "api/v1/metadataprofile", does_not_raise()), (None, None, None, pytest.raises(Exception)), ], ) def test_metadata( job_type: JobType, url: str, expected: Union[str, None], excpetion: Any ) -> None: with excpetion: assert routes.metadata(job_type, url) == f"{url}{expected}"
33.471698
85
0.638952
442
3,548
5.002262
0.128959
0.056988
0.086839
0.058797
0.862053
0.832203
0.781095
0.781095
0.763003
0.616011
0
0.005176
0.183202
3,548
105
86
33.790476
0.757764
0.005637
0
0.47191
0
0
0.20017
0.083073
0
0
0
0
0.067416
1
0.067416
false
0
0.05618
0
0.123596
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
1218a6b5caf314b32e867d9861554e1585bf1478
96
py
Python
venv/lib/python3.8/site-packages/setuptools/_distutils/command/bdist_msi.py
Retraces/UkraineBot
3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/setuptools/_distutils/command/bdist_msi.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/setuptools/_distutils/command/bdist_msi.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/11/51/50/60dfd7f84c5e78ff2099d57d25c20db2e506b0b254cfd69f314d11b7c7
96
96
0.895833
9
96
9.555556
1
0
0
0
0
0
0
0
0
0
0
0.427083
0
96
1
96
96
0.46875
0
0
0
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
6
1255869863f0958475601c5888a4c08ae7992711
26
py
Python
python/module/b2d/testbed/backend/no_gui/__init__.py
pyb2d/pyb2d
5d0f9f581d93c3681ee4f518a5d7fd6be900e695
[ "MIT" ]
26
2021-12-10T12:08:39.000Z
2022-03-29T17:45:31.000Z
python/module/b2d/testbed/backend/no_gui/__init__.py
pyb2d/pyb2d
5d0f9f581d93c3681ee4f518a5d7fd6be900e695
[ "MIT" ]
14
2021-11-18T23:58:55.000Z
2022-01-06T09:44:58.000Z
python/module/b2d/testbed/backend/no_gui/__init__.py
DerThorsten/pybox2d
5d0f9f581d93c3681ee4f518a5d7fd6be900e695
[ "MIT" ]
3
2021-12-16T05:52:12.000Z
2021-12-21T08:58:54.000Z
from .no_gui import NoGui
13
25
0.807692
5
26
4
1
0
0
0
0
0
0
0
0
0
0
0
0.153846
26
1
26
26
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
1263b5f5967c9389ef80274028d29c5669b67ac0
154
py
Python
cases/admin.py
MaxHarrington/ecasefile
4b1621941ed1fbb56779d4264216df3ebe8949fe
[ "MIT" ]
2
2018-06-18T03:29:15.000Z
2020-07-26T19:22:33.000Z
cases/admin.py
MaxHarrington/ecasefile
4b1621941ed1fbb56779d4264216df3ebe8949fe
[ "MIT" ]
null
null
null
cases/admin.py
MaxHarrington/ecasefile
4b1621941ed1fbb56779d4264216df3ebe8949fe
[ "MIT" ]
null
null
null
from django.contrib import admin from django.db import models from .models import Case, CaseFile admin.site.register(Case) admin.site.register(CaseFile)
22
34
0.818182
23
154
5.478261
0.478261
0.15873
0.269841
0
0
0
0
0
0
0
0
0
0.103896
154
6
35
25.666667
0.913043
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.6
0
0.6
0
1
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
1
0
1
0
1
0
0
6
89cc254eb7f84bf9e7421b6ec0a4985db629ab0e
67
py
Python
sensors/light.py
dhvie/micropython-sensors
faf0e1965b6858a75b8864d0462fc121348dc889
[ "MIT" ]
null
null
null
sensors/light.py
dhvie/micropython-sensors
faf0e1965b6858a75b8864d0462fc121348dc889
[ "MIT" ]
null
null
null
sensors/light.py
dhvie/micropython-sensors
faf0e1965b6858a75b8864d0462fc121348dc889
[ "MIT" ]
null
null
null
from .sensor import Sensor class PhotoResistor(Sensor): pass
11.166667
28
0.746269
8
67
6.25
0.75
0
0
0
0
0
0
0
0
0
0
0
0.19403
67
5
29
13.4
0.925926
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
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
1
1
0
1
0
0
6
89d20874a9854fc4a37a4df24ca8d43e5012abdc
122
py
Python
apps/post/queries/_t_post.py
rmdes/tanzawa
d53baa10bd6c217cd18628437a88a43e3bd02b70
[ "Apache-2.0" ]
25
2021-06-13T03:38:44.000Z
2022-03-15T15:53:31.000Z
apps/post/queries/_t_post.py
rmdes/tanzawa
d53baa10bd6c217cd18628437a88a43e3bd02b70
[ "Apache-2.0" ]
59
2021-06-12T23:35:06.000Z
2022-03-24T21:40:24.000Z
apps/post/queries/_t_post.py
rmdes/tanzawa
d53baa10bd6c217cd18628437a88a43e3bd02b70
[ "Apache-2.0" ]
null
null
null
from .. import models def get_t_post_by_uuid(uuid: str) -> models.TPost: return models.TPost.objects.get(uuid=uuid)
20.333333
50
0.737705
20
122
4.3
0.65
0.186047
0
0
0
0
0
0
0
0
0
0
0.139344
122
5
51
24.4
0.819048
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
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
1
0
0
1
1
1
0
0
6
89d943c5e9833c2e3aadd60ed22492f53f4fedc8
94
py
Python
jupyterlab_bigquery/jupyterlab_bigquery/details_handler/__init__.py
shunr/jupyter-extensions
a2fb310215664e29fd7252e5fe353f60a91a0aba
[ "Apache-2.0" ]
null
null
null
jupyterlab_bigquery/jupyterlab_bigquery/details_handler/__init__.py
shunr/jupyter-extensions
a2fb310215664e29fd7252e5fe353f60a91a0aba
[ "Apache-2.0" ]
1
2020-07-20T23:09:46.000Z
2020-07-20T23:09:46.000Z
jupyterlab_bigquery/jupyterlab_bigquery/details_handler/__init__.py
shunr/jupyter-extensions
a2fb310215664e29fd7252e5fe353f60a91a0aba
[ "Apache-2.0" ]
null
null
null
from .details_handler import DatasetDetailsHandler, TableDetailsHandler, TablePreviewHandler
47
93
0.893617
7
94
11.857143
1
0
0
0
0
0
0
0
0
0
0
0
0.074468
94
1
94
94
0.954023
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
1
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
1
0
1
0
0
6
d60636b4a615db9faa8adb9308e288bebe3144fd
25
py
Python
pommerman/cli/__init__.py
alekseynp/playground
523cc924fe9fd269a8eb3e29c45ace1c5c85b12c
[ "Apache-2.0" ]
1
2019-01-04T13:36:04.000Z
2019-01-04T13:36:04.000Z
pommerman/cli/__init__.py
alekseynp/playground
523cc924fe9fd269a8eb3e29c45ace1c5c85b12c
[ "Apache-2.0" ]
null
null
null
pommerman/cli/__init__.py
alekseynp/playground
523cc924fe9fd269a8eb3e29c45ace1c5c85b12c
[ "Apache-2.0" ]
1
2018-03-21T15:21:52.000Z
2018-03-21T15:21:52.000Z
from . import run_battle
12.5
24
0.8
4
25
4.75
1
0
0
0
0
0
0
0
0
0
0
0
0.16
25
1
25
25
0.904762
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
d61939055cc5db7bebcf8b311ac65eabd1670c6c
44
py
Python
src/010-summation-of-primes/python/solve.py
xfbs/ProjectEulerRust
e26768c56ff87b029cb2a02f56dc5cd32e1f7c87
[ "MIT" ]
1
2018-01-26T21:18:12.000Z
2018-01-26T21:18:12.000Z
src/010-summation-of-primes/python/solve.py
xfbs/ProjectEulerRust
e26768c56ff87b029cb2a02f56dc5cd32e1f7c87
[ "MIT" ]
3
2017-12-09T14:49:30.000Z
2017-12-09T14:59:39.000Z
src/010-summation-of-primes/python/solve.py
xfbs/ProjectEulerRust
e26768c56ff87b029cb2a02f56dc5cd32e1f7c87
[ "MIT" ]
null
null
null
import solver print(solver.solve(2000000))
11
28
0.795455
6
44
5.833333
0.833333
0
0
0
0
0
0
0
0
0
0
0.175
0.090909
44
3
29
14.666667
0.7
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
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
1
0
1
0
0
1
0
6
d61ebb3d64dec7d031633f6346c6289bd38ccbb2
9,902
py
Python
examples/simple_expression/exp_definition.py
m-colombo/tf_tree
10e22583d178b25067b13f3c989946b37731f23d
[ "MIT" ]
null
null
null
examples/simple_expression/exp_definition.py
m-colombo/tf_tree
10e22583d178b25067b13f3c989946b37731f23d
[ "MIT" ]
1
2019-09-10T14:45:47.000Z
2019-09-10T14:45:47.000Z
examples/simple_expression/exp_definition.py
m-colombo/tf_tree
10e22583d178b25067b13f3c989946b37731f23d
[ "MIT" ]
null
null
null
import random from tensorflow_trees.definition import TreeDefinition, NodeDefinition, Tree import tensorflow as tf import typing as T def create_num_value(max_value): """Build a Value class that handle numbers in [0, max_value] encoded as 1ofk""" size = max_value + 1 class NumValue(NodeDefinition.Value): representation_shape = size class_value = True @staticmethod def representation_to_abstract_batch(t: tf.Tensor): return (tf.argmax(t, axis=-1)).numpy() @staticmethod def abstract_to_representation_batch(v: T.List[T.Any]): return tf.one_hot(v, size, axis=-1) return NumValue class OpValue(NodeDefinition.Value): representation_shape = 2 class_value = True @staticmethod def representation_to_abstract_batch(t: tf.Tensor): ops = ['+', '-'] return ops[(tf.argmax(t, axis=-1)).numpy()[0]] @staticmethod def abstract_to_representation_batch(v: T.List[T.Any]): return tf.one_hot(list(map(lambda x: 0 if x == '+' else 1, v)), 2, axis=-1) class BinaryExpressionTreeGen: def __init__(self, max_value): self.NumValue = create_num_value(max_value) self.tree_def = TreeDefinition( node_types=[ NodeDefinition("add_bin", may_root=True, arity=NodeDefinition.FixedArity(2)), NodeDefinition("sub_bin", may_root=True, arity=NodeDefinition.FixedArity(2)), NodeDefinition("num_value", may_root=True, arity=NodeDefinition.FixedArity(0), value_type=self.NumValue) ]) self.leaf_values = list(range(0, max_value+1)) self.node_types = self.tree_def.node_types def generate(self, max_depth): """Generate a random arithmetic expression tree, using just binary plus and minus Args: max_depth: integer > 0 Returns: expression tree where leaves are int. """ if max_depth == 1: # recursion base case v = random.sample(self.leaf_values, 1)[0] return Tree(node_type_id='num_value', value=self.NumValue(abstract_value=v)) elif max_depth > 1: types = self.node_types node_type = random.sample(types, 1)[0] if node_type.id == 'num_value': return self.generate(1) else: return Tree(node_type.id, children=[ self.generate(max_depth - 1), self.generate(max_depth - 1)], value=None) def evaluate(self, et): """Evaluate the result of the arithmetic expression Args: et: expression tree Returns: an integer, the result """ if et.node_type_id == 'num_value': return et.value.abstract_value elif et.node_type_id == 'sub_bin': return self.evaluate(et.children[0]) - self.evaluate(et.children[1]) elif et.node_type_id == 'add_bin': return self.evaluate(et.children[0]) + self.evaluate(et.children[1]) class LabelledBinaryExpressionTreeGen(BinaryExpressionTreeGen): def __init__(self, max_value): super(LabelledBinaryExpressionTreeGen, self).__init__(max_value) self.NumValue = create_num_value(max_value) self.tree_def = TreeDefinition( node_types=[ NodeDefinition("op_bin", may_root=True, arity=NodeDefinition.FixedArity(2), value_type=OpValue), NodeDefinition("num_value", may_root=True, arity=NodeDefinition.FixedArity(0), value_type=self.NumValue) ]) self.node_types = self.tree_def.node_types def generate(self, max_depth): """Generate a random arithmetic expression tree, using just binary plus and minus Args: max_depth: integer > 0 Returns: expression tree where leaves are int. """ if max_depth == 1: # recursion base case v = random.sample(self.leaf_values, 1)[0] return Tree(node_type_id='num_value', value=self.NumValue(abstract_value=v)) elif max_depth > 1: types = self.node_types node_type = random.sample(types, 1)[0] if node_type.id == 'num_value': return self.generate(1) else: o = random.sample(['+', '-'], 1)[0] return Tree(node_type.id, children=[ self.generate(max_depth - 1), self.generate(max_depth - 1)], value=OpValue(abstract_value=o)) def evaluate(self, et): """Evaluate the result of the arithmetic expression Args: et: expression tree Returns: an integer, the result """ if et.node_type_id == 'num_value': return et.value.abstract_value elif et.node_type_id == 'op_bin' and et.value.abstract_value == '-': return self.evaluate(et.children[0]) - self.evaluate(et.children[1]) elif et.node_type_id == 'op_bin' and et.value.abstract_value == '+': return self.evaluate(et.children[0]) + self.evaluate(et.children[1]) class NaryExpressionTreeGen(BinaryExpressionTreeGen): def __init__(self, max_value, max_arity): super(NaryExpressionTreeGen, self).__init__(max_value) self.tree_def = TreeDefinition( node_types=[ NodeDefinition("add_n", may_root=True, arity=NodeDefinition.VariableArity(min_value=2, max_value=max_arity), value_type=None), NodeDefinition("sub_bin", may_root=True, arity=NodeDefinition.FixedArity(2), value_type=None), NodeDefinition("num_value", may_root=True, arity=NodeDefinition.FixedArity(0), value_type=self.NumValue) ] ) self.node_types = self.tree_def.node_types def generate(self, max_depth): """Generate a random arithmetic expression tree, using just n-ary plus and binary minus Args: max_depth: integer > 0 Returns: expression tree where leaves are int. """ if max_depth == 1: # recursion base case v = random.sample(self.leaf_values, 1)[0] return Tree(node_type_id='num_value', value=self.NumValue(abstract_value=v)) elif max_depth > 1: types = self.node_types node_type = random.sample(types, 1)[0] if node_type.id == 'num_value': return self.generate(1) elif node_type.id == 'add_n': n = random.randint(node_type.arity.min_value, node_type.arity.max_value) return Tree(node_type.id, children=[self.generate(max_depth - 1) for _ in range(n)]) elif node_type.id == 'sub_bin': return Tree(node_type.id, children=[ self.generate(max_depth - 1), self.generate(max_depth - 1)]) def evaluate(self, t: Tree): if len(t.children) > 0: if t.node_type_id == 'add_n': return sum(map(self.evaluate, t.children)) if t.node_type_id == 'sub_bin': return self.evaluate(t.children[0]) - self.evaluate(t.children[1]) else: return t.value.abstract_value class LabelledNaryExpressionTreeGen(NaryExpressionTreeGen): def __init__(self, max_value, max_arity): super(LabelledNaryExpressionTreeGen, self).__init__(max_value, max_arity) self.tree_def = TreeDefinition( node_types=[ NodeDefinition("op_n", may_root=True, arity=NodeDefinition.VariableArity(min_value=2, max_value=max_arity), value_type=OpValue), NodeDefinition("num_value", may_root=True, arity=NodeDefinition.FixedArity(0), value_type=self.NumValue) ] ) self.node_types = self.tree_def.node_types def generate(self, max_depth): """Generate a random arithmetic expression tree, using just n-ary plus and binary minus Args: max_depth: integer > 0 Returns: expression tree where leaves are int. """ if max_depth == 1: # recursion base case v = random.sample(self.leaf_values, 1)[0] return Tree(node_type_id='num_value', value=self.NumValue(abstract_value=v)) elif max_depth > 1: types = self.node_types node_type = random.sample(types, 1)[0] o = random.sample(['+', '-'], 1)[0] if node_type.id == 'num_value': return self.generate(1) elif node_type.id == 'op_n' and o == "+": n = random.randint(node_type.arity.min_value, node_type.arity.max_value) return Tree(node_type.id, children=[self.generate(max_depth - 1) for _ in range(n)], value=OpValue(abstract_value='+')) elif node_type.id == 'op_n' and o == "-": return Tree(node_type.id, children=[ self.generate(max_depth - 1), self.generate(max_depth - 1)], value=OpValue(abstract_value='-')) def evaluate(self, t: Tree): if len(t.children) > 0: if t.node_type_id == 'op_n' and t.value.abstract_value == "+": return sum(map(self.evaluate, t.children)) if t.node_type_id == 'sub_bin' and t.value.abstract_value == '-': return self.evaluate(t.children[0]) - self.evaluate(t.children[1]) else: return t.value.abstract_value
37.65019
120
0.583216
1,179
9,902
4.685327
0.099237
0.052136
0.050688
0.028965
0.880159
0.867125
0.83092
0.830558
0.803946
0.795981
0
0.012319
0.311351
9,902
262
121
37.793893
0.797771
0.105837
0
0.670659
0
0
0.029033
0
0
0
0
0
0
1
0.101796
false
0
0.023952
0.017964
0.371257
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
d6495f4d1362d68471caa416271d9afcbbdc1718
194
py
Python
juniorPython/apps/api/admin.py
CatOnDrugs/junior-test
7809d4726b7b39d5c0a69addc56aaf1e81d26bd7
[ "MIT" ]
null
null
null
juniorPython/apps/api/admin.py
CatOnDrugs/junior-test
7809d4726b7b39d5c0a69addc56aaf1e81d26bd7
[ "MIT" ]
null
null
null
juniorPython/apps/api/admin.py
CatOnDrugs/junior-test
7809d4726b7b39d5c0a69addc56aaf1e81d26bd7
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Customer, Deal, Gem, DealCSV admin.site.register(Gem) admin.site.register(Customer) admin.site.register(Deal) admin.site.register(DealCSV)
21.555556
48
0.804124
28
194
5.571429
0.428571
0.230769
0.435897
0
0
0
0
0
0
0
0
0
0.087629
194
8
49
24.25
0.881356
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
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
1
0
1
0
0
0
0
6
c388a507754f1397f30d3c301e7a75b8357e990e
47
py
Python
chapter_2/comment.py
superbe/PythonCrashCourse
c8781f68b0e9e68e54d48cce5224ecb6a5625ae2
[ "MIT" ]
null
null
null
chapter_2/comment.py
superbe/PythonCrashCourse
c8781f68b0e9e68e54d48cce5224ecb6a5625ae2
[ "MIT" ]
null
null
null
chapter_2/comment.py
superbe/PythonCrashCourse
c8781f68b0e9e68e54d48cce5224ecb6a5625ae2
[ "MIT" ]
null
null
null
# Упражнение 10. print("Hello Python people!")
15.666667
29
0.723404
6
47
5.666667
1
0
0
0
0
0
0
0
0
0
0
0.04878
0.12766
47
2
30
23.5
0.780488
0.297872
0
0
0
0
0.645161
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
6
7f20190d77071ace9b1fbbe31f06c0a1b7708317
1,831
bzl
Python
tensorflow/lite/core/shims/cc_library_with_tflite.bzl
koreybea/tensorflow
e252fffb16f2706688604dc91c426bae367ae5e8
[ "Apache-2.0" ]
6
2021-03-30T07:42:04.000Z
2022-03-23T02:42:36.000Z
tensorflow/lite/core/shims/cc_library_with_tflite.bzl
koreybea/tensorflow
e252fffb16f2706688604dc91c426bae367ae5e8
[ "Apache-2.0" ]
7
2021-02-21T21:05:59.000Z
2022-02-10T01:39:06.000Z
tensorflow/lite/core/shims/cc_library_with_tflite.bzl
koreybea/tensorflow
e252fffb16f2706688604dc91c426bae367ae5e8
[ "Apache-2.0" ]
4
2019-06-15T01:13:28.000Z
2020-12-16T02:28:45.000Z
"""Definitions for cc_library/cc_test targets that use the TFLite shims.""" def cc_library_with_tflite( name, deps = [], tflite_deps = [], **kwargs): """Defines a cc_library that uses the TFLite shims. This is a hook to allow applying different build flags (etc.) for targets that use the TFLite shims. Note that this build rule doesn't itself add any dependencies on TF Lite; this macro should normally be used in conjunction with a direct or indirect 'tflite_deps' dependency on one of the "shim" library targets from //tensorflow/lite/core/shims:*. Args: name: as for cc_library. deps: as for cc_library. tflite_deps: dependencies on rules that are themselves defined using 'cc_library_with_tflite'. **kwargs: Additional cc_library parameters. """ native.cc_library( name = name, deps = deps + tflite_deps, **kwargs ) def cc_test_with_tflite( name, deps = [], tflite_deps = [], **kwargs): """Defines a cc_test that uses the TFLite shims. This is a hook to allow applying different build flags (etc.) for targets that use the TFLite shims. Note that this build rule doesn't itself add any dependencies on TF Lite this macro should normally be used in conjunction with a direct or indirect 'tflite_deps' dependency on one of the "shim" library targets from //third_party/tensorflow/lite/core/shims:*. Args: name: as for cc_test. deps: as for cc_test. tflite_deps: dependencies on rules that are themselves defined using 'cc_library_with_tflite'. **kwargs: Additional cc_test parameters. """ native.cc_test( name = name, deps = deps + tflite_deps, **kwargs )
31.568966
75
0.656472
252
1,831
4.638889
0.27381
0.06929
0.05988
0.068435
0.85201
0.85201
0.828058
0.773311
0.773311
0.708298
0
0
0.271436
1,831
57
76
32.122807
0.876312
0.702348
0
0.7
0
0
0
0
0
0
0
0
0
1
0.1
false
0
0
0
0.1
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
4ef0870989fc1798debd40dae361788aadaca50d
4,122
py
Python
src/api/tests/test_logging.py
Dabble-of-DevOps-Bio/ella
e38631d302611a143c9baaa684bcbd014d9734e4
[ "MIT" ]
null
null
null
src/api/tests/test_logging.py
Dabble-of-DevOps-Bio/ella
e38631d302611a143c9baaa684bcbd014d9734e4
[ "MIT" ]
null
null
null
src/api/tests/test_logging.py
Dabble-of-DevOps-Bio/ella
e38631d302611a143c9baaa684bcbd014d9734e4
[ "MIT" ]
null
null
null
import datetime import pytest import json from vardb.datamodel import log from .util import FlaskClientProxy @pytest.fixture def client(): return FlaskClientProxy() def test_resourcelog(client, test_database, session): """ Test that requests to the API are logged correctly in the 'requestloq' table. These tests are by default logged in as testuser1, with usersession_id of 1. """ test_database.refresh() usersession_id = 1 remote_addr = "127.0.0.1" # Without payload r = client.get("/api/v1/config/") statuscode = r.status_code response_size = int(r.headers.get("Content-Length")) rlogs = session.query(log.ResourceLog).all() assert len(rlogs) == 2 # 2 entries since API did a login as first entry rl = rlogs[-1] assert rl.remote_addr == remote_addr assert rl.usersession_id == usersession_id assert rl.method == "GET" assert rl.resource == "/api/v1/config/" assert rl.statuscode == statuscode assert rl.response_size == response_size assert rl.payload is None assert rl.payload_size == 0 assert rl.query == "" assert rl.duration > 0 assert isinstance(rl.time, datetime.datetime) # With payload payload_data = { "allele_ids": [1], "gp_name": "HBOCUTV", "gp_version": "v01", "referenceassessments": [], } r = client.post("/api/v1/acmg/alleles/?dummy=data", payload_data) payload = json.dumps(payload_data) payload_size = len(payload) statuscode = r.status_code response_size = int(r.headers.get("Content-Length")) rlogs = session.query(log.ResourceLog).all() assert len(rlogs) == 4 # 4 since /currentuser is called to check whether logged in rl = rlogs[-1] assert statuscode == 200 assert rl.remote_addr == remote_addr assert rl.usersession_id == usersession_id assert rl.method == "POST" assert rl.resource == "/api/v1/acmg/alleles/" assert rl.statuscode == statuscode assert rl.response_size == response_size assert rl.payload == payload assert rl.payload_size == payload_size assert rl.query == "dummy=data" assert rl.duration > 0 assert isinstance(rl.time, datetime.datetime) # Make sure /login doesn't log passwords payload_data = {"username": "abc", "password": "123"} r = client.post("/api/v1/users/actions/login/", payload_data) statuscode = r.status_code response_size = int(r.headers.get("Content-Length")) rlogs = session.query(log.ResourceLog).all() assert len(rlogs) == 6 # 6 since /currentuser is called to check whether logged in rl = rlogs[-1] assert statuscode == 401 # User doesn't exist assert rl.remote_addr == remote_addr assert rl.usersession_id == usersession_id assert rl.method == "POST" assert rl.resource == "/api/v1/users/actions/login/" assert rl.statuscode == statuscode assert rl.response_size == response_size assert rl.payload is None assert rl.payload_size == 0 assert rl.query == "" assert rl.duration > 0 assert isinstance(rl.time, datetime.datetime) # Test logging when not logged in payload_data = { "allele_ids": [1], "gp_name": "HBOCUTV", "gp_version": "v01", "referenceassessments": [], } client.logout() r = client.post("/api/v1/acmg/alleles/?dummy=data", payload_data, username=None) payload = json.dumps(payload_data) payload_size = len(payload) statuscode = r.status_code response_size = int(r.headers.get("Content-Length")) rlogs = session.query(log.ResourceLog).all() assert len(rlogs) == 9 # logout counts as 1 rl = rlogs[-1] assert statuscode == 403 assert rl.remote_addr == remote_addr assert rl.usersession_id is None assert rl.method == "POST" assert rl.resource == "/api/v1/acmg/alleles/" assert rl.statuscode == statuscode assert rl.response_size == response_size assert rl.payload == payload assert rl.payload_size == payload_size assert rl.query == "dummy=data" assert isinstance(rl.time, datetime.datetime)
31.953488
87
0.670306
545
4,122
4.961468
0.225688
0.115385
0.044379
0.031065
0.767751
0.732618
0.720784
0.720784
0.720784
0.720784
0
0.016039
0.213489
4,122
128
88
32.203125
0.818014
0.110869
0
0.69
0
0
0.117679
0.044542
0
0
0
0
0.5
1
0.02
false
0.01
0.05
0.01
0.08
0
0
0
0
null
0
0
0
0
1
1
1
1
1
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
6
f614dd5b74053d5be8eb1cfb2995b6aa3fcb9711
70
py
Python
smi2img/__init__.py
KrisJanssen/smi2img
cd1d861375d87c2209c19bace0e0e21de02083c4
[ "MIT" ]
null
null
null
smi2img/__init__.py
KrisJanssen/smi2img
cd1d861375d87c2209c19bace0e0e21de02083c4
[ "MIT" ]
null
null
null
smi2img/__init__.py
KrisJanssen/smi2img
cd1d861375d87c2209c19bace0e0e21de02083c4
[ "MIT" ]
null
null
null
from smi2img.smiles2img import SmilesEncoder from smi2img import util
23.333333
44
0.871429
9
70
6.777778
0.666667
0.360656
0
0
0
0
0
0
0
0
0
0.048387
0.114286
70
2
45
35
0.935484
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
f666ef2e649fec773c06fbcca21b972731707082
9,773
py
Python
tests/test_resource_find.py
ColinKennedy/ways
1eb44e4aa5e35fb839212cd8cb1c59c714ba10d3
[ "MIT" ]
2
2019-11-10T18:35:38.000Z
2020-05-12T10:37:42.000Z
tests/test_resource_find.py
ColinKennedy/ways
1eb44e4aa5e35fb839212cd8cb1c59c714ba10d3
[ "MIT" ]
5
2017-11-27T18:05:25.000Z
2021-06-01T21:57:48.000Z
tests/test_resource_find.py
ColinKennedy/ways
1eb44e4aa5e35fb839212cd8cb1c59c714ba10d3
[ "MIT" ]
1
2017-11-27T17:54:53.000Z
2017-11-27T17:54:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Tests for auto-finding Ways objects.''' # IMPORT STANDARD LIBRARIES import textwrap # IMPORT WAYS LIBRARIES import ways.api # IMPORT LOCAL LIBRARIES from . import common_test class FindContextTestCase(common_test.ContextTestCase): '''Test for whenever the user tries to get Ways objects without a Context.''' def test_string(self): '''Get a Context/Asset automatically, using a string.''' contents = textwrap.dedent( r''' plugins: version_plugin: hierarchy: job/versioned_asset mapping: '/tmp/{JOB}/{SOMETHING}/{ASSET_VERSION}' ''') self._make_plugin_sheet(contents) versioned = '/tmp/foo/ttt/8' asset = ways.api.get_asset(versioned) self.assertNotEqual(None, asset) self.assertEqual(('job', 'versioned_asset'), asset.context.get_hierarchy()) def test_string_tied(self): '''Resolve a tie between two Contexts.''' contents = textwrap.dedent( r''' plugins: version_plugin: hierarchy: job/library mapping: '/tmp/{JOB}/library' another_plugin: hierarchy: job/config mapping: '/tmp/{JOB}/config' ''') self._make_plugin_sheet(contents) self.assertNotEqual(None, ways.api.get_asset('/tmp/foo/library')) def test_child_tokens_failure(self): '''Raise an exception because all Contexts return bad parse values.''' contents = textwrap.dedent( r''' plugins: version_plugin: hierarchy: job/library mapping: '/tmp/{JOB}/{SCENE}/library' mapping_details: SCENE: mapping: '{SCENE_PREFIX}_{SCENE_SUFFIX}' SCENE_SUFFIX: parse: regex: '[a-z]+' another_plugin: hierarchy: job/config mapping: '/tmp/{JOB}/{SCENE}/config' mapping_details: SCENE: mapping: '{SCENE_PREFIX}_{SCENE_SUFFIX}' SCENE_SUFFIX: parse: regex: '[a-z]+' ''') self._make_plugin_sheet(contents) info = { 'JOB': 'foo', 'SCENE_PREFIX': 'something', 'SCENE_SUFFIX': '0010', } with self.assertRaises(ValueError): ways.api.get_asset(info) def test_child_tokens(self): '''Get a Context from an Asset that only has child tokens defined.''' contents = textwrap.dedent( r''' plugins: version_plugin: hierarchy: job/library mapping: '/tmp/{JOB}/{SCENE}/library' mapping_details: SCENE: mapping: '{SCENE_PREFIX}_{SCENE_SUFFIX}' SCENE_SUFFIX: parse: regex: '\d+' another_plugin: hierarchy: job/config mapping: '/tmp/{JOB}/{SCENE}/config' mapping_details: SCENE: mapping: '{SCENE_PREFIX}_{SCENE_SUFFIX}' SCENE_SUFFIX: parse: regex: '[a-z]+' ''') self._make_plugin_sheet(contents) info = { 'JOB_NAME': 'foo', 'JOB_ID': '6', 'SCENE_PREFIX': 'something', 'SCENE_SUFFIX': '0010', } self.assertNotEqual(None, ways.api.get_asset(info)) def test_string_tied_fails(self): '''Raise an error if Ways cannot decide the best Context.''' contents = textwrap.dedent( r''' plugins: version_plugin: hierarchy: job/versioned_asset mapping: '/tmp/{JOB}/{SOMETHING}/{ASSET_VERSION}' another_plugin: hierarchy: something/completely/different mapping: '/tmp/{JOB}/{SOMETHING}/{ASSET_VERSION}' ''') self._make_plugin_sheet(contents) versioned = '/tmp/foo/ttt/8' with self.assertRaises(ValueError): ways.api.get_asset(versioned) def test_string_tie_break(self): '''Use a parser to break a tie between two Contexts.''' contents = textwrap.dedent( r''' plugins: some_plugin: hierarchy: foo/bar mapping: '/tmp/{JOB}/{SOMETHING}/{ASSET_VERSION}' mapping_details: ASSET_VERSION: parse: regex: tttt version_plugin: hierarchy: job/versioned_asset mapping: '/tmp/{JOB}/{SOMETHING}/{ASSET_VERSION}' mapping_details: ASSET_VERSION: parse: regex: \d+ another_plugin: hierarchy: something/completely/different mapping: '/tmp/{JOB}/{SOMETHING}/{ASSET_VERSION}' mapping_details: ASSET_VERSION: parse: regex: '[a-z]+' ''') self._make_plugin_sheet(contents) self.assertNotEqual(None, ways.api.get_asset('/tmp/foo/ttt/8')) def test_from_dict(self): '''Get the correct Context/Asset even if only a dict was given.''' contents = textwrap.dedent( r''' plugins: version_plugin: hierarchy: job/versioned_asset mapping: '/tmp/{JOB}/{SOMETHING}/{ASSET_VERSION}' ''') self._make_plugin_sheet(contents) versioned = { 'JOB': 'foo', 'SOMETHING': 'ttt', 'ASSET_VERSION': '8', } self.assertNotEqual(None, ways.api.get_asset(versioned)) def test_tie(self): '''Raise an error if Ways cannot decide the best Context.''' contents = textwrap.dedent( r''' plugins: version_plugin: hierarchy: job/versioned_asset mapping: '/tmp/{JOB}/{SOMETHING}/{ASSET_VERSION}' another_plugin: hierarchy: something/completely/different mapping: '/tmp/{JOB}/{SOMETHING}/{ASSET_VERSION}' ''') self._make_plugin_sheet(contents) versioned = { 'JOB': 'foo', 'SOMETHING': 'ttt', 'ASSET_VERSION': '8', } with self.assertRaises(ValueError): ways.api.get_asset(versioned) def test_tie_break_dict(self): '''Get the correct Context/Asset when two Contexts have the same mapping.''' contents = textwrap.dedent( r''' plugins: some_plugin: hierarchy: foo/bar mapping: '/tmp/{JOB}/{SOMETHING}/{ASSET_VERSION}' mapping_details: ASSET_VERSION: parse: regex: tttt version_plugin: hierarchy: job/versioned_asset mapping: '/tmp/{JOB}/{SOMETHING}/{ASSET_VERSION}' mapping_details: ASSET_VERSION: parse: regex: \d+ another_plugin: hierarchy: something/completely/different mapping: '/tmp/{JOB}/{SOMETHING}/{ASSET_VERSION}' mapping_details: ASSET_VERSION: parse: regex: '[a-z]+' ''') self._make_plugin_sheet(contents) versioned = { 'JOB': 'foo', 'SOMETHING': 'ttt', 'ASSET_VERSION': '8', } self.assertNotEqual(None, ways.api.get_asset(versioned)) def test_fails_no_mapping_string(self): '''If no Context could be found that has a mapping, raise Exception.''' contents = textwrap.dedent( r''' plugins: version_plugin: hierarchy: job/versioned_asset another_plugin: hierarchy: job/vvvv ''') self._make_plugin_sheet(contents) versioned = '/tmp/thing' with self.assertRaises(ValueError): ways.api.get_asset(versioned) def test_fails_no_mapping(self): '''If no Context could be found that has a mapping, raise Exception.''' contents = textwrap.dedent( r''' plugins: version_plugin: hierarchy: job/versioned_asset another_plugin: hierarchy: job/vvvv ''') self._make_plugin_sheet(contents) versioned = { 'JOB': 'foo', 'SOMETHING': 'ttt', 'ASSET_VERSION': '8', } with self.assertRaises(ValueError): ways.api.get_asset(versioned)
32.685619
84
0.471708
830
9,773
5.362651
0.153012
0.074141
0.052572
0.059313
0.827679
0.822287
0.806336
0.777578
0.756235
0.756235
0
0.003047
0.429039
9,773
298
85
32.795302
0.794624
0.088202
0
0.69
0
0
0.089143
0
0
0
0
0
0.12
1
0.11
false
0
0.03
0
0.15
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
9ca8295ec324632475b58b8cf8818ecb2718831c
37
py
Python
mirage/convert/rails_model.py
fossabot/django-mirage
814b3f2486af31f9dca42ef4bb0215655fe0aea6
[ "Apache-2.0" ]
null
null
null
mirage/convert/rails_model.py
fossabot/django-mirage
814b3f2486af31f9dca42ef4bb0215655fe0aea6
[ "Apache-2.0" ]
null
null
null
mirage/convert/rails_model.py
fossabot/django-mirage
814b3f2486af31f9dca42ef4bb0215655fe0aea6
[ "Apache-2.0" ]
null
null
null
def convert_rails_model(): pass
9.25
26
0.702703
5
37
4.8
1
0
0
0
0
0
0
0
0
0
0
0
0.216216
37
3
27
12.333333
0.827586
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
true
0.5
0
0
0.5
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
1
1
1
0
0
0
0
0
6
2136f00b85ed9b87dd30bad6c33cff47274a183a
254
py
Python
geneticpython/models/__init__.py
ngocjr7/geneticpython
4b4157523ce13b3da56cef61282cb0a984cd317b
[ "MIT" ]
null
null
null
geneticpython/models/__init__.py
ngocjr7/geneticpython
4b4157523ce13b3da56cef61282cb0a984cd317b
[ "MIT" ]
null
null
null
geneticpython/models/__init__.py
ngocjr7/geneticpython
4b4157523ce13b3da56cef61282cb0a984cd317b
[ "MIT" ]
null
null
null
from __future__ import absolute_import from .tree import * from .binary_individual import BinaryIndividual from .float_individual import FloatIndividual from .int_individual import IntIndividual from .permutation_individual import PermutationIndividual
31.75
57
0.877953
28
254
7.642857
0.5
0.299065
0
0
0
0
0
0
0
0
0
0
0.098425
254
7
58
36.285714
0.934498
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
2138b62cca33db2d29f4a9f47dd6231b1ce16335
68
py
Python
shelfcache/__init__.py
cristoper/feedfetch
180aa2d02f9fa9ece93f72d9303a0cbc3b652b81
[ "WTFPL" ]
5
2020-01-23T04:16:35.000Z
2021-04-13T02:11:43.000Z
shelfcache/__init__.py
cristoper/shelfcache
180aa2d02f9fa9ece93f72d9303a0cbc3b652b81
[ "WTFPL" ]
null
null
null
shelfcache/__init__.py
cristoper/shelfcache
180aa2d02f9fa9ece93f72d9303a0cbc3b652b81
[ "WTFPL" ]
null
null
null
from .cache_get import cache_get from .shelfcache import ShelfCache
22.666667
34
0.852941
10
68
5.6
0.5
0.285714
0
0
0
0
0
0
0
0
0
0
0.117647
68
2
35
34
0.933333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
dcc1031f17dbb3e77be4743be21e7a8191370cf8
12,478
py
Python
bluebottle/initiatives/tests/test_states.py
jayvdb/bluebottle
305fea238e6aa831598a8b227223a1a2f34c4fcc
[ "BSD-3-Clause" ]
null
null
null
bluebottle/initiatives/tests/test_states.py
jayvdb/bluebottle
305fea238e6aa831598a8b227223a1a2f34c4fcc
[ "BSD-3-Clause" ]
null
null
null
bluebottle/initiatives/tests/test_states.py
jayvdb/bluebottle
305fea238e6aa831598a8b227223a1a2f34c4fcc
[ "BSD-3-Clause" ]
null
null
null
from django.core import mail from bluebottle.events.tests.factories import EventFactory from bluebottle.funding.tests.factories import FundingFactory, BudgetLineFactory from bluebottle.events.states import EventStateMachine from bluebottle.funding.states import FundingStateMachine from bluebottle.funding_stripe.tests.factories import ( StripePayoutAccountFactory, ExternalAccountFactory, ) from bluebottle.fsm.state import TransitionNotPossible from bluebottle.test.factory_models.accounts import BlueBottleUserFactory from bluebottle.test.factory_models.geo import LocationFactory from bluebottle.test.utils import BluebottleTestCase from bluebottle.initiatives.tests.factories import InitiativeFactory from bluebottle.initiatives.states import ReviewStateMachine from bluebottle.test.factory_models.organizations import OrganizationFactory, OrganizationContactFactory class InitiativeReviewStateMachineTests(BluebottleTestCase): def setUp(self): super(InitiativeReviewStateMachineTests, self).setUp() self.user = BlueBottleUserFactory.create(first_name='Bart', last_name='Lacroix') self.initiative = InitiativeFactory.create( has_organization=False, owner=self.user, organization=None ) payout_account = StripePayoutAccountFactory.create(status='verified') self.bank_account = ExternalAccountFactory.create(connect_account=payout_account, status='verified') def test_default_status(self): self.assertEqual( self.initiative.status, ReviewStateMachine.draft.value ) def test_create_incomplete(self): self.initiative = InitiativeFactory.create( title='', has_organization=False, owner=self.user, organization=None ) self.assertEqual( self.initiative.status, ReviewStateMachine.draft.value ) self.assertRaises( TransitionNotPossible, self.initiative.states.submit ) def test_make_complete(self): self.initiative = InitiativeFactory.create( title='', has_organization=False, owner=self.user, organization=None ) self.initiative.title = 'Some title' self.initiative.save() self.assertEqual( self.initiative.status, ReviewStateMachine.draft.value ) self.initiative.states.submit() self.assertEqual( self.initiative.status, ReviewStateMachine.submitted.value ) def test_missing_organization(self): self.initiative = InitiativeFactory.create( has_organization=True, owner=self.user, organization=None ) self.assertEqual( self.initiative.status, ReviewStateMachine.draft.value ) self.assertRaises( TransitionNotPossible, self.initiative.states.submit ) def test_missing_organization_contact(self): self.initiative = InitiativeFactory.create( has_organization=True, owner=self.user, organization=OrganizationFactory.create(), organization_contact=None ) self.assertEqual( self.initiative.status, ReviewStateMachine.draft.value ) self.assertRaises( TransitionNotPossible, self.initiative.states.submit ) def test_missing_organization_contact_name(self): self.initiative = InitiativeFactory.create( has_organization=True, owner=self.user, organization=OrganizationFactory.create(), organization_contact=OrganizationContactFactory.create(name=None) ) self.assertEqual( self.initiative.status, ReviewStateMachine.draft.value ) self.assertRaises( TransitionNotPossible, self.initiative.states.submit ) def test_has_organization(self): self.initiative = InitiativeFactory.create( has_organization=True, owner=self.user, organization=OrganizationFactory.create(), organization_contact=OrganizationContactFactory.create() ) self.initiative.states.submit() self.assertEqual( self.initiative.status, ReviewStateMachine.submitted.value ) def test_has_organization_no_phone(self): self.initiative = InitiativeFactory.create( has_organization=True, owner=self.user, organization=OrganizationFactory.create(), organization_contact=OrganizationContactFactory.create(phone=None) ) self.initiative.states.submit() self.assertEqual( self.initiative.status, ReviewStateMachine.submitted.value ) def test_missing_place(self): self.initiative = InitiativeFactory.create( has_organization=False, owner=self.user, place=None, organization=None ) self.assertEqual( self.initiative.status, ReviewStateMachine.draft.value ) self.assertRaises( TransitionNotPossible, self.initiative.states.submit ) def test_submit_contact_without_location_has_locations(self): LocationFactory.create_batch(5) self.initiative = InitiativeFactory.create( has_organization=False, owner=self.user, place=None, location=None, organization=None ) self.assertEqual( self.initiative.status, ReviewStateMachine.draft.value ) self.assertRaises( TransitionNotPossible, self.initiative.states.submit ) def test_submit_contact_location_has_locations(self): locations = LocationFactory.create_batch(5) self.initiative = InitiativeFactory.create( has_organization=False, owner=self.user, place=None, location=locations[0], organization=None ) self.initiative.states.submit() self.assertEqual( self.initiative.status, ReviewStateMachine.submitted.value ) def test_submit_with_activities(self): event = EventFactory.create(initiative=self.initiative) funding = FundingFactory.create(initiative=self.initiative, bank_account=self.bank_account) BudgetLineFactory.create(activity=funding) incomplete_event = EventFactory.create(initiative=self.initiative, title='') self.initiative.states.submit(save=True) event.refresh_from_db() self.assertEqual( event.status, ReviewStateMachine.submitted.value ) funding.refresh_from_db() self.assertEqual( funding.status, ReviewStateMachine.submitted.value ) incomplete_event.refresh_from_db() self.assertEqual( incomplete_event.status, ReviewStateMachine.draft.value ) def test_needs_work(self): self.initiative.states.submit() self.initiative.states.request_changes(save=True) self.assertEqual( self.initiative.status, ReviewStateMachine.needs_work.value ) def test_needs_work_resubmit(self): self.initiative.states.submit() self.initiative.states.request_changes(save=True) self.initiative.title = 'Something else' self.initiative.save() self.assertEqual( self.initiative.status, ReviewStateMachine.needs_work.value ) self.initiative.states.submit(save=True) self.assertEqual( self.initiative.status, ReviewStateMachine.submitted.value ) def test_approve(self): self.initiative.states.submit() self.initiative.states.approve(save=True) self.assertEqual( self.initiative.status, ReviewStateMachine.approved.value ) self.assertEqual(len(mail.outbox), 1) subject = 'Your initiative "{}" has been approved!'.format(self.initiative.title) self.assertEqual(mail.outbox[0].subject, subject) self.assertTrue('Hi Bart' in mail.outbox[0].body) def test_approve_with_activities(self): event = EventFactory.create(initiative=self.initiative) incomplete_event = EventFactory.create(initiative=self.initiative, title='') funding = FundingFactory.create(initiative=self.initiative, bank_account=self.bank_account) BudgetLineFactory.create(activity=funding) self.initiative.states.submit(save=True) self.initiative.states.approve(save=True) self.assertEqual( self.initiative.status, ReviewStateMachine.approved.value ) event.refresh_from_db() self.assertEqual( event.status, EventStateMachine.open.value ) incomplete_event.refresh_from_db() self.assertEqual( incomplete_event.status, EventStateMachine.draft.value ) funding.refresh_from_db() self.assertEqual( funding.status, FundingStateMachine.submitted.value ) def test_reject(self): self.initiative.states.reject(save=True) self.assertEqual( self.initiative.status, ReviewStateMachine.rejected.value ) self.assertEqual(len(mail.outbox), 1) subject = 'Your initiative "{}" has been rejected.'.format(self.initiative.title) self.assertEqual(mail.outbox[0].subject, subject) self.assertTrue('Hi Bart' in mail.outbox[0].body) def test_reject_with_activities(self): event = EventFactory.create(initiative=self.initiative) self.initiative.states.reject(save=True) self.assertEqual( self.initiative.status, ReviewStateMachine.rejected.value ) event.refresh_from_db() self.assertEqual( event.status, EventStateMachine.rejected.value ) def test_cancel(self): self.initiative.states.submit() self.initiative.states.approve(save=True) mail.outbox = [] self.initiative.states.cancel(save=True) self.assertEqual( self.initiative.status, ReviewStateMachine.cancelled.value ) self.assertEqual(len(mail.outbox), 1) subject = 'The initiative "{}" has been cancelled.'.format(self.initiative.title) self.assertEqual(mail.outbox[0].subject, subject) self.assertTrue('Hi Bart' in mail.outbox[0].body) def test_cancel_with_activities(self): self.initiative.states.submit(save=True) self.initiative.states.approve() event = EventFactory.create(initiative=self.initiative) event.states.submit(save=True) self.initiative.states.cancel(save=True) self.assertEqual( self.initiative.status, ReviewStateMachine.cancelled.value ) event.refresh_from_db() self.assertEqual( event.status, EventStateMachine.cancelled.value ) def test_delete(self): self.initiative.states.delete(save=True) self.assertEqual( self.initiative.status, ReviewStateMachine.deleted.value ) def test_delete_with_activities(self): event = EventFactory.create(initiative=self.initiative) self.initiative.states.delete(save=True) self.assertEqual( self.initiative.status, ReviewStateMachine.deleted.value ) event.refresh_from_db() self.assertEqual( event.status, EventStateMachine.deleted.value ) def test_restore(self): self.initiative.states.reject(save=True) self.initiative.states.restore(save=True) self.assertEqual( self.initiative.status, ReviewStateMachine.needs_work.value ) def test_restore_with_activities(self): event = EventFactory.create(initiative=self.initiative) self.initiative.states.reject(save=True) self.initiative.states.restore(save=True) self.assertEqual( self.initiative.status, ReviewStateMachine.needs_work.value ) event.refresh_from_db() self.assertEqual( event.status, EventStateMachine.needs_work.value )
32.750656
108
0.658759
1,153
12,478
7.019948
0.105811
0.150482
0.084013
0.089573
0.803435
0.789227
0.77403
0.767853
0.730912
0.681245
0
0.001294
0.257012
12,478
380
109
32.836842
0.871751
0
0
0.601286
0
0
0.015147
0
0
0
0
0
0.160772
1
0.080386
false
0
0.041801
0
0.125402
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
dccfe05f1674658a48bc0148b58a03d80352dc47
108
py
Python
tests/test_dummy.py
ocefpaf/xroms
763d6e678e28fe074e0aaab26fecd2b74e51a8b0
[ "MIT" ]
4
2020-01-21T21:24:17.000Z
2020-10-02T03:09:32.000Z
tests/test_dummy.py
ocefpaf/xroms
763d6e678e28fe074e0aaab26fecd2b74e51a8b0
[ "MIT" ]
1
2020-04-08T00:11:39.000Z
2020-04-25T08:03:45.000Z
tests/test_dummy.py
ocefpaf/xroms
763d6e678e28fe074e0aaab26fecd2b74e51a8b0
[ "MIT" ]
1
2020-04-06T06:42:36.000Z
2020-04-06T06:42:36.000Z
# To be replaced with real tests soon def test_imports(): import xroms import xroms.roms_seawater
15.428571
37
0.731481
16
108
4.8125
0.875
0.285714
0
0
0
0
0
0
0
0
0
0
0.222222
108
6
38
18
0.916667
0.324074
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
1
0
1.333333
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
1
1
0
1
0
0
0
0
6
dcd687de17901f15436467e5d2c335fe55d931d3
38,016
py
Python
instances/passenger_demand/pas-20210421-2109-int18e/40.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210421-2109-int18e/40.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210421-2109-int18e/40.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
""" PASSENGERS """ numPassengers = 4114 passenger_arriving = ( (7, 11, 9, 4, 3, 0, 7, 12, 6, 2, 4, 0), # 0 (12, 8, 9, 4, 2, 0, 7, 11, 10, 5, 1, 0), # 1 (6, 14, 4, 8, 1, 0, 8, 13, 8, 6, 1, 0), # 2 (0, 14, 12, 1, 5, 0, 10, 7, 5, 6, 6, 0), # 3 (3, 8, 14, 5, 1, 0, 8, 16, 9, 4, 0, 0), # 4 (4, 13, 7, 7, 2, 0, 9, 10, 3, 7, 2, 0), # 5 (3, 9, 6, 5, 1, 0, 3, 10, 8, 5, 0, 0), # 6 (4, 6, 3, 5, 3, 0, 5, 8, 4, 5, 2, 0), # 7 (1, 7, 10, 5, 3, 0, 4, 7, 7, 7, 1, 0), # 8 (10, 15, 8, 4, 2, 0, 13, 12, 4, 7, 2, 0), # 9 (2, 14, 10, 8, 3, 0, 11, 10, 7, 5, 1, 0), # 10 (7, 16, 9, 3, 4, 0, 12, 9, 5, 9, 5, 0), # 11 (2, 12, 12, 5, 3, 0, 8, 10, 13, 4, 1, 0), # 12 (2, 8, 11, 7, 0, 0, 12, 15, 5, 3, 3, 0), # 13 (3, 10, 8, 5, 3, 0, 8, 8, 4, 5, 4, 0), # 14 (4, 14, 8, 3, 4, 0, 4, 8, 2, 5, 3, 0), # 15 (5, 7, 8, 5, 6, 0, 12, 7, 8, 7, 6, 0), # 16 (4, 14, 11, 5, 5, 0, 4, 13, 5, 5, 2, 0), # 17 (1, 11, 9, 5, 3, 0, 2, 13, 6, 5, 2, 0), # 18 (4, 6, 18, 6, 4, 0, 8, 12, 8, 3, 2, 0), # 19 (3, 13, 11, 8, 2, 0, 12, 8, 9, 3, 2, 0), # 20 (3, 5, 11, 3, 4, 0, 9, 11, 8, 6, 3, 0), # 21 (3, 13, 11, 1, 5, 0, 3, 15, 3, 2, 2, 0), # 22 (14, 15, 5, 6, 1, 0, 5, 9, 7, 11, 1, 0), # 23 (7, 9, 13, 3, 3, 0, 10, 13, 8, 6, 1, 0), # 24 (6, 7, 12, 3, 2, 0, 7, 10, 6, 10, 2, 0), # 25 (5, 12, 8, 3, 3, 0, 14, 16, 9, 5, 4, 0), # 26 (10, 11, 7, 6, 3, 0, 9, 9, 5, 6, 3, 0), # 27 (2, 13, 15, 4, 2, 0, 8, 5, 15, 7, 5, 0), # 28 (8, 17, 9, 4, 2, 0, 7, 11, 10, 2, 3, 0), # 29 (3, 17, 15, 6, 3, 0, 9, 11, 7, 3, 2, 0), # 30 (5, 15, 10, 4, 4, 0, 9, 13, 5, 9, 4, 0), # 31 (3, 13, 11, 7, 2, 0, 11, 10, 8, 7, 3, 0), # 32 (5, 13, 11, 2, 5, 0, 7, 14, 5, 5, 2, 0), # 33 (4, 12, 9, 8, 1, 0, 6, 17, 6, 3, 3, 0), # 34 (1, 9, 11, 8, 2, 0, 11, 11, 8, 3, 2, 0), # 35 (4, 17, 11, 6, 2, 0, 6, 18, 6, 6, 5, 0), # 36 (10, 6, 13, 3, 2, 0, 7, 9, 7, 8, 2, 0), # 37 (8, 16, 12, 4, 5, 0, 6, 12, 6, 3, 0, 0), # 38 (3, 11, 9, 5, 1, 0, 10, 15, 7, 8, 5, 0), # 39 (3, 13, 16, 5, 1, 0, 9, 9, 9, 7, 4, 0), # 40 (6, 15, 13, 5, 7, 0, 4, 10, 9, 8, 2, 0), # 41 (5, 11, 11, 4, 4, 0, 7, 13, 9, 9, 4, 0), # 42 (5, 15, 8, 7, 3, 0, 4, 11, 7, 5, 1, 0), # 43 (3, 19, 7, 4, 0, 0, 5, 12, 6, 3, 1, 0), # 44 (4, 9, 8, 9, 0, 0, 3, 13, 6, 9, 2, 0), # 45 (3, 12, 7, 4, 2, 0, 9, 12, 5, 4, 2, 0), # 46 (6, 10, 8, 4, 4, 0, 6, 12, 6, 7, 5, 0), # 47 (8, 11, 7, 8, 2, 0, 11, 9, 12, 7, 2, 0), # 48 (6, 13, 10, 3, 2, 0, 8, 12, 7, 8, 2, 0), # 49 (8, 5, 6, 6, 4, 0, 13, 11, 7, 5, 7, 0), # 50 (5, 12, 4, 6, 7, 0, 6, 19, 13, 5, 1, 0), # 51 (4, 12, 9, 9, 2, 0, 11, 8, 11, 7, 3, 0), # 52 (9, 12, 15, 2, 2, 0, 4, 13, 9, 5, 4, 0), # 53 (10, 15, 18, 7, 2, 0, 10, 9, 10, 4, 0, 0), # 54 (9, 25, 5, 3, 2, 0, 10, 9, 10, 7, 2, 0), # 55 (10, 13, 5, 1, 4, 0, 6, 17, 10, 9, 2, 0), # 56 (8, 8, 10, 7, 5, 0, 8, 14, 11, 6, 7, 0), # 57 (6, 8, 5, 5, 2, 0, 9, 16, 11, 3, 4, 0), # 58 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 59 ) station_arriving_intensity = ( (4.769372805092186, 12.233629261363635, 14.389624839331619, 11.405298913043477, 12.857451923076923, 8.562228260869567), # 0 (4.81413961808604, 12.369674877683082, 14.46734796754499, 11.46881589673913, 12.953819711538461, 8.559309850543478), # 1 (4.8583952589991215, 12.503702525252525, 14.54322622107969, 11.530934782608696, 13.048153846153847, 8.556302173913043), # 2 (4.902102161984196, 12.635567578125, 14.617204169344474, 11.591602581521737, 13.14036778846154, 8.553205638586958), # 3 (4.94522276119403, 12.765125410353535, 14.689226381748071, 11.650766304347826, 13.230375, 8.550020652173911), # 4 (4.987719490781387, 12.892231395991162, 14.759237427699228, 11.708372961956522, 13.318088942307691, 8.546747622282608), # 5 (5.029554784899035, 13.01674090909091, 14.827181876606687, 11.764369565217393, 13.403423076923078, 8.54338695652174), # 6 (5.0706910776997365, 13.138509323705808, 14.893004297879177, 11.818703125, 13.486290865384618, 8.5399390625), # 7 (5.1110908033362605, 13.257392013888888, 14.956649260925452, 11.871320652173912, 13.56660576923077, 8.536404347826087), # 8 (5.1507163959613695, 13.373244353693181, 15.018061335154243, 11.922169157608696, 13.644281249999999, 8.532783220108696), # 9 (5.1895302897278315, 13.485921717171717, 15.077185089974291, 11.971195652173915, 13.719230769230771, 8.529076086956522), # 10 (5.227494918788412, 13.595279478377526, 15.133965094794343, 12.018347146739131, 13.791367788461539, 8.525283355978262), # 11 (5.2645727172958745, 13.701173011363636, 15.188345919023137, 12.063570652173912, 13.860605769230768, 8.521405434782608), # 12 (5.3007261194029835, 13.803457690183082, 15.240272132069407, 12.106813179347826, 13.926858173076925, 8.51744273097826), # 13 (5.335917559262511, 13.90198888888889, 15.289688303341899, 12.148021739130433, 13.99003846153846, 8.513395652173912), # 14 (5.370109471027217, 13.996621981534089, 15.336539002249355, 12.187143342391304, 14.050060096153846, 8.509264605978261), # 15 (5.403264288849868, 14.087212342171718, 15.380768798200515, 12.224124999999999, 14.10683653846154, 8.50505), # 16 (5.4353444468832315, 14.173615344854797, 15.422322260604112, 12.258913722826087, 14.16028125, 8.500752241847827), # 17 (5.46631237928007, 14.255686363636363, 15.461143958868895, 12.291456521739132, 14.210307692307696, 8.496371739130435), # 18 (5.496130520193152, 14.333280772569443, 15.4971784624036, 12.321700407608695, 14.256829326923079, 8.491908899456522), # 19 (5.524761303775241, 14.40625394570707, 15.530370340616965, 12.349592391304348, 14.299759615384616, 8.487364130434782), # 20 (5.552167164179106, 14.47446125710227, 15.56066416291774, 12.375079483695652, 14.339012019230768, 8.482737839673913), # 21 (5.578310535557506, 14.537758080808082, 15.588004498714653, 12.398108695652175, 14.374499999999998, 8.47803043478261), # 22 (5.603153852063214, 14.595999790877526, 15.612335917416454, 12.418627038043478, 14.40613701923077, 8.473242323369567), # 23 (5.62665954784899, 14.649041761363636, 15.633602988431875, 12.43658152173913, 14.433836538461538, 8.468373913043479), # 24 (5.648790057067603, 14.696739366319445, 15.651750281169667, 12.451919157608696, 14.457512019230768, 8.463425611413044), # 25 (5.669507813871817, 14.738947979797977, 15.66672236503856, 12.464586956521739, 14.477076923076922, 8.458397826086957), # 26 (5.688775252414398, 14.77552297585227, 15.6784638094473, 12.474531929347828, 14.492444711538463, 8.453290964673915), # 27 (5.7065548068481124, 14.806319728535353, 15.68691918380463, 12.481701086956523, 14.503528846153845, 8.448105434782608), # 28 (5.722808911325724, 14.831193611900254, 15.69203305751928, 12.486041440217392, 14.510242788461538, 8.44284164402174), # 29 (5.7375, 14.85, 15.69375, 12.4875, 14.512500000000001, 8.4375), # 30 (5.751246651214834, 14.865621839488634, 15.692462907608693, 12.487236580882353, 14.511678590425532, 8.430077267616193), # 31 (5.7646965153452685, 14.881037215909092, 15.68863804347826, 12.486451470588234, 14.509231914893617, 8.418644565217393), # 32 (5.777855634590792, 14.896244211647728, 15.682330027173915, 12.485152389705883, 14.50518630319149, 8.403313830584706), # 33 (5.790730051150895, 14.91124090909091, 15.67359347826087, 12.483347058823531, 14.499568085106382, 8.38419700149925), # 34 (5.803325807225064, 14.926025390624996, 15.662483016304348, 12.481043198529411, 14.492403590425532, 8.361406015742128), # 35 (5.815648945012788, 14.940595738636366, 15.649053260869564, 12.478248529411767, 14.48371914893617, 8.335052811094453), # 36 (5.8277055067135555, 14.954950035511365, 15.63335883152174, 12.474970772058823, 14.47354109042553, 8.305249325337332), # 37 (5.839501534526853, 14.969086363636364, 15.615454347826088, 12.471217647058824, 14.461895744680852, 8.272107496251873), # 38 (5.851043070652174, 14.983002805397728, 15.595394429347825, 12.466996875000001, 14.44880944148936, 8.23573926161919), # 39 (5.862336157289003, 14.99669744318182, 15.573233695652176, 12.462316176470589, 14.434308510638296, 8.196256559220389), # 40 (5.873386836636828, 15.010168359374997, 15.549026766304348, 12.457183272058824, 14.418419281914893, 8.153771326836583), # 41 (5.88420115089514, 15.023413636363639, 15.522828260869566, 12.451605882352942, 14.401168085106384, 8.108395502248875), # 42 (5.894785142263428, 15.03643135653409, 15.494692798913043, 12.445591727941178, 14.38258125, 8.060241023238381), # 43 (5.905144852941176, 15.049219602272727, 15.464675, 12.439148529411764, 14.36268510638298, 8.009419827586207), # 44 (5.915286325127877, 15.061776455965909, 15.432829483695656, 12.43228400735294, 14.341505984042554, 7.956043853073464), # 45 (5.925215601023019, 15.074100000000003, 15.39921086956522, 12.425005882352941, 14.319070212765958, 7.90022503748126), # 46 (5.934938722826087, 15.086188316761364, 15.363873777173913, 12.417321874999999, 14.295404122340427, 7.842075318590705), # 47 (5.944461732736574, 15.098039488636365, 15.326872826086957, 12.409239705882353, 14.27053404255319, 7.7817066341829095), # 48 (5.953790672953963, 15.10965159801136, 15.288262635869566, 12.400767095588236, 14.24448630319149, 7.71923092203898), # 49 (5.96293158567775, 15.121022727272724, 15.248097826086958, 12.391911764705883, 14.217287234042553, 7.65476011994003), # 50 (5.971890513107417, 15.132150958806818, 15.206433016304347, 12.38268143382353, 14.188963164893616, 7.588406165667167), # 51 (5.980673497442456, 15.143034375, 15.163322826086954, 12.373083823529411, 14.159540425531915, 7.5202809970015), # 52 (5.989286580882353, 15.153671058238638, 15.118821875, 12.363126654411765, 14.129045345744682, 7.450496551724138), # 53 (5.9977358056266, 15.164059090909088, 15.072984782608694, 12.352817647058824, 14.09750425531915, 7.379164767616192), # 54 (6.00602721387468, 15.174196555397728, 15.02586616847826, 12.342164522058825, 14.064943484042553, 7.306397582458771), # 55 (6.014166847826087, 15.184081534090907, 14.977520652173913, 12.331175, 14.031389361702129, 7.232306934032984), # 56 (6.022160749680308, 15.193712109375003, 14.92800285326087, 12.319856801470587, 13.996868218085105, 7.15700476011994), # 57 (6.030014961636829, 15.203086363636363, 14.877367391304347, 12.308217647058825, 13.961406382978723, 7.0806029985007495), # 58 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59 ) passenger_arriving_acc = ( (7, 11, 9, 4, 3, 0, 7, 12, 6, 2, 4, 0), # 0 (19, 19, 18, 8, 5, 0, 14, 23, 16, 7, 5, 0), # 1 (25, 33, 22, 16, 6, 0, 22, 36, 24, 13, 6, 0), # 2 (25, 47, 34, 17, 11, 0, 32, 43, 29, 19, 12, 0), # 3 (28, 55, 48, 22, 12, 0, 40, 59, 38, 23, 12, 0), # 4 (32, 68, 55, 29, 14, 0, 49, 69, 41, 30, 14, 0), # 5 (35, 77, 61, 34, 15, 0, 52, 79, 49, 35, 14, 0), # 6 (39, 83, 64, 39, 18, 0, 57, 87, 53, 40, 16, 0), # 7 (40, 90, 74, 44, 21, 0, 61, 94, 60, 47, 17, 0), # 8 (50, 105, 82, 48, 23, 0, 74, 106, 64, 54, 19, 0), # 9 (52, 119, 92, 56, 26, 0, 85, 116, 71, 59, 20, 0), # 10 (59, 135, 101, 59, 30, 0, 97, 125, 76, 68, 25, 0), # 11 (61, 147, 113, 64, 33, 0, 105, 135, 89, 72, 26, 0), # 12 (63, 155, 124, 71, 33, 0, 117, 150, 94, 75, 29, 0), # 13 (66, 165, 132, 76, 36, 0, 125, 158, 98, 80, 33, 0), # 14 (70, 179, 140, 79, 40, 0, 129, 166, 100, 85, 36, 0), # 15 (75, 186, 148, 84, 46, 0, 141, 173, 108, 92, 42, 0), # 16 (79, 200, 159, 89, 51, 0, 145, 186, 113, 97, 44, 0), # 17 (80, 211, 168, 94, 54, 0, 147, 199, 119, 102, 46, 0), # 18 (84, 217, 186, 100, 58, 0, 155, 211, 127, 105, 48, 0), # 19 (87, 230, 197, 108, 60, 0, 167, 219, 136, 108, 50, 0), # 20 (90, 235, 208, 111, 64, 0, 176, 230, 144, 114, 53, 0), # 21 (93, 248, 219, 112, 69, 0, 179, 245, 147, 116, 55, 0), # 22 (107, 263, 224, 118, 70, 0, 184, 254, 154, 127, 56, 0), # 23 (114, 272, 237, 121, 73, 0, 194, 267, 162, 133, 57, 0), # 24 (120, 279, 249, 124, 75, 0, 201, 277, 168, 143, 59, 0), # 25 (125, 291, 257, 127, 78, 0, 215, 293, 177, 148, 63, 0), # 26 (135, 302, 264, 133, 81, 0, 224, 302, 182, 154, 66, 0), # 27 (137, 315, 279, 137, 83, 0, 232, 307, 197, 161, 71, 0), # 28 (145, 332, 288, 141, 85, 0, 239, 318, 207, 163, 74, 0), # 29 (148, 349, 303, 147, 88, 0, 248, 329, 214, 166, 76, 0), # 30 (153, 364, 313, 151, 92, 0, 257, 342, 219, 175, 80, 0), # 31 (156, 377, 324, 158, 94, 0, 268, 352, 227, 182, 83, 0), # 32 (161, 390, 335, 160, 99, 0, 275, 366, 232, 187, 85, 0), # 33 (165, 402, 344, 168, 100, 0, 281, 383, 238, 190, 88, 0), # 34 (166, 411, 355, 176, 102, 0, 292, 394, 246, 193, 90, 0), # 35 (170, 428, 366, 182, 104, 0, 298, 412, 252, 199, 95, 0), # 36 (180, 434, 379, 185, 106, 0, 305, 421, 259, 207, 97, 0), # 37 (188, 450, 391, 189, 111, 0, 311, 433, 265, 210, 97, 0), # 38 (191, 461, 400, 194, 112, 0, 321, 448, 272, 218, 102, 0), # 39 (194, 474, 416, 199, 113, 0, 330, 457, 281, 225, 106, 0), # 40 (200, 489, 429, 204, 120, 0, 334, 467, 290, 233, 108, 0), # 41 (205, 500, 440, 208, 124, 0, 341, 480, 299, 242, 112, 0), # 42 (210, 515, 448, 215, 127, 0, 345, 491, 306, 247, 113, 0), # 43 (213, 534, 455, 219, 127, 0, 350, 503, 312, 250, 114, 0), # 44 (217, 543, 463, 228, 127, 0, 353, 516, 318, 259, 116, 0), # 45 (220, 555, 470, 232, 129, 0, 362, 528, 323, 263, 118, 0), # 46 (226, 565, 478, 236, 133, 0, 368, 540, 329, 270, 123, 0), # 47 (234, 576, 485, 244, 135, 0, 379, 549, 341, 277, 125, 0), # 48 (240, 589, 495, 247, 137, 0, 387, 561, 348, 285, 127, 0), # 49 (248, 594, 501, 253, 141, 0, 400, 572, 355, 290, 134, 0), # 50 (253, 606, 505, 259, 148, 0, 406, 591, 368, 295, 135, 0), # 51 (257, 618, 514, 268, 150, 0, 417, 599, 379, 302, 138, 0), # 52 (266, 630, 529, 270, 152, 0, 421, 612, 388, 307, 142, 0), # 53 (276, 645, 547, 277, 154, 0, 431, 621, 398, 311, 142, 0), # 54 (285, 670, 552, 280, 156, 0, 441, 630, 408, 318, 144, 0), # 55 (295, 683, 557, 281, 160, 0, 447, 647, 418, 327, 146, 0), # 56 (303, 691, 567, 288, 165, 0, 455, 661, 429, 333, 153, 0), # 57 (309, 699, 572, 293, 167, 0, 464, 677, 440, 336, 157, 0), # 58 (309, 699, 572, 293, 167, 0, 464, 677, 440, 336, 157, 0), # 59 ) passenger_arriving_rate = ( (4.769372805092186, 9.786903409090908, 8.63377490359897, 4.56211956521739, 2.5714903846153843, 0.0, 8.562228260869567, 10.285961538461537, 6.843179347826086, 5.755849935732647, 2.446725852272727, 0.0), # 0 (4.81413961808604, 9.895739902146465, 8.680408780526994, 4.587526358695651, 2.5907639423076922, 0.0, 8.559309850543478, 10.363055769230769, 6.881289538043478, 5.786939187017995, 2.4739349755366162, 0.0), # 1 (4.8583952589991215, 10.00296202020202, 8.725935732647814, 4.612373913043478, 2.609630769230769, 0.0, 8.556302173913043, 10.438523076923076, 6.918560869565217, 5.817290488431875, 2.500740505050505, 0.0), # 2 (4.902102161984196, 10.1084540625, 8.770322501606683, 4.636641032608694, 2.628073557692308, 0.0, 8.553205638586958, 10.512294230769232, 6.954961548913042, 5.846881667737789, 2.527113515625, 0.0), # 3 (4.94522276119403, 10.212100328282828, 8.813535829048842, 4.66030652173913, 2.6460749999999997, 0.0, 8.550020652173911, 10.584299999999999, 6.990459782608696, 5.875690552699228, 2.553025082070707, 0.0), # 4 (4.987719490781387, 10.313785116792928, 8.855542456619537, 4.6833491847826085, 2.663617788461538, 0.0, 8.546747622282608, 10.654471153846153, 7.025023777173913, 5.90369497107969, 2.578446279198232, 0.0), # 5 (5.029554784899035, 10.413392727272727, 8.896309125964011, 4.705747826086957, 2.680684615384615, 0.0, 8.54338695652174, 10.72273846153846, 7.058621739130436, 5.930872750642674, 2.603348181818182, 0.0), # 6 (5.0706910776997365, 10.510807458964646, 8.935802578727506, 4.72748125, 2.697258173076923, 0.0, 8.5399390625, 10.789032692307693, 7.0912218750000005, 5.95720171915167, 2.6277018647411614, 0.0), # 7 (5.1110908033362605, 10.60591361111111, 8.97398955655527, 4.7485282608695645, 2.7133211538461537, 0.0, 8.536404347826087, 10.853284615384615, 7.122792391304347, 5.982659704370181, 2.6514784027777774, 0.0), # 8 (5.1507163959613695, 10.698595482954543, 9.010836801092546, 4.768867663043478, 2.7288562499999993, 0.0, 8.532783220108696, 10.915424999999997, 7.153301494565217, 6.007224534061697, 2.6746488707386358, 0.0), # 9 (5.1895302897278315, 10.788737373737373, 9.046311053984574, 4.7884782608695655, 2.743846153846154, 0.0, 8.529076086956522, 10.975384615384616, 7.182717391304348, 6.030874035989716, 2.697184343434343, 0.0), # 10 (5.227494918788412, 10.87622358270202, 9.080379056876605, 4.807338858695652, 2.7582735576923074, 0.0, 8.525283355978262, 11.03309423076923, 7.2110082880434785, 6.053586037917737, 2.719055895675505, 0.0), # 11 (5.2645727172958745, 10.960938409090907, 9.113007551413881, 4.825428260869565, 2.7721211538461534, 0.0, 8.521405434782608, 11.088484615384614, 7.238142391304347, 6.0753383676092545, 2.740234602272727, 0.0), # 12 (5.3007261194029835, 11.042766152146465, 9.144163279241644, 4.8427252717391305, 2.7853716346153847, 0.0, 8.51744273097826, 11.141486538461539, 7.264087907608696, 6.096108852827762, 2.760691538036616, 0.0), # 13 (5.335917559262511, 11.121591111111112, 9.173812982005138, 4.859208695652173, 2.7980076923076918, 0.0, 8.513395652173912, 11.192030769230767, 7.288813043478259, 6.115875321336759, 2.780397777777778, 0.0), # 14 (5.370109471027217, 11.19729758522727, 9.201923401349612, 4.874857336956521, 2.810012019230769, 0.0, 8.509264605978261, 11.240048076923076, 7.312286005434782, 6.134615600899742, 2.7993243963068175, 0.0), # 15 (5.403264288849868, 11.269769873737372, 9.228461278920308, 4.88965, 2.8213673076923076, 0.0, 8.50505, 11.28546923076923, 7.334474999999999, 6.152307519280206, 2.817442468434343, 0.0), # 16 (5.4353444468832315, 11.338892275883836, 9.253393356362468, 4.903565489130434, 2.83205625, 0.0, 8.500752241847827, 11.328225, 7.3553482336956515, 6.168928904241644, 2.834723068970959, 0.0), # 17 (5.46631237928007, 11.40454909090909, 9.276686375321336, 4.916582608695652, 2.842061538461539, 0.0, 8.496371739130435, 11.368246153846156, 7.374873913043479, 6.184457583547558, 2.8511372727272724, 0.0), # 18 (5.496130520193152, 11.466624618055553, 9.298307077442159, 4.928680163043477, 2.8513658653846155, 0.0, 8.491908899456522, 11.405463461538462, 7.393020244565217, 6.198871384961439, 2.866656154513888, 0.0), # 19 (5.524761303775241, 11.525003156565655, 9.318222204370178, 4.939836956521739, 2.859951923076923, 0.0, 8.487364130434782, 11.439807692307692, 7.409755434782609, 6.212148136246785, 2.8812507891414136, 0.0), # 20 (5.552167164179106, 11.579569005681815, 9.336398497750643, 4.95003179347826, 2.8678024038461536, 0.0, 8.482737839673913, 11.471209615384614, 7.425047690217391, 6.224265665167096, 2.894892251420454, 0.0), # 21 (5.578310535557506, 11.630206464646465, 9.352802699228791, 4.95924347826087, 2.8748999999999993, 0.0, 8.47803043478261, 11.499599999999997, 7.438865217391305, 6.235201799485861, 2.907551616161616, 0.0), # 22 (5.603153852063214, 11.67679983270202, 9.367401550449872, 4.967450815217391, 2.8812274038461534, 0.0, 8.473242323369567, 11.524909615384614, 7.451176222826087, 6.244934366966581, 2.919199958175505, 0.0), # 23 (5.62665954784899, 11.719233409090908, 9.380161793059125, 4.974632608695652, 2.8867673076923075, 0.0, 8.468373913043479, 11.54706923076923, 7.461948913043478, 6.25344119537275, 2.929808352272727, 0.0), # 24 (5.648790057067603, 11.757391493055556, 9.391050168701799, 4.980767663043478, 2.8915024038461534, 0.0, 8.463425611413044, 11.566009615384614, 7.471151494565217, 6.260700112467866, 2.939347873263889, 0.0), # 25 (5.669507813871817, 11.79115838383838, 9.400033419023135, 4.985834782608695, 2.8954153846153843, 0.0, 8.458397826086957, 11.581661538461537, 7.478752173913043, 6.266688946015424, 2.947789595959595, 0.0), # 26 (5.688775252414398, 11.820418380681815, 9.40707828566838, 4.989812771739131, 2.8984889423076923, 0.0, 8.453290964673915, 11.593955769230769, 7.484719157608696, 6.271385523778919, 2.9551045951704538, 0.0), # 27 (5.7065548068481124, 11.84505578282828, 9.412151510282778, 4.992680434782609, 2.9007057692307687, 0.0, 8.448105434782608, 11.602823076923075, 7.489020652173913, 6.274767673521851, 2.96126394570707, 0.0), # 28 (5.722808911325724, 11.864954889520202, 9.415219834511568, 4.994416576086956, 2.902048557692307, 0.0, 8.44284164402174, 11.608194230769229, 7.491624864130435, 6.276813223007712, 2.9662387223800506, 0.0), # 29 (5.7375, 11.879999999999999, 9.41625, 4.995, 2.9025, 0.0, 8.4375, 11.61, 7.4925, 6.277499999999999, 2.9699999999999998, 0.0), # 30 (5.751246651214834, 11.892497471590906, 9.415477744565216, 4.994894632352941, 2.9023357180851064, 0.0, 8.430077267616193, 11.609342872340426, 7.492341948529411, 6.276985163043476, 2.9731243678977264, 0.0), # 31 (5.7646965153452685, 11.904829772727274, 9.413182826086956, 4.994580588235293, 2.901846382978723, 0.0, 8.418644565217393, 11.607385531914892, 7.49187088235294, 6.275455217391303, 2.9762074431818184, 0.0), # 32 (5.777855634590792, 11.916995369318181, 9.40939801630435, 4.994060955882353, 2.9010372606382977, 0.0, 8.403313830584706, 11.60414904255319, 7.491091433823529, 6.272932010869566, 2.9792488423295453, 0.0), # 33 (5.790730051150895, 11.928992727272727, 9.40415608695652, 4.993338823529412, 2.899913617021276, 0.0, 8.38419700149925, 11.599654468085104, 7.490008235294118, 6.269437391304347, 2.9822481818181816, 0.0), # 34 (5.803325807225064, 11.940820312499996, 9.39748980978261, 4.9924172794117645, 2.898480718085106, 0.0, 8.361406015742128, 11.593922872340425, 7.488625919117647, 6.264993206521739, 2.985205078124999, 0.0), # 35 (5.815648945012788, 11.952476590909091, 9.389431956521738, 4.9912994117647065, 2.896743829787234, 0.0, 8.335052811094453, 11.586975319148936, 7.486949117647059, 6.259621304347825, 2.988119147727273, 0.0), # 36 (5.8277055067135555, 11.96396002840909, 9.380015298913044, 4.989988308823529, 2.8947082180851056, 0.0, 8.305249325337332, 11.578832872340422, 7.484982463235293, 6.253343532608695, 2.9909900071022726, 0.0), # 37 (5.839501534526853, 11.97526909090909, 9.369272608695653, 4.988487058823529, 2.89237914893617, 0.0, 8.272107496251873, 11.56951659574468, 7.4827305882352935, 6.246181739130434, 2.9938172727272727, 0.0), # 38 (5.851043070652174, 11.986402244318182, 9.357236657608695, 4.98679875, 2.8897618882978717, 0.0, 8.23573926161919, 11.559047553191487, 7.480198125, 6.23815777173913, 2.9966005610795454, 0.0), # 39 (5.862336157289003, 11.997357954545455, 9.343940217391305, 4.984926470588235, 2.886861702127659, 0.0, 8.196256559220389, 11.547446808510635, 7.477389705882353, 6.22929347826087, 2.999339488636364, 0.0), # 40 (5.873386836636828, 12.008134687499997, 9.329416059782607, 4.982873308823529, 2.8836838563829783, 0.0, 8.153771326836583, 11.534735425531913, 7.474309963235294, 6.219610706521738, 3.002033671874999, 0.0), # 41 (5.88420115089514, 12.01873090909091, 9.31369695652174, 4.980642352941176, 2.880233617021277, 0.0, 8.108395502248875, 11.520934468085107, 7.4709635294117644, 6.209131304347826, 3.0046827272727277, 0.0), # 42 (5.894785142263428, 12.02914508522727, 9.296815679347825, 4.978236691176471, 2.8765162499999994, 0.0, 8.060241023238381, 11.506064999999998, 7.467355036764706, 6.1978771195652165, 3.0072862713068176, 0.0), # 43 (5.905144852941176, 12.03937568181818, 9.278805, 4.975659411764705, 2.8725370212765955, 0.0, 8.009419827586207, 11.490148085106382, 7.4634891176470575, 6.1858699999999995, 3.009843920454545, 0.0), # 44 (5.915286325127877, 12.049421164772726, 9.259697690217394, 4.972913602941176, 2.8683011968085106, 0.0, 7.956043853073464, 11.473204787234042, 7.459370404411764, 6.1731317934782615, 3.0123552911931815, 0.0), # 45 (5.925215601023019, 12.059280000000001, 9.239526521739132, 4.970002352941176, 2.8638140425531913, 0.0, 7.90022503748126, 11.455256170212765, 7.455003529411765, 6.159684347826087, 3.0148200000000003, 0.0), # 46 (5.934938722826087, 12.06895065340909, 9.218324266304347, 4.966928749999999, 2.859080824468085, 0.0, 7.842075318590705, 11.43632329787234, 7.450393124999999, 6.145549510869564, 3.0172376633522724, 0.0), # 47 (5.944461732736574, 12.07843159090909, 9.196123695652174, 4.9636958823529405, 2.854106808510638, 0.0, 7.7817066341829095, 11.416427234042551, 7.445543823529412, 6.130749130434782, 3.0196078977272727, 0.0), # 48 (5.953790672953963, 12.087721278409088, 9.17295758152174, 4.960306838235294, 2.8488972606382976, 0.0, 7.71923092203898, 11.39558904255319, 7.4404602573529415, 6.115305054347826, 3.021930319602272, 0.0), # 49 (5.96293158567775, 12.096818181818177, 9.148858695652175, 4.956764705882353, 2.8434574468085105, 0.0, 7.65476011994003, 11.373829787234042, 7.43514705882353, 6.099239130434783, 3.0242045454545443, 0.0), # 50 (5.971890513107417, 12.105720767045453, 9.123859809782608, 4.953072573529411, 2.837792632978723, 0.0, 7.588406165667167, 11.351170531914892, 7.429608860294118, 6.082573206521738, 3.026430191761363, 0.0), # 51 (5.980673497442456, 12.114427499999998, 9.097993695652173, 4.949233529411764, 2.8319080851063827, 0.0, 7.5202809970015, 11.32763234042553, 7.4238502941176465, 6.065329130434781, 3.0286068749999995, 0.0), # 52 (5.989286580882353, 12.122936846590909, 9.071293125, 4.945250661764706, 2.8258090691489364, 0.0, 7.450496551724138, 11.303236276595745, 7.417875992647058, 6.04752875, 3.030734211647727, 0.0), # 53 (5.9977358056266, 12.13124727272727, 9.043790869565216, 4.941127058823529, 2.8195008510638297, 0.0, 7.379164767616192, 11.278003404255319, 7.411690588235294, 6.0291939130434775, 3.0328118181818176, 0.0), # 54 (6.00602721387468, 12.139357244318182, 9.015519701086955, 4.93686580882353, 2.8129886968085103, 0.0, 7.306397582458771, 11.251954787234041, 7.405298713235295, 6.010346467391304, 3.0348393110795455, 0.0), # 55 (6.014166847826087, 12.147265227272724, 8.986512391304348, 4.9324699999999995, 2.8062778723404254, 0.0, 7.232306934032984, 11.225111489361701, 7.398705, 5.991008260869565, 3.036816306818181, 0.0), # 56 (6.022160749680308, 12.154969687500001, 8.95680171195652, 4.927942720588234, 2.7993736436170207, 0.0, 7.15700476011994, 11.197494574468083, 7.391914080882352, 5.9712011413043475, 3.0387424218750003, 0.0), # 57 (6.030014961636829, 12.16246909090909, 8.926420434782608, 4.923287058823529, 2.792281276595744, 0.0, 7.0806029985007495, 11.169125106382976, 7.384930588235295, 5.950946956521738, 3.0406172727272724, 0.0), # 58 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59 ) passenger_allighting_rate = ( (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 0 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 1 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 2 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 3 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 4 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 5 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 6 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 7 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 8 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 9 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 10 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 11 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 12 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 13 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 14 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 15 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 16 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 17 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 18 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 19 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 20 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 21 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 22 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 23 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 24 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 25 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 26 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 27 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 28 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 29 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 30 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 31 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 32 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 33 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 34 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 35 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 36 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 37 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 38 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 39 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 40 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 41 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 42 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 43 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 44 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 45 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 46 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 47 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 48 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 49 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 50 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 51 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 52 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 53 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 54 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 55 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 56 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 57 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 58 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 59 ) """ parameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html """ #initial entropy entropy = 258194110137029475889902652135037600173 #index for seed sequence child child_seed_index = ( 1, # 0 39, # 1 )
113.480597
213
0.730008
5,147
38,016
5.389742
0.235283
0.311452
0.246566
0.467179
0.328034
0.327097
0.327097
0.326448
0.326448
0.326448
0
0.819712
0.118739
38,016
334
214
113.820359
0.008328
0.031855
0
0.202532
0
0
0
0
0
0
0
0
0
1
0
false
0.015823
0
0
0
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
dce20baeb74c1c17594309fed973d896e98ac4fd
198
py
Python
tests/conftest.py
immerrr/fastapi-security
f67023377f34a5821a3e8b6579a64d82e5d62647
[ "MIT" ]
46
2020-02-12T01:31:31.000Z
2021-11-07T17:41:30.000Z
tests/conftest.py
immerrr/fastapi-security
f67023377f34a5821a3e8b6579a64d82e5d62647
[ "MIT" ]
6
2020-02-18T19:14:03.000Z
2021-08-31T08:06:02.000Z
tests/conftest.py
immerrr/fastapi-security
f67023377f34a5821a3e8b6579a64d82e5d62647
[ "MIT" ]
5
2020-02-15T23:07:19.000Z
2021-06-15T08:12:19.000Z
import pytest from fastapi import FastAPI from starlette.testclient import TestClient @pytest.fixture def app(): return FastAPI() @pytest.fixture def client(app): return TestClient(app)
14.142857
43
0.762626
25
198
6.04
0.44
0.172185
0.211921
0
0
0
0
0
0
0
0
0
0.161616
198
13
44
15.230769
0.909639
0
0
0.222222
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.333333
0.222222
0.777778
0
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
1
0
0
1
1
1
0
0
6
0d1dfc618bdf068eec75f2d5d1cebe69a2639169
99
py
Python
aws_mock/requests/modify_vpc_attribute.py
enaydanov/aws_mock
4ad3dca270ad164693e85741d5e92f845c34aa01
[ "Apache-2.0" ]
null
null
null
aws_mock/requests/modify_vpc_attribute.py
enaydanov/aws_mock
4ad3dca270ad164693e85741d5e92f845c34aa01
[ "Apache-2.0" ]
null
null
null
aws_mock/requests/modify_vpc_attribute.py
enaydanov/aws_mock
4ad3dca270ad164693e85741d5e92f845c34aa01
[ "Apache-2.0" ]
null
null
null
from aws_mock.lib import aws_response @aws_response def modify_vpc_attribute() -> None: pass
14.142857
37
0.767677
15
99
4.733333
0.8
0.309859
0
0
0
0
0
0
0
0
0
0
0.161616
99
6
38
16.5
0.855422
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
true
0.25
0.25
0
0.5
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
1
1
1
0
0
0
0
0
6
0d37c1d5f1ecb4a0990dfd3104f97884e865a33a
3,000
py
Python
tests/test_optimizers/test_random_state.py
0liu/Gradient-Free-Optimizers
d057bb5e2521cae3dd19737a57fe9412a166e380
[ "MIT" ]
860
2020-06-10T08:53:41.000Z
2022-03-30T14:22:20.000Z
tests/test_optimizers/test_random_state.py
0liu/Gradient-Free-Optimizers
d057bb5e2521cae3dd19737a57fe9412a166e380
[ "MIT" ]
24
2021-01-25T08:06:54.000Z
2022-01-24T13:46:48.000Z
tests/test_optimizers/test_random_state.py
0liu/Gradient-Free-Optimizers
d057bb5e2521cae3dd19737a57fe9412a166e380
[ "MIT" ]
52
2020-06-25T09:36:15.000Z
2022-03-18T18:11:52.000Z
import pytest import time import numpy as np import pandas as pd from ._parametrize import optimizers from surfaces.test_functions import AckleyFunction ackkley_function = AckleyFunction() def objective_function(para): score = -(para["x0"] * para["x0"] + para["x1"] * para["x1"]) return score search_space = { "x0": np.arange(-75, 100, 1), "x1": np.arange(-100, 75, 1), } err = 0.000001 n_iter = 10 n_random = 2 n_last = n_iter - n_random @pytest.mark.parametrize(*optimizers) def test_random_state_0(Optimizer): opt0 = Optimizer(search_space, initialize={"random": n_random}) opt0.search( ackkley_function, n_iter=n_iter, random_state=1, ) opt1 = Optimizer(search_space, initialize={"random": n_random}) opt1.search( ackkley_function, n_iter=n_iter, random_state=1, ) n_last_scores0 = list(opt0.results["score"].values)[-n_last:] n_last_scores1 = list(opt1.results["score"].values)[-n_last:] assert abs(np.sum(n_last_scores0) - np.sum(n_last_scores1)) < err @pytest.mark.parametrize(*optimizers) def test_random_state_1(Optimizer): opt0 = Optimizer(search_space, initialize={"random": n_random}) opt0.search( ackkley_function, n_iter=n_iter, random_state=10, ) opt1 = Optimizer(search_space, initialize={"random": n_random}) opt1.search( ackkley_function, n_iter=n_iter, random_state=10, ) n_last_scores0 = list(opt0.results["score"].values)[-n_last:] n_last_scores1 = list(opt1.results["score"].values)[-n_last:] assert abs(np.sum(n_last_scores0) - np.sum(n_last_scores1)) < err @pytest.mark.parametrize(*optimizers) def test_random_state_2(Optimizer): opt0 = Optimizer(search_space, initialize={"random": n_random}) opt0.search( ackkley_function, n_iter=n_iter, random_state=1, ) opt1 = Optimizer(search_space, initialize={"random": n_random}) opt1.search( ackkley_function, n_iter=n_iter, random_state=10, ) print("\n opt0.results \n", opt0.results) print("\n opt1.results \n", opt1.results) n_last_scores0 = list(opt0.results["score"].values)[-n_last:] n_last_scores1 = list(opt1.results["score"].values)[-n_last:] assert abs(np.sum(n_last_scores0) - np.sum(n_last_scores1)) > err @pytest.mark.parametrize(*optimizers) def test_no_random_state_0(Optimizer): opt0 = Optimizer(search_space, initialize={"random": n_random}) opt0.search(ackkley_function, n_iter=n_iter) opt1 = Optimizer(search_space, initialize={"random": n_random}) opt1.search(ackkley_function, n_iter=n_iter) print("\n opt0.results \n", opt0.results) print("\n opt1.results \n", opt1.results) n_last_scores0 = list(opt0.results["score"].values)[-n_last:] n_last_scores1 = list(opt1.results["score"].values)[-n_last:] assert abs(np.sum(n_last_scores0) - np.sum(n_last_scores1)) > err
25.862069
69
0.676333
416
3,000
4.615385
0.132212
0.065104
0.028125
0.125
0.838021
0.838021
0.838021
0.838021
0.818229
0.818229
0
0.036431
0.185667
3,000
115
70
26.086957
0.749488
0
0
0.634146
0
0
0.057333
0
0
0
0
0
0.04878
1
0.060976
false
0
0.073171
0
0.146341
0.04878
0
0
0
null
0
0
0
1
1
1
1
1
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
6
0d42f6f407fed73f39f8904143f0af697cedaeb9
148
py
Python
beta/test/Constant_test.py
Odusseus/python
98380cfab0f147fa0b3ac652006e11f482ebbcfc
[ "MIT" ]
null
null
null
beta/test/Constant_test.py
Odusseus/python
98380cfab0f147fa0b3ac652006e11f482ebbcfc
[ "MIT" ]
null
null
null
beta/test/Constant_test.py
Odusseus/python
98380cfab0f147fa0b3ac652006e11f482ebbcfc
[ "MIT" ]
null
null
null
import sys import Constant def test_Constant(): assert Constant.BLACK == 0 assert Constant.WHITE == 1 assert Constant.MAX_ELEMENT == 8
18.5
36
0.709459
20
148
5.15
0.65
0.407767
0
0
0
0
0
0
0
0
0
0.025641
0.209459
148
7
37
21.142857
0.854701
0
0
0
0
0
0
0
0
0
0
0
0.5
1
0.166667
true
0
0.333333
0
0.5
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
1
0
0
1
0
1
0
0
0
0
6
b4ba67eca8309774fed06d9292e0cfbf91d1fa11
26
py
Python
terrascript/oneandone/__init__.py
GarnerCorp/python-terrascript
ec6c2d9114dcd3cb955dd46069f8ba487e320a8c
[ "BSD-2-Clause" ]
null
null
null
terrascript/oneandone/__init__.py
GarnerCorp/python-terrascript
ec6c2d9114dcd3cb955dd46069f8ba487e320a8c
[ "BSD-2-Clause" ]
null
null
null
terrascript/oneandone/__init__.py
GarnerCorp/python-terrascript
ec6c2d9114dcd3cb955dd46069f8ba487e320a8c
[ "BSD-2-Clause" ]
1
2018-11-15T16:23:05.000Z
2018-11-15T16:23:05.000Z
"""2019-05-28 10:50:07"""
13
25
0.538462
6
26
2.333333
1
0
0
0
0
0
0
0
0
0
0
0.583333
0.076923
26
1
26
26
0
0.730769
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
6
b4d9970ce36e8cb6231d8f23acc267d88c4dbfd1
163
py
Python
contribauthproxy/admin.py
parksandwildlife/fdwfunhouse
f08d73e4cdd1cdc9e2df194f1da24f32d15c9cda
[ "Apache-2.0" ]
null
null
null
contribauthproxy/admin.py
parksandwildlife/fdwfunhouse
f08d73e4cdd1cdc9e2df194f1da24f32d15c9cda
[ "Apache-2.0" ]
null
null
null
contribauthproxy/admin.py
parksandwildlife/fdwfunhouse
f08d73e4cdd1cdc9e2df194f1da24f32d15c9cda
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from .models import ForeignAuthUser, UserComment # Register your models here. admin.site.register([ForeignAuthUser, UserComment])
32.6
51
0.828221
19
163
7.105263
0.631579
0.385185
0
0
0
0
0
0
0
0
0
0
0.09816
163
5
51
32.6
0.918367
0.159509
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
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
1
0
1
0
1
0
0
6
2ec62b997f2dabc26d4589555ca51d04deda1a59
1,675
py
Python
returns/pointfree.py
kenjihiraoka/returns
4589973520d7226b18acd7295d1a9a10ff032759
[ "BSD-2-Clause" ]
null
null
null
returns/pointfree.py
kenjihiraoka/returns
4589973520d7226b18acd7295d1a9a10ff032759
[ "BSD-2-Clause" ]
null
null
null
returns/pointfree.py
kenjihiraoka/returns
4589973520d7226b18acd7295d1a9a10ff032759
[ "BSD-2-Clause" ]
null
null
null
from returns._generated.pointfree.alt import _alt as alt from returns._generated.pointfree.apply import _apply as apply from returns._generated.pointfree.bind import _bind as bind from returns._generated.pointfree.bind_async import _bind_async as bind_async from returns._generated.pointfree.bind_async_future import ( _bind_async_future as bind_async_future, ) from returns._generated.pointfree.bind_async_future_result import ( _bind_async_future_result as bind_async_future_result, ) from returns._generated.pointfree.bind_awaitable import ( _bind_awaitable as bind_awaitable, ) from returns._generated.pointfree.bind_context import ( _bind_context as bind_context, ) from returns._generated.pointfree.bind_context_ioresult import ( _bind_context_ioresult as bind_context_ioresult, ) from returns._generated.pointfree.bind_context_result import ( _bind_context_result as bind_context_result, ) from returns._generated.pointfree.bind_future import _bind_future as bind_future from returns._generated.pointfree.bind_future_result import ( _bind_future_result as bind_future_result, ) from returns._generated.pointfree.bind_io import _bind_io as bind_io from returns._generated.pointfree.bind_ioresult import ( _bind_ioresult as bind_ioresult, ) from returns._generated.pointfree.bind_result import _bind_result as bind_result from returns._generated.pointfree.fix import _fix as fix from returns._generated.pointfree.map import _map as map_ from returns._generated.pointfree.rescue import _rescue as rescue from returns._generated.pointfree.unify import _unify as unify from returns._generated.pointfree.value_or import _value_or as value_or
45.27027
80
0.849552
237
1,675
5.590717
0.092827
0.166038
0.301887
0.437736
0.439245
0.363019
0.13434
0
0
0
0
0
0.100299
1,675
36
81
46.527778
0.87923
0
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
0.555556
0
0.555556
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
1
0
1
0
1
0
0
6
2ec9a99ac635d763ac5f9cd3f2f34adc8b47aa1f
10,835
py
Python
test/jsonrpc/test_api.py
thomas-neuman/nkn-client-python
a64dd17fde55442c4904fe00a2448b9aeb734cf6
[ "Apache-2.0" ]
null
null
null
test/jsonrpc/test_api.py
thomas-neuman/nkn-client-python
a64dd17fde55442c4904fe00a2448b9aeb734cf6
[ "Apache-2.0" ]
null
null
null
test/jsonrpc/test_api.py
thomas-neuman/nkn-client-python
a64dd17fde55442c4904fe00a2448b9aeb734cf6
[ "Apache-2.0" ]
null
null
null
import functools import json import responses import unittest import nkn_client.jsonrpc.api class TestNknJsonRpcApi(unittest.TestCase): def setUp(self): self._host = "hostname" self._api = nkn_client.jsonrpc.api.NknJsonRpcApi(self._host) @responses.activate def _with_rpc_response(self, method, resp_cb): responses.add_callback( responses.POST, "http://%s/" % (self._host), callback=resp_cb ) return method() def _with_success_response(self, method, expected_result): expected_json = { "jsonpc": "2.0", "result": expected_result, "id": 1 } expected_status = 200 def resp_callback(request): req_body = json.loads(request.body) resp_body = expected_json.copy() resp_body.update({"id": req_body["id"]}) return (expected_status, {}, json.dumps(resp_body)) return self._with_rpc_response(method, resp_callback) def _with_wrong_id_response(self, method, expected_result): expected_json = { "jsonpc": "2.0", "result": expected_result, "id": 1 } expected_status = 200 def resp_callback(request): req_body = json.loads(request.body) resp_body = expected_json.copy() resp_id = "BAD:%s" % (req_body["id"]) resp_body.update({"id": resp_id}) return (expected_status, {}, json.dumps(resp_body)) return self._with_rpc_response(method, resp_callback) def _with_wrong_result_response(self, method, unexpected_result): pass def test_get_latest_block_height_succeeds(self): method = self._api.get_latest_block_height expected = 5 actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_latest_block_height_fails_with_wrong_id(self): method = self._api.get_latest_block_height expected = 5 with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_latest_block_hash_succeeds(self): method = self._api.get_latest_block_hash expected = "6cf00422b02f3d99f5c006fcdb36bfb7cc8b2c345b2f34274e50a3d8f3bb8193" actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_latest_block_hash_fails_with_wrong_id(self): method = self._api.get_latest_block_hash expected = "6cf00422b02f3d99f5c006fcdb36bfb7cc8b2c345b2f34274e50a3d8f3bb8193" with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_block_count_succeeds(self): method = self._api.get_block_count expected = 270 actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_block_count_fails_with_wrong_id(self): method = self._api.get_block_count expected = 270 with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_block_with_height_param_fails_with_wrong_id(self): method = functools.partial(self._api.get_block, height=1) expected = { "hash": "5f85d1286801c2f1129a02b0b19a3312f8113aaa073b5987346c59e27a12bdc6" } with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_block_with_height_param_succeeds(self): method = functools.partial(self._api.get_block, height=1) expected = { "hash": "5f85d1286801c2f1129a02b0b19a3312f8113aaa073b5987346c59e27a12bdc6" } actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_block_with_hash_param_fails_with_wrong_id(self): method = functools.partial( self._api.get_block, hash="5f85d1286801c2f1129a02b0b19a3312f8113aaa073b5987346c59e27a12bdc6" ) expected = { "hash": "5f85d1286801c2f1129a02b0b19a3312f8113aaa073b5987346c59e27a12bdc6" } with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_block_with_hash_param_succeeds(self): method = functools.partial( self._api.get_block, hash="5f85d1286801c2f1129a02b0b19a3312f8113aaa073b5987346c59e27a12bdc6" ) expected = { "hash": "5f85d1286801c2f1129a02b0b19a3312f8113aaa073b5987346c59e27a12bdc6" } actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_block_transactions_by_height_fails_with_wrong_id(self): method = functools.partial( self._api.get_block_transactions_by_height, 1 ) expected = { "Hash": "5f85d1286801c2f1129a02b0b19a3312f8113aaa073b5987346c59e27a12bdc6", "Height": 1, "Transactions": [ "327bb43c2e40ccb2f83011d35602829872ab190171b79047397d000eddda18a9" ] } with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_block_transactions_by_height_succeeds(self): method = functools.partial( self._api.get_block_transactions_by_height, 1 ) expected = { "Hash": "5f85d1286801c2f1129a02b0b19a3312f8113aaa073b5987346c59e27a12bdc6", "Height": 1, "Transactions": [ "327bb43c2e40ccb2f83011d35602829872ab190171b79047397d000eddda18a9" ] } actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_connection_count_fails_with_wrong_id(self): method = self._api.get_connection_count expected = 8 with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_connection_count_succeeds(self): method = self._api.get_connection_count expected = 8 actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_raw_mempool_fails_with_wrong_id(self): method = self._api.get_raw_mempool expected = [] with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_raw_mempool_succeeds(self): method = self._api.get_raw_mempool expected = [] actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_transaction_fails_with_wrong_id(self): method = functools.partial( self._api.get_transaction, "327bb43c2e40ccb2f83011d35602829872ab190171b79047397d000eddda18a9" ) expected = { "hash": "327bb43c2e40ccb2f83011d35602829872ab190171b79047397d000eddda18a9" } with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_transaction_succeeds(self): method = functools.partial( self._api.get_transaction, "327bb43c2e40ccb2f83011d35602829872ab190171b79047397d000eddda18a9" ) expected = { "hash": "327bb43c2e40ccb2f83011d35602829872ab190171b79047397d000eddda18a9" } actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_websocket_address_fails_with_wrong_id(self): method = functools.partial( self._api.get_websocket_address, "identifier.pubkey" ) expected = "127.0.0.1:30002" with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_websocket_address_succeeds(self): method = functools.partial( self._api.get_websocket_address, "identifier.pubkey" ) expected = "127.0.0.1:30002" actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_version_fails_with_wrong_id(self): method = self._api.get_version expected = "v0.1-alpha-26-gf7b7" with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_version_succeeds(self): method = self._api.get_version expected = "v0.1-alpha-26-gf7b7" actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_neighbor_fails_with_wrong_id(self): method = self._api.get_neighbor expected = [ {"IpAddr":[0,0,0,0,0,0,0,0,0,0,255,255,127,0,0,1],"Port":30013,"ID":8408941800585506307}, {"IpAddr":[0,0,0,0,0,0,0,0,0,0,255,255,127,0,0,1],"Port":30005,"ID":2956232338651871234}, {"IpAddr":[0,0,0,0,0,0,0,0,0,0,255,255,127,0,0,1],"Port":30009,"ID":9027538565785539587} ] with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_neighbor_succeeds(self): method = self._api.get_neighbor expected = [ {"IpAddr":[0,0,0,0,0,0,0,0,0,0,255,255,127,0,0,1],"Port":30013,"ID":8408941800585506307}, {"IpAddr":[0,0,0,0,0,0,0,0,0,0,255,255,127,0,0,1],"Port":30005,"ID":2956232338651871234}, {"IpAddr":[0,0,0,0,0,0,0,0,0,0,255,255,127,0,0,1],"Port":30009,"ID":9027538565785539587} ] actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_node_state_fails_with_wrong_id(self): method = self._api.get_node_state expected = { "State": 0, "Port": 30001, "ID": 4697163132361310211, "Time": 1530087472382892000, "Version": 0, "Services": 0, "Relay": True, "Height": 0, "TxnCnt": 0, "RxTxnCnt": 0, "ChordID": "04629f17a6a0ec9a573ecfccb60fa42b104212dd1ec9cdb131993cbb4e15fe5e" } with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_node_state_succeeds(self): method = self._api.get_node_state expected = { "State": 0, "Port": 30001, "ID": 4697163132361310211, "Time": 1530087472382892000, "Version": 0, "Services": 0, "Relay": True, "Height": 0, "TxnCnt": 0, "RxTxnCnt": 0, "ChordID": "04629f17a6a0ec9a573ecfccb60fa42b104212dd1ec9cdb131993cbb4e15fe5e" } actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) def test_get_chord_ring_info_fails_with_wrong_id(self): method = self._api.get_chord_ring_info expected = { "Vnodes": [ { "Id": "BGKfF6ag7JpXPs/Mtg+kKxBCEt0eyc2xMZk8u04V/l4=", "Host": "127.0.0.1:30000", "NodePort": 30001, "HttpWsPort": 30002 } ] } with self.assertRaises(RuntimeError): _ = self._with_wrong_id_response(method, expected) def test_get_chord_ring_info_succeeds(self): method = self._api.get_chord_ring_info expected = { "Vnodes": [ { "Id": "BGKfF6ag7JpXPs/Mtg+kKxBCEt0eyc2xMZk8u04V/l4=", "Host": "127.0.0.1:30000", "NodePort": 30001, "HttpWsPort": 30002 } ] } actual = self._with_success_response(method, expected) self.assertEqual(actual, expected) if __name__ == "__main__": unittest.main()
30.181058
92
0.716105
1,238
10,835
5.921648
0.102585
0.01746
0.019643
0.022916
0.93848
0.931387
0.909971
0.899468
0.880371
0.847906
0
0.142377
0.176742
10,835
358
93
30.265363
0.679484
0
0
0.692308
0
0
0.163359
0.114444
0
0
0
0
0.097902
1
0.122378
false
0.003497
0.017483
0
0.160839
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
2eea938777461449dec408a567d3facef9077d5e
17,736
py
Python
ikasl/util/cluster_viewer.py
odigous-labs/self-learning-algorithm
83fd7e3cbd0daab77ea94fc4bc21b28e2c510d19
[ "Apache-2.0" ]
6
2019-06-29T14:33:46.000Z
2021-08-06T11:41:57.000Z
ikasl/util/cluster_viewer.py
odigous-labs/self-learning-algorithm
83fd7e3cbd0daab77ea94fc4bc21b28e2c510d19
[ "Apache-2.0" ]
null
null
null
ikasl/util/cluster_viewer.py
odigous-labs/self-learning-algorithm
83fd7e3cbd0daab77ea94fc4bc21b28e2c510d19
[ "Apache-2.0" ]
5
2019-08-26T08:48:08.000Z
2020-07-16T08:41:22.000Z
import numpy as np from PIL import Image import matplotlib.pyplot as plt import random class Viewer: def __init__(self, image_files_root_folder, width, height, frame_sequence): self.image_files_root_folder = image_files_root_folder self.blank_image_filename = '../resources/blank.jpg'.replace('\\', '/') self.single_image_width = width self.single_image_height = height self.frame_sequence = frame_sequence def view(self, raw_clusters): child_clusters = {} for key, cluster in raw_clusters.items(): child_clusters[key] = Viewer.get_index_array(cluster) child_frame_id = Viewer.select_frame_id(self.frame_sequence) child_cluster_image_files = {} for key, child_cluster in child_clusters.items(): child_cluster_image_files[key] = self._get_image_file_names(child_cluster, child_frame_id) counter = 1 for key, image_file in child_cluster_image_files.items(): if len(image_file) > 0: img_cluster = self._get_image_cluster(image_file) Viewer.display_image_clusters(img_cluster, key, counter) counter += 1 plt.show() def save(self, raw_clusters, root_folder): child_clusters = {} for key, cluster in raw_clusters.items(): child_clusters[key] = Viewer.get_index_array(cluster) child_frame_id = Viewer.select_frame_id(self.frame_sequence) child_cluster_image_files = {} for key, child_cluster in child_clusters.items(): child_cluster_image_files[key] = self._get_image_file_names(child_cluster, child_frame_id) counter = 1 for key, image_file in child_cluster_image_files.items(): if len(image_file) > 0: img_cluster = self._get_image_cluster(image_file) Viewer.save_image_clusters(img_cluster, key, root_folder) counter += 1 plt.show() def _get_image_file_names(self, cluster, frame_id): cluster_image_files = [] for image_id in cluster: folder_name = Viewer.get_folder_name(image_id) cluster_image_files.append(self.image_files_root_folder + folder_name + frame_id) return cluster_image_files # Compose Image files def _get_image_set(self, image_list): overflow = len(image_list) % 6 if overflow != 0: for _ in range(0, (6 - overflow)): image_list.append(self.blank_image_filename) imgs = [Image.open(i) for i in image_list] # pick the image which is the smallest, and resize the others to match it (can be arbitrary image shape here) # min_shape = sorted([(np.sum(i.size), i.size) for i in imgs])[0][1] min_shape = (self.single_image_width, self.single_image_height) imgs_comb = np.hstack((np.asarray(i.resize(min_shape)) for i in imgs)) return imgs_comb def _get_image_cluster(self, list_im): if len(list_im) < 7: imgs_comb = self._get_image_set(list_im) elif len(list_im) < 13: list_im_1 = list_im[0:6] list_im_2 = list_im[6:] imgs_comb_1 = self._get_image_set(list_im_1) imgs_comb_2 = self._get_image_set(list_im_2) imgs_comb = np.vstack((imgs_comb_1, imgs_comb_2)) elif len(list_im) < 19: list_im_1 = list_im[0:6] list_im_2 = list_im[6:12] list_im_3 = list_im[12:] imgs_comb_1 = self._get_image_set(list_im_1) imgs_comb_2 = self._get_image_set(list_im_2) imgs_comb_3 = self._get_image_set(list_im_3) imgs_comb = np.vstack((np.vstack((imgs_comb_1, imgs_comb_2)), imgs_comb_3)) elif len(list_im) < 25: list_im_1 = list_im[0:6] list_im_2 = list_im[6:12] list_im_3 = list_im[12:18] list_im_4 = list_im[18:] imgs_comb_1 = self._get_image_set(list_im_1) imgs_comb_2 = self._get_image_set(list_im_2) imgs_comb_3 = self._get_image_set(list_im_3) imgs_comb_4 = self._get_image_set(list_im_4) imgs_comb = np.vstack((np.vstack((imgs_comb_1, imgs_comb_2)), np.vstack((imgs_comb_3, imgs_comb_4)))) elif len(list_im) < 31: list_im_1 = list_im[0:6] list_im_2 = list_im[6:12] list_im_3 = list_im[12:18] list_im_4 = list_im[18:24] list_im_5 = list_im[24:] imgs_comb_1 = self._get_image_set(list_im_1) imgs_comb_2 = self._get_image_set(list_im_2) imgs_comb_3 = self._get_image_set(list_im_3) imgs_comb_4 = self._get_image_set(list_im_4) imgs_comb_5 = self._get_image_set(list_im_5) imgs_comb = np.vstack((np.vstack((imgs_comb_1, imgs_comb_2)), np.vstack((imgs_comb_3, np.vstack((imgs_comb_4, imgs_comb_5)))))) elif len(list_im) < 37: list_im_1 = list_im[0:6] list_im_2 = list_im[6:12] list_im_3 = list_im[12:18] list_im_4 = list_im[18:24] list_im_5 = list_im[24:30] list_im_6 = list_im[30:] imgs_comb_1 = self._get_image_set(list_im_1) imgs_comb_2 = self._get_image_set(list_im_2) imgs_comb_3 = self._get_image_set(list_im_3) imgs_comb_4 = self._get_image_set(list_im_4) imgs_comb_5 = self._get_image_set(list_im_5) imgs_comb_6 = self._get_image_set(list_im_6) imgs_comb = np.vstack((np.vstack((imgs_comb_1, imgs_comb_2)), np.vstack((np.vstack((imgs_comb_3, imgs_comb_4)), np.vstack((imgs_comb_5, imgs_comb_6)))))) else: list_im_1 = list_im[0:6] list_im_2 = list_im[6:12] list_im_3 = list_im[12:18] list_im_4 = list_im[18:24] list_im_5 = list_im[24:30] list_im_6 = list_im[30:36] imgs_comb_1 = self._get_image_set(list_im_1) imgs_comb_2 = self._get_image_set(list_im_2) imgs_comb_3 = self._get_image_set(list_im_3) imgs_comb_4 = self._get_image_set(list_im_4) imgs_comb_5 = self._get_image_set(list_im_5) imgs_comb_6 = self._get_image_set(list_im_6) imgs_comb = np.vstack((np.vstack((imgs_comb_1, imgs_comb_2)), np.vstack((np.vstack((imgs_comb_3, imgs_comb_4)), np.vstack((imgs_comb_5, imgs_comb_6)))))) return Image.fromarray(imgs_comb) @staticmethod def get_index_array(my_list): if len(my_list) == 0: return [] return [x for x in map(int, my_list.strip().split(' '))] # Compose the frame number to be displayed @staticmethod def select_frame_id(sequence_id): frame_number = sequence_id * 5 if frame_number < 10: frame_number = 'frame000' + str(frame_number) + '.jpg' elif frame_number < 100: frame_number = 'frame00' + str(frame_number) + '.jpg' else: frame_number = 'frame0' + str(frame_number) + '.jpg' return frame_number # Compose image files for parent and chile clusters @staticmethod def get_folder_name(video_id): if video_id < 10: return 'seq0' + str(video_id) + '/' else: return 'seq' + str(video_id) + '/' @staticmethod def save_image_clusters(img_clstr, filename, root_folder): img_clstr.save(root_folder + '/' + filename + '.jpg') # # for a vertical stacking it is simple: use vstack # imgs_comb = np.vstack((np.asarray(i.resize(min_shape)) for i in imgs)) # imgs_comb = Image.fromarray(imgs_comb) # imgs_comb.save(filename+'.jpg') @staticmethod def display_image_clusters(img_clstr, filename, plt_id): plt.figure(plt_id) plt.title(filename) plt.xticks([]) plt.yticks([]) plt.imshow(img_clstr) class SceneViewer: def __init__(self, image_files_root_folder, width, height): self.image_files_root_folder = image_files_root_folder self.blank_image_filename = 'E:/Projects/unsupervised/self_organizing/som_py/ikasl/ikasl_v2/resources/blank.jpg'.replace('\\', '/') self.single_image_width = width self.single_image_height = height self.display_image_length = 12 def view(self, raw_clusters): child_clusters = {} for key, cluster in raw_clusters.items(): child_clusters[key] = SceneViewer.get_index_array(cluster) child_cluster_image_files = {} for key, child_cluster in child_clusters.items(): child_cluster_image_files[key] = self._get_image_file_names(child_cluster) counter = 1 for key, image_file in child_cluster_image_files.items(): if len(image_file) > 0: img_cluster = self._get_image_cluster(image_file) SceneViewer.display_image_clusters(img_cluster, key, counter) counter += 1 plt.show() def _get_image_file_names(self, cluster): cluster_image_files = [] for image_id in cluster: filename = SceneViewer.select_frame_id(image_id) cluster_image_files.append(self.image_files_root_folder + filename) return cluster_image_files # Compose Image files def _get_image_set(self, image_list): overflow = len(image_list) % self.display_image_length if overflow != 0: for _ in range(0, (self.display_image_length - overflow)): image_list.append(self.blank_image_filename) imgs = [Image.open(i) for i in image_list] # pick the image which is the smallest, and resize the others to match it (can be arbitrary image shape here) # min_shape = sorted([(np.sum(i.size), i.size) for i in imgs])[0][1] min_shape = (self.single_image_width, self.single_image_height) imgs_comb = np.hstack((np.asarray(i.resize(min_shape)) for i in imgs)) return imgs_comb def _get_image_cluster(self, list_im): root_size = self.display_image_length if len(list_im) <= root_size: imgs_comb = self._get_image_set(list_im) elif len(list_im) <= root_size*2: list_im_1 = list_im[0:root_size] list_im_2 = list_im[root_size:] imgs_comb_1 = self._get_image_set(list_im_1) imgs_comb_2 = self._get_image_set(list_im_2) imgs_comb = np.vstack((imgs_comb_1, imgs_comb_2)) elif len(list_im) <= root_size*3: list_im_1 = list_im[0:root_size] list_im_2 = list_im[root_size:root_size*2] list_im_3 = list_im[root_size*2:] imgs_comb_1 = self._get_image_set(list_im_1) imgs_comb_2 = self._get_image_set(list_im_2) imgs_comb_3 = self._get_image_set(list_im_3) imgs_comb = np.vstack((np.vstack((imgs_comb_1, imgs_comb_2)), imgs_comb_3)) elif len(list_im) <= root_size*4: list_im_1 = list_im[0:root_size] list_im_2 = list_im[root_size:root_size*2] list_im_3 = list_im[root_size*2:root_size*3] list_im_4 = list_im[root_size*3:] imgs_comb_1 = self._get_image_set(list_im_1) imgs_comb_2 = self._get_image_set(list_im_2) imgs_comb_3 = self._get_image_set(list_im_3) imgs_comb_4 = self._get_image_set(list_im_4) imgs_comb = np.vstack((np.vstack((imgs_comb_1, imgs_comb_2)), np.vstack((imgs_comb_3, imgs_comb_4)))) elif len(list_im) <= root_size*5: list_im_1 = list_im[0:root_size] list_im_2 = list_im[root_size:root_size*2] list_im_3 = list_im[root_size*2:root_size*3] list_im_4 = list_im[root_size*3:root_size*4] list_im_5 = list_im[root_size*4:] imgs_comb_1 = self._get_image_set(list_im_1) imgs_comb_2 = self._get_image_set(list_im_2) imgs_comb_3 = self._get_image_set(list_im_3) imgs_comb_4 = self._get_image_set(list_im_4) imgs_comb_5 = self._get_image_set(list_im_5) imgs_comb = np.vstack((np.vstack((imgs_comb_1, imgs_comb_2)), np.vstack((imgs_comb_3, np.vstack((imgs_comb_4, imgs_comb_5)))))) elif len(list_im) <= root_size*6: list_im_1 = list_im[0:root_size] list_im_2 = list_im[root_size:root_size*2] list_im_3 = list_im[root_size*2:root_size*3] list_im_4 = list_im[root_size*3:root_size*4] list_im_5 = list_im[root_size*4:root_size*5] list_im_6 = list_im[root_size*5:] imgs_comb_1 = self._get_image_set(list_im_1) imgs_comb_2 = self._get_image_set(list_im_2) imgs_comb_3 = self._get_image_set(list_im_3) imgs_comb_4 = self._get_image_set(list_im_4) imgs_comb_5 = self._get_image_set(list_im_5) imgs_comb_6 = self._get_image_set(list_im_6) imgs_comb = np.vstack((np.vstack((imgs_comb_1, imgs_comb_2)), np.vstack((np.vstack((imgs_comb_3, imgs_comb_4)), np.vstack((imgs_comb_5, imgs_comb_6)))))) else: total_imgs = len(list_im) width_imgs = 6 list_im_1 = [] list_im_2 = [] list_im_3 = [] list_im_4 = [] list_im_5 = [] list_im_6 = [] for i in random.sample(range(0, int(total_imgs/width_imgs)), width_imgs): list_im_1.append(list_im[i]) for i in random.sample(range(int(total_imgs/width_imgs), int(total_imgs/width_imgs)*2), width_imgs): list_im_2.append(list_im[i]) for i in random.sample(range(int(total_imgs/width_imgs)*2, int(total_imgs/width_imgs)*3), width_imgs): list_im_3.append(list_im[i]) for i in random.sample(range(int(total_imgs/width_imgs)*3, int(total_imgs/width_imgs)*4), width_imgs): list_im_4.append(list_im[i]) for i in random.sample(range(int(total_imgs/width_imgs)*4, int(total_imgs/width_imgs)*5), width_imgs): list_im_5.append(list_im[i]) for i in random.sample(range(int(total_imgs/width_imgs)*5, int(total_imgs/width_imgs)*6), width_imgs): list_im_6.append(list_im[i]) imgs_comb_1 = self._get_image_set(list_im_1) imgs_comb_2 = self._get_image_set(list_im_2) imgs_comb_3 = self._get_image_set(list_im_3) imgs_comb_4 = self._get_image_set(list_im_4) imgs_comb_5 = self._get_image_set(list_im_5) imgs_comb_6 = self._get_image_set(list_im_6) imgs_comb = np.vstack((np.vstack((imgs_comb_1, imgs_comb_2)), np.vstack((np.vstack((imgs_comb_3, imgs_comb_4)), np.vstack((imgs_comb_5, imgs_comb_6)))))) return Image.fromarray(imgs_comb) @staticmethod def get_index_array(my_list): if len(my_list) == 0: return [] return [x for x in map(int, my_list.strip().split(' '))] # Compose the frame number to be displayed @staticmethod def select_frame_id(sequence_id): if sequence_id == 0: return 'frame00000.jpg' else: sequence_id *= 5 if sequence_id < 10: frame_number = 'frame0000' + str(sequence_id) + '.jpg' elif sequence_id < 100: frame_number = 'frame000' + str(sequence_id) + '.jpg' elif sequence_id < 1000: frame_number = 'frame00' + str(sequence_id) + '.jpg' elif sequence_id < 10000: frame_number = 'frame0' + str(sequence_id) + '.jpg' else: frame_number = 'frame' + str(sequence_id) + '.jpg' return frame_number @staticmethod def save_image_clusters(img_clstr, filename, root_folder): img_clstr.save(root_folder + '/' + filename + '.jpg') # # for a vertical stacking it is simple: use vstack # imgs_comb = np.vstack((np.asarray(i.resize(min_shape)) for i in imgs)) # imgs_comb = Image.fromarray(imgs_comb) # imgs_comb.save(filename+'.jpg') @staticmethod def display_image_clusters(img_clstr, filename, plt_id): plt.figure(plt_id) plt.title(filename) plt.xticks([]) plt.yticks([]) plt.imshow(img_clstr) if __name__ == "__main__": image_files_root_folder = 'E:\Projects\scene_analyzer\\raw_data\\frames/'.replace('\\', '/') single_image_width = 480 single_image_height = 360 parent_sequence = 1 viewer = SceneViewer(image_files_root_folder, single_image_width, single_image_height) child_clusters_raw = { "Pathway-1": "13 23 24 25 26 27 30 33 35 36 38 39 42 49 52 53 54 55 56 57 58 59 60 61 62 63 64 66 67 68 69 72 73 74 76 79 80 87 90 91 110 112 113 130 132 133 134 135 138 139 140 141 142 161", "Pathway-2": "17 18 19 20 22 41 46 47 65 70 71 75 128 146 147 148 149 150 151 152 153 154 155 156 157 158 159 162 165 167 169 172 174", "Pathway-3": "77 78 81 82 83 85 86 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 111 114 115 166 176", "Pathway-4": "21 28 29 31 32 34 37 40 43 44 45 48 50 51 84 88 89 125 126 127 129 131 136 137 143 144 145 160 163 164 168", "Pathway-5": "1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 116 117 118 119 171 178 184 192", "Pathway-6": "120 121 122 123 124 170 173 175 177 179 180 181 182 183 185 186 187 188 189 190 191", "Pathway-7": "", "Pathway-8": "", "Pathway-9": "", "Pathway-10": "" } viewer.view(child_clusters_raw)
39.066079
199
0.628157
2,741
17,736
3.662897
0.122948
0.106972
0.071713
0.080677
0.812948
0.795817
0.774701
0.761355
0.754183
0.745817
0
0.069564
0.272158
17,736
453
200
39.152318
0.708188
0.051026
0
0.649231
0
0.018462
0.061507
0.008863
0
0
0
0
0
1
0.061538
false
0
0.012308
0
0.126154
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
25a7354472da0203b667fda69378ed2c03101ab8
91
py
Python
postblog/cli.py
machineandme/postblog
5d9b547916eece4eb03438d709cdbb3c55562376
[ "MIT" ]
1
2019-12-29T00:12:22.000Z
2019-12-29T00:12:22.000Z
postblog/cli.py
machineandme/postblog
5d9b547916eece4eb03438d709cdbb3c55562376
[ "MIT" ]
null
null
null
postblog/cli.py
machineandme/postblog
5d9b547916eece4eb03438d709cdbb3c55562376
[ "MIT" ]
null
null
null
from .interface import Interface from fire import Fire def main(): Fire(Interface())
13
32
0.725275
12
91
5.5
0.5
0
0
0
0
0
0
0
0
0
0
0
0.186813
91
6
33
15.166667
0.891892
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
true
0
0.5
0
0.75
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
1
0
1
0
1
0
0
6
25fb96401e89cc827fe926947928dd959ec34e48
45
py
Python
execquine.py
hanss314/random-stuff
606c0393292e1ff08c99cdace16fecdcd7a2203b
[ "MIT" ]
null
null
null
execquine.py
hanss314/random-stuff
606c0393292e1ff08c99cdace16fecdcd7a2203b
[ "MIT" ]
null
null
null
execquine.py
hanss314/random-stuff
606c0393292e1ff08c99cdace16fecdcd7a2203b
[ "MIT" ]
null
null
null
x="print('x='+repr(x)+'\\nexec(x)')" exec(x)
15
36
0.511111
9
45
2.555556
0.555556
0
0
0
0
0
0
0
0
0
0
0
0.044444
45
2
37
22.5
0.534884
0
0
0
0
0
0.711111
0.711111
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
1
0
6
25fce85b7730944fa39d7dcadd13c6b978a7b947
194
py
Python
Server/Python/src/dbs/dao/MySQL/DatasetRun/Insert.py
vkuznet/DBS
14df8bbe8ee8f874fe423399b18afef911fe78c7
[ "Apache-2.0" ]
8
2015-08-14T04:01:32.000Z
2021-06-03T00:56:42.000Z
Server/Python/src/dbs/dao/MySQL/DatasetRun/Insert.py
yuyiguo/DBS
14df8bbe8ee8f874fe423399b18afef911fe78c7
[ "Apache-2.0" ]
162
2015-01-07T21:34:47.000Z
2021-10-13T09:42:41.000Z
Server/Python/src/dbs/dao/MySQL/DatasetRun/Insert.py
yuyiguo/DBS
14df8bbe8ee8f874fe423399b18afef911fe78c7
[ "Apache-2.0" ]
16
2015-01-22T15:27:29.000Z
2021-04-28T09:23:28.000Z
#!/usr/bin/env python """ DAO Object for DatasetRuns table """ from dbs.dao.Oracle.DatasetRun.Insert import Insert as OraDatasetRunInsert class Insert(OraDatasetRunInsert): pass
21.555556
74
0.731959
23
194
6.173913
0.826087
0
0
0
0
0
0
0
0
0
0
0
0.175258
194
8
75
24.25
0.8875
0.278351
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
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
1
1
0
1
0
0
6
d36789f1c768d32f4cff3cc88138509367858e5a
42
py
Python
clygon/__init__.py
KrishayR/clygon
f6a2b1cfe9a423820392668bc05623deb0ab1ab7
[ "MIT" ]
1
2022-03-17T21:57:12.000Z
2022-03-17T21:57:12.000Z
clygon/__init__.py
KrishayR/clygon
f6a2b1cfe9a423820392668bc05623deb0ab1ab7
[ "MIT" ]
null
null
null
clygon/__init__.py
KrishayR/clygon
f6a2b1cfe9a423820392668bc05623deb0ab1ab7
[ "MIT" ]
null
null
null
from clygon.shapes import Polygon, Circle
21
41
0.833333
6
42
5.833333
1
0
0
0
0
0
0
0
0
0
0
0
0.119048
42
1
42
42
0.945946
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
d372470d9e8a5bc36ece703efe5e0f650f7746d8
121
py
Python
Logic/Logging/LoggerInterface.py
TahaNKhan/DeviceDetector
46402510c40944a68d7e1b8ebcb7962da7609dbd
[ "MIT" ]
null
null
null
Logic/Logging/LoggerInterface.py
TahaNKhan/DeviceDetector
46402510c40944a68d7e1b8ebcb7962da7609dbd
[ "MIT" ]
null
null
null
Logic/Logging/LoggerInterface.py
TahaNKhan/DeviceDetector
46402510c40944a68d7e1b8ebcb7962da7609dbd
[ "MIT" ]
null
null
null
class LoggerInterface: def log(self, to_log: str) -> None: pass def publish(self) -> None: pass
17.285714
39
0.570248
15
121
4.533333
0.666667
0.235294
0
0
0
0
0
0
0
0
0
0
0.322314
121
6
40
20.166667
0.829268
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0.4
false
0.4
0
0
0.6
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
1
0
1
0
0
1
0
0
6
d3969d8f20a941ec07dcffe96b016615c3748abf
286
py
Python
slam_recognition/util/attractor/__init__.py
SimLeek/pySILEnT
feec2d1fb654d7c8dc25f610916f4e9b202a1092
[ "Apache-2.0", "MIT" ]
5
2018-11-18T17:35:59.000Z
2019-02-13T20:25:58.000Z
slam_recognition/util/attractor/__init__.py
SimLeek/slam_recognition
feec2d1fb654d7c8dc25f610916f4e9b202a1092
[ "Apache-2.0", "MIT" ]
12
2018-10-31T01:57:55.000Z
2019-02-07T05:49:36.000Z
slam_recognition/util/attractor/__init__.py
SimLeek/pySILEnT
feec2d1fb654d7c8dc25f610916f4e9b202a1092
[ "Apache-2.0", "MIT" ]
null
null
null
from .log_attractor_function import log_attractor_function from .piecewise_attractor_function import piecewise_attractor_function from .euclidian_attractor_function import euclidian_attractor_function_generator from .linear_attractor_function import linear_attractor_function_generator
57.2
80
0.93007
34
286
7.294118
0.264706
0.548387
0.370968
0
0
0
0
0
0
0
0
0
0.055944
286
4
81
71.5
0.918519
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
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
1
0
1
0
1
0
0
6
6ca6ad9054b568b254f6c5f63c4bcc1591f0cf26
37
py
Python
Python/long awaited/1.py
domreddy/learning
692c37367dc2463c9f154cca6236df7d36b6a6f8
[ "MIT" ]
null
null
null
Python/long awaited/1.py
domreddy/learning
692c37367dc2463c9f154cca6236df7d36b6a6f8
[ "MIT" ]
null
null
null
Python/long awaited/1.py
domreddy/learning
692c37367dc2463c9f154cca6236df7d36b6a6f8
[ "MIT" ]
null
null
null
print('lets start with this already')
37
37
0.783784
6
37
4.833333
1
0
0
0
0
0
0
0
0
0
0
0
0.108108
37
1
37
37
0.878788
0
0
0
0
0
0.736842
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
6
6cc2ff1e5de93abcdc0353fe0889d895a5509d82
18
py
Python
pmatrix/__init__.py
hopkira/prioritymatrix-python
e42ec144f6e11dfbdc75c08de35079056123c0a7
[ "Apache-2.0" ]
1
2021-01-18T19:45:48.000Z
2021-01-18T19:45:48.000Z
pmatrix/__init__.py
hopkira/prioritymatrix-python
e42ec144f6e11dfbdc75c08de35079056123c0a7
[ "Apache-2.0" ]
1
2020-12-10T00:43:11.000Z
2020-12-10T03:02:13.000Z
pmatrix/__init__.py
hopkira/prioritymatrix-python
e42ec144f6e11dfbdc75c08de35079056123c0a7
[ "Apache-2.0" ]
3
2016-04-19T19:24:24.000Z
2022-03-04T11:54:00.000Z
from pm import PM
9
17
0.777778
4
18
3.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.222222
18
1
18
18
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
6cc3770c456cd47f458ca6264a23c709ae0e1aa8
214
py
Python
iteration_protocols.py
mammykins/pyfund
d7de8ae5be7a376dc4daca990f6f55c7e5f6d0be
[ "MIT" ]
null
null
null
iteration_protocols.py
mammykins/pyfund
d7de8ae5be7a376dc4daca990f6f55c7e5f6d0be
[ "MIT" ]
null
null
null
iteration_protocols.py
mammykins/pyfund
d7de8ae5be7a376dc4daca990f6f55c7e5f6d0be
[ "MIT" ]
null
null
null
iterable = ['spring', 'summer', 'autumn', 'winter'] print(iterable) iterator = iter(iterable) print(next(iterator)) print(next(iterator)) print(next(iterator)) print(next(iterator)) print(next(iterator))
21.4
52
0.700935
25
214
6
0.36
0.3
0.566667
0.586667
0.566667
0.566667
0.566667
0.566667
0.566667
0.566667
0
0
0.116822
214
9
53
23.777778
0.793651
0
0
0.625
0
0
0.117073
0
0
0
0
0
0
1
0
false
0
0
0
0
0.75
1
0
0
null
1
1
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
6
9f0be19488b74f7f53b38901e00ff48cf87a6ef0
51
py
Python
txt2txtgen/parse/__init__.py
kristianwoodsend/txt2txtgen
711274db112821cb9f0e37885d8392e8e44a50e5
[ "MIT" ]
1
2018-11-03T08:04:21.000Z
2018-11-03T08:04:21.000Z
txt2txtgen/parse/__init__.py
kristianwoodsend/txt2txtgen
711274db112821cb9f0e37885d8392e8e44a50e5
[ "MIT" ]
null
null
null
txt2txtgen/parse/__init__.py
kristianwoodsend/txt2txtgen
711274db112821cb9f0e37885d8392e8e44a50e5
[ "MIT" ]
null
null
null
import StanfordCoreNLP import PhraseDependencyTree
17
27
0.921569
4
51
11.75
0.75
0
0
0
0
0
0
0
0
0
0
0
0.078431
51
2
28
25.5
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
1
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
1
0
1
0
0
6
9f1ff8268d2c598520fc1239b5d51ce064eb37aa
65
py
Python
without-attrs/conanfile.py
grisumbras/conan-promote
f1d746bbd134f64af0d9f6b4cf6d579c99980a1f
[ "BSL-1.0" ]
1
2020-02-02T16:39:43.000Z
2020-02-02T16:39:43.000Z
without-attrs/conanfile.py
grisumbras/conan-promote
f1d746bbd134f64af0d9f6b4cf6d579c99980a1f
[ "BSL-1.0" ]
null
null
null
without-attrs/conanfile.py
grisumbras/conan-promote
f1d746bbd134f64af0d9f6b4cf6d579c99980a1f
[ "BSL-1.0" ]
null
null
null
from conans import ConanFile class MyConan(ConanFile): pass
13
28
0.769231
8
65
6.25
0.875
0
0
0
0
0
0
0
0
0
0
0
0.184615
65
4
29
16.25
0.943396
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
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
1
1
0
1
0
0
6
9f2c41832424ecd8ef5b935f3fc0aede8a7e08e0
44,920
py
Python
autoencoders/tower.py
pouyaAB/Accept_Synthetic_Objects_as_Real
127172fbfbac0af01184eff8cabba3d6afd2ac0b
[ "MIT" ]
6
2019-11-11T23:25:56.000Z
2020-11-02T03:30:52.000Z
autoencoders/tower.py
pouyaAB/Accept_Synthetic_Objects_as_Real
127172fbfbac0af01184eff8cabba3d6afd2ac0b
[ "MIT" ]
null
null
null
autoencoders/tower.py
pouyaAB/Accept_Synthetic_Objects_as_Real
127172fbfbac0af01184eff8cabba3d6afd2ac0b
[ "MIT" ]
1
2022-02-17T11:16:32.000Z
2022-02-17T11:16:32.000Z
import math import numpy as np import chainer import chainer.functions as F import chainer.links as L from chainer import cuda, Variable from chainer.initializers import Normal class text_encoder(chainer.Chain): def __init__(self, latent_size=64, num_objects=10, num_descriptions=10): super(text_encoder, self).__init__( l1=L.Linear(num_objects + num_descriptions, 4 * latent_size, initialW=Normal(0.02)), norm1 = L.BatchNormalization(4 * latent_size), l2=L.Linear(4 * latent_size, 4 * latent_size, initialW=Normal(0.02)), norm2 = L.BatchNormalization(4 * latent_size), mean=L.Linear(4 * latent_size, latent_size, initialW=Normal(0.02)), var=L.Linear(4 * latent_size, latent_size, initialW=Normal(0.02)), ) def __call__(self, objects_one_hot, descs_one_hot, train=True): with chainer.using_config('train', train), chainer.using_config('enable_backprop', train): xp = cuda.get_array_module(objects_one_hot.data) h1 = F.leaky_relu(self.norm1(self.l1(F.concat((objects_one_hot, descs_one_hot), axis=-1)))) h2 = F.leaky_relu(self.norm2(self.l2(h1))) mean = self.mean(h2) var = F.tanh(self.var(h2)) rand = xp.random.normal(0, 1, var.data.shape).astype(np.float32) z = mean + F.exp(var) * Variable(rand) return z, mean, var class text_generator(chainer.Chain): def __init__(self, latent_size=64, num_objects=10, num_descriptions=10): super(text_generator, self).__init__( l3=L.Linear(latent_size, 4 * latent_size, initialW=Normal(0.02)), norm3 = L.BatchNormalization(4 * latent_size), l2=L.Linear(4 * latent_size, 4 * latent_size, initialW=Normal(0.02)), norm2 = L.BatchNormalization(4 * latent_size), l1_0=L.Linear(4 * latent_size, num_objects, initialW=Normal(0.02)), l1_1=L.Linear(4 * latent_size, num_descriptions, initialW=Normal(0.02)), ) def __call__(self, latent, train=True): with chainer.using_config('train', train), chainer.using_config('enable_backprop', train): xp = cuda.get_array_module(latent.data) h3 = F.leaky_relu(self.norm3(self.l3(latent))) h2 = F.leaky_relu(self.norm2(self.l2(h3))) return self.l1_0(h2), self.l1_1(h2) class Encoder_double_z(chainer.Chain): """ An implementation of the "Tower" model of the VAE encoder from the paper 'Neural scene representation and rendering, by S. M. Ali Eslami and others at DeepMind. The exact numbers of the layers and were changed. It is basically a cVAE with multi-dimensional conditions. v - human level properties HLP, human classification ???? find a good name This system takes as input an image and two one-hot vectors corresponding to factorized features of the main object encoded in the image. For instance, if the image contains a red sphere, the inputs will <image>,"red","round". Intent: The hypothesis is that by providing HLPs during training and also during testing, we get a better encoding _of the particular object_. Validation: We can check the reconstruction error metric, but we can also check this with visual inspection of the reconstructed version for different HLP inputs """ def __init__(self, density=1, size=64, latent_size=100, channel=3): """ density - a scaling factor for the number of channels in the convolutional layers. It is multiplied by at least 16,32,64 and 128 as we go deeper. Use: using density=8 when training the VAE separately. using density=4 when training end to end Intent: increase the number of features in the convolutional layers. """ assert (size % 16 == 0) self.second_size = size // 4 initial_size = size // 16 super(Encoder_double_z, self).__init__( dc1=L.Convolution2D(channel, int(16 * density), 3, stride=2, pad=1, initialW=Normal(0.02)), dc2=L.Convolution2D(int(16 * density), int(32 * density), 3, stride=2, pad=1, initialW=Normal(0.02)), dc1_=L.Convolution2D(int(16 * density), int(16 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), dc2_=L.Convolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2=L.BatchNormalization(int(32 * density)), norm2_=L.BatchNormalization(int(32 * density)), dc2_p=L.Convolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_p=L.BatchNormalization(int(32 * density)), dc3=L.Convolution2D(int(32 * density), int(64 * density), 3, stride=2, pad=1, initialW=Normal(0.02)), norm3=L.BatchNormalization(int(64 * density)), dc3_=L.Convolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_=L.BatchNormalization(int(64 * density)), dc3_p=L.Convolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_p=L.BatchNormalization(int(64 * density)), dc4=L.Convolution2D(int(64 * density), int(128 * density), 3, stride=2, pad=1, initialW=Normal(0.02)), norm4=L.BatchNormalization(int(128 * density)), mean_robot=L.Linear(initial_size * initial_size * int(128 * density), latent_size, initialW=Normal(0.02)), # var_robot=L.Linear(initial_size * initial_size * int(128 * density), latent_size, # initialW=Normal(0.02)), mean_scene=L.Linear(initial_size * initial_size * int(128 * density), latent_size, initialW=Normal(0.02)), # var_scene=L.Linear(initial_size * initial_size * int(128 * density), latent_size, # initialW=Normal(0.02)), ) def __call__(self, x, train=True): with chainer.using_config('train', train), chainer.using_config('enable_backprop', train): xp = cuda.get_array_module(x.data) h1 = F.leaky_relu(self.dc1(x)) h1_ = F.leaky_relu(self.dc1_(h1)) h2 = F.leaky_relu(self.norm2(self.dc2(h1_))) h2_ = F.leaky_relu(self.norm2_(self.dc2_(h2))) h2_p = F.leaky_relu(self.norm2_p(self.dc2_p(h2_))) h2_ = h2_ + h2_p h3 = F.leaky_relu(self.norm3(self.dc3(h2_))) h3_ = F.leaky_relu(self.norm3_(self.dc3_(h3))) h3_p = F.leaky_relu(self.norm3_p(self.dc3_p(h3))) h3_ = h3_ + h3_p h4 = F.leaky_relu(self.norm4(self.dc4(h3_))) mean_robot = self.mean_robot(h4) # var_robot = F.tanh(self.var_robot(h4)) # rand = xp.random.normal(0, 1, var_robot.data.shape).astype(np.float32) # z_robot = mean_robot + F.exp(var_robot) * Variable(rand) mean_scene = self.mean_scene(h4) # var_scene = F.tanh(self.var_scene(h4)) # rand = xp.random.normal(0, 1, var_scene.data.shape).astype(np.float32) # z_scene = mean_scene + F.exp(var_scene) * Variable(rand) return F.normalize(mean_robot, axis=1), F.normalize(mean_scene, axis=1) class Encoder(chainer.Chain): """ An implementation of the "Tower" model of the VAE encoder from the paper 'Neural scene representation and rendering, by S. M. Ali Eslami and others at DeepMind. The exact numbers of the layers and were changed. It is basically a cVAE with multi-dimensional conditions. v - human level properties HLP, human classification ???? find a good name This system takes as input an image and two one-hot vectors corresponding to factorized features of the main object encoded in the image. For instance, if the image contains a red sphere, the inputs will <image>,"red","round". Intent: The hypothesis is that by providing HLPs during training and also during testing, we get a better encoding _of the particular object_. Validation: We can check the reconstruction error metric, but we can also check this with visual inspection of the reconstructed version for different HLP inputs """ def __init__(self, density=1, size=64, latent_size=100, channel=3): """ density - a scaling factor for the number of channels in the convolutional layers. It is multiplied by at least 16,32,64 and 128 as we go deeper. Use: using density=8 when training the VAE separately. using density=4 when training end to end Intent: increase the number of features in the convolutional layers. """ assert (size % 16 == 0) self.second_size = size // 4 initial_size = size // 16 super(Encoder, self).__init__( dc1=L.Convolution2D(channel, int(16 * density), 3, stride=2, pad=1, initialW=Normal(0.02)), dc2=L.Convolution2D(int(16 * density), int(32 * density), 3, stride=2, pad=1, initialW=Normal(0.02)), dc1_=L.Convolution2D(int(16 * density), int(16 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), dc2_=L.Convolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2=L.BatchNormalization(int(32 * density)), norm2_=L.BatchNormalization(int(32 * density)), dc2_p=L.Convolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_p=L.BatchNormalization(int(32 * density)), dc3=L.Convolution2D(int(32 * density), int(64 * density), 3, stride=2, pad=1, initialW=Normal(0.02)), norm3=L.BatchNormalization(int(64 * density)), dc3_=L.Convolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_=L.BatchNormalization(int(64 * density)), dc3_p=L.Convolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_p=L.BatchNormalization(int(64 * density)), dc4=L.Convolution2D(int(64 * density), int(128 * density), 3, stride=2, pad=1, initialW=Normal(0.02)), norm4=L.BatchNormalization(int(128 * density)), mean=L.Linear(initial_size * initial_size * int(128 * density), latent_size, initialW=Normal(0.02)), var=L.Linear(initial_size * initial_size * int(128 * density), latent_size, initialW=Normal(0.02)), ) def __call__(self, x, train=True): with chainer.using_config('train', train), chainer.using_config('enable_backprop', train): xp = cuda.get_array_module(x.data) h1 = F.leaky_relu(self.dc1(x)) h1_ = F.leaky_relu(self.dc1_(h1)) h2 = F.leaky_relu(self.norm2(self.dc2(h1_))) h2_ = F.leaky_relu(self.norm2_(self.dc2_(h2))) h2_p = F.leaky_relu(self.norm2_p(self.dc2_p(h2_))) h2_ = h2_ + h2_p h3 = F.leaky_relu(self.norm3(self.dc3(h2_))) h3_ = F.leaky_relu(self.norm3_(self.dc3_(h3))) h3_p = F.leaky_relu(self.norm3_p(self.dc3_p(h3))) h3_ = h3_ + h3_p h4 = F.leaky_relu(self.norm4(self.dc4(h3_))) mean = self.mean(h4) var = F.tanh(self.var(h4)) rand = xp.random.normal(0, 1, var.data.shape).astype(np.float32) z = mean + F.exp(var) * Variable(rand) return z, mean, var, h3_p class Encoder_text_tower(chainer.Chain): """ An implementation of the "Tower" model of the VAE encoder from the paper 'Neural scene representation and rendering, by S. M. Ali Eslami and others at DeepMind. The exact numbers of the layers and were changed. It is basically a cVAE with multi-dimensional conditions. v - human level properties HLP, human classification ???? find a good name This system takes as input an image and two one-hot vectors corresponding to factorized features of the main object encoded in the image. For instance, if the image contains a red sphere, the inputs will <image>,"red","round". Intent: The hypothesis is that by providing HLPs during training and also during testing, we get a better encoding _of the particular object_. Validation: We can check the reconstruction error metric, but we can also check this with visual inspection of the reconstructed version for different HLP inputs """ def __init__(self, density=1, size=64, latent_size=100, channel=3, hidden_dim=100, num_objects=10, num_descriptions=10): """ density - a scaling factor for the number of channels in the convolutional layers. It is multiplied by at least 16,32,64 and 128 as we go deeper. Use: using density=8 when training the VAE separately. using density=4 when training end to end Intent: increase the number of features in the convolutional layers. """ assert (size % 16 == 0) self.second_size = size // 4 initial_size = size // 16 super(Encoder_text_tower, self).__init__( dc1=L.Convolution2D(channel, int(16 * density), 3, stride=2, pad=1, initialW=Normal(0.02)), dc2=L.Convolution2D(int(16 * density), int(32 * density), 3, stride=2, pad=1, initialW=Normal(0.02)), dc1_=L.Convolution2D(int(16 * density), int(16 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), dc2_=L.Convolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2=L.BatchNormalization(int(32 * density)), norm2_=L.BatchNormalization(int(32 * density)), dc2_p=L.Convolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_p=L.BatchNormalization(int(32 * density)), dc3=L.Convolution2D(int(32 * density + 7), int(64 * density), 3, stride=2, pad=1, initialW=Normal(0.02)), norm3=L.BatchNormalization(int(64 * density)), dc3_=L.Convolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_=L.BatchNormalization(int(64 * density)), dc3_p=L.Convolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_p=L.BatchNormalization(int(64 * density)), dc4=L.Convolution2D(int(64 * density), int(128 * density), 3, stride=2, pad=1, initialW=Normal(0.02)), norm4=L.BatchNormalization(int(128 * density)), toConv=L.Linear(num_objects + num_descriptions, self.second_size * self.second_size * 7, initialW=Normal(0.02)), norm_toConv=L.BatchNormalization(7), mean=L.Linear(initial_size * initial_size * int(128 * density), latent_size, initialW=Normal(0.02)), var=L.Linear(initial_size * initial_size * int(128 * density), latent_size, initialW=Normal(0.02)), ) def __call__(self, x, objects_one_hot, descs_one_hot, train=True): with chainer.using_config('train', train), chainer.using_config('enable_backprop', train): xp = cuda.get_array_module(x.data) # h0 = F.concat((x, objects, descs), axis=1) h0 = self.toConv(F.concat((objects_one_hot, descs_one_hot), axis=-1)) h0 = F.reshape(h0, (h0.shape[0], 7, self.second_size, self.second_size)) h0 = F.leaky_relu(self.norm_toConv(h0)) h1 = F.leaky_relu(self.dc1(x)) h1_ = F.leaky_relu(self.dc1_(h1)) h2 = F.leaky_relu(self.norm2(self.dc2(h1_))) h2_ = F.leaky_relu(self.norm2_(self.dc2_(h2))) h2_p = F.leaky_relu(self.norm2_p(self.dc2_p(h2_))) h2_ = h2_ + h2_p h2_ = F.concat((h2_, h0), axis=1) h3 = F.leaky_relu(self.norm3(self.dc3(h2_))) h3_ = F.leaky_relu(self.norm3_(self.dc3_(h3))) h3_p = F.leaky_relu(self.norm3_p(self.dc3_p(h3))) h3_ = h3_ + h3_p h4 = F.leaky_relu(self.norm4(self.dc4(h3_))) mean = self.mean(h4) var = F.tanh(self.var(h4)) rand = xp.random.normal(0, 1, var.data.shape).astype(np.float32) z = mean + F.exp(var) * Variable(rand) return z, mean, var, h4 class Generator_text(chainer.Chain): """ This implemention is very similar to the encoder_text_tower. Convolution layers has been replaced with deconvolution layers. This implemention receives a latent vector plus two and two one-hot vectors corresponding to factorized features of the main object encoded in the image. For instance, if the image contains a red sphere, the inputs will <image>,"red","round". Intent: The hypothesis is that by providing HLPs during training and also during testing, we get a better generative results _of the particular object_. Validation: We can check the reconstruction error metric, but we can also check this with visual inspection of the reconstructed version for different HLP inputs """ def __init__(self, density=1, size=64, latent_size=100, channel=3, num_objects=10, num_descriptions=10): filter_size = 2 self.intermediate_size = size // 8 assert (size % 16 == 0) initial_size = size // 16 super(Generator_text, self).__init__( g0=L.Linear(num_objects + num_descriptions, self.intermediate_size * self.intermediate_size * 7, initialW=Normal(0.02)), g1=L.Linear(latent_size, initial_size * initial_size * int(128 * density), initialW=Normal(0.02)), norm1=L.BatchNormalization(initial_size * initial_size * int(128 * density)), g2=L.Deconvolution2D(int(128 * density), int(64 * density), filter_size, stride=2, pad=0, initialW=Normal(0.02)), norm2=L.BatchNormalization(int(64 * density)), g2_=L.Deconvolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_=L.BatchNormalization(int(64 * density)), g2_p=L.Deconvolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_p=L.BatchNormalization(int(64 * density)), g3=L.Deconvolution2D(int(64 * density + 7), int(32 * density), filter_size, stride=2, pad=0, initialW=Normal(0.02)), norm3=L.BatchNormalization(int(32 * density)), g3_=L.Deconvolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_=L.BatchNormalization(int(32 * density)), g3_p=L.Deconvolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_p=L.BatchNormalization(int(32 * density)), g4=L.Deconvolution2D(int(32 * density), int(16 * density), filter_size, stride=2, pad=0, initialW=Normal(0.02)), norm4=L.BatchNormalization(int(16 * density)), g4_=L.Deconvolution2D(int(16 * density), int(16 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm4_=L.BatchNormalization(int(16 * density)), g5=L.Deconvolution2D(int(16 * density), channel, filter_size, stride=2, pad=0, initialW=Normal(0.02)), ) self.density = density self.latent_size = latent_size self.initial_size = initial_size def __call__(self, z, objs, descs, train=True): with chainer.using_config('train', train), chainer.using_config('enable_backprop', train): h0 = self.g0(F.concat((objs, descs), axis=-1)) h0 = F.reshape(h0, (h0.shape[0], 7, self.intermediate_size, self.intermediate_size)) h1 = F.reshape(F.relu(self.norm1(self.g1(z))), (z.data.shape[0], int(128 * self.density), self.initial_size, self.initial_size)) h2 = F.relu(self.norm2(self.g2(h1))) h2_ = F.relu(self.norm2_(self.g2_(h2))) h2_p = F.relu(self.norm2_p(self.g2_p(h2_))) h2_ = h2_ + h2_p h2_ = F.concat((h2_, h0), axis=1) h3 = F.relu(self.norm3(self.g3(h2_))) h3_ = F.relu(self.norm3_(self.g3_(h3))) h3_p = F.relu(self.norm3_p(self.g3_p(h3_))) h3_ = h3_ + h3_p h4 = F.relu(self.norm4(self.g4(h3_))) h4_ = F.relu(self.norm4_(self.g4_(h4))) return F.tanh(self.g5(h4_)) class Generator_text_att(chainer.Chain): """ This implemention is very similar to the encoder_text_tower. Convolution layers has been replaced with deconvolution layers. This implemention receives a latent vector plus two and two one-hot vectors corresponding to factorized features of the main object encoded in the image. For instance, if the image contains a red sphere, the inputs will <image>,"red","round". Intent: The hypothesis is that by providing HLPs during training and also during testing, we get a better generative results _of the particular object_. Validation: We can check the reconstruction error metric, but we can also check this with visual inspection of the reconstructed version for different HLP inputs """ def __init__(self, density=1, size=64, latent_size=100, channel=3, num_objects=10, num_descriptions=10): filter_size = 2 self.size = size self.intermediate_size = size // 8 assert (size % 16 == 0) self.att_size = 5 initial_size = size // 16 super(Generator_text_att, self).__init__( FC0=L.Linear(num_objects + num_descriptions, 128, initialW=Normal(0.02), nobias=True), FC1=L.Linear(128, 16, initialW=Normal(0.02), nobias=True), FC2=L.Linear(16, 32, initialW=Normal(0.02), nobias=True), FC00=L.Linear(64 * 8 * 8, 32 * self.att_size * self.att_size, initialW=Normal(0.02), nobias=True), FC01=L.Linear(32 * self.att_size * self.att_size, 16 * self.att_size * self.att_size, initialW=Normal(0.02), nobias=True), FC02=L.Linear(16 * self.att_size * self.att_size, 32 * self.att_size * self.att_size, initialW=Normal(0.02), nobias=True), FC22=L.Linear(32 * self.att_size * self.att_size, 1 * self.att_size * self.att_size, initialW=Normal(0.02), nobias=True), att_norm0=L.BatchNormalization(128), att_norm1=L.BatchNormalization(16), att_norm2=L.BatchNormalization(32), att_norm00=L.BatchNormalization(32), att_norm01=L.BatchNormalization(16), att_norm02=L.BatchNormalization(32), att_norm11=L.BatchNormalization(32), g2_extra=L.Convolution2D(int(512), int(64), 3, stride=2, pad=1, initialW=Normal(0.02)), norm2_extra=L.BatchNormalization(int(64)), g1=L.Linear(latent_size, initial_size * initial_size * int(128 * density), initialW=Normal(0.02)), norm1=L.BatchNormalization(initial_size * initial_size * int(128 * density)), g2=L.Deconvolution2D(int(128 * density), int(64 * density), filter_size, stride=2, pad=0, initialW=Normal(0.02)), norm2=L.BatchNormalization(int(64 * density)), g2_=L.Deconvolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_=L.BatchNormalization(int(64 * density)), g2_p=L.Deconvolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_p=L.BatchNormalization(int(64 * density)), norm2_att=L.BatchNormalization(int(16 * density)), g1_att=L.Linear(self.att_size * self.att_size * int(16 * density), self.att_size * self.att_size * 1, initialW=Normal(0.02)), g3=L.Deconvolution2D(int(64 * density), int(32 * density), filter_size, stride=2, pad=0, initialW=Normal(0.02)), norm3=L.BatchNormalization(int(32 * density)), g3_=L.Deconvolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_=L.BatchNormalization(int(32 * density)), g3_p=L.Deconvolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_p=L.BatchNormalization(int(32 * density)), g4=L.Deconvolution2D(int(32 * density), int(16 * density), filter_size, stride=2, pad=0, initialW=Normal(0.02)), norm4=L.BatchNormalization(int(16 * density)), g4_=L.Deconvolution2D(int(16 * density), int(16 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm4_=L.BatchNormalization(int(16 * density)), g5=L.Deconvolution2D(int(16 * density), channel, filter_size, stride=2, pad=0, initialW=Normal(0.02)), ) self.density = density self.latent_size = latent_size self.initial_size = initial_size def __call__(self, z, objs, descs, features, train=True): with chainer.using_config('train', train), chainer.using_config('enable_backprop', train): h1 = F.relu(self.norm1(self.g1(z))) h1 = F.reshape(h1, (z.data.shape[0], int(128 * self.density), self.initial_size, self.initial_size)) h2 = F.relu(self.norm2(self.g2(h1))) h2_ = F.relu(self.norm2_(self.g2_(h2))) h2_p = F.relu(self.norm2_p(self.g2_p(h2_))) h2_ = h2_ + h2_p h3 = F.relu(self.norm3(self.g3(h2_))) h3_ = F.relu(self.norm3_(self.g3_(h3))) h3_p = F.relu(self.norm3_p(self.g3_p(h3_))) h3_ = h3_ + h3_p h4 = F.relu(self.norm4(self.g4(h3_))) h4_ = F.relu(self.norm4_(self.g4_(h4))) #Attention Part att_h0 = F.tanh(self.att_norm0(self.FC0(F.concat((objs, descs), axis=-1)))) att_h1 = F.tanh(self.att_norm1(self.FC1(att_h0))) att_h2 = F.tanh(self.att_norm2(self.FC2(att_h1))) att_h2 = F.tile(F.expand_dims(att_h2, axis=2), (1, 1, self.att_size * self.att_size)) # features = F.transpose(features, (0, 2, 3, 1)) # features = F.reshape(features, (-1, features.shape[1] * features.shape[2], features.shape[3])) features = F.leaky_relu(self.norm2_extra(self.g2_extra(features))) att_f0 = F.reshape(self.FC00(features), (-1, 32, self.att_size * self.att_size)) att_f0 = F.tanh(self.att_norm00(att_f0)) original_features = att_f0 att_f1 = F.reshape(self.FC01(att_f0), (-1, 16, self.att_size * self.att_size)) att_f1 = F.tanh(self.att_norm01(att_f1)) att_f2 = F.reshape(self.FC02(att_f1), (-1, 32, self.att_size * self.att_size)) att_f2 = F.tanh(self.att_norm02(att_f2)) att_ff = att_h2 + att_f2 att_ff = F.tanh(self.att_norm11(att_ff)) att_att = F.reshape(self.FC22(att_ff), (-1, self.att_size * self.att_size)) att_att = F.softmax(att_att, axis=1) h1_att = F.reshape(att_att, (-1, 1, self.att_size, self.att_size)) pooled_features = F.einsum('ijk,ik -> ij', original_features, att_att) # h0 = F.expand_dims(h0, axis=2) # h0 = F.reshape(F.tile(h0, (1, 1, self.att_size * self.att_size)), (-1, h0.shape[1], self.att_size, self.att_size)) # h2_att = F.tanh(self.norm2_extra(self.g2_extra(features))) # h2_att_orig = F.reshape(features, (-1, int(512), self.att_size * self.att_size)) # h2_comb = F.tanh(self.norm2_att(h2_att + h0)) # h2_comb = F.reshape(h2_comb, (-1, int(16 * self.density), self.att_size * self.att_size)) # h1_b = self.g1_att(h2_comb) # h1_att = F.softmax(h1_b/16, axis=1) # h1_att = F.reshape(h1_att, (-1, 1, self.att_size, self.att_size)) # # h1_att_fit = F.unpooling_2d(h1_att, 4, outsize=(16,16)) # h1_att_fit = F.reshape(h1_att, (-1, self.att_size * self.att_size)) # pooled_features = F.einsum('ijk,ik -> ij', h2_att_orig, h1_att_fit) return F.tanh(self.g5(h4_)), F.resize_images(h1_att, (self.size, self.size)), h1_att, pooled_features class Generator_latent_att(chainer.Chain): """ This implemention is very similar to the encoder_text_tower. Convolution layers has been replaced with deconvolution layers. This implemention receives a latent vector plus two and two one-hot vectors corresponding to factorized features of the main object encoded in the image. For instance, if the image contains a red sphere, the inputs will <image>,"red","round". Intent: The hypothesis is that by providing HLPs during training and also during testing, we get a better generative results _of the particular object_. Validation: We can check the reconstruction error metric, but we can also check this with visual inspection of the reconstructed version for different HLP inputs """ def __init__(self, density=1, size=64, latent_size=100, channel=3, num_objects=10, num_descriptions=10): filter_size = 2 self.size = size self.intermediate_size = size // 8 assert (size % 16 == 0) self.att_size = 16 initial_size = size // 16 super(Generator_latent_att, self).__init__( g0_att=L.Linear(latent_size, 512, initialW=Normal(0.02)), g0=L.Linear(num_objects + num_descriptions, 64, initialW=Normal(0.02)), norm0=L.BatchNormalization(64), g00=L.Linear(latent_size, 64, initialW=Normal(0.02)), norm00=L.BatchNormalization(64), norm00_att=L.BatchNormalization(512), norm000=L.BatchNormalization(64), g1=L.Linear(latent_size, initial_size * initial_size * int(128 * density), initialW=Normal(0.02)), norm1=L.BatchNormalization(initial_size * initial_size * int(128 * density)), g2=L.Deconvolution2D(int(128 * density), int(64 * density), filter_size, stride=2, pad=0, initialW=Normal(0.02)), norm2=L.BatchNormalization(int(64 * density)), g2_=L.Deconvolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_=L.BatchNormalization(int(64 * density)), g2_p=L.Deconvolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_p=L.BatchNormalization(int(64 * density)), g2_extra=L.Deconvolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_extra=L.BatchNormalization(int(64 * density)), norm2_att=L.BatchNormalization(int(64 * density)), g1_att=L.Linear(16 * 16 * int(64 * density), self.att_size * self.att_size * 1, initialW=Normal(0.02)), g3=L.Deconvolution2D(int(64 * density), int(32 * density), filter_size, stride=2, pad=0, initialW=Normal(0.02)), norm3=L.BatchNormalization(int(32 * density)), g3_=L.Deconvolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_=L.BatchNormalization(int(32 * density)), g3_p=L.Deconvolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_p=L.BatchNormalization(int(32 * density)), g4=L.Deconvolution2D(int(32 * density), int(16 * density), filter_size, stride=2, pad=0, initialW=Normal(0.02)), norm4=L.BatchNormalization(int(16 * density)), g4_=L.Deconvolution2D(int(16 * density), int(16 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm4_=L.BatchNormalization(int(16 * density)), g5=L.Deconvolution2D(int(16 * density), channel, filter_size, stride=2, pad=0, initialW=Normal(0.02)), ) self.density = density self.latent_size = latent_size self.initial_size = initial_size def __call__(self, z, objs, descs, features, train=True): with chainer.using_config('train', train), chainer.using_config('enable_backprop', train): h0 = F.tanh(self.norm0(self.g0(F.concat((objs, descs), axis=-1)))) h00 = F.tanh(self.norm00(self.g00(z))) z_mask = F.softmax(self.norm000(h00 + h0)) z_pr = z * z_mask h1 = F.relu(self.norm1(self.g1(z_pr))) h1 = F.reshape(h1, (z.data.shape[0], int(128 * self.density), self.initial_size, self.initial_size)) h2 = F.relu(self.norm2(self.g2(h1))) h2_ = F.relu(self.norm2_(self.g2_(h2))) h2_p = F.relu(self.norm2_p(self.g2_p(h2_))) h2_ = h2_ + h2_p h3 = F.relu(self.norm3(self.g3(h2_))) h3_ = F.relu(self.norm3_(self.g3_(h3))) h3_p = F.relu(self.norm3_p(self.g3_p(h3_))) h3_ = h3_ + h3_p h4 = F.relu(self.norm4(self.g4(h3_))) h4_ = F.relu(self.norm4_(self.g4_(h4))) #Attention Part h000 = F.tanh(self.norm00_att(self.g0_att(z_pr))) h0000 = F.expand_dims(h000, axis=2) h0000 = F.reshape(F.tile(h0000, (1, 1, 16 * 16)), (-1, h0000.shape[1], 16, 16)) h2_att = F.tanh(self.norm2_extra(self.g2_extra(h2_))) h2_att_orig = F.reshape(h2_, (-1, int(64 * self.density), 16 * 16)) h2_comb = F.tanh(self.norm2_att(h2_att + h0000)) h2_comb = F.reshape(h2_comb, (-1, int(64 * self.density), 16 * 16)) h1_b = self.g1_att(h2_comb) h1_att = F.softmax(h1_b, axis=1) h1_att = F.reshape(h1_att, (-1, 1, self.att_size, self.att_size)) # h1_att_fit = F.unpooling_2d(h1_att, 4, outsize=(16,16)) h1_att_fit = F.reshape(h1_att, (-1, 16 * 16)) pooled_features = F.einsum('ijk,ik -> ij', h2_att_orig, h1_att_fit) return F.tanh(self.g5(h4_)), F.resize_images(h1_att, (self.size, self.size)), h1_att, pooled_features class Discriminator_texual(chainer.Chain): """ A discriminator for classifying the both the regular and masked images into their HLP groups. The discrimiantor can receive both regular and masked images as input and it will try to classify them based on the object of interest in the image. The discriminator will either mark the image as fake or it will match it to one the shapes and colors. The regular and masked images have will go through shared convolution and separate FF layers at the end. The first 8 convoltion layers are shared and there is separated Fully-connected layers for regular and masked images. The discriminator will be used in an adversarial setup with the encoder and the generator. The discriminator tries to mark the images generated by the generator as fake and classify real images to their correct class. Validation: One can check the classification error for real and fake images """ def __init__(self, density=1, size=64, channel=3, num_words=32, num_objects=10, num_descriptions=10): assert (size % 16 == 0) self.num_objects = num_objects self.num_descriptions = num_descriptions initial_size = size // 16 super(Discriminator_texual, self).__init__( dc1=L.Convolution2D(channel, int(16 * density), 4, stride=2, pad=1, initialW=Normal(0.02)), dc2=L.Convolution2D(int(16 * density), int(32 * density), 4, stride=2, pad=1, initialW=Normal(0.02)), norm2=L.BatchNormalization(int(32 * density)), # An extra layer to make the network deeper and not changing the feature sizes dc2_=L.Convolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_=L.BatchNormalization(int(32 * density)), # "plus layer" another extra layer added to make it deeper with stride = 1 but this one has # a skip connection between input and output dc2_p=L.Convolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_p=L.BatchNormalization(int(32 * density)), dc3=L.Convolution2D(int(32 * density), int(64 * density), 4, stride=2, pad=1, initialW=Normal(0.02)), norm3=L.BatchNormalization(int(64 * density)), # An extra layer to make the network deeper and not changing the feature sizes dc3_=L.Convolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_=L.BatchNormalization(int(64 * density)), # "plus layer" another extra layer added to make it deeper with stride = 1 but this one has # a skip connection between input and output dc3_p=L.Convolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_p=L.BatchNormalization(int(64 * density)), dc4=L.Convolution2D(int(64 * density), int(128 * density), 4, stride=2, pad=1, initialW=Normal(0.02)), norm4=L.BatchNormalization(int(128 * density)), dc5=L.Linear(initial_size * initial_size * int(128 * density), num_objects, initialW=Normal(0.02)), dc6=L.Linear(initial_size * initial_size * int(128 * density), num_descriptions, initialW=Normal(0.02)), dc8=L.Linear(initial_size * initial_size * int(128 * density), num_objects, initialW=Normal(0.02)), dc9=L.Linear(initial_size * initial_size * int(128 * density), num_descriptions, initialW=Normal(0.02)), ) def __call__(self, x, att=True, train=True): with chainer.using_config('train', train): h1 = F.leaky_relu(self.dc1(x)) h2 = F.leaky_relu(self.norm2(self.dc2(h1))) h2_ = F.leaky_relu(self.norm2_(self.dc2_(h2))) h2_p = F.leaky_relu(self.norm2_p(self.dc2_p(h2_))) h2_ = h2_ + h2_p h3 = F.leaky_relu(self.norm3(self.dc3(h2_))) h3_ = F.leaky_relu(self.norm3_(self.dc3_(h3))) h3_p = F.leaky_relu(self.norm3_p(self.dc3_p(h3_))) h3_ = h3_ + h3_p h4 = F.leaky_relu(self.norm4(self.dc4(h3_))) if att: return self.dc5(h4), self.dc6(h4), h3 else: return self.dc8(h4), self.dc9(h4), h3 class Discriminator(chainer.Chain): """ A discriminator for classifying the both the regular and masked images into their HLP groups. The discrimiantor can receive both regular and masked images as input and it will try to classify them based on the object of interest in the image. The discriminator will either mark the image as fake or it will match it to one the shapes and colors. The regular and masked images have will go through shared convolution and separate FF layers at the end. The first 8 convoltion layers are shared and there is separated Fully-connected layers for regular and masked images. The discriminator will be used in an adversarial setup with the encoder and the generator. The discriminator tries to mark the images generated by the generator as fake and classify real images to their correct class. Validation: One can check the classification error for real and fake images """ def __init__(self, density=1, size=64, channel=3): assert (size % 16 == 0) initial_size = size // 16 super(Discriminator, self).__init__( dc1=L.Convolution2D(channel, int(16 * density), 4, stride=2, pad=1, initialW=Normal(0.02)), dc2=L.Convolution2D(int(16 * density), int(32 * density), 4, stride=2, pad=1, initialW=Normal(0.02)), norm2=L.BatchNormalization(int(32 * density)), # An extra layer to make the network deeper and not changing the feature sizes dc2_=L.Convolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_=L.BatchNormalization(int(32 * density)), # "plus layer" another extra layer added to make it deeper with stride = 1 but this one has # a skip connection between input and output dc2_p=L.Convolution2D(int(32 * density), int(32 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm2_p=L.BatchNormalization(int(32 * density)), dc3=L.Convolution2D(int(32 * density), int(64 * density), 4, stride=2, pad=1, initialW=Normal(0.02)), norm3=L.BatchNormalization(int(64 * density)), # An extra layer to make the network deeper and not changing the feature sizes dc3_=L.Convolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_=L.BatchNormalization(int(64 * density)), # "plus layer" another extra layer added to make it deeper with stride = 1 but this one has # a skip connection between input and output dc3_p=L.Convolution2D(int(64 * density), int(64 * density), 3, stride=1, pad=1, initialW=Normal(0.02)), norm3_p=L.BatchNormalization(int(64 * density)), dc4=L.Convolution2D(int(64 * density), int(128 * density), 4, stride=2, pad=1, initialW=Normal(0.02)), norm4=L.BatchNormalization(int(128 * density)), dc5=L.Linear(initial_size * initial_size * int(128 * density), 2, initialW=Normal(0.02)), dc6=L.Linear(initial_size * initial_size * int(128 * density), 2, initialW=Normal(0.02)), ) def __call__(self, x, att=True, train=True): with chainer.using_config('train', train): h1 = F.leaky_relu(self.dc1(x)) h2 = F.leaky_relu(self.norm2(self.dc2(h1))) h2_ = F.leaky_relu(self.norm2_(self.dc2_(h2))) h2_p = F.leaky_relu(self.norm2_p(self.dc2_p(h2_))) h2_p = h2_ + h2_p h3 = F.leaky_relu(self.norm3(self.dc3(h2_p))) h3_ = F.leaky_relu(self.norm3_(self.dc3_(h3))) h3_p = F.leaky_relu(self.norm3_p(self.dc3_p(h3_))) h3_p = h3_ + h3_p h4 = F.leaky_relu(self.norm4(self.dc4(h3_p))) if att: return self.dc5(h4), h3 else: return self.dc6(h4), h3
57.812098
137
0.597796
6,189
44,920
4.190176
0.057037
0.031311
0.064204
0.072764
0.911696
0.904369
0.876489
0.858212
0.846836
0.832491
0
0.068697
0.282213
44,920
776
138
57.886598
0.735602
0.219101
0
0.698905
0
0
0.005628
0
0
0
0
0
0.014599
1
0.036496
false
0
0.012774
0
0.089416
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
9f4fe0c4f3a5ac9ce68a404275e9cc1e94d8a418
19,124
py
Python
tests/kind_test.py
globocom/globomap-loader-napi
a3621e1396c14730d131315ae50ce2d7c1228765
[ "Apache-2.0" ]
3
2017-08-31T13:35:49.000Z
2019-07-11T11:37:21.000Z
tests/kind_test.py
globocom/globomap-loader-napi
a3621e1396c14730d131315ae50ce2d7c1228765
[ "Apache-2.0" ]
4
2017-09-06T22:34:49.000Z
2019-07-11T12:33:12.000Z
tests/kind_test.py
globocom/globomap-loader-napi
a3621e1396c14730d131315ae50ce2d7c1228765
[ "Apache-2.0" ]
2
2017-09-06T20:46:33.000Z
2019-07-11T12:12:38.000Z
""" Copyright 2018 Globo.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ import unittest2 from mock import patch from globomap_driver_napi.kind import Kind from tests.util import open_json class TestKind(unittest2.TestCase): maxDiff = None def tearDown(self): patch.stopall() def test_father_environment(self): self._mock_environment() data = self._queue_message( 'tests/json/messages/queue/environment.json') data_ret = self._update_message( 'tests/json/messages/updates/father_environment.json') for i in range(3): kind = Kind() res = kind.father_environment(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_environment(self): self._mock_environment() data = self._queue_message( 'tests/json/messages/queue/environment.json') data_ret = self._update_message( 'tests/json/messages/updates/environment.json') for i in range(3): kind = Kind() res = kind.environment(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_environment_vlan(self): self._mock_vlan() data = self._queue_message( 'tests/json/messages/queue/vlan.json') data_ret = self._update_message( 'tests/json/messages/updates/environment_vlan.json') for i in range(3): kind = Kind() res = kind.environment_vlan(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_vlan(self): self._mock_vlan() data = self._queue_message( 'tests/json/messages/queue/vlan.json') data_ret = self._update_message( 'tests/json/messages/updates/vlan.json') for i in range(3): kind = Kind() res = kind.vlan(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_vlan_networkv4(self): self._mock_networkv4() data = self._queue_message( 'tests/json/messages/queue/networkv4.json') data_ret = self._update_message( 'tests/json/messages/updates/vlan_networkv4.json') for i in range(3): kind = Kind() res = kind.vlan_network_v4(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_vlan_networkv6(self): self._mock_networkv6() data = self._queue_message( 'tests/json/messages/queue/networkv6.json') data_ret = self._update_message( 'tests/json/messages/updates/vlan_networkv6.json') for i in range(3): kind = Kind() res = kind.vlan_network_v6(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_networkv4(self): self._mock_networkv4() data = self._queue_message( 'tests/json/messages/queue/networkv4.json') data_ret = self._update_message( 'tests/json/messages/updates/networkv4.json') for i in range(3): kind = Kind() res = kind.network_v4(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_networkv6(self): self._mock_networkv6() data = self._queue_message( 'tests/json/messages/queue/networkv6.json') data_ret = self._update_message( 'tests/json/messages/updates/networkv6.json') for i in range(3): kind = Kind() res = kind.network_v6(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_ipv4_eqpt(self): self._mock_ipv4() data = self._queue_message( 'tests/json/messages/queue/ipv4_eqpt.json') data_ret = self._update_message( 'tests/json/messages/updates/networkv4_comp_unit.json') for i in range(2): kind = Kind() res = kind.network_v4_comp_unit(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_ipv4_eqpt_acs(self): self._mock_ipv4() data = self._queue_message( 'tests/json/messages/queue/ipv4_eqpt_acs.json') data_ret = self._update_message( 'tests/json/messages/updates/networkv4_comp_unit_acs.json') for i in range(2): kind = Kind() res = kind.network_v4_comp_unit(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_ipv6_eqpt(self): self._mock_ipv6() data = self._queue_message( 'tests/json/messages/queue/ipv6_eqpt.json') data_ret = self._update_message( 'tests/json/messages/updates/networkv6_comp_unit.json') for i in range(2): kind = Kind() res = kind.network_v6_comp_unit(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_ipv6_eqpt_acs(self): self._mock_ipv6() data = self._queue_message( 'tests/json/messages/queue/ipv6_eqpt_acs.json') data_ret = self._update_message( 'tests/json/messages/updates/networkv6_comp_unit_acs.json') for i in range(2): kind = Kind() res = kind.network_v6_comp_unit(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_comp_unit(self): self._mock_equipment() data = self._queue_message( 'tests/json/messages/queue/equipment.json') data_ret = self._update_message( 'tests/json/messages/updates/comp_unit.json') for i in range(3): kind = Kind() res = kind.comp_unit(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_comp_unit_acs(self): self._mock_equipment_acs() data = self._queue_message( 'tests/json/messages/queue/equipment_acs.json') data_ret = self._update_message( 'tests/json/messages/updates/comp_unit_acs.json') for i in range(3): kind = Kind() res = kind.comp_unit(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_vip(self): self._mock_vip() data = self._queue_message( 'tests/json/messages/queue/vip_request.json') data_ret = self._update_message('tests/json/messages/updates/vip.json') for i in range(3): kind = Kind() res = kind.vip(data[i]) self.assertDictEqual(res[0], data_ret[i]) # TODO # def test_vip_port(self): # self._mock_vip_by_portpool_id() # data = self._queue_message( # 'tests/json/messages/queue/vip_request_port.json') # data_ret = self._update_message('tests/json/messages/updates/port.json') # for i in range(3): # kind = Kind() # res = kind.port(data[i]) # self.assertDictEqual(res[0], data_ret[i]) def test_port(self): self._mock_vip_by_portpool_id() data = self._queue_message( 'tests/json/messages/queue/vip_request_port_pool.json') data_ret = self._update_message( 'tests/json/messages/updates/port.json') for i in range(3): kind = Kind() res = kind.port(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_pool(self): self._mock_pool() data = self._queue_message( 'tests/json/messages/queue/server_pool.json') data_ret = self._update_message( 'tests/json/messages/updates/pool.json') for i in range(3): kind = Kind() res = kind.pool(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_pool_comp_unit(self): self._mock_pool_member_id() data = self._queue_message( 'tests/json/messages/queue/server_pool_member.json') data_ret = self._update_message( 'tests/json/messages/updates/pool_comp_unit.json') for i in range(3): kind = Kind() res = kind.pool_comp_unit(data[i]) self.assertDictEqual(res[0], data_ret[i]) def test_pool_comp_unit_acs(self): self._mock_pool_member_id_acs() data = self._queue_message( 'tests/json/messages/queue/server_pool_member.json') data_ret = self._update_message( 'tests/json/messages/updates/pool_comp_unit_acs.json') for i in range(3): kind = Kind() res = kind.pool_comp_unit(data[i]) self.assertDictEqual(res[0], data_ret[i]) ################ # Non Existent # ################ def test_vip_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_vip').start() napi_mock.return_value = [] data = self._queue_message( 'tests/json/messages/queue/vip_request.json') kind = Kind() res = kind.vip(data[1]) self.assertEqual(res, []) def test_port_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_vip_by_portpool_id').start() napi_mock.return_value = [] data = self._queue_message( 'tests/json/messages/queue/vip_request_port_pool.json') kind = Kind() res = kind.port(data[1]) self.assertEqual(res, []) def test_pool_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_pool').start() napi_mock.return_value = [] data = self._queue_message( 'tests/json/messages/queue/server_pool.json') kind = Kind() res = kind.pool(data[1]) self.assertEqual(res, []) def test_pool_comp_unit_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_pool_by_member_id').start() napi_mock.return_value = [] data = self._queue_message( 'tests/json/messages/queue/server_pool_member.json') kind = Kind() res = kind.pool_comp_unit(data[1]) self.assertEqual(res, []) def test_environment_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_environment').start() napi_mock.return_value = [] data = self._queue_message( 'tests/json/messages/queue/environment.json') kind = Kind() res = kind.environment(data[1]) self.assertEqual(res, []) def test_father_environment_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_environment').start() napi_mock.return_value = [] data = self._queue_message( 'tests/json/messages/queue/environment.json') kind = Kind() res = kind.father_environment(data[1]) self.assertEqual(res, []) def test_environment_vlan_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_vlan').start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/vlan.json') kind = Kind() res = kind.environment_vlan(data[1]) self.assertEqual(res, []) def test_vlan_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_vlan').start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/vlan.json') kind = Kind() res = kind.vlan(data[1]) self.assertEqual(res, []) def test_vlan_networkv4_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_network_ipv4_id').start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/networkv4.json') kind = Kind() res = kind.vlan_network_v4(data[1]) self.assertEqual(res, []) def test_vlan_networkv6_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_network_ipv6_id').start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/networkv6.json') kind = Kind() res = kind.vlan_network_v6(data[1]) self.assertEqual(res, []) def test_networkv4_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_network_ipv4_id').start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/networkv4.json') kind = Kind() res = kind.network_v4(data[1]) self.assertEqual(res, []) def test_networkv6_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_network_ipv6_id').start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/networkv6.json') kind = Kind() res = kind.network_v6(data[1]) self.assertEqual(res, []) def test_network_v4_comp_unit_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_ipv4_by_ip_equipment_id').start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/ipv4_eqpt.json') kind = Kind() res = kind.network_v4_comp_unit(data[0]) self.assertEqual(res, []) def test_network_v6_comp_unit_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_ipv6_by_ip_equipment_id').start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/ipv6_eqpt.json') kind = Kind() res = kind.network_v6_comp_unit(data[0]) self.assertEqual(res, []) def test_comp_unit_non_existent(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_equipment').start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/equipment.json') kind = Kind() res = kind.comp_unit(data[0]) self.assertEqual(res, []) def test_network_v4_comp_unit_update(self): kind = Kind() res = kind.network_v4_comp_unit({ 'action': 'Alterar', 'data': {'id_object': 1} }) self.assertEqual(res, []) def test_network_v6_comp_unit_update(self): kind = Kind() res = kind.network_v6_comp_unit({ 'action': 'Alterar', 'data': {'id_object': 1} }) self.assertEqual(res, []) ######### # MOCKS # ######### def _mock_environment(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_environment').start() data = open_json('tests/json/messages/networkapi/get_environment.json') napi_mock.return_value = data['environments'][0] def _mock_vlan(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_vlan').start() data = open_json('tests/json/messages/networkapi/get_vlan.json') napi_mock.return_value = data['vlans'][0] def _mock_networkv4(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_network_ipv4_id').start() data = open_json('tests/json/messages/networkapi/get_networkv4.json') napi_mock.return_value = data['networks'][0] def _mock_networkv6(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_network_ipv6_id').start() data = open_json('tests/json/messages/networkapi/get_networkv6.json') napi_mock.return_value = data['networks'][0] def _mock_ipv4(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_ipv4_by_ip_equipment_id').start() data = open_json('tests/json/messages/networkapi/get_ipv4.json') napi_mock.return_value = data['ips'][0] def _mock_ipv6(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_ipv6_by_ip_equipment_id').start() data = open_json('tests/json/messages/networkapi/get_ipv6.json') napi_mock.return_value = data['ips'][0] def _mock_equipment(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_equipment').start() data = open_json('tests/json/messages/networkapi/get_equipment.json') napi_mock.return_value = data['equipments'][0] def _mock_equipment_acs(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_equipment').start() data = open_json( 'tests/json/messages/networkapi/get_equipment_acs.json') napi_mock.return_value = data['equipments'][0] def _mock_vip(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_vip').start() data = open_json('tests/json/messages/networkapi/get_vip.json') napi_mock.return_value = data['vips'][0] def _mock_pool_member_id(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_pool_by_member_id').start() data = open_json('tests/json/messages/networkapi/get_pool.json') napi_mock.return_value = data['server_pools'][0] def _mock_pool_member_id_acs(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_pool_by_member_id').start() data = open_json('tests/json/messages/networkapi/get_pool_acs.json') napi_mock.return_value = data['server_pools'][0] def _mock_vip_by_portpool_id(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_vip_by_portpool_id').start() data = open_json('tests/json/messages/networkapi/get_vip.json') napi_mock.return_value = data['vips'][0] def _mock_pool(self): napi_mock = patch( 'globomap_driver_napi.networkapi.NetworkAPI.get_pool').start() data = open_json('tests/json/messages/networkapi/get_pool.json') napi_mock.return_value = data['server_pools'][0] def _queue_message(self, file_name): data = open_json(file_name) return data def _update_message(self, file_name): data = open_json(file_name) return data if __name__ == '__main__': unittest2.main()
32.304054
93
0.624294
2,369
19,124
4.741241
0.061207
0.054487
0.10292
0.117521
0.919338
0.916578
0.899217
0.892628
0.871795
0.818198
0
0.011363
0.259099
19,124
591
94
32.358714
0.781354
0.048735
0
0.6691
0
0
0.261415
0.252405
0
0
0
0.001692
0.087591
1
0.126521
false
0
0.009732
0
0.145985
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
9f84c0e25bbbf25e6a86d84f4037159f082ecdde
210
py
Python
smartlearner/direction_modifiers/__init__.py
MarcCote/smartlearner
0afdcd3b38dddfee16330b8324eb3b0e224f1c2b
[ "BSD-3-Clause" ]
null
null
null
smartlearner/direction_modifiers/__init__.py
MarcCote/smartlearner
0afdcd3b38dddfee16330b8324eb3b0e224f1c2b
[ "BSD-3-Clause" ]
null
null
null
smartlearner/direction_modifiers/__init__.py
MarcCote/smartlearner
0afdcd3b38dddfee16330b8324eb3b0e224f1c2b
[ "BSD-3-Clause" ]
null
null
null
from .decreasing_learning_rate import DecreasingLearningRate from .constant_learning_rate import ConstantLearningRate from .gradient_noise import GradientNoise from .direction_clipping import DirectionClipping
42
60
0.904762
22
210
8.363636
0.636364
0.130435
0.195652
0
0
0
0
0
0
0
0
0
0.07619
210
4
61
52.5
0.948454
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
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
1
0
1
0
1
0
0
6
9fc354ba6c85b0179e6daf0943e469e3e7d83bc0
254
py
Python
openmdp/scenarios/__init__.py
GAIPS/OpenMDP
8f690a014e592a8206ec8d4a89155390658cd5d8
[ "Apache-2.0" ]
null
null
null
openmdp/scenarios/__init__.py
GAIPS/OpenMDP
8f690a014e592a8206ec8d4a89155390658cd5d8
[ "Apache-2.0" ]
null
null
null
openmdp/scenarios/__init__.py
GAIPS/OpenMDP
8f690a014e592a8206ec8d4a89155390658cd5d8
[ "Apache-2.0" ]
null
null
null
from openmdp.scenarios.CliffWalkMDP import CliffWalkMDP from openmdp.scenarios.DuoNavigationMDP import DuoNavigationMDP from openmdp.scenarios.DuoNavigationPOMDP import DuoNavigationPOMDP from openmdp.scenarios.WindyGridWorldMDP import WindyGridWorldMDP
50.8
67
0.905512
24
254
9.583333
0.333333
0.191304
0.347826
0
0
0
0
0
0
0
0
0
0.062992
254
4
68
63.5
0.966387
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
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
1
0
1
0
1
0
0
6
4c9325e9de4df7fb7677a38ce0366cc3865f645e
43
py
Python
maestro/backends/mongo/contrib/__init__.py
estudio89/maestro-python
331079cb3f0c10de2e19210cbade793544510f33
[ "BSD-3-Clause" ]
null
null
null
maestro/backends/mongo/contrib/__init__.py
estudio89/maestro-python
331079cb3f0c10de2e19210cbade793544510f33
[ "BSD-3-Clause" ]
null
null
null
maestro/backends/mongo/contrib/__init__.py
estudio89/maestro-python
331079cb3f0c10de2e19210cbade793544510f33
[ "BSD-3-Clause" ]
null
null
null
from .factory import create_mongo_provider
21.5
42
0.883721
6
43
6
1
0
0
0
0
0
0
0
0
0
0
0
0.093023
43
1
43
43
0.923077
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
4cec1b3c4eb7fdace1878ef486b86741f0b5eaed
93
py
Python
lib/core/__init__.py
JohnEskimSmith/jarm
fc2bcbd6fd5c6587522a97d583b3985ccdcde406
[ "BSD-3-Clause" ]
2
2020-11-28T12:22:52.000Z
2020-12-17T09:10:09.000Z
lib/core/__init__.py
JohnEskimSmith/jarm
fc2bcbd6fd5c6587522a97d583b3985ccdcde406
[ "BSD-3-Clause" ]
null
null
null
lib/core/__init__.py
JohnEskimSmith/jarm
fc2bcbd6fd5c6587522a97d583b3985ccdcde406
[ "BSD-3-Clause" ]
null
null
null
from .stats import * from .templates import * from .configs import * from .jarm_calc import *
23.25
24
0.752688
13
93
5.307692
0.538462
0.434783
0
0
0
0
0
0
0
0
0
0
0.16129
93
4
25
23.25
0.884615
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
4cf8a265f3dab4070d25b70d985201d4b26ee8b7
43
py
Python
ardy/core/invoke/__init__.py
avara1986/ardy
1942413f12e117b991278cada69f478474b9b94b
[ "Apache-2.0" ]
3
2017-07-07T06:39:36.000Z
2017-11-29T23:09:37.000Z
ardy/core/invoke/__init__.py
avara1986/ardy
1942413f12e117b991278cada69f478474b9b94b
[ "Apache-2.0" ]
3
2017-07-06T20:23:30.000Z
2018-11-05T21:15:48.000Z
ardy/core/invoke/__init__.py
avara1986/ardy
1942413f12e117b991278cada69f478474b9b94b
[ "Apache-2.0" ]
null
null
null
from ardy.core.invoke.invoke import Invoke
21.5
42
0.837209
7
43
5.142857
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.093023
43
1
43
43
0.923077
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
e2388d1857d18d89e4c90be86639a6c4fed6b854
93
py
Python
MyLibrary/__init__.py
lachlangrose/python_template
9871a4ccd0e17fc87937a58e7753be54311eec9a
[ "MIT" ]
null
null
null
MyLibrary/__init__.py
lachlangrose/python_template
9871a4ccd0e17fc87937a58e7753be54311eec9a
[ "MIT" ]
16
2021-09-07T03:42:33.000Z
2021-12-06T04:58:43.000Z
MyLibrary/__init__.py
lachlangrose/python_template
9871a4ccd0e17fc87937a58e7753be54311eec9a
[ "MIT" ]
null
null
null
import importlib.metadata __version__ = importlib.metadata.version('python_template') # bump
23.25
59
0.827957
10
93
7.2
0.7
0.472222
0.666667
0
0
0
0
0
0
0
0
0
0.075269
93
3
60
31
0.837209
0.043011
0
0
0
0
0.172414
0
0
0
0
0
0
1
0
false
0
1
0
1
0
1
0
0
null
1
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
1
0
0
6
e23b2843f8ee9cc97cad7dd37e90ad03adb2e0a5
12,620
py
Python
ParamGenerator/Phoenics/BayesianNeuralNetwork/pymc3_interface_backup.py
Tabor-Research-Group/ChemOS
50117f572e95e68dc4dccb624cedb28dbfc6e419
[ "Apache-2.0" ]
72
2018-01-19T21:08:38.000Z
2022-03-26T08:44:49.000Z
ParamGenerator/Phoenics/BayesianNeuralNetwork/pymc3_interface_backup.py
Tabor-Research-Group/ChemOS
50117f572e95e68dc4dccb624cedb28dbfc6e419
[ "Apache-2.0" ]
6
2018-12-14T02:44:51.000Z
2022-02-16T08:01:12.000Z
ParamGenerator/Phoenics/BayesianNeuralNetwork/pymc3_interface_backup.py
Tabor-Research-Group/ChemOS
50117f572e95e68dc4dccb624cedb28dbfc6e419
[ "Apache-2.0" ]
16
2018-06-20T11:34:30.000Z
2022-01-07T17:51:22.000Z
#!/usr/bin/env python __author__ = 'Florian Hase' #======================================================================== import theano import theano.tensor as T import numpy as np import pymc3 as pm from Utils.utils import VarDictParser from BayesianNeuralNetwork.distributions import DiscreteLaplace #======================================================================== class Pymc3Network(VarDictParser): def __init__(self, var_dicts, observed_params, observed_losses, batch_size, model_details): VarDictParser.__init__(self, var_dicts) self.observed_params = observed_params self.observed_losses = observed_losses self.num_obs = len(self.observed_losses) self.batch_size = batch_size self.model_details = model_details for key, value in self.model_details.items(): setattr(self, str(key), value) self._get_weights_and_bias_shapes() self._process_network_inputs() def __get_weights(self, index, shape, scale = None): return pm.Normal('w%d' % index, self.weight_loc, self.weight_scale, shape = shape) def __get_biases(self, index, shape, scale = None): return pm.Normal('b%d' % index, self.weight_loc, self.weight_scale, shape = shape) def weight(self, index): return getattr(self, 'w%d' % index) def bias(self, index): return getattr(self, 'b%d' % index) def _get_weight_and_bias_shapes(self): self.weight_shapes = [[self.observed_params.shape[1], self.hidden_shape]] self.bias_shapes = [[self.hidden_shape]] for index in range(1, self.num_layers - 1): self.weight_shapes.append([self.hidden_shape, self.hidden_shape]) self.bias_shapes.append([self.hidden_shape]) self.weight_shapes.append([self.hidden_shape, self.observed_params.shape[1]]) self.bias_shapes.append([self.observed_params.shape[1]]) def _process_network_inputs(self): print('OBS', self.observed_params) quit() def _get_rescalings(self): # compute rescaling factors for the different variables in the system # these rescaling factors will eventually substitute the 1.2 and 0.1 in the model below self.upper_rescalings = np.empty(self.total_size) self.lower_rescalings = np.empty(self.total_size) for var_p_index, var_p_name in enumerate(self.var_p_names): high = self.var_p_highs[var_p_index] low = self.var_p_lows[var_p_index] if self.var_p_types[var_p_index] == 'float': self.upper_rescalings[var_p_index] = high + 0.1 * (high - low) self.lower_rescalings[var_p_index] = low - 0.1 * (high - low) elif self.var_p_types[var_p_index] == 'integer': self.upper_rescalings[var_p_index] = high# + np.ceil(0.1 * (high - low)) self.lower_rescalings[var_p_index] = low# - np.ceil(0.1 * (high - low)) # and don't forget to rescale the network input self.network_input = 2. * (self.observed_params - self.lower_rescalings) / (self.upper_rescalings - self.lower_rescalings) - 1. print('OBSERVED_PARAMS', self.observed_params) print('NETWORK_INPUT', self.network_input) quit() #======================================================================== class Pymc3Network(VarDictParser): def __init__(self, var_dicts, observed_params, observed_losses, batch_size, model_details): VarDictParser.__init__(self, var_dicts) self.observed_params = observed_params self.observed_losses = observed_losses self.num_obs = len(self.observed_losses) self.batch_size = batch_size self.model_details = model_details for key, value in self.model_details.items(): setattr(self, str(key), value) self._get_weight_and_bias_shapes() def _get_weight_and_bias_shapes(self): self.weight_shapes = [[self.observed_params.shape[1], self.hidden_shape]] self.bias_shapes = [[self.hidden_shape]] for index in range(1, self.num_layers - 1): self.weight_shapes.append([self.hidden_shape, self.hidden_shape]) self.bias_shapes.append([self.hidden_shape]) self.weight_shapes.append([self.hidden_shape, self.observed_params.shape[1]]) self.bias_shapes.append([self.observed_params.shape[1]]) def __get_weights(self, index, shape, scale = None): return pm.Normal('w%d' % index, self.weight_loc, self.weight_scale, shape = shape) def __get_biases(self, index, shape, scale = None): return pm.Normal('b%d' % index, self.weight_loc, self.weight_scale, shape = shape) def weight(self, index): return getattr(self, 'w%d' % index) def bias(self, index): return getattr(self, 'b%d' % index) def _get_rescalings(self): # compute rescaling factors for the different variables in the system # these rescaling factors will eventually substitute the 1.2 and 0.1 in the model below self.upper_rescalings = np.empty(self.total_size) self.lower_rescalings = np.empty(self.total_size) for var_p_index, var_p_name in enumerate(self.var_p_names): high = self.var_p_highs[var_p_index] low = self.var_p_lows[var_p_index] if self.var_p_types[var_p_index] == 'float': self.upper_rescalings[var_p_index] = high + 0.1 * (high - low) self.lower_rescalings[var_p_index] = low - 0.1 * (high - low) elif self.var_p_types[var_p_index] == 'integer': self.upper_rescalings[var_p_index] = high# + np.ceil(0.1 * (high - low)) self.lower_rescalings[var_p_index] = low# - np.ceil(0.1 * (high - low)) # and don't forget to rescale the network input self.network_input = 2. * (self.observed_params - self.lower_rescalings) / (self.upper_rescalings - self.lower_rescalings) - 1. print('OBSERVED_PARAMS', self.observed_params) print('NETWORK_INPUT', self.network_input) quit() def _get_categorical_observations(self): # note that we might have multiple categorical variables with a different number of categories cat_obs = [] for var_p_index, var_p_type in enumerate(self.var_p_types): if var_p_type == 'categorical': new_cat_obs = np.zeros((self.num_obs, len(self.var_p_options[var_p_index]))) for obs_index, obs in enumerate(self.observed_params[:, var_p_index]): new_cat_obs[obs_index, int(obs)] += 1 cat_obs.append(new_cat_obs.copy()) self.cat_obs = cat_obs def _create_model(self): self._get_rescalings() self._get_categorical_observations() with pm.Model() as self.model: # getting the location for layer_index in range(self.num_layers): setattr(self, 'w%d' % layer_index, self.__get_weights(layer_index, self.weight_shapes[layer_index])) setattr(self, 'b%d' % layer_index, self.__get_biases(layer_index, self.bias_shapes[layer_index])) if layer_index == 0: fc = pm.Deterministic('fc%d' % layer_index, pm.math.tanh(pm.math.dot(self.network_input, self.weight(layer_index)) + self.bias(layer_index))) setattr(self, 'fc%d' % layer_index, fc) elif 0 < layer_index < self.num_layers - 1: fc = pm.Deterministic('fc%d' % layer_index, pm.math.tanh(pm.math.dot(getattr(self, 'fc%d' % (layer_index - 1)), self.weight(layer_index)) + self.bias(layer_index))) setattr(self, 'fc%d' % layer_index, fc) else: # self.loc = pm.Deterministic('loc', (self.upper_rescalings - self.lower_rescalings) * pm.math.sigmoid(pm.math.dot(getattr(self, 'fc%d' % (layer_index - 1)), self.weight(layer_index)) + self.bias(layer_index)) + self.lower_rescalings) self._loc = pm.Deterministic('_loc', pm.math.sigmoid(pm.math.dot(getattr(self, 'fc%d' % (layer_index - 1)), self.weight(layer_index)) + self.bias(layer_index)) ) # getting the precision / standard deviation / variance self.tau_rescaling = np.zeros((self.num_obs, self.observed_params.shape[1])) for obs_index in range(self.num_obs): self.tau_rescaling[obs_index] += self.var_p_ranges self.tau_rescaling = self.tau_rescaling**2 self.tau = pm.Gamma('tau', self.num_obs**2, 1., shape = (self.num_obs, self.observed_params.shape[1])) # self.tau = pm.Gamma('tau', self.num_obs**1.5, 1., shape = (self.num_obs, self.observed_params.shape[1])) self.tau = self.tau / self.tau_rescaling # self.sd = pm.Deterministic('sd', 0.05 + 1. / pm.math.sqrt(self.tau)) self.scale = pm.Deterministic('scale', 1. / pm.math.sqrt(self.tau)) # learn the floats self.loc = pm.Deterministic('loc', (self.upper_rescalings - self.lower_rescalings) * self._loc + self.lower_rescalings) self.out_floats = pm.Normal('out_floats', self.loc[:, self._floats], tau = self.tau[:, self._floats], observed = self.observed_params[:, self._floats]) # learn the integers self.out_ints = DiscreteLaplace('out_ints', loc = self.loc[:, self._ints], scale = self.scale[:, self._ints], observed = self.observed_params[:, self._ints]) # learn the categories # alpha = self.loc * (self.loc * (1 - self.loc) * self.tau - 1) # beta = (1 - self.loc) * (self.loc * (1 - self.loc) * self.tau - 1) # self.alpha = pm.Deterministic('alpha', alpha) # self.beta = pm.Deterministic('beta', beta) # self.p = pm.Beta('p', alpha = self.alpha, beta = self.beta) # print('ALL_PARAMS', self.observed_params) # print('OBSERV', self.observed_params[:, self._cats]) self.probs = pm.Deterministic('a_dirich', self._loc * self.tau) for cat_obs_index in range(len(self.cat_obs)): # print(self._cats) # print(self._cats[cat_obs_index]) # indices = np.array([self._cats[cat_obs_index]]) # print('INDICES', indices) # print(self.probs[:, self._cats]) # cat_specific_indices = out_cats = pm.Dirichlet('out_cats_%d' % cat_obs_index, a = self.probs[:, cat_specific_indices], observed = self.cat_obs[cat_obs_index]) setattr(self, 'out_cats_%d' % cat_obs_index, out_cats) # self.out_cats = pm.Dirichlet('out_cats', a = self.probs[:, self._cats], observed = self.observed_params[:, self._cats]) # self.out_cats = pm.Normal('p', loc = self.loc[:, self._cats], tau = self.tau[:, self._cats], observed = self.observed_params[:, self._cats]) # perhaps constrain this to only positive numbers! # self.out_cats = pm.Categorical('out_cats', p = self.p, observed = self.observed_params[:, self._cats]) def _create_model_old(self): self._get_rescalings() with pm.Model() as self.model: # getting the location for layer_index in range(self.num_layers): setattr(self, 'w%d' % layer_index, self.__get_weights(layer_index, self.weight_shapes[layer_index])) setattr(self, 'b%d' % layer_index, self.__get_biases(layer_index, self.bias_shapes[layer_index])) if layer_index == 0: fc = pm.Deterministic('fc%d' % layer_index, pm.math.tanh(pm.math.dot(self.network_input, self.weight(layer_index)) + self.bias(layer_index))) setattr(self, 'fc%d' % layer_index, fc) elif 0 < layer_index < self.num_layers - 1: fc = pm.Deterministic('fc%d' % layer_index, pm.math.tanh(pm.math.dot(getattr(self, 'fc%d' % (layer_index - 1)), self.weight(layer_index)) + self.bias(layer_index))) setattr(self, 'fc%d' % layer_index, fc) else: self.loc = pm.Deterministic('loc', (self.upper_rescalings - self.lower_rescalings) * pm.math.sigmoid(pm.math.dot(getattr(self, 'fc%d' % (layer_index - 1)), self.weight(layer_index)) + self.bias(layer_index)) + self.lower_rescalings) # getting the standard deviation (or rather precision) self.tau_rescaling = np.zeros((self.num_obs, self.observed_params.shape[1])) for obs_index in range(self.num_obs): self.tau_rescaling[obs_index] += self.domain_ranges self.tau_rescaling = self.tau_rescaling**2 self.tau = pm.Gamma('tau', self.num_obs**2, 1., shape = (self.num_obs, self.observed_params.shape[1])) self.tau = self.tau / self.tau_rescaling # self.sd = pm.Deterministic('sd', 0.05 + 1. / pm.math.sqrt(self.tau)) self.scale = pm.Deterministic('scale', 1. / pm.math.sqrt(self.tau)) print(self.observed_params.shape) print(self._floats) print(self._integers) quit() # now that we got all locations and scales we can start getting the distributions # floats are easy, as we can take loc and scale as they are self.out = pm.Normal('out', self.loc, tau = self.tau, observed = self.observed_params) # integers are a bit more tricky and require the following transformation for the beta binomial alpha = ((n - mu) / sigma**2 - 1) / (n / mu - (n - mu) / sigma**2) beta = (n / mu - 1) * alpha self.alpha = pm.Deterministic('alpha', alpha) self.beta = pm.Deterministic('beta', beta) def _sample(self, num_epochs = None, num_draws = None): if not num_epochs: num_epochs = self.num_epochs if not num_draws: num_draws = self.num_draws with self.model: approx = pm.fit(n = num_epochs, obj_optimizer = pm.adam(learning_rate = self.learning_rate)) self.trace = approx.sample(draws = num_draws)
41.788079
238
0.699683
1,896
12,620
4.412975
0.111814
0.053783
0.060237
0.020198
0.765268
0.732999
0.713278
0.713278
0.700849
0.700849
0
0.007998
0.14794
12,620
301
239
41.92691
0.770111
0.221712
0
0.71345
0
0
0.028235
0
0
0
0
0
0
1
0.111111
false
0
0.035088
0.046784
0.204678
0.046784
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
e2a74dbe11a69ce1123a5f493329b594d41cc68e
96
py
Python
venv/lib/python3.8/site-packages/poetry/console/commands/config.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/poetry/console/commands/config.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/poetry/console/commands/config.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/e0/3c/d7/56913e00137a9bdab4e9cb1d3d22b887617c9d3eea1861f0c7cf25618b
96
96
0.895833
9
96
9.555556
1
0
0
0
0
0
0
0
0
0
0
0.40625
0
96
1
96
96
0.489583
0
0
0
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
6
2c5981046de830e6f0599bb7e5c886f933a60466
42
py
Python
pywick/modules/__init__.py
achaiah/pywick
9d663faf0c1660a9b8359a6472c164f658dfc8cb
[ "MIT" ]
408
2019-05-16T16:12:41.000Z
2022-03-26T17:27:12.000Z
pywick/modules/__init__.py
ashishpatel26/pywick
1afffd1c21c2b188836d3599e802146182757bb5
[ "MIT" ]
13
2019-05-17T05:47:06.000Z
2021-06-21T19:02:30.000Z
pywick/modules/__init__.py
ashishpatel26/pywick
1afffd1c21c2b188836d3599e802146182757bb5
[ "MIT" ]
42
2019-05-16T19:57:12.000Z
2022-03-06T15:23:18.000Z
from .module_trainer import ModuleTrainer
21
41
0.880952
5
42
7.2
1
0
0
0
0
0
0
0
0
0
0
0
0.095238
42
1
42
42
0.947368
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
1
0
1
0
0
6
2c7d5c98364c1da8139d6a63051b9a8fe315209d
336
py
Python
insights/tests/test_canonical_facts.py
lhuett/insights-core
1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8
[ "Apache-2.0" ]
null
null
null
insights/tests/test_canonical_facts.py
lhuett/insights-core
1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8
[ "Apache-2.0" ]
null
null
null
insights/tests/test_canonical_facts.py
lhuett/insights-core
1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8
[ "Apache-2.0" ]
null
null
null
from insights.util.canonical_facts import _filter_falsy def test_identity(): assert {"foo": "bar"} == _filter_falsy({"foo": "bar"}) def test_drops_none(): assert {"foo": "bar"} == _filter_falsy({"foo": "bar", "baz": None}) def test_drops_empty_list(): assert {"foo": "bar"} == _filter_falsy({"foo": "bar", "baz": []})
24
71
0.627976
44
336
4.454545
0.431818
0.183673
0.183673
0.27551
0.47449
0.47449
0.47449
0.326531
0
0
0
0
0.14881
336
13
72
25.846154
0.685315
0
0
0
0
0
0.125
0
0
0
0
0
0.428571
1
0.428571
true
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
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
1
0
0
6
2c91c5815282c1bd5bfe35b399a12b07525fe604
8,257
py
Python
hfnet/export_predictions.py
CaiYingFeng/hfnet
b430d0fb192fccbd42e6a19e06eeda5b805e2d1c
[ "MIT" ]
null
null
null
hfnet/export_predictions.py
CaiYingFeng/hfnet
b430d0fb192fccbd42e6a19e06eeda5b805e2d1c
[ "MIT" ]
null
null
null
hfnet/export_predictions.py
CaiYingFeng/hfnet
b430d0fb192fccbd42e6a19e06eeda5b805e2d1c
[ "MIT" ]
null
null
null
# import numpy as np # import argparse # import yaml # import logging # from pathlib import Path # from tqdm import tqdm # from pprint import pformat # logging.basicConfig(format='[%(asctime)s %(levelname)s] %(message)s', # datefmt='%m/%d/%Y %H:%M:%S', # level=logging.INFO) # from hfnet.models import get_model # noqa: E402 # from hfnet.datasets import get_dataset # noqa: E402 # from hfnet.utils import tools # noqa: E402 # from hfnet.settings import EXPER_PATH, DATA_PATH # noqa: E402 # if __name__ == '__main__': # parser = argparse.ArgumentParser() # parser.add_argument('config', type=str) # parser.add_argument('export_name', type=str) # parser.add_argument('--keys', type=str, default='*') # parser.add_argument('--exper_name', type=str) # parser.add_argument('--as_dataset', action='store_true') # args = parser.parse_args() # export_name = args.export_name # exper_name = args.exper_name # with open(args.config, 'r') as f: # config = yaml.load(f) # keys = '*' if args.keys == '*' else args.keys.split(',') # if args.as_dataset: # base_dir = Path(DATA_PATH, export_name) # else: # base_dir = Path(EXPER_PATH, 'exports') # base_dir = Path(base_dir, ((exper_name+'/') if exper_name else '') + export_name) # base_dir.mkdir(parents=True, exist_ok=True) # if exper_name: # # Update only the model config (not the dataset) # with open(Path(EXPER_PATH, exper_name, 'config.yaml'), 'r') as f: # config['model'] = tools.dict_update( # yaml.load(f)['model'], config.get('model', {})) # checkpoint_path = Path(EXPER_PATH, exper_name) # if config.get('weights', None): # checkpoint_path = Path(checkpoint_path, config['weights']) # else: # if config.get('weights', None): # checkpoint_path = Path(DATA_PATH, 'weights', config['weights']) # else: # checkpoint_path = None # logging.info('No weights provided.') # logging.info(f'Starting export with configuration:\n{pformat(config)}') # with get_model(config['model']['name'])( # data_shape={'image': [None, None, None, config['model']['image_channels']]}, # **config['model']) as net: # if checkpoint_path is not None: # net.load(str(checkpoint_path)) # dataset = get_dataset(config['data']['name'])(**config['data']) # test_set = dataset.get_test_set() # for data in tqdm(test_set): # predictions = net.predict(data, keys=keys) # predictions['input_shape'] = data['image'].shape # name = data['name'].decode('utf-8') # Path(base_dir, Path(name).parent).mkdir(parents=True, exist_ok=True) # np.savez(Path(base_dir, '{}.npz'.format(name)), **predictions) import sys import os sys.path.append("./") import numpy as np import argparse import yaml import logging from pathlib import Path from tqdm import tqdm from pprint import pformat import h5py import os logging.basicConfig(format='[%(asctime)s %(levelname)s] %(message)s', datefmt='%m/%d/%Y %H:%M:%S', level=logging.INFO) from hfnet.models import get_model # noqa: E402 from hfnet.datasets import get_dataset # noqa: E402 from hfnet.utils import tools # noqa: E402 from hfnet.settings import EXPER_PATH, DATA_PATH # noqa: E402 if __name__ == '__main__': # os.environ["CUDA_VISIBLE_DEVICES"] = "2" parser = argparse.ArgumentParser() parser.add_argument('method',type=str) # parser.add_argument('config', type=str) # parser.add_argument('export_name', type=str) # parser.add_argument('--keys', type=str, default='*') # parser.add_argument('--exper_name', type=str) parser.add_argument('--as_dataset', action='store_true') args = parser.parse_args() #method='superpoint_queries' method=args.method if method=='hfnet_db': export_name = 'aachen' exper_name = 'hfnet' myconfig='hfnet/configs/hfnet_export_aachen_db.yaml' mykeys='keypoints,scores,local_descriptor_map,global_descriptor' if method=='hfnet_queries': export_name = 'aachen' exper_name = 'hfnet' myconfig='hfnet/configs/hfnet_export_aachen_queries.yaml' mykeys='keypoints,scores,local_descriptor_map,global_descriptor' if method=='superpoint_db': export_name = 'superpoint/aachen' exper_name='' myconfig='hfnet/configs/superpoint_export_aachen_db.yaml' mykeys='keypoints,scores,local_descriptor_map' if method=='superpoint_queries': export_name = 'superpoint/aachen' exper_name='' myconfig='hfnet/configs/superpoint_export_aachen_queries.yaml' mykeys='keypoints,scores,local_descriptor_map' if method=='netvlad': export_name = 'netvlad/aachen' exper_name='' myconfig='hfnet/configs/netvlad_export_aachen.yaml' mykeys='global_descriptor' if method=='superpoint': export_name = 'google_landmarks/superpoint_predictions' exper_name='' myconfig='hfnet/configs/superpoint_export_distill.yaml' mykeys='local_descriptor_map,dense_scores' # export_name = args.export_name # exper_name = args.exper_name with open(myconfig, 'r') as f: config = yaml.load(f) keys = '*' if mykeys == '*' else mykeys.split(',') if args.as_dataset: base_dir = Path(DATA_PATH, export_name) else: base_dir = Path(EXPER_PATH, 'exports') base_dir = Path(base_dir, ((exper_name+'/') if exper_name else '') + export_name) base_dir.mkdir(parents=True, exist_ok=True) if exper_name: # Update only the model config (not the dataset) with open(Path(EXPER_PATH, exper_name, 'config.yaml'), 'r') as f: print(Path(EXPER_PATH, exper_name, 'config.yaml')) config['model'] = tools.dict_update( yaml.load(f)['model'], config.get('model', {})) print(config['model']) checkpoint_path = Path(EXPER_PATH, exper_name) print(checkpoint_path) if config.get('weights', None): checkpoint_path = Path(checkpoint_path, config['weights']) print(checkpoint_path) else: if config.get('weights', None): checkpoint_path = Path(DATA_PATH, 'weights', config['weights']) else: checkpoint_path = None logging.info('No weights provided.') logging.info(f'Starting export with configuration:\n{pformat(config)}') with get_model(config['model']['name'])( data_shape={'image': [None, None, None, config['model']['image_channels']]}, **config['model']) as net: if checkpoint_path is not None: net.load(str(checkpoint_path)) dataset = get_dataset(config['data']['name'])(**config['data']) test_set = dataset.get_test_set() # feature_file = h5py.File(Path(base_dir, 'all_1.h5'), 'a')#生成h5所需 for data in tqdm(test_set): # print (data) # break # print(name) predictions = net.predict(data, keys=keys) predictions['input_shape'] = data['image'].shape name = data['name'].decode('utf-8')#name: db/1606404423.00735318 Path(base_dir, Path(name).parent).mkdir(parents=True, exist_ok=True) np.savez(Path(base_dir, '{}.npz'.format(name)), **predictions) ########################### ###生成pairs需要的h5文件#### ########################### # if(name.split('.',-1)[-1]=='jpg'): # name+='.png' # else: # name+='.jpg' # grp=feature_file.create_group(name) # grp.create_dataset('global_descriptor',data=predictions['global_descriptor']) # grp.create_dataset('input_shape',data=predictions['input_shape']) # break ########################## ########################## ########################## # feature_file.close()
37.876147
91
0.603004
975
8,257
4.90359
0.151795
0.043296
0.039113
0.023426
0.848986
0.838318
0.807362
0.791257
0.775152
0.761347
0
0.008471
0.242219
8,257
217
92
38.050691
0.755634
0.43563
0
0.242105
0
0
0.23023
0.125847
0
0
0
0
0
1
0
false
0
0.157895
0
0.157895
0.052632
0
0
0
null
0
0
0
1
1
1
1
1
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
6
2cc3d0eb30bbd847b22f931349107c5d7600015f
92
py
Python
app/reviews/__init__.py
Tsmith18256/simploo-server
afecd96c87cf4f092d5e0373d1106babb3964461
[ "MIT" ]
null
null
null
app/reviews/__init__.py
Tsmith18256/simploo-server
afecd96c87cf4f092d5e0373d1106babb3964461
[ "MIT" ]
null
null
null
app/reviews/__init__.py
Tsmith18256/simploo-server
afecd96c87cf4f092d5e0373d1106babb3964461
[ "MIT" ]
null
null
null
from flask import Blueprint reviews = Blueprint('reviews', __name__) from . import routes
15.333333
40
0.771739
11
92
6.090909
0.636364
0.477612
0
0
0
0
0
0
0
0
0
0
0.152174
92
5
41
18.4
0.858974
0
0
0
0
0
0.076087
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0.666667
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
1
0
1
1
0
6
e2f7703dd74c33f4de25381d82fbc2ab20e780e2
9,958
py
Python
tests/amazon/aws/triggers/test_s3_triggers.py
astronomer/astronomer-providers
e19c656daab19f3e881f140495e2184c16eaafe0
[ "Apache-2.0" ]
27
2022-03-02T04:49:54.000Z
2022-03-30T13:19:02.000Z
tests/amazon/aws/triggers/test_s3_triggers.py
astronomer/astronomer-providers
e19c656daab19f3e881f140495e2184c16eaafe0
[ "Apache-2.0" ]
92
2022-03-02T08:01:31.000Z
2022-03-31T19:47:33.000Z
tests/amazon/aws/triggers/test_s3_triggers.py
astronomer/astronomer-providers
e19c656daab19f3e881f140495e2184c16eaafe0
[ "Apache-2.0" ]
2
2022-03-07T17:39:41.000Z
2022-03-18T20:37:03.000Z
import asyncio from datetime import datetime from unittest import mock import pytest from airflow.triggers.base import TriggerEvent from astronomer.providers.amazon.aws.triggers.s3 import ( S3KeySizeTrigger, S3KeysUnchangedTrigger, S3KeyTrigger, S3PrefixTrigger, ) def test_s3_key_trigger_serialization(): """ Asserts that the TaskStateTrigger correctly serializes its arguments and classpath. """ trigger = S3KeyTrigger(bucket_key="s3://test_bucket/file", bucket_name="test_bucket", wildcard_match=True) classpath, kwargs = trigger.serialize() assert classpath == "astronomer.providers.amazon.aws.triggers.s3.S3KeyTrigger" assert kwargs == { "bucket_name": "test_bucket", "bucket_key": "s3://test_bucket/file", "wildcard_match": True, "aws_conn_id": "aws_default", "hook_params": {}, } @pytest.mark.asyncio @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.get_client_async") async def test_s3_key_trigger_run(mock_client): """ Test if the task is run is in triggerr successfully. """ mock_client.return_value.check_key.return_value = True trigger = S3KeyTrigger(bucket_key="s3://test_bucket/file", bucket_name="test_bucket") with mock_client: task = asyncio.create_task(trigger.run().__anext__()) await asyncio.sleep(0.5) assert task.done() is True asyncio.get_event_loop().stop() @pytest.mark.asyncio @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.get_client_async") async def test_s3_key_trigger_run_exception(mock_client): """Test if the task is run is in case of exception.""" mock_client.side_effect = Exception("Unable to locate credentials") trigger = S3KeyTrigger(bucket_key="s3://test_bucket/file", bucket_name="test_bucket") generator = trigger.run() actual = await generator.asend(None) assert ( TriggerEvent( { "message": "Unable to locate credentials", "status": "error", } ) == actual ) def test_s3_key_size_trigger_serialization(): """ Asserts that the TaskStateTrigger correctly serializes its arguments and classpath. """ trigger = S3KeySizeTrigger( bucket_key="s3://test_bucket/file", bucket_name="test_bucket", wildcard_match=True ) classpath, kwargs = trigger.serialize() assert classpath == "astronomer.providers.amazon.aws.triggers.s3.S3KeySizeTrigger" assert kwargs == { "bucket_name": "test_bucket", "bucket_key": "s3://test_bucket/file", "wildcard_match": True, "aws_conn_id": "aws_default", "hook_params": {}, "check_fn_user": None, } @pytest.mark.asyncio @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.get_client_async") async def test_s3_key_size_trigger_run(mock_client): """ Test if the task is run is in trigger successfully. :return: """ mock_client.return_value.check_key.return_value = True trigger = S3KeySizeTrigger(bucket_key="s3://test_bucket/file", bucket_name="test_bucket") with mock_client: task = asyncio.create_task(trigger.run().__anext__()) await asyncio.sleep(0.5) assert task.done() is True asyncio.get_event_loop().stop() @pytest.mark.asyncio @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.get_client_async") @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.get_files") async def test_s3_key_size_trigger_run_check_fn_user_success(mock_get_files, mock_client): """ Test if the task is run is in triggerr with check_fn_user defined by user. """ mock_get_files.return_value = True def dummy_check_fn(list_obj): return True mock_client.return_value.check_key.return_value = True trigger = S3KeySizeTrigger( bucket_key="s3://test_bucket/file", bucket_name="test_bucket", check_fn=dummy_check_fn ) generator = trigger.run() actual = await generator.asend(None) assert TriggerEvent({"status": "success"}) == actual @pytest.mark.asyncio @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.get_client_async") @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.get_files") async def test_s3_key_size_trigger_run_check_fn_success(mock_get_files, mock_client): """Test if the task is run is in trigger with check_fn.""" mock_get_files.return_value = ["test"] mock_client.return_value.check_key.return_value = True trigger = S3KeySizeTrigger(bucket_key="s3://test_bucket/file", bucket_name="test_bucket") generator = trigger.run() actual = await generator.asend(None) assert TriggerEvent({"status": "success"}) == actual def test_s3_key_size_check_fn_trigger_run(): """Test if the _check_fn returns True.""" trigger = S3KeySizeTrigger(bucket_key="s3://test_bucket/file", bucket_name="test_bucket") response = trigger._check_fn(data=[]) assert response is True def test_s3_keys_unchanged_trigger_serialization(): """ Asserts that the TaskStateTrigger correctly serializes its arguments and classpath. """ trigger = S3KeysUnchangedTrigger( bucket_name="test_bucket", prefix="test", inactivity_period=1, min_objects=1, inactivity_seconds=0, previous_objects=None, ) classpath, kwargs = trigger.serialize() assert classpath == "astronomer.providers.amazon.aws.triggers.s3.S3KeysUnchangedTrigger" assert kwargs == { "bucket_name": "test_bucket", "prefix": "test", "inactivity_period": 1, "min_objects": 1, "inactivity_seconds": 0, "previous_objects": set(), "allow_delete": 1, "aws_conn_id": "aws_default", "last_activity_time": None, } @pytest.mark.asyncio @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.get_client_async") async def test_s3_keys_unchanged_trigger_run(mock_client): """Test if the task is run is in trigger successfully.""" mock_client.return_value.check_key.return_value = True trigger = S3KeysUnchangedTrigger(bucket_name="test_bucket", prefix="test") with mock_client: task = asyncio.create_task(trigger.run().__anext__()) await asyncio.sleep(0.5) assert task.done() is True asyncio.get_event_loop().stop() def test_s3_keys_unchanged_trigger_raise_value_error(): """ Test if the S3KeysUnchangedTrigger raises Value error for negative inactivity_period. """ with pytest.raises(ValueError): S3KeysUnchangedTrigger(bucket_name="test_bucket", prefix="test", inactivity_period=-100) @pytest.mark.asyncio @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.get_client_async") @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.is_keys_unchanged") async def test_s3_keys_unchanged_trigger_run_success(mock_is_keys_unchanged, mock_client): """ Test if the task is run is in triggerer successfully. """ mock_is_keys_unchanged.return_value = {"status": "success"} trigger = S3KeysUnchangedTrigger(bucket_name="test_bucket", prefix="test") generator = trigger.run() actual = await generator.asend(None) assert TriggerEvent({"status": "success"}) == actual @pytest.mark.asyncio @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.get_client_async") @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.is_keys_unchanged") async def test_s3_keys_unchanged_trigger_run_pending(mock_is_keys_unchanged, mock_client): """Test if the task is run is in triggerer successfully.""" mock_is_keys_unchanged.return_value = {"status": "pending", "last_activity_time": datetime.now()} trigger = S3KeysUnchangedTrigger(bucket_name="test_bucket", prefix="test") task = asyncio.create_task(trigger.run().__anext__()) await asyncio.sleep(0.5) # TriggerEvent was not returned assert task.done() is False asyncio.get_event_loop().stop() def test_s3_prefix_sensor_trigger_serialization(): """ Asserts that the S3 prefix trigger correctly serializes its arguments and classpath. """ trigger = S3PrefixTrigger(bucket_name="test-bucket", prefix="test") classpath, kwargs = trigger.serialize() assert classpath == "astronomer.providers.amazon.aws.triggers.s3.S3PrefixTrigger" assert kwargs == { "bucket_name": "test-bucket", "prefix": ["test"], "delimiter": "/", "aws_conn_id": "aws_default", "verify": None, "hook_params": {}, } @pytest.mark.asyncio @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.get_client_async") @mock.patch("astronomer.providers.amazon.aws.hooks.s3.S3HookAsync._check_for_prefix") async def test_s3_prefix_sensor_trigger_success(mock_check_for_prefix, mock_client): """Test if the S3 prefix trigger fires correct event in case of success.""" mock_check_for_prefix.return_value = True mock_client.return_value.check_key.return_value = True trigger = S3PrefixTrigger(bucket_name="test-bucket", prefix="test") generator = trigger.run() actual = await generator.asend(None) assert TriggerEvent({"status": "success", "message": "Success criteria met. Exiting."}) == actual @pytest.mark.asyncio @mock.patch("astronomer.providers.amazon.aws.triggers.s3.S3HookAsync.get_client_async") async def test_s3_prefix_sensor_trigger_failure(mock_client): """Test if the S3 prefix trigger fires correct event in case of failure.""" mock_client.side_effect = Exception("Test exception") trigger = S3PrefixTrigger(bucket_name="test-bucket", prefix="test") task = [i async for i in trigger.run()] assert len(task) == 1 assert TriggerEvent({"status": "error", "message": "Test exception"}) in task
37.29588
110
0.716409
1,248
9,958
5.455929
0.116987
0.044059
0.073432
0.082244
0.848876
0.814951
0.79483
0.780291
0.725804
0.712586
0
0.01302
0.167001
9,958
266
111
37.43609
0.807836
0.049106
0
0.521739
0
0
0.273973
0.174629
0
0
0
0
0.108696
1
0.038043
false
0
0.032609
0.005435
0.076087
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
392c581240800cad72d28f81242639c3bbfc185a
79
py
Python
robot/JavaLib/src/test/robotframework/acceptance/calculator.py
Zhou6ang/TA
016db64c94bd7dae7b734795eb88b6a5ef0a6f2b
[ "Apache-2.0" ]
null
null
null
robot/JavaLib/src/test/robotframework/acceptance/calculator.py
Zhou6ang/TA
016db64c94bd7dae7b734795eb88b6a5ef0a6f2b
[ "Apache-2.0" ]
null
null
null
robot/JavaLib/src/test/robotframework/acceptance/calculator.py
Zhou6ang/TA
016db64c94bd7dae7b734795eb88b6a5ef0a6f2b
[ "Apache-2.0" ]
null
null
null
__author__ = 'ganzhou' def result(input1,input2): return input1+input2+1;
15.8
27
0.721519
10
79
5.3
0.8
0.45283
0
0
0
0
0
0
0
0
0
0.074627
0.151899
79
4
28
19.75
0.716418
0
0
0
0
0
0.088608
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
0.666667
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
1
0
0
0
1
1
0
0
6
3933cb5de0960b5b18fb3bf6a3144f2518edc267
92
py
Python
notebooks/ipython-master/setupext/__init__.py
burkesquires/jupyter_training_2020
63505d9b8133f80330fe92a74b7641066dba420c
[ "MIT" ]
2
2020-11-18T19:29:20.000Z
2021-09-09T13:52:29.000Z
ipython-7.29.0/setupext/__init__.py
JohnLauFoo/clc_packages_Yu
259f01d9b5c02154ce258734d519ae8995cd0991
[ "MIT" ]
null
null
null
ipython-7.29.0/setupext/__init__.py
JohnLauFoo/clc_packages_Yu
259f01d9b5c02154ce258734d519ae8995cd0991
[ "MIT" ]
2
2020-11-18T19:39:31.000Z
2021-11-17T07:49:09.000Z
# load extended setup modules for distutils from .install_data_ext import install_data_ext
23
46
0.847826
14
92
5.285714
0.785714
0.297297
0.378378
0
0
0
0
0
0
0
0
0
0.130435
92
3
47
30.666667
0.925
0.445652
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
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
1
0
1
0
0
0
0
6
1a48f9fe1024ca5b68910751dee2743bc1abb0ff
100
py
Python
http/http_site/url_dispatcher_app/views.py
domenicosolazzo/practice-django
44e74c973384c38bd71e7c8a1aacd1e10d6a6893
[ "MIT" ]
null
null
null
http/http_site/url_dispatcher_app/views.py
domenicosolazzo/practice-django
44e74c973384c38bd71e7c8a1aacd1e10d6a6893
[ "MIT" ]
2
2021-06-10T19:42:02.000Z
2021-06-10T19:50:52.000Z
http/http_site/url_dispatcher_app/views.py
domenicosolazzo/practice-django
44e74c973384c38bd71e7c8a1aacd1e10d6a6893
[ "MIT" ]
null
null
null
from django.shortcuts import render # Create your views here. def page(request, num="1"): pass
16.666667
35
0.72
15
100
4.8
1
0
0
0
0
0
0
0
0
0
0
0.012195
0.18
100
5
36
20
0.865854
0.23
0
0
0
0
0.013333
0
0
0
0
0
0
1
0.333333
false
0.333333
0.333333
0
0.666667
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
1
1
0
1
0
0
6
1a6372d4e155397761608f8acbcee405e59e107d
17,688
py
Python
traffic_control/tests/test_operational_area_api_permission.py
City-of-Helsinki/city-infrastructure-platform
c14513a9e54405412085f1047f91ec58b263eac0
[ "CC0-1.0" ]
2
2020-11-23T22:08:58.000Z
2022-03-02T13:13:20.000Z
traffic_control/tests/test_operational_area_api_permission.py
City-of-Helsinki/city-infrastructure-platform
c14513a9e54405412085f1047f91ec58b263eac0
[ "CC0-1.0" ]
170
2019-12-31T13:37:04.000Z
2022-03-12T14:03:35.000Z
traffic_control/tests/test_operational_area_api_permission.py
City-of-Helsinki/city-infrastructure-platform
c14513a9e54405412085f1047f91ec58b263eac0
[ "CC0-1.0" ]
3
2020-05-08T05:58:02.000Z
2022-03-15T16:07:25.000Z
import json import pytest from django.conf import settings from django.contrib.auth.models import Permission from django.contrib.gis.geos import MultiPolygon, Point, Polygon from django.urls import reverse from django.utils.translation import gettext_lazy as _ from rest_framework import status from traffic_control import models from traffic_control.models import BarrierPlan, Lifecycle from traffic_control.tests.factories import ( get_additional_sign_plan, get_additional_sign_real, get_api_client, get_barrier_plan, get_barrier_real, get_mount_plan, get_mount_real, get_operational_area, get_owner, get_plan, get_road_marking_plan, get_road_marking_real, get_signpost_plan, get_signpost_real, get_traffic_control_device_type, get_traffic_light_plan, get_traffic_light_real, get_traffic_sign_plan, get_traffic_sign_real, get_user, ) test_point_inside_area = Point(20.0, 20.0, 0.0, srid=settings.SRID) test_point_outside_area = Point(-20.0, -20.0, 0.0, srid=settings.SRID) test_3d_point_inside_area = Point(20.0, 20.0, 0.0, srid=settings.SRID) test_3d_point_outside_area = Point(-20.0, -20.0, 0.0, srid=settings.SRID) test_multipolygon_inside_area = MultiPolygon( Polygon( ( (20.0, 20.0, 0.0), (20.0, 30.0, 0.0), (30.0, 30.0, 0.0), (30.0, 20.0, 0.0), (20.0, 20.0, 0.0), ), srid=settings.SRID, ), srid=settings.SRID, ) test_multipolygon_outside_area = MultiPolygon( Polygon( ( (-20.0, -20.0, 0.0), (-20.0, -30.0, 0.0), (-30.0, -30.0, 0.0), (-30.0, -20.0, 0.0), (-20.0, -20.0, 0.0), ), srid=settings.SRID, ), srid=settings.SRID, ) model_factory_map = { "AdditionalSignPlan": get_additional_sign_plan, "AdditionalSignReal": get_additional_sign_real, "BarrierPlan": get_barrier_plan, "BarrierReal": get_barrier_real, "MountPlan": get_mount_plan, "MountReal": get_mount_real, "Plan": get_plan, "RoadMarkingPlan": get_road_marking_plan, "RoadMarkingReal": get_road_marking_real, "SignpostPlan": get_signpost_plan, "SignpostReal": get_signpost_real, "TrafficLightPlan": get_traffic_light_plan, "TrafficLightReal": get_traffic_light_real, "TrafficSignPlan": get_traffic_sign_plan, "TrafficSignReal": get_traffic_sign_real, } @pytest.mark.django_db @pytest.mark.parametrize( "model,location,success", ( ("AdditionalSignPlan", test_3d_point_inside_area, True), ("AdditionalSignPlan", test_3d_point_outside_area, False), ("AdditionalSignPlan", None, False), ("AdditionalSignReal", test_3d_point_inside_area, True), ("AdditionalSignReal", test_3d_point_outside_area, False), ("AdditionalSignReal", None, False), ("BarrierPlan", test_point_inside_area, True), ("BarrierPlan", test_point_outside_area, False), ("BarrierPlan", None, False), ("BarrierReal", test_point_inside_area, True), ("BarrierReal", test_point_outside_area, False), ("BarrierReal", None, False), ("MountPlan", test_point_inside_area, True), ("MountPlan", test_point_outside_area, False), ("MountPlan", None, False), ("MountReal", test_point_inside_area, True), ("MountReal", test_point_outside_area, False), ("MountReal", None, False), ("Plan", test_multipolygon_inside_area, True), ("Plan", test_multipolygon_outside_area, False), ("Plan", None, True), ("RoadMarkingPlan", test_point_inside_area, True), ("RoadMarkingPlan", test_point_outside_area, False), ("RoadMarkingPlan", None, False), ("RoadMarkingReal", test_point_inside_area, True), ("RoadMarkingReal", test_point_outside_area, False), ("RoadMarkingReal", None, False), ("SignpostPlan", test_point_inside_area, True), ("SignpostPlan", test_point_outside_area, False), ("SignpostPlan", None, False), ("SignpostReal", test_point_inside_area, True), ("SignpostReal", test_point_outside_area, False), ("SignpostReal", None, False), ("TrafficLightPlan", test_point_inside_area, True), ("TrafficLightPlan", test_point_outside_area, False), ("TrafficLightPlan", None, False), ("TrafficLightReal", test_point_inside_area, True), ("TrafficLightReal", test_point_outside_area, False), ("TrafficLightReal", None, False), ("TrafficSignPlan", test_3d_point_inside_area, True), ("TrafficSignPlan", test_3d_point_outside_area, False), ("TrafficSignPlan", None, False), ("TrafficSignReal", test_3d_point_inside_area, True), ("TrafficSignReal", test_3d_point_outside_area, False), ("TrafficSignReal", None, False), ), ) def test__api_operational_area_permission__create(model, location, success): operational_area = get_operational_area() user = get_user() perms = Permission.objects.filter(codename__contains=model.lower()) user.operational_areas.add(operational_area) user.user_permissions.add(*perms) device_type = get_traffic_control_device_type() location = location.ewkt if location else None if model == "Plan": data = { "name": "Test plan", "plan_number": "2020_1", "location": location, "planner": user.pk, "decision_maker": user.pk, "linked_objects": { "barrier_plan_ids": [], "mount_plan_ids": [], "road_marking_plan_ids": [], "signpost_plan_ids": [], "traffic_light_plan_ids": [], "traffic_sign_plan_ids": [], "additional_sign_plan_ids": [], }, } else: data = { "location": location, "device_type": device_type.pk, "lifecycle": Lifecycle.ACTIVE.value, "owner": get_owner().pk, } if model in ["BarrierPlan", "BarrierReal"]: data["road_name"] = "testroad" elif model in ["RoadMarkingPlan", "RoadMarkingReal"]: data["source_id"] = 1 data["source_name"] = "test source" api_client = get_api_client(user=user) response = api_client.post( reverse(f"v1:{model.lower()}-list"), data=data, format="json" ) ModelClass = getattr(models, model) # noqa: N806 if success: assert response.status_code == status.HTTP_201_CREATED assert ModelClass.objects.count() == 1 elif not location: assert response.status_code == status.HTTP_400_BAD_REQUEST assert response.json() == {"location": [_("This field may not be null.")]} else: assert response.status_code == status.HTTP_403_FORBIDDEN assert ModelClass.objects.count() == 0 @pytest.mark.django_db @pytest.mark.parametrize( "location,success", ((test_point_inside_area, True), (test_point_outside_area, False), (None, False)), ) def test__api_operational_area_permission__create__geojson(location, success): operational_area = get_operational_area() user = get_user() perms = Permission.objects.filter(codename__contains="barrierplan") user.operational_areas.add(operational_area) user.user_permissions.add(*perms) device_type = get_traffic_control_device_type() if location: location = json.loads(location.geojson) location.update( {"crs": {"type": "name", "properties": {"name": f"EPSG:{settings.SRID}"}}} ) data = { "location": location, "device_type": device_type.pk, "lifecycle": Lifecycle.ACTIVE.value, "owner": get_owner().pk, "road_name": "testroad", } api_client = get_api_client(user=user) response = api_client.post( f"{reverse('v1:barrierplan-list')}?geo_format=geojson", data=data, format="json" ) if success: assert response.status_code == status.HTTP_201_CREATED assert BarrierPlan.objects.count() == 1 elif not location: assert response.status_code == status.HTTP_400_BAD_REQUEST assert response.json() == {"location": [_("This field may not be null.")]} else: assert response.status_code == status.HTTP_403_FORBIDDEN assert BarrierPlan.objects.count() == 0 @pytest.mark.django_db @pytest.mark.parametrize( "model,location,success", ( ("AdditionalSignPlan", test_3d_point_inside_area, True), ("AdditionalSignPlan", test_3d_point_outside_area, False), ("AdditionalSignReal", test_3d_point_inside_area, True), ("AdditionalSignReal", test_3d_point_outside_area, False), ("BarrierPlan", test_point_inside_area, True), ("BarrierPlan", test_point_outside_area, False), ("BarrierReal", test_point_inside_area, True), ("BarrierReal", test_point_outside_area, False), ("MountPlan", test_point_inside_area, True), ("MountPlan", test_point_outside_area, False), ("MountReal", test_point_inside_area, True), ("MountReal", test_point_outside_area, False), ("Plan", test_multipolygon_inside_area, True), ("Plan", test_multipolygon_outside_area, False), ("RoadMarkingPlan", test_point_inside_area, True), ("RoadMarkingPlan", test_point_outside_area, False), ("RoadMarkingReal", test_point_inside_area, True), ("RoadMarkingReal", test_point_outside_area, False), ("SignpostPlan", test_point_inside_area, True), ("SignpostPlan", test_point_outside_area, False), ("SignpostReal", test_point_inside_area, True), ("SignpostReal", test_point_outside_area, False), ("TrafficLightPlan", test_point_inside_area, True), ("TrafficLightPlan", test_point_outside_area, False), ("TrafficLightReal", test_point_inside_area, True), ("TrafficLightReal", test_point_outside_area, False), ("TrafficSignPlan", test_3d_point_inside_area, True), ("TrafficSignPlan", test_3d_point_outside_area, False), ("TrafficSignReal", test_3d_point_inside_area, True), ("TrafficSignReal", test_3d_point_outside_area, False), ), ) def test__api_operational_area_permission__update(model, location, success): operational_area = get_operational_area() user = get_user() perms = Permission.objects.filter(codename__contains=model.lower()) user.operational_areas.add(operational_area) user.user_permissions.add(*perms) device_type = get_traffic_control_device_type() instance = model_factory_map[model](location=location) if model == "Plan": data = { "name": "Test plan", "plan_number": "2020_1", "location": location.ewkt, "planner": user.pk, "decision_maker": user.pk, "linked_objects": { "barrier_plan_ids": [], "mount_plan_ids": [], "road_marking_plan_ids": [], "signpost_plan_ids": [], "traffic_light_plan_ids": [], "traffic_sign_plan_ids": [], "additional_sign_plan_ids": [], }, } else: data = { "location": location.ewkt, "device_type": device_type.pk, "lifecycle": Lifecycle.ACTIVE.value, "owner": get_owner().pk, } if model in ["BarrierPlan", "BarrierReal"]: data["road_name"] = "testroad" elif model in ["RoadMarkingPlan", "RoadMarkingReal"]: data["source_id"] = 1 data["source_name"] = "test source" api_client = get_api_client(user=user) response = api_client.put( reverse(f"v1:{model.lower()}-detail", kwargs={"pk": instance.pk}), data, format="json", ) instance.refresh_from_db() if success: assert response.status_code == status.HTTP_200_OK assert instance.updated_by == user else: assert response.status_code == status.HTTP_403_FORBIDDEN assert instance.updated_by != user @pytest.mark.django_db @pytest.mark.parametrize( "model,location,success", ( ("AdditionalSignPlan", test_3d_point_inside_area, True), ("AdditionalSignPlan", test_3d_point_outside_area, False), ("AdditionalSignReal", test_3d_point_inside_area, True), ("AdditionalSignReal", test_3d_point_outside_area, False), ("BarrierPlan", test_point_inside_area, True), ("BarrierPlan", test_point_outside_area, False), ("BarrierReal", test_point_inside_area, True), ("BarrierReal", test_point_outside_area, False), ("MountPlan", test_point_inside_area, True), ("MountPlan", test_point_outside_area, False), ("MountReal", test_point_inside_area, True), ("MountReal", test_point_outside_area, False), ("Plan", test_multipolygon_inside_area, True), ("Plan", test_multipolygon_outside_area, False), ("RoadMarkingPlan", test_point_inside_area, True), ("RoadMarkingPlan", test_point_outside_area, False), ("RoadMarkingReal", test_point_inside_area, True), ("RoadMarkingReal", test_point_outside_area, False), ("SignpostPlan", test_point_inside_area, True), ("SignpostPlan", test_point_outside_area, False), ("SignpostReal", test_point_inside_area, True), ("SignpostReal", test_point_outside_area, False), ("TrafficLightPlan", test_point_inside_area, True), ("TrafficLightPlan", test_point_outside_area, False), ("TrafficLightReal", test_point_inside_area, True), ("TrafficLightReal", test_point_outside_area, False), ("TrafficSignPlan", test_3d_point_inside_area, True), ("TrafficSignPlan", test_3d_point_outside_area, False), ("TrafficSignReal", test_3d_point_inside_area, True), ("TrafficSignReal", test_3d_point_outside_area, False), ), ) def test__api_operational_area_permission__partial_update(model, location, success): operational_area = get_operational_area() user = get_user() perms = Permission.objects.filter(codename__contains=model.lower()) user.operational_areas.add(operational_area) user.user_permissions.add(*perms) instance = model_factory_map[model](location=location) data = { "location": location.ewkt, } api_client = get_api_client(user=user) response = api_client.patch( reverse(f"v1:{model.lower()}-detail", kwargs={"pk": instance.pk}), data, format="json", ) instance.refresh_from_db() if success: assert response.status_code == status.HTTP_200_OK assert instance.updated_by == user else: assert response.status_code == status.HTTP_403_FORBIDDEN assert instance.updated_by != user @pytest.mark.django_db @pytest.mark.parametrize( "model,location,success", ( ("AdditionalSignPlan", test_3d_point_inside_area, True), ("AdditionalSignPlan", test_3d_point_outside_area, False), ("AdditionalSignReal", test_3d_point_inside_area, True), ("AdditionalSignReal", test_3d_point_outside_area, False), ("BarrierPlan", test_point_inside_area, True), ("BarrierPlan", test_point_outside_area, False), ("BarrierReal", test_point_inside_area, True), ("BarrierReal", test_point_outside_area, False), ("MountPlan", test_point_inside_area, True), ("MountPlan", test_point_outside_area, False), ("MountReal", test_point_inside_area, True), ("MountReal", test_point_outside_area, False), ("Plan", test_multipolygon_inside_area, True), ("Plan", test_multipolygon_outside_area, False), ("RoadMarkingPlan", test_point_inside_area, True), ("RoadMarkingPlan", test_point_outside_area, False), ("RoadMarkingReal", test_point_inside_area, True), ("RoadMarkingReal", test_point_outside_area, False), ("SignpostPlan", test_point_inside_area, True), ("SignpostPlan", test_point_outside_area, False), ("SignpostReal", test_point_inside_area, True), ("SignpostReal", test_point_outside_area, False), ("TrafficLightPlan", test_point_inside_area, True), ("TrafficLightPlan", test_point_outside_area, False), ("TrafficLightReal", test_point_inside_area, True), ("TrafficLightReal", test_point_outside_area, False), ("TrafficSignPlan", test_3d_point_inside_area, True), ("TrafficSignPlan", test_3d_point_outside_area, False), ("TrafficSignReal", test_3d_point_inside_area, True), ("TrafficSignReal", test_3d_point_outside_area, False), ), ) def test__api_operational_area_permission__delete(model, location, success): operational_area = get_operational_area() user = get_user() perms = Permission.objects.filter(codename__contains=model.lower()) user.operational_areas.add(operational_area) user.user_permissions.add(*perms) instance = model_factory_map[model](location=location) api_client = get_api_client(user=user) response = api_client.delete( reverse(f"v1:{model.lower()}-detail", kwargs={"pk": instance.pk}) ) instance.refresh_from_db() if success: assert response.status_code == status.HTTP_204_NO_CONTENT assert not instance.is_active else: assert response.status_code == status.HTTP_403_FORBIDDEN assert instance.is_active
39.394209
88
0.66107
1,969
17,688
5.55612
0.083799
0.069104
0.078062
0.098995
0.847715
0.834095
0.824954
0.817916
0.817916
0.808775
0
0.014903
0.21851
17,688
448
89
39.482143
0.776532
0.000565
0
0.685851
0
0
0.175888
0.023365
0
0
0
0
0.057554
1
0.01199
false
0
0.026379
0
0.038369
0
0
0
0
null
0
0
0
1
1
1
1
1
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
6
1a7bf38c2082dde45ff73103e533406fa131ed4e
140
py
Python
cacheman/utils.py
Jenyay/py_cache_manager
aa7fa33dcbc30dbd6b2e62cade5f371f6dbbe2cb
[ "BSD-2-Clause" ]
null
null
null
cacheman/utils.py
Jenyay/py_cache_manager
aa7fa33dcbc30dbd6b2e62cade5f371f6dbbe2cb
[ "BSD-2-Clause" ]
5
2015-02-18T22:17:52.000Z
2018-01-23T05:30:09.000Z
cacheman/utils.py
Jenyay/py_cache_manager
aa7fa33dcbc30dbd6b2e62cade5f371f6dbbe2cb
[ "BSD-2-Clause" ]
2
2021-05-31T15:18:50.000Z
2022-01-15T16:50:25.000Z
import string import random def random_name(length = 18): return ''.join(random.choice(string.ascii_uppercase) for _ in range(length))
23.333333
80
0.757143
20
140
5.15
0.75
0
0
0
0
0
0
0
0
0
0
0.016529
0.135714
140
5
81
28
0.834711
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.5
0.25
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
1
0
0
1
1
1
0
0
6