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
968b6e2742eb2d63f78ef56857062aa007246cd8
501
py
Python
lesson01/monkey/if2.py
herrywen-nanj/51reboot
1130c79a360e1b548a6eaad176eb60f8bed22f40
[ "Apache-2.0" ]
null
null
null
lesson01/monkey/if2.py
herrywen-nanj/51reboot
1130c79a360e1b548a6eaad176eb60f8bed22f40
[ "Apache-2.0" ]
null
null
null
lesson01/monkey/if2.py
herrywen-nanj/51reboot
1130c79a360e1b548a6eaad176eb60f8bed22f40
[ "Apache-2.0" ]
null
null
null
# 及格分数线 good_score = 60 low_score = 10 # 第一版 score = input("请输入你的语文分数: ") if int(score) >= good_score: print("你的语文分数及格了。") print("恭喜恭喜") elif int(score) < low_score: # elif --> else + if print("你可以放弃学习了.") else: print("你的语文分数不及格。") print("好好学习") # 第二版 score = input("请输入你的语文分数: ") if int(score) >= good_score: print("你的语文分数及格了。") print("恭喜恭喜") else: if int(score) < low_score: print("你可以放弃学习了.") else: print("你的语文分数不及格。") print("好好学习")
16.7
49
0.582834
61
501
4.688525
0.327869
0.111888
0.104895
0.146853
0.706294
0.706294
0.706294
0.426573
0.426573
0.426573
0
0.010499
0.239521
501
29
50
17.275862
0.740157
0.063872
0
0.809524
0
0
0.207792
0
0
0
0
0
0
1
0
false
0
0
0
0
0.47619
0
0
0
null
0
0
0
0
1
1
0
0
0
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
1
0
4
9696e7cd48466de5424cadff39948981b6deee8c
85
py
Python
nltkmodules.py
noxellegroup/Manavta
b1c40f260e77b56362e9c1a83d9d7809ff50d126
[ "MIT" ]
null
null
null
nltkmodules.py
noxellegroup/Manavta
b1c40f260e77b56362e9c1a83d9d7809ff50d126
[ "MIT" ]
null
null
null
nltkmodules.py
noxellegroup/Manavta
b1c40f260e77b56362e9c1a83d9d7809ff50d126
[ "MIT" ]
null
null
null
import nltk nltk.download('omw-1.4') nltk.download("punkt") nltk.download("wordnet")
17
24
0.741176
13
85
4.846154
0.615385
0.571429
0
0
0
0
0
0
0
0
0
0.025
0.058824
85
5
25
17
0.7625
0
0
0
0
0
0.22093
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
96a55e5f4590d151d0b4b875faaccf35eb843f52
44,523
py
Python
tests/sentry/snuba/test_discover.py
pombredanne/django-sentry
4ad09417fb3cfa3aa4a0d4175ae49fe02837c567
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/snuba/test_discover.py
pombredanne/django-sentry
4ad09417fb3cfa3aa4a0d4175ae49fe02837c567
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/snuba/test_discover.py
pombredanne/django-sentry
4ad09417fb3cfa3aa4a0d4175ae49fe02837c567
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from sentry import eventstore from sentry.api.event_search import InvalidSearchQuery from sentry.snuba import discover from sentry.testutils import TestCase, SnubaTestCase from sentry.testutils.helpers.datetime import iso_format, before_now from sentry.utils.samples import load_data from sentry.utils.snuba import Dataset from mock import patch from datetime import timedelta import six import pytest class QueryIntegrationTest(SnubaTestCase, TestCase): def setUp(self): super(QueryIntegrationTest, self).setUp() self.environment = self.create_environment(self.project, name="prod") self.release = self.create_release(self.project, version="first-release") self.event = self.store_event( data={ "message": "oh no", "release": "first-release", "environment": "prod", "platform": "python", "user": {"id": "99", "email": "bruce@example.com", "username": "brucew"}, "timestamp": iso_format(before_now(minutes=1)), }, project_id=self.project.id, ) def test_field_aliasing_in_selected_columns(self): result = discover.query( selected_columns=["project.id", "user.email", "release"], query="", params={"project_id": [self.project.id]}, ) data = result["data"] assert len(data) == 1 assert data[0]["project.id"] == self.project.id assert data[0]["user.email"] == "bruce@example.com" assert data[0]["release"] == "first-release" assert len(result["meta"]) == 3 assert result["meta"][0] == {"name": "project.id", "type": "UInt64"} assert result["meta"][1] == {"name": "user.email", "type": "Nullable(String)"} assert result["meta"][2] == {"name": "release", "type": "Nullable(String)"} def test_field_aliasing_in_aggregate_functions_and_groupby(self): result = discover.query( selected_columns=["project.id", "count_unique(user.email)"], query="", params={"project_id": [self.project.id]}, auto_fields=True, ) data = result["data"] assert len(data) == 1 assert data[0]["project.id"] == self.project.id assert data[0]["count_unique_user_email"] == 1 def test_field_aliasing_in_conditions(self): result = discover.query( selected_columns=["project.id", "user.email"], query="user.email:bruce@example.com", params={"project_id": [self.project.id]}, auto_fields=True, ) data = result["data"] assert len(data) == 1 assert data[0]["project.id"] == self.project.id assert data[0]["user.email"] == "bruce@example.com" def test_auto_fields_simple_fields(self): result = discover.query( selected_columns=["user.email", "release"], query="", params={"project_id": [self.project.id]}, auto_fields=True, ) data = result["data"] assert len(data) == 1 assert data[0]["id"] == self.event.event_id assert data[0]["project.id"] == self.project.id assert data[0]["user.email"] == "bruce@example.com" assert data[0]["release"] == "first-release" assert len(result["meta"]) == 4 assert result["meta"][0] == {"name": "user.email", "type": "Nullable(String)"} assert result["meta"][1] == {"name": "release", "type": "Nullable(String)"} assert result["meta"][2] == {"name": "id", "type": "FixedString(32)"} assert result["meta"][3] == {"name": "project.id", "type": "UInt64"} def test_auto_fields_aggregates(self): result = discover.query( selected_columns=["count_unique(user.email)"], query="", params={"project_id": [self.project.id]}, auto_fields=True, ) data = result["data"] assert len(data) == 1 assert data[0]["projectid"] == self.project.id assert data[0]["latest_event"] == self.event.event_id assert data[0]["count_unique_user_email"] == 1 def test_release_condition(self): result = discover.query( selected_columns=["id", "message"], query="release:{}".format(self.create_release(self.project).version), params={"project_id": [self.project.id]}, ) assert len(result["data"]) == 0 result = discover.query( selected_columns=["id", "message"], query="release:{}".format(self.release.version), params={"project_id": [self.project.id]}, ) assert len(result["data"]) == 1 data = result["data"] assert data[0]["id"] == self.event.event_id assert data[0]["message"] == self.event.message assert "event_id" not in data[0] def test_environment_condition(self): result = discover.query( selected_columns=["id", "message"], query="environment:{}".format(self.create_environment(self.project).name), params={"project_id": [self.project.id]}, ) assert len(result["data"]) == 0 result = discover.query( selected_columns=["id", "message"], query="environment:{}".format(self.environment.name), params={"project_id": [self.project.id]}, ) assert len(result["data"]) == 1 data = result["data"] assert data[0]["id"] == self.event.event_id assert data[0]["message"] == self.event.message def test_reference_event(self): self.store_event( data={ "event_id": "a" * 32, "message": "oh no", "timestamp": iso_format(before_now(minutes=2)), }, project_id=self.project.id, ) self.store_event( data={ "event_id": "b" * 32, "message": "no match", "timestamp": iso_format(before_now(minutes=2)), }, project_id=self.project.id, ) ref = discover.ReferenceEvent( self.organization, "{}:{}".format(self.project.slug, "a" * 32), ["message", "count()"] ) result = discover.query( selected_columns=["id", "message"], query="", reference_event=ref, params={"project_id": [self.project.id]}, ) assert len(result["data"]) == 2 for row in result["data"]: assert row["message"] == "oh no" class QueryTransformTest(TestCase): """ This test mocks snuba.raw_query to let us isolate column transformations. """ @patch("sentry.snuba.discover.raw_query") def test_query_parse_error(self, mock_query): mock_query.return_value = { "meta": [{"name": "transaction"}, {"name": "duration"}], "data": [{"transaction": "api.do_things", "duration": 200}], } with pytest.raises(InvalidSearchQuery): discover.query( selected_columns=[], query="foo(id):<1dino", params={"project_id": [self.project.id]}, ) assert mock_query.call_count == 0 @patch("sentry.snuba.discover.raw_query") def test_query_no_fields(self, mock_query): mock_query.return_value = { "meta": [{"name": "transaction"}, {"name": "duration"}], "data": [{"transaction": "api.do_things", "duration": 200}], } with pytest.raises(InvalidSearchQuery) as err: discover.query( selected_columns=[], query="event.type:transaction", params={"project_id": [self.project.id]}, ) assert "No fields" in six.text_type(err) assert mock_query.call_count == 0 @patch("sentry.snuba.discover.raw_query") def test_selected_columns_field_alias_macro(self, mock_query): mock_query.return_value = { "meta": [{"name": "user_id"}, {"name": "email"}], "data": [{"user_id": "1", "email": "a@example.org"}], } discover.query( selected_columns=["user", "project"], query="", params={"project_id": [self.project.id]} ) mock_query.assert_called_with( selected_columns=["user_id", "username", "email", "ip_address", "project_id"], aggregations=[], filter_keys={"project_id": [self.project.id]}, dataset=Dataset.Discover, end=None, start=None, conditions=[], groupby=[], orderby=None, limit=50, offset=None, referrer=None, ) @patch("sentry.snuba.discover.raw_query") def test_selected_columns_no_auto_fields(self, mock_query): mock_query.return_value = { "meta": [{"name": "user_id"}, {"name": "email"}], "data": [{"user_id": "1", "email": "a@example.org"}], } discover.query( selected_columns=["count()"], query="", params={"project_id": [self.project.id]}, auto_fields=False, ) mock_query.assert_called_with( selected_columns=[], aggregations=[["count", None, "count"]], filter_keys={"project_id": [self.project.id]}, dataset=Dataset.Discover, end=None, start=None, conditions=[], groupby=[], orderby=None, limit=50, offset=None, referrer=None, ) @patch("sentry.snuba.discover.raw_query") def test_selected_columns_aliasing_in_function(self, mock_query): mock_query.return_value = { "meta": [{"name": "transaction"}, {"name": "duration"}], "data": [{"transaction": "api.do_things", "duration": 200}], } discover.query( selected_columns=[ "transaction", "transaction.duration", "count_unique(transaction.duration)", ], query="", params={"project_id": [self.project.id]}, auto_fields=True, ) mock_query.assert_called_with( selected_columns=["transaction", "duration"], aggregations=[ ["uniq", "duration", "count_unique_transaction_duration"], ["argMax", ["event_id", "timestamp"], "latest_event"], ["argMax", ["project_id", "timestamp"], "projectid"], ], filter_keys={"project_id": [self.project.id]}, dataset=Dataset.Discover, end=None, start=None, conditions=[], groupby=["transaction", "duration"], orderby=None, limit=50, offset=None, referrer=None, ) @patch("sentry.snuba.discover.raw_query") def test_selected_columns_aggregate_alias(self, mock_query): mock_query.return_value = { "meta": [{"name": "transaction"}, {"name": "p95"}], "data": [{"transaction": "api.do_things", "p95": 200}], } discover.query( selected_columns=["transaction", "p95", "count_unique(transaction)"], query="", params={"project_id": [self.project.id]}, auto_fields=True, ) mock_query.assert_called_with( selected_columns=["transaction"], aggregations=[ ["quantile(0.95)(duration)", None, "p95"], ["uniq", "transaction", "count_unique_transaction"], ["argMax", ["event_id", "timestamp"], "latest_event"], ["argMax", ["project_id", "timestamp"], "projectid"], ], filter_keys={"project_id": [self.project.id]}, dataset=Dataset.Discover, groupby=["transaction"], conditions=[], end=None, start=None, orderby=None, limit=50, offset=None, referrer=None, ) @patch("sentry.snuba.discover.raw_query") def test_orderby_limit_offset(self, mock_query): mock_query.return_value = { "meta": [{"name": "title"}, {"name": "project.id"}], "data": [{"project.id": "tester", "title": "test title"}], } discover.query( selected_columns=["project.id", "title"], query="", params={"project_id": [self.project.id]}, orderby=["project.id"], offset=100, limit=200, ) mock_query.assert_called_with( selected_columns=["project_id", "title"], filter_keys={"project_id": [self.project.id]}, dataset=Dataset.Discover, orderby=["project_id"], aggregations=[], end=None, start=None, conditions=[], groupby=[], limit=200, offset=100, referrer=None, ) @patch("sentry.snuba.discover.raw_query") def test_orderby_must_be_selected_if_aggregate(self, mock_query): with pytest.raises(InvalidSearchQuery): discover.query( selected_columns=["transaction", "transaction.duration"], query="", params={"project_id": [self.project.id]}, orderby=["count()"], ) assert mock_query.call_count == 0 @patch("sentry.snuba.discover.raw_query") def test_orderby_aggregate_alias(self, mock_query): mock_query.return_value = { "meta": [{"name": "count_id"}, {"name": "project.id"}], "data": [{"project.id": "tester", "count_id": 10}], } discover.query( selected_columns=["count(id)", "project.id", "id"], query="", params={"project_id": [self.project.id]}, orderby=["count_id"], ) mock_query.assert_called_with( selected_columns=["project_id", "event_id"], filter_keys={"project_id": [self.project.id]}, dataset=Dataset.Discover, orderby=["count_id"], aggregations=[["count", None, "count_id"]], end=None, start=None, conditions=[], groupby=["project_id", "event_id"], limit=50, offset=None, referrer=None, ) @patch("sentry.snuba.discover.raw_query") def test_conditions_order_and_groupby_aliasing(self, mock_query): mock_query.return_value = { "meta": [{"name": "transaction"}, {"name": "duration"}], "data": [{"transaction": "api.do_things", "duration": 200}], } discover.query( selected_columns=["timestamp", "transaction", "transaction.duration", "count()"], query="transaction.duration:200 sdk.name:python tags[projectid]:123", params={"project_id": [self.project.id]}, orderby=["-timestamp", "-count"], ) mock_query.assert_called_with( selected_columns=["timestamp", "transaction", "duration"], aggregations=[["count", None, "count"]], conditions=[ ["duration", "=", 200], ["sdk_name", "=", "python"], [["ifNull", ["tags[projectid]", "''"]], "=", "123"], ], filter_keys={"project_id": [self.project.id]}, groupby=["timestamp", "transaction", "duration"], orderby=["-timestamp", "-count"], dataset=Dataset.Discover, end=None, start=None, limit=50, offset=None, referrer=None, ) @patch("sentry.snuba.discover.raw_query") def test_conditions_nested_function_aliasing(self, mock_query): mock_query.return_value = { "meta": [{"name": "transaction"}], "data": [{"transaction": "api.do_things"}], } discover.query( selected_columns=["transaction", "count()"], query="event.type:transaction user.email:*@sentry.io message:recent-searches", params={"project_id": [self.project.id]}, ) mock_query.assert_called_with( selected_columns=["transaction"], conditions=[ ["type", "=", "transaction"], [["match", ["email", "'(?i)^.*\@sentry\.io$'"]], "=", 1], [["positionCaseInsensitive", ["message", "'recent-searches'"]], "!=", 0], ], aggregations=[["count", None, "count"]], filter_keys={"project_id": [self.project.id]}, dataset=Dataset.Discover, groupby=["transaction"], orderby=None, end=None, start=None, limit=50, offset=None, referrer=None, ) @patch("sentry.snuba.discover.raw_query") def test_condition_transform(self, mock_query): mock_query.return_value = { "meta": [{"name": "transaction"}, {"name": "duration"}], "data": [{"transaction": "api.do_things", "duration": 200}], } discover.query( selected_columns=["transaction", "transaction.duration"], query="http.method:GET", params={"project_id": [self.project.id]}, ) mock_query.assert_called_with( selected_columns=["transaction", "duration"], conditions=[["http_method", "=", "GET"]], filter_keys={"project_id": [self.project.id]}, groupby=[], dataset=Dataset.Discover, aggregations=[], orderby=None, end=None, start=None, limit=50, offset=None, referrer=None, ) @patch("sentry.snuba.discover.raw_query") def test_condition_projectid_transform(self, mock_query): mock_query.return_value = { "meta": [{"name": "transaction"}, {"name": "duration"}], "data": [{"transaction": "api.do_things", "duration": 200}], } # The project_id column is not a public column, but we # have to let it through in conditions to ensure project.name works. discover.query( selected_columns=["transaction", "transaction.duration"], query="project_id:1", params={"project_id": [self.project.id]}, ) mock_query.assert_called_with( selected_columns=["transaction", "duration"], conditions=[["project_id", "=", 1]], filter_keys={"project_id": [self.project.id]}, groupby=[], dataset=Dataset.Discover, aggregations=[], orderby=None, end=None, start=None, limit=50, offset=None, referrer=None, ) @patch("sentry.snuba.discover.raw_query") def test_condition_projectname_transform(self, mock_query): mock_query.return_value = { "meta": [{"name": "transaction"}, {"name": "duration"}], "data": [{"transaction": "api.do_things", "duration": 200}], } project2 = self.create_project(organization=self.organization) # project.name is in the public schema and should be converted to a # project_id condition. discover.query( selected_columns=["transaction", "transaction.duration"], query="project.name:{}".format(project2.slug), params={"project_id": [self.project.id, project2.id]}, ) mock_query.assert_called_with( selected_columns=["transaction", "duration"], conditions=[["project_id", "=", project2.id]], filter_keys={"project_id": [self.project.id, project2.id]}, groupby=[], dataset=Dataset.Discover, aggregations=[], orderby=None, end=None, start=None, limit=50, offset=None, referrer=None, ) @patch("sentry.snuba.discover.raw_query") def test_params_forward(self, mock_query): mock_query.return_value = { "meta": [{"name": "transaction"}, {"name": "duration"}], "data": [{"transaction": "api.do_things", "duration": 200}], } start_time = before_now(minutes=10) end_time = before_now(seconds=1) discover.query( selected_columns=["transaction", "transaction.duration"], query="http.method:GET", params={"project_id": [self.project.id], "start": start_time, "end": end_time}, ) mock_query.assert_called_with( selected_columns=["transaction", "duration"], conditions=[["http_method", "=", "GET"]], filter_keys={"project_id": [self.project.id]}, groupby=[], dataset=Dataset.Discover, aggregations=[], end=end_time, start=start_time, orderby=None, limit=50, offset=None, referrer=None, ) class TimeseriesQueryTest(SnubaTestCase, TestCase): def setUp(self): super(TimeseriesQueryTest, self).setUp() self.day_ago = before_now(days=1).replace(hour=10, minute=0, second=0, microsecond=0) self.store_event( data={ "event_id": "a" * 32, "message": "very bad", "timestamp": iso_format(self.day_ago + timedelta(hours=1)), "fingerprint": ["group1"], "tags": {"important": "yes"}, "user": {"id": 1}, }, project_id=self.project.id, ) self.store_event( data={ "event_id": "b" * 32, "message": "oh my", "timestamp": iso_format(self.day_ago + timedelta(hours=1, minutes=1)), "fingerprint": ["group2"], "tags": {"important": "no"}, }, project_id=self.project.id, ) self.store_event( data={ "event_id": "c" * 32, "message": "very bad", "timestamp": iso_format(self.day_ago + timedelta(hours=2, minutes=1)), "fingerprint": ["group2"], "tags": {"important": "yes"}, }, project_id=self.project.id, ) def test_invalid_field_in_function(self): with pytest.raises(InvalidSearchQuery): discover.timeseries_query( selected_columns=["min(transaction)"], query="transaction:api.issue.delete", params={"project_id": [self.project.id]}, rollup=1800, ) def test_missing_start_and_end(self): with pytest.raises(InvalidSearchQuery) as err: discover.timeseries_query( selected_columns=["count()"], query="transaction:api.issue.delete", params={"project_id": [self.project.id]}, rollup=1800, ) assert "without a start and end" in six.text_type(err) def test_no_aggregations(self): with pytest.raises(InvalidSearchQuery) as err: discover.timeseries_query( selected_columns=["transaction", "title"], query="transaction:api.issue.delete", params={ "start": self.day_ago, "end": self.day_ago + timedelta(hours=2), "project_id": [self.project.id], }, rollup=1800, ) assert "no aggregation" in six.text_type(err) def test_field_alias(self): result = discover.timeseries_query( selected_columns=["p95"], query="event.type:transaction transaction:api.issue.delete", params={ "start": self.day_ago, "end": self.day_ago + timedelta(hours=2), "project_id": [self.project.id], }, rollup=3600, ) assert len(result.data["data"]) == 3 def test_aggregate_function(self): result = discover.timeseries_query( selected_columns=["count()"], query="", params={ "start": self.day_ago, "end": self.day_ago + timedelta(hours=2), "project_id": [self.project.id], }, rollup=3600, ) assert len(result.data["data"]) == 3 assert [2] == [val["count"] for val in result.data["data"] if "count" in val] result = discover.timeseries_query( selected_columns=["count_unique(user)"], query="", params={ "start": self.day_ago, "end": self.day_ago + timedelta(hours=2), "project_id": [self.project.id], }, rollup=3600, ) assert len(result.data["data"]) == 3 keys = [] for row in result.data["data"]: keys.extend(list(row.keys())) assert "count" in keys assert "time" in keys def test_zerofilling(self): result = discover.timeseries_query( selected_columns=["count()"], query="", params={ "start": self.day_ago, "end": self.day_ago + timedelta(hours=3), "project_id": [self.project.id], }, rollup=3600, ) assert len(result.data["data"]) == 4, "Should have empty results" assert [2, 1] == [ val["count"] for val in result.data["data"] if "count" in val ], result.data["data"] def test_reference_event(self): ref = discover.ReferenceEvent( self.organization, "{}:{}".format(self.project.slug, "a" * 32), ["message", "count()", "last_seen"], ) result = discover.timeseries_query( selected_columns=["count()"], query="", params={ "start": self.day_ago, "end": self.day_ago + timedelta(hours=3), "project_id": [self.project.id], }, reference_event=ref, rollup=3600, ) assert len(result.data["data"]) == 4 assert [1, 1] == [val["count"] for val in result.data["data"] if "count" in val] class CreateReferenceEventConditionsTest(SnubaTestCase, TestCase): def test_bad_slug_format(self): ref = discover.ReferenceEvent(self.organization, "lol", []) with pytest.raises(InvalidSearchQuery): discover.create_reference_event_conditions(ref) def test_unknown_project(self): event = self.store_event( data={"message": "oh no!", "timestamp": iso_format(before_now(seconds=1))}, project_id=self.project.id, ) ref = discover.ReferenceEvent(self.organization, "nope:{}".format(event.event_id), []) with pytest.raises(InvalidSearchQuery): discover.create_reference_event_conditions(ref) def test_unknown_event(self): with pytest.raises(InvalidSearchQuery): slug = "{}:deadbeef".format(self.project.slug) ref = discover.ReferenceEvent(self.organization, slug, ["message"]) discover.create_reference_event_conditions(ref) def test_unknown_event_and_no_fields(self): slug = "{}:deadbeef".format(self.project.slug) ref = discover.ReferenceEvent(self.organization, slug, []) result = discover.create_reference_event_conditions(ref) assert len(result) == 0 def test_no_fields(self): event = self.store_event( data={ "message": "oh no!", "transaction": "/issues/{issue_id}", "timestamp": iso_format(before_now(seconds=1)), }, project_id=self.project.id, ) slug = "{}:{}".format(self.project.slug, event.event_id) ref = discover.ReferenceEvent(self.organization, slug, []) result = discover.create_reference_event_conditions(ref) assert len(result) == 0 def test_basic_fields(self): event = self.store_event( data={ "message": "oh no!", "transaction": "/issues/{issue_id}", "timestamp": iso_format(before_now(seconds=1)), }, project_id=self.project.id, ) slug = "{}:{}".format(self.project.slug, event.event_id) ref = discover.ReferenceEvent( self.organization, slug, ["message", "transaction", "unknown-field"] ) result = discover.create_reference_event_conditions(ref) assert result == [ ["message", "=", "oh no! /issues/{issue_id}"], ["transaction", "=", "/issues/{issue_id}"], ] def test_geo_field(self): event = self.store_event( data={ "message": "oh no!", "transaction": "/issues/{issue_id}", "user": { "id": 1, "geo": {"country_code": "US", "region": "CA", "city": "San Francisco"}, }, "timestamp": iso_format(before_now(seconds=1)), }, project_id=self.project.id, ) slug = "{}:{}".format(self.project.slug, event.event_id) ref = discover.ReferenceEvent( self.organization, slug, ["geo.city", "geo.region", "geo.country_code"] ) result = discover.create_reference_event_conditions(ref) assert result == [ ["geo.city", "=", "San Francisco"], ["geo.region", "=", "CA"], ["geo.country_code", "=", "US"], ] def test_sdk_field(self): event = self.store_event( data={ "message": "oh no!", "transaction": "/issues/{issue_id}", "sdk": {"name": "sentry-python", "version": "5.0.12"}, "timestamp": iso_format(before_now(seconds=1)), }, project_id=self.project.id, ) slug = "{}:{}".format(self.project.slug, event.event_id) ref = discover.ReferenceEvent(self.organization, slug, ["sdk.version", "sdk.name"]) result = discover.create_reference_event_conditions(ref) assert result == [["sdk.version", "=", "5.0.12"], ["sdk.name", "=", "sentry-python"]] def test_error_field(self): data = load_data("php") data["timestamp"] = iso_format(before_now(seconds=1)) event = self.store_event(data=data, project_id=self.project.id) slug = "{}:{}".format(self.project.slug, event.event_id) ref = discover.ReferenceEvent( self.organization, slug, ["error.value", "error.type", "error.handled"] ) result = discover.create_reference_event_conditions(ref) assert result == [ ["error.value", "=", "This is a test exception sent from the Raven CLI."], ["error.type", "=", "Exception"], ] def test_stack_field(self): data = load_data("php") data["timestamp"] = iso_format(before_now(seconds=1)) event = self.store_event(data=data, project_id=self.project.id) slug = "{}:{}".format(self.project.slug, event.event_id) ref = discover.ReferenceEvent(self.organization, slug, ["stack.filename", "stack.function"]) result = discover.create_reference_event_conditions(ref) assert result == [ ["stack.filename", "=", "/Users/example/Development/raven-php/bin/raven"], ["stack.function", "=", "raven_cli_test"], ] def test_tag_value(self): event = self.store_event( data={ "message": "oh no!", "timestamp": iso_format(before_now(seconds=1)), "tags": {"customer_id": 1, "color": "red"}, }, project_id=self.project.id, ) slug = "{}:{}".format(self.project.slug, event.event_id) ref = discover.ReferenceEvent(self.organization, slug, ["nope", "color", "customer_id"]) result = discover.create_reference_event_conditions(ref) assert result == [["color", "=", "red"], ["customer_id", "=", "1"]] def test_context_value(self): event = self.store_event( data={ "message": "oh no!", "timestamp": iso_format(before_now(seconds=1)), "contexts": { "os": {"version": "10.14.6", "type": "os", "name": "Mac OS X"}, "browser": {"type": "browser", "name": "Firefox", "version": "69"}, "gpu": {"type": "gpu", "name": "nvidia 8600", "vendor": "nvidia"}, }, }, project_id=self.project.id, ) slug = "{}:{}".format(self.project.slug, event.event_id) ref = discover.ReferenceEvent(self.organization, slug, ["gpu.name", "browser.name"]) result = discover.create_reference_event_conditions(ref) assert result == [["gpu.name", "=", "nvidia 8600"], ["browser.name", "=", "Firefox"]] def test_issue_field(self): event = self.store_event( data={ "message": "oh no!", "timestamp": iso_format(before_now(seconds=1)), "contexts": { "os": {"version": "10.14.6", "type": "os", "name": "Mac OS X"}, "browser": {"type": "browser", "name": "Firefox", "version": "69"}, "gpu": {"type": "gpu", "name": "nvidia 8600", "vendor": "nvidia"}, }, }, project_id=self.project.id, ) slug = "{}:{}".format(self.project.slug, event.event_id) ref = discover.ReferenceEvent(self.organization, slug, ["issue.id"]) result = discover.create_reference_event_conditions(ref) assert result == [["issue.id", "=", event.group_id]] class GetPaginationIdsTest(SnubaTestCase, TestCase): def setUp(self): super(GetPaginationIdsTest, self).setUp() self.project = self.create_project() self.min_ago = before_now(minutes=1) self.day_ago = before_now(days=1) self.store_event( data={ "event_id": "a" * 32, "message": "very bad", "type": "default", "platform": "python", "timestamp": iso_format(before_now(minutes=4)), "tags": {"foo": "1"}, }, project_id=self.project.id, ) self.store_event( data={ "event_id": "b" * 32, "message": "very bad", "type": "default", "platform": "python", "timestamp": iso_format(before_now(minutes=3)), "tags": {"foo": "1"}, }, project_id=self.project.id, ) self.store_event( data={ "event_id": "c" * 32, "message": "very bad", "type": "default", "platform": "python", "timestamp": iso_format(before_now(minutes=2)), "tags": {"foo": "1"}, }, project_id=self.project.id, ) self.event = eventstore.get_event_by_id(self.project.id, "b" * 32) def test_no_related_events(self): result = discover.get_pagination_ids( self.event, "foo:bar", {"project_id": [self.project.id], "start": self.min_ago, "end": self.day_ago}, ) assert result.previous is None assert result.next is None assert result.oldest is None assert result.latest is None def test_invalid_conditions(self): with pytest.raises(InvalidSearchQuery): discover.get_pagination_ids( self.event, "foo:(11", {"project_id": [self.project.id], "end": self.min_ago, "start": self.day_ago}, ) def test_matching_conditions(self): result = discover.get_pagination_ids( self.event, "foo:1", {"project_id": [self.project.id], "end": self.min_ago, "start": self.day_ago}, ) assert result.previous == "a" * 32 assert result.next == "c" * 32 assert result.oldest == "a" * 32 assert result.latest == "c" * 32 def test_reference_event_matching(self): # Create an event that won't match the reference self.store_event( data={ "event_id": "d" * 32, "message": "completely bad", "type": "default", "platform": "python", "timestamp": iso_format(before_now(minutes=2)), "tags": {"foo": "1"}, }, project_id=self.project.id, ) reference = discover.ReferenceEvent( self.organization, "{}:{}".format(self.project.slug, self.event.id), ["message"] ) result = discover.get_pagination_ids( self.event, "foo:1", {"project_id": [self.project.id], "end": self.min_ago, "start": self.day_ago}, reference_event=reference, ) assert result.previous == "a" * 32 assert result.next == "c" * 32 assert result.oldest == "a" * 32 assert result.latest == "c" * 32 def test_date_params_included(self): # Create an event that is outside the date range self.store_event( data={ "event_id": "d" * 32, "message": "very bad", "type": "default", "platform": "python", "timestamp": iso_format(before_now(days=2)), "tags": {"foo": "1"}, }, project_id=self.project.id, ) result = discover.get_pagination_ids( self.event, "foo:1", {"project_id": [self.project.id], "end": self.min_ago, "start": self.day_ago}, ) assert result.previous == "a" * 32 assert result.next == "c" * 32 assert result.oldest == "a" * 32 assert result.latest == "c" * 32 class GetFacetsTest(SnubaTestCase, TestCase): def setUp(self): super(GetFacetsTest, self).setUp() self.project = self.create_project() self.min_ago = before_now(minutes=1) self.day_ago = before_now(days=1) def test_invalid_query(self): with pytest.raises(InvalidSearchQuery): discover.get_facets( "\n", {"project_id": [self.project.id], "end": self.min_ago, "start": self.day_ago} ) def test_no_results(self): results = discover.get_facets( "", {"project_id": [self.project.id], "end": self.min_ago, "start": self.day_ago} ) assert results == [] def test_single_project(self): self.store_event( data={ "message": "very bad", "type": "default", "timestamp": iso_format(before_now(minutes=2)), "tags": {"color": "red", "paying": "1"}, }, project_id=self.project.id, ) self.store_event( data={ "message": "very bad", "type": "default", "timestamp": iso_format(before_now(minutes=2)), "tags": {"color": "blue", "paying": "0"}, }, project_id=self.project.id, ) params = {"project_id": [self.project.id], "start": self.day_ago, "end": self.min_ago} result = discover.get_facets("", params) assert len(result) == 5 assert {r.key for r in result} == {"color", "paying", "level"} assert {r.value for r in result} == {"red", "blue", "1", "0", "error"} assert {r.count for r in result} == {1, 2} def test_project_filter(self): self.store_event( data={ "message": "very bad", "type": "default", "timestamp": iso_format(before_now(minutes=2)), "tags": {"color": "red"}, }, project_id=self.project.id, ) other_project = self.create_project() self.store_event( data={ "message": "very bad", "type": "default", "timestamp": iso_format(before_now(minutes=2)), "tags": {"toy": "train"}, }, project_id=other_project.id, ) params = {"project_id": [self.project.id], "start": self.day_ago, "end": self.min_ago} result = discover.get_facets("", params) keys = {r.key for r in result} assert keys == {"color", "level"} # Query more than one project. params = { "project_id": [self.project.id, other_project.id], "start": self.day_ago, "end": self.min_ago, } result = discover.get_facets("", params) keys = {r.key for r in result} assert keys == {"level", "toy", "color", "project"} projects = [f for f in result if f.key == "project"] assert [p.count for p in projects] == [1, 1] def test_enviroment_promoted_tag(self): for env in ("prod", "staging", None): self.store_event( data={ "message": "very bad", "type": "default", "environment": env, "timestamp": iso_format(before_now(minutes=2)), }, project_id=self.project.id, ) params = {"project_id": [self.project.id], "start": self.day_ago, "end": self.min_ago} result = discover.get_facets("", params) keys = {r.key for r in result} assert keys == {"environment", "level"} assert {"prod", "staging", None} == {f.value for f in result if f.key == "environment"} assert {1} == {f.count for f in result if f.key == "environment"} def test_query_string(self): self.store_event( data={ "message": "very bad", "type": "default", "timestamp": iso_format(before_now(minutes=2)), "tags": {"color": "red"}, }, project_id=self.project.id, ) self.store_event( data={ "message": "oh my", "type": "default", "timestamp": iso_format(before_now(minutes=2)), "tags": {"toy": "train"}, }, project_id=self.project.id, ) params = {"project_id": [self.project.id], "start": self.day_ago, "end": self.min_ago} result = discover.get_facets("bad", params) keys = {r.key for r in result} assert "color" in keys assert "toy" not in keys result = discover.get_facets("color:red", params) keys = {r.key for r in result} assert "color" in keys assert "toy" not in keys def test_date_params(self): self.store_event( data={ "message": "very bad", "type": "default", "timestamp": iso_format(before_now(minutes=2)), "tags": {"color": "red"}, }, project_id=self.project.id, ) self.store_event( data={ "message": "oh my", "type": "default", "timestamp": iso_format(before_now(days=2)), "tags": {"toy": "train"}, }, project_id=self.project.id, ) params = {"project_id": [self.project.id], "start": self.day_ago, "end": self.min_ago} result = discover.get_facets("", params) keys = {r.key for r in result} assert "color" in keys assert "toy" not in keys
37.667513
100
0.523482
4,479
44,523
5.034829
0.074124
0.084209
0.057647
0.061195
0.802182
0.770653
0.734114
0.69886
0.673274
0.622278
0
0.011862
0.324035
44,523
1,181
101
37.699407
0.73744
0.009096
0
0.625461
0
0
0.169494
0.024152
0
0
0
0
0.101476
1
0.054428
false
0
0.013838
0
0.073801
0.002768
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
96b735ddb33f6accf7ce1c3c0dd0ec7e8a7e00d4
64
py
Python
hplusminus/__init__.py
bio-phys/hplusminus
6a59333f91b7bada98872e041afe7cce1a6c5149
[ "MIT" ]
1
2021-04-28T12:21:19.000Z
2021-04-28T12:21:19.000Z
hplusminus/__init__.py
bio-phys/hplusminus
6a59333f91b7bada98872e041afe7cce1a6c5149
[ "MIT" ]
null
null
null
hplusminus/__init__.py
bio-phys/hplusminus
6a59333f91b7bada98872e041afe7cce1a6c5149
[ "MIT" ]
null
null
null
__all__ = ['rld', 'sid'] from .rld import * from .sid import *
12.8
24
0.609375
9
64
3.888889
0.555556
0
0
0
0
0
0
0
0
0
0
0
0.203125
64
4
25
16
0.686275
0
0
0
0
0
0.09375
0
0
0
0
0
0
1
0
false
0
0.666667
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
0
0
1
0
1
0
0
4
96c2eda25dd549ce8c0434dda6edb376b4d176ef
78
py
Python
src/python/tpl-gen/tpl_gen/__init__.py
brunurd/tpl-gen
7e35f92b1cbafdbd244c7dfbe9eed02cfc4755d0
[ "MIT" ]
1
2021-07-07T13:26:20.000Z
2021-07-07T13:26:20.000Z
src/python/tpl-gen/tpl_gen/__init__.py
brunurd/tpl-gen
7e35f92b1cbafdbd244c7dfbe9eed02cfc4755d0
[ "MIT" ]
null
null
null
src/python/tpl-gen/tpl_gen/__init__.py
brunurd/tpl-gen
7e35f92b1cbafdbd244c7dfbe9eed02cfc4755d0
[ "MIT" ]
1
2021-07-07T13:26:29.000Z
2021-07-07T13:26:29.000Z
from .tpl_gen import main, set_vars __all__ = [ "main", "set_vars" ]
11.142857
35
0.615385
11
78
3.727273
0.727273
0.341463
0.536585
0
0
0
0
0
0
0
0
0
0.25641
78
6
36
13
0.706897
0
0
0
0
0
0.153846
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
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
0
0
0
0
0
4
738924242c00c729fc4807d403518b3c3ba8df94
295
py
Python
antu/nn/dynet/__init__.py
AntNLP/pyAnt
3256ada0784401b9677d9568e81f3a8792eebee7
[ "Apache-2.0" ]
17
2018-12-28T09:39:12.000Z
2021-09-21T11:56:00.000Z
antu/nn/dynet/__init__.py
AntNLP/pyAnt
3256ada0784401b9677d9568e81f3a8792eebee7
[ "Apache-2.0" ]
3
2019-01-21T06:14:16.000Z
2020-05-25T13:18:09.000Z
antu/nn/dynet/__init__.py
AntNLP/antu
3256ada0784401b9677d9568e81f3a8792eebee7
[ "Apache-2.0" ]
11
2018-12-31T09:06:03.000Z
2021-06-18T07:00:53.000Z
from .modules.dynet_model import dy_model from .modules.linear import Linear from .modules.perceptron import MLP from .modules.graph_nn_unit import GraphNNUnit from .functional.leaky_relu import leaky_relu from .classifiers.nn_classifier import BiaffineLabelClassifier, PointerLabelClassifier
32.777778
86
0.864407
38
295
6.526316
0.526316
0.177419
0
0
0
0
0
0
0
0
0
0
0.091525
295
8
87
36.875
0.925373
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
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
4
73a09316961832438d6103d37d90066171f35935
307
py
Python
tst/log/test_client.py
mcqueenjordan/actualizer
359642d90173b598b58af7b3da55d748abdca614
[ "MIT" ]
1
2018-04-29T04:40:25.000Z
2018-04-29T04:40:25.000Z
tst/log/test_client.py
mcqueenjordan/actualizer
359642d90173b598b58af7b3da55d748abdca614
[ "MIT" ]
null
null
null
tst/log/test_client.py
mcqueenjordan/actualizer
359642d90173b598b58af7b3da55d748abdca614
[ "MIT" ]
null
null
null
from actualizer.log import client from actualizer.log import nutrition def test_LOG_SUBCLASSES(): assert client.LOG_SUBCLASSES == [nutrition.NutritionLog] def test_get_log_type(): nutrition_message = 'ate 500 cal muffin' assert client.get_log_type(nutrition_message) == nutrition.NutritionLog
30.7
75
0.794788
40
307
5.85
0.45
0.119658
0.145299
0.196581
0.222222
0
0
0
0
0
0
0.011236
0.130293
307
9
76
34.111111
0.865169
0
0
0
0
0
0.058632
0
0
0
0
0
0.285714
1
0.285714
false
0
0.285714
0
0.571429
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
73cae926b671da2680cdcb0a578ea5aceb2fd4c4
528
py
Python
easyrequest/__init__.py
4379711/easyrequest
ece4020ed11f0c8a8a97f0dcfbb615754ed210f7
[ "MIT" ]
1
2020-02-18T02:53:54.000Z
2020-02-18T02:53:54.000Z
easyrequest/__init__.py
4379711/easyrequest
ece4020ed11f0c8a8a97f0dcfbb615754ed210f7
[ "MIT" ]
null
null
null
easyrequest/__init__.py
4379711/easyrequest
ece4020ed11f0c8a8a97f0dcfbb615754ed210f7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sys # Check required Python version if sys.version_info < (3, 6): print("\033[32mError: EasyRequest requires Python 3.6+\033[0m") sys.exit(1) del sys from easyrequest import schedule from easyrequest.items import Items from easyrequest.request.request import Request from easyrequest.request.spider import CrawlSpider from easyrequest.request.parse_response import Parser from easyrequest.utils.log import logger from easyrequest.entrance.run_spider_by_manage import *
29.333333
68
0.767045
72
528
5.555556
0.527778
0.2625
0.165
0
0
0
0
0
0
0
0
0.033557
0.153409
528
17
69
31.058824
0.861298
0.096591
0
0
0
0
0.118162
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0.083333
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
73dbbc66740e67a6e0534b2bfe4530f82a3e18f4
49
py
Python
Mundo-2/exercicio-47.py
FRafaelPA/Praticando-Python
d8a46beceeae2ac20acf4c63f86a32cba537c896
[ "MIT" ]
null
null
null
Mundo-2/exercicio-47.py
FRafaelPA/Praticando-Python
d8a46beceeae2ac20acf4c63f86a32cba537c896
[ "MIT" ]
null
null
null
Mundo-2/exercicio-47.py
FRafaelPA/Praticando-Python
d8a46beceeae2ac20acf4c63f86a32cba537c896
[ "MIT" ]
null
null
null
for i in range(0, 50, 2): print(i, end=' ')
12.25
25
0.489796
10
49
2.4
0.9
0
0
0
0
0
0
0
0
0
0
0.114286
0.285714
49
3
26
16.333333
0.571429
0
0
0
0
0
0.020833
0
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
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
73fcd6124b0e7eb714b5067d8e53ad7d7a96417b
20
py
Python
backend/venv/Lib/site-packages/gaepermission/__init__.py
analurandis/Tur
b4b5d1230d70659be0c3f477f0baea68fc46ba39
[ "MIT" ]
3
2015-05-04T16:04:08.000Z
2018-07-18T17:15:16.000Z
backend/venv/Lib/site-packages/gaepermission/__init__.py
analurandis/Tur
b4b5d1230d70659be0c3f477f0baea68fc46ba39
[ "MIT" ]
null
null
null
backend/venv/Lib/site-packages/gaepermission/__init__.py
analurandis/Tur
b4b5d1230d70659be0c3f477f0baea68fc46ba39
[ "MIT" ]
null
null
null
__version__ = '0.12'
20
20
0.7
3
20
3.333333
1
0
0
0
0
0
0
0
0
0
0
0.166667
0.1
20
1
20
20
0.388889
0
0
0
0
0
0.190476
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
fb4a677e69de9a2837399256fe075ffde154c532
94
py
Python
api/home_types/apps.py
AlohaLATAM/alohaweb1.0
aa2c5cba5e04c6716731e4e4f3d5683ec2a579b1
[ "MIT" ]
null
null
null
api/home_types/apps.py
AlohaLATAM/alohaweb1.0
aa2c5cba5e04c6716731e4e4f3d5683ec2a579b1
[ "MIT" ]
2
2020-06-05T19:16:17.000Z
2021-06-10T20:54:31.000Z
api/home_types/apps.py
AlohaLATAM/alohaweb1.0
aa2c5cba5e04c6716731e4e4f3d5683ec2a579b1
[ "MIT" ]
null
null
null
from django.apps import AppConfig class HomeTypesConfig(AppConfig): name = 'home_types'
15.666667
33
0.765957
11
94
6.454545
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.159574
94
5
34
18.8
0.898734
0
0
0
0
0
0.106383
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
fb64655a8a76b84361fe095dc041cafb08a85a12
124
py
Python
yt_concate/pipeline/steps/postflight.py
rondolu/yt-concate
db67878d2f41178e24aec1c73e99814f94b6e56e
[ "MIT" ]
null
null
null
yt_concate/pipeline/steps/postflight.py
rondolu/yt-concate
db67878d2f41178e24aec1c73e99814f94b6e56e
[ "MIT" ]
null
null
null
yt_concate/pipeline/steps/postflight.py
rondolu/yt-concate
db67878d2f41178e24aec1c73e99814f94b6e56e
[ "MIT" ]
null
null
null
from .step import Step class Postflight(Step): def process(self, data, inputs, utils): print('in postflight')
17.714286
43
0.669355
16
124
5.1875
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.217742
124
6
44
20.666667
0.85567
0
0
0
0
0
0.104839
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
fb71799bc49ee1b6bd42ae2926df52abb0fa3416
894
py
Python
packages/models-library/src/models_library/basic_regex.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
25
2018-04-13T12:44:12.000Z
2022-03-12T15:01:17.000Z
packages/models-library/src/models_library/basic_regex.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
2,553
2018-01-18T17:11:55.000Z
2022-03-31T16:26:40.000Z
packages/models-library/src/models_library/basic_regex.py
odeimaiz/osparc-simcore
71c2fc58dcfe067487dcd75cb70298a4d6237e97
[ "MIT" ]
20
2018-01-18T19:45:33.000Z
2022-03-29T07:08:47.000Z
""" Regular expressions patterns to build pydantic contrained strings - Variants of the patterns with 'Named Groups' captured are suffixed with NG_RE SEE tests_basic_regex.py for examples """ # TODO: for every pattern we should have a formatter function # NOTE: some sites to manualy check ideas # https://regex101.com/ # https://pythex.org/ # # Universally unique Identifier. Pattern taken from https://stackoverflow.com/questions/136505/searching-for-uuids-in-text-with-regex UUID_RE = r"\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b" # Formatted timestamps with date and time DATE_RE = r"\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z" VERSION_RE = r"^(0|[1-9]\d*)(\.(0|[1-9]\d*)){2}(-(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*)(\.(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*))*)?(\+[-\da-zA-Z]+(\.[-\da-zA-Z-]+)*)?$"
40.636364
167
0.615213
175
894
3.108571
0.497143
0.033088
0.036765
0.029412
0.097426
0.097426
0.097426
0.097426
0.051471
0.051471
0
0.08125
0.105145
894
21
168
42.571429
0.59875
0.563758
0
0
0
1
0.842391
0.842391
0
0
0
0.047619
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
null
0
0
1
0
0
0
0
0
0
0
0
0
0
4
fb7ddf6ebe04115c90d4f3e7237b91db43bf5033
346
py
Python
domain/model/local_account/balance.py
agiledragon/transfer-money-python
a8f7520c37f75e098623e58e269d3fccf11cb205
[ "MIT" ]
5
2019-08-07T05:53:39.000Z
2021-11-18T07:02:02.000Z
domain/model/local_account/balance.py
agiledragon/transfer-money-python
a8f7520c37f75e098623e58e269d3fccf11cb205
[ "MIT" ]
null
null
null
domain/model/local_account/balance.py
agiledragon/transfer-money-python
a8f7520c37f75e098623e58e269d3fccf11cb205
[ "MIT" ]
5
2019-08-07T05:53:53.000Z
2020-05-18T16:45:54.000Z
from domain.model.base.value_object import ValueObject class Balance(ValueObject): def __init__(self, initial_amount=0): self.amount = initial_amount def increase(self, amount): self.amount += amount def decrease(self, amount): self.amount -= amount def get_amount(self): return self.amount
19.222222
54
0.67052
42
346
5.333333
0.47619
0.267857
0.125
0.178571
0.258929
0.258929
0
0
0
0
0
0.003802
0.239884
346
17
55
20.352941
0.847909
0
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0.1
0.1
0.7
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
fb96e582e687c3cbe4e5a08e36dbe8b4d59d9fd1
285
py
Python
imgcls/modeling/meta_arch/__init__.py
TuranSKT/detectron2_class
c90e68abbd39afa8c34d83ac760cabf3b5d02868
[ "MIT" ]
22
2020-06-09T11:06:15.000Z
2022-03-29T16:24:23.000Z
imgcls/modeling/meta_arch/__init__.py
TuranSKT/detectron2_class
c90e68abbd39afa8c34d83ac760cabf3b5d02868
[ "MIT" ]
4
2020-07-09T16:39:48.000Z
2020-11-25T13:34:52.000Z
imgcls/modeling/meta_arch/__init__.py
TuranSKT/detectron2_class
c90e68abbd39afa8c34d83ac760cabf3b5d02868
[ "MIT" ]
9
2020-06-10T09:55:09.000Z
2021-08-20T12:55:26.000Z
''' @Copyright (c) tkianai All Rights Reserved. @Author : tkianai @Github : https://github.com/tkianai @Date : 2020-04-26 14:12:20 @FilePath : /ImageCls.detectron2/imgcls/modeling/meta_arch/__init__.py @Description : ''' from .clsnet import ClsNet
25.909091
76
0.645614
34
285
5.264706
0.882353
0
0
0
0
0
0
0
0
0
0
0.067873
0.224561
285
11
77
25.909091
0.742081
0.866667
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
fb9b3bd2e1c22e468d3299ea23646564bc4f4bd2
119
py
Python
xendit/models/cardlesscredit/cardless_credit_type.py
glendaesutanto/xendit-python
f9b131882ff7d045f2e2c6518933d1594efba3e6
[ "MIT" ]
10
2020-10-31T23:34:34.000Z
2022-03-08T19:08:55.000Z
xendit/models/cardlesscredit/cardless_credit_type.py
glendaesutanto/xendit-python
f9b131882ff7d045f2e2c6518933d1594efba3e6
[ "MIT" ]
22
2020-07-30T14:25:07.000Z
2022-03-31T03:55:46.000Z
xendit/models/cardlesscredit/cardless_credit_type.py
glendaesutanto/xendit-python
f9b131882ff7d045f2e2c6518933d1594efba3e6
[ "MIT" ]
11
2020-07-28T08:09:40.000Z
2022-03-18T00:14:02.000Z
from enum import Enum class CardlessCreditType(Enum): """Cardless Credit Type""" KREDIVO = "KREDIVO"
14.875
32
0.647059
12
119
6.416667
0.75
0
0
0
0
0
0
0
0
0
0
0
0.252101
119
7
33
17
0.865169
0.168067
0
0
0
0
0.081395
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
fba1a3e920df21e95a191bfac660d7b164b35fb3
63
py
Python
vrpy/__init__.py
samuelefiorini/vrpy
ad3232b9e9ee9276c9c799d16b4a4a8c2b41eef1
[ "MIT" ]
83
2020-04-01T06:39:11.000Z
2022-03-25T01:33:19.000Z
vrpy/__init__.py
samuelefiorini/vrpy
ad3232b9e9ee9276c9c799d16b4a4a8c2b41eef1
[ "MIT" ]
111
2020-04-01T17:11:30.000Z
2022-03-31T02:22:53.000Z
vrpy/__init__.py
samuelefiorini/vrpy
ad3232b9e9ee9276c9c799d16b4a4a8c2b41eef1
[ "MIT" ]
37
2020-04-01T08:59:38.000Z
2022-03-30T03:04:39.000Z
"""vrpy modules.""" from vrpy.vrp import VehicleRoutingProblem
21
42
0.777778
7
63
7
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.095238
63
2
43
31.5
0.859649
0.206349
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
fbb7cd44da643eb12af819e4d97f50ffe0c48045
3,643
py
Python
S01 - Bootcamp and Binary Classification/SLU11 - Tree-Based Models/utils/utils.py
FarhadManiCodes/batch5-students
3a147145dc4f4ac65a851542987cf687b9915d5b
[ "MIT" ]
2
2022-02-04T17:40:04.000Z
2022-03-26T18:03:12.000Z
S01 - Bootcamp and Binary Classification/SLU11 - Tree-Based Models/utils/utils.py
FarhadManiCodes/batch5-students
3a147145dc4f4ac65a851542987cf687b9915d5b
[ "MIT" ]
null
null
null
S01 - Bootcamp and Binary Classification/SLU11 - Tree-Based Models/utils/utils.py
FarhadManiCodes/batch5-students
3a147145dc4f4ac65a851542987cf687b9915d5b
[ "MIT" ]
2
2021-10-30T16:20:13.000Z
2021-11-25T12:09:31.000Z
import pandas as pd import pydotplus from sklearn.tree import ( DecisionTreeClassifier, export_graphviz, ) def make_data(): data = { "Outlook": [ "sunny", "sunny", "overcast", "rain", "rain", "rain", "overcast", "sunny", "sunny", "rain", "sunny", "overcast", "overcast", "rain", ], "Temperature": [ "hot", "hot", "hot", "mild", "cool", "cool", "cool", "mild", "cool", "mild", "mild", "mild", "hot", "mild", ], "Humidity": [ "high", "high", "high", "high", "normal", "normal", "normal", "high", "normal", "normal", "normal", "high", "normal", "high", ], "Windy": [ "false", "true", "false", "false", "false", "false", "false", "false", "false", "false", "true", "true", "false", "true", ], "Class": [0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0], } return pd.DataFrame.from_dict(data) def make_exercise_data(): data = { "sweet": [ "n", "y", "y", "y", "n", "n", "y", "y", "n", "n", "n", "y", "y", "y", "y", "y", "y", "y", "n", "n", ], "fruit": [ "oranges", "oranges", "oranges", "papaya", "oranges", "oranges", "oranges", "oranges", "oranges", "oranges", "papaya", "oranges", "oranges", "oranges", "oranges", "oranges", "oranges", "oranges", "oranges", "oranges", ], "Region": [ "Central Asia", "Central America", "Central Asia", "Central Asia", "Central Asia", "Central Asia", "Central Asia", "Central Asia", "Central Asia", "Central Asia", "Central America", "Central America", "Central Asia", "Central America", "Central Asia", "Central Asia", "Central America", "Central America", "Central Asia", "Central America", ], "Class": [0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0], } return pd.DataFrame.from_dict(data) def separate_target_variable(data): X = data.copy() y = X.pop('Class') return X, y def process_categorical_features(X): return pd.get_dummies(X) def visualize_tree(clf, feature_names, class_names): dot_data = export_graphviz( clf, out_file=None, feature_names=feature_names, class_names=class_names, ) graph = pydotplus.graph_from_dot_data(dot_data) return graph.create_png()
20.817143
78
0.3423
274
3,643
4.456204
0.244526
0.026208
0.191646
0.206388
0.487305
0.481572
0.431613
0.398853
0.381654
0.361179
0
0.019451
0.520176
3,643
174
79
20.936782
0.679062
0
0
0.78882
0
0
0.204776
0
0
0
0
0
0
1
0.031056
false
0
0.018634
0.006211
0.080745
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
1
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
4
fbc939d04b4f289831d08b8a3c57ed62d4260779
672
py
Python
tests/mockrequest.py
arnaud-morvan/pyramid_oereb
d28348fda0f573eb8156874320270ca93b67bbf5
[ "BSD-2-Clause" ]
2
2018-01-23T13:16:12.000Z
2018-01-26T06:27:29.000Z
tests/mockrequest.py
arnaud-morvan/pyramid_oereb
d28348fda0f573eb8156874320270ca93b67bbf5
[ "BSD-2-Clause" ]
298
2017-08-30T07:12:10.000Z
2019-01-31T10:52:07.000Z
tests/mockrequest.py
pyramidoereb/pyramid_oereb
764c03e98e01ebc709cd17bd0ffd817bfe318892
[ "BSD-2-Clause" ]
4
2017-12-01T09:51:42.000Z
2018-11-21T11:02:47.000Z
# -*- coding: utf-8 -*- from pyramid.testing import DummyRequest from pyramid_oereb.core.views.webservice import Parameter class MockParameter(Parameter): def __init__(self): super(MockParameter, self).__init__('JSON', with_geometry=False, images=False) class MockRequest(DummyRequest): def __init__(self, current_route_url=None): super(MockRequest, self).__init__() self._current_route_url = current_route_url def current_route_url(self, *elements, **kw): if self._current_route_url: return self._current_route_url else: return super(MockRequest, self).current_route_url(*elements, **kw)
29.217391
86
0.708333
80
672
5.5125
0.425
0.190476
0.238095
0.21542
0.104308
0
0
0
0
0
0
0.001835
0.188988
672
22
87
30.545455
0.807339
0.03125
0
0
0
0
0.006163
0
0
0
0
0
0
1
0.214286
false
0
0.142857
0
0.642857
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
836bc0494ea59fccfe8a597dc8732c985183754f
111
py
Python
src/run.py
xPowerz/EventApp
20c43752e271792052d641fd446a42c1993ead23
[ "MIT" ]
null
null
null
src/run.py
xPowerz/EventApp
20c43752e271792052d641fd446a42c1993ead23
[ "MIT" ]
null
null
null
src/run.py
xPowerz/EventApp
20c43752e271792052d641fd446a42c1993ead23
[ "MIT" ]
null
null
null
#!/usr/bin/env python from app.app import run, setup, app setup(app) if __name__ == '__main__': run(app)
13.875
35
0.666667
18
111
3.666667
0.666667
0.242424
0
0
0
0
0
0
0
0
0
0
0.18018
111
7
36
15.857143
0.725275
0.18018
0
0
0
0
0.088889
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
8371ee5554f151acb2e3e0fb0a80cb3550e46b39
1,246
py
Python
reinvent_models/model_factory/link_invent_adapter.py
GT4SD/-reinvent_models
e1cf00d1b24fe5f39354e34829adc25460da84e2
[ "MIT" ]
null
null
null
reinvent_models/model_factory/link_invent_adapter.py
GT4SD/-reinvent_models
e1cf00d1b24fe5f39354e34829adc25460da84e2
[ "MIT" ]
1
2022-03-07T12:18:00.000Z
2022-03-07T12:18:00.000Z
reinvent_models/model_factory/link_invent_adapter.py
GT4SD/reinvent_models
e1cf00d1b24fe5f39354e34829adc25460da84e2
[ "MIT" ]
null
null
null
from reinvent_models.link_invent.link_invent_model import LinkInventModel from reinvent_models.model_factory.generative_model_base import GenerativeModelBase class LinkInventAdapter(GenerativeModelBase): def __init__(self, path_to_file: str, mode: str): self.generative_model = LinkInventModel.load_from_file(path_to_file, mode) self.vocabulary = self.generative_model.vocabulary self.max_sequence_length = self.generative_model.max_sequence_length self.network = self.generative_model.network def save_to_file(self, path): self.generative_model.save_to_file(path) def likelihood(self, warheads_seqs, warheads_seq_lengths, linker_seqs, linker_seq_lengths): return self.generative_model.likelihood(warheads_seqs, warheads_seq_lengths, linker_seqs, linker_seq_lengths) def sample(self, warheads_seqs, warheads_seq_lengths): return self.generative_model.sample(warheads_seqs, warheads_seq_lengths) def set_mode(self, mode: str): self.generative_model.set_mode(mode) def get_network_parameters(self): return self.generative_model.get_network_parameters() def get_vocabulary(self): return self.vocabulary
41.533333
118
0.764045
155
1,246
5.754839
0.258065
0.168161
0.191704
0.103139
0.316144
0.224215
0.125561
0.125561
0.125561
0.125561
0
0
0.168539
1,246
29
119
42.965517
0.861004
0
0
0
0
0
0
0
0
0
0
0
0
1
0.35
false
0
0.1
0.2
0.7
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
83ece38093896781091fda28ec91be91f9eb5ac3
165
py
Python
api/__main__.py
quattad/coviz-api
57813ebd064f0f543d4471af471eb926c3d75bcb
[ "MIT" ]
null
null
null
api/__main__.py
quattad/coviz-api
57813ebd064f0f543d4471af471eb926c3d75bcb
[ "MIT" ]
1
2021-06-08T21:50:13.000Z
2021-06-08T21:50:13.000Z
api/__main__.py
quattad/coviz-api
57813ebd064f0f543d4471af471eb926c3d75bcb
[ "MIT" ]
null
null
null
# __name__ : special string attribute of all python modules # __main__ : when module is run directly with python -m module_name, module_name becomes __main__
82.5
101
0.769697
23
165
4.913043
0.73913
0.176991
0
0
0
0
0
0
0
0
0
0
0.193939
165
2
101
82.5
0.849624
0.927273
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
83f05bdf62070f1f005cb687db0401a52ad12371
696
py
Python
integrationtest/vm/stress/suite_teardown.py
sherry546/zstack-woodpecker
54a37459f2d72ce6820974feaa6eb55772c3d2ce
[ "Apache-2.0" ]
2
2016-03-23T08:45:44.000Z
2017-06-26T02:40:46.000Z
integrationtest/vm/stress/suite_teardown.py
KevinDavidMitnick/zstack-woodpecker
96257faaf3c362168d008bdb47002025ad669b24
[ "Apache-2.0" ]
null
null
null
integrationtest/vm/stress/suite_teardown.py
KevinDavidMitnick/zstack-woodpecker
96257faaf3c362168d008bdb47002025ad669b24
[ "Apache-2.0" ]
2
2020-03-12T03:11:28.000Z
2021-07-26T01:57:58.000Z
''' Integration Test Teardown case @author: Youyk ''' import zstackwoodpecker.setup_actions as setup_actions from zstackwoodpecker import test_util from zstackwoodpecker import clean_util from zstacklib.utils import linux from zstacklib.utils import http import zstackwoodpecker.test_lib as test_lib from zstacktestagent.plugins import host as host_plugin from zstacktestagent import testagent def test(): clean_util.cleanup_all_vms_violently() clean_util.cleanup_none_vm_volumes_violently() clean_util.umount_all_primary_storages_violently() test_lib.setup_plan.stop_node() test_lib.lib_cleanup_host_ip_dict() test_util.test_pass('ZStack POC Test Teardown Success')
27.84
59
0.827586
96
696
5.677083
0.458333
0.066055
0.095413
0.088073
0
0
0
0
0
0
0
0
0.119253
696
24
60
29
0.88907
0.066092
0
0
0
0
0.049922
0
0
0
0
0
0
1
0.066667
true
0.066667
0.533333
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
4
f7d666a062740d02ecef0e61cb2289b1f602521b
251
py
Python
API/Agents/getCurrentAgentInformation.py
happy-travel/yoshinogari
58c18da84c9bc3c03550c0aed60460ba49c0207b
[ "MIT" ]
null
null
null
API/Agents/getCurrentAgentInformation.py
happy-travel/yoshinogari
58c18da84c9bc3c03550c0aed60460ba49c0207b
[ "MIT" ]
null
null
null
API/Agents/getCurrentAgentInformation.py
happy-travel/yoshinogari
58c18da84c9bc3c03550c0aed60460ba49c0207b
[ "MIT" ]
null
null
null
import requests from API.library.support.data import edo def get_current_agent_information(client): url = edo + '/en/api/1.0/agent' current_agent_information = requests.get(url, headers=client) return current_agent_information
25.1
66
0.74502
34
251
5.294118
0.588235
0.2
0.383333
0
0
0
0
0
0
0
0
0.009615
0.171315
251
9
67
27.888889
0.855769
0
0
0
0
0
0.070248
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f7f9284e0b60183c0350cf42a0c81e48b3757b0c
201
py
Python
nbds_colab/ensemble1.py
hallmx/nbds_colab
77e5cab5805a95cc1c80f7ee3ca9429c94e1876a
[ "Apache-2.0" ]
null
null
null
nbds_colab/ensemble1.py
hallmx/nbds_colab
77e5cab5805a95cc1c80f7ee3ca9429c94e1876a
[ "Apache-2.0" ]
2
2021-09-28T00:53:05.000Z
2022-02-26T06:41:34.000Z
nbds_colab/ensemble1.py
hallmx/nbds_colab
77e5cab5805a95cc1c80f7ee3ca9429c94e1876a
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: 08_ensemble1.ipynb (unless otherwise specified). __all__ = ['ensemble1_test'] # Cell def ensemble1_test(test_msg): "Function ensemble1" return test_msg
25.125
92
0.766169
27
201
5.37037
0.703704
0.17931
0
0
0
0
0
0
0
0
0
0.034682
0.139303
201
8
93
25.125
0.803468
0.572139
0
0
1
0
0.307692
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
f7ff7a67c3e28d9981f94d4387fc28f505ae5a02
99
py
Python
pycaprio/core/interfaces/types.py
reckart/pycaprio
1d030ecd97cb324e404c16520fe6250c49c3bb06
[ "MIT" ]
9
2019-08-27T11:21:07.000Z
2021-03-11T15:41:44.000Z
pycaprio/core/interfaces/types.py
reckart/pycaprio
1d030ecd97cb324e404c16520fe6250c49c3bb06
[ "MIT" ]
25
2019-09-03T11:05:18.000Z
2021-04-18T15:57:33.000Z
pycaprio/core/interfaces/types.py
reckart/pycaprio
1d030ecd97cb324e404c16520fe6250c49c3bb06
[ "MIT" ]
6
2019-10-02T16:51:10.000Z
2021-03-11T15:41:52.000Z
from typing import Tuple authentication_type = Tuple[str, str] status_list_type = Tuple[int, ...]
19.8
37
0.757576
14
99
5.142857
0.714286
0.25
0
0
0
0
0
0
0
0
0
0
0.131313
99
4
38
24.75
0.837209
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.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
0
0
0
1
0
0
0
0
4
7936cee6164289e55dd0d809e693292c663a5918
126
py
Python
conftest.py
kmggh/python-simple-BASIC-compiler
2b986788e4ef95287ee6446c81e3e48dc9dcb832
[ "Artistic-2.0" ]
null
null
null
conftest.py
kmggh/python-simple-BASIC-compiler
2b986788e4ef95287ee6446c81e3e48dc9dcb832
[ "Artistic-2.0" ]
null
null
null
conftest.py
kmggh/python-simple-BASIC-compiler
2b986788e4ef95287ee6446c81e3e48dc9dcb832
[ "Artistic-2.0" ]
null
null
null
# coding: utf-8 # © 2018 by Ken Guyton. All rights reserved. """This file is mainly here so pytest can find the modules."""
25.2
62
0.690476
22
126
4
1
0
0
0
0
0
0
0
0
0
0
0.049505
0.198413
126
4
63
31.5
0.811881
0.912698
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
793cdd8def428d1d2f86d91c591d90bb51aefa8a
1,518
py
Python
tests/runtime/argo/test_cron.py
raztud/dagger
7b394138c139e3b4fdf228e3d34359f1ae6bdd7a
[ "Apache-2.0" ]
9
2021-09-06T14:22:38.000Z
2022-02-08T07:48:39.000Z
tests/runtime/argo/test_cron.py
raztud/dagger
7b394138c139e3b4fdf228e3d34359f1ae6bdd7a
[ "Apache-2.0" ]
36
2021-09-04T06:20:19.000Z
2021-12-26T17:54:59.000Z
tests/runtime/argo/test_cron.py
raztud/dagger
7b394138c139e3b4fdf228e3d34359f1ae6bdd7a
[ "Apache-2.0" ]
4
2021-09-06T08:07:19.000Z
2021-10-18T19:13:18.000Z
from dagger.runtime.argo.cron import Cron, CronConcurrencyPolicy def test__cron__representation(): extra_spec_options = {"extra": "options"} cron = Cron( schedule="0 1 * * 0", starting_deadline_seconds=2, concurrency_policy=CronConcurrencyPolicy.REPLACE, timezone="Europe/Madrid", successful_jobs_history_limit=4, failed_jobs_history_limit=6, extra_spec_options=extra_spec_options, ) assert ( repr(cron) == f"Cron(schedule=0 1 * * 0, starting_deadline_seconds=2, concurrency_policy=Replace, timezone=Europe/Madrid, successful_jobs_history_limit=4, failed_jobs_history_limit=6, extra_spec_options={repr(extra_spec_options)})" ) def test__cron__eq(): schedule = "0 1 * * 0" timezone = "Europe/Madrid" concurrency_policy = CronConcurrencyPolicy.REPLACE extra_spec_options = {"extra": "options"} cron = Cron( schedule=schedule, starting_deadline_seconds=2, concurrency_policy=concurrency_policy, timezone=timezone, successful_jobs_history_limit=4, failed_jobs_history_limit=6, extra_spec_options=extra_spec_options, ) assert cron != Cron(schedule) assert cron == Cron( schedule=schedule, starting_deadline_seconds=2, concurrency_policy=concurrency_policy, timezone=timezone, successful_jobs_history_limit=4, failed_jobs_history_limit=6, extra_spec_options=extra_spec_options, )
33.733333
228
0.694993
171
1,518
5.777778
0.216374
0.091093
0.161943
0.106275
0.755061
0.755061
0.755061
0.755061
0.694332
0.694332
0
0.017707
0.218709
1,518
44
229
34.5
0.815346
0
0
0.55
0
0.025
0.185771
0.121212
0
0
0
0
0.075
1
0.05
false
0
0.025
0
0.075
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f70c9446510fd3a913edf73e84b550857396d62e
153
py
Python
src/process/infrastructure/cqrs/CommandQueryBase.py
PythonDataIntegrator/pythondataintegrator
6167778c36c2295e36199ac0d4d256a4a0c28d7a
[ "MIT" ]
14
2020-12-19T15:06:13.000Z
2022-01-12T19:52:17.000Z
src/api/infrastructure/cqrs/CommandQueryBase.py
PythonDataIntegrator/pythondataintegrator
6167778c36c2295e36199ac0d4d256a4a0c28d7a
[ "MIT" ]
43
2021-01-06T22:05:22.000Z
2022-03-10T10:30:30.000Z
src/process/infrastructure/cqrs/CommandQueryBase.py
PythonDataIntegrator/pythondataintegrator
6167778c36c2295e36199ac0d4d256a4a0c28d7a
[ "MIT" ]
4
2020-12-18T23:10:09.000Z
2021-04-02T13:03:12.000Z
from typing import Generic, TypeVar CQ = TypeVar('CQ', covariant=True) class CommandQueryBase(Generic[CQ]): def __init__(self) -> CQ: pass
19.125
36
0.686275
19
153
5.315789
0.736842
0.178218
0
0
0
0
0
0
0
0
0
0
0.196078
153
8
37
19.125
0.821138
0
0
0
0
0
0.012987
0
0
0
0
0
0
1
0.2
false
0.2
0.2
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
4
f727bf0787af05ae30dd3c315f89a1ffc68b1a5f
126
py
Python
models.py
banr1jnts/kaggle-youtube2nd
21248d563afcf707cc7665703a987d71c94f4c5a
[ "MIT" ]
null
null
null
models.py
banr1jnts/kaggle-youtube2nd
21248d563afcf707cc7665703a987d71c94f4c5a
[ "MIT" ]
null
null
null
models.py
banr1jnts/kaggle-youtube2nd
21248d563afcf707cc7665703a987d71c94f4c5a
[ "MIT" ]
null
null
null
class BaseModel(object): def create_model(self, unused_model_input, **unused_params): raise NotImplementedError()
31.5
64
0.746032
14
126
6.428571
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.15873
126
3
65
42
0.849057
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
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
0
0
0
1
0
0
4
f7645ad6b947ef2e9aed78c87ecd4bcb4f382303
189
py
Python
tests/test_event.py
yuvadm/nostrpy
65db6c4c19862e93c3179b298774cbea9d216c5b
[ "MIT" ]
null
null
null
tests/test_event.py
yuvadm/nostrpy
65db6c4c19862e93c3179b298774cbea9d216c5b
[ "MIT" ]
1
2022-01-17T18:47:48.000Z
2022-01-17T18:47:48.000Z
tests/test_event.py
yuvadm/nostrpy
65db6c4c19862e93c3179b298774cbea9d216c5b
[ "MIT" ]
null
null
null
from nostr.event import Event def test_event_id(): e = Event("1q", "asd", created_at=1641819738) assert e.id == "bbe84e5f88993ad461f0ee82f746ed5f1aa023c53187185c54d95561deb2651f"
27
85
0.767196
20
189
7.1
0.75
0
0
0
0
0
0
0
0
0
0
0.317073
0.132275
189
6
86
31.5
0.54878
0
0
0
0
0
0.365079
0.338624
0
0
0
0
0.25
1
0.25
false
0
0.25
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
f76e17ed3bb1e3d5323ca4cb4d1268f0432854ee
114
py
Python
AtCoder/ABC/000-159/ABC142_B.py
sireline/PyCode
8578467710c3c1faa89499f5d732507f5d9a584c
[ "MIT" ]
null
null
null
AtCoder/ABC/000-159/ABC142_B.py
sireline/PyCode
8578467710c3c1faa89499f5d732507f5d9a584c
[ "MIT" ]
null
null
null
AtCoder/ABC/000-159/ABC142_B.py
sireline/PyCode
8578467710c3c1faa89499f5d732507f5d9a584c
[ "MIT" ]
null
null
null
N, K = [int(n) for n in input().split()] H = [int(h) for h in input().split()] print(len([x for x in H if x>=K]))
28.5
40
0.552632
27
114
2.333333
0.444444
0.222222
0.380952
0
0
0
0
0
0
0
0
0
0.192982
114
3
41
38
0.684783
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
0
0
0
0
0
4
f7927f2279ff12cd0080e59190e80a1cf8e75e0f
90
py
Python
ruthie/__main__.py
marverix/ruthie
9ef5d8bafc5d3b0b2249697f232ed7eca971a2f1
[ "0BSD" ]
3
2021-03-11T15:29:23.000Z
2022-03-21T11:23:57.000Z
ruthie/__main__.py
marverix/ruthie
9ef5d8bafc5d3b0b2249697f232ed7eca971a2f1
[ "0BSD" ]
null
null
null
ruthie/__main__.py
marverix/ruthie
9ef5d8bafc5d3b0b2249697f232ed7eca971a2f1
[ "0BSD" ]
1
2021-03-08T18:08:51.000Z
2021-03-08T18:08:51.000Z
#!/usr/bin/env python3 from ruthie import cli if __name__ == '__main__': cli.main()
12.857143
26
0.666667
13
90
4
0.846154
0
0
0
0
0
0
0
0
0
0
0.013699
0.188889
90
6
27
15
0.69863
0.233333
0
0
0
0
0.117647
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
e3a5012ae5ff17ed0ee67baa769c6f486a99aade
130
py
Python
freejournal_cli.py
FreeJournal/freejournal
4caa904c3adbc9e9c66603aec1e9b490d37c5306
[ "MIT" ]
4
2015-03-01T01:41:40.000Z
2015-07-09T18:34:50.000Z
freejournal_cli.py
FreeJournal/freejournal
4caa904c3adbc9e9c66603aec1e9b490d37c5306
[ "MIT" ]
78
2015-02-28T22:50:37.000Z
2015-05-06T04:51:23.000Z
freejournal_cli.py
FreeJournal/freejournal
4caa904c3adbc9e9c66603aec1e9b490d37c5306
[ "MIT" ]
1
2018-06-02T22:34:43.000Z
2018-06-02T22:34:43.000Z
#!/usr/bin/python from frontend.cli import commands import sys if __name__ == '__main__': commands.process_command(sys.argv)
18.571429
38
0.753846
18
130
4.944444
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.130769
130
6
39
21.666667
0.787611
0.123077
0
0
0
0
0.070796
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
e3d2b09156e08a98a60efb97319ba225ca92bbfa
232
py
Python
server/src/util/Configuration.py
lixinyang123/ERP
4df02d68c74067cd22589c5a397a85029b388665
[ "MIT" ]
4
2021-04-30T14:56:50.000Z
2022-03-29T06:09:28.000Z
server/src/util/Configuration.py
lixinyang123/ERP
4df02d68c74067cd22589c5a397a85029b388665
[ "MIT" ]
null
null
null
server/src/util/Configuration.py
lixinyang123/ERP
4df02d68c74067cd22589c5a397a85029b388665
[ "MIT" ]
1
2022-02-26T02:51:54.000Z
2022-02-26T02:51:54.000Z
import json class Configuration: def __init__(self): with open("application.json") as file: self.config = json.loads(file.read()) def get(self, configName): return self.config[configName]
19.333333
49
0.625
27
232
5.222222
0.666667
0.141844
0
0
0
0
0
0
0
0
0
0
0.267241
232
11
50
21.090909
0.829412
0
0
0
0
0
0.068966
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.714286
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
540468eee2bbfccb8c90484f75101af4d2512007
445
py
Python
src/jk_simplexml/HToolkit_Load_HTML.py
jkpubsrc/python-module-jk-simplexml
427b5c5ce05ecbcdea50816809f91ac2f51d20da
[ "Apache-1.1" ]
null
null
null
src/jk_simplexml/HToolkit_Load_HTML.py
jkpubsrc/python-module-jk-simplexml
427b5c5ce05ecbcdea50816809f91ac2f51d20da
[ "Apache-1.1" ]
null
null
null
src/jk_simplexml/HToolkit_Load_HTML.py
jkpubsrc/python-module-jk-simplexml
427b5c5ce05ecbcdea50816809f91ac2f51d20da
[ "Apache-1.1" ]
null
null
null
import os import sys from .HAbstractElement import HAbstractElement from .HAttribute import HAttribute from .HAttributeList import HAttributeList from .HText import HText from .HElement_HAbstractElementList import HElement, HAbstractElementList """ class HToolkit_Load_HTML(object): def __init__(self): pass # # """ # TODO: Adapt /home/jknauth/DevOS/PythonModules/jk_htmlparser/src/jk_htmlparser/HtmlTokenizerImpl.py
11.125
100
0.782022
48
445
7.0625
0.625
0.165192
0
0
0
0
0
0
0
0
0
0
0.148315
445
39
101
11.410256
0.894459
0.220225
0
0
0
0
0
0
0
0
0
0.025641
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
1
0
1
0
0
4
580e13e0c1b4c1aac833b39f6b8039c9651541a1
270
py
Python
2021/day_01/test_day01.py
d02d33pak/Advent-Of-Code
765b0302c256ad61864095a537a3f6379901b1c2
[ "MIT" ]
null
null
null
2021/day_01/test_day01.py
d02d33pak/Advent-Of-Code
765b0302c256ad61864095a537a3f6379901b1c2
[ "MIT" ]
null
null
null
2021/day_01/test_day01.py
d02d33pak/Advent-Of-Code
765b0302c256ad61864095a537a3f6379901b1c2
[ "MIT" ]
null
null
null
""" Tests for Day 01 """ from day01 import parse_input, part1, part2 def test_part1(): """ Checks for nums in list """ assert part1(parse_input("test_input")) == 7 def test_part2(): """ Test part two """ assert part2(parse_input("test_input")) == 5
16.875
48
0.633333
39
270
4.205128
0.564103
0.182927
0.170732
0.231707
0
0
0
0
0
0
0
0.056338
0.211111
270
15
49
18
0.713615
0.207407
0
0
0
0
0.103093
0
0
0
0
0
0.4
1
0.4
true
0
0.2
0
0.6
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
1
0
0
4
583be43c7d91676a872ff09f4247d10e79773b7c
330
py
Python
python/Log.py
yidahis/Excel2Multiple-device-upload-ios
a95add9f8a7f77445e348997fa3838167db46b37
[ "MIT" ]
2
2018-12-27T03:19:51.000Z
2019-05-06T09:26:47.000Z
python/Log.py
yidahis/Excel2Multiple-device-upload-ios
a95add9f8a7f77445e348997fa3838167db46b37
[ "MIT" ]
null
null
null
python/Log.py
yidahis/Excel2Multiple-device-upload-ios
a95add9f8a7f77445e348997fa3838167db46b37
[ "MIT" ]
1
2018-12-27T03:19:52.000Z
2018-12-27T03:19:52.000Z
#!/usr/bin/python # -*- coding: UTF-8 -*- import os class Log: 'Log util' #Log error @staticmethod def info(msg): print '\033[1;30;50m' print msg print '\033[0m' #Log error @staticmethod def error(msg): print '\033[1;31;50m' print msg print '\033[0m'
15.714286
29
0.515152
44
330
3.863636
0.522727
0.188235
0.258824
0.270588
0.247059
0.247059
0
0
0
0
0
0.115207
0.342424
330
21
30
15.714286
0.668203
0.169697
0
0.461538
0
0
0.177122
0
0
0
0
0
0
0
null
null
0
0.076923
null
null
0.461538
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
4
58785edcedeaad4cd83abef6217b4514480a1a83
83
py
Python
python/testData/quickFixes/PyAddFieldQuickFixTest/fromUnusedParameter_after.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/quickFixes/PyAddFieldQuickFixTest/fromUnusedParameter_after.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/quickFixes/PyAddFieldQuickFixTest/fromUnusedParameter_after.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
class A: def __init__(self, foo): self.foo = foo print('hello')
20.75
28
0.53012
11
83
3.636364
0.727273
0.35
0
0
0
0
0
0
0
0
0
0
0.337349
83
4
29
20.75
0.727273
0
0
0
0
0
0.059524
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0.25
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
0
0
0
0
4
5889880d728cbd59d08639e863d88a6dd260903a
123
py
Python
Archive/jpoc/jpoc.py
cah-cesar-medrano/jira-cli-project-onboard
f4c7dec9b2663e5031d2c035a64470638c56add9
[ "MIT" ]
null
null
null
Archive/jpoc/jpoc.py
cah-cesar-medrano/jira-cli-project-onboard
f4c7dec9b2663e5031d2c035a64470638c56add9
[ "MIT" ]
null
null
null
Archive/jpoc/jpoc.py
cah-cesar-medrano/jira-cli-project-onboard
f4c7dec9b2663e5031d2c035a64470638c56add9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """bootstrap.stuff: stuff module within the bootstrap package.""" class Jpoc(object): pass
13.666667
65
0.642276
15
123
5.266667
0.866667
0
0
0
0
0
0
0
0
0
0
0.01
0.186992
123
8
66
15.375
0.78
0.666667
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
589d461da85da81c93971e06212986620512cc4a
3,283
py
Python
tests/recipes/orca/test_orca_recipes.py
siddhant-deepsource/quacc
60bcb32f65e9cee0bd44aa6cfc0df142a76387cf
[ "BSD-3-Clause-LBNL" ]
null
null
null
tests/recipes/orca/test_orca_recipes.py
siddhant-deepsource/quacc
60bcb32f65e9cee0bd44aa6cfc0df142a76387cf
[ "BSD-3-Clause-LBNL" ]
null
null
null
tests/recipes/orca/test_orca_recipes.py
siddhant-deepsource/quacc
60bcb32f65e9cee0bd44aa6cfc0df142a76387cf
[ "BSD-3-Clause-LBNL" ]
null
null
null
import multiprocessing import os from pathlib import Path from shutil import copy from ase.build import molecule from jobflow.managers.local import run_locally from quacc.recipes.orca.core import RelaxMaker, StaticMaker FILE_DIR = Path(__file__).resolve().parent ORCA_DIR = os.path.join(FILE_DIR, "orca_run") def setup_module(): for f in os.listdir(ORCA_DIR): copy(os.path.join(ORCA_DIR, f), os.path.join(os.getcwd(), f)) def teardown_module(): for f in os.listdir(ORCA_DIR): if os.path.exists(os.path.join(os.getcwd(), f)): os.remove(os.path.join(os.getcwd(), f)) def test_static_maker(): atoms = molecule("H2") nprocs = multiprocessing.cpu_count() job = StaticMaker().make(atoms) responses = run_locally(job, ensure_success=True) output = responses[job.uuid][1].output assert output["nsites"] == len(atoms) assert output["name"] == "ORCA-Static" assert ( output["parameters"]["orcasimpleinput"] == "wb97x-d def2-tzvp sp slowconv normalprint" ) assert output["parameters"]["orcablocks"] == f"%pal nprocs {nprocs} end" assert output["parameters"]["charge"] == 0 assert output["parameters"]["mult"] == 1 job = StaticMaker( input_swaps={"def2-SVP": True, "def2-TZVP": False}, block_swaps={"%scf maxiter 300 end": True}, ).make(atoms, charge=-2, mult=3) responses = run_locally(job, ensure_success=True) output = responses[job.uuid][1].output assert output["nsites"] == len(atoms) assert output["name"] == "ORCA-Static" assert output["parameters"]["charge"] == -2 assert output["parameters"]["mult"] == 3 assert ( output["parameters"]["orcasimpleinput"] == "wb97x-d sp slowconv normalprint def2-svp" ) assert ( output["parameters"]["orcablocks"] == f"%scf maxiter 300 end %pal nprocs {nprocs} end" ) def test_relax_maker(): atoms = molecule("H2") nprocs = multiprocessing.cpu_count() job = RelaxMaker().make(atoms) responses = run_locally(job, ensure_success=True) output = responses[job.uuid][1].output assert output["nsites"] == len(atoms) assert output["parameters"]["charge"] == 0 assert output["parameters"]["mult"] == 1 assert output["name"] == "ORCA-Relax" assert ( output["parameters"]["orcasimpleinput"] == "wb97x-d def2-tzvp opt slowconv normalprint" ) assert output["parameters"]["orcablocks"] == f"%pal nprocs {nprocs} end" job = RelaxMaker( input_swaps={ "HF": True, "wb97x-d": False, "def2-SVP": True, "def2-TZVP": False, }, block_swaps={"%scf maxiter 300 end": True}, ).make(atoms, charge=-2, mult=3) responses = run_locally(job, ensure_success=True) output = responses[job.uuid][1].output assert output["nsites"] == len(atoms) assert output["name"] == "ORCA-Relax" assert output["parameters"]["charge"] == -2 assert output["parameters"]["mult"] == 3 assert ( output["parameters"]["orcasimpleinput"] == "opt slowconv normalprint hf def2-svp" ) assert ( output["parameters"]["orcablocks"] == f"%scf maxiter 300 end %pal nprocs {nprocs} end" )
31.266667
76
0.626866
398
3,283
5.090452
0.221106
0.142152
0.173741
0.043435
0.771471
0.771471
0.759131
0.737414
0.655479
0.604146
0
0.017892
0.216875
3,283
104
77
31.567308
0.770128
0
0
0.574713
0
0
0.23576
0
0
0
0
0
0.275862
1
0.045977
false
0
0.08046
0
0.126437
0.045977
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
54383bb2eaa50a009f2aa863b58f17d82af4952c
160
py
Python
Python/List-1/reverse3.py
LucasHenrique-dev/exerc-cios-codingbat
ff92db10387757b9a2e3f72be6b7e51824b1ffa6
[ "MIT" ]
2
2020-12-09T13:36:44.000Z
2021-08-16T01:17:16.000Z
Python/List-1/reverse3.py
LucasHenrique-dev/exerc-cios-codingbat
ff92db10387757b9a2e3f72be6b7e51824b1ffa6
[ "MIT" ]
null
null
null
Python/List-1/reverse3.py
LucasHenrique-dev/exerc-cios-codingbat
ff92db10387757b9a2e3f72be6b7e51824b1ffa6
[ "MIT" ]
null
null
null
""" Dada uma lista numérica de tamanho 3 ("nums"), retorne-a em ordem invertida. """ def reverse3(nums): return nums[-1::-1] print(reverse3([1, 2, 3]))
14.545455
76
0.63125
25
160
4.04
0.76
0
0
0
0
0
0
0
0
0
0
0.061069
0.18125
160
10
77
16
0.709924
0.475
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
0.666667
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
544385c1e10943e4a0c148583fd1de9622ea982d
1,744
py
Python
core/migrations/0002_auto_20210605_0916.py
m-e-l-u-h-a-n/Rapid-Results
e5bdec3b2c39ada80328e31030a19bbaf47b0dd2
[ "Apache-2.0" ]
null
null
null
core/migrations/0002_auto_20210605_0916.py
m-e-l-u-h-a-n/Rapid-Results
e5bdec3b2c39ada80328e31030a19bbaf47b0dd2
[ "Apache-2.0" ]
null
null
null
core/migrations/0002_auto_20210605_0916.py
m-e-l-u-h-a-n/Rapid-Results
e5bdec3b2c39ada80328e31030a19bbaf47b0dd2
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.5 on 2021-06-05 09:16 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='order', name='billing_address', ), migrations.RemoveField( model_name='order', name='coupon', ), migrations.RemoveField( model_name='order', name='items', ), migrations.RemoveField( model_name='order', name='payment', ), migrations.RemoveField( model_name='order', name='shipping_address', ), migrations.RemoveField( model_name='order', name='user', ), migrations.RemoveField( model_name='orderitem', name='item', ), migrations.RemoveField( model_name='orderitem', name='user', ), migrations.RemoveField( model_name='payment', name='user', ), migrations.RemoveField( model_name='refund', name='order', ), migrations.DeleteModel( name='Address', ), migrations.DeleteModel( name='Coupon', ), migrations.DeleteModel( name='Item', ), migrations.DeleteModel( name='Order', ), migrations.DeleteModel( name='OrderItem', ), migrations.DeleteModel( name='Payment', ), migrations.DeleteModel( name='Refund', ), ]
23.253333
47
0.477638
126
1,744
6.507937
0.301587
0.256098
0.317073
0.365854
0.582927
0.5
0.112195
0
0
0
0
0.018375
0.40711
1,744
74
48
23.567568
0.774662
0.025803
0
0.661765
1
0
0.112552
0
0
0
0
0
0
1
0
false
0
0.014706
0
0.058824
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
544b6eb886ee99033c5bcd2371e8e75d3dfeaee2
81
py
Python
vol/apps.py
volCommunity/vol-django
06c625f1cb2ca4b619dfcfa04a9ded445600ad7f
[ "Apache-2.0" ]
5
2017-10-11T03:40:07.000Z
2018-07-09T12:30:13.000Z
vol/apps.py
volCommunity/vol-django
06c625f1cb2ca4b619dfcfa04a9ded445600ad7f
[ "Apache-2.0" ]
105
2017-09-28T00:41:00.000Z
2021-06-01T21:26:03.000Z
vol/apps.py
volCommunity/vol-django
06c625f1cb2ca4b619dfcfa04a9ded445600ad7f
[ "Apache-2.0" ]
3
2017-10-26T22:53:51.000Z
2017-11-01T18:43:22.000Z
from django.apps import AppConfig class VolConfig(AppConfig): name = 'vol'
13.5
33
0.728395
10
81
5.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.185185
81
5
34
16.2
0.893939
0
0
0
0
0
0.037037
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
546e19c0915e76ebe33fa06f9ff4b922a56066c5
106
py
Python
database/base.py
kdknigga/aeroinfo
d53a058713e8743be77834156a24e75f63eca91a
[ "MIT" ]
6
2019-10-17T19:55:42.000Z
2021-12-15T03:35:13.000Z
database/base.py
kdknigga/aeroinfo
d53a058713e8743be77834156a24e75f63eca91a
[ "MIT" ]
15
2019-01-24T03:33:45.000Z
2021-10-06T15:20:55.000Z
database/base.py
kdknigga/aeroinfo
d53a058713e8743be77834156a24e75f63eca91a
[ "MIT" ]
3
2019-01-23T01:05:09.000Z
2021-04-09T03:32:18.000Z
#!/usr/bin/env python3 from sqlalchemy.ext.declarative import declarative_base Base = declarative_base()
21.2
55
0.811321
14
106
6
0.714286
0.357143
0
0
0
0
0
0
0
0
0
0.010417
0.09434
106
5
56
21.2
0.864583
0.198113
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
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
0
0
0
4
49a673f9182108848e3be59999a26d4828a81732
87
py
Python
socketL/zhangll/client/test.py
MaochengXiong/PythonLearning
2b57df0a4e58fd8ea070bb32e48aa6c1e6f62204
[ "Apache-2.0" ]
null
null
null
socketL/zhangll/client/test.py
MaochengXiong/PythonLearning
2b57df0a4e58fd8ea070bb32e48aa6c1e6f62204
[ "Apache-2.0" ]
null
null
null
socketL/zhangll/client/test.py
MaochengXiong/PythonLearning
2b57df0a4e58fd8ea070bb32e48aa6c1e6f62204
[ "Apache-2.0" ]
null
null
null
# cards = '1,2 ,3'.strip(' ').split(',') # print(cards.count('')) print('reader0'[-1])
21.75
40
0.528736
12
87
3.833333
0.75
0
0
0
0
0
0
0
0
0
0
0.064103
0.103448
87
4
41
21.75
0.525641
0.701149
0
0
0
0
0.291667
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
49c1704c99d927410db948addeb154da3ae89f9b
340
py
Python
utils/__init__.py
dev-swi2021/multiclass-semantic-segmentation
97ee4651c7a8cbc88193e8055ea48cbbe98ac8b1
[ "MIT" ]
null
null
null
utils/__init__.py
dev-swi2021/multiclass-semantic-segmentation
97ee4651c7a8cbc88193e8055ea48cbbe98ac8b1
[ "MIT" ]
null
null
null
utils/__init__.py
dev-swi2021/multiclass-semantic-segmentation
97ee4651c7a8cbc88193e8055ea48cbbe98ac8b1
[ "MIT" ]
null
null
null
from .TTA import TTAWrapper from .Unet import UnetResNet from .trainer import Trainer, Meter from .cityscapes_utils import CityscapesLabelEncoder, CityscapesTrainDataset, CityscapesDataset, CityscapesTestDataset from .kitti_lane_utils import KittiTrainDataset, KittiLaneLabelEncoder, KittiLaneDataset, KittiTestDataset from .utils import *
48.571429
118
0.867647
33
340
8.848485
0.606061
0.113014
0
0
0
0
0
0
0
0
0
0
0.091176
340
6
119
56.666667
0.944984
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
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
4
49d9f46ef1f21318b9391d41b73a2e22ae8ef3ae
60
py
Python
pywikibot/compat/__init__.py
valhallasw/pywikibot-core
32a8c3c1298a5cb077381fe202daefde82c1c5d3
[ "MIT" ]
null
null
null
pywikibot/compat/__init__.py
valhallasw/pywikibot-core
32a8c3c1298a5cb077381fe202daefde82c1c5d3
[ "MIT" ]
null
null
null
pywikibot/compat/__init__.py
valhallasw/pywikibot-core
32a8c3c1298a5cb077381fe202daefde82c1c5d3
[ "MIT" ]
null
null
null
"""Package to provide compatibility with compat scripts."""
30
59
0.766667
7
60
6.571429
1
0
0
0
0
0
0
0
0
0
0
0
0.116667
60
1
60
60
0.867925
0.883333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
49edc339e7c69936514ddd7f0ee681d31673ab4f
10,482
py
Python
sdk/python/pulumi_azuredevops/queue.py
pulumi/pulumi-azuredevops
e6d73d1501335037fb944ae627091a7afc7f0048
[ "ECL-2.0", "Apache-2.0" ]
13
2020-06-28T11:39:32.000Z
2022-03-05T13:34:16.000Z
sdk/python/pulumi_azuredevops/queue.py
pulumi/pulumi-azuredevops
e6d73d1501335037fb944ae627091a7afc7f0048
[ "ECL-2.0", "Apache-2.0" ]
58
2020-06-20T14:00:28.000Z
2022-03-31T15:20:51.000Z
sdk/python/pulumi_azuredevops/queue.py
pulumi/pulumi-azuredevops
e6d73d1501335037fb944ae627091a7afc7f0048
[ "ECL-2.0", "Apache-2.0" ]
2
2020-10-21T03:22:01.000Z
2021-12-10T18:26:59.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['QueueArgs', 'Queue'] @pulumi.input_type class QueueArgs: def __init__(__self__, *, agent_pool_id: pulumi.Input[int], project_id: pulumi.Input[str]): """ The set of arguments for constructing a Queue resource. :param pulumi.Input[int] agent_pool_id: The ID of the organization agent pool. :param pulumi.Input[str] project_id: The ID of the project in which to create the resource. """ pulumi.set(__self__, "agent_pool_id", agent_pool_id) pulumi.set(__self__, "project_id", project_id) @property @pulumi.getter(name="agentPoolId") def agent_pool_id(self) -> pulumi.Input[int]: """ The ID of the organization agent pool. """ return pulumi.get(self, "agent_pool_id") @agent_pool_id.setter def agent_pool_id(self, value: pulumi.Input[int]): pulumi.set(self, "agent_pool_id", value) @property @pulumi.getter(name="projectId") def project_id(self) -> pulumi.Input[str]: """ The ID of the project in which to create the resource. """ return pulumi.get(self, "project_id") @project_id.setter def project_id(self, value: pulumi.Input[str]): pulumi.set(self, "project_id", value) @pulumi.input_type class _QueueState: def __init__(__self__, *, agent_pool_id: Optional[pulumi.Input[int]] = None, project_id: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering Queue resources. :param pulumi.Input[int] agent_pool_id: The ID of the organization agent pool. :param pulumi.Input[str] project_id: The ID of the project in which to create the resource. """ if agent_pool_id is not None: pulumi.set(__self__, "agent_pool_id", agent_pool_id) if project_id is not None: pulumi.set(__self__, "project_id", project_id) @property @pulumi.getter(name="agentPoolId") def agent_pool_id(self) -> Optional[pulumi.Input[int]]: """ The ID of the organization agent pool. """ return pulumi.get(self, "agent_pool_id") @agent_pool_id.setter def agent_pool_id(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "agent_pool_id", value) @property @pulumi.getter(name="projectId") def project_id(self) -> Optional[pulumi.Input[str]]: """ The ID of the project in which to create the resource. """ return pulumi.get(self, "project_id") @project_id.setter def project_id(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "project_id", value) class Queue(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, agent_pool_id: Optional[pulumi.Input[int]] = None, project_id: Optional[pulumi.Input[str]] = None, __props__=None): """ Manages an agent queue within Azure DevOps. In the UI, this is equivalent to adding an Organization defined pool to a project. The created queue is not authorized for use by all pipelines in the project. However, the `ResourceAuthorization` resource can be used to grant authorization. ## Example Usage ```python import pulumi import pulumi_azuredevops as azuredevops project = azuredevops.Project("project") pool = azuredevops.get_pool(name="contoso-pool") queue = azuredevops.Queue("queue", project_id=project.id, agent_pool_id=pool.id) # Grant acccess to queue to all pipelines in the project auth = azuredevops.ResourceAuthorization("auth", project_id=project.id, resource_id=queue.id, type="queue", authorized=True) ``` ## Relevant Links - [Azure DevOps Service REST API 5.1 - Agent Queues](https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/queues?view=azure-devops-rest-5.1) ## Import Azure DevOps Agent Pools can be imported using the project ID and agent queue ID, e.g. ```sh $ pulumi import azuredevops:index/queue:Queue q 00000000-0000-0000-0000-000000000000/0 ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[int] agent_pool_id: The ID of the organization agent pool. :param pulumi.Input[str] project_id: The ID of the project in which to create the resource. """ ... @overload def __init__(__self__, resource_name: str, args: QueueArgs, opts: Optional[pulumi.ResourceOptions] = None): """ Manages an agent queue within Azure DevOps. In the UI, this is equivalent to adding an Organization defined pool to a project. The created queue is not authorized for use by all pipelines in the project. However, the `ResourceAuthorization` resource can be used to grant authorization. ## Example Usage ```python import pulumi import pulumi_azuredevops as azuredevops project = azuredevops.Project("project") pool = azuredevops.get_pool(name="contoso-pool") queue = azuredevops.Queue("queue", project_id=project.id, agent_pool_id=pool.id) # Grant acccess to queue to all pipelines in the project auth = azuredevops.ResourceAuthorization("auth", project_id=project.id, resource_id=queue.id, type="queue", authorized=True) ``` ## Relevant Links - [Azure DevOps Service REST API 5.1 - Agent Queues](https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/queues?view=azure-devops-rest-5.1) ## Import Azure DevOps Agent Pools can be imported using the project ID and agent queue ID, e.g. ```sh $ pulumi import azuredevops:index/queue:Queue q 00000000-0000-0000-0000-000000000000/0 ``` :param str resource_name: The name of the resource. :param QueueArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. """ ... def __init__(__self__, resource_name: str, *args, **kwargs): resource_args, opts = _utilities.get_resource_args_opts(QueueArgs, pulumi.ResourceOptions, *args, **kwargs) if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, agent_pool_id: Optional[pulumi.Input[int]] = None, project_id: Optional[pulumi.Input[str]] = None, __props__=None): if opts is None: opts = pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = _utilities.get_version() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = QueueArgs.__new__(QueueArgs) if agent_pool_id is None and not opts.urn: raise TypeError("Missing required property 'agent_pool_id'") __props__.__dict__["agent_pool_id"] = agent_pool_id if project_id is None and not opts.urn: raise TypeError("Missing required property 'project_id'") __props__.__dict__["project_id"] = project_id alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="azuredevops:Agent/queue:Queue")]) opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(Queue, __self__).__init__( 'azuredevops:index/queue:Queue', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, agent_pool_id: Optional[pulumi.Input[int]] = None, project_id: Optional[pulumi.Input[str]] = None) -> 'Queue': """ Get an existing Queue resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[int] agent_pool_id: The ID of the organization agent pool. :param pulumi.Input[str] project_id: The ID of the project in which to create the resource. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _QueueState.__new__(_QueueState) __props__.__dict__["agent_pool_id"] = agent_pool_id __props__.__dict__["project_id"] = project_id return Queue(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter(name="agentPoolId") def agent_pool_id(self) -> pulumi.Output[int]: """ The ID of the organization agent pool. """ return pulumi.get(self, "agent_pool_id") @property @pulumi.getter(name="projectId") def project_id(self) -> pulumi.Output[str]: """ The ID of the project in which to create the resource. """ return pulumi.get(self, "project_id")
39.258427
166
0.637188
1,295
10,482
4.921236
0.143629
0.059313
0.058685
0.021968
0.755217
0.719284
0.711596
0.687588
0.673309
0.652911
0
0.009791
0.269223
10,482
266
167
39.406015
0.822193
0.398111
0
0.487395
1
0
0.105455
0.010545
0
0
0
0
0
1
0.142857
false
0.008403
0.042017
0
0.268908
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
49f58584cd458ab085a24267469f5af82022eae8
506
py
Python
tests/MathTests/vec2.py
goshow-jp/Kraken
7088b474b6cc2840cea7ab642c5938e4a3290b6c
[ "BSD-3-Clause" ]
null
null
null
tests/MathTests/vec2.py
goshow-jp/Kraken
7088b474b6cc2840cea7ab642c5938e4a3290b6c
[ "BSD-3-Clause" ]
null
null
null
tests/MathTests/vec2.py
goshow-jp/Kraken
7088b474b6cc2840cea7ab642c5938e4a3290b6c
[ "BSD-3-Clause" ]
1
2021-12-08T08:31:48.000Z
2021-12-08T08:31:48.000Z
import json from kraken.core.maths import * vec2 = Vec2() vec2.x = 2.0 print "vec2:" + str(vec2) print "length:" + str(vec2.length()) vec2 = Vec2(1.0, 2.0) print "vec2:" + str(vec2) print "length:" + str(vec2.length()) print "clone:" + str(vec2.clone()) vec1 = Vec2() vec2 = Vec2(0, 1) print "equal:" + str(vec1 == vec2) print "not equal:" + str(vec1 != vec2) print "add:" + str(vec1 + vec2) print "subtract:" + str(vec1 - vec2) print "multiply:" + str(vec1 * vec2) print "divide:" + str(vec1 / vec2)
21.083333
38
0.624506
79
506
4
0.278481
0.199367
0.208861
0.253165
0.398734
0.265823
0.265823
0.265823
0.265823
0.265823
0
0.085511
0.167984
506
24
39
21.083333
0.665083
0
0
0.222222
0
0
0.147929
0
0
0
0
0
0
0
null
null
0
0.111111
null
null
0.611111
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
4
49f7cbf5bccbf3344c0365125f7b9a19ab6ac231
181
py
Python
django_ses/apps.py
EricOuma/django-ses
b2a499949a76f44214ddeadf43fe82d05864e53c
[ "MIT" ]
1
2021-09-23T14:41:41.000Z
2021-09-23T14:41:41.000Z
django_ses/apps.py
EricOuma/django-ses
b2a499949a76f44214ddeadf43fe82d05864e53c
[ "MIT" ]
1
2020-06-09T14:09:29.000Z
2020-06-10T09:03:36.000Z
django_ses/apps.py
GitRon/django-ses
135d618a6c630c18faf4caa3a661fedf82884978
[ "MIT" ]
null
null
null
from django.apps import AppConfig class DjangoSESConfig(AppConfig): name = 'django_ses' verbose_name = 'Django SES' default_auto_field = 'django.db.models.AutoField'
20.111111
53
0.740331
22
181
5.909091
0.727273
0.153846
0.2
0
0
0
0
0
0
0
0
0
0.171271
181
8
54
22.625
0.866667
0
0
0
0
0
0.254144
0.143646
0
0
0
0
0
1
0
false
0
0.2
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
0
0
0
0
1
0
0
4
b708ff3810ad491443b7526c9e56e4e2c7085cb9
592
py
Python
game/gamesrc/world/globals.py
abbacode/avaloria
02e1805ac6e74543c96408b7951429f94bc140ca
[ "ClArtistic" ]
null
null
null
game/gamesrc/world/globals.py
abbacode/avaloria
02e1805ac6e74543c96408b7951429f94bc140ca
[ "ClArtistic" ]
null
null
null
game/gamesrc/world/globals.py
abbacode/avaloria
02e1805ac6e74543c96408b7951429f94bc140ca
[ "ClArtistic" ]
null
null
null
#HEADER from src.utils.create import create_script #CODE (Mobrunner Script) create_script("game.gamesrc.scripts.world_scripts.global.MobRunner", obj=None) #CODE (Irreglar Runner Script) create_script("game.gamesrc.scripts.world_scripts.global.IrregularRunner", obj=None) #CODE (Zone Runner Script) create_script("game.gamesrc.scripts.world_scripts.global.ZoneRunner", obj=None) #CODE (Npc Runner Script) create_script("game.gamesrc.scripts.world_scripts.global.NpcRunner", obj=None) #CODE (Lair Runner Script) create_script("game.gamesrc.scripts.world_scripts.global.LairRunner", obj=None)
39.466667
84
0.815878
82
592
5.756098
0.304878
0.152542
0.190678
0.233051
0.622881
0.622881
0.622881
0.622881
0.622881
0.508475
0
0
0.060811
592
14
85
42.285714
0.848921
0.222973
0
0
0
0
0.580574
0.580574
0
0
0
0
0
1
0
true
0
0.166667
0
0.166667
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
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b71f8fece2916664a33adbc9ca4809289e20c743
87
py
Python
Demo/autovc/apps.py
casperwang/autovc
708b8730a6ab1b12ab7599e254a0b5db990442bb
[ "MIT" ]
2
2020-05-30T12:00:59.000Z
2020-07-12T02:47:47.000Z
Demo/autovc/apps.py
casperwang/autovc
708b8730a6ab1b12ab7599e254a0b5db990442bb
[ "MIT" ]
null
null
null
Demo/autovc/apps.py
casperwang/autovc
708b8730a6ab1b12ab7599e254a0b5db990442bb
[ "MIT" ]
null
null
null
from django.apps import AppConfig class AutovcConfig(AppConfig): name = 'autovc'
14.5
33
0.747126
10
87
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.172414
87
5
34
17.4
0.902778
0
0
0
0
0
0.068966
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b7273579fa0fc4eb59ae175656958eb7343b65e0
15
py
Python
urduhack/core/unit/tests/__init__.py
cinfotech94/urduhackk
44500cd6a78e1a7765bb4f7d6fb92bbb612b7b11
[ "MIT" ]
252
2018-08-20T16:16:45.000Z
2022-03-04T07:03:58.000Z
omaha_server/healthcheck/tests/__init__.py
tuladhar/omaha-server
6cfd86e4319e03af0eb319fae6c867691ffc2c36
[ "Apache-2.0" ]
272
2015-01-15T09:43:49.000Z
2020-03-30T08:29:30.000Z
omaha_server/healthcheck/tests/__init__.py
tuladhar/omaha-server
6cfd86e4319e03af0eb319fae6c867691ffc2c36
[ "Apache-2.0" ]
77
2015-01-29T19:13:39.000Z
2020-03-21T06:45:35.000Z
# coding: utf8
7.5
14
0.666667
2
15
5
1
0
0
0
0
0
0
0
0
0
0
0.083333
0.2
15
1
15
15
0.75
0.8
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
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b7415fc72a735dbfa142e28e650ef09be8486f97
2,063
py
Python
tests/test_ventilation.py
oliverpell/pymultiMATIC
f4029bdd7d043b9d9f6411da13596535c89c077b
[ "MIT" ]
30
2019-12-01T16:04:11.000Z
2022-02-28T09:23:52.000Z
tests/test_ventilation.py
oliverpell/pymultiMATIC
f4029bdd7d043b9d9f6411da13596535c89c077b
[ "MIT" ]
43
2019-11-09T18:55:10.000Z
2022-02-25T20:05:55.000Z
tests/test_ventilation.py
oliverpell/pymultiMATIC
f4029bdd7d043b9d9f6411da13596535c89c077b
[ "MIT" ]
7
2020-08-03T08:44:18.000Z
2022-02-27T10:15:46.000Z
import unittest from pymultimatic.model import OperatingModes, SettingModes from tests.conftest import _time_program, _ventilation class ZoneTest(unittest.TestCase): def test_get_active_mode_night(self) -> None: ventilation = _ventilation() ventilation.operating_mode = OperatingModes.NIGHT active_mode = ventilation.active_mode self.assertEqual(OperatingModes.NIGHT, active_mode.current) self.assertEqual(ventilation.target_low, active_mode.target) self.assertIsNone(active_mode.sub) def test_get_active_mode_day(self) -> None: ventilation = _ventilation() ventilation.operating_mode = OperatingModes.DAY active_mode = ventilation.active_mode self.assertEqual(OperatingModes.DAY, active_mode.current) self.assertEqual(ventilation.target_high, active_mode.target) self.assertIsNone(active_mode.sub) def test_get_active_mode_off(self) -> None: ventilation = _ventilation() ventilation.operating_mode = OperatingModes.OFF active_mode = ventilation.active_mode self.assertEqual(OperatingModes.OFF, active_mode.current) self.assertEqual(1, active_mode.target) self.assertIsNone(active_mode.sub) def test_get_active_mode_auto_on(self) -> None: ventilation = _ventilation() ventilation.operating_mode = OperatingModes.AUTO active_mode = ventilation.active_mode self.assertEqual(OperatingModes.AUTO, active_mode.current) self.assertEqual(3, active_mode.target) self.assertEqual(SettingModes.ON, active_mode.sub) def test_get_active_mode_auto_off(self) -> None: ventilation = _ventilation() ventilation.time_program = _time_program(SettingModes.OFF) ventilation.operating_mode = OperatingModes.AUTO active_mode = ventilation.active_mode self.assertEqual(OperatingModes.AUTO, active_mode.current) self.assertEqual(1, active_mode.target) self.assertEqual(SettingModes.OFF, active_mode.sub)
36.839286
69
0.732913
226
2,063
6.402655
0.163717
0.207326
0.034554
0.055287
0.836904
0.823082
0.74499
0.677263
0.391154
0.36282
0
0.001795
0.190015
2,063
55
70
37.509091
0.864153
0
0
0.475
0
0
0
0
0
0
0
0
0.375
1
0.125
false
0
0.075
0
0.225
0
0
0
0
null
1
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3fac4ef2b5b45497992ca14ec0ef8af607cddef7
91
py
Python
apibasic/apps.py
diyajaiswal11/Rest-API-project
23561aee7921c9ad7e483cab87e359b72c60b5e7
[ "MIT" ]
2
2020-06-04T05:22:38.000Z
2020-09-23T19:44:09.000Z
apibasic/apps.py
diyajaiswal11/Rest-API-project
23561aee7921c9ad7e483cab87e359b72c60b5e7
[ "MIT" ]
null
null
null
apibasic/apps.py
diyajaiswal11/Rest-API-project
23561aee7921c9ad7e483cab87e359b72c60b5e7
[ "MIT" ]
null
null
null
from django.apps import AppConfig class ApibasicConfig(AppConfig): name = 'apibasic'
15.166667
33
0.758242
10
91
6.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.164835
91
5
34
18.2
0.907895
0
0
0
0
0
0.087912
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
3faf47d1c35d7e76c5e650b02e704e11411d281c
204
py
Python
python/difference-of-squares/difference_of_squares.py
christopher-demarco/exercism-exercises
82a0fc087aae6383f6695e59ad1e77840ec4ce42
[ "MIT" ]
null
null
null
python/difference-of-squares/difference_of_squares.py
christopher-demarco/exercism-exercises
82a0fc087aae6383f6695e59ad1e77840ec4ce42
[ "MIT" ]
null
null
null
python/difference-of-squares/difference_of_squares.py
christopher-demarco/exercism-exercises
82a0fc087aae6383f6695e59ad1e77840ec4ce42
[ "MIT" ]
null
null
null
def square_of_sum(n): return sum([x for x in range(n+1)]) ** 2 def sum_of_squares(n): return sum([x**2 for x in range(n+1)]) def difference(n): return square_of_sum(n) - sum_of_squares(n)
18.545455
47
0.647059
42
204
2.952381
0.333333
0.169355
0.177419
0.193548
0.209677
0.209677
0
0
0
0
0
0.02439
0.196078
204
10
48
20.4
0.731707
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
3fc8edf9c63536aff12797e31cab7c13a53d9793
28
py
Python
templates/email/base.txt.py
amigcamel/taipei.py
12b24bf50aeeb4c3e0ad1ed1998d6d7e77b845dd
[ "MIT" ]
null
null
null
templates/email/base.txt.py
amigcamel/taipei.py
12b24bf50aeeb4c3e0ad1ed1998d6d7e77b845dd
[ "MIT" ]
null
null
null
templates/email/base.txt.py
amigcamel/taipei.py
12b24bf50aeeb4c3e0ad1ed1998d6d7e77b845dd
[ "MIT" ]
null
null
null
BBBBB BBBBBBBBBBBB XXXXXXX
7
18
0.857143
3
28
8
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
28
3
19
9.333333
1
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
4
3feb464f0335255e670bebd75318fbf21fe08581
1,875
py
Python
test/test_config.py
GrafeasGroup/tor_core
7cebb881f9f05cef76db5ba48dac9231ae254994
[ "MIT" ]
3
2017-11-21T03:36:10.000Z
2019-12-16T13:24:11.000Z
test/test_config.py
GrafeasGroup/tor_core
7cebb881f9f05cef76db5ba48dac9231ae254994
[ "MIT" ]
6
2017-11-20T05:16:27.000Z
2019-08-05T22:33:39.000Z
test/test_config.py
TranscribersOfReddit/tor_core
7cebb881f9f05cef76db5ba48dac9231ae254994
[ "MIT" ]
2
2017-11-21T00:52:33.000Z
2017-12-01T13:36:18.000Z
import pytest import redis.exceptions from tor_core.config import config as SITE_CONFIG @pytest.mark.skip def test_read_secrets_from_filesystem(): """Secret data has been read from the filesystem """ assert SITE_CONFIG.bugsnag_api_key is not None assert SITE_CONFIG.modchat_api_url is not None def test_config_structure(): """Config singleton is structured as expected """ assert isinstance(SITE_CONFIG.video_domains, list) assert isinstance(SITE_CONFIG.audio_domains, list) assert isinstance(SITE_CONFIG.image_domains, list) assert isinstance(SITE_CONFIG.video_formatting, str) assert isinstance(SITE_CONFIG.audio_formatting, str) assert isinstance(SITE_CONFIG.image_formatting, str) assert isinstance(SITE_CONFIG.header, str) assert isinstance(SITE_CONFIG.subreddits_to_check, list) assert isinstance(SITE_CONFIG.upvote_filter_subs, dict) assert isinstance(SITE_CONFIG.no_link_header_subs, list) assert isinstance(SITE_CONFIG.tor_mods, list) assert isinstance(SITE_CONFIG.perform_header_check, bool) assert isinstance(SITE_CONFIG.debug_mode, bool) assert isinstance(SITE_CONFIG.no_gifs, list) assert isinstance(SITE_CONFIG.OCR, bool) assert isinstance(SITE_CONFIG.bugsnag_api_key, str) or \ SITE_CONFIG.bugsnag_api_key is None assert isinstance(SITE_CONFIG.modchat_api_url, str) or \ SITE_CONFIG.modchat_api_url is None def test_redis_config_property(): try: assert SITE_CONFIG.redis, 'Does not observe lazy loader' except redis.exceptions.ConnectionError: pass # Check stubbing with derivations of BaseException type(SITE_CONFIG).redis = property(lambda x: (_ for _ in ()).throw( NotImplementedError('Redis was disabled'))) with pytest.raises(NotImplementedError): SITE_CONFIG.redis.ping()
30.737705
71
0.757867
247
1,875
5.481781
0.348178
0.184638
0.251108
0.32644
0.508863
0.242245
0
0
0
0
0
0
0.170133
1,875
60
72
31.25
0.87018
0.078933
0
0
0
0
0.026807
0
0
0
0
0
0.555556
1
0.083333
true
0.027778
0.083333
0
0.166667
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
4
b202c20345a7d1ec2bc16a94b534876bebd4c149
144
py
Python
utilities/indextoclass.py
IshaanIvaturi/rucs24-bot
27735d9247ca97a66c70164cad7d74df367dc955
[ "MIT" ]
6
2020-08-29T15:41:35.000Z
2020-10-28T20:12:02.000Z
utilities/indextoclass.py
IshaanIvaturi/rucs24-bot
27735d9247ca97a66c70164cad7d74df367dc955
[ "MIT" ]
73
2020-08-26T19:32:40.000Z
2020-11-23T05:16:51.000Z
utilities/indextoclass.py
IshaanIvaturi/rucs24-bot
27735d9247ca97a66c70164cad7d74df367dc955
[ "MIT" ]
17
2020-08-26T21:15:41.000Z
2020-11-10T02:02:07.000Z
import json # Load index class mapping into index_to_class with open("apidata/indextoclass.json", "r") as f: index_to_class = json.load(f)
24
49
0.743056
24
144
4.291667
0.625
0.15534
0.23301
0
0
0
0
0
0
0
0
0
0.152778
144
5
50
28.8
0.844262
0.305556
0
0
0
0
0.265306
0.255102
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
0
0
1
0
0
0
0
4
b2031aac1d45fee1be1ab5f35b71fa062db3325e
87
py
Python
hello_world.py
axfilipedilopes/playground
8bffc2ad96379bcc5429c10078c2ccae69535c8f
[ "MIT" ]
null
null
null
hello_world.py
axfilipedilopes/playground
8bffc2ad96379bcc5429c10078c2ccae69535c8f
[ "MIT" ]
null
null
null
hello_world.py
axfilipedilopes/playground
8bffc2ad96379bcc5429c10078c2ccae69535c8f
[ "MIT" ]
null
null
null
#!/usr/bin/python def say_this(text): return text print say_this("Hello World")
10.875
29
0.689655
14
87
4.142857
0.785714
0.241379
0
0
0
0
0
0
0
0
0
0
0.172414
87
7
30
12.428571
0.805556
0.183908
0
0
0
0
0.157143
0
0
0
0
0
0
0
null
null
0
0
null
null
0.333333
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
b20fcf9592f7d48d56203965c2eaa6f9509e9a44
264
py
Python
products/admin.py
vitali-rebkavets-itechart/students-lab
574ad0249ee40b799a2e8faaced3661915bee756
[ "MIT" ]
null
null
null
products/admin.py
vitali-rebkavets-itechart/students-lab
574ad0249ee40b799a2e8faaced3661915bee756
[ "MIT" ]
26
2019-05-21T13:24:59.000Z
2019-06-13T10:24:29.000Z
products/admin.py
vitali-r/students-lab
574ad0249ee40b799a2e8faaced3661915bee756
[ "MIT" ]
2
2019-05-21T12:55:23.000Z
2019-05-21T14:31:14.000Z
from django.contrib import admin from .models import Brand, Category, Product, Attribute, ProductAttribute admin.site.register(Brand) admin.site.register(Category) admin.site.register(Product) admin.site.register(Attribute) admin.site.register(ProductAttribute)
26.4
73
0.829545
33
264
6.636364
0.393939
0.205479
0.388128
0
0
0
0
0
0
0
0
0
0.07197
264
9
74
29.333333
0.893878
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.285714
0
0.285714
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
0
0
0
0
0
4
b746f6dc57ea82ef787c52188d16cf6b824accec
104
py
Python
feelings/__init__.py
glebb/feelings
6a38ef9b55e1154444c4835fe3f1cb33124df780
[ "MIT" ]
1
2016-05-17T13:55:31.000Z
2016-05-17T13:55:31.000Z
feelings/__init__.py
glebb/feelings
6a38ef9b55e1154444c4835fe3f1cb33124df780
[ "MIT" ]
null
null
null
feelings/__init__.py
glebb/feelings
6a38ef9b55e1154444c4835fe3f1cb33124df780
[ "MIT" ]
null
null
null
from flask import Flask app = Flask(__name__, static_url_path='/feelings_static') import feelings.views
26
57
0.817308
15
104
5.2
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.096154
104
3
58
34.666667
0.829787
0
0
0
0
0
0.153846
0
0
0
0
0
0
1
0
false
0
0.666667
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
0
0
1
0
1
0
0
4
b748ea5ade4b5aabae28555618c2ab9cc9e2ee87
91
py
Python
apps/playlist/apps.py
Niracler/song
d4ed7e8d41c837094ccfe3d4ccdea59eaa46f489
[ "MIT" ]
48
2020-03-09T09:27:31.000Z
2022-03-28T09:54:36.000Z
apps/playlist/apps.py
Niracler/song
d4ed7e8d41c837094ccfe3d4ccdea59eaa46f489
[ "MIT" ]
28
2021-04-07T19:02:37.000Z
2022-03-27T19:11:21.000Z
apps/playlist/apps.py
Niracler/song
d4ed7e8d41c837094ccfe3d4ccdea59eaa46f489
[ "MIT" ]
15
2020-03-09T09:28:04.000Z
2022-03-09T12:07:08.000Z
from django.apps import AppConfig class PlaylistConfig(AppConfig): name = 'playlist'
15.166667
33
0.758242
10
91
6.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.164835
91
5
34
18.2
0.907895
0
0
0
0
0
0.087912
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b74fbf1f1e625193b6bedeb964bccf401385f129
20
py
Python
test/integration/IsNotNull/is not null.py
HighSchoolHacking/GLS-Draft
9e418b6290e7c8e3f2da87668784bdba1cde5a76
[ "MIT" ]
30
2019-10-29T12:47:50.000Z
2022-02-12T06:41:39.000Z
test/integration/IsNotNull/is not null.py
HighSchoolHacking/GLS-Draft
9e418b6290e7c8e3f2da87668784bdba1cde5a76
[ "MIT" ]
247
2017-09-21T17:11:18.000Z
2019-10-08T12:59:07.000Z
test/integration/IsNotNull/is not null.py
HighSchoolHacking/GLS-Draft
9e418b6290e7c8e3f2da87668784bdba1cde5a76
[ "MIT" ]
17
2017-10-01T16:53:20.000Z
2018-11-28T07:20:35.000Z
# aaa is not None #
5
15
0.6
4
20
3
1
0
0
0
0
0
0
0
0
0
0
0
0.3
20
3
16
6.666667
0.857143
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b75738e47f585a4bd9e92700394181940a678fef
554
py
Python
mock-service/models/response.py
steeltomato/api-integration-test-template-py
536cd0d8a922bd2dd889d590deff6d12e28ec1fd
[ "MIT" ]
null
null
null
mock-service/models/response.py
steeltomato/api-integration-test-template-py
536cd0d8a922bd2dd889d590deff6d12e28ec1fd
[ "MIT" ]
null
null
null
mock-service/models/response.py
steeltomato/api-integration-test-template-py
536cd0d8a922bd2dd889d590deff6d12e28ec1fd
[ "MIT" ]
null
null
null
from typing import Optional from pydantic.main import BaseModel from .customer import Customer class BaseResponse(BaseModel): message: str = "" errors: list = [] class GetCustomersResponse(BaseResponse): customers: Optional[list[Customer]] class GetCustomerResponse(BaseResponse): customer: Optional[Customer] class CreateCustomerResponse(BaseResponse): customer: Optional[Customer] class UpdateCustomerResponse(BaseResponse): customer: Optional[Customer] class DeleteCustomerResponse(BaseResponse): """empty"""
17.870968
43
0.763538
49
554
8.632653
0.428571
0.153664
0.198582
0.255319
0.29078
0
0
0
0
0
0
0
0.149819
554
30
44
18.466667
0.898089
0.009025
0
0.2
0
0
0
0
0
0
0
0
0
1
0
true
0
0.2
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
4
b7991a1ff4c741168da4534870fef691049feba2
245
py
Python
mmtrack/models/losses/__init__.py
Chop1/mmtracking
a14fcb31463c96912a34f49e3422309690d62a47
[ "Apache-2.0" ]
1
2022-03-24T15:18:38.000Z
2022-03-24T15:18:38.000Z
mmtrack/models/losses/__init__.py
ZhongwenW/mmtracking
fd62f33e399f9931b94dbdb33e201ae348af2cd8
[ "Apache-2.0" ]
null
null
null
mmtrack/models/losses/__init__.py
ZhongwenW/mmtracking
fd62f33e399f9931b94dbdb33e201ae348af2cd8
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. from .l2_loss import L2Loss from .multipos_cross_entropy_loss import MultiPosCrossEntropyLoss from .triplet_loss import TripletLoss __all__ = ['L2Loss', 'TripletLoss', 'MultiPosCrossEntropyLoss']
35
65
0.820408
27
245
7.111111
0.62963
0.15625
0
0
0
0
0
0
0
0
0
0.013636
0.102041
245
6
66
40.833333
0.859091
0.183673
0
0
0
0
0.207071
0.121212
0
0
0
0
0
1
0
false
0
0.75
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
0
0
0
1
0
1
0
0
4
b79a6b773f723c03b79d17317c75ee3d0e1bb4cd
93
py
Python
ringcentral/test/__init__.py
dibyenduroy/ringcentral-python
7509b617a29bb981d8923c7a431cf14cdaf17ca4
[ "MIT" ]
27
2015-08-27T21:09:03.000Z
2022-02-22T16:18:45.000Z
ringcentral/test/__init__.py
dibyenduroy/ringcentral-python
7509b617a29bb981d8923c7a431cf14cdaf17ca4
[ "MIT" ]
35
2015-12-07T20:11:01.000Z
2022-01-20T22:34:08.000Z
ringcentral/test/__init__.py
dibyenduroy/ringcentral-python
7509b617a29bb981d8923c7a431cf14cdaf17ca4
[ "MIT" ]
21
2015-08-27T21:09:11.000Z
2022-03-05T10:12:08.000Z
#!/usr/bin/env python # encoding: utf-8 from .spy import Spy from .testcase import TestCase
15.5
30
0.741935
15
93
4.6
0.733333
0
0
0
0
0
0
0
0
0
0
0.012658
0.150538
93
5
31
18.6
0.860759
0.387097
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
b7c60f4503608c6bc3cbcf04616f13232b8cf485
23
py
Python
bigml/__init__.py
ayush1208/python-3
8b613225142bbe1dce8fda5c7f8d3acf07c181a7
[ "Apache-2.0" ]
null
null
null
bigml/__init__.py
ayush1208/python-3
8b613225142bbe1dce8fda5c7f8d3acf07c181a7
[ "Apache-2.0" ]
null
null
null
bigml/__init__.py
ayush1208/python-3
8b613225142bbe1dce8fda5c7f8d3acf07c181a7
[ "Apache-2.0" ]
null
null
null
__version__ = '4.19.8'
11.5
22
0.652174
4
23
2.75
1
0
0
0
0
0
0
0
0
0
0
0.2
0.130435
23
1
23
23
0.35
0
0
0
0
0
0.26087
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
b7c694ad3399f528a65cdac6f1ba35e113408dc1
107
py
Python
scalexctl/cluster.py
CM2Walki/scalexctl
42418ba9f839fb9825214dd27047962779856f32
[ "MIT" ]
null
null
null
scalexctl/cluster.py
CM2Walki/scalexctl
42418ba9f839fb9825214dd27047962779856f32
[ "MIT" ]
null
null
null
scalexctl/cluster.py
CM2Walki/scalexctl
42418ba9f839fb9825214dd27047962779856f32
[ "MIT" ]
null
null
null
#!/usr/bin/env python class Cluster: def __init__(self, clustername): self.name = clustername
17.833333
36
0.672897
13
107
5.230769
0.846154
0
0
0
0
0
0
0
0
0
0
0
0.214953
107
5
37
21.4
0.809524
0.186916
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
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
0
0
0
1
0
0
4
b7cdb42a86b076615ee463cf0cda39352969144b
953
py
Python
PatchQuant/Events/Stock.py
Patch-Traders/BackTester
d4f13bd559773dbdef771f53e356d2eb3b5e7eea
[ "MIT" ]
4
2020-06-16T03:28:00.000Z
2021-11-15T09:55:03.000Z
PatchQuant/Events/Stock.py
Patch-Traders/BackTester
d4f13bd559773dbdef771f53e356d2eb3b5e7eea
[ "MIT" ]
4
2020-06-25T03:16:50.000Z
2020-07-09T03:58:21.000Z
PatchQuant/Events/Stock.py
Patch-Traders/BackTester
d4f13bd559773dbdef771f53e356d2eb3b5e7eea
[ "MIT" ]
null
null
null
class Stock: """ Makes accessing stock data within a given MarketEvent to be more intuitive and accessible """ def __init__(self, stock_data : dict): self.name = stock_data["T"] self.volume = stock_data["v"] self.open = stock_data["o"] self.close = stock_data["c"] self.high = stock_data["h"] self.low = stock_data["l"] self.start = stock_data["t"] self.bars_passed = stock_data["n"] @property def name(): return self.name @property def volume(): return self.volume @property def open(): return self.open @property def close(): return self.close @property def high(): return self.high @property def low(): return self.low @property def start(): return self.start @property def bars_passed(): return self.bars_passed
18.686275
93
0.555089
113
953
4.539823
0.327434
0.175439
0.038986
0.054581
0
0
0
0
0
0
0
0
0.339979
953
50
94
19.06
0.81558
0.093389
0
0.235294
0
0
0.009467
0
0
0
0
0
0
1
0.264706
false
0.088235
0
0.235294
0.529412
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
b7de120615f0affbe1b61583ab4e6baefa9c3961
681
py
Python
day_9/day9_test.py
mickeelm/aoc2019
7fd532d2237e1cf0686c9b331a2b97515ee94c03
[ "Unlicense" ]
1
2021-02-02T08:32:36.000Z
2021-02-02T08:32:36.000Z
day_9/day9_test.py
mickeelm/aoc2019
7fd532d2237e1cf0686c9b331a2b97515ee94c03
[ "Unlicense" ]
null
null
null
day_9/day9_test.py
mickeelm/aoc2019
7fd532d2237e1cf0686c9b331a2b97515ee94c03
[ "Unlicense" ]
null
null
null
from day_9.day9 import boost_keycode def test_boost_keycode(): quine = [109, 1, 204, -1, 1001, 100, 1, 100, 1008, 100, 16, 101, 1006, 101, 0, 99] assert boost_keycode(quine, None) == quine assert boost_keycode([1102, 34915192, 34915192, 454545, 4, 454545, 99, 0], None) == [1219070632396864] assert boost_keycode([104, 1125899906842624, 99], None) == [1125899906842624] def test_part_1(): with open('input') as f: assert boost_keycode([int(instr) for instr in f.readline().split(',')], 1) == [2745604242] def test_part_2(): with open('input') as f: assert boost_keycode([int(instr) for instr in f.readline().split(',')], 2) == [51135]
35.842105
106
0.654919
99
681
4.373737
0.454545
0.193995
0.207852
0.069284
0.30485
0.30485
0.30485
0.30485
0.30485
0.30485
0
0.271095
0.182085
681
18
107
37.833333
0.506284
0
0
0.166667
0
0
0.017621
0
0
0
0
0
0.416667
1
0.25
false
0
0.083333
0
0.333333
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
4
4d01a53dccd6dc0a4e0f1a342c4ae5fef5b71708
93
py
Python
promotion/apps.py
JiajiaHuang/smonus
95ec209ae3562ea73ee9ce4c22a0d3a3f0975210
[ "Unlicense" ]
2
2021-02-07T05:56:46.000Z
2021-05-12T02:11:24.000Z
promotion/apps.py
JiajiaHuang/smonus
95ec209ae3562ea73ee9ce4c22a0d3a3f0975210
[ "Unlicense" ]
7
2020-01-06T18:22:36.000Z
2021-08-31T20:12:53.000Z
promotion/apps.py
JiajiaHuang/smonus
95ec209ae3562ea73ee9ce4c22a0d3a3f0975210
[ "Unlicense" ]
null
null
null
from django.apps import AppConfig class PromotionConfig(AppConfig): name = 'promotion'
15.5
33
0.763441
10
93
7.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.16129
93
5
34
18.6
0.910256
0
0
0
0
0
0.096774
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
4d49b548c6092409f6ce57921eb988d3a28972d6
250
py
Python
saleor/graphql/payment/resolvers.py
greentornado/saleor
7f58917957a23c4dd90b47214a4500c91c735dee
[ "CC-BY-4.0" ]
3
2021-06-22T12:38:18.000Z
2021-07-11T15:01:57.000Z
saleor/graphql/payment/resolvers.py
greentornado/saleor
7f58917957a23c4dd90b47214a4500c91c735dee
[ "CC-BY-4.0" ]
111
2021-07-19T04:19:30.000Z
2022-03-28T04:32:37.000Z
saleor/graphql/payment/resolvers.py
IslamDEVO/es-saleor-nginx
a56a4aaf23fc308aad7b7489bc090fd4fcdb6315
[ "CC-BY-4.0" ]
6
2021-11-08T16:43:05.000Z
2022-03-22T17:31:16.000Z
from ...core.tracing import traced_resolver from ...payment import models def resolve_payment_by_id(id): return models.Payment.objects.filter(id=id).first() @traced_resolver def resolve_payments(info): return models.Payment.objects.all()
20.833333
55
0.772
35
250
5.342857
0.542857
0.149733
0.203209
0.278075
0
0
0
0
0
0
0
0
0.116
250
11
56
22.727273
0.846154
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.285714
0.285714
0.857143
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
4d5004a9a28603025fa50d899d5fc6b5afef1ed3
3,711
py
Python
tests/test_xml.py
janluak/fil_io
79976d2e6ed94d6f1c28616c46a4c8a11938518a
[ "Apache-2.0" ]
null
null
null
tests/test_xml.py
janluak/fil_io
79976d2e6ed94d6f1c28616c46a4c8a11938518a
[ "Apache-2.0" ]
null
null
null
tests/test_xml.py
janluak/fil_io
79976d2e6ed94d6f1c28616c46a4c8a11938518a
[ "Apache-2.0" ]
null
null
null
from pytest import raises from .fixtures import cwd_in_tests_root, os_path from collections import OrderedDict test_write_data = {"main_key": {"first_row": "value1", "second_row": 2, "third_row": ["abc", "def", 3]}} def test_load_single(cwd_in_tests_root): from fil_io.xml import load_single loaded = load_single("./test_files/standard.xml") assert loaded == { 'main_key': OrderedDict([ ('first_row', 'value1'), ('second_row', '2'), ('third_row', ['3', 'abc', 'def']) ]) } with raises(IsADirectoryError): load_single("./test_files") def test_load_all(cwd_in_tests_root): from fil_io.xml import load_all with raises(NotADirectoryError): load_all("./test_files/standard.xml") loaded = load_all("./test_files") assert loaded == os_path({ 'test_files/other_file.xml': { 'main_key': OrderedDict([ ('first_row', 'value1'), ('second_row', '2'), ('_3rd_row', ['3', 'abc', 'def']) ]) }, 'test_files/standard.xml': { 'main_key': OrderedDict([ ('first_row', 'value1'), ('second_row', '2'), ('third_row', ['3', 'abc', 'def']) ]) } }) def test_load(cwd_in_tests_root): from fil_io.xml import load loaded = load("./test_files/standard.xml") assert loaded == { 'main_key': OrderedDict([ ('first_row', 'value1'), ('second_row', '2'), ('third_row', ['3', 'abc', 'def']) ]) } loaded = load("./test_files") assert loaded == os_path({ 'test_files/other_file.xml': { 'main_key': OrderedDict([ ('first_row', 'value1'), ('second_row', '2'), ('_3rd_row', ['3', 'abc', 'def']) ]) }, 'test_files/standard.xml': { 'main_key': OrderedDict([ ('first_row', 'value1'), ('second_row', '2'), ('third_row', ['3', 'abc', 'def']) ]) } }) def test_write(tmp_path): import xmltodict from fil_io.xml import write file = str(tmp_path / "data.xml") write(test_write_data, file) loaded = dict(xmltodict.parse(open(file, "r").read())) assert loaded == { 'main_key': OrderedDict([('first_row', 'value1'), ('second_row', '2'), ('third_row', ['abc', 'def', '3'])]) } write(test_write_data["main_key"], file, "some_main_key") loaded = dict(xmltodict.parse(open(file, "r").read())) assert loaded == { 'some_main_key': OrderedDict([('first_row', 'value1'), ('second_row', '2'), ('third_row', ['abc', 'def', '3'])]) } def test_write_not_allowed_keys(tmp_path): from fil_io.xml import write file = str(tmp_path / "data.xml") false_keys = [".s", "_&d%", "3fd"] for key in false_keys: test_data = {"first_row": "value1", key: 2, "third_row": ["abc", "def", 3]} with raises(ValueError): write(test_data, file) for key in false_keys: test_data = {"first_row": "value1", "second_row": 2, "third_row": ("abc", {"dict": {key: "value"}}, 3)} with raises(ValueError): write(test_data, file)
27.488889
111
0.475074
387
3,711
4.263566
0.160207
0.046667
0.093333
0.121212
0.753333
0.729091
0.72
0.72
0.673939
0.661212
0
0.015222
0.362705
3,711
134
112
27.69403
0.682452
0
0
0.666667
0
0
0.210725
0.046079
0
0
0
0
0.055556
1
0.046296
false
0
0.083333
0
0.12963
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4d5348f887dd60e8cede0127178d7f3c4cd2fc24
5,965
py
Python
remove_accuracy.py
Martinezou/synchronization
de39a3b027501e5fb6170507e20d0f3c68322614
[ "MIT" ]
null
null
null
remove_accuracy.py
Martinezou/synchronization
de39a3b027501e5fb6170507e20d0f3c68322614
[ "MIT" ]
null
null
null
remove_accuracy.py
Martinezou/synchronization
de39a3b027501e5fb6170507e20d0f3c68322614
[ "MIT" ]
null
null
null
"""the difference between original eigenvalue and eigenvalue after link removal""" from numpy import * import scipy import numpy as np import networkx as nx import matplotlib.pyplot as plt def main(N, K,S): G1 = nx.barabasi_albert_graph(N, K, seed=S) a = G1.degree() b = sorted(a, key=lambda t:t[1]) lap_matrix = nx.laplacian_matrix(G1).todense() eigval, eigvec = scipy.linalg.eig(lap_matrix) # print(eigval) d = eigval.sort() eig_sec1 = float(eigval[1]) print(eig_sec1) degree_sequence = [d for n, d in G1.degree()] #print(b) def nodes_min_degree(): '''find the nodes with minimum degree of the network in scale free network there exists a lot of nodes with minimum degrees''' min_degree = min(degree_sequence) #minimum degree of the network #print(min_degree) min_node1 = [] for i in range(len(b)): if b[i][1] == min_degree: min_node1.append(b[i][0]) return min_node1 min_node_list = nodes_min_degree() #print(min_node_list) def remove_edge(node): '''remove edge between min_degree node and its max_degree neighbour''' G2 = nx.barabasi_albert_graph(N, K, seed=S) a = G2.degree() b = sorted(a, key=lambda t: t[1]) #print(b) neighbour = list(G1.adj[node]) list1 = [] for i in range(len(neighbour)): list1.append(G1.degree(neighbour[i])) max_neigh = list1.index(max(list1)) G2.remove_edge(node, neighbour[max_neigh]) return G2 def attribution(): removal_eigen = [] for i in range(len(min_node_list)): G = remove_edge(min_node_list[i]) lap_matrix = nx.laplacian_matrix(G).todense() eigval, eigvec = scipy.linalg.eig(lap_matrix) d = eigval.sort() eig_sec1 = float(eigval[1]) removal_eigen.append(eig_sec1) print(removal_eigen) #print(len(removal_eigen)) return removal_eigen remove_eig = attribution() return eig_sec1, remove_eig #a = main(500, 20, 1) #N=1000, K=20 fig1 = plt.figure(figsize=(10,8)) eigen, perturbation_eigen = main(1000, 20, 2) origional_eigen = [eigen for i in range(len(perturbation_eigen))] difference_eigen = [-origional_eigen[0]+i for i in perturbation_eigen] difference_eigen_percent = [i/origional_eigen[0] for i in difference_eigen] fig=plt.figure() left, bottom, width, height = 0.1, 0.1, 0.8, 0.8 ax1= fig.add_axes([left, bottom, width, height]) plt.hist(difference_eigen_percent, cumulative=True, bins=50, histtype='step', density=True) plt.xlabel(r'$\Delta \lambda^{(2)}/\lambda^{(2)}$') plt.ylabel('Probability') left, bottom, width, height = 0.2, 0.6, 0.25, 0.25 ax2 = fig.add_axes([left, bottom, width, height]) ax2.ticklabel_format(style='sci', scilimits=(-3,0), axis='y') plt.boxplot([difference_eigen_percent], showfliers=False, labels=[r'$N=1000, k_{\rm min}=20$']) plt.ylabel(r'$\Delta \lambda^{(2)}/\lambda^{(2)}$') plt.savefig('perturbation probability1.pdf') plt.show() #N=1000, K=15 fig1 = plt.figure(figsize=(10,8)) eigen, perturbation_eigen = main(1000, 15, 1) origional_eigen = [eigen for i in range(len(perturbation_eigen))] difference_eigen = [-origional_eigen[0]+i for i in perturbation_eigen] difference_eigen_percent = [i/origional_eigen[0] for i in difference_eigen] fig=plt.figure() left, bottom, width, height = 0.1, 0.1, 0.8, 0.8 ax1= fig.add_axes([left, bottom, width, height]) plt.hist(difference_eigen_percent, cumulative=True, bins=50, histtype='step', density=True) plt.xlabel(r'$\Delta \lambda^{(2)}/\lambda^{(2)}$') plt.ylabel('Probability') left, bottom, width, height = 0.2, 0.6, 0.25, 0.25 ax2 = fig.add_axes([left, bottom, width, height]) ax2.ticklabel_format(style='sci', scilimits=(-3,0), axis='y') plt.boxplot([difference_eigen_percent], showfliers=False, labels=[r'$N=1000, k_{\rm min}=20$']) plt.ylabel(r'$\Delta \lambda^{(2)}/\lambda^{(2)}$') plt.savefig('perturbation probability2.pdf') plt.show() #N=500, K=20 fig1 = plt.figure(figsize=(10,8)) eigen, perturbation_eigen = main(500, 20, 1) origional_eigen = [eigen for i in range(len(perturbation_eigen))] difference_eigen = [-origional_eigen[0]+i for i in perturbation_eigen] difference_eigen_percent = [i/origional_eigen[0] for i in difference_eigen] fig=plt.figure() left, bottom, width, height = 0.1, 0.1, 0.8, 0.8 ax1= fig.add_axes([left, bottom, width, height]) plt.hist(difference_eigen_percent, cumulative=True, bins=50, histtype='step', density=True) plt.xlabel(r'$\Delta \lambda^{(2)}/\lambda^{(2)}$') plt.ylabel('Probability') left, bottom, width, height = 0.25, 0.6, 0.25, 0.25 ax2 = fig.add_axes([left, bottom, width, height]) ax2.ticklabel_format(style='sci', scilimits=(-3,0), axis='y') plt.boxplot([difference_eigen_percent], showfliers=False, labels=[r'$N=1000, k_{\rm min}=20$']) plt.ylabel(r'$\Delta \lambda^{(2)}/\lambda^{(2)}$') plt.savefig('perturbation probability3.pdf') plt.show() #N=500, K=15 fig1 = plt.figure(figsize=(10,8)) eigen, perturbation_eigen = main(500, 15, 1) origional_eigen = [eigen for i in range(len(perturbation_eigen))] difference_eigen = [-origional_eigen[0]+i for i in perturbation_eigen] difference_eigen_percent = [i/origional_eigen[0] for i in difference_eigen] fig=plt.figure() left, bottom, width, height = 0.1, 0.1, 0.8, 0.8 ax1= fig.add_axes([left, bottom, width, height]) plt.hist(difference_eigen_percent, cumulative=True, bins=50, histtype='step', density=True) plt.xlabel(r'$\Delta \lambda^{(2)}/\lambda^{(2)}$') plt.ylabel('Probability') left, bottom, width, height = 0.25, 0.6, 0.25, 0.25 ax2 = fig.add_axes([left, bottom, width, height]) ax2.ticklabel_format(style='sci', scilimits=(-3,0), axis='y') plt.boxplot([difference_eigen_percent], showfliers=False, labels=[r'$N=1000, k_{\rm min}=20$']) plt.ylabel(r'$\Delta \lambda^{(2)}/\lambda^{(2)}$') plt.savefig('perturbation probability3.pdf') plt.show()
40.033557
95
0.680302
930
5,965
4.233333
0.156989
0.0762
0.06096
0.085344
0.77013
0.737109
0.727711
0.727711
0.691135
0.663195
0
0.049941
0.154065
5,965
149
96
40.033557
0.730281
0.07544
0
0.621849
0
0
0.10509
0.040868
0
0
0
0
0
1
0.033613
false
0
0.042017
0
0.109244
0.016807
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4d7c09852c07e837c298ded2bac5b8a67ee10a17
207
py
Python
fabfile/templates/rabbitmq_config_single_node.py
sunilbasker-jnpr/contrail-fabric-utils
c5855bbc4b0cf64ff98e844a8e2c1c1705bbdf83
[ "Apache-2.0" ]
2
2015-10-29T19:36:26.000Z
2016-04-19T13:24:00.000Z
fabfile/templates/rabbitmq_config_single_node.py
sunilbasker-jnpr/contrail-fabric-utils
c5855bbc4b0cf64ff98e844a8e2c1c1705bbdf83
[ "Apache-2.0" ]
1
2017-07-03T09:10:18.000Z
2017-07-03T09:10:18.000Z
fabfile/templates/rabbitmq_config_single_node.py
sunilbasker-jnpr/contrail-fabric-utils
c5855bbc4b0cf64ff98e844a8e2c1c1705bbdf83
[ "Apache-2.0" ]
18
2016-01-14T23:10:39.000Z
2021-12-13T06:32:38.000Z
import string template = string.Template("""[ {rabbit, [ {tcp_listeners, [{"$__control_intf_ip__", 5672}]}, {loopback_users, []}, {log_levels,[{connection, info},{mirroring, info}]} ] } ].""")
23
64
0.613527
20
207
5.9
0.85
0.237288
0
0
0
0
0
0
0
0
0
0.022857
0.154589
207
8
65
25.875
0.651429
0
0
0
0
0
0.758454
0.241546
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4d9624898610efb82d648198ec06faf5498f0ca3
66
py
Python
carnifex/ssh/__init__.py
sporsh/carnifex
82dd3bd2bc134dfb69a78f43171e227f2127060b
[ "MIT" ]
4
2015-12-21T00:59:22.000Z
2021-02-08T02:33:52.000Z
carnifex/ssh/__init__.py
sporsh/carnifex
82dd3bd2bc134dfb69a78f43171e227f2127060b
[ "MIT" ]
null
null
null
carnifex/ssh/__init__.py
sporsh/carnifex
82dd3bd2bc134dfb69a78f43171e227f2127060b
[ "MIT" ]
1
2017-03-24T09:12:45.000Z
2017-03-24T09:12:45.000Z
""" @author: Geir Sporsheim @license: see LICENCE for details """
13.2
33
0.69697
8
66
5.75
1
0
0
0
0
0
0
0
0
0
0
0
0.151515
66
4
34
16.5
0.821429
0.863636
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
4d971cacd5a80465f3517c5d488bf1a670ac06b4
147
py
Python
src/core/errors/__init__.py
ablil/meistertask-cli
6c90802ac5dc7e5ac016e5c61c0e68db043e5784
[ "MIT" ]
3
2020-11-03T22:27:18.000Z
2021-12-11T23:13:55.000Z
src/core/errors/__init__.py
ablil/meistertask-cli
6c90802ac5dc7e5ac016e5c61c0e68db043e5784
[ "MIT" ]
1
2021-09-12T13:28:13.000Z
2021-09-12T13:28:13.000Z
src/core/errors/__init__.py
ablil/meistertask-cli
6c90802ac5dc7e5ac016e5c61c0e68db043e5784
[ "MIT" ]
null
null
null
from .project import ProjectError from .task import TaskError from .section import SectionError __all__ = [ProjectError, SectionError, TaskError]
24.5
49
0.823129
16
147
7.3125
0.5625
0
0
0
0
0
0
0
0
0
0
0
0.122449
147
5
50
29.4
0.906977
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.75
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
0
0
0
1
0
1
0
0
4
4da22d6c2f452bfcbc4e8f163a9041de696b6c7c
123
py
Python
CursoEmVideo/ex047.py
ElivanLimaJunior/Python
57c277f3ec0da06d6c8aa125b50d01a5ab88934d
[ "MIT" ]
null
null
null
CursoEmVideo/ex047.py
ElivanLimaJunior/Python
57c277f3ec0da06d6c8aa125b50d01a5ab88934d
[ "MIT" ]
null
null
null
CursoEmVideo/ex047.py
ElivanLimaJunior/Python
57c277f3ec0da06d6c8aa125b50d01a5ab88934d
[ "MIT" ]
null
null
null
print('Números pares entre 1 e 50') for c in range(2, 50+1, 2): print(c, end=' ') print('\nEsses são os números pares')
30.75
37
0.642276
24
123
3.291667
0.666667
0.303797
0
0
0
0
0
0
0
0
0
0.08
0.186992
123
4
37
30.75
0.71
0
0
0
0
0
0.443548
0
0
0
0
0
0
1
0
false
0
0
0
0
0.75
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
4dabfb583f4faaa46cc3732e84e724ce5e3f10bb
40
py
Python
tests/rcp_extra/__init__.py
bp-flugsimulator/utils
151e7f6650414f5782fd0a2d28666213d17118d3
[ "MIT" ]
null
null
null
tests/rcp_extra/__init__.py
bp-flugsimulator/utils
151e7f6650414f5782fd0a2d28666213d17118d3
[ "MIT" ]
16
2017-12-02T16:40:16.000Z
2022-02-21T08:53:15.000Z
tests/rcp_extra/__init__.py
bp-flugsimulator/utils
151e7f6650414f5782fd0a2d28666213d17118d3
[ "MIT" ]
null
null
null
""" Init file for rpc extra (test). """
10
31
0.575
6
40
3.833333
1
0
0
0
0
0
0
0
0
0
0
0
0.2
40
3
32
13.333333
0.71875
0.775
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
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
4dc10ac71742fabfc79c58dbe7229c6d41c382b2
1,633
py
Python
ninja-resin/setup.py
oberhamsi/FrameworkBenchmarks
660a66d51a9aad10b43c0660208fb13c098121af
[ "BSD-3-Clause" ]
1
2017-11-02T13:25:06.000Z
2017-11-02T13:25:06.000Z
ninja-resin/setup.py
oberhamsi/FrameworkBenchmarks
660a66d51a9aad10b43c0660208fb13c098121af
[ "BSD-3-Clause" ]
null
null
null
ninja-resin/setup.py
oberhamsi/FrameworkBenchmarks
660a66d51a9aad10b43c0660208fb13c098121af
[ "BSD-3-Clause" ]
null
null
null
import subprocess import sys import setup_util import os def start(args, logfile, errfile): setup_util.replace_text("ninja-resin/src/main/webapp/WEB-INF/resin-web.xml", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306") try: subprocess.check_call("mvn clean compile war:war", shell=True, cwd="ninja-resin", stderr=errfile, stdout=logfile) if os.name == 'nt': subprocess.check_call('rmdir /S /Q "%RESIN_HOME%\\webapps\\"', shell=True, stderr=errfile, stdout=logfile) subprocess.check_call('mkdir "%RESIN_HOME%\\webapps\\"', shell=True, stderr=errfile, stdout=logfile) subprocess.check_call('copy ninja-resin\\target\\ninja.war "%RESIN_HOME%\\webapps\\ninja.war"', shell=True, stderr=errfile, stdout=logfile) subprocess.check_call('"%RESIN_HOME%\\bin\\start.bat"', shell=True, stderr=errfile, stdout=logfile) else: subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=errfile, stdout=logfile) subprocess.check_call("cp ninja-resin/target/ninja.war $RESIN_HOME/webapps/ninja.war", shell=True, stderr=errfile, stdout=logfile) subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=errfile, stdout=logfile) return 0 except subprocess.CalledProcessError: return 1 def stop(logfile, errfile): try: if os.name == 'nt': subprocess.check_call('"%RESIN_HOME%\\bin\\stop.bat"', shell=True, stderr=errfile, stdout=logfile) else: subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=errfile, stdout=logfile) return 0 except subprocess.CalledProcessError: return 1
49.484848
145
0.718922
220
1,633
5.231818
0.281818
0.130321
0.165074
0.225891
0.715899
0.715899
0.705474
0.630756
0.630756
0.630756
0
0.008415
0.126761
1,633
32
146
51.03125
0.798738
0
0
0.413793
0
0
0.286589
0.213105
0
0
0
0
0
1
0.068966
false
0
0.137931
0
0.344828
0
0
0
0
null
0
0
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4dc68b742a041d4fb70dbcbab5657ac8cdb658c5
140
py
Python
src/adbutils_wrapper/__init__.py
jsrdzhk/adbutils-wrapper
c7457980224ec0f6af09413ec36c4b068d74fadb
[ "MIT" ]
null
null
null
src/adbutils_wrapper/__init__.py
jsrdzhk/adbutils-wrapper
c7457980224ec0f6af09413ec36c4b068d74fadb
[ "MIT" ]
null
null
null
src/adbutils_wrapper/__init__.py
jsrdzhk/adbutils-wrapper
c7457980224ec0f6af09413ec36c4b068d74fadb
[ "MIT" ]
null
null
null
# !/usr/bin/env python3 # -*-coding:utf-8 -*- """ # File : __init__.py.py # Time :2/9/21 14:59 # Author :Rodney Cheung """
15.555556
29
0.514286
20
140
3.4
0.95
0
0
0
0
0
0
0
0
0
0
0.097087
0.264286
140
8
30
17.5
0.563107
0.907143
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
4dcb3c0ca6b34d04de4b4055e6e994540bbd1a70
100
py
Python
cellrank/utils/models/__init__.py
dpeerlab/cellrank
461d1af79880a790bc56070626775eac24b6e5a2
[ "BSD-3-Clause" ]
3
2020-06-22T07:44:40.000Z
2021-12-06T23:15:58.000Z
cellrank/utils/models/__init__.py
dpeerlab/cellrank
461d1af79880a790bc56070626775eac24b6e5a2
[ "BSD-3-Clause" ]
null
null
null
cellrank/utils/models/__init__.py
dpeerlab/cellrank
461d1af79880a790bc56070626775eac24b6e5a2
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from cellrank.utils.models._models import Model, GamMGCVModel, SKLearnModel
33.333333
75
0.75
12
100
6.166667
0.916667
0
0
0
0
0
0
0
0
0
0
0.011236
0.11
100
2
76
50
0.820225
0.21
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
4dcc071b1f83637bd296633a68cc1005cb132805
244
py
Python
PandaForum/admin.py
matthewthomaskelly/Panda-Project
0adf9c7b5615508a7945da494e6fa34f73e993ff
[ "MIT" ]
1
2018-06-24T01:39:28.000Z
2018-06-24T01:39:28.000Z
PandaForum/admin.py
matthewthomaskelly/Panda-Project
0adf9c7b5615508a7945da494e6fa34f73e993ff
[ "MIT" ]
null
null
null
PandaForum/admin.py
matthewthomaskelly/Panda-Project
0adf9c7b5615508a7945da494e6fa34f73e993ff
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from PandaForum.models import Topic, SubTopic, Thread, Reply admin.site.register(Topic) admin.site.register(SubTopic) admin.site.register(Thread) admin.site.register(Reply)
27.111111
61
0.786885
33
244
5.818182
0.454545
0.1875
0.354167
0
0
0
0
0
0
0
0
0
0.118852
244
9
62
27.111111
0.893023
0.106557
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
4de985008c3dd41cf7ce8aeedd8e9c35b991ce38
29
py
Python
hello_world.py
crow18120/test-rest-api
6fc4bc3fb3ed61f31c3f998ed9aa3e9b48c9f968
[ "MIT" ]
null
null
null
hello_world.py
crow18120/test-rest-api
6fc4bc3fb3ed61f31c3f998ed9aa3e9b48c9f968
[ "MIT" ]
null
null
null
hello_world.py
crow18120/test-rest-api
6fc4bc3fb3ed61f31c3f998ed9aa3e9b48c9f968
[ "MIT" ]
null
null
null
smg = "Hello Crow" print(smg)
14.5
18
0.689655
5
29
4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.137931
29
2
19
14.5
0.8
0
0
0
0
0
0.333333
0
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
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
4df13fa3534751f536655e039433f542255151ff
75
py
Python
engine/config.py
stanfortonski/Perlin-Noise-3D-Voxel-Generator
f06b0329c948848b22b5e3c04978e95ce71f5ab0
[ "MIT" ]
27
2020-05-15T23:24:17.000Z
2021-11-22T01:23:27.000Z
engine/config.py
stanfortonski/Perlin-Noise-3D-Voxel-Generator
f06b0329c948848b22b5e3c04978e95ce71f5ab0
[ "MIT" ]
null
null
null
engine/config.py
stanfortonski/Perlin-Noise-3D-Voxel-Generator
f06b0329c948848b22b5e3c04978e95ce71f5ab0
[ "MIT" ]
null
null
null
import json with open('config.json') as file: config = json.load(file)
18.75
33
0.693333
12
75
4.333333
0.666667
0.384615
0
0
0
0
0
0
0
0
0
0
0.173333
75
4
34
18.75
0.83871
0
0
0
0
0
0.144737
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.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
0
0
0
1
0
0
0
0
4
4df9af3ad6303ab0794eb72db83eef1fc63d083b
36
py
Python
2 semester/PW/Coursera/Python/1 Week/16.py
kurpenok/Labs
069c92b7964a1445d093313b38ebdc56318d2a73
[ "MIT" ]
1
2022-02-06T17:50:25.000Z
2022-02-06T17:50:25.000Z
2 semester/PW/Coursera/Python/1 Week/16.py
kurpenok/Labs
069c92b7964a1445d093313b38ebdc56318d2a73
[ "MIT" ]
null
null
null
2 semester/PW/Coursera/Python/1 Week/16.py
kurpenok/Labs
069c92b7964a1445d093313b38ebdc56318d2a73
[ "MIT" ]
1
2022-03-02T06:45:06.000Z
2022-03-02T06:45:06.000Z
n = input() print(int(n * 100)**2)
9
22
0.527778
7
36
2.714286
0.857143
0
0
0
0
0
0
0
0
0
0
0.137931
0.194444
36
3
23
12
0.517241
0
0
0
0
0
0
0
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
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
15016f0d345f8b6f4381d2b5612504e92f838dc6
59
py
Python
pybook/ch13/FIleTestConst.py
YanhaoXu/python-learning
856687a71635a2ca67dab49d396c238f128e5ec0
[ "MIT" ]
2
2021-12-06T13:29:48.000Z
2022-01-20T11:39:45.000Z
pybook/ch13/FIleTestConst.py
YanhaoXu/python-learning
856687a71635a2ca67dab49d396c238f128e5ec0
[ "MIT" ]
null
null
null
pybook/ch13/FIleTestConst.py
YanhaoXu/python-learning
856687a71635a2ca67dab49d396c238f128e5ec0
[ "MIT" ]
null
null
null
TEST_PATH = "D:\\DevOps\\testData\\python\\pybook\\ch13\\"
29.5
58
0.677966
8
59
4.875
1
0
0
0
0
0
0
0
0
0
0
0.035714
0.050847
59
1
59
59
0.660714
0
0
0
0
0
0.745763
0.745763
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
15034f6391bb6a33d7067ca3632b9d25f82f7c2b
1,470
py
Python
test/test_transpose.py
hejops/pychord
ae5d0585c5df95c98517c1fb5351b8b2815c8b8c
[ "MIT" ]
2
2021-07-22T02:45:07.000Z
2021-10-14T17:22:41.000Z
test/test_transpose.py
hejops/pychord
ae5d0585c5df95c98517c1fb5351b8b2815c8b8c
[ "MIT" ]
6
2020-09-26T00:37:16.000Z
2022-02-10T00:42:38.000Z
test/test_transpose.py
hejops/pychord
ae5d0585c5df95c98517c1fb5351b8b2815c8b8c
[ "MIT" ]
2
2021-04-27T16:24:07.000Z
2021-07-22T03:23:11.000Z
# -*- coding: utf-8 -*- import unittest from pychord import Chord class TestChordCreations(unittest.TestCase): def test_transpose_zero(self): c = Chord("Am") c.transpose(0) self.assertEqual(c.root, "A") self.assertEqual(c.quality.quality, "m") self.assertEqual(c, Chord("Am")) def test_transpose_positive(self): c = Chord("Am") c.transpose(3) self.assertEqual(c.root, "C") self.assertEqual(c.quality.quality, "m") self.assertEqual(c, Chord("Cm")) def test_transpose_negative(self): c = Chord("Am") c.transpose(-4) self.assertEqual(c.root, "F") self.assertEqual(c.quality.quality, "m") self.assertEqual(c, Chord("Fm")) def test_transpose_slash(self): c = Chord("Am7/G") c.transpose(3) self.assertEqual(c.root, "C") self.assertEqual(c.quality.quality, "m7") self.assertEqual(c.on, "Bb") self.assertEqual(c, Chord("Cm7/Bb")) def test_invalid_transpose_type(self): c = Chord("Am") self.assertRaises(TypeError, c.transpose, "A") def test_transpose_eq1(self): c = Chord("C") c.transpose(1) self.assertEqual(c, Chord("C#")) self.assertEqual(c, Chord("Db")) def test_transpose_eq2(self): c = Chord("C") c.transpose(2) self.assertEqual(c, Chord("D")) if __name__ == '__main__': unittest.main()
25.789474
54
0.585714
185
1,470
4.52973
0.275676
0.286396
0.305489
0.175418
0.415274
0.415274
0.298329
0.298329
0.298329
0.298329
0
0.010999
0.257823
1,470
56
55
26.25
0.757104
0.014286
0
0.309524
0
0
0.035936
0
0
0
0
0
0.404762
1
0.166667
false
0
0.047619
0
0.238095
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
1
0
0
0
0
0
0
0
0
0
4
12896f93084549499e0f577fa272e7c6ab2e15cd
89
py
Python
Titanic/apps.py
Gautam-J/NeuralNets
1a081438b11685a25d0b5165d7b47f12bb9780d5
[ "MIT" ]
2
2020-05-21T21:58:54.000Z
2021-08-04T03:01:53.000Z
Titanic/apps.py
Gautam-J/NeuralNets
1a081438b11685a25d0b5165d7b47f12bb9780d5
[ "MIT" ]
3
2021-06-04T22:26:30.000Z
2021-06-10T18:23:25.000Z
Titanic/apps.py
Gautam-J/NeuralNets
1a081438b11685a25d0b5165d7b47f12bb9780d5
[ "MIT" ]
null
null
null
from django.apps import AppConfig class TitanicConfig(AppConfig): name = 'Titanic'
14.833333
33
0.752809
10
89
6.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.168539
89
5
34
17.8
0.905405
0
0
0
0
0
0.078652
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
12a011bb505d3867c4fd2a02f947e5988f95e728
103
py
Python
server/followers/admin.py
amy-xiang/CMPUT404_PROJECT
cbcea0cd164d6377ede397e934f960505e8f347a
[ "W3C-20150513" ]
1
2021-04-06T22:35:53.000Z
2021-04-06T22:35:53.000Z
server/followers/admin.py
amy-xiang/CMPUT404_PROJECT
cbcea0cd164d6377ede397e934f960505e8f347a
[ "W3C-20150513" ]
null
null
null
server/followers/admin.py
amy-xiang/CMPUT404_PROJECT
cbcea0cd164d6377ede397e934f960505e8f347a
[ "W3C-20150513" ]
null
null
null
from django.contrib import admin from .models import FriendRequest admin.site.register(FriendRequest)
20.6
34
0.84466
13
103
6.692308
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.097087
103
4
35
25.75
0.935484
0
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
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
0
0
4
12ccbec34c4525380a00adcec7472a3fc44415f3
22
py
Python
storages/__init__.py
z2i/django-storages-azure
ff39f5c961edb592a4871cda495a404559191e55
[ "BSD-3-Clause" ]
1
2016-08-16T15:57:02.000Z
2016-08-16T15:57:02.000Z
storages/__init__.py
z2i/django-storages-azure
ff39f5c961edb592a4871cda495a404559191e55
[ "BSD-3-Clause" ]
null
null
null
storages/__init__.py
z2i/django-storages-azure
ff39f5c961edb592a4871cda495a404559191e55
[ "BSD-3-Clause" ]
null
null
null
__version__ = '1.6.7'
11
21
0.636364
4
22
2.5
1
0
0
0
0
0
0
0
0
0
0
0.157895
0.136364
22
1
22
22
0.368421
0
0
0
0
0
0.227273
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
12f3fec822d32ee8fffa161bca90a141c09a5379
185
py
Python
runserver.py
mcorreaiz/sqm-webapp
06db3ee0d51d7f8140491c198a680a011c47a550
[ "Apache-2.0" ]
null
null
null
runserver.py
mcorreaiz/sqm-webapp
06db3ee0d51d7f8140491c198a680a011c47a550
[ "Apache-2.0" ]
null
null
null
runserver.py
mcorreaiz/sqm-webapp
06db3ee0d51d7f8140491c198a680a011c47a550
[ "Apache-2.0" ]
null
null
null
""" This script runs the sqmwebapp application using a development server. """ from os import environ from sqmwebapp import app if __name__ == '__main__': app.run(host='0.0.0.0')
18.5
70
0.718919
28
185
4.464286
0.75
0.048
0.048
0
0
0
0
0
0
0
0
0.025974
0.167568
185
9
71
20.555556
0.785714
0.378378
0
0
0
0
0.140187
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
421eab328213821907d9fcb8f0c1c505c3520a0d
45
py
Python
poshy/__init__.py
LeapofAzzam-backup/poshy
4840f7ca9e335727585a2b168f3dd6a0bb3ba15a
[ "Apache-2.0" ]
null
null
null
poshy/__init__.py
LeapofAzzam-backup/poshy
4840f7ca9e335727585a2b168f3dd6a0bb3ba15a
[ "Apache-2.0" ]
null
null
null
poshy/__init__.py
LeapofAzzam-backup/poshy
4840f7ca9e335727585a2b168f3dd6a0bb3ba15a
[ "Apache-2.0" ]
null
null
null
from . import aya, poshcorn VERSION = '0.2'
11.25
27
0.666667
7
45
4.285714
1
0
0
0
0
0
0
0
0
0
0
0.055556
0.2
45
3
28
15
0.777778
0
0
0
0
0
0.066667
0
0
0
0
0
0
1
0
false
0
0.5
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
0
0
0
1
0
0
0
0
4
424a786b6f459713af424be6d744c79486210f22
60
py
Python
chess_moves.py
Pyroseza/Random
b2106957e1824934317ea504780123f5c362b4d8
[ "MIT" ]
null
null
null
chess_moves.py
Pyroseza/Random
b2106957e1824934317ea504780123f5c362b4d8
[ "MIT" ]
2
2018-10-31T09:33:18.000Z
2020-07-28T08:14:41.000Z
chess_moves.py
Pyroseza/Random
b2106957e1824934317ea504780123f5c362b4d8
[ "MIT" ]
1
2017-11-25T18:21:45.000Z
2017-11-25T18:21:45.000Z
print([f"{l}{n}" for n in "12345678" for l in "abcdefgh"])
30
59
0.6
12
60
3
0.666667
0
0
0
0
0
0
0
0
0
0
0.16
0.166667
60
1
60
60
0.56
0
0
0
0
0
0.372881
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
427db0ac7c0d44ad43580fbb50792ede57fec45b
297
py
Python
app_dzmz.py
Chemscribbler/dzmz-optimizer
f0f263d00d8ac2c43882470385bc542126cdf849
[ "MIT" ]
null
null
null
app_dzmz.py
Chemscribbler/dzmz-optimizer
f0f263d00d8ac2c43882470385bc542126cdf849
[ "MIT" ]
null
null
null
app_dzmz.py
Chemscribbler/dzmz-optimizer
f0f263d00d8ac2c43882470385bc542126cdf849
[ "MIT" ]
1
2022-03-05T05:06:31.000Z
2022-03-05T05:06:31.000Z
from dzmz import app, db from dzmz.models import Card, Pair from dzmz.card_builder import build_card_db @app.shell_context_processor def make_shell_context(): return {"db": db, "Card": Card, "Pair": Pair, "build_card_db": build_card_db} if __name__ == "__main__": app.run(debug=False)
22.846154
81
0.737374
47
297
4.255319
0.468085
0.12
0.165
0
0
0
0
0
0
0
0
0
0.144781
297
12
82
24.75
0.787402
0
0
0
0
0
0.104377
0
0
0
0
0
0
1
0.125
true
0
0.375
0.125
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
1
1
0
0
4
428262b4be2b1bc6b7be7967e1dc4794a0755638
38
py
Python
src/ska_sdp_config/version.py
ska-telescope/sdp-config
c4377c4fb0cfbad805b58163c1559fd7a574029e
[ "BSD-3-Clause" ]
null
null
null
src/ska_sdp_config/version.py
ska-telescope/sdp-config
c4377c4fb0cfbad805b58163c1559fd7a574029e
[ "BSD-3-Clause" ]
null
null
null
src/ska_sdp_config/version.py
ska-telescope/sdp-config
c4377c4fb0cfbad805b58163c1559fd7a574029e
[ "BSD-3-Clause" ]
null
null
null
"""Version.""" __version__ = "0.3.2"
9.5
21
0.552632
5
38
3.4
0.8
0
0
0
0
0
0
0
0
0
0
0.090909
0.131579
38
3
22
12.666667
0.424242
0.210526
0
0
0
0
0.208333
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4286885aad9b0e98953d17c0196ec3b625c66369
35
py
Python
data/studio21_generated/introductory/3867/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/3867/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/3867/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
def remove_rotten(bag_of_fruits):
17.5
33
0.828571
6
35
4.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.085714
35
2
34
17.5
0.8125
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
4
42adb8340649d640e9d90f5c904c39fb4b608b21
184
py
Python
opps/contrib/admin/shortcuts.py
jeanmask/opps
031c6136c38d43aa6d1ccb25a94f7bcd65ccbf87
[ "MIT" ]
159
2015-01-03T16:36:35.000Z
2022-03-29T20:50:13.000Z
opps/contrib/admin/shortcuts.py
jeanmask/opps
031c6136c38d43aa6d1ccb25a94f7bcd65ccbf87
[ "MIT" ]
81
2015-01-02T21:26:16.000Z
2021-05-29T12:24:52.000Z
opps/contrib/admin/shortcuts.py
jeanmask/opps
031c6136c38d43aa6d1ccb25a94f7bcd65ccbf87
[ "MIT" ]
75
2015-01-23T13:41:03.000Z
2021-09-24T03:45:23.000Z
# coding: utf-8 from opps.articles.models import Post, Album def count_posts(request): return Post.objects.count() def count_albums(request): return Album.objects.count()
15.333333
44
0.733696
26
184
5.115385
0.653846
0.120301
0
0
0
0
0
0
0
0
0
0.006452
0.157609
184
11
45
16.727273
0.851613
0.070652
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0.2
0.4
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4