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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7245e4ee3c439ac1f2f7a0e94bf04d9b5353f1a1
| 102
|
py
|
Python
|
solo/models.py
|
Saket-Komawar/Forex
|
a470cb59cc0e9d4ed71713975cd8d2f778540100
|
[
"Apache-2.0"
] | null | null | null |
solo/models.py
|
Saket-Komawar/Forex
|
a470cb59cc0e9d4ed71713975cd8d2f778540100
|
[
"Apache-2.0"
] | 2
|
2020-06-05T17:30:33.000Z
|
2021-06-10T18:53:59.000Z
|
solo/models.py
|
Saket-Komawar/Forex
|
a470cb59cc0e9d4ed71713975cd8d2f778540100
|
[
"Apache-2.0"
] | 2
|
2017-02-01T09:24:27.000Z
|
2017-02-05T17:09:02.000Z
|
from __future__ import unicode_literals
from django.utils import timezone
# Create your models here.
| 20.4
| 39
| 0.833333
| 14
| 102
| 5.714286
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 102
| 4
| 40
| 25.5
| 0.909091
| 0.235294
| 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
| 1
| 0
|
0
| 5
|
a0faffe70e2f94cd30c329d35c99ac7f6da17aff
| 42
|
py
|
Python
|
rl_algorithm/For_Later/hybrid_in_meta.py
|
jgwak1/Hybrid-MBMF
|
35030015b59c5cea2b072594320c2a9b6448f941
|
[
"MIT"
] | null | null | null |
rl_algorithm/For_Later/hybrid_in_meta.py
|
jgwak1/Hybrid-MBMF
|
35030015b59c5cea2b072594320c2a9b6448f941
|
[
"MIT"
] | null | null | null |
rl_algorithm/For_Later/hybrid_in_meta.py
|
jgwak1/Hybrid-MBMF
|
35030015b59c5cea2b072594320c2a9b6448f941
|
[
"MIT"
] | null | null | null |
# To extend hybridMBMF to Meta-RL setting.
| 42
| 42
| 0.785714
| 7
| 42
| 4.714286
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 42
| 1
| 42
| 42
| 0.916667
| 0.952381
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9d03c7d6013ac7a1a5e986ff1ac3f66fbd04cbb5
| 25,284
|
py
|
Python
|
tests/test_openapi_parser/test_properties.py
|
acgray/openapi-python-client
|
d47bc429660738dfd120797ddca032dca93ef210
|
[
"MIT"
] | null | null | null |
tests/test_openapi_parser/test_properties.py
|
acgray/openapi-python-client
|
d47bc429660738dfd120797ddca032dca93ef210
|
[
"MIT"
] | null | null | null |
tests/test_openapi_parser/test_properties.py
|
acgray/openapi-python-client
|
d47bc429660738dfd120797ddca032dca93ef210
|
[
"MIT"
] | null | null | null |
import pytest
MODULE_NAME = "openapi_python_client.openapi_parser.properties"
class TestProperty:
def test_get_type_string(self):
from openapi_python_client.openapi_parser.properties import Property
p = Property(name="test", required=True, default=None)
p._type_string = "TestType"
assert p.get_type_string() == "TestType"
p.required = False
assert p.get_type_string() == "Optional[TestType]"
def test_to_string(self, mocker):
from openapi_python_client.openapi_parser.properties import Property
name = mocker.MagicMock()
snake_case = mocker.patch(f"openapi_python_client.utils.snake_case")
p = Property(name=name, required=True, default=None)
get_type_string = mocker.patch.object(p, "get_type_string")
assert p.to_string() == f"{snake_case(name)}: {get_type_string()}"
p.required = False
assert p.to_string() == f"{snake_case(name)}: {get_type_string()} = None"
p.default = "TEST"
assert p.to_string() == f"{snake_case(name)}: {get_type_string()} = TEST"
def test_get_imports(self, mocker):
from openapi_python_client.openapi_parser.properties import Property
name = mocker.MagicMock()
mocker.patch(f"openapi_python_client.utils.snake_case")
p = Property(name=name, required=True, default=None)
assert p.get_imports(prefix="") == set()
p.required = False
assert p.get_imports(prefix="") == {"from typing import Optional"}
class TestStringProperty:
def test___post_init__(self):
from openapi_python_client.openapi_parser.properties import StringProperty
sp = StringProperty(name="test", required=True, default="A Default Value",)
assert sp.default == '"A Default Value"'
def test_get_type_string(self):
from openapi_python_client.openapi_parser.properties import StringProperty
p = StringProperty(name="test", required=True, default=None)
assert p.get_type_string() == "str"
p.required = False
assert p.get_type_string() == "Optional[str]"
class TestDateTimeProperty:
def test_get_imports(self, mocker):
from openapi_python_client.openapi_parser.properties import DateTimeProperty
name = mocker.MagicMock()
mocker.patch(f"openapi_python_client.utils.snake_case")
p = DateTimeProperty(name=name, required=True, default=None)
assert p.get_imports(prefix="") == {
"from datetime import datetime",
"from typing import cast",
}
p.required = False
assert p.get_imports(prefix="") == {
"from typing import Optional",
"from datetime import datetime",
"from typing import cast",
}
class TestDateProperty:
def test_get_imports(self, mocker):
from openapi_python_client.openapi_parser.properties import DateProperty
name = mocker.MagicMock()
mocker.patch(f"openapi_python_client.utils.snake_case")
p = DateProperty(name=name, required=True, default=None)
assert p.get_imports(prefix="") == {
"from datetime import date",
"from typing import cast",
}
p.required = False
assert p.get_imports(prefix="") == {
"from typing import Optional",
"from datetime import date",
"from typing import cast",
}
class TestFileProperty:
def test_get_imports(self, mocker):
from openapi_python_client.openapi_parser.properties import FileProperty
name = mocker.MagicMock()
mocker.patch(f"openapi_python_client.utils.snake_case")
prefix = "blah"
p = FileProperty(name=name, required=True, default=None)
assert p.get_imports(prefix=prefix) == {f"from {prefix}.types import File", "from dataclasses import astuple"}
p.required = False
assert p.get_imports(prefix=prefix) == {
"from typing import Optional",
f"from {prefix}.types import File",
"from dataclasses import astuple",
}
class TestListProperty:
def test_get_type_string(self, mocker):
from openapi_python_client.openapi_parser.properties import ListProperty
inner_property = mocker.MagicMock()
inner_type_string = mocker.MagicMock()
inner_property.get_type_string.return_value = inner_type_string
p = ListProperty(name="test", required=True, default=None, inner_property=inner_property)
assert p.get_type_string() == f"List[{inner_type_string}]"
p.required = False
assert p.get_type_string() == f"Optional[List[{inner_type_string}]]"
p = ListProperty(name="test", required=True, default=[], inner_property=inner_property)
assert p.default == f"field(default_factory=lambda: cast(List[{inner_type_string}], []))"
def test_get_type_imports(self, mocker):
from openapi_python_client.openapi_parser.properties import ListProperty
inner_property = mocker.MagicMock()
inner_import = mocker.MagicMock()
inner_property.get_imports.return_value = {inner_import}
prefix = mocker.MagicMock()
p = ListProperty(name="test", required=True, default=None, inner_property=inner_property)
assert p.get_imports(prefix=prefix) == {
inner_import,
"from typing import List",
}
p.required = False
assert p.get_imports(prefix=prefix) == {
inner_import,
"from typing import List",
"from typing import Optional",
}
p.default = mocker.MagicMock()
assert p.get_imports(prefix=prefix) == {
inner_import,
"from typing import Optional",
"from typing import List",
"from typing import cast",
"from dataclasses import field",
}
class TestUnionProperty:
def test_get_type_string(self, mocker):
from openapi_python_client.openapi_parser.properties import UnionProperty
inner_property_1 = mocker.MagicMock()
inner_property_1.get_type_string.return_value = "inner_type_string_1"
inner_property_2 = mocker.MagicMock()
inner_property_2.get_type_string.return_value = "inner_type_string_2"
p = UnionProperty(
name="test", required=True, default=None, inner_properties=[inner_property_1, inner_property_2]
)
assert p.get_type_string() == f"Union[inner_type_string_1, inner_type_string_2]"
p.required = False
assert p.get_type_string() == f"Optional[Union[inner_type_string_1, inner_type_string_2]]"
def test_get_type_imports(self, mocker):
from openapi_python_client.openapi_parser.properties import UnionProperty
inner_property_1 = mocker.MagicMock()
inner_import_1 = mocker.MagicMock()
inner_property_1.get_imports.return_value = {inner_import_1}
inner_property_2 = mocker.MagicMock()
inner_import_2 = mocker.MagicMock()
inner_property_2.get_imports.return_value = {inner_import_2}
prefix = mocker.MagicMock()
p = UnionProperty(
name="test", required=True, default=None, inner_properties=[inner_property_1, inner_property_2]
)
assert p.get_imports(prefix=prefix) == {
inner_import_1,
inner_import_2,
"from typing import Union",
}
p.required = False
assert p.get_imports(prefix=prefix) == {
inner_import_1,
inner_import_2,
"from typing import Union",
"from typing import Optional",
}
class TestEnumProperty:
def test___post_init__(self, mocker):
name = mocker.MagicMock()
snake_case = mocker.patch(f"openapi_python_client.utils.snake_case")
fake_reference = mocker.MagicMock(class_name="MyTestEnum")
deduped_reference = mocker.MagicMock(class_name="Deduped")
from_ref = mocker.patch(f"{MODULE_NAME}.Reference.from_ref", side_effect=[fake_reference, deduped_reference])
from openapi_python_client.openapi_parser import properties
fake_dup_enum = mocker.MagicMock()
properties._existing_enums = {"MyTestEnum": fake_dup_enum}
values = {"FIRST": "first", "SECOND": "second"}
enum_property = properties.EnumProperty(
name=name, required=True, default="second", values=values, title="a_title",
)
assert enum_property.default == "Deduped.SECOND"
assert enum_property.python_name == snake_case(name)
from_ref.assert_has_calls(
[mocker.call("a_title"), mocker.call("MyTestEnum1"),]
)
assert enum_property.reference == deduped_reference
assert properties._existing_enums == {"MyTestEnum": fake_dup_enum, "Deduped": enum_property}
# What if an Enum exists with the same name, but has the same values? Don't dedupe that.
fake_dup_enum.values = values
from_ref.reset_mock()
from_ref.side_effect = [fake_reference]
enum_property = properties.EnumProperty(
name=name, required=True, default="second", values=values, title="a_title",
)
assert enum_property.default == "MyTestEnum.SECOND"
assert enum_property.python_name == snake_case(name)
from_ref.assert_called_once_with("a_title")
assert enum_property.reference == fake_reference
assert len(properties._existing_enums) == 2
properties._existing_enums = {}
def test_get_type_string(self, mocker):
fake_reference = mocker.MagicMock(class_name="MyTestEnum")
mocker.patch(f"{MODULE_NAME}.Reference.from_ref", return_value=fake_reference)
from openapi_python_client.openapi_parser import properties
enum_property = properties.EnumProperty(name="test", required=True, default=None, values={}, title="a_title")
assert enum_property.get_type_string() == "MyTestEnum"
enum_property.required = False
assert enum_property.get_type_string() == "Optional[MyTestEnum]"
properties._existing_enums = {}
def test_get_imports(self, mocker):
fake_reference = mocker.MagicMock(class_name="MyTestEnum", module_name="my_test_enum")
mocker.patch(f"{MODULE_NAME}.Reference.from_ref", return_value=fake_reference)
prefix = mocker.MagicMock()
from openapi_python_client.openapi_parser import properties
enum_property = properties.EnumProperty(name="test", required=True, default=None, values={}, title="a_title")
assert enum_property.get_imports(prefix=prefix) == {
f"from {prefix}.{fake_reference.module_name} import {fake_reference.class_name}"
}
enum_property.required = False
assert enum_property.get_imports(prefix=prefix) == {
f"from {prefix}.{fake_reference.module_name} import {fake_reference.class_name}",
"from typing import Optional",
}
properties._existing_enums = {}
def test_values_from_list(self):
from openapi_python_client.openapi_parser.properties import EnumProperty
data = ["abc", "123", "a23", "1bc"]
result = EnumProperty.values_from_list(data)
assert result == {
"ABC": "abc",
"VALUE_1": "123",
"A23": "a23",
"VALUE_3": "1bc",
}
def test_get_all_enums(self, mocker):
from openapi_python_client.openapi_parser import properties
properties._existing_enums = mocker.MagicMock()
assert properties.EnumProperty.get_all_enums() == properties._existing_enums
properties._existing_enums = {}
class TestRefProperty:
def test_get_type_string(self, mocker):
from openapi_python_client.openapi_parser.properties import RefProperty
ref_property = RefProperty(
name="test", required=True, default=None, reference=mocker.MagicMock(class_name="MyRefClass")
)
assert ref_property.get_type_string() == "MyRefClass"
ref_property.required = False
assert ref_property.get_type_string() == "Optional[MyRefClass]"
def test_get_imports(self, mocker):
fake_reference = mocker.MagicMock(class_name="MyRefClass", module_name="my_test_enum")
prefix = mocker.MagicMock()
from openapi_python_client.openapi_parser.properties import RefProperty
p = RefProperty(name="test", required=True, default=None, reference=fake_reference)
assert p.get_imports(prefix=prefix) == {
f"from {prefix}.{fake_reference.module_name} import {fake_reference.class_name}",
"from typing import Dict",
"from typing import cast",
}
p.required = False
assert p.get_imports(prefix=prefix) == {
f"from {prefix}.{fake_reference.module_name} import {fake_reference.class_name}",
"from typing import Dict",
"from typing import cast",
"from typing import Optional",
}
class TestDictProperty:
def test___post_init__(self):
from openapi_python_client.openapi_parser.properties import DictProperty
p = DictProperty(name="blah", required=True, default={})
assert p.default == "field(default_factory=lambda: cast(Dict[Any, Any], {}))"
def test_get_imports(self, mocker):
from openapi_python_client.openapi_parser.properties import DictProperty
name = mocker.MagicMock()
mocker.patch(f"openapi_python_client.utils.snake_case")
prefix = mocker.MagicMock()
p = DictProperty(name=name, required=True, default=None)
assert p.get_imports(prefix=prefix) == {
"from typing import Dict",
}
p.required = False
assert p.get_imports(prefix=prefix) == {
"from typing import Optional",
"from typing import Dict",
}
p.default = mocker.MagicMock()
assert p.get_imports(prefix=prefix) == {
"from typing import Optional",
"from typing import Dict",
"from typing import cast",
"from dataclasses import field",
}
class TestPropertyFromDict:
def test_property_from_dict_enum(self, mocker):
name = mocker.MagicMock()
required = mocker.MagicMock()
data = {
"enum": mocker.MagicMock(),
}
EnumProperty = mocker.patch(f"{MODULE_NAME}.EnumProperty")
from openapi_python_client.openapi_parser.properties import property_from_dict
p = property_from_dict(name=name, required=required, data=data)
EnumProperty.values_from_list.assert_called_once_with(data["enum"])
EnumProperty.assert_called_once_with(
name=name, required=required, values=EnumProperty.values_from_list(), default=None, title=name
)
assert p == EnumProperty()
EnumProperty.reset_mock()
title = mocker.MagicMock()
data["default"] = mocker.MagicMock()
data["title"] = title
property_from_dict(
name=name, required=required, data=data,
)
EnumProperty.assert_called_once_with(
name=name, required=required, values=EnumProperty.values_from_list(), default=data["default"], title=title
)
def test_property_from_dict_ref(self, mocker):
name = mocker.MagicMock()
required = mocker.MagicMock()
data = {
"$ref": mocker.MagicMock(),
}
from_ref = mocker.patch(f"{MODULE_NAME}.Reference.from_ref")
RefProperty = mocker.patch(f"{MODULE_NAME}.RefProperty")
from openapi_python_client.openapi_parser.properties import property_from_dict
p = property_from_dict(name=name, required=required, data=data)
from_ref.assert_called_once_with(data["$ref"])
RefProperty.assert_called_once_with(name=name, required=required, reference=from_ref(), default=None)
assert p == RefProperty()
def test_property_from_dict_string(self, mocker):
_string_based_property = mocker.patch(f"{MODULE_NAME}._string_based_property")
name = mocker.MagicMock()
required = mocker.MagicMock()
data = {
"type": "string",
}
from openapi_python_client.openapi_parser.properties import property_from_dict
p = property_from_dict(name=name, required=required, data=data)
assert p == _string_based_property.return_value
_string_based_property.assert_called_once_with(name=name, required=required, data=data)
@pytest.mark.parametrize(
"openapi_type,python_type",
[
("number", "FloatProperty"),
("integer", "IntProperty"),
("boolean", "BooleanProperty"),
("object", "DictProperty"),
],
)
def test_property_from_dict_simple_types(self, mocker, openapi_type, python_type):
name = mocker.MagicMock()
required = mocker.MagicMock()
data = {
"type": openapi_type,
}
clazz = mocker.patch(f"{MODULE_NAME}.{python_type}")
from openapi_python_client.openapi_parser.properties import property_from_dict
p = property_from_dict(name=name, required=required, data=data)
clazz.assert_called_once_with(name=name, required=required, default=None)
assert p == clazz()
# Test optional values
clazz.reset_mock()
data["default"] = mocker.MagicMock()
property_from_dict(
name=name, required=required, data=data,
)
clazz.assert_called_once_with(name=name, required=required, default=data["default"])
def test_property_from_dict_array(self, mocker):
name = mocker.MagicMock()
required = mocker.MagicMock()
data = {
"type": "array",
"items": {"type": "number", "default": "0.0"},
}
ListProperty = mocker.patch(f"{MODULE_NAME}.ListProperty")
FloatProperty = mocker.patch(f"{MODULE_NAME}.FloatProperty")
from openapi_python_client.openapi_parser.properties import property_from_dict
p = property_from_dict(name=name, required=required, data=data)
FloatProperty.assert_called_once_with(name=f"{name}_item", required=True, default="0.0")
ListProperty.assert_called_once_with(
name=name, required=required, default=None, inner_property=FloatProperty.return_value
)
assert p == ListProperty.return_value
def test_property_from_dict_union(self, mocker):
name = mocker.MagicMock()
required = mocker.MagicMock()
data = {
"anyOf": [{"type": "number", "default": "0.0"}, {"type": "integer", "default": "0"},],
}
UnionProperty = mocker.patch(f"{MODULE_NAME}.UnionProperty")
FloatProperty = mocker.patch(f"{MODULE_NAME}.FloatProperty")
IntProperty = mocker.patch(f"{MODULE_NAME}.IntProperty")
from openapi_python_client.openapi_parser.properties import property_from_dict
p = property_from_dict(name=name, required=required, data=data)
FloatProperty.assert_called_once_with(name=name, required=required, default="0.0")
IntProperty.assert_called_once_with(name=name, required=required, default="0")
UnionProperty.assert_called_once_with(
name=name,
required=required,
default=None,
inner_properties=[FloatProperty.return_value, IntProperty.return_value],
)
assert p == UnionProperty.return_value
def test_property_from_dict_unsupported_type(self, mocker):
name = mocker.MagicMock()
required = mocker.MagicMock()
data = {
"type": mocker.MagicMock(),
}
from openapi_python_client.openapi_parser.errors import ParseError
from openapi_python_client.openapi_parser.properties import property_from_dict
with pytest.raises(ParseError):
property_from_dict(name=name, required=required, data=data)
def test_property_from_dict_no_valid_props_in_data(self):
from openapi_python_client.openapi_parser.errors import ParseError
from openapi_python_client.openapi_parser.properties import property_from_dict
with pytest.raises(ParseError):
property_from_dict(name="blah", required=True, data={})
class TestStringBasedProperty:
def test__string_based_property_no_format(self, mocker):
name = mocker.MagicMock()
required = mocker.MagicMock()
data = {
"type": "string",
}
StringProperty = mocker.patch(f"{MODULE_NAME}.StringProperty")
from openapi_python_client.openapi_parser.properties import _string_based_property
p = _string_based_property(name=name, required=required, data=data)
StringProperty.assert_called_once_with(name=name, required=required, pattern=None, default=None)
assert p == StringProperty.return_value
# Test optional values
StringProperty.reset_mock()
data["default"] = mocker.MagicMock()
data["pattern"] = mocker.MagicMock()
_string_based_property(
name=name, required=required, data=data,
)
StringProperty.assert_called_once_with(
name=name, required=required, pattern=data["pattern"], default=data["default"]
)
def test__string_based_property_datetime_format(self, mocker):
name = mocker.MagicMock()
required = mocker.MagicMock()
data = {
"type": "string",
"format": "date-time",
}
DateTimeProperty = mocker.patch(f"{MODULE_NAME}.DateTimeProperty")
from openapi_python_client.openapi_parser.properties import _string_based_property
p = _string_based_property(name=name, required=required, data=data)
DateTimeProperty.assert_called_once_with(name=name, required=required, default=None)
assert p == DateTimeProperty.return_value
# Test optional values
DateTimeProperty.reset_mock()
data["default"] = mocker.MagicMock()
_string_based_property(
name=name, required=required, data=data,
)
DateTimeProperty.assert_called_once_with(name=name, required=required, default=data["default"])
def test__string_based_property_date_format(self, mocker):
name = mocker.MagicMock()
required = mocker.MagicMock()
data = {
"type": "string",
"format": "date",
}
DateProperty = mocker.patch(f"{MODULE_NAME}.DateProperty")
from openapi_python_client.openapi_parser.properties import _string_based_property
p = _string_based_property(name=name, required=required, data=data)
DateProperty.assert_called_once_with(name=name, required=required, default=None)
assert p == DateProperty.return_value
# Test optional values
DateProperty.reset_mock()
data["default"] = mocker.MagicMock()
_string_based_property(
name=name, required=required, data=data,
)
DateProperty.assert_called_once_with(name=name, required=required, default=data["default"])
def test__string_based_property_binary_format(self, mocker):
name = mocker.MagicMock()
required = mocker.MagicMock()
data = {
"type": "string",
"format": "binary",
}
FileProperty = mocker.patch(f"{MODULE_NAME}.FileProperty")
from openapi_python_client.openapi_parser.properties import _string_based_property
p = _string_based_property(name=name, required=required, data=data)
FileProperty.assert_called_once_with(name=name, required=required, default=None)
assert p == FileProperty.return_value
# Test optional values
FileProperty.reset_mock()
data["default"] = mocker.MagicMock()
_string_based_property(
name=name, required=required, data=data,
)
FileProperty.assert_called_once_with(name=name, required=required, default=data["default"])
def test__string_based_property_unsupported_format(self, mocker):
name = mocker.MagicMock()
required = mocker.MagicMock()
data = {
"type": "string",
"format": mocker.MagicMock(),
}
StringProperty = mocker.patch(f"{MODULE_NAME}.StringProperty")
from openapi_python_client.openapi_parser.properties import _string_based_property
p = _string_based_property(name=name, required=required, data=data)
StringProperty.assert_called_once_with(name=name, required=required, pattern=None, default=None)
assert p == StringProperty.return_value
# Test optional values
StringProperty.reset_mock()
data["default"] = mocker.MagicMock()
data["pattern"] = mocker.MagicMock()
_string_based_property(
name=name, required=required, data=data,
)
StringProperty.assert_called_once_with(
name=name, required=required, pattern=data["pattern"], default=data["default"]
)
| 38.135747
| 118
| 0.662356
| 2,824
| 25,284
| 5.657578
| 0.056657
| 0.065719
| 0.047068
| 0.058584
| 0.837078
| 0.777055
| 0.740252
| 0.704075
| 0.667772
| 0.613695
| 0
| 0.002796
| 0.236276
| 25,284
| 662
| 119
| 38.193353
| 0.824599
| 0.008385
| 0
| 0.533597
| 0
| 0
| 0.141079
| 0.053304
| 0
| 0
| 0
| 0
| 0.166008
| 1
| 0.067194
| false
| 0
| 0.235178
| 0
| 0.326087
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 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
| 5
|
9d37e03b12fb70db62404be727e0b64da594f4aa
| 153
|
py
|
Python
|
python/8kyu/even_or_odd.py
|
Sigmanificient/codewars
|
b34df4bf55460d312b7ddf121b46a707b549387a
|
[
"MIT"
] | 3
|
2021-06-08T01:57:13.000Z
|
2021-06-26T10:52:47.000Z
|
python/8kyu/even_or_odd.py
|
Sigmanificient/codewars
|
b34df4bf55460d312b7ddf121b46a707b549387a
|
[
"MIT"
] | null | null | null |
python/8kyu/even_or_odd.py
|
Sigmanificient/codewars
|
b34df4bf55460d312b7ddf121b46a707b549387a
|
[
"MIT"
] | 2
|
2021-06-10T21:20:13.000Z
|
2021-06-30T10:13:26.000Z
|
"""Kata url: https://www.codewars.com/kata/53da3dbb4a5168369a0000fe."""
def even_or_odd(number: int) -> str:
return 'Odd' if number % 2 else 'Even'
| 30.6
| 71
| 0.69281
| 22
| 153
| 4.727273
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 0.137255
| 153
| 4
| 72
| 38.25
| 0.666667
| 0.424837
| 0
| 0
| 0
| 0
| 0.085366
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
9d54697caa66128a4ef6505ead9e709c280aeca0
| 95
|
py
|
Python
|
src/grittk/loader.py
|
btongminh/grittk
|
149ac3ede87d2422d781d314fd3390ee8e2ce052
|
[
"MIT"
] | null | null | null |
src/grittk/loader.py
|
btongminh/grittk
|
149ac3ede87d2422d781d314fd3390ee8e2ce052
|
[
"MIT"
] | null | null | null |
src/grittk/loader.py
|
btongminh/grittk
|
149ac3ede87d2422d781d314fd3390ee8e2ce052
|
[
"MIT"
] | null | null | null |
try:
from yaml import safe_load as load
except ImportError:
from json import load
| 15.833333
| 38
| 0.705263
| 14
| 95
| 4.714286
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.273684
| 95
| 5
| 39
| 19
| 0.956522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9d5cbb63158e07beb468f2637bdf471532269d71
| 41
|
py
|
Python
|
sutil/__init__.py
|
damoyskeene/sutil
|
6c33a4766c27f3674927fd4b07e410da5667a706
|
[
"MIT"
] | null | null | null |
sutil/__init__.py
|
damoyskeene/sutil
|
6c33a4766c27f3674927fd4b07e410da5667a706
|
[
"MIT"
] | null | null | null |
sutil/__init__.py
|
damoyskeene/sutil
|
6c33a4766c27f3674927fd4b07e410da5667a706
|
[
"MIT"
] | null | null | null |
from quikl import *
from sman import *
| 13.666667
| 20
| 0.707317
| 6
| 41
| 4.833333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.243902
| 41
| 2
| 21
| 20.5
| 0.935484
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
c22c0c58d8f2039e865c7d687b45299997ea9f88
| 121
|
py
|
Python
|
src/code/__init__.py
|
TerboucheHacene/StyleGAN-pytorch-lightining
|
cd32dea331b8268c717657c0fa747eced8f0ac3f
|
[
"MIT"
] | null | null | null |
src/code/__init__.py
|
TerboucheHacene/StyleGAN-pytorch-lightining
|
cd32dea331b8268c717657c0fa747eced8f0ac3f
|
[
"MIT"
] | null | null | null |
src/code/__init__.py
|
TerboucheHacene/StyleGAN-pytorch-lightining
|
cd32dea331b8268c717657c0fa747eced8f0ac3f
|
[
"MIT"
] | null | null | null |
from .models import Discriminator, Generator
from .custom_callbacks import UpdateBatchSizeDataLoader, UpdateMixingDepth
| 30.25
| 74
| 0.876033
| 11
| 121
| 9.545455
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 121
| 3
| 75
| 40.333333
| 0.954545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
dffe722100e609173a13a101b29352e03bd68268
| 147
|
py
|
Python
|
__init__.py
|
francisA88/GraML
|
f9d60065ddddf9ad14e146417e6643348ccfb8ba
|
[
"MIT"
] | 3
|
2020-02-29T16:58:03.000Z
|
2020-06-18T17:23:35.000Z
|
__init__.py
|
francisA88/GraML
|
f9d60065ddddf9ad14e146417e6643348ccfb8ba
|
[
"MIT"
] | null | null | null |
__init__.py
|
francisA88/GraML
|
f9d60065ddddf9ad14e146417e6643348ccfb8ba
|
[
"MIT"
] | 1
|
2021-05-25T03:54:08.000Z
|
2021-05-25T03:54:08.000Z
|
'''Make sure Kivy is installed before usage'''
try: import kivy
except ImportError:
raise ImportError("Kivy is needed to use GraML")
exit()
| 29.4
| 52
| 0.721088
| 21
| 147
| 5.047619
| 0.809524
| 0.113208
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.183673
| 147
| 5
| 53
| 29.4
| 0.883333
| 0.272109
| 0
| 0
| 0
| 0
| 0.264706
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5f07354c5ff967792c7b46898ff3f97a7e799e52
| 54
|
py
|
Python
|
pytorch_extra_mhirano/__init__.py
|
masanorihirano/pytorch_extra_mhirano
|
d19e07445567c069793b7ca1a22a846d7cbce58d
|
[
"MIT"
] | 1
|
2022-02-26T10:37:56.000Z
|
2022-02-26T10:37:56.000Z
|
pytorch_extra_mhirano/__init__.py
|
masanorihirano/pytorch_extra_mhirano
|
d19e07445567c069793b7ca1a22a846d7cbce58d
|
[
"MIT"
] | 9
|
2022-02-25T06:46:26.000Z
|
2022-03-04T17:23:09.000Z
|
pytorch_extra_mhirano/__init__.py
|
masanorihirano/pytorch_extra_mhirano
|
d19e07445567c069793b7ca1a22a846d7cbce58d
|
[
"MIT"
] | null | null | null |
from pytorch_extra_mhirano.version import __version__
| 27
| 53
| 0.907407
| 7
| 54
| 6.142857
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 54
| 1
| 54
| 54
| 0.86
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
5f1df9afae41a779b48ef3abc3805102e048fff3
| 40
|
py
|
Python
|
testsuite/invalid.py
|
adamchainz/flake8-coding
|
535c20ce0fccd62fc8fae628718749953675286c
|
[
"Apache-2.0"
] | 15
|
2015-05-29T08:01:23.000Z
|
2021-10-13T08:48:18.000Z
|
testsuite/invalid.py
|
adamchainz/flake8-coding
|
535c20ce0fccd62fc8fae628718749953675286c
|
[
"Apache-2.0"
] | 18
|
2015-05-29T13:46:20.000Z
|
2019-06-16T13:10:25.000Z
|
testsuite/invalid.py
|
adamchainz/flake8-coding
|
535c20ce0fccd62fc8fae628718749953675286c
|
[
"Apache-2.0"
] | 11
|
2015-05-29T08:01:27.000Z
|
2021-04-06T15:10:19.000Z
|
#!/usr/bin/python
# -*- coding: utf -*-
| 13.333333
| 21
| 0.525
| 5
| 40
| 4.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 40
| 2
| 22
| 20
| 0.617647
| 0.9
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5f2d605c16abf2a7b676f69dcc100edb6a2ecbfd
| 43
|
py
|
Python
|
main.py
|
acodeninja/packaging-a-python-file
|
632d904c7a8924d71ed8d57e3348d1475589d87c
|
[
"MIT"
] | null | null | null |
main.py
|
acodeninja/packaging-a-python-file
|
632d904c7a8924d71ed8d57e3348d1475589d87c
|
[
"MIT"
] | null | null | null |
main.py
|
acodeninja/packaging-a-python-file
|
632d904c7a8924d71ed8d57e3348d1475589d87c
|
[
"MIT"
] | null | null | null |
from game import pacman
pacman.run_game()
| 10.75
| 23
| 0.790698
| 7
| 43
| 4.714286
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.139535
| 43
| 3
| 24
| 14.333333
| 0.891892
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a028e3b17bc871101e41ca73698dda6b748a745a
| 94
|
py
|
Python
|
reverse_dict/utils.py
|
raul23/python_reverse_dict
|
17fdadc13f2a75f99b8be5bcf36e60227ee89c65
|
[
"MIT"
] | 2
|
2018-09-10T05:37:34.000Z
|
2019-07-10T14:19:10.000Z
|
reverse_dict/utils.py
|
raul23/python_reverse_dict
|
17fdadc13f2a75f99b8be5bcf36e60227ee89c65
|
[
"MIT"
] | null | null | null |
reverse_dict/utils.py
|
raul23/python_reverse_dict
|
17fdadc13f2a75f99b8be5bcf36e60227ee89c65
|
[
"MIT"
] | 1
|
2020-03-22T12:33:42.000Z
|
2020-03-22T12:33:42.000Z
|
def get_args_from_namespace(namespace):
return str(namespace).split('Namespace(')[1][:-1]
| 31.333333
| 53
| 0.734043
| 13
| 94
| 5.076923
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023256
| 0.085106
| 94
| 2
| 54
| 47
| 0.744186
| 0
| 0
| 0
| 0
| 0
| 0.106383
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
a05d9e0cdb87e68577fc6c7f41c64ee4f1ff1b9f
| 60
|
py
|
Python
|
models/__init__.py
|
phrb/haq-autotuning-experiments
|
4c993abe166865685841d2ad22b3f4400d929f02
|
[
"Apache-2.0"
] | 1
|
2020-07-02T16:16:51.000Z
|
2020-07-02T16:16:51.000Z
|
models/__init__.py
|
pawopawo/haq-release
|
a7aacd021180b93098f1ffde44f296025a8f29d2
|
[
"Apache-2.0"
] | null | null | null |
models/__init__.py
|
pawopawo/haq-release
|
a7aacd021180b93098f1ffde44f296025a8f29d2
|
[
"Apache-2.0"
] | null | null | null |
# import customized models here
from .mobilenetv3 import *
| 15
| 31
| 0.783333
| 7
| 60
| 6.714286
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02
| 0.166667
| 60
| 3
| 32
| 20
| 0.92
| 0.483333
| 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
| 1
| 0
|
0
| 5
|
a066e4838f7e9e4bf463479532455982f2a9a319
| 21
|
py
|
Python
|
FitLib/__init__.py
|
skelton-group/FitLib
|
84481cbcdae2bf0575e162717866b4035187d57a
|
[
"MIT"
] | null | null | null |
FitLib/__init__.py
|
skelton-group/FitLib
|
84481cbcdae2bf0575e162717866b4035187d57a
|
[
"MIT"
] | null | null | null |
FitLib/__init__.py
|
skelton-group/FitLib
|
84481cbcdae2bf0575e162717866b4035187d57a
|
[
"MIT"
] | null | null | null |
# FitLib/__init__.py
| 10.5
| 20
| 0.761905
| 3
| 21
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 21
| 1
| 21
| 21
| 0.631579
| 0.857143
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a0b30f354928a5f798243a178e0ae4fee2edade9
| 123
|
py
|
Python
|
redjit/core/admin.py
|
victormelo/redjit
|
64f7bb2e52c9d8245287adaacfc7e9ebcc463eec
|
[
"MIT"
] | null | null | null |
redjit/core/admin.py
|
victormelo/redjit
|
64f7bb2e52c9d8245287adaacfc7e9ebcc463eec
|
[
"MIT"
] | null | null | null |
redjit/core/admin.py
|
victormelo/redjit
|
64f7bb2e52c9d8245287adaacfc7e9ebcc463eec
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Link, Comment
admin.site.register(Link)
admin.site.register(Comment)
| 20.5
| 33
| 0.813008
| 18
| 123
| 5.555556
| 0.555556
| 0.18
| 0.34
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097561
| 123
| 5
| 34
| 24.6
| 0.900901
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
267e1a0652f21300d0c8888e738f2a3acd2e8a90
| 574
|
py
|
Python
|
project/Tests/test_news_data_handling.py
|
Jessie-McColm/Covid-Data-Dashboard
|
eda55a266d05a645c832b0cb792e17f34394220a
|
[
"MIT"
] | null | null | null |
project/Tests/test_news_data_handling.py
|
Jessie-McColm/Covid-Data-Dashboard
|
eda55a266d05a645c832b0cb792e17f34394220a
|
[
"MIT"
] | null | null | null |
project/Tests/test_news_data_handling.py
|
Jessie-McColm/Covid-Data-Dashboard
|
eda55a266d05a645c832b0cb792e17f34394220a
|
[
"MIT"
] | null | null | null |
from covid_news_handling import news_API_request
from covid_news_handling import update_news
from covid_news_handling import remove_news_article
from covid_news_handling import repeat_scheduled_news_update
def test_news_API_request():
assert news_API_request()
assert news_API_request('Covid COVID-19 coronavirus') == news_API_request()
def test_update_news():
update_news('test')
def test_remove_news_article():
remove_news_article("test title 123")
def test_repeat_scheduled_news_update():
repeat_scheduled_news_update(10,"test title",update_news)
| 31.888889
| 79
| 0.827526
| 85
| 574
| 5.105882
| 0.235294
| 0.080645
| 0.16129
| 0.193548
| 0.373272
| 0.124424
| 0.124424
| 0
| 0
| 0
| 0
| 0.013672
| 0.108014
| 574
| 17
| 80
| 33.764706
| 0.833984
| 0
| 0
| 0
| 0
| 0
| 0.094077
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 1
| 0.307692
| true
| 0
| 0.307692
| 0
| 0.615385
| 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
| 1
| 0
| 1
| 0
|
0
| 5
|
13ffe7d44c21eaa793afb670db85d7af55756211
| 171
|
py
|
Python
|
src/cr/vision/io/__init__.py
|
indigits/indigits-vision
|
317fbf70c558e8f9563c3d0ba3bebbc5f84af622
|
[
"Apache-2.0"
] | 2
|
2021-11-02T10:09:47.000Z
|
2021-12-10T04:23:14.000Z
|
src/cr/vision/io/__init__.py
|
indigits/indigits-vision
|
317fbf70c558e8f9563c3d0ba3bebbc5f84af622
|
[
"Apache-2.0"
] | null | null | null |
src/cr/vision/io/__init__.py
|
indigits/indigits-vision
|
317fbf70c558e8f9563c3d0ba3bebbc5f84af622
|
[
"Apache-2.0"
] | null | null | null |
'''
IO package
'''
# pylint: disable=W0401
from .interfaces import *
from .videocapture import *
from .display import *
from .videowriter import *
from .images import *
| 17.1
| 28
| 0.719298
| 20
| 171
| 6.15
| 0.6
| 0.325203
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028169
| 0.169591
| 171
| 9
| 29
| 19
| 0.838028
| 0.192982
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
cd06f5ea13ff5e37b5a89609663a5e49b767321f
| 109
|
py
|
Python
|
minidump/streams/ProcessVmCountersStream.py
|
mrexodia/minidump
|
4945b1011ac202c58003b0198820bc8521eb5af5
|
[
"MIT"
] | 215
|
2021-11-20T22:39:33.000Z
|
2022-03-26T01:33:36.000Z
|
minidump/streams/ProcessVmCountersStream.py
|
mrexodia/minidump
|
4945b1011ac202c58003b0198820bc8521eb5af5
|
[
"MIT"
] | 24
|
2019-04-15T17:50:15.000Z
|
2022-03-30T11:50:26.000Z
|
minidump/streams/ProcessVmCountersStream.py
|
mrexodia/minidump
|
4945b1011ac202c58003b0198820bc8521eb5af5
|
[
"MIT"
] | 36
|
2018-05-26T21:10:52.000Z
|
2021-11-20T14:26:58.000Z
|
#!/usr/bin/env python3
#
# Author:
# Tamas Jos (@skelsec)
#
# TODO: MSD article is missing on this stream :(
| 18.166667
| 48
| 0.66055
| 16
| 109
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011236
| 0.183486
| 109
| 6
| 48
| 18.166667
| 0.797753
| 0.899083
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0.166667
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
cd0fd5b6e30a1b3be20ee0c1ac1771e10de2241b
| 110
|
py
|
Python
|
tfne/visualizer/codeepneat/__init__.py
|
githealthy18/Tensorflow-Neuroevolution
|
15f6e906e8000c64f5c9a60907f53fe835f0b28c
|
[
"Apache-2.0"
] | 121
|
2019-06-27T17:30:52.000Z
|
2022-03-24T07:32:42.000Z
|
tfne/visualizer/codeepneat/__init__.py
|
githealthy18/Tensorflow-Neuroevolution
|
15f6e906e8000c64f5c9a60907f53fe835f0b28c
|
[
"Apache-2.0"
] | 10
|
2021-01-03T19:52:13.000Z
|
2022-02-10T00:15:26.000Z
|
tfne/visualizer/codeepneat/__init__.py
|
githealthy18/Tensorflow-Neuroevolution
|
15f6e906e8000c64f5c9a60907f53fe835f0b28c
|
[
"Apache-2.0"
] | 31
|
2019-07-31T10:45:53.000Z
|
2022-03-21T08:31:09.000Z
|
# Import modules
from tfne.visualizer.codeepneat.tfnev_codeepneat_mainwindow import TFNEVCoDeepNEATMainWindow
| 36.666667
| 92
| 0.9
| 11
| 110
| 8.818182
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.063636
| 110
| 2
| 93
| 55
| 0.941748
| 0.127273
| 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
| 1
| 0
|
0
| 5
|
cd3b361f59b0cd483196a2ee45263f8862a8222a
| 197
|
py
|
Python
|
invoice/admin.py
|
surajraju20/fuzzy1
|
596d39facc657fca49e6630b8149ce3662534a9a
|
[
"MIT"
] | null | null | null |
invoice/admin.py
|
surajraju20/fuzzy1
|
596d39facc657fca49e6630b8149ce3662534a9a
|
[
"MIT"
] | null | null | null |
invoice/admin.py
|
surajraju20/fuzzy1
|
596d39facc657fca49e6630b8149ce3662534a9a
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import College, Trainer, hr_users
# Register your models here.
admin.site.register(College)
admin.site.register(Trainer)
admin.site.register(hr_users)
| 28.142857
| 46
| 0.817259
| 29
| 197
| 5.482759
| 0.482759
| 0.169811
| 0.320755
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091371
| 197
| 7
| 47
| 28.142857
| 0.888268
| 0.13198
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 1
| 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
| 5
|
cd711f6abcf35525b90de78221f9f6ac2748d074
| 358
|
py
|
Python
|
freedm/data/__init__.py
|
DerekRoy/free.dm-Common
|
83ba7521e0df1c10076c1ffe4427ef22ac23f5f0
|
[
"MIT"
] | 1
|
2017-05-23T21:36:31.000Z
|
2017-05-23T21:36:31.000Z
|
freedm/data/__init__.py
|
DerekRoy/free.dm-Common
|
83ba7521e0df1c10076c1ffe4427ef22ac23f5f0
|
[
"MIT"
] | 13
|
2017-11-04T15:54:39.000Z
|
2019-02-11T12:01:29.000Z
|
freedm/data/__init__.py
|
wandth/free.dm-Common
|
c3b7353e9211f0c99c4b761ef891f0cb53a7d18b
|
[
"MIT"
] | null | null | null |
'''
This module provides classes related to data management
@author: Thomas Wanderer
'''
# free.dm Imports
from freedm.data.manager import DataManager
from freedm.data.store import DataStore
from freedm.data.object import DataObject
from freedm.data.inifile import IniFileStore
from freedm.data.memory import MemoryStore
from freedm.data.sql import SQLStore
| 29.833333
| 55
| 0.826816
| 50
| 358
| 5.92
| 0.58
| 0.202703
| 0.283784
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111732
| 358
| 12
| 56
| 29.833333
| 0.930818
| 0.27095
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 5
|
269bfde945026d8acc4be13384b39d20a659ecc7
| 196
|
py
|
Python
|
pytask/models.py
|
thomsbe/PyTask
|
cc16ce4904fdec79c9ae6f065e9919b3e36f2577
|
[
"Apache-2.0"
] | null | null | null |
pytask/models.py
|
thomsbe/PyTask
|
cc16ce4904fdec79c9ae6f065e9919b3e36f2577
|
[
"Apache-2.0"
] | null | null | null |
pytask/models.py
|
thomsbe/PyTask
|
cc16ce4904fdec79c9ae6f065e9919b3e36f2577
|
[
"Apache-2.0"
] | null | null | null |
from django.db import models
class ToDoModel(models.Model):
name = models.CharField(max_length=50)
description = models.CharField(max_length=200)
duedate = models.DateTimeField()
| 32.666667
| 51
| 0.739796
| 24
| 196
| 5.958333
| 0.708333
| 0.20979
| 0.251748
| 0.335664
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030488
| 0.163265
| 196
| 6
| 52
| 32.666667
| 0.841463
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
26cb8dab58e1dca74c547f8688562dca7eced4c1
| 78
|
py
|
Python
|
klearn/datasets/__init__.py
|
KevinLiao159/klearn
|
ffc0cb6b69cd21f2aac8934af55ac6e32c4db689
|
[
"MIT"
] | 1
|
2019-05-03T08:20:57.000Z
|
2019-05-03T08:20:57.000Z
|
klearn/datasets/__init__.py
|
KevinLiao159/klearn
|
ffc0cb6b69cd21f2aac8934af55ac6e32c4db689
|
[
"MIT"
] | null | null | null |
klearn/datasets/__init__.py
|
KevinLiao159/klearn
|
ffc0cb6b69cd21f2aac8934af55ac6e32c4db689
|
[
"MIT"
] | null | null | null |
from .libffm_format import dump_libffm_file
__all__ = ('dump_libffm_file',)
| 15.6
| 43
| 0.794872
| 11
| 78
| 4.818182
| 0.636364
| 0.377358
| 0.528302
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 78
| 4
| 44
| 19.5
| 0.768116
| 0
| 0
| 0
| 0
| 0
| 0.205128
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
26f7b663837c891651e19d536e54ed5c4e12affa
| 234
|
py
|
Python
|
src/tolkein/__init__.py
|
tolkit/tolkein
|
66aef26f1e57259378f99b3846944c39fdb2cd14
|
[
"MIT"
] | 2
|
2020-07-09T16:23:05.000Z
|
2021-02-26T10:17:15.000Z
|
src/tolkein/__init__.py
|
tolkit/tolkein
|
66aef26f1e57259378f99b3846944c39fdb2cd14
|
[
"MIT"
] | 6
|
2020-08-03T13:13:50.000Z
|
2021-02-22T15:15:10.000Z
|
src/tolkein/__init__.py
|
tolkit/tolkein
|
66aef26f1e57259378f99b3846944c39fdb2cd14
|
[
"MIT"
] | null | null | null |
"""Evolutionary informatics package."""
from .lib import tobin
from .lib import tofetch
from .lib import tofile
from .lib import toinsdc
from .lib import tolog
from .lib import totax
from .lib import version
from .tolkein import cli
| 21.272727
| 39
| 0.782051
| 35
| 234
| 5.228571
| 0.428571
| 0.26776
| 0.497268
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 234
| 10
| 40
| 23.4
| 0.924242
| 0.141026
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 5
|
f814ff46c5065bc64bb38c3d9388391235b06127
| 435
|
py
|
Python
|
PicoCTF/2018/Reversing/be-quick-or-be-dead-2_complete/solve.py
|
bernardosequeir/CTFfiles
|
36a6ceba49d9a9019056d3669c5e8f84aa83b618
|
[
"MIT"
] | null | null | null |
PicoCTF/2018/Reversing/be-quick-or-be-dead-2_complete/solve.py
|
bernardosequeir/CTFfiles
|
36a6ceba49d9a9019056d3669c5e8f84aa83b618
|
[
"MIT"
] | 5
|
2020-09-23T18:28:25.000Z
|
2020-09-23T18:28:41.000Z
|
PicoCTF/2018/Reversing/be-quick-or-be-dead-2_complete/solve.py
|
bernardosequeir/CTFSolutions
|
503944617cb18826d12ab98fa33fd761e791328a
|
[
"MIT"
] | null | null | null |
from pwn import *
elf = ELF('./be-quick-or-be-dead-2')
number=9641162182178966878126331027202834784434723577592322830700454745652427494401346945631082965963962317692358822696127040961581675695438118874508418491101822679355067810556808551572644321954159676320600161466564032755133080685122
elf.asm(elf.symbols['alarm'],'ret')
elf.asm(elf.symbols['calculate_key'], 'mov eax,%s\nret\n' % (hex(number & 0xFFFFFFFF)))
elf.save("./patched")
| 62.142857
| 233
| 0.83908
| 36
| 435
| 10.111111
| 0.722222
| 0.032967
| 0.049451
| 0.087912
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.545455
| 0.03908
| 435
| 7
| 234
| 62.142857
| 0.325359
| 0
| 0
| 0
| 0
| 0
| 0.16055
| 0.052752
| 0
| 1
| 0.022936
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 0.166667
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f8212f24c1ef4584e42c7119c0339b4ea4d02fad
| 166
|
py
|
Python
|
py_grpc_profile/adapter/__init__.py
|
fossabot/py-grpc-profile
|
c68540891efb06b3bb8d6beb54238bd9e03c40c8
|
[
"Apache-2.0"
] | null | null | null |
py_grpc_profile/adapter/__init__.py
|
fossabot/py-grpc-profile
|
c68540891efb06b3bb8d6beb54238bd9e03c40c8
|
[
"Apache-2.0"
] | 2
|
2021-03-23T23:49:14.000Z
|
2022-02-11T03:38:44.000Z
|
py_grpc_profile/adapter/__init__.py
|
fossabot/py-grpc-profile
|
c68540891efb06b3bb8d6beb54238bd9e03c40c8
|
[
"Apache-2.0"
] | 1
|
2021-03-23T23:47:17.000Z
|
2021-03-23T23:47:17.000Z
|
from py_grpc_profile.adapter.cprofile_adapter import CProfileAdapter
from py_grpc_profile.adapter.interfaces import Adapter
__all__ = ["Adapter", "CProfileAdapter"]
| 33.2
| 68
| 0.849398
| 20
| 166
| 6.6
| 0.5
| 0.090909
| 0.151515
| 0.257576
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078313
| 166
| 4
| 69
| 41.5
| 0.862745
| 0
| 0
| 0
| 0
| 0
| 0.13253
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f835d878464f4cee8b5e4c397d05296bc3fff938
| 298
|
py
|
Python
|
datashift/__init__.py
|
kubzdel/datashift
|
d87e5a882a04c8ada092d2ed0a8b56acf3da5de8
|
[
"MIT"
] | null | null | null |
datashift/__init__.py
|
kubzdel/datashift
|
d87e5a882a04c8ada092d2ed0a8b56acf3da5de8
|
[
"MIT"
] | null | null | null |
datashift/__init__.py
|
kubzdel/datashift
|
d87e5a882a04c8ada092d2ed0a8b56acf3da5de8
|
[
"MIT"
] | null | null | null |
from .task import AbstractProcessingTask, AbstractBalancingTask, AbstractFilterTask, AbstractReduceTask, NotNoneFilterTask
from .datapipeline import DataPipeline,AbstractFileReader,AbstractFileSaver,DefaultCSVReader,DefaultCSVSaver,DefaultTextLineReader,DefaultTextLineSaver
__version__ = "0.1.0"
| 59.6
| 151
| 0.889262
| 22
| 298
| 11.863636
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010638
| 0.053691
| 298
| 4
| 152
| 74.5
| 0.914894
| 0
| 0
| 0
| 0
| 0
| 0.016779
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f855de133a6464aa854d49ecc5347445fe3c9b4f
| 177
|
tac
|
Python
|
fmi-avi-xmlmodel-iwxxm30/src/main/resources/int/icao/iwxxm/3.0.0/examples/taf-A5-1.tac
|
spatineo/fmi-avi-xmlmodel
|
92a87b3d65b1e1a4ec9b7226238785de01a744db
|
[
"MIT"
] | null | null | null |
fmi-avi-xmlmodel-iwxxm30/src/main/resources/int/icao/iwxxm/3.0.0/examples/taf-A5-1.tac
|
spatineo/fmi-avi-xmlmodel
|
92a87b3d65b1e1a4ec9b7226238785de01a744db
|
[
"MIT"
] | 1
|
2019-03-12T11:26:03.000Z
|
2019-03-25T11:00:14.000Z
|
fmi-avi-xmlmodel-iwxxm30/src/main/resources/int/icao/iwxxm/3.0.0/examples/taf-A5-1.tac
|
spatineo/fmi-avi-xmlmodel
|
92a87b3d65b1e1a4ec9b7226238785de01a744db
|
[
"MIT"
] | 1
|
2020-02-26T07:19:02.000Z
|
2020-02-26T07:19:02.000Z
|
TAF YUDO 151800Z 1600/1618 13005MPS 9000 BKN020 BECMG 1606/1608 SCT015CB BKN020
TEMPO 1608/1612 17006G12MPS 1000 TSRA SCT010CB BKN020 FM161230 15004MPS 9999 BKN020
| 59
| 90
| 0.785311
| 25
| 177
| 5.56
| 0.84
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.584507
| 0.19774
| 177
| 2
| 91
| 88.5
| 0.394366
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f8661f47c1c2774db23d1d74b9e344459248fefc
| 106
|
py
|
Python
|
cogs/preferences/__init__.py
|
IanDesuyo/AIKyaru
|
0a631c77a821975db325452e244c310c05f83e09
|
[
"MIT"
] | 11
|
2021-07-16T19:24:55.000Z
|
2022-03-18T07:29:49.000Z
|
cogs/preferences/__init__.py
|
IanDesuyo/AIKyaru
|
0a631c77a821975db325452e244c310c05f83e09
|
[
"MIT"
] | null | null | null |
cogs/preferences/__init__.py
|
IanDesuyo/AIKyaru
|
0a631c77a821975db325452e244c310c05f83e09
|
[
"MIT"
] | 2
|
2021-12-31T17:36:25.000Z
|
2022-02-13T05:30:35.000Z
|
from cogs.preferences.user import UserPreferences
def setup(bot):
bot.add_cog(UserPreferences(bot))
| 17.666667
| 49
| 0.783019
| 14
| 106
| 5.857143
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122642
| 106
| 5
| 50
| 21.2
| 0.88172
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f8af1f20d34086fe5036e245a9b0cc43152bc4fc
| 384
|
py
|
Python
|
ugali/isochrone/__init__.py
|
mcnanna/ugali
|
2572915b82af5b25e8762013e6d5baabdaa24b21
|
[
"MIT"
] | 12
|
2016-10-26T20:45:33.000Z
|
2021-11-24T04:07:43.000Z
|
ugali/isochrone/__init__.py
|
mcnanna/ugali
|
2572915b82af5b25e8762013e6d5baabdaa24b21
|
[
"MIT"
] | 64
|
2017-04-14T15:04:24.000Z
|
2022-02-03T19:42:57.000Z
|
ugali/isochrone/__init__.py
|
kadrlica/ugali
|
dcf53594658a2b577f4da271783b43ed0a79fec9
|
[
"MIT"
] | 12
|
2016-06-23T21:42:46.000Z
|
2021-06-19T05:29:49.000Z
|
#!/usr/bin/env python
"""
Module for dealing with Isochrones.
"""
from ugali.isochrone.model import get_iso_dir
from ugali.isochrone.composite import factory
from ugali.isochrone.composite import CompositeIsochrone, Padova, Dotter
from ugali.isochrone.parsec import Bressan2012, Marigo2017
from ugali.isochrone.dartmouth import Dotter2008
from ugali.isochrone.mesa import Dotter2016
| 32
| 72
| 0.833333
| 50
| 384
| 6.36
| 0.58
| 0.169811
| 0.339623
| 0.169811
| 0.207547
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04611
| 0.096354
| 384
| 11
| 73
| 34.909091
| 0.870317
| 0.145833
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
|
0
| 5
|
3e19a50512acb68c0d9b93a4bf0ccdd5b840ffd1
| 229
|
py
|
Python
|
eznlp/model/model/__init__.py
|
syuoni/eznlp
|
c0380c6c30d68b4df1769150424735c04ea9d714
|
[
"Apache-2.0"
] | 9
|
2021-08-06T07:12:55.000Z
|
2022-03-26T08:20:59.000Z
|
eznlp/model/model/__init__.py
|
Hhx1999/eznlp
|
9d1397d8e9630c099295712cbcffa495353a3268
|
[
"Apache-2.0"
] | 1
|
2022-03-11T13:27:29.000Z
|
2022-03-16T11:52:14.000Z
|
eznlp/model/model/__init__.py
|
Hhx1999/eznlp
|
9d1397d8e9630c099295712cbcffa495353a3268
|
[
"Apache-2.0"
] | 3
|
2021-11-15T03:24:24.000Z
|
2022-03-09T09:36:05.000Z
|
# -*- coding: utf-8 -*-
from .base import ModelConfigBase, ModelBase
from .classifier import ClassifierConfig
from .extractor import ExtractorConfig
from .text2text import Text2TextConfig
from .image2text import Image2TextConfig
| 32.714286
| 44
| 0.820961
| 24
| 229
| 7.833333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.024631
| 0.113537
| 229
| 6
| 45
| 38.166667
| 0.901478
| 0.091703
| 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
| 1
| 0
|
0
| 5
|
e460dbc8746350b0ec779b98f6d17a5c5f555f06
| 211
|
py
|
Python
|
_/0349_06_Code/25.py
|
paullewallencom/javascript-978-1-8495-1034-9
|
7e539d042c644931a9ef2418f66d260a1c6892eb
|
[
"Apache-2.0"
] | null | null | null |
_/0349_06_Code/25.py
|
paullewallencom/javascript-978-1-8495-1034-9
|
7e539d042c644931a9ef2418f66d260a1c6892eb
|
[
"Apache-2.0"
] | null | null | null |
_/0349_06_Code/25.py
|
paullewallencom/javascript-978-1-8495-1034-9
|
7e539d042c644931a9ef2418f66d260a1c6892eb
|
[
"Apache-2.0"
] | null | null | null |
else:
match = re.match(ur'^(.*?)_(.*)_(\d+)$', html_id)
model = match.group(1)[0].upper() + match.group(1)[1:].lower()
field = match.group(2).lower()
id = int(match.group(3))
| 35.166667
| 70
| 0.492891
| 29
| 211
| 3.482759
| 0.586207
| 0.39604
| 0.217822
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037736
| 0.246446
| 211
| 5
| 71
| 42.2
| 0.597484
| 0
| 0
| 0
| 0
| 0
| 0.085308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e4da47ba9302fd99753e57a057eb79360a768e24
| 4,125
|
py
|
Python
|
python/astra/contrib/classifier/networks.py
|
sdss/astra
|
ef78c46a579ed0238a4486bcbb1595a22a7f2700
|
[
"BSD-3-Clause"
] | 5
|
2019-08-15T23:05:17.000Z
|
2022-03-14T19:26:07.000Z
|
python/astra/contrib/classifier/networks.py
|
sdss/astra
|
ef78c46a579ed0238a4486bcbb1595a22a7f2700
|
[
"BSD-3-Clause"
] | 2
|
2019-04-22T17:12:50.000Z
|
2020-10-30T05:05:26.000Z
|
python/astra/contrib/classifier/networks.py
|
sdss/astra
|
ef78c46a579ed0238a4486bcbb1595a22a7f2700
|
[
"BSD-3-Clause"
] | null | null | null |
from time import time
import numpy as np
import torch
import torch.nn.functional as F
from tqdm import tqdm
from torch import nn
from torch.autograd import Variable
class OpticalCNN(nn.Module):
class_names = ["cv", "fgkm", "hotstar", "wd", "sb2", "yso"]
def __init__(self, in_channels=1, nb_channels=3, nb_classes=None):
super(OpticalCNN, self).__init__()
self.nb_channels = nb_channels
nb_classes = nb_classes or len(self.class_names)
self.model = nn.Sequential(
nn.Conv1d(in_channels=in_channels, out_channels=nb_channels, kernel_size=3, stride=2),
nn.BatchNorm1d(nb_channels),
nn.ReLU(),
nn.Dropout(0.1),
nn.Conv1d(in_channels=nb_channels, out_channels=nb_channels, kernel_size=3, stride=2),
nn.BatchNorm1d(nb_channels),
nn.ReLU(),
nn.Dropout(0.1), # 1024 950
nn.Conv1d(in_channels=nb_channels, out_channels=nb_channels*2, kernel_size=3, stride=2),
nn.BatchNorm1d(nb_channels*2),
nn.ReLU(),
nn.Dropout(0.1), #512 475
nn.Conv1d(in_channels=nb_channels*2, out_channels=nb_channels*4, kernel_size=3, stride=2),
nn.BatchNorm1d(nb_channels*4),
nn.ReLU(),
nn.Dropout(0.1), #256 237?
nn.Conv1d(in_channels=nb_channels*4, out_channels=nb_channels*8, kernel_size=3, stride=2),
nn.BatchNorm1d(nb_channels*8),
nn.ReLU(),
nn.Dropout(0.1), #128 118?
nn.Conv1d(in_channels=nb_channels*8, out_channels=nb_channels*8, kernel_size=3, stride=2, padding=0),
nn.BatchNorm1d(nb_channels*8),
nn.ReLU(),
nn.Dropout(0.1) #64 58
)
self.fc1 = nn.Linear(nb_channels * 8 * 58, 58 * 4)
self.fc2 = nn.Linear(58*4, 58)
self.fc3 = nn.Linear(58, nb_classes)
def forward(self,x):
x = self.model(x)
x = x.view(-1, 58 * 8 * self.nb_channels)
x = F.relu(self.fc1(x))
x = F.relu(self.fc2(x))
x = self.fc3(x) ## Activation function
return x
class NIRCNN(nn.Module):
class_names = ["fgkm", "hotstar", "sb2", "yso"]
def __init__(self, nb_channels=3, nb_classes=4):
super(NIRCNN, self).__init__()
self.nb_channels = nb_channels
self.nb_classes = nb_classes
self.model = nn.Sequential(
nn.Conv1d(in_channels=nb_channels, out_channels=nb_channels, kernel_size=3, stride=2),
nn.BatchNorm1d(nb_channels),
nn.ReLU(),
nn.Dropout(0.1),
nn.Conv1d(in_channels=nb_channels, out_channels=nb_channels, kernel_size=3, stride=2),
nn.BatchNorm1d(nb_channels),
nn.ReLU(),
nn.Dropout(0.1), # 1024
nn.Conv1d(in_channels=nb_channels, out_channels=nb_channels*2, kernel_size=3, stride=2),
nn.BatchNorm1d(nb_channels*2),
nn.ReLU(),
nn.Dropout(0.1), #512
nn.Conv1d(in_channels=nb_channels*2, out_channels=nb_channels*4, kernel_size=3, stride=2),
nn.BatchNorm1d(nb_channels*4),
nn.ReLU(),
nn.Dropout(0.1), #256
nn.Conv1d(in_channels=nb_channels*4, out_channels=nb_channels*8, kernel_size=3, stride=2),
nn.BatchNorm1d(nb_channels*8),
nn.ReLU(),
nn.Dropout(0.1), #128
nn.Conv1d(in_channels=nb_channels*8, out_channels=nb_channels*8, kernel_size=3, stride=2, padding=1),
nn.BatchNorm1d(nb_channels*8),
nn.ReLU(),
nn.Dropout(0.1) #64
)
self.fc1 = nn.Linear(nb_channels * 8 * 64, 64 * 4)
self.fc2 = nn.Linear(64*4, 64)
self.fc3 = nn.Linear(64, nb_classes)
return None
def forward(self,x):
x = self.model(x)
x = x.view(-1, 64 * 8 * self.nb_channels)
x = F.relu(self.fc1(x))
x = F.relu(self.fc2(x))
x = self.fc3(x)
return x
| 36.184211
| 113
| 0.569939
| 575
| 4,125
| 3.897391
| 0.125217
| 0.200803
| 0.200803
| 0.096386
| 0.795181
| 0.74788
| 0.74788
| 0.696118
| 0.669344
| 0.669344
| 0
| 0.066574
| 0.300848
| 4,125
| 113
| 114
| 36.504425
| 0.710472
| 0.017455
| 0
| 0.663043
| 0
| 0
| 0.009408
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.043478
| false
| 0
| 0.076087
| 0
| 0.195652
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e4e05b1bab1ed52b4524ef1900bc45fc43194919
| 84
|
py
|
Python
|
gunicorn_config.py
|
lolosk/ceph
|
6b76d4b67ef70c92081bf4b1b7597f1db46cccc2
|
[
"BSD-2-Clause"
] | null | null | null |
gunicorn_config.py
|
lolosk/ceph
|
6b76d4b67ef70c92081bf4b1b7597f1db46cccc2
|
[
"BSD-2-Clause"
] | null | null | null |
gunicorn_config.py
|
lolosk/ceph
|
6b76d4b67ef70c92081bf4b1b7597f1db46cccc2
|
[
"BSD-2-Clause"
] | null | null | null |
def on_starting(server):
from subprocess import call
call(['start-ceph'])
| 14
| 31
| 0.678571
| 11
| 84
| 5.090909
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.202381
| 84
| 5
| 32
| 16.8
| 0.835821
| 0
| 0
| 0
| 0
| 0
| 0.121951
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5f4e2f266103bd507787cf1f34267adc864763bd
| 66
|
py
|
Python
|
skdesign/power/distributions/__init__.py
|
louden/scikit-design
|
c51259fd7de43d6bdb4bb49e71136321768c2acc
|
[
"BSD-3-Clause"
] | 2
|
2016-10-31T04:22:50.000Z
|
2019-08-19T10:58:24.000Z
|
skdesign/power/distributions/__init__.py
|
louden/scikit-design
|
c51259fd7de43d6bdb4bb49e71136321768c2acc
|
[
"BSD-3-Clause"
] | null | null | null |
skdesign/power/distributions/__init__.py
|
louden/scikit-design
|
c51259fd7de43d6bdb4bb49e71136321768c2acc
|
[
"BSD-3-Clause"
] | 2
|
2018-06-06T10:58:15.000Z
|
2020-08-10T10:57:49.000Z
|
from .normal import Normal
from .distribution import Distribution
| 22
| 38
| 0.848485
| 8
| 66
| 7
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 66
| 2
| 39
| 33
| 0.965517
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
5f82bb25103e27681ca321c73908d32b129d8bb2
| 138
|
py
|
Python
|
cs28_project/cs28/models/__init__.py
|
desuderata/cs28_project
|
d8e84e2ee30f36ce964370580730396b8c211315
|
[
"MIT"
] | null | null | null |
cs28_project/cs28/models/__init__.py
|
desuderata/cs28_project
|
d8e84e2ee30f36ce964370580730396b8c211315
|
[
"MIT"
] | null | null | null |
cs28_project/cs28/models/__init__.py
|
desuderata/cs28_project
|
d8e84e2ee30f36ce964370580730396b8c211315
|
[
"MIT"
] | 1
|
2021-04-29T15:40:57.000Z
|
2021-04-29T15:40:57.000Z
|
from .student import Student
from .grade import Grade
from .graduation_year import GraduationYear
from .academic_plan import AcademicPlan
| 27.6
| 43
| 0.855072
| 18
| 138
| 6.444444
| 0.555556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115942
| 138
| 4
| 44
| 34.5
| 0.95082
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
5f92ccfdabb95cea2dda34d28cf0bfbac82101bc
| 59
|
py
|
Python
|
sparray/__init__.py
|
perimosocordiae/sparray
|
723cd5ff70bf148963b35813cf4ced246f268ba1
|
[
"MIT"
] | 5
|
2016-01-06T01:28:03.000Z
|
2018-11-08T17:39:29.000Z
|
sparray/__init__.py
|
perimosocordiae/sparray
|
723cd5ff70bf148963b35813cf4ced246f268ba1
|
[
"MIT"
] | null | null | null |
sparray/__init__.py
|
perimosocordiae/sparray
|
723cd5ff70bf148963b35813cf4ced246f268ba1
|
[
"MIT"
] | null | null | null |
from .base import is_sparray
from .flat import FlatSparray
| 19.666667
| 29
| 0.830508
| 9
| 59
| 5.333333
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135593
| 59
| 2
| 30
| 29.5
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
5fa407dcae17b2257614e6f298c51653e181b127
| 324
|
py
|
Python
|
website/views.py
|
AminFranko/mycv
|
4391a0cb01e4036fdd743ad52b1bd2af4695de7e
|
[
"MIT"
] | null | null | null |
website/views.py
|
AminFranko/mycv
|
4391a0cb01e4036fdd743ad52b1bd2af4695de7e
|
[
"MIT"
] | null | null | null |
website/views.py
|
AminFranko/mycv
|
4391a0cb01e4036fdd743ad52b1bd2af4695de7e
|
[
"MIT"
] | null | null | null |
from django.shortcuts import render
from django.http import HttpResponse,JsonResponse
def index_view(request):
return render(request,'website/index.html')
# def about_view(request):
# return render(request,'website/about.html')
# def contact_view(request):
# return render(request,'website/contact.html')
| 20.25
| 51
| 0.753086
| 41
| 324
| 5.878049
| 0.414634
| 0.136929
| 0.211618
| 0.286307
| 0.460581
| 0.460581
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132716
| 324
| 15
| 52
| 21.6
| 0.857651
| 0.459877
| 0
| 0
| 0
| 0
| 0.107143
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.5
| 0.25
| 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
| 1
| 0
| 0
| 1
| 1
| 0
| 0
|
0
| 5
|
39672ba00a52eeb1c82792be3a452accf90579f8
| 23
|
py
|
Python
|
TSA/tests/__init__.py
|
Boyne272/Thin_Section_Analsis
|
91023267f96f709d62fa44d10ff5636d263e346c
|
[
"MIT"
] | 2
|
2020-01-15T09:02:04.000Z
|
2020-01-15T09:02:30.000Z
|
TSA/tests/__init__.py
|
msc-acse/acse-9-independent-research-project-Boyne272
|
b6f52a189dbb1cfb53325793966e32ee39155e9e
|
[
"MIT"
] | null | null | null |
TSA/tests/__init__.py
|
msc-acse/acse-9-independent-research-project-Boyne272
|
b6f52a189dbb1cfb53325793966e32ee39155e9e
|
[
"MIT"
] | 3
|
2019-08-27T12:44:14.000Z
|
2020-01-15T09:02:41.000Z
|
# TSA/tests/__init__.py
| 23
| 23
| 0.782609
| 4
| 23
| 3.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 23
| 1
| 23
| 23
| 0.636364
| 0.913043
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3975db2be16f276fa8fd4e30d264f54f33973332
| 50
|
py
|
Python
|
common/models/__init__.py
|
sharif-42/Style-Icon
|
26cd93cdd991588ce41f0032b033551f9f1a1bce
|
[
"MIT"
] | 1
|
2022-01-01T11:51:30.000Z
|
2022-01-01T11:51:30.000Z
|
common/models/__init__.py
|
sharif-42/Style-Icon
|
26cd93cdd991588ce41f0032b033551f9f1a1bce
|
[
"MIT"
] | null | null | null |
common/models/__init__.py
|
sharif-42/Style-Icon
|
26cd93cdd991588ce41f0032b033551f9f1a1bce
|
[
"MIT"
] | null | null | null |
from .base_model import LogBase, ProductBaseModel
| 25
| 49
| 0.86
| 6
| 50
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 50
| 1
| 50
| 50
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 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
| 5
|
3998d23915c4f8c5b22e60f3e1a04e984ed8c0fa
| 123
|
py
|
Python
|
pybin/admin.py
|
Mm2PL/pyhastebin
|
b3574567b0a60307e6299af547dfc881498011a1
|
[
"WTFPL",
"Unlicense"
] | null | null | null |
pybin/admin.py
|
Mm2PL/pyhastebin
|
b3574567b0a60307e6299af547dfc881498011a1
|
[
"WTFPL",
"Unlicense"
] | null | null | null |
pybin/admin.py
|
Mm2PL/pyhastebin
|
b3574567b0a60307e6299af547dfc881498011a1
|
[
"WTFPL",
"Unlicense"
] | null | null | null |
from django.contrib import admin
from pybin.models import Paste
# Register your models here.
admin.site.register(Paste)
| 15.375
| 32
| 0.796748
| 18
| 123
| 5.444444
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138211
| 123
| 7
| 33
| 17.571429
| 0.924528
| 0.211382
| 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
| 1
| 0
|
0
| 5
|
399f33484962525ca55422bfa25b9abeb0c5b16a
| 121
|
py
|
Python
|
run.py
|
lenileiro/flask_api
|
255c8735ad880611dc6f85200edad90507d450b8
|
[
"MIT"
] | 1
|
2019-01-24T21:10:57.000Z
|
2019-01-24T21:10:57.000Z
|
run.py
|
lenileiro/flask_api
|
255c8735ad880611dc6f85200edad90507d450b8
|
[
"MIT"
] | null | null | null |
run.py
|
lenileiro/flask_api
|
255c8735ad880611dc6f85200edad90507d450b8
|
[
"MIT"
] | null | null | null |
from app import create_app
config_name = 'config'
app = create_app(config_name)
if __name__ == "__main__":
app.run()
| 20.166667
| 29
| 0.727273
| 18
| 121
| 4.222222
| 0.5
| 0.236842
| 0.394737
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157025
| 121
| 6
| 30
| 20.166667
| 0.745098
| 0
| 0
| 0
| 0
| 0
| 0.114754
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
39a3286e3c86986d0c767d81426bd9fc285a9a7f
| 215
|
py
|
Python
|
intraday_analytics/pivots/views.py
|
eminiorderflow/52analytics-backend
|
ec90695faeabe557f1011779f3f716c586d3aa7c
|
[
"MIT"
] | null | null | null |
intraday_analytics/pivots/views.py
|
eminiorderflow/52analytics-backend
|
ec90695faeabe557f1011779f3f716c586d3aa7c
|
[
"MIT"
] | 5
|
2020-06-05T21:52:24.000Z
|
2021-09-22T18:46:16.000Z
|
intraday_analytics/pivots/views.py
|
eminiorderflow/52analytics-backend
|
ec90695faeabe557f1011779f3f716c586d3aa7c
|
[
"MIT"
] | 1
|
2020-04-23T10:41:43.000Z
|
2020-04-23T10:41:43.000Z
|
from django.shortcuts import render
from django.http import HttpResponse
from .strategy.data.push_db import intraday_tasks, eod_tasks
def index(request):
return render(request, 'pivots/index.html', {})
| 26.875
| 61
| 0.762791
| 29
| 215
| 5.551724
| 0.689655
| 0.124224
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148837
| 215
| 7
| 62
| 30.714286
| 0.879781
| 0
| 0
| 0
| 0
| 0
| 0.081731
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.6
| 0.2
| 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
| 1
| 1
| 0
|
0
| 5
|
39acba4bace0ebe90493b1a8285e0637391c2ab7
| 52
|
py
|
Python
|
engine/version.py
|
thenerdsuperuser/ideal-engine
|
b0c9e4e46e782aac2989bc3cde10a68559f00ce4
|
[
"MIT"
] | null | null | null |
engine/version.py
|
thenerdsuperuser/ideal-engine
|
b0c9e4e46e782aac2989bc3cde10a68559f00ce4
|
[
"MIT"
] | null | null | null |
engine/version.py
|
thenerdsuperuser/ideal-engine
|
b0c9e4e46e782aac2989bc3cde10a68559f00ce4
|
[
"MIT"
] | null | null | null |
def show_version():
print("Version v0.2-alpha")
| 17.333333
| 31
| 0.673077
| 8
| 52
| 4.25
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045455
| 0.153846
| 52
| 2
| 32
| 26
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0.346154
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
39c60345863f5a4ee862509b89ffcc58c80133f4
| 101
|
py
|
Python
|
hivemind/mpi/__init__.py
|
enj/hivemind
|
55567496662449cea6a9610611d3dd4c9b40bb42
|
[
"Apache-2.0"
] | 1
|
2021-03-21T06:50:59.000Z
|
2021-03-21T06:50:59.000Z
|
hivemind/mpi/__init__.py
|
enj/hivemind
|
55567496662449cea6a9610611d3dd4c9b40bb42
|
[
"Apache-2.0"
] | null | null | null |
hivemind/mpi/__init__.py
|
enj/hivemind
|
55567496662449cea6a9610611d3dd4c9b40bb42
|
[
"Apache-2.0"
] | 2
|
2016-05-12T20:47:18.000Z
|
2016-10-01T04:22:02.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from .master import Master
from .worker import Worker
| 16.833333
| 26
| 0.683168
| 15
| 101
| 4.6
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011765
| 0.158416
| 101
| 5
| 27
| 20.2
| 0.8
| 0.415842
| 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
| 1
| 0
|
0
| 5
|
8401f3b31c697e85ffa885fefce2513d5c950c02
| 225
|
py
|
Python
|
Week 1/Sail Sale.py
|
James5425/NCSS-Challenge-Intermediate-
|
6ac7b46af683eba207c257ab62030f72c37869e7
|
[
"MIT"
] | null | null | null |
Week 1/Sail Sale.py
|
James5425/NCSS-Challenge-Intermediate-
|
6ac7b46af683eba207c257ab62030f72c37869e7
|
[
"MIT"
] | null | null | null |
Week 1/Sail Sale.py
|
James5425/NCSS-Challenge-Intermediate-
|
6ac7b46af683eba207c257ab62030f72c37869e7
|
[
"MIT"
] | null | null | null |
def sale_price(original, discount):
return round((1 - discount/100) * original, 2)
print(input("Product: ")+ " on sale for "+ "$"+str(sale_price(float(input("Original price ($): ")), float(input("Discount (%): "))))+".")
| 56.25
| 137
| 0.626667
| 28
| 225
| 4.964286
| 0.607143
| 0.129496
| 0.215827
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025381
| 0.124444
| 225
| 4
| 137
| 56.25
| 0.680203
| 0
| 0
| 0
| 0
| 0
| 0.256637
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 0.666667
| 0.333333
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
8414ff619792e28ab82576acfaf682c6b3b4ed4c
| 43
|
py
|
Python
|
src/view/widgets/ui/__init__.py
|
gustavosaquetta/FrameworkSSQt-Vocatus
|
485dc401e05859f68fe198aa2106675839585a13
|
[
"Apache-2.0"
] | null | null | null |
src/view/widgets/ui/__init__.py
|
gustavosaquetta/FrameworkSSQt-Vocatus
|
485dc401e05859f68fe198aa2106675839585a13
|
[
"Apache-2.0"
] | null | null | null |
src/view/widgets/ui/__init__.py
|
gustavosaquetta/FrameworkSSQt-Vocatus
|
485dc401e05859f68fe198aa2106675839585a13
|
[
"Apache-2.0"
] | null | null | null |
import os, sys
sys.path.append(os.getcwd())
| 21.5
| 28
| 0.744186
| 8
| 43
| 4
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069767
| 43
| 2
| 28
| 21.5
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
8438a16c750ae154f9208c92a44cc806200229f6
| 146
|
py
|
Python
|
py_modules/utils.py
|
leangaurav/twilio
|
53ed3db2e8d124836ef0400247336a75f9a602d1
|
[
"Apache-2.0"
] | 1
|
2021-04-17T16:10:31.000Z
|
2021-04-17T16:10:31.000Z
|
py_modules/utils.py
|
leangaurav/twilio
|
53ed3db2e8d124836ef0400247336a75f9a602d1
|
[
"Apache-2.0"
] | null | null | null |
py_modules/utils.py
|
leangaurav/twilio
|
53ed3db2e8d124836ef0400247336a75f9a602d1
|
[
"Apache-2.0"
] | null | null | null |
import logging
import sys
def get_logger():
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
return logging.getLogger()
| 20.857143
| 64
| 0.732877
| 18
| 146
| 5.888889
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171233
| 146
| 6
| 65
| 24.333333
| 0.876033
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.4
| 0
| 0.8
| 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
| 1
| 0
|
0
| 5
|
844a1480e2c2db20df2dc1590ef1c366ba571cc4
| 49
|
py
|
Python
|
tps/__init__.py
|
ebartrum/tps-deformation
|
b9d879d015a78b3b6fe5a0da0aae71d0e53f56a2
|
[
"BSD-3-Clause"
] | 19
|
2019-06-03T01:46:35.000Z
|
2022-03-30T07:59:53.000Z
|
tps/__init__.py
|
ebartrum/tps-deformation
|
b9d879d015a78b3b6fe5a0da0aae71d0e53f56a2
|
[
"BSD-3-Clause"
] | 1
|
2019-03-04T11:09:58.000Z
|
2019-03-08T13:01:53.000Z
|
tps/__init__.py
|
ebartrum/tps-deformation
|
b9d879d015a78b3b6fe5a0da0aae71d0e53f56a2
|
[
"BSD-3-Clause"
] | 8
|
2019-09-03T07:44:25.000Z
|
2022-01-05T15:41:32.000Z
|
from .functions import *
from .instance import *
| 16.333333
| 24
| 0.755102
| 6
| 49
| 6.166667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163265
| 49
| 2
| 25
| 24.5
| 0.902439
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
845590508c8e61ec1e9ada98971af6e016b21ab1
| 671
|
py
|
Python
|
command_line.py
|
azeznassar/JavaScriptToUML
|
53cccc1bba635114f03d966fd2f0f2f2d2d74bae
|
[
"MIT"
] | 5
|
2020-08-16T09:25:42.000Z
|
2022-01-19T21:00:48.000Z
|
command_line.py
|
azeznassar/JavaScriptToUML
|
53cccc1bba635114f03d966fd2f0f2f2d2d74bae
|
[
"MIT"
] | null | null | null |
command_line.py
|
azeznassar/JavaScriptToUML
|
53cccc1bba635114f03d966fd2f0f2f2d2d74bae
|
[
"MIT"
] | 4
|
2020-08-19T09:05:13.000Z
|
2021-08-03T17:25:53.000Z
|
from cmd import Cmd
from abc import ABCMeta, abstractmethod
class CommandLine(Cmd, metaclass=ABCMeta): # Abstract class
def __init__(self):
Cmd.__init__(self)
self.prompt = ">>> "
self.user_name = "User"
self.current_command = ""
self.user_args = ""
def emptyline(self):
pass
@abstractmethod
def do_create_uml(self, args):
pass
@abstractmethod
def do_deserialize(self, args):
pass
@abstractmethod
def do_info(self, args):
pass
@abstractmethod
def do_quit(self, args):
pass
@abstractmethod
def do_switch_cmd(self, args):
pass
| 18.638889
| 60
| 0.605067
| 75
| 671
| 5.173333
| 0.373333
| 0.231959
| 0.270619
| 0.296392
| 0.319588
| 0.319588
| 0
| 0
| 0
| 0
| 0
| 0
| 0.305514
| 671
| 35
| 61
| 19.171429
| 0.832618
| 0.020864
| 0
| 0.423077
| 0
| 0
| 0.012232
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.269231
| false
| 0.230769
| 0.076923
| 0
| 0.384615
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
845a9b7fa63aa459b1e65966ce03bda89f6614ae
| 128
|
py
|
Python
|
olamundo.py/exercicios_refeitos/ex001.py
|
gabrielviticov/exercicios-python
|
4068cb0029513f8ab8bd12fa3a9055f37b4040d4
|
[
"MIT"
] | null | null | null |
olamundo.py/exercicios_refeitos/ex001.py
|
gabrielviticov/exercicios-python
|
4068cb0029513f8ab8bd12fa3a9055f37b4040d4
|
[
"MIT"
] | null | null | null |
olamundo.py/exercicios_refeitos/ex001.py
|
gabrielviticov/exercicios-python
|
4068cb0029513f8ab8bd12fa3a9055f37b4040d4
|
[
"MIT"
] | null | null | null |
'''
ex001: Crie um programa que escreva “Olá, Mundo” na tela
'''
print('{}{}{}'.format('\033[1;34m', 'Olá, mundo!', '\033[m'))
| 21.333333
| 61
| 0.570313
| 19
| 128
| 3.842105
| 0.842105
| 0.219178
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108108
| 0.132813
| 128
| 5
| 62
| 25.6
| 0.54955
| 0.4375
| 0
| 0
| 0
| 0
| 0.515625
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 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
| 1
|
0
| 5
|
081f9ac6cafc361a0967d3660add0c9adca5c788
| 23
|
py
|
Python
|
RigidFoilSimer/Tests/__init__.py
|
vickie-ngo/RigidFoilUDFGenerator
|
ee6ceb149ece16b2fb85362641e144b231f6e44f
|
[
"MIT"
] | 1
|
2021-03-24T05:36:03.000Z
|
2021-03-24T05:36:03.000Z
|
RigidFoilSimer/Tests/__init__.py
|
vickie-ngo/RigidFoilUDFGenerator
|
ee6ceb149ece16b2fb85362641e144b231f6e44f
|
[
"MIT"
] | 1
|
2020-06-11T06:30:33.000Z
|
2020-06-11T06:30:33.000Z
|
RigidFoilSimer/Tests/__init__.py
|
SoftwareDevEngResearch/RigidFoilSimulator
|
f6ad91b33b897e3e87b8411819be630b50fc4445
|
[
"MIT"
] | 1
|
2020-04-21T06:37:52.000Z
|
2020-04-21T06:37:52.000Z
|
from . import Test_code
| 23
| 23
| 0.826087
| 4
| 23
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 23
| 1
| 23
| 23
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
f24a56a6c0dc0881732323738d3003a3682b0407
| 68
|
py
|
Python
|
resources/update.py
|
DevGev/Lynx
|
11ceddf63ee5e863b89aa1ff56ba9edd1bfecb07
|
[
"Unlicense"
] | 9
|
2020-12-14T18:37:10.000Z
|
2021-06-18T08:06:18.000Z
|
resources/update.py
|
DevGev/Lynx
|
11ceddf63ee5e863b89aa1ff56ba9edd1bfecb07
|
[
"Unlicense"
] | 1
|
2021-07-15T09:07:45.000Z
|
2021-12-12T20:21:21.000Z
|
resources/update.py
|
DevGev/Lynx
|
11ceddf63ee5e863b89aa1ff56ba9edd1bfecb07
|
[
"Unlicense"
] | 1
|
2021-03-18T22:01:01.000Z
|
2021-03-18T22:01:01.000Z
|
import os
os.system("pyrcc5 -o ../lynx/resources.py resources.qrc")
| 22.666667
| 57
| 0.735294
| 11
| 68
| 4.545455
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016129
| 0.088235
| 68
| 2
| 58
| 34
| 0.790323
| 0
| 0
| 0
| 0
| 0
| 0.647059
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
f262861b59b5a08979c34fc9a4b5c254094c4fa5
| 156
|
py
|
Python
|
mid_exam/softuni_reception.py
|
MaggieIllustrations/softuni-github-programming
|
f5695cb14602f3d2974359f6d8734332acc650d3
|
[
"MIT"
] | null | null | null |
mid_exam/softuni_reception.py
|
MaggieIllustrations/softuni-github-programming
|
f5695cb14602f3d2974359f6d8734332acc650d3
|
[
"MIT"
] | null | null | null |
mid_exam/softuni_reception.py
|
MaggieIllustrations/softuni-github-programming
|
f5695cb14602f3d2974359f6d8734332acc650d3
|
[
"MIT"
] | 1
|
2022-01-14T17:12:44.000Z
|
2022-01-14T17:12:44.000Z
|
first_employee_efficiency = int(input())
second_employee_efficiency = int(input())
third_employee_efficiency = int(input())
students_count = int(input())
| 22.285714
| 41
| 0.782051
| 19
| 156
| 6.052632
| 0.473684
| 0.278261
| 0.547826
| 0.678261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089744
| 156
| 6
| 42
| 26
| 0.809859
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f2a7dc1a732835c89a84bbac6964075449339517
| 374
|
py
|
Python
|
IT LAB/lab4/additional3.py
|
Sahil1515/Sem6-Labs
|
cabedbccc2a5272365c250e2d3f4e3a3e802233f
|
[
"MIT"
] | 1
|
2021-03-03T16:26:59.000Z
|
2021-03-03T16:26:59.000Z
|
IT LAB/lab4/additional3.py
|
Sahil1515/sem6-Labs
|
cabedbccc2a5272365c250e2d3f4e3a3e802233f
|
[
"MIT"
] | null | null | null |
IT LAB/lab4/additional3.py
|
Sahil1515/sem6-Labs
|
cabedbccc2a5272365c250e2d3f4e3a3e802233f
|
[
"MIT"
] | null | null | null |
class Circle:
def __init__(self,radius):
self.radius=radius
def area(self):
return (3.14*self.radius*self.radius)
def perimeter(self):
return (2*3.14*self.radius)
radius=int(input("Enter the radius :"))
my_obj=Circle(radius)
print("Area of the circle: "+str(my_obj.area()))
print("Perimeter of the circle: "+str(my_obj.perimeter()))
| 22
| 58
| 0.657754
| 56
| 374
| 4.267857
| 0.375
| 0.209205
| 0.117155
| 0.167364
| 0.158996
| 0.158996
| 0
| 0
| 0
| 0
| 0
| 0.022951
| 0.184492
| 374
| 17
| 58
| 22
| 0.760656
| 0
| 0
| 0
| 0
| 0
| 0.168449
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0
| 0.181818
| 0.545455
| 0.181818
| 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
| 1
| 1
| 0
|
0
| 5
|
4b2e751a77966791c771d367e2092b9713b63ae8
| 2,783
|
py
|
Python
|
tests/gateway.py
|
pceuropa/AWS-Manager
|
b675798c5ff2d471470449659e8fb8e7b19e723f
|
[
"Apache-2.0"
] | 9
|
2018-09-29T11:44:19.000Z
|
2019-11-06T21:41:34.000Z
|
tests/gateway.py
|
pceuropa/AWS-Manager
|
b675798c5ff2d471470449659e8fb8e7b19e723f
|
[
"Apache-2.0"
] | null | null | null |
tests/gateway.py
|
pceuropa/AWS-Manager
|
b675798c5ff2d471470449659e8fb8e7b19e723f
|
[
"Apache-2.0"
] | 2
|
2018-12-25T10:13:56.000Z
|
2021-06-24T11:26:38.000Z
|
from telemetry.workers.gateway import Gateway
from telemetry.tests.mocking import MockData
import unittest
mock = MockData({"id": 1, "tv": 1, "status_w": [0, 0, 0, 0, 1], 'charge': 1, 'wristband': {"status": [1, 1, 1], 'id': 1}})
snapshot = mock.get()
class TestGateway(unittest.TestCase):
gateway = Gateway(snapshot)
gateway.run()
def setUp(self):
pass
def tearDown(self):
pass
def test_tv(self):
self.assertTrue(self.gateway.tv)
def test_status(self):
self.assertEqual(self.gateway.status, [1, 1, 0, 0, 0, 0, 1])
self.assertEqual(self.gateway.get_status(0, -1), 0)
self.assertEqual(self.gateway.get_status(1, -1), 1)
self.assertEqual(self.gateway.get_status(2, -2), 1)
self.assertEqual(self.gateway.get_status(3, -2), 1)
self.assertEqual(self.gateway.get_status(4, -2), 0)
self.assertEqual(self.gateway.get_status(4, -2), 0)
def test_active(self):
self.assertTrue(self.gateway.isBandActive(mock.get_wristband({'status': 1, 'charge': 0, })))
self.assertFalse(self.gateway.isBandActive(mock.get_wristband({'status': 1, 'charge': 1, })))
self.assertFalse(self.gateway.isBandActive(mock.get_wristband({'status': 0, 'charge': 1, })))
self.assertFalse(self.gateway.isBandActive(mock.get_wristband({'status': 0, 'charge': 0, })))
def test_tv_off(self):
mock = MockData({"id": 2, "tv": 0, "status_w": [1, 1, 1, 1, 1], 'charge': 0, 'wristband': {"status": [0, 0, 1], 'id': 2}})
snapshot = mock.get()
gateway = Gateway(snapshot)
gateway.run()
self.assertEqual(gateway.status, [0, 1, 1, 1, 1, 1, 0])
self.assertFalse(gateway.isBandActive(mock.get_wristband({'status': 1, 'charge': 0, })))
self.assertFalse(gateway.isBandActive(mock.get_wristband({'status': 1, 'charge': 1, })))
self.assertFalse(gateway.isBandActive(mock.get_wristband({'status': 0, 'charge': 1, })))
self.assertFalse(gateway.isBandActive(mock.get_wristband({'status': 0, 'charge': 0, })))
def test_nothing_in_area(self):
mock = MockData({"id": 2, "tv": 1, "status_w": [0, 0, 0, 0, 0], 'charge': 0, 'wristband': {"status": [0, 0, 1], 'id': 2}})
snapshot = mock.get()
gateway = Gateway(snapshot)
gateway.run()
self.assertEqual(gateway.status, [1, 0, 0, 0, 0, 0, 0])
self.assertFalse(gateway.isBandActive(mock.get_wristband({'status': 1, 'charge': 0, })))
self.assertFalse(gateway.isBandActive(mock.get_wristband({'status': 1, 'charge': 1, })))
self.assertFalse(gateway.isBandActive(mock.get_wristband({'status': 0, 'charge': 1, })))
self.assertFalse(gateway.isBandActive(mock.get_wristband({'status': 0, 'charge': 0, })))
| 45.622951
| 130
| 0.624506
| 368
| 2,783
| 4.644022
| 0.11413
| 0.019895
| 0.161498
| 0.182563
| 0.80983
| 0.750146
| 0.726741
| 0.663546
| 0.624342
| 0.57519
| 0
| 0.043747
| 0.186849
| 2,783
| 60
| 131
| 46.383333
| 0.711445
| 0
| 0
| 0.446809
| 0
| 0
| 0.089472
| 0
| 0
| 0
| 0
| 0
| 0.468085
| 1
| 0.148936
| false
| 0.042553
| 0.06383
| 0
| 0.255319
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
4b3bfd5d46e44f996668fa65466fcb04143a7a51
| 76
|
py
|
Python
|
hydrobox/tests/preprocessing/__init__.py
|
joergmeyer-kit/hydrobox
|
af75a5ba87147e00656435c170535c69fc3298a8
|
[
"MIT"
] | 1
|
2019-01-15T13:32:56.000Z
|
2019-01-15T13:32:56.000Z
|
hydrobox/tests/preprocessing/__init__.py
|
joergmeyer-kit/hydrobox
|
af75a5ba87147e00656435c170535c69fc3298a8
|
[
"MIT"
] | null | null | null |
hydrobox/tests/preprocessing/__init__.py
|
joergmeyer-kit/hydrobox
|
af75a5ba87147e00656435c170535c69fc3298a8
|
[
"MIT"
] | null | null | null |
from .union import TestMerge
from .scale import TestAggregate, TestCutPeriod
| 38
| 47
| 0.855263
| 9
| 76
| 7.222222
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 76
| 2
| 47
| 38
| 0.955882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
4b5f4af809026d035c3b64af1eafd685a9bb24f8
| 211
|
py
|
Python
|
virtual/lib/python3.6/site-packages/wtforms/ext/appengine/__init__.py
|
claudinemahoro/pitch
|
b30bbf369d1e71e52d1febbab95c3d3eebf02625
|
[
"MIT"
] | 37
|
2019-04-03T07:19:57.000Z
|
2022-01-09T06:18:41.000Z
|
virtual/lib/python3.6/site-packages/wtforms/ext/appengine/__init__.py
|
claudinemahoro/pitch
|
b30bbf369d1e71e52d1febbab95c3d3eebf02625
|
[
"MIT"
] | 34
|
2020-05-11T14:07:27.000Z
|
2020-11-08T15:23:27.000Z
|
virtual/lib/python3.6/site-packages/wtforms/ext/appengine/__init__.py
|
claudinemahoro/pitch
|
b30bbf369d1e71e52d1febbab95c3d3eebf02625
|
[
"MIT"
] | 130
|
2019-10-02T14:40:20.000Z
|
2022-01-26T17:38:26.000Z
|
import warnings
warnings.warn(
"'wtforms.ext.appengine' will be removed in WTForms 3.0. Use"
" wtforms-appengine instead."
" https://github.com/wtforms/wtforms-appengine",
DeprecationWarning,
)
| 23.444444
| 65
| 0.7109
| 25
| 211
| 6
| 0.72
| 0.213333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011364
| 0.165877
| 211
| 8
| 66
| 26.375
| 0.840909
| 0
| 0
| 0
| 0
| 0
| 0.620853
| 0.109005
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
4bbd75ef2219299ae764931715cd457a92d54e17
| 71
|
py
|
Python
|
src/spaceone/notification/connector/__init__.py
|
jean1042/plugin-telegram-notification-protocol
|
f4c6c6dd22196194f9252e8ea6f656c999e7ae5e
|
[
"Apache-2.0"
] | null | null | null |
src/spaceone/notification/connector/__init__.py
|
jean1042/plugin-telegram-notification-protocol
|
f4c6c6dd22196194f9252e8ea6f656c999e7ae5e
|
[
"Apache-2.0"
] | null | null | null |
src/spaceone/notification/connector/__init__.py
|
jean1042/plugin-telegram-notification-protocol
|
f4c6c6dd22196194f9252e8ea6f656c999e7ae5e
|
[
"Apache-2.0"
] | 1
|
2021-07-20T02:24:18.000Z
|
2021-07-20T02:24:18.000Z
|
from spaceone.notification.connector.telegram import TelegramConnector
| 35.5
| 70
| 0.901408
| 7
| 71
| 9.142857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.056338
| 71
| 1
| 71
| 71
| 0.955224
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
2990b78df40fa86b330addaab1b7fc487a4c9f69
| 50
|
py
|
Python
|
cupy_alias/statistics/correlation.py
|
fixstars/clpy
|
693485f85397cc110fa45803c36c30c24c297df0
|
[
"BSD-3-Clause"
] | 142
|
2018-06-07T07:43:10.000Z
|
2021-10-30T21:06:32.000Z
|
cupy_alias/statistics/correlation.py
|
fixstars/clpy
|
693485f85397cc110fa45803c36c30c24c297df0
|
[
"BSD-3-Clause"
] | 282
|
2018-06-07T08:35:03.000Z
|
2021-03-31T03:14:32.000Z
|
cupy_alias/statistics/correlation.py
|
fixstars/clpy
|
693485f85397cc110fa45803c36c30c24c297df0
|
[
"BSD-3-Clause"
] | 19
|
2018-06-19T11:07:53.000Z
|
2021-05-13T20:57:04.000Z
|
from clpy.statistics.correlation import * # NOQA
| 25
| 49
| 0.78
| 6
| 50
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14
| 50
| 1
| 50
| 50
| 0.906977
| 0.08
| 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
| 1
| 0
|
0
| 5
|
29b6326b2736367e0e1e7b602863706cca3c7577
| 37
|
py
|
Python
|
03/01/3.py
|
pylangstudy/201706
|
f1cc6af6b18e5bd393cda27f5166067c4645d4d3
|
[
"CC0-1.0"
] | null | null | null |
03/01/3.py
|
pylangstudy/201706
|
f1cc6af6b18e5bd393cda27f5166067c4645d4d3
|
[
"CC0-1.0"
] | 70
|
2017-06-01T11:02:51.000Z
|
2017-06-30T00:35:32.000Z
|
03/01/3.py
|
pylangstudy/201706
|
f1cc6af6b18e5bd393cda27f5166067c4645d4d3
|
[
"CC0-1.0"
] | null | null | null |
l = [10,20,30,40,50]
del l
print(l)
| 7.4
| 20
| 0.567568
| 10
| 37
| 2.1
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 0.189189
| 37
| 4
| 21
| 9.25
| 0.366667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
4b05b8c67733fcd799a2e2f4c48c582602526f7d
| 276
|
py
|
Python
|
core/CRAC/do_noting.py
|
kangyifei/CloudSimPy
|
45912e7ea35086b67941624102e400cb22e549ab
|
[
"MIT"
] | null | null | null |
core/CRAC/do_noting.py
|
kangyifei/CloudSimPy
|
45912e7ea35086b67941624102e400cb22e549ab
|
[
"MIT"
] | null | null | null |
core/CRAC/do_noting.py
|
kangyifei/CloudSimPy
|
45912e7ea35086b67941624102e400cb22e549ab
|
[
"MIT"
] | null | null | null |
from core.algorithm import Algorithm
class ControlAlgorithm(Algorithm):
def __call__(self, cluster, clock, cooling_equip=None):
return {}
class ClusterUpdateAlgorithm(Algorithm):
def __call__(self, cluster, clock, cooling_equip=None) -> None:
pass
| 23
| 67
| 0.724638
| 30
| 276
| 6.333333
| 0.566667
| 0.126316
| 0.168421
| 0.210526
| 0.505263
| 0.505263
| 0.505263
| 0.505263
| 0.505263
| 0
| 0
| 0
| 0.184783
| 276
| 11
| 68
| 25.090909
| 0.844444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.142857
| 0.142857
| 0.142857
| 0.857143
| 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
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
d9cca46a3c2d4a1cbd768cf267256ce8dd07aacd
| 589
|
py
|
Python
|
src/python/pants/backend/codegen/ragel/java/register.py
|
revl/pants
|
8ad83e4ca80c095d44efceafd8b41e575da39c65
|
[
"Apache-2.0"
] | 1
|
2021-05-05T18:58:28.000Z
|
2021-05-05T18:58:28.000Z
|
src/python/pants/backend/codegen/ragel/java/register.py
|
revl/pants
|
8ad83e4ca80c095d44efceafd8b41e575da39c65
|
[
"Apache-2.0"
] | null | null | null |
src/python/pants/backend/codegen/ragel/java/register.py
|
revl/pants
|
8ad83e4ca80c095d44efceafd8b41e575da39c65
|
[
"Apache-2.0"
] | 3
|
2020-06-30T08:28:13.000Z
|
2021-07-28T09:35:57.000Z
|
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.backend.codegen.ragel.java.java_ragel_library import JavaRagelLibrary
from pants.backend.codegen.ragel.java.ragel_gen import RagelGen
from pants.build_graph.build_file_aliases import BuildFileAliases
from pants.goal.task_registrar import TaskRegistrar as task
def build_file_aliases():
return BuildFileAliases(targets={"java_ragel_library": JavaRagelLibrary,})
def register_goals():
task(name="ragel", action=RagelGen).install("gen")
| 36.8125
| 80
| 0.813243
| 78
| 589
| 5.987179
| 0.551282
| 0.077088
| 0.068522
| 0.098501
| 0.137045
| 0.137045
| 0
| 0
| 0
| 0
| 0
| 0.011299
| 0.098472
| 589
| 15
| 81
| 39.266667
| 0.868173
| 0.213922
| 0
| 0
| 0
| 0
| 0.056522
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.5
| 0.125
| 0.875
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
d9d123c9ba74e33f1697970b4ff5ab6b44fa7005
| 15,741
|
py
|
Python
|
tests/asp/AllAnswerSets/tight/graph_col_1.asp.test.py
|
bernardocuteri/wasp
|
05c8f961776dbdbf7afbf905ee00fc262eba51ad
|
[
"Apache-2.0"
] | 19
|
2015-12-03T08:53:45.000Z
|
2022-03-31T02:09:43.000Z
|
tests/asp/AllAnswerSets/tight/graph_col_1.asp.test.py
|
bernardocuteri/wasp
|
05c8f961776dbdbf7afbf905ee00fc262eba51ad
|
[
"Apache-2.0"
] | 80
|
2017-11-25T07:57:32.000Z
|
2018-06-10T19:03:30.000Z
|
tests/asp/AllAnswerSets/tight/graph_col_1.asp.test.py
|
bernardocuteri/wasp
|
05c8f961776dbdbf7afbf905ee00fc262eba51ad
|
[
"Apache-2.0"
] | 6
|
2015-01-15T07:51:48.000Z
|
2020-06-18T14:47:48.000Z
|
input = """
1 2 0 0
1 3 0 0
1 4 0 0
1 5 0 0
1 6 0 0
1 7 0 0
1 8 0 0
1 9 0 0
1 10 0 0
1 11 0 0
1 12 0 0
1 13 0 0
1 14 0 0
1 15 0 0
1 16 0 0
1 17 0 0
1 18 0 0
1 19 0 0
1 20 0 0
1 21 0 0
1 22 0 0
1 23 0 0
1 24 0 0
1 25 0 0
1 26 0 0
1 27 0 0
1 28 0 0
1 29 0 0
1 30 0 0
1 31 0 0
1 32 0 0
1 33 0 0
1 34 0 0
1 35 0 0
1 36 0 0
1 37 0 0
1 38 0 0
1 39 0 0
1 40 0 0
1 41 0 0
1 42 0 0
1 43 0 0
1 44 0 0
1 45 0 0
1 46 0 0
1 47 0 0
1 48 0 0
1 49 0 0
1 50 0 0
1 51 0 0
1 52 0 0
1 53 0 0
1 54 0 0
1 55 0 0
1 56 0 0
1 57 0 0
1 58 0 0
1 59 0 0
1 60 0 0
1 61 0 0
1 62 0 0
1 63 0 0
1 64 0 0
1 65 0 0
1 66 0 0
1 67 0 0
1 68 0 0
1 69 0 0
1 70 0 0
1 71 0 0
1 72 0 0
1 73 0 0
1 74 0 0
1 75 0 0
1 76 0 0
1 77 0 0
1 78 0 0
1 79 0 0
1 80 0 0
1 81 0 0
1 82 0 0
1 83 0 0
1 84 0 0
1 85 0 0
1 86 0 0
1 87 0 0
1 88 0 0
1 89 0 0
1 90 0 0
1 91 0 0
1 92 0 0
1 93 0 0
1 94 0 0
1 95 0 0
1 96 0 0
1 97 0 0
1 98 0 0
1 99 0 0
1 100 0 0
1 101 0 0
1 102 0 0
1 103 0 0
1 104 0 0
1 105 0 0
1 106 0 0
1 107 0 0
1 108 0 0
1 109 0 0
1 110 0 0
1 111 0 0
1 112 0 0
1 113 0 0
1 114 0 0
1 115 0 0
1 116 0 0
1 117 0 0
1 118 0 0
1 119 0 0
1 120 0 0
1 121 0 0
1 122 0 0
1 123 0 0
1 124 0 0
1 125 0 0
1 126 0 0
1 127 0 0
1 128 0 0
1 129 0 0
1 130 0 0
1 131 0 0
1 132 0 0
1 133 0 0
1 134 0 0
1 135 0 0
1 136 0 0
1 137 0 0
1 138 0 0
1 139 0 0
1 140 0 0
1 141 0 0
1 142 0 0
1 143 0 0
1 144 0 0
1 145 0 0
1 146 0 0
1 147 0 0
1 148 0 0
1 149 0 0
1 150 0 0
1 151 0 0
1 152 0 0
1 153 0 0
1 154 0 0
1 155 0 0
1 156 0 0
1 157 0 0
1 158 0 0
1 159 0 0
1 160 0 0
1 161 0 0
1 162 0 0
1 163 0 0
1 164 0 0
1 165 0 0
1 166 0 0
1 167 0 0
1 168 0 0
1 169 0 0
1 170 0 0
1 171 0 0
1 172 0 0
1 173 0 0
1 174 0 0
1 175 0 0
1 176 0 0
1 177 0 0
1 178 0 0
1 179 0 0
1 180 0 0
1 181 0 0
1 182 0 0
1 183 0 0
1 184 0 0
1 185 0 0
1 186 0 0
1 187 0 0
1 188 0 0
1 189 0 0
1 190 0 0
1 191 0 0
1 192 0 0
1 193 0 0
1 194 0 0
1 195 0 0
1 196 0 0
1 197 0 0
1 198 0 0
1 199 0 0
1 200 0 0
1 201 2 1 202 203
1 202 2 1 201 203
1 203 0 0
1 204 2 1 205 206
1 205 2 1 204 206
1 206 0 0
1 207 2 1 208 209
1 208 2 1 207 209
1 209 0 0
1 210 2 1 211 212
1 211 2 1 210 212
1 212 0 0
1 213 2 1 214 215
1 214 2 1 213 215
1 215 0 0
1 216 2 1 217 218
1 217 2 1 216 218
1 218 0 0
1 219 2 1 220 221
1 220 2 1 219 221
1 221 0 0
1 222 2 1 223 224
1 223 2 1 222 224
1 224 0 0
1 225 2 1 226 227
1 226 2 1 225 227
1 227 0 0
1 228 2 1 229 230
1 229 2 1 228 230
1 230 0 0
1 231 2 1 232 233
1 232 2 1 231 233
1 233 0 0
1 234 2 1 235 236
1 235 2 1 234 236
1 236 0 0
1 237 2 1 238 239
1 238 2 1 237 239
1 239 0 0
1 240 2 1 241 242
1 241 2 1 240 242
1 242 0 0
1 243 2 1 244 245
1 244 2 1 243 245
1 245 0 0
1 246 2 1 247 248
1 247 2 1 246 248
1 248 0 0
1 249 2 1 250 251
1 250 2 1 249 251
1 251 0 0
1 252 2 1 253 254
1 253 2 1 252 254
1 254 0 0
1 255 2 1 256 257
1 256 2 1 255 257
1 257 0 0
1 258 2 1 259 260
1 259 2 1 258 260
1 260 0 0
1 261 2 1 262 263
1 262 2 1 261 263
1 263 0 0
1 264 2 1 265 266
1 265 2 1 264 266
1 266 0 0
1 267 2 1 268 269
1 268 2 1 267 269
1 269 0 0
1 270 2 1 271 272
1 271 2 1 270 272
1 272 0 0
1 273 2 1 274 275
1 274 2 1 273 275
1 275 0 0
1 276 2 1 277 278
1 277 2 1 276 278
1 278 0 0
1 279 2 1 280 281
1 280 2 1 279 281
1 281 0 0
1 282 2 1 283 284
1 283 2 1 282 284
1 284 0 0
1 285 2 1 286 287
1 286 2 1 285 287
1 287 0 0
1 288 2 1 289 290
1 289 2 1 288 290
1 290 0 0
1 291 2 1 292 293
1 292 2 1 291 293
1 293 0 0
1 294 2 1 295 296
1 295 2 1 294 296
1 296 0 0
1 297 2 1 298 299
1 298 2 1 297 299
1 299 0 0
1 300 2 1 301 302
1 301 2 1 300 302
1 302 0 0
1 303 2 1 304 305
1 304 2 1 303 305
1 305 0 0
1 306 2 1 307 308
1 307 2 1 306 308
1 308 0 0
1 309 2 1 310 311
1 310 2 1 309 311
1 311 0 0
1 312 2 1 313 314
1 313 2 1 312 314
1 314 0 0
1 315 2 1 316 317
1 316 2 1 315 317
1 317 0 0
1 318 2 1 319 320
1 319 2 1 318 320
1 320 0 0
1 321 2 1 322 323
1 322 2 1 321 323
1 323 0 0
1 324 2 1 325 326
1 325 2 1 324 326
1 326 0 0
1 327 2 1 328 329
1 328 2 1 327 329
1 329 0 0
1 330 2 1 331 332
1 331 2 1 330 332
1 332 0 0
1 333 2 1 334 335
1 334 2 1 333 335
1 335 0 0
1 336 2 1 337 338
1 337 2 1 336 338
1 338 0 0
1 339 2 1 340 341
1 340 2 1 339 341
1 341 0 0
1 342 2 1 343 344
1 343 2 1 342 344
1 344 0 0
1 345 2 1 346 347
1 346 2 1 345 347
1 347 0 0
1 348 2 1 349 350
1 349 2 1 348 350
1 350 0 0
1 351 2 1 352 353
1 352 2 1 351 353
1 353 0 0
1 354 2 1 355 356
1 355 2 1 354 356
1 356 0 0
1 357 2 1 358 359
1 358 2 1 357 359
1 359 0 0
1 360 2 1 361 362
1 361 2 1 360 362
1 362 0 0
1 363 2 1 364 365
1 364 2 1 363 365
1 365 0 0
1 366 2 1 367 368
1 367 2 1 366 368
1 368 0 0
1 369 2 1 370 371
1 370 2 1 369 371
1 371 0 0
1 372 2 1 373 374
1 373 2 1 372 374
1 374 0 0
1 375 2 1 376 377
1 376 2 1 375 377
1 377 0 0
1 378 2 1 379 380
1 379 2 1 378 380
1 380 0 0
1 381 2 1 382 383
1 382 2 1 381 383
1 383 0 0
1 384 2 1 385 386
1 385 2 1 384 386
1 386 0 0
1 387 2 1 388 389
1 388 2 1 387 389
1 389 0 0
1 390 2 1 391 392
1 391 2 1 390 392
1 392 0 0
1 393 2 1 394 395
1 394 2 1 393 395
1 395 0 0
1 396 2 1 397 398
1 397 2 1 396 398
1 398 0 0
1 399 2 1 400 401
1 400 2 1 399 401
1 401 0 0
1 402 2 1 403 404
1 403 2 1 402 404
1 404 0 0
1 405 2 1 406 407
1 406 2 1 405 407
1 407 0 0
1 408 2 1 409 410
1 409 2 1 408 410
1 410 0 0
1 411 2 1 412 413
1 412 2 1 411 413
1 413 0 0
1 414 2 1 415 416
1 415 2 1 414 416
1 416 0 0
1 417 2 1 418 419
1 418 2 1 417 419
1 419 0 0
1 420 2 1 421 422
1 421 2 1 420 422
1 422 0 0
1 423 2 1 424 425
1 424 2 1 423 425
1 425 0 0
1 426 2 1 427 428
1 427 2 1 426 428
1 428 0 0
1 429 2 1 430 431
1 430 2 1 429 431
1 431 0 0
1 432 2 1 433 434
1 433 2 1 432 434
1 434 0 0
1 435 2 1 436 437
1 436 2 1 435 437
1 437 0 0
1 438 2 1 439 440
1 439 2 1 438 440
1 440 0 0
1 441 2 1 442 443
1 442 2 1 441 443
1 443 0 0
1 444 2 1 445 446
1 445 2 1 444 446
1 446 0 0
1 447 2 1 448 449
1 448 2 1 447 449
1 449 0 0
1 450 2 1 451 452
1 451 2 1 450 452
1 452 0 0
1 453 2 1 454 455
1 454 2 1 453 455
1 455 0 0
1 456 2 1 457 458
1 457 2 1 456 458
1 458 0 0
1 459 2 1 460 461
1 460 2 1 459 461
1 461 0 0
1 462 2 1 463 464
1 463 2 1 462 464
1 464 0 0
1 465 2 1 466 467
1 466 2 1 465 467
1 467 0 0
1 468 2 1 469 470
1 469 2 1 468 470
1 470 0 0
1 471 1 0 468
1 472 1 0 465
1 473 1 0 462
1 474 1 0 459
1 475 1 0 456
1 476 1 0 453
1 477 1 0 450
1 478 1 0 447
1 479 1 0 444
1 480 1 0 441
1 481 1 0 438
1 482 1 0 435
1 483 1 0 432
1 484 1 0 429
1 485 1 0 426
1 486 1 0 423
1 487 1 0 420
1 488 1 0 417
1 489 1 0 414
1 490 1 0 411
1 491 1 0 408
1 492 1 0 405
1 493 1 0 402
1 494 1 0 399
1 495 1 0 396
1 496 1 0 393
1 497 1 0 390
1 498 1 0 387
1 499 1 0 384
1 500 1 0 381
1 471 1 0 378
1 472 1 0 375
1 473 1 0 372
1 474 1 0 369
1 475 1 0 366
1 476 1 0 363
1 477 1 0 360
1 478 1 0 357
1 479 1 0 354
1 480 1 0 351
1 481 1 0 348
1 482 1 0 345
1 483 1 0 342
1 484 1 0 339
1 485 1 0 336
1 486 1 0 333
1 487 1 0 330
1 488 1 0 327
1 489 1 0 324
1 490 1 0 321
1 491 1 0 318
1 492 1 0 315
1 493 1 0 312
1 494 1 0 309
1 495 1 0 306
1 496 1 0 303
1 497 1 0 300
1 498 1 0 297
1 499 1 0 294
1 500 1 0 291
1 471 1 0 288
1 472 1 0 285
1 473 1 0 282
1 474 1 0 279
1 475 1 0 276
1 476 1 0 273
1 477 1 0 270
1 478 1 0 267
1 479 1 0 264
1 480 1 0 261
1 481 1 0 258
1 482 1 0 255
1 483 1 0 252
1 484 1 0 249
1 485 1 0 246
1 486 1 0 243
1 487 1 0 240
1 488 1 0 237
1 489 1 0 234
1 490 1 0 231
1 491 1 0 228
1 492 1 0 225
1 493 1 0 222
1 494 1 0 219
1 495 1 0 216
1 496 1 0 213
1 497 1 0 210
1 498 1 0 207
1 499 1 0 204
1 500 1 0 201
1 1 1 1 500
1 1 1 1 499
1 1 1 1 498
1 1 1 1 497
1 1 1 1 496
1 1 1 1 495
1 1 1 1 494
1 1 1 1 493
1 1 1 1 492
1 1 1 1 491
1 1 1 1 490
1 1 1 1 489
1 1 1 1 488
1 1 1 1 487
1 1 1 1 486
1 1 1 1 485
1 1 1 1 484
1 1 1 1 483
1 1 1 1 482
1 1 1 1 481
1 1 1 1 480
1 1 1 1 479
1 1 1 1 478
1 1 1 1 477
1 1 1 1 476
1 1 1 1 475
1 1 1 1 474
1 1 1 1 473
1 1 1 1 472
1 1 1 1 471
1 1 2 0 468 378
1 1 2 0 468 288
1 1 2 0 465 375
1 1 2 0 465 285
1 1 2 0 462 372
1 1 2 0 462 282
1 1 2 0 459 369
1 1 2 0 459 279
1 1 2 0 456 366
1 1 2 0 456 276
1 1 2 0 453 363
1 1 2 0 453 273
1 1 2 0 450 360
1 1 2 0 450 270
1 1 2 0 447 357
1 1 2 0 447 267
1 1 2 0 444 354
1 1 2 0 444 264
1 1 2 0 441 351
1 1 2 0 441 261
1 1 2 0 438 348
1 1 2 0 438 258
1 1 2 0 435 345
1 1 2 0 435 255
1 1 2 0 432 342
1 1 2 0 432 252
1 1 2 0 429 339
1 1 2 0 429 249
1 1 2 0 426 336
1 1 2 0 426 246
1 1 2 0 423 333
1 1 2 0 423 243
1 1 2 0 420 330
1 1 2 0 420 240
1 1 2 0 417 327
1 1 2 0 417 237
1 1 2 0 414 324
1 1 2 0 414 234
1 1 2 0 411 321
1 1 2 0 411 231
1 1 2 0 408 318
1 1 2 0 408 228
1 1 2 0 405 315
1 1 2 0 405 225
1 1 2 0 402 312
1 1 2 0 402 222
1 1 2 0 399 309
1 1 2 0 399 219
1 1 2 0 396 306
1 1 2 0 396 216
1 1 2 0 393 303
1 1 2 0 393 213
1 1 2 0 390 300
1 1 2 0 390 210
1 1 2 0 387 297
1 1 2 0 387 207
1 1 2 0 384 294
1 1 2 0 384 204
1 1 2 0 381 291
1 1 2 0 381 201
1 1 2 0 378 468
1 1 2 0 378 288
1 1 2 0 375 465
1 1 2 0 375 285
1 1 2 0 372 462
1 1 2 0 372 282
1 1 2 0 369 459
1 1 2 0 369 279
1 1 2 0 366 456
1 1 2 0 366 276
1 1 2 0 363 453
1 1 2 0 363 273
1 1 2 0 360 450
1 1 2 0 360 270
1 1 2 0 357 447
1 1 2 0 357 267
1 1 2 0 354 444
1 1 2 0 354 264
1 1 2 0 351 441
1 1 2 0 351 261
1 1 2 0 348 438
1 1 2 0 348 258
1 1 2 0 345 435
1 1 2 0 345 255
1 1 2 0 342 432
1 1 2 0 342 252
1 1 2 0 339 429
1 1 2 0 339 249
1 1 2 0 336 426
1 1 2 0 336 246
1 1 2 0 333 423
1 1 2 0 333 243
1 1 2 0 330 420
1 1 2 0 330 240
1 1 2 0 327 417
1 1 2 0 327 237
1 1 2 0 324 414
1 1 2 0 324 234
1 1 2 0 321 411
1 1 2 0 321 231
1 1 2 0 318 408
1 1 2 0 318 228
1 1 2 0 315 405
1 1 2 0 315 225
1 1 2 0 312 402
1 1 2 0 312 222
1 1 2 0 309 399
1 1 2 0 309 219
1 1 2 0 306 396
1 1 2 0 306 216
1 1 2 0 303 393
1 1 2 0 303 213
1 1 2 0 300 390
1 1 2 0 300 210
1 1 2 0 297 387
1 1 2 0 297 207
1 1 2 0 294 384
1 1 2 0 294 204
1 1 2 0 291 381
1 1 2 0 291 201
1 1 2 0 288 468
1 1 2 0 288 378
1 1 2 0 285 465
1 1 2 0 285 375
1 1 2 0 282 462
1 1 2 0 282 372
1 1 2 0 279 459
1 1 2 0 279 369
1 1 2 0 276 456
1 1 2 0 276 366
1 1 2 0 273 453
1 1 2 0 273 363
1 1 2 0 270 450
1 1 2 0 270 360
1 1 2 0 267 447
1 1 2 0 267 357
1 1 2 0 264 444
1 1 2 0 264 354
1 1 2 0 261 441
1 1 2 0 261 351
1 1 2 0 258 438
1 1 2 0 258 348
1 1 2 0 255 435
1 1 2 0 255 345
1 1 2 0 252 432
1 1 2 0 252 342
1 1 2 0 249 429
1 1 2 0 249 339
1 1 2 0 246 426
1 1 2 0 246 336
1 1 2 0 243 423
1 1 2 0 243 333
1 1 2 0 240 420
1 1 2 0 240 330
1 1 2 0 237 417
1 1 2 0 237 327
1 1 2 0 234 414
1 1 2 0 234 324
1 1 2 0 231 411
1 1 2 0 231 321
1 1 2 0 228 408
1 1 2 0 228 318
1 1 2 0 225 405
1 1 2 0 225 315
1 1 2 0 222 402
1 1 2 0 222 312
1 1 2 0 219 399
1 1 2 0 219 309
1 1 2 0 216 396
1 1 2 0 216 306
1 1 2 0 213 393
1 1 2 0 213 303
1 1 2 0 210 390
1 1 2 0 210 300
1 1 2 0 207 387
1 1 2 0 207 297
1 1 2 0 204 384
1 1 2 0 204 294
1 1 2 0 201 381
1 1 2 0 201 291
1 1 2 0 468 459
1 1 2 0 468 450
1 1 2 0 468 432
1 1 2 0 468 426
1 1 2 0 468 423
1 1 2 0 468 417
1 1 2 0 465 450
1 1 2 0 465 435
1 1 2 0 465 432
1 1 2 0 465 426
1 1 2 0 465 417
1 1 2 0 462 459
1 1 2 0 462 444
1 1 2 0 462 420
1 1 2 0 462 384
1 1 2 0 459 456
1 1 2 0 459 435
1 1 2 0 459 420
1 1 2 0 459 387
1 1 2 0 459 384
1 1 2 0 456 447
1 1 2 0 456 444
1 1 2 0 456 405
1 1 2 0 456 396
1 1 2 0 453 435
1 1 2 0 453 411
1 1 2 0 453 393
1 1 2 0 450 447
1 1 2 0 450 426
1 1 2 0 450 411
1 1 2 0 450 405
1 1 2 0 450 387
1 1 2 0 447 429
1 1 2 0 447 423
1 1 2 0 447 402
1 1 2 0 447 387
1 1 2 0 444 441
1 1 2 0 444 399
1 1 2 0 444 393
1 1 2 0 444 387
1 1 2 0 441 438
1 1 2 0 441 429
1 1 2 0 441 423
1 1 2 0 441 414
1 1 2 0 441 408
1 1 2 0 438 432
1 1 2 0 438 414
1 1 2 0 438 411
1 1 2 0 438 408
1 1 2 0 438 399
1 1 2 0 435 429
1 1 2 0 435 420
1 1 2 0 435 417
1 1 2 0 435 402
1 1 2 0 432 429
1 1 2 0 432 411
1 1 2 0 432 405
1 1 2 0 432 399
1 1 2 0 429 411
1 1 2 0 429 408
1 1 2 0 429 402
1 1 2 0 429 381
1 1 2 0 426 396
1 1 2 0 426 387
1 1 2 0 423 402
1 1 2 0 423 399
1 1 2 0 423 396
1 1 2 0 420 390
1 1 2 0 417 411
1 1 2 0 414 411
1 1 2 0 408 393
1 1 2 0 408 387
1 1 2 0 405 402
1 1 2 0 402 396
1 1 2 0 402 384
1 1 2 0 399 396
1 1 2 0 399 393
1 1 2 0 396 393
1 1 2 0 396 384
1 1 2 0 393 390
1 1 2 0 390 387
1 1 2 0 387 384
1 1 2 0 378 369
1 1 2 0 378 360
1 1 2 0 378 342
1 1 2 0 378 336
1 1 2 0 378 333
1 1 2 0 378 327
1 1 2 0 375 360
1 1 2 0 375 345
1 1 2 0 375 342
1 1 2 0 375 336
1 1 2 0 375 327
1 1 2 0 372 369
1 1 2 0 372 354
1 1 2 0 372 330
1 1 2 0 372 294
1 1 2 0 369 366
1 1 2 0 369 345
1 1 2 0 369 330
1 1 2 0 369 297
1 1 2 0 369 294
1 1 2 0 366 357
1 1 2 0 366 354
1 1 2 0 366 315
1 1 2 0 366 306
1 1 2 0 363 345
1 1 2 0 363 321
1 1 2 0 363 303
1 1 2 0 360 357
1 1 2 0 360 336
1 1 2 0 360 321
1 1 2 0 360 315
1 1 2 0 360 297
1 1 2 0 357 339
1 1 2 0 357 333
1 1 2 0 357 312
1 1 2 0 357 297
1 1 2 0 354 351
1 1 2 0 354 309
1 1 2 0 354 303
1 1 2 0 354 297
1 1 2 0 351 348
1 1 2 0 351 339
1 1 2 0 351 333
1 1 2 0 351 324
1 1 2 0 351 318
1 1 2 0 348 342
1 1 2 0 348 324
1 1 2 0 348 321
1 1 2 0 348 318
1 1 2 0 348 309
1 1 2 0 345 339
1 1 2 0 345 330
1 1 2 0 345 327
1 1 2 0 345 312
1 1 2 0 342 339
1 1 2 0 342 321
1 1 2 0 342 315
1 1 2 0 342 309
1 1 2 0 339 321
1 1 2 0 339 318
1 1 2 0 339 312
1 1 2 0 339 291
1 1 2 0 336 306
1 1 2 0 336 297
1 1 2 0 333 312
1 1 2 0 333 309
1 1 2 0 333 306
1 1 2 0 330 300
1 1 2 0 327 321
1 1 2 0 324 321
1 1 2 0 318 303
1 1 2 0 318 297
1 1 2 0 315 312
1 1 2 0 312 306
1 1 2 0 312 294
1 1 2 0 309 306
1 1 2 0 309 303
1 1 2 0 306 303
1 1 2 0 306 294
1 1 2 0 303 300
1 1 2 0 300 297
1 1 2 0 297 294
1 1 2 0 288 279
1 1 2 0 288 270
1 1 2 0 288 252
1 1 2 0 288 246
1 1 2 0 288 243
1 1 2 0 288 237
1 1 2 0 285 270
1 1 2 0 285 255
1 1 2 0 285 252
1 1 2 0 285 246
1 1 2 0 285 237
1 1 2 0 282 279
1 1 2 0 282 264
1 1 2 0 282 240
1 1 2 0 282 204
1 1 2 0 279 276
1 1 2 0 279 255
1 1 2 0 279 240
1 1 2 0 279 207
1 1 2 0 279 204
1 1 2 0 276 267
1 1 2 0 276 264
1 1 2 0 276 225
1 1 2 0 276 216
1 1 2 0 273 255
1 1 2 0 273 231
1 1 2 0 273 213
1 1 2 0 270 267
1 1 2 0 270 246
1 1 2 0 270 231
1 1 2 0 270 225
1 1 2 0 270 207
1 1 2 0 267 249
1 1 2 0 267 243
1 1 2 0 267 222
1 1 2 0 267 207
1 1 2 0 264 261
1 1 2 0 264 219
1 1 2 0 264 213
1 1 2 0 264 207
1 1 2 0 261 258
1 1 2 0 261 249
1 1 2 0 261 243
1 1 2 0 261 234
1 1 2 0 261 228
1 1 2 0 258 252
1 1 2 0 258 234
1 1 2 0 258 231
1 1 2 0 258 228
1 1 2 0 258 219
1 1 2 0 255 249
1 1 2 0 255 240
1 1 2 0 255 237
1 1 2 0 255 222
1 1 2 0 252 249
1 1 2 0 252 231
1 1 2 0 252 225
1 1 2 0 252 219
1 1 2 0 249 231
1 1 2 0 249 228
1 1 2 0 249 222
1 1 2 0 249 201
1 1 2 0 246 216
1 1 2 0 246 207
1 1 2 0 243 222
1 1 2 0 243 219
1 1 2 0 243 216
1 1 2 0 240 210
1 1 2 0 237 231
1 1 2 0 234 231
1 1 2 0 228 213
1 1 2 0 228 207
1 1 2 0 225 222
1 1 2 0 222 216
1 1 2 0 222 204
1 1 2 0 219 216
1 1 2 0 219 213
1 1 2 0 216 213
1 1 2 0 216 204
1 1 2 0 213 210
1 1 2 0 210 207
1 1 2 0 207 204
0
201 col(29,3)
204 col(28,3)
207 col(27,3)
210 col(26,3)
213 col(25,3)
216 col(24,3)
219 col(23,3)
222 col(22,3)
225 col(21,3)
228 col(20,3)
231 col(19,3)
234 col(18,3)
237 col(17,3)
240 col(16,3)
243 col(15,3)
246 col(14,3)
249 col(13,3)
252 col(12,3)
255 col(11,3)
258 col(10,3)
261 col(9,3)
264 col(8,3)
267 col(7,3)
270 col(6,3)
273 col(5,3)
276 col(4,3)
279 col(3,3)
282 col(2,3)
285 col(1,3)
288 col(0,3)
291 col(29,2)
294 col(28,2)
297 col(27,2)
300 col(26,2)
303 col(25,2)
306 col(24,2)
309 col(23,2)
312 col(22,2)
315 col(21,2)
318 col(20,2)
321 col(19,2)
324 col(18,2)
327 col(17,2)
330 col(16,2)
333 col(15,2)
336 col(14,2)
339 col(13,2)
342 col(12,2)
345 col(11,2)
348 col(10,2)
351 col(9,2)
354 col(8,2)
357 col(7,2)
360 col(6,2)
363 col(5,2)
366 col(4,2)
369 col(3,2)
372 col(2,2)
375 col(1,2)
378 col(0,2)
381 col(29,1)
384 col(28,1)
387 col(27,1)
390 col(26,1)
393 col(25,1)
396 col(24,1)
399 col(23,1)
402 col(22,1)
405 col(21,1)
408 col(20,1)
411 col(19,1)
414 col(18,1)
417 col(17,1)
420 col(16,1)
423 col(15,1)
426 col(14,1)
429 col(13,1)
432 col(12,1)
435 col(11,1)
438 col(10,1)
441 col(9,1)
444 col(8,1)
447 col(7,1)
450 col(6,1)
453 col(5,1)
456 col(4,1)
459 col(3,1)
462 col(2,1)
465 col(1,1)
468 col(0,1)
0
B+
0
B-
1
0
1
"""
output = """
"""
| 14.079606
| 17
| 0.626834
| 5,762
| 15,741
| 1.712426
| 0.087643
| 0.104794
| 0.129827
| 0.172697
| 0.431438
| 0.012162
| 0
| 0
| 0
| 0
| 0
| 0.943957
| 0.354997
| 15,741
| 1,117
| 18
| 14.092211
| 0.027874
| 0
| 0
| 0.001791
| 0
| 0
| 0.998031
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d9f0c3e1c6cb021832b2df460600484d8fb81443
| 1,909
|
py
|
Python
|
tests/test_wrappers.py
|
BB-UCL/autograd-forward
|
bf5be940a21af52b111a79416c27c8be29b1e6b6
|
[
"MIT"
] | 30
|
2017-05-28T19:35:22.000Z
|
2020-01-21T08:18:24.000Z
|
tests/test_wrappers.py
|
BB-UCL/autograd-forward
|
bf5be940a21af52b111a79416c27c8be29b1e6b6
|
[
"MIT"
] | null | null | null |
tests/test_wrappers.py
|
BB-UCL/autograd-forward
|
bf5be940a21af52b111a79416c27c8be29b1e6b6
|
[
"MIT"
] | 3
|
2017-06-20T01:35:28.000Z
|
2020-07-24T14:57:09.000Z
|
from __future__ import absolute_import
import autograd.numpy as np
import autograd.numpy.random as npr
from autograd.util import *
from autograd import jacobian, hessian
from autograd_forward import hessian_vector_product, jacobian_vector_product
npr.seed(1)
def test_hessian_vector_product():
fun = lambda a: np.sum(np.sin(a))
a = npr.randn(5)
v = npr.randn(5)
H = hessian(fun)(a)
check_equivalent(np.dot(H, v), hessian_vector_product(fun)(a, v))
def test_hessian_matrix_product():
fun = lambda a: np.sum(np.sin(a))
a = npr.randn(5, 4)
V = npr.randn(5, 4)
H = hessian(fun)(a)
check_equivalent(np.tensordot(H, V), hessian_vector_product(fun)(a, V))
def test_hessian_tensor_product():
fun = lambda a: np.sum(np.sin(a))
a = npr.randn(5, 4, 3)
V = npr.randn(5, 4, 3)
H = hessian(fun)(a)
check_equivalent(np.tensordot(H, V, axes=np.ndim(V)), hessian_vector_product(fun)(a, V))
def test_fwd_rev_hessian_vector_product():
fun = lambda a: np.sum(np.sin(a))
a = npr.randn(5)
v = npr.randn(5)
H = hessian(fun)(a)
check_equivalent(np.dot(H, v), hessian_vector_product(fun, method='fwd-rev')(a, v))
def test_fwd_rev_hessian_matrix_product():
fun = lambda a: np.sum(np.sin(a))
a = npr.randn(5, 4)
V = npr.randn(5, 4)
H = hessian(fun)(a)
check_equivalent(np.tensordot(H, V), hessian_vector_product(fun, method='fwd-rev')(a, V))
def test_fwd_rev_hessian_tensor_product():
fun = lambda a: np.sum(np.sin(a))
a = npr.randn(5, 4, 3)
V = npr.randn(5, 4, 3)
H = hessian(fun)(a)
check_equivalent(np.tensordot(H, V, axes=np.ndim(V)), hessian_vector_product(fun, method='fwd-rev')(a, V))
def test_jacobian_vector_product():
fun = lambda a: np.roll(np.sin(a), 1)
a = npr.randn(5)
V = npr.randn(5)
J = jacobian(fun)(a)
check_equivalent(np.dot(J, V), jacobian_vector_product(fun)(a, V))
| 32.913793
| 110
| 0.668413
| 333
| 1,909
| 3.657658
| 0.132132
| 0.114943
| 0.103448
| 0.151067
| 0.788998
| 0.77422
| 0.73399
| 0.729064
| 0.712644
| 0.705255
| 0
| 0.017767
| 0.174437
| 1,909
| 57
| 111
| 33.491228
| 0.755076
| 0
| 0
| 0.510204
| 0
| 0
| 0.011001
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.122449
| 0
| 0.265306
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d9f7678b839a2311550ad117754c54ed84332c58
| 20
|
py
|
Python
|
icepp/compiler/optimizer/circuit/__init__.py
|
pearcandy/aqcel
|
86e2d97d427f6a31ef223c69defbe3f853a69aa2
|
[
"Apache-2.0"
] | null | null | null |
icepp/compiler/optimizer/circuit/__init__.py
|
pearcandy/aqcel
|
86e2d97d427f6a31ef223c69defbe3f853a69aa2
|
[
"Apache-2.0"
] | null | null | null |
icepp/compiler/optimizer/circuit/__init__.py
|
pearcandy/aqcel
|
86e2d97d427f6a31ef223c69defbe3f853a69aa2
|
[
"Apache-2.0"
] | null | null | null |
from .aqcel import *
| 20
| 20
| 0.75
| 3
| 20
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 20
| 1
| 20
| 20
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
8a4ea63efd0b8b4061ecc3d2df04785790253eec
| 110
|
py
|
Python
|
ppci/arch/cc.py
|
rakati/ppci-mirror
|
8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2
|
[
"BSD-2-Clause"
] | 161
|
2020-05-31T03:29:42.000Z
|
2022-03-07T08:36:19.000Z
|
ppci/arch/cc.py
|
rakati/ppci-mirror
|
8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2
|
[
"BSD-2-Clause"
] | 74
|
2020-05-26T18:05:48.000Z
|
2021-02-13T21:55:39.000Z
|
ppci/arch/cc.py
|
rakati/ppci-mirror
|
8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2
|
[
"BSD-2-Clause"
] | 19
|
2020-05-27T19:22:11.000Z
|
2022-02-17T18:53:52.000Z
|
""" Calling conventions """
class CallingConvention:
def __init__(self, name):
self.name = name
| 15.714286
| 29
| 0.645455
| 11
| 110
| 6.090909
| 0.727273
| 0.238806
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.236364
| 110
| 6
| 30
| 18.333333
| 0.797619
| 0.172727
| 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 | 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
| 1
| 0
|
0
| 5
|
8a526b6d34712eef7b3f999d100f0f64ce7297de
| 79
|
py
|
Python
|
segmentation_phenix/__init__.py
|
mmasinas/segmentation
|
7992a6c70dcf518162f64d3745542086a9a695e6
|
[
"Apache-2.0"
] | null | null | null |
segmentation_phenix/__init__.py
|
mmasinas/segmentation
|
7992a6c70dcf518162f64d3745542086a9a695e6
|
[
"Apache-2.0"
] | null | null | null |
segmentation_phenix/__init__.py
|
mmasinas/segmentation
|
7992a6c70dcf518162f64d3745542086a9a695e6
|
[
"Apache-2.0"
] | null | null | null |
from .segmentation import mixture_model, read_channel, blur_frame, blur_channel
| 79
| 79
| 0.873418
| 11
| 79
| 5.909091
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075949
| 79
| 1
| 79
| 79
| 0.890411
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
8a5a22ffc5edde9b77dc9aceb82163d1783134b1
| 275
|
py
|
Python
|
crescent/resources/api_gateway_v2/integration/tls_config.py
|
mpolatcan/zepyhrus
|
2fd0b1b9b21613b5876a51fe8b5f9e3afbec1b67
|
[
"Apache-2.0"
] | 1
|
2020-03-26T19:20:03.000Z
|
2020-03-26T19:20:03.000Z
|
crescent/resources/api_gateway_v2/integration/tls_config.py
|
mpolatcan/zepyhrus
|
2fd0b1b9b21613b5876a51fe8b5f9e3afbec1b67
|
[
"Apache-2.0"
] | null | null | null |
crescent/resources/api_gateway_v2/integration/tls_config.py
|
mpolatcan/zepyhrus
|
2fd0b1b9b21613b5876a51fe8b5f9e3afbec1b67
|
[
"Apache-2.0"
] | null | null | null |
from crescent.core import Model
class TlsConfig(Model):
def __init__(self):
super(TlsConfig, self).__init__()
def ServerNameToVerify(self, server_name_to_verify: str):
return self._set_field(self.ServerNameToVerify.__name__, server_name_to_verify)
| 27.5
| 87
| 0.752727
| 34
| 275
| 5.5
| 0.588235
| 0.106952
| 0.128342
| 0.192513
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 275
| 9
| 88
| 30.555556
| 0.809524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0.166667
| 0.833333
| 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
| 1
| 1
| 0
|
0
| 5
|
8a6a052ce4ebf8a5ef3fff1463e33e07a29e4a82
| 123
|
py
|
Python
|
src/elementary_flask/presets/themes/default/__init__.py
|
xaled/flaskly
|
2ed66d89e42afba830d6c73c9f70f00d1dcac573
|
[
"MIT"
] | null | null | null |
src/elementary_flask/presets/themes/default/__init__.py
|
xaled/flaskly
|
2ed66d89e42afba830d6c73c9f70f00d1dcac573
|
[
"MIT"
] | null | null | null |
src/elementary_flask/presets/themes/default/__init__.py
|
xaled/flaskly
|
2ed66d89e42afba830d6c73c9f70f00d1dcac573
|
[
"MIT"
] | null | null | null |
from ._theme import DefaultTheme
# from .components import BootstrapTopNavigation
from .layouts import TopNavigationLayout
| 30.75
| 48
| 0.861789
| 12
| 123
| 8.75
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105691
| 123
| 3
| 49
| 41
| 0.954545
| 0.373984
| 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
| 1
| 0
|
0
| 5
|
8a72e3aec0c38a7e5275c4a699b7e1e160bc5ad9
| 2,261
|
py
|
Python
|
plot.py
|
kubaszpak/graph_algorithms
|
415d862810b3706efe945052436d7895060a4aa5
|
[
"MIT"
] | null | null | null |
plot.py
|
kubaszpak/graph_algorithms
|
415d862810b3706efe945052436d7895060a4aa5
|
[
"MIT"
] | null | null | null |
plot.py
|
kubaszpak/graph_algorithms
|
415d862810b3706efe945052436d7895060a4aa5
|
[
"MIT"
] | null | null | null |
import matplotlib.pyplot as plt
plt.plot([100, 500, 1000, 1500, 2000], [
0.07, 1.5, 5.3, 12.2, 19.5], 'b-', label='25% PRIM')
plt.plot([100, 500, 1000, 1500, 2000], [
0.2, 2.7, 10, 24.16, 36.5], 'r-', label='50% PRIM')
plt.plot([100, 500, 1000, 1500, 2000], [
0.23, 4.2, 13.4, 30, 54.3], 'k-', label='75% PRIM')
plt.plot([100, 500, 1000, 1500, 2000], [
0.3, 5, 17.6, 43.7, 68], 'g-', label='99% PRIM')
plt.plot([100, 500, 1000, 1500, 2000], [
0.03, 0.3, 1, 1.14, 2.2], 'c-', label='25% DIJKSTRA')
plt.plot([100, 500, 1000, 1500, 2000], [
0.03, 0.22, 1.05, 2.1, 3], 'm-', label='50% DIJKSTRA')
plt.plot([100, 500, 1000, 1500, 2000], [
0.04, 0.4, 1.09, 2.55, 4.2], 'y-', label='75% DIJKSTRA')
plt.plot([100, 500, 1000, 1500, 2000], [
0.05, 0.55, 1.4, 3.1, 5], 'pink', label='99% DIJKSTRA')
plt.title('Time of algoritms execution in Adjency Lists')
plt.xlabel('Number of vertices')
plt.ylabel('Time [ms]')
# plt.ylim([100, 200])
plt.legend()
plt.show()
# AdjencyLists
# plt.plot([100, 500, 1000, 1500, 2000], [
# 0.07, 1.5, 5.3, 12.2, 19.5], 'c-', label='25% PRIM')
# plt.plot([100, 500, 1000, 1500, 2000], [
# 9.5, x, x, x, x], 'm-', label='50% PRIM')
# plt.plot([100, 500, 1000, 1500, 2000], [
# x, x, x, x, x], 'y-', label='75% PRIM')
# plt.plot([100, 500, 1000, 1500, 2000], [
# x, x, x, x, x], 'pink', label='99% PRIM')
# AdjencyMatrix
plt.plot([100, 500, 1000, 1500, 2000], [
0.15, 2.5, 8.9, 19.5, 31.1], 'b-', label='25% PRIM')
plt.plot([100, 500, 1000, 1500, 2000], [
0.20, 4, 13.5, 34, 56.6], 'r-', label='50% PRIM')
plt.plot([100, 500, 1000, 1500, 2000], [
0.24, 4.5, 16.5, 37, 67.2], 'k-', label='75% PRIM')
plt.plot([100, 500, 1000, 1500, 2000], [
0.25, 4.6, 17.5, 41, 69], 'g-', label='99% PRIM')
plt.plot([100, 500, 1000, 1500, 2000], [
0.06, 0.8, 3.1, 7.3, 12], 'c-', label='25% DIJKSTRA')
plt.plot([100, 500, 1000, 1500, 2000], [
0.1, 1.22, 4.7, 10.5, 18.4], 'm-', label='50% DIJKSTRA')
plt.plot([100, 500, 1000, 1500, 2000], [
0.12, 1.66, 6.5, 13.6, 23], 'y-', label='75% DIJKSTRA')
plt.plot([100, 500, 1000, 1500, 2000], [
0.15, 2, 7.12, 14.7, 26.1], 'pink', label='99% DIJKSTRA')
| 37.683333
| 66
| 0.519239
| 424
| 2,261
| 2.768868
| 0.212264
| 0.11925
| 0.170358
| 0.221465
| 0.67121
| 0.67121
| 0.67121
| 0.67121
| 0.67121
| 0.67121
| 0
| 0.346607
| 0.211411
| 2,261
| 59
| 67
| 38.322034
| 0.311834
| 0.185316
| 0
| 0.421053
| 0
| 0
| 0.145902
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.026316
| 0
| 0.026316
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8a9d4c12932bfbd50c511324a56f1dbd16c7e746
| 24,051
|
py
|
Python
|
q2_types/per_sample_sequences/tests/test_format.py
|
Leo-Simpson/q2-types
|
2946fda4fe2817fde1646ddcdc8e8ebf41abe5a4
|
[
"BSD-3-Clause"
] | null | null | null |
q2_types/per_sample_sequences/tests/test_format.py
|
Leo-Simpson/q2-types
|
2946fda4fe2817fde1646ddcdc8e8ebf41abe5a4
|
[
"BSD-3-Clause"
] | null | null | null |
q2_types/per_sample_sequences/tests/test_format.py
|
Leo-Simpson/q2-types
|
2946fda4fe2817fde1646ddcdc8e8ebf41abe5a4
|
[
"BSD-3-Clause"
] | null | null | null |
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2020, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
import os.path
import shutil
import unittest
import string
import pandas as pd
from q2_types.per_sample_sequences import (
CasavaOneEightSingleLanePerSampleDirFmt,
CasavaOneEightLanelessPerSampleDirFmt,
FastqGzFormat, YamlFormat, FastqManifestFormat,
FastqAbsolutePathManifestFormat,
SingleEndFastqManifestPhred33, SingleEndFastqManifestPhred64,
PairedEndFastqManifestPhred33, PairedEndFastqManifestPhred64,
SingleEndFastqManifestPhred33V2, SingleEndFastqManifestPhred64V2,
PairedEndFastqManifestPhred33V2, PairedEndFastqManifestPhred64V2,
SingleLanePerSampleSingleEndFastqDirFmt,
SingleLanePerSamplePairedEndFastqDirFmt,
QIIME1DemuxFormat, QIIME1DemuxDirFmt
)
from qiime2.plugin.testing import TestPluginBase
from qiime2.plugin import ValidationError
class TestAbsoluteFastqManifestV2Formats(TestPluginBase):
package = 'q2_types.per_sample_sequences.tests'
def setUp(self):
super().setUp()
self.se_formats = [SingleEndFastqManifestPhred33V2,
SingleEndFastqManifestPhred64V2]
self.pe_formats = [PairedEndFastqManifestPhred33V2,
PairedEndFastqManifestPhred64V2]
def template_manifest(self, filepath, ctx):
with open(filepath) as fh:
tmpl = string.Template(fh.read())
basename = os.path.basename(filepath)
file_ = os.path.join(self.temp_dir.name, basename)
with open(file_, 'w') as fh:
fh.write(tmpl.substitute(**ctx))
return file_
def test_validate_se_positive(self):
s1 = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq.gz')
s2 = self.get_data_path('Human-Armpit.fastq.gz')
fp = self.get_data_path('absolute_manifests_v2/single-MANIFEST')
manifest = self.template_manifest(fp, {'s1': s1, 's2': s2})
for fmt in self.se_formats:
fmt(manifest, mode='r').validate()
def test_validate_pe_positive(self):
s1f = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq.gz')
s1r = self.get_data_path('Human-Armpit.fastq.gz')
s2f = self.get_data_path('Human-Armpit_S2_L001_R1_001.fastq.gz')
s2r = self.get_data_path('Human-Kneecap_S1_R1_001.fastq.gz')
fp = self.get_data_path('absolute_manifests_v2/paired-MANIFEST')
manifest = self.template_manifest(fp, {'s1f': s1f, 's1r': s1r,
's2f': s2f, 's2r': s2r})
for fmt in self.pe_formats:
fmt(manifest, mode='r').validate()
def test_extra_columns(self):
s1f = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq.gz')
s1r = self.get_data_path('Human-Armpit.fastq.gz')
s2f = self.get_data_path('Human-Armpit_S2_L001_R1_001.fastq.gz')
s2r = self.get_data_path('Human-Kneecap_S1_R1_001.fastq.gz')
fp = self.get_data_path('absolute_manifests_v2/multicol-MANIFEST')
manifest = self.template_manifest(fp, {'s1f': s1f, 's1r': s1r,
's2f': s2f, 's2r': s2r})
for fmt in self.se_formats:
fmt(manifest, mode='r').validate()
def test_invalid_metadata(self):
manifest = self.get_data_path('absolute_manifests/single-MANIFEST')
for fmt in self.se_formats:
with self.assertRaisesRegex(ValidationError, 'unrecognized ID'):
fmt(manifest, mode='r').validate()
def test_missing_column_se(self):
manifest = self.get_data_path('absolute_manifests_v2/paired-MANIFEST')
for fmt in self.se_formats:
with self.assertRaisesRegex(ValidationError, 'is not a column'):
fmt(manifest, mode='r').validate()
def test_missing_columns_pe(self):
manifest = self.get_data_path('absolute_manifests_v2/single-MANIFEST')
for fmt in self.pe_formats:
with self.assertRaisesRegex(ValidationError, 'is not a column'):
fmt(manifest, mode='r').validate()
def test_invalid_column_type(self):
manifest = self.get_data_path('absolute_manifests_v2/numeric-MANIFEST')
for fmt in self.se_formats:
with self.assertRaisesRegex(ValidationError, 'is not a column'):
fmt(manifest, mode='r').validate()
def test_missing_files(self):
manifest = self.get_data_path('absolute_manifests_v2/missing-MANIFEST')
for fmt in self.pe_formats:
with self.assertRaisesRegex(
ValidationError,
'Missing.*line 1.*absolute-filepath'):
fmt(manifest, mode='r').validate()
def test_path_not_found(self):
# we make sure the file is missing by skipping the templating step
manifest = self.get_data_path('absolute_manifests_v2/single-MANIFEST')
for fmt in self.se_formats:
with self.assertRaisesRegex(
ValidationError,
'line 1.*absolute-filepath.*Human-Kneecap'):
fmt(manifest, mode='r').validate()
def test_duplicate_filepaths(self):
s1 = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq.gz')
fp = self.get_data_path('absolute_manifests_v2/single-MANIFEST')
manifest = self.template_manifest(fp, {'s1': s1, 's2': s1})
for fmt in self.se_formats:
with self.assertRaisesRegex(
ValidationError,
'line 2.*absolute-filepath.*Peanut-Eyeball.*'
'line 1.*absolute-filepath.*Human-Kneecap'):
fmt(manifest, mode='r').validate()
class TestAbsoluteFastqManifestFormats(TestPluginBase):
package = 'q2_types.per_sample_sequences.tests'
def setUp(self):
super().setUp()
self.formats = [FastqAbsolutePathManifestFormat,
SingleEndFastqManifestPhred33,
SingleEndFastqManifestPhred64,
PairedEndFastqManifestPhred33,
PairedEndFastqManifestPhred64]
def test_validate_positive(self):
s1 = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq.gz')
for file in ['single-MANIFEST', 'paired-MANIFEST', 'long-MANIFEST']:
filepath = self.get_data_path('absolute_manifests/%s' % file)
with open(filepath) as fh:
tmpl = string.Template(fh.read())
file_ = os.path.join(self.temp_dir.name, file)
with open(file_, 'w') as fh:
fh.write(tmpl.substitute(path=os.path.dirname(s1)))
for format in self.formats:
format(file_, mode='r').validate()
def test_validate_negative_no_data(self):
filepath = self.get_data_path('no-data-MANIFEST')
for format in self.formats:
with self.assertRaisesRegex(ValidationError, 'No header found'):
format(filepath, mode='r').validate()
def test_validate_negative_empty(self):
filepath = self.get_data_path('empty-MANIFEST')
for format in self.formats:
with self.assertRaisesRegex(ValidationError, 'No header found'):
format(filepath, mode='r').validate()
def test_validate_negative_header_no_records(self):
filepath = self.get_data_path('empty-records-MANIFEST')
for format in self.formats:
with self.assertRaisesRegex(ValidationError, 'No sample records'):
format(filepath, mode='r').validate()
def test_validate_negative_not_manifest(self):
filepath = self.get_data_path('not-MANIFEST')
for format in self.formats:
with self.assertRaisesRegex(ValidationError, 'line 1.*filename'):
format(filepath, mode='r').validate()
def test_validate_negative_jagged_manifest(self):
filepath = self.get_data_path('absolute_manifests/jagged-MANIFEST')
for format in self.formats:
with self.assertRaisesRegex(ValidationError,
'line 3.*could not be found'):
format(filepath, mode='r').validate()
def test_validate_negative_invalid_direction(self):
s1 = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq.gz')
with open(self.get_data_path('invalid-direction-MANIFEST')) as fh:
tmpl = string.Template(fh.read())
file_ = os.path.join(self.temp_dir.name, 'invalid-direction-MANIFEST')
with open(file_, 'w') as fh:
fh.write(tmpl.substitute(path=os.path.dirname(s1)))
for format in self.formats:
with self.assertRaisesRegex(ValidationError, 'direction.*peanut'):
format(file_, mode='r').validate()
class TestRelativeFastqManifestFormats(TestPluginBase):
package = 'q2_types.per_sample_sequences.tests'
def test_validate_positive(self):
for file in ['single-MANIFEST', 'paired-MANIFEST', 'long-MANIFEST']:
filepath = self.get_data_path('relative_manifests/%s' % file)
FastqManifestFormat(filepath, mode='r').validate()
def test_validate_negative(self):
files = ['no-data-MANIFEST', 'not-MANIFEST',
'relative_manifests/jagged-MANIFEST']
for file in files:
filepath = self.get_data_path(file)
with self.assertRaisesRegex(ValidationError,
'FastqManifestFormat'):
FastqManifestFormat(filepath, mode='r').validate()
class TestFastqGzFormat(TestPluginBase):
package = 'q2_types.per_sample_sequences.tests'
def test_validate_positive(self):
filepath = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq.gz')
format = FastqGzFormat(filepath, mode='r')
format.validate()
def test_validate_negative(self):
filepath = self.get_data_path('not-fastq.fastq.gz')
format = FastqGzFormat(filepath, mode='r')
with self.assertRaisesRegex(ValidationError, 'Header.*1'):
format.validate()
def test_validate_mixed_case(self):
filepath = self.get_data_path('mixed-case.fastq.gz')
format = FastqGzFormat(filepath, mode='r')
with self.assertRaisesRegex(ValidationError, 'Lowercase.*2'):
format.validate()
def test_validate_uncompressed(self):
filepath = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq')
format = FastqGzFormat(filepath, mode='r')
with self.assertRaisesRegex(ValidationError, 'uncompressed'):
format.validate()
def test_incomplete_record_qual(self):
filepath = self.get_data_path('incomplete-quality.fastq.gz')
format = FastqGzFormat(filepath, mode='r')
with self.assertRaisesRegex(ValidationError, 'quality.*9'):
format.validate()
def test_incomplete_record_sep(self):
filepath = self.get_data_path('incomplete-sep.fastq.gz')
format = FastqGzFormat(filepath, mode='r')
with self.assertRaisesRegex(ValidationError, 'separator.*9'):
format.validate()
def test_incomplete_record_sequence(self):
filepath = self.get_data_path('incomplete-sequence.fastq.gz')
format = FastqGzFormat(filepath, mode='r')
with self.assertRaisesRegex(ValidationError, 'sequence.*9'):
format.validate()
def test_invalid_record_sep(self):
filepath = self.get_data_path('invalid-sep.fastq.gz')
format = FastqGzFormat(filepath, mode='r')
with self.assertRaisesRegex(ValidationError, 'separator.*11'):
format.validate()
def test_invalid_quality_score_length(self):
filepath = self.get_data_path('invalid-quality.fastq.gz')
format = FastqGzFormat(filepath, mode='r')
with self.assertRaisesRegex(ValidationError, 'length.*9'):
format.validate()
def test_partial_record(self):
filepath = self.get_data_path('partial-record.fastq.gz')
format = FastqGzFormat(filepath, mode='r')
with self.assertRaisesRegex(ValidationError, 'sequence.*1'):
format.validate()
class TestFormats(TestPluginBase):
package = 'q2_types.per_sample_sequences.tests'
def test_yaml_format_validate_positive(self):
filepath = self.get_data_path('metadata.yml')
format = YamlFormat(filepath, mode='r')
format.validate()
def test_yaml_format_validate_negative(self):
filepath = self.get_data_path('not-metadata.yml')
format = YamlFormat(filepath, mode='r')
with self.assertRaisesRegex(ValidationError, 'YamlFormat'):
format.validate()
def test_casava_one_eight_slanepsample_dir_fmt_validate_positive(self):
filepath = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq.gz')
shutil.copy(filepath, self.temp_dir.name)
format = CasavaOneEightSingleLanePerSampleDirFmt(
self.temp_dir.name, mode='r')
format.validate()
def test_casava_one_eight_slanepsample_dir_fmt_manifest_property(self):
filepath = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq.gz')
shutil.copy(filepath, self.temp_dir.name)
format = CasavaOneEightSingleLanePerSampleDirFmt(
self.temp_dir.name, mode='r')
format.validate()
self.assertTrue(True)
self.assertIsInstance(format.manifest, pd.DataFrame)
def test_casava_one_eight_slanepsample_dir_fmt_validate_negative(self):
filepath = self.get_data_path('not-fastq.fastq.gz')
shutil.copy(filepath, self.temp_dir.name)
format = CasavaOneEightSingleLanePerSampleDirFmt(
self.temp_dir.name, mode='r')
with self.assertRaisesRegex(ValidationError,
'CasavaOneEightSingleLanePer'):
format.validate()
def test_casava_one_eight_slanepsample_dir_fmt_subdirectories(self):
bad_dir = os.path.join(self.temp_dir.name, 'Human_Kneecap')
os.mkdir(bad_dir)
bad_name = os.path.join(bad_dir, 'S1_L001_R1_001.fastq.gz')
fastq = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq.gz')
shutil.copy(fastq, bad_name)
format = CasavaOneEightSingleLanePerSampleDirFmt(self.temp_dir.name,
mode='r')
with self.assertRaisesRegex(ValidationError,
'subdirectory.*Human_Kneecap'):
format.validate()
def test_casava_one_eight_slanepsample_dir_fmt_missing_directions(self):
f = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq.gz')
r = self.get_data_path(
'paired_end_data/Human-Kneecap_S1_L001_R2_001.fastq.gz')
shutil.copy(f, self.temp_dir.name)
shutil.copy(r, self.temp_dir.name)
shutil.copy(
f, os.path.join(self.temp_dir.name,
'Human-Other_S1_L001_R1_001.fastq.gz'))
format = CasavaOneEightSingleLanePerSampleDirFmt(self.temp_dir.name,
mode='r')
with self.assertRaisesRegex(ValidationError, 'matching.*Human-Other'):
format.validate()
def test_casava_one_eight_slanepsample_dir_fmt_duplicate_forwards(self):
f = self.get_data_path('Human-Kneecap_S1_L001_R1_001.fastq.gz')
shutil.copy(f, self.temp_dir.name)
shutil.copy(
f, os.path.join(self.temp_dir.name,
'Human-Kneecap_S2_L001_R1_001.fastq.gz'))
format = CasavaOneEightSingleLanePerSampleDirFmt(self.temp_dir.name,
mode='r')
with self.assertRaisesRegex(ValidationError,
'Duplicate.*Human-Kneecap'):
format.validate()
def test_casava_one_eight_slanepsample_dir_fmt_duplicate_reverse(self):
r = self.get_data_path(
'paired_end_data/Human-Kneecap_S1_L001_R2_001.fastq.gz')
shutil.copy(r, self.temp_dir.name)
shutil.copy(
r, os.path.join(self.temp_dir.name,
'Human-Kneecap_S2_L001_R2_001.fastq.gz'))
format = CasavaOneEightSingleLanePerSampleDirFmt(self.temp_dir.name,
mode='r')
with self.assertRaisesRegex(ValidationError,
'Duplicate.*Human-Kneecap'):
format.validate()
def test_miseq_demux_dir_fmt_validate_positive(self):
filepath = self.get_data_path('Human-Kneecap_S1_R1_001.fastq.gz')
shutil.copy(filepath, self.temp_dir.name)
format = CasavaOneEightLanelessPerSampleDirFmt(self.temp_dir.name,
mode='r')
format.validate()
def test_miseq_demux_dir_fmt_validate_negative(self):
filepath = self.get_data_path('not-fastq.fastq.gz')
shutil.copy(filepath, self.temp_dir.name)
format = CasavaOneEightLanelessPerSampleDirFmt(self.temp_dir.name,
mode='r')
with self.assertRaisesRegex(ValidationError,
'CasavaOneEightLanelessPerSampleDirFmt'):
format.validate()
def test_slanepsample_single_end_fastq_dir_fmt_validate_positive(self):
filenames = ('single_end_data/MANIFEST', 'metadata.yml',
'Human-Kneecap_S1_L001_R1_001.fastq.gz')
for filename in filenames:
filepath = self.get_data_path(filename)
shutil.copy(filepath, self.temp_dir.name)
format = SingleLanePerSampleSingleEndFastqDirFmt(
self.temp_dir.name, mode='r')
format.validate()
def test_slanepsample_single_end_fastq_dir_fmt_validate_negative(self):
filenames = ('single_end_data/MANIFEST', 'metadata.yml',
'not-fastq.fastq.gz')
for filename in filenames:
filepath = self.get_data_path(filename)
shutil.copy(filepath, self.temp_dir.name)
format = SingleLanePerSampleSingleEndFastqDirFmt(
self.temp_dir.name, mode='r')
with self.assertRaisesRegex(ValidationError,
'SingleLanePerSampleSingle'):
format.validate()
def test_slanepsample_single_end_fastq_dir_fmt_validate_bad_paired(self):
filenames = ('paired_end_data/MANIFEST', 'metadata.yml',
'Human-Kneecap_S1_L001_R1_001.fastq.gz',
'paired_end_data/Human-Kneecap_S1_L001_R2_001.fastq.gz')
for filename in filenames:
filepath = self.get_data_path(filename)
shutil.copy(filepath, self.temp_dir.name)
format = SingleLanePerSampleSingleEndFastqDirFmt(
self.temp_dir.name, mode='r')
with self.assertRaisesRegex(ValidationError, 'Forward and reverse'):
format.validate()
def test_slanepsample_paired_end_fastq_dir_fmt_validate_positive(self):
filenames = ('paired_end_data/MANIFEST', 'metadata.yml',
'Human-Kneecap_S1_L001_R1_001.fastq.gz',
'paired_end_data/Human-Kneecap_S1_L001_R2_001.fastq.gz')
for filename in filenames:
filepath = self.get_data_path(filename)
shutil.copy(filepath, self.temp_dir.name)
format = SingleLanePerSamplePairedEndFastqDirFmt(
self.temp_dir.name, mode='r')
format.validate()
def test_slanepsample_paired_end_fastq_dir_fmt_validate_negative(self):
filenames = ('paired_end_data/MANIFEST', 'metadata.yml',
'not-fastq.fastq.gz')
for filename in filenames:
filepath = self.get_data_path(filename)
shutil.copy(filepath, self.temp_dir.name)
format = SingleLanePerSamplePairedEndFastqDirFmt(
self.temp_dir.name, mode='r')
with self.assertRaisesRegex(ValidationError,
'SingleLanePerSamplePaired'):
format.validate()
def test_slanepsample_paired_end_fastq_dir_fmt_validate_missing_pair(self):
filenames = ('single_end_data/MANIFEST', 'metadata.yml',
'Human-Kneecap_S1_L001_R1_001.fastq.gz')
for filename in filenames:
filepath = self.get_data_path(filename)
shutil.copy(filepath, self.temp_dir.name)
format = SingleLanePerSamplePairedEndFastqDirFmt(
self.temp_dir.name, mode='r')
with self.assertRaisesRegex(ValidationError,
'paired'):
format.validate()
def test_slanepsample_paired_end_fastq_dir_fmt_incorrect_filenames(self):
filenames = ('single_end_data/MANIFEST.txt', 'metadata.yml.txt',
'Human-Kneecap_S1_L001_R1_001.fastq.gz',
'paired_end_data/Human-Kneecap_S1_L001_R2_001.fastq.gz')
for filename in filenames:
filepath = self.get_data_path(filename)
shutil.copy(filepath, self.temp_dir.name)
format = SingleLanePerSamplePairedEndFastqDirFmt(
self.temp_dir.name, mode='r')
with self.assertRaisesRegex(ValidationError,
'Missing one or more files.*MANIFEST'):
format.validate()
class TestQIIME1DemuxFormat(TestPluginBase):
package = 'q2_types.per_sample_sequences.tests'
def setUp(self):
super().setUp()
self.positives = [
'empty', 'short.fna', 'long.fna', 'single-record.fna',
'with-descriptions.fna', 'split-libraries-output.fna'
]
self.negatives = [
'incomplete.fna', 'empty-header.fna',
'invalid-header.fna', 'description-only.fna', 'blank-line.fna',
'no-underscore-in-id.fna', 'no-sample-id.fna',
'no-secondary-id.fna', 'duplicate-ids.fna', 'empty-seq.fna',
'not-dna.fna'
]
def test_file_format_validate_positive(self):
for file in self.positives:
filepath = self.get_data_path('qiime1-demux-format/%s' % file)
QIIME1DemuxFormat(filepath, mode='r').validate()
def test_file_format_validate_negative(self):
for file in self.negatives:
filepath = self.get_data_path('qiime1-demux-format/%s' % file)
with self.assertRaisesRegex(ValidationError, 'QIIME1DemuxFormat'):
QIIME1DemuxFormat(filepath, mode='r').validate()
def test_directory_format_validate_positive(self):
for file in self.positives:
filepath = self.get_data_path('qiime1-demux-format/%s' % file)
shutil.copy(filepath, os.path.join(self.temp_dir.name, 'seqs.fna'))
QIIME1DemuxDirFmt(self.temp_dir.name, mode='r').validate()
def test_directory_format_validate_negative(self):
for file in self.negatives:
filepath = self.get_data_path('qiime1-demux-format/%s' % file)
shutil.copy(filepath, os.path.join(self.temp_dir.name, 'seqs.fna'))
with self.assertRaisesRegex(ValidationError, 'QIIME1DemuxFormat'):
QIIME1DemuxDirFmt(self.temp_dir.name, mode='r').validate()
def test_directory_format_wrong_filename(self):
filepath = self.get_data_path('qiime1-demux-format/short.fna')
shutil.copy(filepath, self.temp_dir.name)
with self.assertRaisesRegex(ValidationError,
r'QIIME1DemuxDirFmt.*seqs\.fna'):
QIIME1DemuxDirFmt(self.temp_dir.name, mode='r').validate()
if __name__ == "__main__":
unittest.main()
| 40.833616
| 79
| 0.641304
| 2,624
| 24,051
| 5.63186
| 0.092607
| 0.031263
| 0.049127
| 0.066991
| 0.824739
| 0.769455
| 0.756733
| 0.706591
| 0.673636
| 0.63784
| 0
| 0.021389
| 0.25159
| 24,051
| 588
| 80
| 40.903061
| 0.799611
| 0.01659
| 0
| 0.602273
| 0
| 0
| 0.171087
| 0.122066
| 0
| 0
| 0
| 0
| 0.090909
| 1
| 0.127273
| false
| 0
| 0.018182
| 0
| 0.175
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 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
| 5
|
8ac537df715bddd2c4b2a58ca6cafee9df15249c
| 149
|
py
|
Python
|
Automatas de pila/Automata Par e Impar/Clases/__init__.py
|
IngMachine/pygame
|
02ee8ace1a8002cb9f1c0d711bdfc0f44c562a6d
|
[
"Apache-2.0"
] | 1
|
2019-04-02T20:28:45.000Z
|
2019-04-02T20:28:45.000Z
|
Automatas de pila/Automata Par e Impar/Clases/__init__.py
|
IngMachine/pygame
|
02ee8ace1a8002cb9f1c0d711bdfc0f44c562a6d
|
[
"Apache-2.0"
] | null | null | null |
Automatas de pila/Automata Par e Impar/Clases/__init__.py
|
IngMachine/pygame
|
02ee8ace1a8002cb9f1c0d711bdfc0f44c562a6d
|
[
"Apache-2.0"
] | 1
|
2019-10-06T16:07:31.000Z
|
2019-10-06T16:07:31.000Z
|
from Automata import Pila
from Entrada import Obtener
from EstadoPar import EstadosPar
from EstadoImpar import EstadosImpar
from Lista import Listas
| 24.833333
| 36
| 0.865772
| 20
| 149
| 6.45
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134228
| 149
| 5
| 37
| 29.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
0a1981de5cb07690436fb8cbf79ceb8e0e69c6cf
| 106
|
py
|
Python
|
Feedbacks.py
|
rohit-ghosh/tagAPI
|
90909aaeb2695c861e34164cca35f0592eb645e4
|
[
"MIT"
] | null | null | null |
Feedbacks.py
|
rohit-ghosh/tagAPI
|
90909aaeb2695c861e34164cca35f0592eb645e4
|
[
"MIT"
] | null | null | null |
Feedbacks.py
|
rohit-ghosh/tagAPI
|
90909aaeb2695c861e34164cca35f0592eb645e4
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from pydantic import BaseModel
class Feedback(BaseModel):
feedback: str
| 17.666667
| 31
| 0.660377
| 12
| 106
| 5.833333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012048
| 0.216981
| 106
| 6
| 32
| 17.666667
| 0.831325
| 0.198113
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
0a4c4bf81c48dd40f044b921a1b5ec07ba441880
| 1,192
|
py
|
Python
|
sympy/assumptions/tests/test_context.py
|
Michal-Gagala/sympy
|
3cc756c2af73b5506102abaeefd1b654e286e2c8
|
[
"MIT"
] | null | null | null |
sympy/assumptions/tests/test_context.py
|
Michal-Gagala/sympy
|
3cc756c2af73b5506102abaeefd1b654e286e2c8
|
[
"MIT"
] | null | null | null |
sympy/assumptions/tests/test_context.py
|
Michal-Gagala/sympy
|
3cc756c2af73b5506102abaeefd1b654e286e2c8
|
[
"MIT"
] | null | null | null |
from sympy.assumptions import ask, Q
from sympy.assumptions.assume import assuming, global_assumptions
from sympy.abc import x, y
def test_assuming():
with assuming(Q.integer(x)):
assert ask(Q.integer(x))
assert not ask(Q.integer(x))
def test_assuming_nested():
assert not ask(Q.integer(x))
assert not ask(Q.integer(y))
with assuming(Q.integer(x)):
assert ask(Q.integer(x))
assert not ask(Q.integer(y))
with assuming(Q.integer(y)):
assert ask(Q.integer(x))
assert ask(Q.integer(y))
assert ask(Q.integer(x))
assert not ask(Q.integer(y))
assert not ask(Q.integer(x))
assert not ask(Q.integer(y))
def test_finally():
try:
with assuming(Q.integer(x)):
1/0
except ZeroDivisionError:
pass
assert not ask(Q.integer(x))
def test_remove_safe():
global_assumptions.add(Q.integer(x))
with assuming():
assert ask(Q.integer(x))
global_assumptions.remove(Q.integer(x))
assert not ask(Q.integer(x))
assert ask(Q.integer(x))
global_assumptions.clear() # for the benefit of other tests
| 29.8
| 66
| 0.616611
| 172
| 1,192
| 4.215116
| 0.209302
| 0.242759
| 0.198621
| 0.182069
| 0.628966
| 0.6
| 0.6
| 0.528276
| 0.451034
| 0.361379
| 0
| 0.002273
| 0.261745
| 1,192
| 39
| 67
| 30.564103
| 0.821591
| 0.025168
| 0
| 0.514286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.457143
| 1
| 0.114286
| true
| 0.028571
| 0.085714
| 0
| 0.2
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
0a5c8c7c193080dd5ffcd5300a22c1cab7b90a3b
| 582
|
py
|
Python
|
testing/mocking/hotel.py
|
Minkov/python-oop
|
db9651eef374c0e74c32cb6f2bf07c734cc1d051
|
[
"MIT"
] | 3
|
2021-11-16T04:52:53.000Z
|
2022-02-07T20:28:41.000Z
|
testing/mocking/hotel.py
|
Minkov/python-oop
|
db9651eef374c0e74c32cb6f2bf07c734cc1d051
|
[
"MIT"
] | null | null | null |
testing/mocking/hotel.py
|
Minkov/python-oop
|
db9651eef374c0e74c32cb6f2bf07c734cc1d051
|
[
"MIT"
] | 1
|
2021-12-07T07:04:38.000Z
|
2021-12-07T07:04:38.000Z
|
from mocking import rooms_manager
class Hotel2:
def __init__(self, rooms_manager):
self.rooms_manager = rooms_manager
def book_a_room(self):
if not self.rooms_manager.has_free_rooms():
raise Exception('No free rooms')
return self.rooms_manager.rooms.pop()
class Hotel:
def __init__(self):
self.rooms_manager = rooms_manager.RoomsManager([1, 2, 3])
def book_a_room(self):
if not self.rooms_manager.has_free_rooms():
raise Exception('No free rooms')
return self.rooms_manager.rooms.pop()
| 24.25
| 66
| 0.668385
| 79
| 582
| 4.594937
| 0.341772
| 0.330579
| 0.30854
| 0.231405
| 0.727273
| 0.573003
| 0.573003
| 0.573003
| 0.573003
| 0.573003
| 0
| 0.009029
| 0.238832
| 582
| 23
| 67
| 25.304348
| 0.810384
| 0
| 0
| 0.533333
| 0
| 0
| 0.044674
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.266667
| false
| 0
| 0.066667
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
0a70c9779057144f843950ac4f7a17047b750606
| 4,511
|
py
|
Python
|
src/tests/api/test_api_answers.py
|
lili668668/pretalx
|
5ba2185ffd7c5f95254aafe25ad3de340a86eadb
|
[
"Apache-2.0"
] | 418
|
2017-10-05T05:52:49.000Z
|
2022-03-24T09:50:06.000Z
|
src/tests/api/test_api_answers.py
|
AKJK-Internet-32002/pretalx
|
062177a8a361dd57a8889e2dd422beec505881a9
|
[
"Apache-2.0"
] | 1,049
|
2017-09-16T09:34:55.000Z
|
2022-03-23T16:13:04.000Z
|
src/tests/api/test_api_answers.py
|
AKJK-Internet-32002/pretalx
|
062177a8a361dd57a8889e2dd422beec505881a9
|
[
"Apache-2.0"
] | 155
|
2017-10-16T18:32:01.000Z
|
2022-03-15T12:48:33.000Z
|
import json
import pytest
from django_scopes import scope
from pretalx.submission.models import Answer
@pytest.mark.django_db
@pytest.mark.parametrize("is_public", (True, False))
def test_answers_not_visible_by_default(client, answer, schedule, is_public):
with scope(event=answer.event):
answer.question.is_public = is_public
answer.question.save()
response = client.get(answer.event.api_urls.answers, follow=True)
content = json.loads(response.content.decode())
assert response.status_code == 200
assert bool(len(content["results"])) is is_public
@pytest.mark.django_db
def test_organizer_can_see_answer(orga_client, answer):
response = orga_client.get(answer.event.api_urls.answers, follow=True)
content = json.loads(response.content.decode())
assert response.status_code == 200
assert len(content["results"]) == 1
assert content["results"][0]["id"] == answer.id
@pytest.mark.django_db
@pytest.mark.parametrize("is_visible", (True, False))
def test_answers_not_visible_by_default_to_reviewers(review_client, answer, is_visible):
with scope(event=answer.event):
answer.question.is_visible_to_reviewers = is_visible
answer.question.save()
response = review_client.get(answer.question.event.api_urls.answers, follow=True)
content = json.loads(response.content.decode())
assert response.status_code == 200
assert bool(len(content["results"])) is is_visible
@pytest.mark.django_db
def test_organizer_can_create_answer(event, orga_client, question, submission, speaker):
with scope(event=event):
count = Answer.objects.filter(question__event=event).count()
response = orga_client.post(
event.api_urls.answers,
{
"question": question.id,
"submission": submission.code,
"person": speaker.code,
"answer": "Tralalalala",
},
)
assert response.status_code == 201, response.content.decode()
with scope(event=event):
assert Answer.objects.filter(question__event=event).count() == count + 1
answer = Answer.objects.filter(question__event=event).first()
assert answer.answer == "Tralalalala"
@pytest.mark.django_db
def test_duplicate_answer_updates_existing_answer(
event, orga_client, question, submission, speaker, answer
):
with scope(event=event):
count = Answer.objects.filter(question__event=event).count()
response = orga_client.post(
event.api_urls.answers,
{
"question": answer.question_id,
"submission": answer.submission.code,
"person": "",
"answer": "Tralalalala",
},
)
assert response.status_code == 201, response.content.decode()
with scope(event=event):
assert Answer.objects.filter(question__event=event).count() == count
answer = Answer.objects.filter(question__event=event).first()
assert answer.answer == "Tralalalala"
@pytest.mark.django_db
def test_organizer_can_edit_answers(event, orga_client, answer):
response = orga_client.patch(
event.api_urls.answers + f"{answer.pk}/",
{"answer": "ohno.png"},
content_type="application/json",
)
assert response.status_code == 200, response.content.decode()
with scope(event=event):
answer.refresh_from_db()
assert answer.answer == "ohno.png"
@pytest.mark.django_db
def test_reviewer_cannot_create_answer(
event, review_client, question, submission, speaker
):
with scope(event=event):
count = Answer.objects.filter(question__event=event).count()
response = review_client.post(
event.api_urls.answers,
{
"question": question.id,
"submission": submission.code,
"person": speaker.code,
"answer": "Tralalalala",
},
)
assert response.status_code == 403, response.content.decode()
with scope(event=event):
assert Answer.objects.filter(question__event=event).count() == count
@pytest.mark.django_db
def test_reviewer_cannot_edit_answer(event, review_client, answer):
response = review_client.patch(
event.api_urls.answers + f"{answer.pk}/",
{"answer": "ohno.png"},
content_type="application/json",
)
assert response.status_code == 403, response.content.decode()
with scope(event=event):
answer.refresh_from_db()
assert answer.answer != "ohno.png"
| 35.242188
| 88
| 0.678785
| 537
| 4,511
| 5.495345
| 0.150838
| 0.054219
| 0.047442
| 0.048797
| 0.814639
| 0.813623
| 0.794646
| 0.773975
| 0.662826
| 0.634361
| 0
| 0.007488
| 0.200621
| 4,511
| 127
| 89
| 35.519685
| 0.810871
| 0
| 0
| 0.577982
| 0
| 0
| 0.065174
| 0
| 0
| 0
| 0
| 0
| 0.174312
| 1
| 0.073395
| false
| 0
| 0.036697
| 0
| 0.110092
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 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
| 5
|
6a7807445782c31427dcbd95bcac81f04b908158
| 100
|
py
|
Python
|
extensible_cache/__init__.py
|
felixnext/PythonCache
|
7a0ba502a7d6b5a70f0c968b31fe5c0257fee57b
|
[
"MIT"
] | null | null | null |
extensible_cache/__init__.py
|
felixnext/PythonCache
|
7a0ba502a7d6b5a70f0c968b31fe5c0257fee57b
|
[
"MIT"
] | null | null | null |
extensible_cache/__init__.py
|
felixnext/PythonCache
|
7a0ba502a7d6b5a70f0c968b31fe5c0257fee57b
|
[
"MIT"
] | null | null | null |
from .Cache import Cache
from .PandasCache import PandasFileCache
from .MongoCache import MongoCache
| 33.333333
| 40
| 0.86
| 12
| 100
| 7.166667
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11
| 100
| 3
| 41
| 33.333333
| 0.966292
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
6a87d116ded1cf711980a9120327a3c70f92a2ba
| 44
|
py
|
Python
|
pmakeup/exceptions/PMakeupException.py
|
Koldar/pmake
|
85aca559b23cabc77dd657c5b645e26472b9e900
|
[
"Apache-2.0"
] | null | null | null |
pmakeup/exceptions/PMakeupException.py
|
Koldar/pmake
|
85aca559b23cabc77dd657c5b645e26472b9e900
|
[
"Apache-2.0"
] | null | null | null |
pmakeup/exceptions/PMakeupException.py
|
Koldar/pmake
|
85aca559b23cabc77dd657c5b645e26472b9e900
|
[
"Apache-2.0"
] | null | null | null |
class PMakeupException(Exception):
pass
| 14.666667
| 34
| 0.772727
| 4
| 44
| 8.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159091
| 44
| 2
| 35
| 22
| 0.918919
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
6ae4cbe71f3e87b9314d5068c5350de4e42ac289
| 222
|
py
|
Python
|
source/appModules/zend-eclipse-php.py
|
SamKacer/nvda
|
0f08ccb7e524c425d2cdad96bf4a9ad7bd59a043
|
[
"bzip2-1.0.6"
] | null | null | null |
source/appModules/zend-eclipse-php.py
|
SamKacer/nvda
|
0f08ccb7e524c425d2cdad96bf4a9ad7bd59a043
|
[
"bzip2-1.0.6"
] | null | null | null |
source/appModules/zend-eclipse-php.py
|
SamKacer/nvda
|
0f08ccb7e524c425d2cdad96bf4a9ad7bd59a043
|
[
"bzip2-1.0.6"
] | null | null | null |
"""App module for Zend Eclipse PHP Developer Tools
This simply uses the app module for Eclipse.
"""
from .eclipse import *
from appModuleHandler import _warnDeprecatedAliasAppModule
_warnDeprecatedAliasAppModule()
| 27.75
| 59
| 0.797297
| 24
| 222
| 7.291667
| 0.666667
| 0.102857
| 0.137143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153153
| 222
| 7
| 60
| 31.714286
| 0.930851
| 0.414414
| 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
| 1
| 0
|
0
| 5
|
6aea3594870fca8a1f926da62443028de3803042
| 60
|
py
|
Python
|
rosetta/tests/__init__.py
|
wpj-cz/django-rosetta
|
883bd4f49e2c24b3b8fd5a1b7026ec990d6ce6bd
|
[
"MIT"
] | 2
|
2015-03-13T16:40:10.000Z
|
2017-11-01T18:29:01.000Z
|
rosetta/tests/__init__.py
|
wpj-cz/django-rosetta
|
883bd4f49e2c24b3b8fd5a1b7026ec990d6ce6bd
|
[
"MIT"
] | null | null | null |
rosetta/tests/__init__.py
|
wpj-cz/django-rosetta
|
883bd4f49e2c24b3b8fd5a1b7026ec990d6ce6bd
|
[
"MIT"
] | 1
|
2019-09-29T05:00:26.000Z
|
2019-09-29T05:00:26.000Z
|
from .tests import *
from microsofttranslator.test import *
| 20
| 38
| 0.8
| 7
| 60
| 6.857143
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 60
| 2
| 39
| 30
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
0a8ab84cd0758dae0d72540c6b7c8f68dc34b76e
| 102
|
py
|
Python
|
sqlbucket/__init__.py
|
socialpoint-labs/sqlflow
|
5f1c23ff3207e0e162ae5ab93f80129a982e5468
|
[
"MIT"
] | 67
|
2019-09-17T16:36:15.000Z
|
2022-03-28T09:16:31.000Z
|
sqlbucket/__init__.py
|
socialpoint-labs/sqlflow
|
5f1c23ff3207e0e162ae5ab93f80129a982e5468
|
[
"MIT"
] | 10
|
2019-11-14T16:43:37.000Z
|
2021-12-19T16:06:20.000Z
|
sqlbucket/__init__.py
|
socialpoint-labs/sqlflow
|
5f1c23ff3207e0e162ae5ab93f80129a982e5468
|
[
"MIT"
] | 7
|
2019-12-04T14:31:17.000Z
|
2021-12-23T15:53:01.000Z
|
__version__ = "0.4.1"
from sqlbucket.core import SQLBucket
from sqlbucket.project import Project
| 11.333333
| 37
| 0.77451
| 14
| 102
| 5.357143
| 0.642857
| 0.346667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034884
| 0.156863
| 102
| 8
| 38
| 12.75
| 0.837209
| 0
| 0
| 0
| 0
| 0
| 0.050505
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
0ab453a8e841aba9f1db257c6933f1b83e557fba
| 2,071
|
py
|
Python
|
src_nlp/tensorflow/competition/ppdai/data/dataloaders/dataloader_word_fixed.py
|
ashishpatel26/finch
|
bf2958c0f268575e5d51ad08fbc08b151cbea962
|
[
"MIT"
] | 1
|
2019-02-12T09:22:00.000Z
|
2019-02-12T09:22:00.000Z
|
src_nlp/tensorflow/competition/ppdai/data/dataloaders/dataloader_word_fixed.py
|
loopzxl/finch
|
bf2958c0f268575e5d51ad08fbc08b151cbea962
|
[
"MIT"
] | null | null | null |
src_nlp/tensorflow/competition/ppdai/data/dataloaders/dataloader_word_fixed.py
|
loopzxl/finch
|
bf2958c0f268575e5d51ad08fbc08b151cbea962
|
[
"MIT"
] | 1
|
2020-10-15T21:34:17.000Z
|
2020-10-15T21:34:17.000Z
|
import tensorflow as tf
from configs.general import args
from .preprocess_word_fixed import PreProcessor
def _parse_train_fn(example_proto):
parsed_feats = tf.parse_single_example(
example_proto,
features={
'input1': tf.FixedLenFeature([args.w_max_len], tf.int64),
'input2': tf.FixedLenFeature([args.w_max_len], tf.int64),
'label': tf.FixedLenFeature([], tf.int64)
})
return parsed_feats['input1'], parsed_feats['input2'], parsed_feats['label']
def _parse_test_fn(example_proto):
parsed_feats = tf.parse_single_example(
example_proto,
features={
'input1': tf.FixedLenFeature([args.w_max_len], tf.int64),
'input2': tf.FixedLenFeature([args.w_max_len], tf.int64),
})
return parsed_feats['input1'], parsed_feats['input2']
class DataLoader(object):
def __init__(self):
preprocessor = PreProcessor()
def train_input_fn(self):
ds = tf.data.TFRecordDataset(['../data/tfrecords/word_train_fixed.tfrecord'])
ds = ds.map(_parse_train_fn)
ds = ds.shuffle(250000)
ds = ds.batch(args.batch_size)
iterator = ds.make_one_shot_iterator()
x1, x2, y = iterator.get_next()
return ({'input1': x1, 'input2': x2}, y)
def val_input_fn(self):
ds = tf.data.TFRecordDataset(['../data/tfrecords/word_val_fixed.tfrecord'])
ds = ds.map(_parse_train_fn)
ds = ds.batch(args.batch_size)
iterator = ds.make_one_shot_iterator()
x1, x2, y = iterator.get_next()
return ({'input1': x1, 'input2': x2})
def predict_input_fn(self):
ds = tf.data.TFRecordDataset(['../data/tfrecords/word_test_fixed.tfrecord'])
ds = ds.map(_parse_test_fn)
ds = ds.batch(args.batch_size)
iterator = ds.make_one_shot_iterator()
x1, x2 = iterator.get_next()
return ({'input1': x1, 'input2': x2})
| 35.101695
| 88
| 0.598745
| 247
| 2,071
| 4.732794
| 0.238866
| 0.065868
| 0.071856
| 0.075278
| 0.775877
| 0.775877
| 0.754491
| 0.754491
| 0.72284
| 0.648417
| 0
| 0.027963
| 0.274747
| 2,071
| 58
| 89
| 35.706897
| 0.750333
| 0
| 0
| 0.533333
| 0
| 0
| 0.106229
| 0.06084
| 0
| 0
| 0
| 0
| 0
| 1
| 0.133333
| false
| 0
| 0.066667
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
0ac4766364c02bfdce866c6b2c947756aed3a381
| 2,219
|
py
|
Python
|
foundation_public/admin.py
|
smegurus/smegurus-django
|
053973b5ff0b997c52bfaca8daf8e07db64a877c
|
[
"BSD-4-Clause"
] | 1
|
2020-07-16T10:58:23.000Z
|
2020-07-16T10:58:23.000Z
|
foundation_public/admin.py
|
smegurus/smegurus-django
|
053973b5ff0b997c52bfaca8daf8e07db64a877c
|
[
"BSD-4-Clause"
] | 13
|
2018-11-30T02:29:39.000Z
|
2022-03-11T23:35:49.000Z
|
foundation_public/admin.py
|
smegurus/smegurus-django
|
053973b5ff0b997c52bfaca8daf8e07db64a877c
|
[
"BSD-4-Clause"
] | null | null | null |
from django.contrib import admin
from foundation_public.models.banned import BannedDomain
from foundation_public.models.banned import SortedBannedIPByLatestCreationDate
from foundation_public.models.banned import BannedWord
from foundation_public.models.fileupload import PublicFileUpload
from foundation_public.models.imageupload import PublicImageUpload
from foundation_public.models.countryoption import CountryOption
from foundation_public.models.provinceoption import ProvinceOption
from foundation_public.models.cityoption import CityOption
from foundation_public.models.brand import PublicBrand
from foundation_public.models.contactpoint import PublicContactPoint
from foundation_public.models.geocoordinate import PublicGeoCoordinate
from foundation_public.models.language import PublicLanguage
from foundation_public.models.openinghoursspecification import PublicOpeningHoursSpecification
from foundation_public.models.postaladdress import PublicPostalAddress
from foundation_public.models.place import PublicPlace
from foundation_public.models.country import PublicCountry
from foundation_public.models.organizationregistration import PublicOrganizationRegistration
from foundation_public.models.organization import PublicOrganization
from foundation_public.models.organization import PublicDomain
from foundation_public.models.visitor import SortedPublicVisitorsByLatestCreation
# Register your models here.
admin.site.register(CountryOption)
admin.site.register(ProvinceOption)
admin.site.register(CityOption)
admin.site.register(BannedDomain)
admin.site.register(SortedBannedIPByLatestCreationDate)
admin.site.register(BannedWord)
admin.site.register(PublicFileUpload)
admin.site.register(PublicImageUpload)
admin.site.register(PublicBrand)
admin.site.register(PublicContactPoint)
admin.site.register(PublicGeoCoordinate)
admin.site.register(PublicLanguage)
admin.site.register(PublicOpeningHoursSpecification)
admin.site.register(PublicPostalAddress)
admin.site.register(PublicPlace)
admin.site.register(PublicCountry)
admin.site.register(PublicOrganization)
admin.site.register(PublicOrganizationRegistration)
admin.site.register(PublicDomain)
admin.site.register(SortedPublicVisitorsByLatestCreation)
| 49.311111
| 94
| 0.894547
| 229
| 2,219
| 8.580786
| 0.200873
| 0.142494
| 0.203562
| 0.264631
| 0.102799
| 0.102799
| 0
| 0
| 0
| 0
| 0
| 0
| 0.050023
| 2,219
| 44
| 95
| 50.431818
| 0.932163
| 0.011717
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.512195
| 0
| 0.512195
| 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
| 1
| 0
| 1
| 0
|
0
| 5
|
0af52ce14d028095e771ad9bed4bdd74900195a5
| 151
|
py
|
Python
|
brainframe_qt/ui/main_window/activities/__init__.py
|
aotuai/brainframe-qt
|
082cfd0694e569122ff7c63e56dd0ec4b62d5bac
|
[
"BSD-3-Clause"
] | 17
|
2021-02-11T18:19:22.000Z
|
2022-02-08T06:12:50.000Z
|
brainframe_qt/ui/main_window/activities/__init__.py
|
aotuai/brainframe-qt
|
082cfd0694e569122ff7c63e56dd0ec4b62d5bac
|
[
"BSD-3-Clause"
] | 80
|
2021-02-11T08:27:31.000Z
|
2021-10-13T21:33:22.000Z
|
brainframe_qt/ui/main_window/activities/__init__.py
|
aotuai/brainframe-qt
|
082cfd0694e569122ff7c63e56dd0ec4b62d5bac
|
[
"BSD-3-Clause"
] | 5
|
2021-02-12T09:51:34.000Z
|
2022-02-08T09:25:15.000Z
|
from .stream_configuration import StreamConfiguration
from .stream_activity import StreamActivity
from .identity_configuration import IdentityActivity
| 37.75
| 53
| 0.900662
| 15
| 151
| 8.866667
| 0.6
| 0.150376
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.07947
| 151
| 3
| 54
| 50.333333
| 0.956835
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
7c296c6b09f53c481b2b0cabba14f283835577c2
| 77
|
py
|
Python
|
CustomOperators/__init__.py
|
Qkrisi/python-custom-operators
|
7273d082c7388a008a8e645e2f7b09c98b89990a
|
[
"MIT"
] | 1
|
2020-11-11T08:47:57.000Z
|
2020-11-11T08:47:57.000Z
|
CustomOperators/__init__.py
|
Qkrisi/python-custom-operators
|
7273d082c7388a008a8e645e2f7b09c98b89990a
|
[
"MIT"
] | null | null | null |
CustomOperators/__init__.py
|
Qkrisi/python-custom-operators
|
7273d082c7388a008a8e645e2f7b09c98b89990a
|
[
"MIT"
] | null | null | null |
from CustomOperators.Operators import Operator, ImportModule, AddRule, Apply
| 38.5
| 76
| 0.857143
| 8
| 77
| 8.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 77
| 1
| 77
| 77
| 0.942857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
7c5213ba7309d9e7947dbe8602b9d7d71560dab8
| 2,554
|
py
|
Python
|
services/employee_authority_group_service.py
|
juxiangwu/PSS
|
9108ca6b669f0bec9647d015d14b421dacc02645
|
[
"Apache-2.0"
] | null | null | null |
services/employee_authority_group_service.py
|
juxiangwu/PSS
|
9108ca6b669f0bec9647d015d14b421dacc02645
|
[
"Apache-2.0"
] | null | null | null |
services/employee_authority_group_service.py
|
juxiangwu/PSS
|
9108ca6b669f0bec9647d015d14b421dacc02645
|
[
"Apache-2.0"
] | null | null | null |
# -*-coding:utf-8 -*-
import json
from dao.employee_authority_group_dao import EmployeeAuthorityGroupDAO
from config.constants import Constants
from config.message_cn import MessageConstants_CN
class EmployeeAuthorityGroupService()
def __init__(self):
self.__dao = EmployeeAuthorityGroupDAO()
def query(self,shopId):
results = self.__dao.getByShopId(shopId=shopId)
jsonobjs = []
for result in results:
jsonobjs.append(results.to_json())
total = len(results)
res = "{\"datas\":" + json.dumps(results) +",\"total\":%d}" % (total)
return res
def add(self,shopId,name,authorityId):
code,res = self.__dao.add(shopId=shopId,name=name,authorityId=authorityId)
result = {}
if code == Constants.REGISTER_FAILED:
result['success'] = False
if res == Constants.NAME_EXISTED:
result['msg'] = MessageConstants_CN.MSG_AUTHORITY_GROUP_NAME_EXISTED % (name)
elif res == Constants.INVALID_ARGS:
result['msg'] = MessageConstants_CN.MSG_INVALID_ARGS
else:
result['msg'] = MessageConstants_CN.MSG_INTER_ERROR
else:
result['success'] = True
result['msg'] = MessageConstants_CN.MSG_OPERATE_SUCCESS
return result
def remove(self,id):
code,res = self.__dao.remove(id=id)
# TODO:需要更新子权限的分组信息
result = {}
if code == Constants.REGISTER_FAILED:
result['success'] = False
if res == Constants.INVALID_ARGS:
result['msg'] = MessageConstants_CN.MSG_INVALID_ARGS
else:
result['msg'] = MessageConstants_CN.MSG_INTER_ERROR
else:
result['success'] = True
result['msg'] = MessageConstants_CN.MSG_OPERATE_SUCCESS
return result
def update(self,newdata):
code,res = self.__dao.update(newdata)
result = {}
if code == Constants.REGISTER_FAILED:
result['success'] = False
if res == Constants.NAME_EXISTED:
result['msg'] = MessageConstants_CN.MSG_AUTHORITY_GROUP_NAME_EXISTED % newdata['name']
elif res == Constants.INVALID_ARGS:
result['msg'] = MessageConstants_CN.MSG_INVALID_ARGS
else:
result['msg'] = MessageConstants_CN.MSG_INTER_ERROR
else:
result['success'] = True
result['msg'] = MessageConstants_CN.MSG_OPERATE_SUCCESS
return result
| 36.485714
| 102
| 0.610807
| 263
| 2,554
| 5.684411
| 0.239544
| 0.144482
| 0.183946
| 0.198662
| 0.600669
| 0.600669
| 0.600669
| 0.600669
| 0.600669
| 0.600669
| 0
| 0.000549
| 0.286609
| 2,554
| 69
| 103
| 37.014493
| 0.819978
| 0.014487
| 0
| 0.586207
| 0
| 0
| 0.035018
| 0
| 0
| 0
| 0
| 0.014493
| 0
| 0
| null | null | 0
| 0.068966
| null | null | 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7ced91f3ec99292349d523bbf1f47e0759cfbf17
| 104
|
pyw
|
Python
|
module_3/input/run.pyw
|
pveierland/permve-ntnu-it3105
|
6a7e4751de47b091c1c9c59560c19a8452698d81
|
[
"CC0-1.0"
] | null | null | null |
module_3/input/run.pyw
|
pveierland/permve-ntnu-it3105
|
6a7e4751de47b091c1c9c59560c19a8452698d81
|
[
"CC0-1.0"
] | null | null | null |
module_3/input/run.pyw
|
pveierland/permve-ntnu-it3105
|
6a7e4751de47b091c1c9c59560c19a8452698d81
|
[
"CC0-1.0"
] | null | null | null |
#!/usr/bin/python3
import sys
sys.path.append('../../vi')
import vi.app.nonogram
vi.app.nonogram.main()
| 17.333333
| 27
| 0.701923
| 17
| 104
| 4.294118
| 0.647059
| 0.136986
| 0.356164
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010309
| 0.067308
| 104
| 5
| 28
| 20.8
| 0.742268
| 0.163462
| 0
| 0
| 0
| 0
| 0.093023
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
6b02c6df982de1ff3438941b30d8d07006042331
| 151
|
py
|
Python
|
util.py
|
tdene/synth_opt_adders
|
c94ba6e61468e8867f7a3f8d5af252b0e42664a0
|
[
"Apache-2.0"
] | 24
|
2021-04-19T21:07:23.000Z
|
2022-03-27T19:33:38.000Z
|
util.py
|
tdene/synth_opt_adders
|
c94ba6e61468e8867f7a3f8d5af252b0e42664a0
|
[
"Apache-2.0"
] | 15
|
2022-01-17T03:12:01.000Z
|
2022-03-14T14:44:57.000Z
|
util.py
|
tdene/synth_opt_adders
|
c94ba6e61468e8867f7a3f8d5af252b0e42664a0
|
[
"Apache-2.0"
] | 3
|
2021-06-09T23:05:45.000Z
|
2022-02-09T22:01:46.000Z
|
#!/bin/python3
def lg(x):
return x.bit_length()-1
if __name__=="__main__":
raise RuntimeError("This file is importable, but not executable")
| 18.875
| 69
| 0.695364
| 22
| 151
| 4.363636
| 0.954545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015873
| 0.165563
| 151
| 7
| 70
| 21.571429
| 0.746032
| 0.086093
| 0
| 0
| 0
| 0
| 0.372263
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
6b19709f522fedd42645fdfae3f26f7422746459
| 10,257
|
py
|
Python
|
tests/test_download.py
|
oceanprotocol/provider-py
|
c586a89be88874efde0e79a7dffd65db40b7d8ec
|
[
"Apache-2.0"
] | 1
|
2020-10-27T07:30:06.000Z
|
2020-10-27T07:30:06.000Z
|
tests/test_download.py
|
oceanprotocol/provider-py
|
c586a89be88874efde0e79a7dffd65db40b7d8ec
|
[
"Apache-2.0"
] | 14
|
2020-05-28T11:50:18.000Z
|
2020-10-26T09:51:49.000Z
|
tests/test_download.py
|
oceanprotocol/provider-py
|
c586a89be88874efde0e79a7dffd65db40b7d8ec
|
[
"Apache-2.0"
] | 2
|
2020-06-30T06:08:07.000Z
|
2020-09-09T03:44:29.000Z
|
#
# Copyright 2021 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
import copy
import time
from datetime import datetime
from unittest.mock import patch
import pytest
from ocean_provider.constants import BaseURLs
from ocean_provider.utils.accounts import sign_message
from ocean_provider.utils.provider_fees import get_provider_fees
from ocean_provider.utils.services import ServiceType
from tests.test_helpers import (
get_dataset_ddo_with_multiple_files,
get_first_service_by_type,
get_registered_asset,
mint_100_datatokens,
start_order,
)
@pytest.mark.integration
@pytest.mark.parametrize(
"userdata,erc20_enterprise",
[(False, False), ("valid", False), ("invalid", False), (False, True)],
)
def test_download_service(
client, publisher_wallet, consumer_wallet, web3, userdata, erc20_enterprise
):
asset = get_registered_asset(publisher_wallet, erc20_enterprise=erc20_enterprise)
service = get_first_service_by_type(asset, ServiceType.ACCESS)
mint_100_datatokens(
web3, service.datatoken_address, consumer_wallet.address, publisher_wallet
)
tx_id, _ = start_order(
web3,
service.datatoken_address,
consumer_wallet.address,
service.index,
get_provider_fees(asset.did, service, consumer_wallet.address, 0),
consumer_wallet,
)
payload = {
"documentId": asset.did,
"serviceId": service.id,
"consumerAddress": consumer_wallet.address,
"transferTxId": tx_id,
"fileIndex": 0,
}
if userdata:
payload["userdata"] = (
'{"surname":"XXX", "age":12}' if userdata == "valid" else "cannotdecode"
)
download_endpoint = BaseURLs.SERVICES_URL + "/download"
# Consume using url index and signature (withOUT nonce), should fail
payload["signature"] = sign_message(asset.did, consumer_wallet)
print(">>>> Expecting request error from the download endpoint <<<<")
response = client.get(download_endpoint, query_string=payload)
assert response.status_code == 400, f"{response.data}"
# Consume using url index and signature (with nonce)
nonce = str(datetime.utcnow().timestamp())
_msg = f"{asset.did}{nonce}"
payload["signature"] = sign_message(_msg, consumer_wallet)
payload["nonce"] = nonce
response = client.get(
service.service_endpoint + download_endpoint, query_string=payload
)
assert response.status_code == 200, f"{response.data}"
if not userdata and not erc20_enterprise:
nonce = str(datetime.utcnow().timestamp())
_msg = f"{asset.did}{nonce}"
payload["signature"] = sign_message(_msg, consumer_wallet)
payload["nonce"] = nonce
payload["transferTxId"] = "0x123" # some dummy
response = client.get(download_endpoint, query_string=payload)
assert response.status_code == 400, f"{response.data}"
@pytest.mark.integration
@pytest.mark.parametrize("timeout", [0, 1, 3600])
def test_download_timeout(client, publisher_wallet, consumer_wallet, web3, timeout):
"""
If timeout == 0, order is valid forever
else reject request if current timestamp - order timestamp > timeout
"""
asset = get_registered_asset(publisher_wallet, timeout=timeout)
service = get_first_service_by_type(asset, ServiceType.ACCESS)
mint_100_datatokens(
web3, service.datatoken_address, consumer_wallet.address, publisher_wallet
)
tx_id, _ = start_order(
web3,
service.datatoken_address,
consumer_wallet.address,
service.index,
get_provider_fees(asset.did, service, consumer_wallet.address, 0),
consumer_wallet,
)
# Sleep for 1 second (give the order time to expire)
time.sleep(1)
payload = {
"documentId": asset.did,
"serviceId": service.id,
"consumerAddress": consumer_wallet.address,
"transferTxId": tx_id,
"fileIndex": 0,
}
download_endpoint = BaseURLs.SERVICES_URL + "/download"
# Consume using url index and signature (with nonce)
nonce = str(datetime.utcnow().timestamp())
_msg = f"{asset.did}{nonce}"
payload["signature"] = sign_message(_msg, consumer_wallet)
payload["nonce"] = nonce
response = client.get(
service.service_endpoint + download_endpoint, query_string=payload
)
# Expect failure if timeout is 1 second. Expect success otherwise
if timeout == 1:
assert response.status_code == 400, f"{response.data}"
else:
assert response.status_code == 200, f"{response.data}"
@pytest.mark.unit
def test_empty_payload(client):
consume = client.get(
BaseURLs.SERVICES_URL + "/download", data=None, content_type="application/json"
)
assert consume.status_code == 400
@pytest.mark.integration
def test_download_multiple_files(client, publisher_wallet, consumer_wallet, web3):
asset = get_dataset_ddo_with_multiple_files(client, publisher_wallet)
service = get_first_service_by_type(asset, ServiceType.ACCESS)
mint_100_datatokens(
web3, service.datatoken_address, consumer_wallet.address, publisher_wallet
)
tx_id, _ = start_order(
web3,
service.datatoken_address,
consumer_wallet.address,
service.index,
get_provider_fees(asset.did, service, consumer_wallet.address, 0),
consumer_wallet,
)
nonce = str(datetime.utcnow().timestamp())
_msg = f"{asset.did}{nonce}"
# Consume using url index and auth token
# (let the provider do the decryption)
payload = {
"documentId": asset.did,
"serviceId": service.id,
"consumerAddress": consumer_wallet.address,
"signature": sign_message(_msg, consumer_wallet),
"transferTxId": tx_id,
"fileIndex": 0,
"nonce": nonce,
}
download_endpoint = BaseURLs.SERVICES_URL + "/download"
response = client.get(download_endpoint, query_string=payload)
assert response.status_code == 200, f"{response.data}"
nonce = str(datetime.utcnow().timestamp())
_msg = f"{asset.did}{nonce}"
payload["signature"] = sign_message(_msg, consumer_wallet)
payload["fileIndex"] = 1
payload["nonce"] = nonce
download_endpoint = BaseURLs.SERVICES_URL + "/download"
response = client.get(download_endpoint, query_string=payload)
assert response.status_code == 200, f"{response.data}"
nonce = str(datetime.utcnow().timestamp())
_msg = f"{asset.did}{nonce}"
payload["signature"] = sign_message(_msg, consumer_wallet)
payload["fileIndex"] = 2
payload["nonce"] = nonce
download_endpoint = BaseURLs.SERVICES_URL + "/download"
response = client.get(download_endpoint, query_string=payload)
assert response.status_code == 200, f"{response.data}"
@pytest.mark.integration
def test_download_compute_asset_by_c2d(client, publisher_wallet, consumer_wallet, web3):
asset = get_dataset_ddo_with_multiple_files(client, publisher_wallet)
service = get_first_service_by_type(asset, ServiceType.ACCESS)
mint_100_datatokens(
web3, service.datatoken_address, consumer_wallet.address, publisher_wallet
)
tx_id, _ = start_order(
web3,
service.datatoken_address,
consumer_wallet.address,
service.index,
get_provider_fees(asset.did, service, consumer_wallet.address, 0),
consumer_wallet,
)
nonce = str(datetime.utcnow().timestamp())
_msg = f"{asset.did}{nonce}"
payload = {
"documentId": asset.did,
"serviceId": service.id,
"consumerAddress": consumer_wallet.address,
"signature": sign_message(_msg, consumer_wallet),
"transferTxId": tx_id,
"fileIndex": 0,
"nonce": nonce,
}
def other_service(_):
new_service = copy.deepcopy(service)
new_service.type = "compute"
return new_service
with patch("ocean_provider.routes.consume.get_c2d_environments") as mock:
mock.return_value = [{"consumerAddress": consumer_wallet.address}]
with patch(
"ocean_provider.utils.asset.Asset.get_service_by_id",
side_effect=other_service,
):
download_endpoint = BaseURLs.SERVICES_URL + "/download"
response = client.get(download_endpoint, query_string=payload)
assert response.status_code == 200, f"{response.data}"
@pytest.mark.integration
def test_download_compute_asset_by_user_fails(
client, publisher_wallet, consumer_wallet, web3
):
asset = get_dataset_ddo_with_multiple_files(client, publisher_wallet)
service = get_first_service_by_type(asset, ServiceType.ACCESS)
mint_100_datatokens(
web3, service.datatoken_address, consumer_wallet.address, publisher_wallet
)
tx_id, _ = start_order(
web3,
service.datatoken_address,
consumer_wallet.address,
service.index,
get_provider_fees(asset.did, service, consumer_wallet.address, 0),
consumer_wallet,
)
nonce = str(datetime.utcnow().timestamp())
_msg = f"{asset.did}{nonce}"
payload = {
"documentId": asset.did,
"serviceId": service.id,
"consumerAddress": consumer_wallet.address,
"signature": sign_message(_msg, consumer_wallet),
"transferTxId": tx_id,
"fileIndex": 0,
"nonce": nonce,
}
def other_service(_):
new_service = copy.deepcopy(service)
new_service.type = "compute"
return new_service
with patch("ocean_provider.routes.consume.get_c2d_environments") as mock:
mock.return_value = [
{"consumerAddress": "0x0000000000000000000000000000000000000123"}
]
with patch(
"ocean_provider.utils.asset.Asset.get_service_by_id",
side_effect=other_service,
):
download_endpoint = BaseURLs.SERVICES_URL + "/download"
response = client.get(download_endpoint, query_string=payload)
assert response.status_code == 400, f"{response.data}"
assert (
response.json["error"]
== f"Service with index={service.id} is not an access service."
)
| 34.19
| 88
| 0.679633
| 1,155
| 10,257
| 5.780952
| 0.141991
| 0.08387
| 0.066048
| 0.040437
| 0.79332
| 0.784784
| 0.739254
| 0.739254
| 0.733263
| 0.733263
| 0
| 0.019252
| 0.215073
| 10,257
| 299
| 89
| 34.304348
| 0.810086
| 0.054304
| 0
| 0.694215
| 0
| 0
| 0.136209
| 0.027614
| 0
| 0
| 0.004861
| 0
| 0.049587
| 1
| 0.033058
| false
| 0
| 0.041322
| 0
| 0.082645
| 0.004132
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
861f6bdd260a660c457ec4aa6f447d0869efd79a
| 44
|
py
|
Python
|
Module1/hello_world.py
|
ioef/SPSE
|
37eaeb0fd7c5cf564c3b60590f6bfe4de928b920
|
[
"MIT"
] | 16
|
2017-03-23T16:27:20.000Z
|
2022-03-31T07:04:40.000Z
|
vim/templates/python.tpl
|
jbgutierrez/config
|
556370ffe83d4aa90390a9092dbe5d24a73db3ea
|
[
"MIT"
] | null | null | null |
vim/templates/python.tpl
|
jbgutierrez/config
|
556370ffe83d4aa90390a9092dbe5d24a73db3ea
|
[
"MIT"
] | 8
|
2016-10-11T13:18:08.000Z
|
2022-02-12T19:38:57.000Z
|
#!/usr/bin/env python
print "Hello World!"
| 11
| 21
| 0.681818
| 7
| 44
| 4.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 44
| 3
| 22
| 14.666667
| 0.789474
| 0.454545
| 0
| 0
| 0
| 0
| 0.521739
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
861f9a9795a7b44a6064d93ea6bae9e852abe18a
| 30
|
py
|
Python
|
tests/test-data/printdiv.py
|
NablaZeroLabs/sheldon
|
a5c39becc92ef97f6fb71c7daa13512ddcb2594f
|
[
"MIT"
] | null | null | null |
tests/test-data/printdiv.py
|
NablaZeroLabs/sheldon
|
a5c39becc92ef97f6fb71c7daa13512ddcb2594f
|
[
"MIT"
] | 1
|
2018-07-24T05:31:26.000Z
|
2018-07-25T00:09:07.000Z
|
tests/test-data/printdiv.py
|
NablaZeroLabs/sheldon
|
a5c39becc92ef97f6fb71c7daa13512ddcb2594f
|
[
"MIT"
] | 1
|
2018-07-24T02:07:15.000Z
|
2018-07-24T02:07:15.000Z
|
print("Hello " + str(541/71))
| 15
| 29
| 0.6
| 5
| 30
| 3.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.192308
| 0.133333
| 30
| 1
| 30
| 30
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
86283fd31819c30012d62ce52db1eea9ae9a77af
| 15,442
|
py
|
Python
|
tests/python/relay/test_pass_instrument.py
|
QingChuanWS/tvm
|
f1486ef65eca7b9b2eb41d8ea83bc3021f358acd
|
[
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 1
|
2020-11-25T11:40:05.000Z
|
2020-11-25T11:40:05.000Z
|
tests/python/relay/test_pass_instrument.py
|
QingChuanWS/tvm
|
f1486ef65eca7b9b2eb41d8ea83bc3021f358acd
|
[
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null |
tests/python/relay/test_pass_instrument.py
|
QingChuanWS/tvm
|
f1486ef65eca7b9b2eb41d8ea83bc3021f358acd
|
[
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
""" Instrument test cases.
"""
import pytest
import tvm
import tvm.relay
from tvm.relay import op
from tvm.ir.instrument import PassTimingInstrument, pass_instrument
def get_test_model():
x, y, z = [tvm.relay.var(c, shape=(3, 4), dtype="float32") for c in "xyz"]
e1 = op.add(x, y)
e2 = op.subtract(x, z)
e3 = op.multiply(e1, e1 / e2)
return tvm.IRModule.from_expr(e3 + e2)
def test_pass_timing_instrument():
pass_timing = PassTimingInstrument()
# Override current PassContext's instruments
tvm.transform.PassContext.current().override_instruments([pass_timing])
mod = get_test_model()
mod = tvm.relay.transform.AnnotateSpans()(mod)
mod = tvm.relay.transform.ToANormalForm()(mod)
mod = tvm.relay.transform.InferType()(mod)
profiles = pass_timing.render()
assert "AnnotateSpans" in profiles
assert "ToANormalForm" in profiles
assert "InferType" in profiles
# Reset current PassContext's instruments to None
tvm.transform.PassContext.current().override_instruments(None)
mod = get_test_model()
mod = tvm.relay.transform.AnnotateSpans()(mod)
mod = tvm.relay.transform.ToANormalForm()(mod)
mod = tvm.relay.transform.InferType()(mod)
profiles = pass_timing.render()
assert profiles == ""
def test_custom_instrument():
@pass_instrument
class MyTest:
def __init__(self):
self.events = []
def enter_pass_ctx(self):
self.events.append("enter ctx")
def exit_pass_ctx(self):
self.events.append("exit ctx")
def run_before_pass(self, mod, info):
self.events.append("run before " + info.name)
def run_after_pass(self, mod, info):
self.events.append("run after " + info.name)
mod = get_test_model()
my_test = MyTest()
with tvm.transform.PassContext(instruments=[my_test]):
mod = tvm.relay.transform.InferType()(mod)
assert (
"enter ctx"
"run before InferType"
"run after InferType"
"exit ctx" == "".join(my_test.events)
)
def test_disable_pass():
@pass_instrument
class CustomPI:
def __init__(self):
self.events = []
def should_run(self, mod, info):
# Only run pass name contains "InferType"
if "InferType" not in info.name:
return False
return True
def run_before_pass(self, mod, info):
self.events.append(info.name)
mod = get_test_model()
custom_pi = CustomPI()
with tvm.transform.PassContext(instruments=[custom_pi]):
mod = tvm.relay.transform.AnnotateSpans()(mod)
mod = tvm.relay.transform.ToANormalForm()(mod)
mod = tvm.relay.transform.InferType()(mod)
assert "InferType" == "".join(custom_pi.events)
def test_multiple_instrument():
@pass_instrument
class SkipPass:
def __init__(self, skip_pass_name):
self.skip_pass_name = skip_pass_name
def should_run(self, mod, info):
if self.skip_pass_name in info.name:
return False
return True
skip_annotate = SkipPass("AnnotateSpans")
skip_anf = SkipPass("ToANormalForm")
@pass_instrument
class PrintPassName:
def __init__(self):
self.events = []
def run_before_pass(self, mod, info):
self.events.append(info.name)
mod = get_test_model()
print_pass_name = PrintPassName()
with tvm.transform.PassContext(instruments=[skip_annotate, skip_anf, print_pass_name]):
mod = tvm.relay.transform.AnnotateSpans()(mod)
mod = tvm.relay.transform.ToANormalForm()(mod)
mod = tvm.relay.transform.InferType()(mod)
assert "InferType" == "".join(print_pass_name.events)
def test_instrument_pass_counts():
@pass_instrument
class PassesCounter:
def __init__(self):
self.run_before_count = 0
self.run_after_count = 0
def __clear(self):
self.run_before_count = 0
self.run_after_count = 0
def enter_pass_ctx(self):
self.__clear()
def exit_pass_ctx(self):
self.__clear()
def run_before_pass(self, mod, info):
self.run_before_count = self.run_before_count + 1
def run_after_pass(self, mod, info):
self.run_after_count = self.run_after_count + 1
mod = get_test_model()
passes_counter = PassesCounter()
with tvm.transform.PassContext(instruments=[passes_counter]):
tvm.relay.build(mod, "llvm")
assert passes_counter.run_after_count != 0
assert passes_counter.run_after_count == passes_counter.run_before_count
# Out of pass context scope, should be reset
assert passes_counter.run_before_count == 0
assert passes_counter.run_after_count == 0
def test_enter_pass_ctx_exception():
events = []
@pass_instrument
class PI:
def __init__(self, id):
self.id = id
def enter_pass_ctx(self):
events.append(self.id + " enter ctx")
def exit_pass_ctx(self):
events.append(self.id + " exit ctx")
@pass_instrument
class PIBroken(PI):
def __init__(self, id):
super().__init__(id)
def enter_pass_ctx(self):
events.append(self.id + " enter ctx")
raise RuntimeError("Just a dummy error")
pass_ctx = tvm.transform.PassContext(instruments=[PI("%1"), PIBroken("%2"), PI("%3")])
with pytest.raises(tvm.error.TVMError) as cm:
with pass_ctx:
pass
assert "Just a dummy error" in str(cm.execption)
assert "%1 enter ctx" "%2 enter ctx" "%1 exit ctx" == "".join(events)
# Make sure we get correct PassContext
cur_pass_ctx = tvm.transform.PassContext.current()
assert pass_ctx != cur_pass_ctx
assert cur_pass_ctx.instruments == None
def test_enter_pass_ctx_exception_global():
@pass_instrument
class PIBroken:
def enter_pass_ctx(self):
raise RuntimeError("Just a dummy error")
cur_pass_ctx = tvm.transform.PassContext.current()
with pytest.raises(tvm.error.TVMError) as cm:
cur_pass_ctx.override_instruments([PIBroken()])
assert "Just a dummy error" in str(cm.exception)
assert not cur_pass_ctx.instruments
def test_exit_pass_ctx_exception():
events = []
@pass_instrument
class PI:
def __init__(self, id):
self.id = id
def exit_pass_ctx(self):
events.append(self.id + " exit ctx")
def exit_pass_ctx(self):
events.append(self.id + " exit ctx")
@pass_instrument
class PIBroken(PI):
def __init__(self, id):
super().__init__(id)
def exit_pass_ctx(self):
events.append(self.id + " exit ctx")
raise RuntimeError("Just a dummy error")
pass_ctx = tvm.transform.PassContext(instruments=[PI("%1"), PIBroken("%2"), PI("%3")])
with pytest.raises(tvm.error.TVMError) as cm:
with pass_ctx:
pass
assert "Just a dummy error" in str(cm.exception)
assert "%1 exit ctx" "%2 exit ctx" == "".join(events)
# Make sure we get correct PassContext
cur_pass_ctx = tvm.transform.PassContext.current()
assert pass_ctx != cur_pass_ctx
assert not cur_pass_ctx.instruments
def test_exit_pass_ctx_exception_global():
@pass_instrument
class PIBroken:
def exit_pass_ctx(self):
raise RuntimeError("Just a dummy error")
cur_pass_ctx = tvm.transform.PassContext.current()
with pytest.raises(tvm.error.TVMError) as cm:
cur_pass_ctx.override_instruments([PIBroken()])
cur_pass_ctx.override_instruments([PIBroken()])
assert "Just a dummy error" in str(cm.exception)
assert not cur_pass_ctx.instruments
def test_pass_exception():
events = []
@pass_instrument
class PI:
def enter_pass_ctx(self):
events.append("enter_pass_ctx")
def exit_pass_ctx(self):
events.append("exit_pass_ctx")
def should_run(self, mod, info):
events.append("should_run")
return True
def run_before_pass(self, mod, info):
events.append("run_before_pass")
def run_after_pass(self, mod, info):
events.append("run_after_pass")
@tvm.transform.module_pass(opt_level=2)
def transform(mod, ctx):
events.append("transform pass")
raise RuntimeError("Just a dummy error")
return mod
mod = get_test_model()
with pytest.raises(tvm.error.TVMError) as cm:
with tvm.transform.PassContext(instruments=[PI()]):
mod = transform(mod)
assert "Just a dummy error" in str(cm.exception)
assert (
"enter_pass_ctx"
"should_run"
"run_before_pass"
"transform pass"
"exit_pass_ctx" == "".join(events)
)
def test_should_run_exception():
events = []
@pass_instrument
class PI:
def __init__(self, id):
self.id = id
def enter_pass_ctx(self):
events.append(self.id + " enter_pass_ctx")
def exit_pass_ctx(self):
events.append(self.id + " exit_pass_ctx")
def should_run(self, mod, info):
events.append(self.id + " should_run")
raise RuntimeError("Just a dummy error")
return True
def run_before_pass(self, mod, info):
events.append(self.id + " run_before_pass")
def run_after_pass(self, mod, info):
events.append(self.id + " run_after_pass")
@tvm.transform.module_pass(opt_level=2)
def transform(mod, ctx):
events.append("transform pass")
return mod
mod = get_test_model()
with pytest.raises(tvm.error.TVMError) as cm:
with tvm.transform.PassContext(instruments=[PI("%1"), PI("%2")]):
mod = transform(mod)
assert "Just a dummy error" in str(cm.exception)
assert (
"%1 enter_pass_ctx"
"%2 enter_pass_ctx"
"%1 should_run"
"%1 exit_pass_ctx"
"%2 exit_pass_ctx" == "".join(events)
)
def test_run_before_exception():
events = []
@pass_instrument
class PI:
def __init__(self, id):
self.id = id
def enter_pass_ctx(self):
events.append(self.id + " enter_pass_ctx")
def exit_pass_ctx(self):
events.append(self.id + " exit_pass_ctx")
def should_run(self, mod, info):
events.append(self.id + " should_run")
return True
def run_before_pass(self, mod, info):
events.append(self.id + " run_before_pass")
raise RuntimeError("Just a dummy error")
def run_after_pass(self, mod, info):
events.append(self.id + " run_after_pass")
@tvm.transform.module_pass(opt_level=2)
def transform(mod, ctx):
events.append("transform pass")
return mod
mod = get_test_model()
with pytest.raises(tvm.error.TVMError) as cm:
with tvm.transform.PassContext(instruments=[PI("%1"), PI("%2")]):
mod = transform(mod)
assert "Just a dummy error" in str(cm.exception)
assert (
"%1 enter_pass_ctx"
"%2 enter_pass_ctx"
"%1 should_run"
"%2 should_run"
"%1 run_before_pass"
"%1 exit_pass_ctx"
"%2 exit_pass_ctx" == "".join(events)
)
def test_run_after_exception():
events = []
@pass_instrument
class PI:
def __init__(self, id):
self.id = id
def enter_pass_ctx(self):
events.append(self.id + " enter_pass_ctx")
def exit_pass_ctx(self):
events.append(self.id + " exit_pass_ctx")
def should_run(self, mod, info):
events.append(self.id + " should_run")
return True
def run_before_pass(self, mod, info):
events.append(self.id + " run_before_pass")
def run_after_pass(self, mod, info):
events.append(self.id + " run_after_pass")
raise RuntimeError("Just a dummy error")
@tvm.transform.module_pass(opt_level=2)
def transform(mod, ctx):
events.append("transform pass")
return mod
x, y = [tvm.relay.var(c, shape=(3, 4), dtype="float32") for c in "xy"]
mod = tvm.IRModule.from_expr(tvm.relay.add(x, y))
with pytest.raises(tvm.error.TVMError) as cm:
with tvm.transform.PassContext(instruments=[PI("%1"), PI("%2")]):
mod = transform(mod)
assert "Just a dummy error" in str(cm.exception)
assert (
"%1 enter_pass_ctx"
"%2 enter_pass_ctx"
"%1 should_run"
"%2 should_run"
"%1 run_before_pass"
"%2 run_before_pass"
"transform pass"
"%1 run_after_pass"
"%1 exit_pass_ctx"
"%2 exit_pass_ctx" == "".join(events)
)
def test_instrument_call_sequence():
events = []
@pass_instrument
class PI:
def __init__(self, id):
self.id = id
def enter_pass_ctx(self):
events.append(self.id + " enter_pass_ctx")
def exit_pass_ctx(self):
events.append(self.id + " exit_pass_ctx")
def should_run(self, mod, info):
events.append(" " + self.id + " should_run")
return True
def run_before_pass(self, mod, info):
events.append(" " + self.id + " run_before_pass")
def run_after_pass(self, mod, info):
events.append(" " + self.id + " run_after_pass")
@tvm.transform.module_pass(opt_level=2)
def transform1(mod, ctx):
events.append(" transform1 pass")
return mod
@tvm.transform.module_pass(opt_level=2)
def transform2(mod, ctx):
events.append(" transform2 pass")
return mod
mod = get_test_model()
with tvm.transform.PassContext(instruments=[PI("%1"), PI("%2")]):
mod = transform1(mod)
mod = transform2(mod)
assert (
"%1 enter_pass_ctx"
"%2 enter_pass_ctx"
" %1 should_run"
" %2 should_run"
" %1 run_before_pass"
" %2 run_before_pass"
" transform1 pass"
" %1 run_after_pass"
" %2 run_after_pass"
" %1 should_run"
" %2 should_run"
" %1 run_before_pass"
" %2 run_before_pass"
" transform2 pass"
" %1 run_after_pass"
" %2 run_after_pass"
"%1 exit_pass_ctx"
"%2 exit_pass_ctx" == "".join(events)
)
| 29.080979
| 91
| 0.618055
| 1,983
| 15,442
| 4.580434
| 0.099344
| 0.056259
| 0.03391
| 0.051525
| 0.758009
| 0.730486
| 0.690521
| 0.650116
| 0.622922
| 0.612133
| 0
| 0.008805
| 0.271921
| 15,442
| 530
| 92
| 29.135849
| 0.799075
| 0.066313
| 0
| 0.733681
| 0
| 0
| 0.126347
| 0
| 0
| 0
| 0
| 0
| 0.083551
| 1
| 0.208877
| false
| 0.464752
| 0.013055
| 0
| 0.305483
| 0.007833
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
8646c58b05f2a7bdaebf5a4cfb8ae0b34fc73e64
| 61
|
py
|
Python
|
ev3simulator/__init__.py
|
haningrisha/ev3simulator
|
d782d72f62f1be95df8e28cc5d94bfd701bcda1a
|
[
"MIT"
] | null | null | null |
ev3simulator/__init__.py
|
haningrisha/ev3simulator
|
d782d72f62f1be95df8e28cc5d94bfd701bcda1a
|
[
"MIT"
] | null | null | null |
ev3simulator/__init__.py
|
haningrisha/ev3simulator
|
d782d72f62f1be95df8e28cc5d94bfd701bcda1a
|
[
"MIT"
] | null | null | null |
from ev3simulator.Engine import LargeMotor, UltrasonicSensor
| 30.5
| 60
| 0.885246
| 6
| 61
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017857
| 0.081967
| 61
| 1
| 61
| 61
| 0.946429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
86549faedb79dd9a451074ea71375148bedd34ef
| 109
|
py
|
Python
|
swiper/__init__.py
|
FreeGodCode/swiper
|
e1a43289a75f36313a940065b59477be6dc16b11
|
[
"MIT"
] | null | null | null |
swiper/__init__.py
|
FreeGodCode/swiper
|
e1a43289a75f36313a940065b59477be6dc16b11
|
[
"MIT"
] | 6
|
2021-02-01T06:28:34.000Z
|
2021-02-16T14:31:04.000Z
|
swiper/__init__.py
|
FreeGodCode/swiper
|
e1a43289a75f36313a940065b59477be6dc16b11
|
[
"MIT"
] | null | null | null |
import pymysql
from lib.db import patch_model
pymysql.install_as_MySQLdb()
# 首先加载__init__文件
patch_model()
| 12.111111
| 30
| 0.816514
| 17
| 109
| 4.764706
| 0.764706
| 0.246914
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119266
| 109
| 8
| 31
| 13.625
| 0.84375
| 0.12844
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
8692b5b77e7e4d0c16e74e4bea4e03c92dc3efe6
| 163
|
py
|
Python
|
imgcls/modeling/backbone/__init__.py
|
vaishnavmohit/imageclassification-detectron
|
fbce15cd72e104da3a46f3c5549b757f93dbcaca
|
[
"MIT"
] | null | null | null |
imgcls/modeling/backbone/__init__.py
|
vaishnavmohit/imageclassification-detectron
|
fbce15cd72e104da3a46f3c5549b757f93dbcaca
|
[
"MIT"
] | null | null | null |
imgcls/modeling/backbone/__init__.py
|
vaishnavmohit/imageclassification-detectron
|
fbce15cd72e104da3a46f3c5549b757f93dbcaca
|
[
"MIT"
] | null | null | null |
from .mobilenet import *
from .resnet_classification import *
from .resnet_torchvision import *
__all__ = [k for k in globals().keys() if not k.startswith("_")]
| 23.285714
| 64
| 0.736196
| 22
| 163
| 5.136364
| 0.681818
| 0.176991
| 0.283186
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147239
| 163
| 6
| 65
| 27.166667
| 0.81295
| 0
| 0
| 0
| 0
| 0
| 0.006135
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 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
| 1
| 0
|
0
| 5
|
86e6ec4dfa2a22d94b5fd62b536172a69abff23a
| 77
|
py
|
Python
|
tf_taggers/pos_taggers/visualization_views.py
|
xflows/tf_taggers
|
367926aee43937cfa1ace7eca8e3f2aa59306c07
|
[
"MIT"
] | null | null | null |
tf_taggers/pos_taggers/visualization_views.py
|
xflows/tf_taggers
|
367926aee43937cfa1ace7eca8e3f2aa59306c07
|
[
"MIT"
] | null | null | null |
tf_taggers/pos_taggers/visualization_views.py
|
xflows/tf_taggers
|
367926aee43937cfa1ace7eca8e3f2aa59306c07
|
[
"MIT"
] | null | null | null |
import django.template.loader
from django.shortcuts import get_object_or_404
| 25.666667
| 46
| 0.883117
| 12
| 77
| 5.416667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042254
| 0.077922
| 77
| 2
| 47
| 38.5
| 0.873239
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
86f0928db64ce449a575e51c0cd835f4d2858f7f
| 161
|
py
|
Python
|
edaac/models/__init__.py
|
EDAAC/EDAAC
|
136b0fafa554af3be1a46d8576cbf1f8e7996bdb
|
[
"BSD-3-Clause"
] | 8
|
2020-04-29T02:46:18.000Z
|
2021-05-01T16:33:24.000Z
|
edaac/models/__init__.py
|
The-OpenROAD-Project/EDAAC
|
13440174a2aeab80bd87bd8be3729135bdb44961
|
[
"BSD-3-Clause"
] | 2
|
2020-04-29T03:09:07.000Z
|
2020-04-29T03:10:34.000Z
|
edaac/models/__init__.py
|
EDAAC/EDAAC
|
136b0fafa554af3be1a46d8576cbf1f8e7996bdb
|
[
"BSD-3-Clause"
] | 4
|
2020-04-30T15:41:55.000Z
|
2021-03-19T13:27:29.000Z
|
from .project import Project
from .design import Design
from .technology import Technology
from .tool import Tool
from .stage import Stage
from .flow import Flow
| 26.833333
| 34
| 0.819876
| 24
| 161
| 5.5
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 161
| 6
| 35
| 26.833333
| 0.956522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
| 5
|
8126296972e9f7673d321443d9547ae8cd4b170c
| 38
|
py
|
Python
|
netbeansifier/__main__.py
|
tylertian123/netbeansifier
|
ef7a0f24a294bbc5263d587e07fbffc5029a5a57
|
[
"MIT"
] | null | null | null |
netbeansifier/__main__.py
|
tylertian123/netbeansifier
|
ef7a0f24a294bbc5263d587e07fbffc5029a5a57
|
[
"MIT"
] | null | null | null |
netbeansifier/__main__.py
|
tylertian123/netbeansifier
|
ef7a0f24a294bbc5263d587e07fbffc5029a5a57
|
[
"MIT"
] | null | null | null |
from .netbeansify import main
main()
| 9.5
| 29
| 0.763158
| 5
| 38
| 5.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 38
| 3
| 30
| 12.666667
| 0.90625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
813106fc2f3dd1b9e70700d917a40b562c95800d
| 60
|
py
|
Python
|
1_newscrawler/sleeper.py
|
fuadcan/complexBI
|
f1926fe355e8bf9b362df226d2b39c2070b461d2
|
[
"Apache-2.0"
] | 1
|
2020-12-01T16:42:39.000Z
|
2020-12-01T16:42:39.000Z
|
1_newscrawler/sleeper.py
|
fuadcan/complexBI
|
f1926fe355e8bf9b362df226d2b39c2070b461d2
|
[
"Apache-2.0"
] | null | null | null |
1_newscrawler/sleeper.py
|
fuadcan/complexBI
|
f1926fe355e8bf9b362df226d2b39c2070b461d2
|
[
"Apache-2.0"
] | 2
|
2018-10-08T06:34:51.000Z
|
2020-12-01T16:52:38.000Z
|
import time
import random
time.sleep(random.randint(30,40))
| 15
| 33
| 0.8
| 10
| 60
| 4.8
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072727
| 0.083333
| 60
| 3
| 34
| 20
| 0.8
| 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
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.