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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ff7628b4ddb338caad227f33c23db7200a19eebe
| 2,748
|
py
|
Python
|
migrations/versions/46f261240bcb_add_challenge_and_order_tracking.py
|
cloud-gov/legacy-domain-certificate-renewer
|
6b008fdc8e1277cfe4449626e6c488d11fc4857c
|
[
"CC0-1.0"
] | 1
|
2021-11-16T17:25:21.000Z
|
2021-11-16T17:25:21.000Z
|
migrations/versions/46f261240bcb_add_challenge_and_order_tracking.py
|
cloud-gov/legacy-domain-certificate-renewer
|
6b008fdc8e1277cfe4449626e6c488d11fc4857c
|
[
"CC0-1.0"
] | 1
|
2021-12-22T19:04:34.000Z
|
2021-12-22T19:04:34.000Z
|
migrations/versions/46f261240bcb_add_challenge_and_order_tracking.py
|
cloud-gov/legacy-domain-certificate-renewer
|
6b008fdc8e1277cfe4449626e6c488d11fc4857c
|
[
"CC0-1.0"
] | null | null | null |
"""add challenge and order tracking
Revision ID: 46f261240bcb
Revises: 0d14cc3a1cf1
Create Date: 2021-09-14 00:14:56.893591
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "46f261240bcb"
down_revision = "0d14cc3a1cf1"
branch_labels = None
depends_on = None
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_cdn():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"challenges",
sa.Column("id", sa.Integer(), nullable=False),
sa.Column("certificate_id", sa.Integer(), nullable=False),
sa.Column("domain", sa.String(), nullable=False),
sa.Column("validation_path", sa.String(), nullable=False),
sa.Column("validation_contents", sa.Text(), nullable=False),
sa.Column("body_json", sa.Text(), nullable=True),
sa.Column("answered", sa.Boolean(), nullable=True),
sa.ForeignKeyConstraint(
["certificate_id"],
["certificates.id"],
name=op.f("fk_challenges_certificate_id_certificates"),
),
sa.PrimaryKeyConstraint("id", name=op.f("pk_challenges")),
)
op.add_column("certificates", sa.Column("order_json", sa.Text(), nullable=True))
# ### end Alembic commands ###
def downgrade_cdn():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("certificates", "order_json")
op.drop_table("challenges")
# ### end Alembic commands ###
def upgrade_domain():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"challenges",
sa.Column("id", sa.Integer(), nullable=False),
sa.Column("certificate_id", sa.Integer(), nullable=False),
sa.Column("domain", sa.String(), nullable=False),
sa.Column("validation_path", sa.String(), nullable=False),
sa.Column("validation_contents", sa.Text(), nullable=False),
sa.Column("body_json", sa.Text(), nullable=True),
sa.Column("answered", sa.Boolean(), nullable=True),
sa.ForeignKeyConstraint(
["certificate_id"],
["certificates.id"],
name=op.f("fk_challenges_certificate_id_certificates"),
),
sa.PrimaryKeyConstraint("id", name=op.f("pk_challenges")),
)
op.add_column("certificates", sa.Column("order_json", sa.Text(), nullable=True))
# ### end Alembic commands ###
def downgrade_domain():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("certificates", "order_json")
op.drop_table("challenges")
# ### end Alembic commands ###
| 33.108434
| 84
| 0.641921
| 315
| 2,748
| 5.457143
| 0.231746
| 0.074462
| 0.08726
| 0.122164
| 0.792321
| 0.792321
| 0.792321
| 0.792321
| 0.792321
| 0.78185
| 0
| 0.021808
| 0.199054
| 2,748
| 82
| 85
| 33.512195
| 0.7592
| 0.170306
| 0
| 0.692308
| 0
| 0
| 0.221219
| 0.03702
| 0
| 0
| 0
| 0
| 0
| 1
| 0.115385
| false
| 0
| 0.038462
| 0
| 0.153846
| 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
|
440a342b8ca08a24752e4a819bc871cc97b8631b
| 101
|
py
|
Python
|
pamak/Environment.py
|
tanguyesteoule/pamak
|
3dc1eb6f89c51ae4689851b770c879f4d9004bc1
|
[
"MIT"
] | null | null | null |
pamak/Environment.py
|
tanguyesteoule/pamak
|
3dc1eb6f89c51ae4689851b770c879f4d9004bc1
|
[
"MIT"
] | null | null | null |
pamak/Environment.py
|
tanguyesteoule/pamak
|
3dc1eb6f89c51ae4689851b770c879f4d9004bc1
|
[
"MIT"
] | null | null | null |
from abc import ABCMeta
class Environment(metaclass=ABCMeta):
def __init__(self):
pass
| 14.428571
| 37
| 0.70297
| 12
| 101
| 5.583333
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.227723
| 101
| 6
| 38
| 16.833333
| 0.858974
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
442ba7b04bd6f7874453db2dd8a47d39858e95b2
| 81
|
py
|
Python
|
src/omv/boards/PICO/manifest.py
|
elmagnificogi/openmv
|
bc0c9fa5fa93d3dbe07e67b01e1355620a7f1d08
|
[
"MIT"
] | 1,761
|
2015-07-10T23:14:17.000Z
|
2022-03-30T07:49:49.000Z
|
src/omv/boards/PICO/manifest.py
|
elmagnificogi/openmv
|
bc0c9fa5fa93d3dbe07e67b01e1355620a7f1d08
|
[
"MIT"
] | 487
|
2015-07-07T23:21:20.000Z
|
2022-03-30T17:13:22.000Z
|
src/omv/boards/PICO/manifest.py
|
elmagnificogi/openmv
|
bc0c9fa5fa93d3dbe07e67b01e1355620a7f1d08
|
[
"MIT"
] | 882
|
2015-08-01T08:34:19.000Z
|
2022-03-30T07:36:23.000Z
|
freeze ("$(PORT_DIR)/modules")
include("$(MPY_DIR)/extmod/uasyncio/manifest.py")
| 27
| 49
| 0.728395
| 11
| 81
| 5.181818
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037037
| 81
| 2
| 50
| 40.5
| 0.730769
| 0
| 0
| 0
| 0
| 0
| 0.703704
| 0.469136
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
445279999d993aaa867ea8d6dc2b4d35c3259eac
| 211
|
py
|
Python
|
pillar-tracker/utils/discord_wrapper.py
|
zenon-tools/pillar-tracker
|
61ca9c47be438ffb7b9fc1f8424600e6189ba7b9
|
[
"MIT"
] | null | null | null |
pillar-tracker/utils/discord_wrapper.py
|
zenon-tools/pillar-tracker
|
61ca9c47be438ffb7b9fc1f8424600e6189ba7b9
|
[
"MIT"
] | null | null | null |
pillar-tracker/utils/discord_wrapper.py
|
zenon-tools/pillar-tracker
|
61ca9c47be438ffb7b9fc1f8424600e6189ba7b9
|
[
"MIT"
] | null | null | null |
from utils.http_wrapper import HttpWrapper
class DiscordWrapper(object):
def webhook_send_message_to_channel(self, webhook_url, message):
return HttpWrapper.post(webhook_url, {'content': message})
| 30.142857
| 68
| 0.781991
| 26
| 211
| 6.076923
| 0.769231
| 0.126582
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132701
| 211
| 6
| 69
| 35.166667
| 0.863388
| 0
| 0
| 0
| 0
| 0
| 0.033175
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
447591180b32c470067d7085215515394cdfd85e
| 189
|
py
|
Python
|
tests/test_health.py
|
andrewtbiehl/gaslines
|
9ccac6211bb20351d0f80312806baf4b6a07e111
|
[
"MIT"
] | 1
|
2020-09-10T04:41:51.000Z
|
2020-09-10T04:41:51.000Z
|
tests/test_health.py
|
andrewtbiehl/gaslines
|
9ccac6211bb20351d0f80312806baf4b6a07e111
|
[
"MIT"
] | 31
|
2020-11-11T04:32:35.000Z
|
2022-03-31T19:16:01.000Z
|
tests/test_health.py
|
andrewtbiehl/gaslines
|
9ccac6211bb20351d0f80312806baf4b6a07e111
|
[
"MIT"
] | null | null | null |
"""Trivial test module for verifying that unit tests are running as expected."""
def test_health():
"""
This health check test should pass no matter what.
"""
assert True
| 21
| 80
| 0.671958
| 26
| 189
| 4.846154
| 0.884615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.238095
| 189
| 8
| 81
| 23.625
| 0.875
| 0.661376
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.5
| true
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
44967a7d4c273b311057650675e531b45a19004d
| 63
|
py
|
Python
|
PyUnits/__init__.py
|
AngheloAlf/PyUnits
|
b78910c06a7176d02d3b2d63ea4ef905837532ae
|
[
"MIT"
] | null | null | null |
PyUnits/__init__.py
|
AngheloAlf/PyUnits
|
b78910c06a7176d02d3b2d63ea4ef905837532ae
|
[
"MIT"
] | null | null | null |
PyUnits/__init__.py
|
AngheloAlf/PyUnits
|
b78910c06a7176d02d3b2d63ea4ef905837532ae
|
[
"MIT"
] | null | null | null |
from .quantities import SIUnits, SIDerivedUnits, ImperialUnits
| 31.5
| 62
| 0.857143
| 6
| 63
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 63
| 1
| 63
| 63
| 0.947368
| 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
|
92a43a53db72787f3800226bf7202bec42234cc3
| 132
|
py
|
Python
|
Wrapping/CSwig/Python/itkio.py
|
kiranhs/ITKv4FEM-Kiran
|
0e4ab3b61b5fc4c736f04a73dd19e41390f20152
|
[
"BSD-3-Clause"
] | 1
|
2018-04-15T13:32:43.000Z
|
2018-04-15T13:32:43.000Z
|
Wrapping/CSwig/Python/itkio.py
|
kiranhs/ITKv4FEM-Kiran
|
0e4ab3b61b5fc4c736f04a73dd19e41390f20152
|
[
"BSD-3-Clause"
] | null | null | null |
Wrapping/CSwig/Python/itkio.py
|
kiranhs/ITKv4FEM-Kiran
|
0e4ab3b61b5fc4c736f04a73dd19e41390f20152
|
[
"BSD-3-Clause"
] | null | null | null |
from itkcommon import *
__itk_import_data__ = itkbase.preimport()
from ITKIOPython import *
itkbase.postimport(__itk_import_data__)
| 26.4
| 41
| 0.840909
| 16
| 132
| 6.1875
| 0.5625
| 0.181818
| 0.262626
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 132
| 4
| 42
| 33
| 0.825
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2ba972ec8519c2b4330243294be708aa998d1667
| 19,583
|
py
|
Python
|
tests/native/django/test_templatetag.py
|
transifex/transifex-python
|
d467e82bba7f0d620a021cf9e7e58c987ba2fbb5
|
[
"Apache-2.0"
] | 14
|
2020-04-10T20:54:59.000Z
|
2022-03-07T16:13:22.000Z
|
tests/native/django/test_templatetag.py
|
transifex/transifex-python
|
d467e82bba7f0d620a021cf9e7e58c987ba2fbb5
|
[
"Apache-2.0"
] | 60
|
2020-04-14T12:41:06.000Z
|
2022-03-29T06:38:09.000Z
|
tests/native/django/test_templatetag.py
|
transifex/transifex-python
|
d467e82bba7f0d620a021cf9e7e58c987ba2fbb5
|
[
"Apache-2.0"
] | 6
|
2021-01-01T10:28:11.000Z
|
2021-06-10T09:50:26.000Z
|
from __future__ import unicode_literals
from django.template import Context, Template
from django.utils import translation
from transifex.common.utils import generate_key
from transifex.native import tx
from transifex.native.django.templatetags.utils import get_icu_keys
from transifex.native.rendering import SourceStringPolicy
def do_test(template_str, context_dict=None, autoescape=True,
lang_code="en-us"):
""" Use django's templating engine to render a template against a context
Arguments:
:param template_str: The template to render
:param context_dict: The context to render the template against
:param autoescape: Pretend the django templating engine was setup
with autoescape or not (in most real use-cases, it
will have been set up with autoescape=True)
:param lang_code: The language to translate to
:return: The compilation result
Information about (auto)escaping in django:
https://docs.djangoproject.com/en/3.0/ref/templates/language/#automatic-html-escaping # noqa
"""
translation.activate(lang_code)
if context_dict is None:
context_dict = {}
context = Context(dict(context_dict), autoescape=autoescape)
template = ('{% load transifex %}' + template_str)
return Template(template).render(context)
def test_simple():
assert do_test('{% t "hello world" %}') == "hello world"
def test_equal_sign():
# '=' in first arg means parameter and thus block syntax
assert do_test('{% t var="world" %}hello {var}{% endt %}') == "hello world"
# '=' in first arg when first arg is a string literal means it is not a
# parameter and thus inline syntax
assert do_test('{% t "hello=world" %}') == "hello=world"
def test_escaping_with_t_tag_and_autoescape():
# t-tag and autoescape means both XMLs are escaped
assert (do_test('{% t "<xml>hello</xml> {var}" %}',
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
def test_escaping_with_t_tag_and_no_autoescape():
# t-tag and no autoescape means only template XML is escaped
assert (do_test('{% t "<xml>hello</xml> {var}" %}',
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
def test_escaping_with_t_tag_and_param():
# With `var=var`, we have the same outcome as before
assert (do_test('{% t "<xml>hello</xml> {var}" var=var %}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t "<xml>hello</xml> {var}" var=var %}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
def test_escaping_with_t_tag_and_safe_param():
# With `var=var|safe`, `autoescape` is ignored and context XML is not
# escaped
assert (do_test('{% t "<xml>hello</xml> {var}" var=var|safe %}',
# ^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t "<xml>hello</xml> {var}" var=var|safe %}',
# ^^^^^
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
def test_escaping_with_t_tag_and_escaped_param():
# With `var=var|escape`, `autoescape` is ignored and context XML is always
# escaped
assert (do_test('{% t "<xml>hello</xml> {var}" var=var|escape %}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t "<xml>hello</xml> {var}" var=var|escape %}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
def test_escaping_with_ut_tag_and_autoescape():
# ut-tag and autoescape means only context XML is escaped
assert (do_test('{% ut "<xml>hello</xml> {var}" %}',
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
def test_escaping_with_ut_tag_and_no_autoescape():
# ut-tag and no autoescape means no XML is escaped
assert (do_test('{% ut "<xml>hello</xml> {var}" %}',
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
def test_escaping_with_ut_tag_and_param():
# With `var=var`, we have the same outcome as before
assert (do_test('{% ut "<xml>hello</xml> {var}" var=var %}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% ut "<xml>hello</xml> {var}" var=var %}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
def test_escaping_with_ut_tag_and_safe_param():
# With `var=var|safe`, `autoescape` is ignored and context XML is not
# escaped
assert (do_test('{% ut "<xml>hello</xml> {var}" var=var|safe %}',
# ^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% ut "<xml>hello</xml> {var}" var=var|safe %}',
# ^^^^^
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
def test_escaping_with_ut_tag_and_escaped_param():
# With `var=var|escape`, `autoescape` is ignored and context XML is always
# escaped
assert (do_test('{% ut "<xml>hello</xml> {var}" var=var|escape %}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% ut "<xml>hello</xml> {var}" var=var|escape %}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
def test_filters_on_source_string():
assert (do_test('{% t "<xml>hello</xml> {var}"|upper %}',
# ^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<XML>HELLO</XML> <XML>WORLD</XML>')
assert (do_test('{% t "<xml>hello</xml> {var}"|upper %}',
# ^^^^^^
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<XML>HELLO</XML> <XML>WORLD</XML>')
assert (do_test('{% ut "<xml>hello</xml> {var}"|upper %}',
# ^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<XML>HELLO</XML> <XML>WORLD</XML>')
assert (do_test('{% ut "<xml>hello</xml> {var}"|upper %}',
# ^^^^^^
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<XML>HELLO</XML> <XML>WORLD</XML>')
def test_escape_and_safe_filters_on_source_string_ignored():
assert (do_test('{% t "<xml>hello</xml> {var}"|escape %}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t "<xml>hello</xml> {var}"|safe %}',
# ^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% ut "<xml>hello</xml> {var}"|escape %}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% ut "<xml>hello</xml> {var}"|safe %}',
# ^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
def test_asvar():
assert (do_test('{% ut "<xml>hello</xml> {var}" as text %}{{ text }}',
# ^^^^^^^ ^^^^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% ut "<xml>hello</xml> {var}" as text %}{{ text }}',
# ^^^^^^^ ^^^^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t "<xml>hello</xml> {var}" as text %}{{ text }}',
# ^^^^^^^ ^^^^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t "<xml>hello</xml> {var}" as text %}{{ text }}',
# ^^^^^^^ ^^^^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
def test_filter_on_asvar():
assert (
do_test(
'{% t "<xml>hello</xml> {var}" as text %}{{ text|upper|safe }}',
# ^^^^^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True,
) ==
'<XML>HELLO</XML> <XML>WORLD</XML>'
)
def test_escape_and_safe_filter_on_asvar_ignored():
assert (do_test('{% t "<xml>hello</xml> {var}" as text %}{{ text|safe }}',
# ^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (
do_test('{% t "<xml>hello</xml> {var}" as text %}{{ text|escape }}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>'
)
def test_translate_variable():
assert (do_test('{% ut source %}',
# ^^^^^^
{'source': "<xml>hello</xml> {var}",
'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% ut source %}',
# ^^^^^^
{'source': "<xml>hello</xml> {var}",
'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t source %}',
# ^^^^^^
{'source': "<xml>hello</xml> {var}",
'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t source %}',
# ^^^^^^
{'source': "<xml>hello</xml> {var}",
'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
def test_filter_on_source_variable():
assert (do_test('{% ut source|upper %}',
# ^^^^^^
{'source': "<xml>hello</xml> {var}",
'var': "<xml>world</xml>"},
autoescape=True) ==
'<XML>HELLO</XML> <XML>WORLD</XML>')
assert (do_test('{% ut source|upper %}',
# ^^^^^^
{'source': "<xml>hello</xml> {var}",
'var': "<xml>world</xml>"},
autoescape=False) ==
'<XML>HELLO</XML> <XML>WORLD</XML>')
assert (do_test('{% t source|upper %}',
# ^^^^^^
{'source': "<xml>hello</xml> {var}",
'var': "<xml>world</xml>"},
autoescape=True) ==
'<XML>HELLO</XML> <XML>WORLD</XML>')
assert (do_test('{% t source|upper %}',
# ^^^^^^
{'source': "<xml>hello</xml> {var}",
'var': "<xml>world</xml>"},
autoescape=False) ==
'<XML>HELLO</XML> <XML>WORLD</XML>')
def test_safe_and_escape_filter_on_source_variable_ignored():
assert (do_test('{% t source|safe %}',
# ^^^^^
{'source': "<xml>hello</xml> {var}",
'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t source|escape %}',
# ^^^^^^^
{'source': "<xml>hello</xml> {var}",
'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
def test_block():
assert (do_test('{% t %}hello world{% endt %}') == 'hello world')
# ^^^^^^^^^^^^^^^^^^^^^
assert (do_test('{% t %}hello {var}{% endt %}', {'var': "world"}) ==
# ^^^^^^^^^^^^^^^^^^^^^
'hello world')
assert (do_test('{% ut %}<xml>hello</xml> {var}{% endut %}',
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% ut %}<xml>hello</xml> {var}{% endut %}',
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t %}<xml>hello</xml> {var}{% endt %}',
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=False) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t %}<xml>hello</xml> {var}{% endt %}',
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
def test_filter_on_block():
assert (do_test('{% t |upper %}hello world{% endt %}') == 'HELLO WORLD')
# ^^^^^^
def test_safe_and_escape_filter_on_block_ignored():
assert (do_test('{% ut |safe %}<xml>hello</xml> {var}{% endut %}',
# ^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% ut |escape %}<xml>hello</xml> {var}{% endut %}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t |safe %}<xml>hello</xml> {var}{% endt %}',
# ^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
assert (do_test('{% t |escape %}<xml>hello</xml> {var}{% endt %}',
# ^^^^^^^
{'var': "<xml>world</xml>"},
autoescape=True) ==
'<xml>hello</xml> <xml>world</xml>')
def test_translates():
hello_key = generate_key(string='hello', context=None)
tx._cache.update({'fr': (True, {hello_key: {'string': "bonjour"}})})
assert do_test('{% t "hello" %}', lang_code="fr") == "bonjour"
def test_translation_missing():
old_missing_policy = tx._missing_policy
tx._missing_policy = SourceStringPolicy()
tx._cache._translations_by_lang = {}
assert do_test('{% t "hello" %}', lang_code="fr") == "hello"
hello_key = generate_key(string='hello', context=None)
tx._cache.update({'fr': (True, {hello_key: {'string': None}})})
assert do_test('{% t "hello" %}', lang_code="fr") == "hello"
tx._missing_policy = old_missing_policy
def test_escaping_is_done_on_translation():
hello_key = generate_key(string='hello', context=None)
tx._cache.update(
{'fr': (True, {hello_key: {'string': "<xml>bonjour</xml>"}})})
assert (do_test('{% t "hello" %}', lang_code="fr") ==
'<xml>bonjour</xml>')
def test_source_filter_is_applied_on_translation():
# 'hello' => 'bonjour', 'HELLO' => 'I like pancakes'
hello_key = generate_key(string='hello', context=None)
HELLO_key = generate_key(string='HELLO', context=None)
tx._cache.update(
{'fr': (
True,
{
hello_key: {'string': "bonjour"},
HELLO_key: {'string': "I like pancakes"}
}
)})
assert do_test('{% t "hello"|upper %}', lang_code="fr") == "BONJOUR"
# If the filter was applied on the source string, we would get
# 'I like pancakes'
translation.activate('en-us')
def test_get_icu_keys():
assert "username" in get_icu_keys("hello {username}")
assert "cnt" in get_icu_keys("""
{cnt, plural,
one {you have one message}
other {you have # new messages}}
""")
# Nesting
assert "username" in get_icu_keys("""
{gender, select,
male {{username} is a boy}
female {{username} is a girl}}
""")
# Return empty on error
assert get_icu_keys("{{{") == set()
| 42.387446
| 101
| 0.444008
| 2,114
| 19,583
| 3.990066
| 0.080416
| 0.069947
| 0.097925
| 0.081328
| 0.766331
| 0.726378
| 0.714997
| 0.706106
| 0.694606
| 0.68358
| 0
| 0.000158
| 0.354951
| 19,583
| 461
| 102
| 42.479393
| 0.66759
| 0.162845
| 0
| 0.668874
| 1
| 0.135762
| 0.381445
| 0.101891
| 0
| 0
| 0
| 0
| 0.211921
| 1
| 0.096026
| false
| 0
| 0.023179
| 0
| 0.122517
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2beaebe6b30822fa91a880b7b153a22b8d1c6af8
| 97
|
py
|
Python
|
ginga/misc/CanvasTypes.py
|
Cadair/ginga
|
5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8
|
[
"BSD-3-Clause"
] | null | null | null |
ginga/misc/CanvasTypes.py
|
Cadair/ginga
|
5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8
|
[
"BSD-3-Clause"
] | 20
|
2021-05-03T18:02:23.000Z
|
2022-03-12T12:01:04.000Z
|
Lib/site-packages/ginga/misc/CanvasTypes.py
|
fochoao/cpython
|
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
|
[
"bzip2-1.0.6",
"0BSD"
] | null | null | null |
# THIS FILE TO BE DEPRECATED
from ginga.gw.Viewers import *
from ginga.canvas.types.all import *
| 24.25
| 36
| 0.773196
| 16
| 97
| 4.6875
| 0.8125
| 0.24
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14433
| 97
| 3
| 37
| 32.333333
| 0.903614
| 0.268041
| 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
|
2bf80a21b0bf7d9ef3cdcb185d79bd6a1b140f79
| 20
|
py
|
Python
|
example_project/some_modules/third_modules/a49.py
|
Yuriy-Leonov/cython_imports_limit_issue
|
2f9e7c02798fb52185dabfe6ce3811c439ca2839
|
[
"MIT"
] | null | null | null |
example_project/some_modules/third_modules/a49.py
|
Yuriy-Leonov/cython_imports_limit_issue
|
2f9e7c02798fb52185dabfe6ce3811c439ca2839
|
[
"MIT"
] | null | null | null |
example_project/some_modules/third_modules/a49.py
|
Yuriy-Leonov/cython_imports_limit_issue
|
2f9e7c02798fb52185dabfe6ce3811c439ca2839
|
[
"MIT"
] | null | null | null |
class A49:
pass
| 6.666667
| 10
| 0.6
| 3
| 20
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 0.35
| 20
| 2
| 11
| 10
| 0.769231
| 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
|
2bff531991b2401db33399da35749f2eb6bfbe73
| 38
|
py
|
Python
|
mypackagebapat/__init__.py
|
PrathamBapat/mypackagebapat
|
237693ec84dc52f8229a5e0101073b64ef7396a2
|
[
"MIT"
] | null | null | null |
mypackagebapat/__init__.py
|
PrathamBapat/mypackagebapat
|
237693ec84dc52f8229a5e0101073b64ef7396a2
|
[
"MIT"
] | null | null | null |
mypackagebapat/__init__.py
|
PrathamBapat/mypackagebapat
|
237693ec84dc52f8229a5e0101073b64ef7396a2
|
[
"MIT"
] | null | null | null |
from mypackagebapat.mymath import one
| 19
| 37
| 0.868421
| 5
| 38
| 6.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 38
| 1
| 38
| 38
| 0.970588
| 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
|
921dc1a007b3d6baf5cb515b254c4181b3a856a3
| 235
|
py
|
Python
|
src/pyfme/__init__.py
|
jdebecdelievre/PyFME
|
45a46c9dccfaf4961dc9a7320ff43a24e28eb4e4
|
[
"MIT"
] | 1
|
2021-01-24T19:34:46.000Z
|
2021-01-24T19:34:46.000Z
|
src/pyfme/__init__.py
|
jdebecdelievre/PyFME
|
45a46c9dccfaf4961dc9a7320ff43a24e28eb4e4
|
[
"MIT"
] | null | null | null |
src/pyfme/__init__.py
|
jdebecdelievre/PyFME
|
45a46c9dccfaf4961dc9a7320ff43a24e28eb4e4
|
[
"MIT"
] | null | null | null |
"""
Python Flight Mechanics Engine (PyFME).
Copyright (c) AeroPython Development Team.
Distributed under the terms of the MIT License.
"""
from .aircrafts import Aircraft
from .models.state import BodyAxisStateQuaternion as State
| 33.571429
| 58
| 0.782979
| 29
| 235
| 6.344828
| 0.862069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148936
| 235
| 7
| 58
| 33.571429
| 0.92
| 0.553191
| 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
|
a616aea5ef16fe7a62ec5c5224becacb3ed507d2
| 371
|
py
|
Python
|
lib/googlecloudsdk/third_party/apis/storage/v1/__init__.py
|
bopopescu/SDK
|
e6d9aaee2456f706d1d86e8ec2a41d146e33550d
|
[
"Apache-2.0"
] | null | null | null |
lib/googlecloudsdk/third_party/apis/storage/v1/__init__.py
|
bopopescu/SDK
|
e6d9aaee2456f706d1d86e8ec2a41d146e33550d
|
[
"Apache-2.0"
] | null | null | null |
lib/googlecloudsdk/third_party/apis/storage/v1/__init__.py
|
bopopescu/SDK
|
e6d9aaee2456f706d1d86e8ec2a41d146e33550d
|
[
"Apache-2.0"
] | 2
|
2020-11-04T03:08:21.000Z
|
2020-11-05T08:14:41.000Z
|
"""Common imports for generated storage client library."""
# pylint:disable=wildcard-import
import pkgutil
from googlecloudsdk.third_party.apitools.base.py import *
from googlecloudsdk.third_party.apis.storage.v1.storage_v1_client import *
from googlecloudsdk.third_party.apis.storage.v1.storage_v1_messages import *
__path__ = pkgutil.extend_path(__path__, __name__)
| 33.727273
| 76
| 0.830189
| 49
| 371
| 5.877551
| 0.510204
| 0.125
| 0.239583
| 0.291667
| 0.388889
| 0.388889
| 0.388889
| 0.388889
| 0.388889
| 0.388889
| 0
| 0.01173
| 0.080863
| 371
| 10
| 77
| 37.1
| 0.832845
| 0.226415
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a655a8e2b34c1bd7e5db280de5ac96a6557c9aae
| 144
|
py
|
Python
|
website/config.py
|
ChandrapalSd/uidaiproject
|
ca4d20bd09e1fc8f80d74ad118703b569ffa559f
|
[
"MIT"
] | 1
|
2021-11-04T15:38:31.000Z
|
2021-11-04T15:38:31.000Z
|
website/config.py
|
uidaitc/uidaiproject
|
ca4d20bd09e1fc8f80d74ad118703b569ffa559f
|
[
"MIT"
] | null | null | null |
website/config.py
|
uidaitc/uidaiproject
|
ca4d20bd09e1fc8f80d74ad118703b569ffa559f
|
[
"MIT"
] | 1
|
2021-11-01T03:15:25.000Z
|
2021-11-01T03:15:25.000Z
|
twilio_account_sid = 'ACe9b68d4263ba50054c2bcb0c74f48124'
twilio_auth_token = 'bba7ab6b769642caf2df6c5538597198'
twilio_number = '+13203001833'
| 36
| 57
| 0.868056
| 11
| 144
| 10.909091
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.385185
| 0.0625
| 144
| 3
| 58
| 48
| 0.503704
| 0
| 0
| 0
| 0
| 0
| 0.541667
| 0.458333
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a65b4c2c95b9e6dee548cf924f482c0405016640
| 19
|
py
|
Python
|
pypbbot/testing.py
|
PHIKN1GHT/pypbbot_archived
|
8ab70830509c43b0babc53c9972d0a73481bdaa2
|
[
"MIT"
] | null | null | null |
pypbbot/testing.py
|
PHIKN1GHT/pypbbot_archived
|
8ab70830509c43b0babc53c9972d0a73481bdaa2
|
[
"MIT"
] | null | null | null |
pypbbot/testing.py
|
PHIKN1GHT/pypbbot_archived
|
8ab70830509c43b0babc53c9972d0a73481bdaa2
|
[
"MIT"
] | null | null | null |
# Nothing here ^_^
| 9.5
| 18
| 0.631579
| 2
| 19
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.210526
| 19
| 1
| 19
| 19
| 0.733333
| 0.842105
| 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
|
a67b40897216dcc76d69aad8eeff9d4bcbb4a805
| 15,352
|
py
|
Python
|
FetchEachStepData.py
|
Abhijeet1990/MultiSensorDataFusion
|
d2cc770ebb777ffc380a6b7548a6c5c271bf9cf8
|
[
"MIT"
] | null | null | null |
FetchEachStepData.py
|
Abhijeet1990/MultiSensorDataFusion
|
d2cc770ebb777ffc380a6b7548a6c5c271bf9cf8
|
[
"MIT"
] | null | null | null |
FetchEachStepData.py
|
Abhijeet1990/MultiSensorDataFusion
|
d2cc770ebb777ffc380a6b7548a6c5c271bf9cf8
|
[
"MIT"
] | null | null | null |
__author__ = "Abhijeet Sahu"
__credits__ = ["Abhijeet Sahu"]
__email__ = "abhijeet_ntpc@tamu.edu"
__affiliation__ = "Texas A&M University"
# Get Data based on the use case
import pandas as pd
import numpy as np
from DataFusion import DataFusion
import time
import datetime
import msgpack as mp
import sys
def get_intrusion_window(adversary_path):
fusion = DataFusion()
fusion.load_json(adversary_path)
fusion.extract_cyber_data()
fusion.extract_physical_data()
data_to_process = fusion.merge()
attack_start = data_to_process.iloc[0]['Time']
start = int(time.mktime(attack_start.timetuple()))
attack_end = data_to_process.iloc[-1]['Time']
end = int(time.mktime(attack_end.timetuple()))
return start,end
def get_lucene_query(start_time, end_time):
json_body = {
"query": {
"bool": {
"must": [
{
"range": {
"event.end": {
"gte": start_time,
"lte": end_time
}
}
},
{"range": {
"event.duration": {
"gte": 0,
"lte": 3000000
}
}},
{"bool": {"should": [
{"match": {
"destination.port": "20000"
}}
, {
"match": {
"source.port": "20000"
}
}
]
}
}
]
}
}
}
return json_body
def get_file_path(_usecase,_os,_poll_rate,location):
usecase=_usecase
os=_os
poll_rate = _poll_rate
start_time='2020-10-17T12:28:00.000Z'
end_time='2020-10-17T20:45:00.000Z'
common_path ='../data/RawFiles/'
if os==10 and poll_rate ==60 and usecase=='UC1':
jsonpath='Raw/UC1_'+location+'_10OS_poll60_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_10os_poll60_UC1.pickle'
snort_path='snort/UC1_PyDNP3_CORE_Snort_10_OS_60_1017'
start_time='2020-10-17T17:45:00.000Z'
end_time='2020-10-17T18:30:00.000Z'
elif os==10 and poll_rate ==30 and usecase=='UC1':
jsonpath='Raw/UC1_'+location+'_10OS_poll30_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_10os_poll30_UC1.pickle'
snort_path='snort/UC1_PyDNP3_CORE_Snort_10_OS_30_1017'
start_time='2020-10-17T15:30:00.000Z'
end_time='2020-10-17T16:15:00.000Z'
elif os==5 and poll_rate ==30 and usecase=='UC2':
jsonpath='Raw/UC2_'+location+'_5OS_poll30_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_5os_poll30_UC2.pickle'
snort_path='snort/UC2_PyDNP3_CORE_Snort_5_OS_30_1017'
start_time='2020-10-17T17:50:00.000Z'
end_time='2020-10-17T18:30:00.000Z'
elif os==5 and poll_rate ==60 and usecase=='UC2':
jsonpath='Raw/UC2_'+location+'_5OS_poll60_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_5os_poll60_UC2.pickle'
snort_path='snort/UC2_PyDNP3_CORE_Snort_5_OS_60_1017'
start_time='2020-10-17T19:35:00.000Z'
end_time='2020-10-17T20:00:00.000Z'
elif os==10 and poll_rate ==30 and usecase=='UC2':
jsonpath='Raw/UC2_'+location+'_10OS_poll30_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_10os_poll30_UC2.pickle'
snort_path='snort/UC2_PyDNP3_CORE_Snort_10_OS_30_1017'
start_time='2020-10-17T15:50:00.000Z'
end_time='2020-10-17T16:30:00.000Z'
elif os==10 and poll_rate ==60 and usecase=='UC2':
jsonpath='Raw/UC2_'+location+'_10OS_poll60_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_10os_poll60_UC2.pickle'
snort_path='snort/UC2_PyDNP3_CORE_Snort_10_OS_60_1017'
start_time='2020-10-17T18:15:00.000Z'
end_time='2020-10-17T18:45:00.000Z'
elif os==5 and poll_rate ==30 and usecase=='UC3':
jsonpath='Raw/UC3_'+location+'_5OS_poll30_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_5os_poll30_UC3.pickle'
snort_path='snort/UC3_PyDNP3_CORE_Snort_5_OS_30_1017'
start_time='2020-10-17T17:40:00.000Z'
end_time='2020-10-17T18:05:00.000Z'
elif os==5 and poll_rate ==60 and usecase=='UC3':
jsonpath='Raw/UC3_'+location+'_5OS_poll60_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_5os_poll60_UC3.pickle'
snort_path='snort/UC3_PyDNP3_CORE_Snort_5_OS_60_1017'
start_time='2020-10-17T19:15:00.000Z'
end_time='2020-10-17T19:45:00.000Z'
elif os==10 and poll_rate ==30 and usecase=='UC3':
jsonpath='Raw/UC3_'+location+'_10OS_poll30_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_10os_poll30_UC3.pickle'
snort_path='snort/UC3_PyDNP3_CORE_Snort_10_OS_30_1017'
start_time='2020-10-17T16:15:00.000Z'
end_time='2020-10-17T16:50:00.000Z'
elif os==10 and poll_rate ==60 and usecase=='UC3':
jsonpath='Raw/UC3_'+location+'_10OS_poll60_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_10os_poll60_UC3.pickle'
snort_path='snort/UC3_PyDNP3_CORE_Snort_10_OS_60_1017'
start_time='2020-10-17T18:30:00.000Z'
end_time='2020-10-17T19:00:00.000Z'
elif os==5 and poll_rate ==30 and usecase=='UC4':
jsonpath='Raw/UC4_'+location+'_5OS_poll30_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_5os_poll30_UC4.pickle'
snort_path='snort/UC4_PyDNP3_CORE_Snort_5_OS_30_1017'
start_time='2020-10-17T17:25:00.000Z'
end_time='2020-10-17T17:55:00.000Z'
elif os==5 and poll_rate ==60 and usecase=='UC4':
jsonpath='Raw/UC4_'+location+'_5OS_poll60_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_5os_poll60_UC4.pickle'
snort_path='snort/UC4_PyDNP3_CORE_Snort_5_OS_60_1017'
start_time='2020-10-17T19:00:00.000Z'
end_time='2020-10-17T19:30:00.000Z'
elif os==10 and poll_rate ==30 and usecase=='UC4':
jsonpath='Raw/UC4_'+location+'_10OS_poll30_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_10os_poll30_UC4.pickle'
snort_path='snort/UC4_PyDNP3_CORE_Snort_10_OS_30_1017'
start_time='2020-10-17T17:05:00.000Z'
end_time='2020-10-17T17:35:00.000Z'
elif os==10 and poll_rate ==60 and usecase=='UC4':
jsonpath='Raw/UC4_'+location+'_10OS_poll60_dnp3_arp.json'
pickle_path='PickleFiles/'+location+'_dnp3_arp_10os_poll60_UC4.pickle'
snort_path='snort/UC4_PyDNP3_CORE_Snort_10_OS_60_1017'
start_time='2020-10-17T18:40:00.000Z'
end_time='2020-10-17T19:15:00.000Z'
jsonpath = common_path+location+'/'+jsonpath
pickle_path = common_path+location+'/'+pickle_path
snort_path = common_path+snort_path
return jsonpath, pickle_path, snort_path, start_time, end_time
#### Arguments ##############
'''
argument 1: use case Example: UC1_5OS_60poll , i.e. use case 1, with 5 DNP3 outstation polled with a polling interval of 60 sec
argument 2: Determine the stage in the data pre-processing. The valid numbers are from 1 to 8.
argument 3: Select the location for collecting the raw data. Select either : "master", "DS", "router"
argument 4: Boolean indicating if it can reach elasticsearch database and its packetbeat index
'''
print('Argument List:' + str(sys.argv))
case = sys.argv[1]
_usecase = case.split('_')[0]
print(_usecase)
outstations = case.split('_')[1]
_os = outstations.replace('OS','')
poll_interval = case.split('_')[2]
_pi = poll_interval.replace('poll','')
stage = sys.argv[2]
location = sys.argv[3]
es_connected = sys.argv[4]
if es_connected == 'False':
es_connected = False
#### based on the stage pack the value of that stage and return####
jsonpath, pickle_path, snort_path,start_time, end_time = get_file_path(_usecase,int(_os),int(_pi),location)
fusion = DataFusion()
fusion.load_json(jsonpath)
fusion.extract_cyber_data()
data_as_list=[]
to_monitor={}
if 'UC1' in _usecase:
to_monitor ={'399':[5], '456':[18],'1195':[24],'1200':[27]}
elif 'UC2' in _usecase:
to_monitor ={'390':[20],'601':[34],'631':[23],'968':[27],'968':[29]}
elif 'UC3' in _usecase:
to_monitor ={'390':[20],'560':[24], '601':[34],'968':[27],'968':[29]}
elif 'UC4' in _usecase:
to_monitor ={'390':[20],'601':[38], '601':[38],'968':[27],'968':[29]}
if stage == '1':
data_as_list = fusion.cyber_table.values.tolist()
mp.pack(data_as_list, open('msgpack_'+sys.argv[1]+'_'+stage+'.mp','wb'))
print(fusion.cyber_table)
sys.exit()
elif stage == '2':
fusion.pcap_table = pd.read_pickle(pickle_path)
fusion.merge_by_pcap()
data_as_list = fusion.cyber_table.values.tolist()
mp.pack(data_as_list, open('msgpack_'+sys.argv[1]+'_'+stage+'.mp','wb'))
print(fusion.cyber_table)
sys.exit()
elif stage =='3':
fusion.pcap_table = pd.read_pickle(pickle_path)
fusion.merge_by_pcap()
print(es_connected)
if es_connected:
fusion.connect_to_elasticsearch('10.110.215.39')
json_body=get_lucene_query(start_time, end_time)
fusion.retrieve_packetbeat(json_body = json_body)
fusion.extract_packetbeat()
fusion.merge_packetbeat()
data_as_list = fusion.cyber_table.values.tolist()
mp.pack(data_as_list, open('msgpack_'+sys.argv[1]+'_'+stage+'.mp','wb'))
print(fusion.cyber_table)
sys.exit()
elif stage == '4':
fusion.pcap_table = pd.read_pickle(pickle_path)
fusion.merge_by_pcap()
if es_connected:
fusion.connect_to_elasticsearch('10.110.215.39')
json_body=get_lucene_query(start_time, end_time)
fusion.retrieve_packetbeat(json_body = json_body)
fusion.extract_packetbeat()
fusion.merge_packetbeat()
fusion.process_snort(snort_path)
fusion.merge_snort()
data_as_list = fusion.cyber_table.values.tolist()
mp.pack(data_as_list, open('msgpack_'+sys.argv[1]+'_'+stage+'.mp','wb'))
print(fusion.cyber_table)
sys.exit()
elif stage == '5':
fusion.pcap_table = pd.read_pickle(pickle_path)
fusion.merge_by_pcap()
if es_connected:
fusion.connect_to_elasticsearch('10.110.215.39')
json_body=get_lucene_query(start_time, end_time)
fusion.retrieve_packetbeat(json_body = json_body)
fusion.extract_packetbeat()
fusion.merge_packetbeat()
fusion.process_snort(snort_path)
fusion.merge_snort()
fusion.physical_table = fusion.extract_physical_data_with_values(to_monitor) # have to add the function in the class
data_as_list = fusion.physical_table.values.tolist()
mp.pack(data_as_list, open('msgpack_'+sys.argv[1]+'_'+stage+'.mp','wb'))
print(fusion.physical_table)
sys.exit()
elif stage == '6':
fusion.pcap_table = pd.read_pickle(pickle_path)
fusion.merge_by_pcap()
if es_connected:
fusion.connect_to_elasticsearch('10.110.215.39')
json_body=get_lucene_query(start_time, end_time)
fusion.retrieve_packetbeat(json_body = json_body)
fusion.extract_packetbeat()
fusion.merge_packetbeat()
fusion.process_snort(snort_path)
fusion.merge_snort()
fusion.physical_table = fusion.extract_physical_data_with_values(to_monitor) # have to add the function in the class
fusion.merge()
fusion.merged_table = fusion.merged_table.drop(columns=['Time'])
data_as_list = fusion.merged_table.values.tolist()
mp.pack(data_as_list, open('msgpack_'+sys.argv[1]+'_'+stage+'.mp','wb'))
print(fusion.merged_table)
sys.exit()
elif stage == '7':
fusion.pcap_table = pd.read_pickle(pickle_path)
fusion.merge_by_pcap()
if es_connected:
fusion.connect_to_elasticsearch('10.110.215.39')
json_body=get_lucene_query(start_time, end_time)
fusion.retrieve_packetbeat(json_body = json_body)
fusion.extract_packetbeat()
fusion.merge_packetbeat()
fusion.process_snort(snort_path)
fusion.merge_snort()
fusion.physical_table = fusion.extract_physical_data_with_values(to_monitor) # have to add the function in the class
fusion.merge()
replace_map = [('ip.src', '0.0.0.0'), ('ip.dst', '0.0.0.0'), ('ip.len', 0),
('ip.flags', '0x00000000'),('tcp.srcport', 0), ('tcp.dstport', 0),('tcp.flags', '0x00000000'),
('tcp.len', 0),('LL_dnp3_src', -1), ('LL_dnp3_dst', -1),('LL_dnp3_len', 0), ('AL_dnp3_al_func', -1),
('LL_dnp3_ctl', '0x00000000'),('TL_dnp3_tr_ctl', '0x00000000'),
('AL_dnp3_al_ctl', '0x00000000'),('AL_dnp3_obj', 0), ('AL_Payload', 0),
('DNP3 Object Count', 0),('DNP3 Objects', -1), ('tcp_rtt', -1), ('tcp_retransmission', 0),
('snort_alert', 0),('snort_alert_type', 'None'), ('flow.count', -1), ('flow.final_count', -1),
('packets', -1)]
replace_map = dict(replace_map)
fusion.imputate(replace_map)
fusion.merged_table = fusion.merged_table.drop(columns=['Time'])
data_as_list = fusion.merged_table.values.tolist()
mp.pack(data_as_list, open('msgpack_'+sys.argv[1]+'_'+stage+'.mp','wb'))
print(fusion.merged_table)
sys.exit()
elif stage == '8':
fusion.pcap_table = pd.read_pickle(pickle_path)
fusion.merge_by_pcap()
if es_connected:
fusion.connect_to_elasticsearch('10.110.215.39')
json_body=get_lucene_query(start_time, end_time)
fusion.retrieve_packetbeat(json_body = json_body)
fusion.extract_packetbeat()
fusion.merge_packetbeat()
fusion.process_snort(snort_path)
fusion.merge_snort()
fusion.physical_table = fusion.extract_physical_data_with_values(to_monitor) # have to add the function in the class
fusion.merge()
replace_map =[('ip.src', '0.0.0.0'), ('ip.dst', '0.0.0.0'), ('ip.len', 0),
('ip.flags', '0x00000000'),('tcp.srcport', 0), ('tcp.dstport', 0),('tcp.flags', '0x00000000'),
('tcp.len', 0),('LL_dnp3_src', -1), ('LL_dnp3_dst', -1),('LL_dnp3_len', 0), ('AL_dnp3_al_func', -1),
('LL_dnp3_ctl', '0x00000000'),('TL_dnp3_tr_ctl', '0x00000000'),
('AL_dnp3_al_ctl', '0x00000000'),('AL_dnp3_obj', 0), ('AL_Payload', 0),
('DNP3 Object Count', 0),('DNP3 Objects', -1), ('tcp_rtt', -1), ('tcp_retransmission', 0),
('snort_alert', 0),('snort_alert_type', 'None'), ('flow.count', -1), ('flow.final_count', -1),
('packets', -1)]
replace_map = dict(replace_map)
fusion.imputate(replace_map)
encoding_list=['frame.protocols', 'eth.src', 'eth.dst', 'ip.src',
'ip.dst', 'ip.len', 'ip.flags', 'tcp.srcport', 'tcp.dstport', 'tcp.len',
'tcp.flags', 'snort_alert_type', 'LL_dnp3_src', 'LL_dnp3_dst', 'LL_dnp3_len', 'LL_dnp3_ctl',
'TL_dnp3_tr_ctl', 'AL_dnp3_al_ctl', 'AL_dnp3_obj',
'AL_Payload']
fusion.encode(encoding_list)
fusion.merged_table = fusion.merged_table.drop(columns=['Time'])
data_as_list = fusion.merged_table.values.tolist()
mp.pack(data_as_list, open('msgpack_'+sys.argv[1]+'_'+stage+'.mp','wb'))
print(fusion.merged_table)
sys.exit()
| 44.758017
| 127
| 0.652358
| 2,175
| 15,352
| 4.274483
| 0.11908
| 0.025815
| 0.032268
| 0.024201
| 0.789394
| 0.777025
| 0.774013
| 0.727654
| 0.720555
| 0.72034
| 0
| 0.10179
| 0.199453
| 15,352
| 342
| 128
| 44.888889
| 0.654679
| 0.016415
| 0
| 0.397476
| 0
| 0
| 0.262245
| 0.144136
| 0
| 0
| 0.006831
| 0
| 0
| 1
| 0.009464
| false
| 0
| 0.022082
| 0
| 0.041009
| 0.0347
| 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
|
a6936440fe24a370ea3d61d87c2e9da0e64189e6
| 221
|
py
|
Python
|
project/api/serializers.py
|
akxen/pyomo-drf-docker
|
9299561e61ce0cc6b40968e078aea84bded1228b
|
[
"Apache-2.0"
] | null | null | null |
project/api/serializers.py
|
akxen/pyomo-drf-docker
|
9299561e61ce0cc6b40968e078aea84bded1228b
|
[
"Apache-2.0"
] | null | null | null |
project/api/serializers.py
|
akxen/pyomo-drf-docker
|
9299561e61ce0cc6b40968e078aea84bded1228b
|
[
"Apache-2.0"
] | null | null | null |
from rest_framework import serializers
class ModelDataSerializer(serializers.Serializer):
PARAMETER_1 = serializers.FloatField()
PARAMETER_2 = serializers.FloatField()
PARAMETER_3 = serializers.FloatField()
| 27.625
| 50
| 0.79638
| 21
| 221
| 8.190476
| 0.619048
| 0.366279
| 0.348837
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015625
| 0.131222
| 221
| 7
| 51
| 31.571429
| 0.880208
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
a6be52bbcf4d347230213e51a7eba568d0c0c282
| 310
|
py
|
Python
|
code-aaron/ch6-userforms/services/user_service.py
|
ayhteo/web-applications-with-fastapi-course
|
160d74c70528fbb803d95e4a80e495ddbd5e9833
|
[
"MIT"
] | null | null | null |
code-aaron/ch6-userforms/services/user_service.py
|
ayhteo/web-applications-with-fastapi-course
|
160d74c70528fbb803d95e4a80e495ddbd5e9833
|
[
"MIT"
] | null | null | null |
code-aaron/ch6-userforms/services/user_service.py
|
ayhteo/web-applications-with-fastapi-course
|
160d74c70528fbb803d95e4a80e495ddbd5e9833
|
[
"MIT"
] | null | null | null |
from data.user import User
from typing import Optional
def create_account(name: str, email: str, password: str):
return User(name, email, "abcde")
def login_user(email: str, password: str) -> Optional[User]:
if password == "abcde":
return User("test_user", email, password)
return None
| 23.846154
| 60
| 0.690323
| 43
| 310
| 4.906977
| 0.44186
| 0.075829
| 0.151659
| 0.180095
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.193548
| 310
| 12
| 61
| 25.833333
| 0.844
| 0
| 0
| 0
| 0
| 0
| 0.06129
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.5
| 0.25
| 0.125
| 0.875
| 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
|
a6dbe6528df34869dace0729700b5d92dcff5a1c
| 57
|
py
|
Python
|
rhucrl/__init__.py
|
sebascuri/rhucrl
|
27663e1302f3bbc636dff28495c6f2667bb7c1da
|
[
"MIT"
] | 1
|
2021-11-19T11:46:48.000Z
|
2021-11-19T11:46:48.000Z
|
rhucrl/__init__.py
|
sebascuri/rhucrl
|
27663e1302f3bbc636dff28495c6f2667bb7c1da
|
[
"MIT"
] | 1
|
2021-11-22T07:48:03.000Z
|
2021-11-22T07:48:03.000Z
|
rhucrl/__init__.py
|
sebascuri/rhucrl
|
27663e1302f3bbc636dff28495c6f2667bb7c1da
|
[
"MIT"
] | 1
|
2022-03-26T10:18:01.000Z
|
2022-03-26T10:18:01.000Z
|
"""Python Script Template."""
from .environment import *
| 19
| 29
| 0.719298
| 6
| 57
| 6.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122807
| 57
| 2
| 30
| 28.5
| 0.82
| 0.403509
| 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
|
a6fb8ead5fa42953371099e9172136a1a83cfeea
| 2,559
|
py
|
Python
|
tools/PETRAinfo.py
|
hzg-wpi/p05nano
|
af13c97256e754e30512d4c9ef88c287f09dedaa
|
[
"MIT"
] | null | null | null |
tools/PETRAinfo.py
|
hzg-wpi/p05nano
|
af13c97256e754e30512d4c9ef88c287f09dedaa
|
[
"MIT"
] | null | null | null |
tools/PETRAinfo.py
|
hzg-wpi/p05nano
|
af13c97256e754e30512d4c9ef88c287f09dedaa
|
[
"MIT"
] | null | null | null |
import time
# TODO Is it used?
def GetPETRAinfoString(itype, infostr, inumber, time0, tTTTGW, tQBPM):
"""
Layout: Petra Beam Current // Beam Lifetime // Orbit RMSx // Orbit RMSy // Topup status // QBPM current // QBPM pos x //QBPM pos y
if not readable, return value is -1
"""
s = '%13s\t%5s\t%05i\t%e\t' %(itype[:13], infostr[:5], inumber, time.time()-time0)
try:
tmp = tTTTGW.read_attribute('BeamCurrent').value
s += '%010.6f\t' %tmp
except:
s += '-01.000000\t'
try:
tmp = tTTTGW.read_attribute('BeamLifetime').value
s += '%06.3f\t' %tmp
except:
s += '-1.000\t'
try:
tmp = tTTTGW.read_attribute('OrbitRMSX').value
s += '%010.6f\t' %tmp
except:
s += '-01.000000\t'
try:
tmp = tTTTGW.read_attribute('OrbitRMSY').value
s += '%010.6f\t' %tmp
except:
s += '-01.000000\t'
try:
tmp = tTTTGW.read_attribute('TopUpStatus').value
s += '%04.1f\t' %tmp
except:
s += '-1.0\t'
try:
tmp = tQBPM.read_attribute('PosAndAvgCurr').value
s += '%e\t' %tmp[2]
except:
s += '-01.000000\t'
try:
tmp = tQBPM.read_attribute('PosAndAvgCurr').value
s += '%e\t' %tmp[0]
except:
s += '-01.000000\t'
try:
tmp = tQBPM.read_attribute('PosAndAvgCurr').value
s += '%e\t' %tmp[1]
except:
s += '-01.000000\t'
return s+'\n'
def GetPETRAinfoStringShort(itype, infostr, inumber, motorpos, time0, tTTTGW, tQBPM):
"""
Layout: image identifier // infostr // image number // motorpos // timestamp // Petra Beam Current // Orbit RMSx // Orbit RMSy // QBPM current // QBPM pos x //QBPM pos y
if not readable, return value is -1
"""
s = '%13s\t%5s\t%05i\t%e\t%e\t' %(itype[:13], infostr[:5], inumber, motorpos, time.time()-time0)
try:
tmp = tTTTGW.read_attribute('BeamCurrent').value
s += '%010.6f\t' %tmp
except:
s += '-01.000000\t'
try:
tmp = tTTTGW.read_attribute('OrbitRMSX').value
s += '%010.6f\t' %tmp
except:
s += '-01.000000\t'
try:
tmp = tTTTGW.read_attribute('OrbitRMSY').value
s += '%010.6f\t' %tmp
except:
s += '-01.000000\t'
try:
tmp = tQBPM.read_attribute('PosAndAvgCurr').value
s += '%e\t' %tmp[2]
s += '%e\t' %tmp[0]
s += '%e\t' %tmp[1]
except:
s += '-01.000000\t'
s += '-01.000000\t'
s += '-01.000000\t'
return s+'\n'
| 30.464286
| 174
| 0.529504
| 345
| 2,559
| 3.892754
| 0.205797
| 0.041698
| 0.080417
| 0.089352
| 0.735666
| 0.711839
| 0.711839
| 0.699926
| 0.650782
| 0.650782
| 0
| 0.088154
| 0.290739
| 2,559
| 83
| 175
| 30.831325
| 0.651791
| 0.153185
| 0
| 0.84507
| 0
| 0
| 0.204417
| 0.021617
| 0
| 0
| 0
| 0.012048
| 0
| 1
| 0.028169
| false
| 0
| 0.014085
| 0
| 0.070423
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
472adf1190764a1f42c14a1c2e44a75b5bc18e4c
| 59
|
py
|
Python
|
inferno/extensions/criteria/__init__.py
|
svenpeter42/inferno
|
6bcae839f7989666acbf02c2fca87f0b528d9247
|
[
"Apache-2.0"
] | null | null | null |
inferno/extensions/criteria/__init__.py
|
svenpeter42/inferno
|
6bcae839f7989666acbf02c2fca87f0b528d9247
|
[
"Apache-2.0"
] | 1
|
2017-12-20T21:36:48.000Z
|
2017-12-20T21:36:48.000Z
|
inferno/extensions/criteria/__init__.py
|
svenpeter42/inferno
|
6bcae839f7989666acbf02c2fca87f0b528d9247
|
[
"Apache-2.0"
] | 1
|
2021-01-27T12:29:30.000Z
|
2021-01-27T12:29:30.000Z
|
from .set_similarity_measures import *
from .core import *
| 19.666667
| 38
| 0.79661
| 8
| 59
| 5.625
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135593
| 59
| 2
| 39
| 29.5
| 0.882353
| 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
|
472ede4162bd07cbeb800dc3ab83902af39eb450
| 54
|
py
|
Python
|
lyrics_extractor/__init__.py
|
99lyricstore/PyLyrics-Extractor
|
ae4dd2225f9d3bd34494e266ceddf9e52b3868b6
|
[
"MIT"
] | 46
|
2019-01-15T20:43:13.000Z
|
2022-02-17T15:46:22.000Z
|
lyrics_extractor/__init__.py
|
99lyricstore/PyLyrics-Extractor
|
ae4dd2225f9d3bd34494e266ceddf9e52b3868b6
|
[
"MIT"
] | 8
|
2019-02-03T18:06:01.000Z
|
2021-08-04T10:40:13.000Z
|
lyrics_extractor/__init__.py
|
99lyricstore/PyLyrics-Extractor
|
ae4dd2225f9d3bd34494e266ceddf9e52b3868b6
|
[
"MIT"
] | 14
|
2019-02-20T13:06:52.000Z
|
2022-02-15T14:14:58.000Z
|
from .lyrics import SongLyrics, LyricScraperException
| 27
| 53
| 0.87037
| 5
| 54
| 9.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092593
| 54
| 1
| 54
| 54
| 0.959184
| 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
|
5b2b15ea216e1e63e3f90188b988fdfd10a89d92
| 1,004
|
py
|
Python
|
test/test_cart_settings_payment_credit_card.py
|
gstingy/uc_python_api
|
9a0bd3f6e63f616586681518e44fe37c6bae2bba
|
[
"Apache-2.0"
] | null | null | null |
test/test_cart_settings_payment_credit_card.py
|
gstingy/uc_python_api
|
9a0bd3f6e63f616586681518e44fe37c6bae2bba
|
[
"Apache-2.0"
] | null | null | null |
test/test_cart_settings_payment_credit_card.py
|
gstingy/uc_python_api
|
9a0bd3f6e63f616586681518e44fe37c6bae2bba
|
[
"Apache-2.0"
] | null | null | null |
# coding: utf-8
"""
UltraCart Rest API V2
UltraCart REST API Version 2
OpenAPI spec version: 2.0.0
Contact: support@ultracart.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
import unittest
import ultracart
from ultracart.rest import ApiException
from ultracart.models.cart_settings_payment_credit_card import CartSettingsPaymentCreditCard
class TestCartSettingsPaymentCreditCard(unittest.TestCase):
""" CartSettingsPaymentCreditCard unit test stubs """
def setUp(self):
pass
def tearDown(self):
pass
def testCartSettingsPaymentCreditCard(self):
"""
Test CartSettingsPaymentCreditCard
"""
# FIXME: construct object with mandatory attributes with example values
#model = ultracart.models.cart_settings_payment_credit_card.CartSettingsPaymentCreditCard()
pass
if __name__ == '__main__':
unittest.main()
| 22.311111
| 99
| 0.731076
| 105
| 1,004
| 6.790476
| 0.571429
| 0.054698
| 0.044881
| 0.075736
| 0.123422
| 0.123422
| 0.123422
| 0
| 0
| 0
| 0
| 0.007463
| 0.199203
| 1,004
| 44
| 100
| 22.818182
| 0.879353
| 0.431275
| 0
| 0.1875
| 1
| 0
| 0.015625
| 0
| 0
| 0
| 0
| 0.022727
| 0
| 1
| 0.1875
| false
| 0.1875
| 0.4375
| 0
| 0.6875
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
5b51d7217cd42051bab974d8ba5f36b301a77be5
| 424
|
py
|
Python
|
colorPrint.py
|
Sletteon/csjelentkezes
|
a6e2869f7793bc6de0148201766a1c688b935cb5
|
[
"MIT"
] | 1
|
2018-01-12T07:47:31.000Z
|
2018-01-12T07:47:31.000Z
|
colorPrint.py
|
Sletteon/csjelentkezes
|
a6e2869f7793bc6de0148201766a1c688b935cb5
|
[
"MIT"
] | null | null | null |
colorPrint.py
|
Sletteon/csjelentkezes
|
a6e2869f7793bc6de0148201766a1c688b935cb5
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# Kiírja az állapotnak megfelelő ikont, és utána a szöveget
class colorPrint:
def errPrint(self, message):
print('\n[&&&] ' + message)
def warnPrint(self, message):
print('\n[*] ' + message)
def okPrint(self, message):
print('\n[+] ' + message)
def finePrint(self, message):
print('\n[-] ' + message)
def startPrint(self, IpAddress):
print('[+] ' + 'Szerver fut: ' + IpAddress)
| 20.190476
| 59
| 0.622642
| 50
| 424
| 5.28
| 0.54
| 0.166667
| 0.242424
| 0.257576
| 0.409091
| 0.409091
| 0
| 0
| 0
| 0
| 0
| 0.00289
| 0.183962
| 424
| 20
| 60
| 21.2
| 0.760116
| 0.186321
| 0
| 0
| 0
| 0
| 0.125731
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.454545
| false
| 0
| 0
| 0
| 0.545455
| 0.454545
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
|
0
| 5
|
5b939c79d374540bd6b8082e0a60d927a262cefa
| 108
|
py
|
Python
|
trail.py
|
ColonelAVP/Devops-Demo
|
dfd02b36a8b6548167db58c6b2dbccf3c380d807
|
[
"Apache-2.0"
] | null | null | null |
trail.py
|
ColonelAVP/Devops-Demo
|
dfd02b36a8b6548167db58c6b2dbccf3c380d807
|
[
"Apache-2.0"
] | null | null | null |
trail.py
|
ColonelAVP/Devops-Demo
|
dfd02b36a8b6548167db58c6b2dbccf3c380d807
|
[
"Apache-2.0"
] | null | null | null |
def name(firstname,lastname):
return f"My name is {firstname} {lastname}"
print(name("Atherv", "Patil"))
| 21.6
| 45
| 0.703704
| 15
| 108
| 5.066667
| 0.733333
| 0.447368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12037
| 108
| 4
| 46
| 27
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.407407
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 0.666667
| 0.333333
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
5bb18bd45e05faae6095125b3158506e62ed27db
| 330
|
py
|
Python
|
hgraph/__init__.py
|
Amir-Mehrpanah/hgraph2graph
|
6d37153afe09f7684381ce56e8366675e22833e9
|
[
"MIT"
] | 182
|
2019-11-15T15:59:31.000Z
|
2022-03-31T09:17:40.000Z
|
hgraph/__init__.py
|
Amir-Mehrpanah/hgraph2graph
|
6d37153afe09f7684381ce56e8366675e22833e9
|
[
"MIT"
] | 30
|
2020-03-03T16:35:52.000Z
|
2021-12-16T04:06:57.000Z
|
hgraph/__init__.py
|
Amir-Mehrpanah/hgraph2graph
|
6d37153afe09f7684381ce56e8366675e22833e9
|
[
"MIT"
] | 60
|
2019-11-15T05:06:11.000Z
|
2022-03-31T16:43:12.000Z
|
from hgraph.mol_graph import MolGraph
from hgraph.encoder import HierMPNEncoder
from hgraph.decoder import HierMPNDecoder
from hgraph.vocab import Vocab, PairVocab, common_atom_vocab
from hgraph.hgnn import HierVAE, HierVGNN, HierCondVGNN
from hgraph.dataset import MoleculeDataset, MolPairDataset, DataFolder, MolEnumRootDataset
| 47.142857
| 90
| 0.866667
| 40
| 330
| 7.075
| 0.575
| 0.212014
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093939
| 330
| 6
| 91
| 55
| 0.946488
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 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
|
5bf0f5c473076409c1b2c5a25b11b1621fd2a871
| 156
|
py
|
Python
|
online_pharmacy/items/views.py
|
geekyJock8/online_pharmacy
|
892852857786ec17259b71f2a178896cd6d12e60
|
[
"Apache-2.0"
] | 5
|
2020-09-09T13:59:17.000Z
|
2021-09-30T07:20:55.000Z
|
online_pharmacy/items/views.py
|
geekyJock8/online_pharmacy
|
892852857786ec17259b71f2a178896cd6d12e60
|
[
"Apache-2.0"
] | 10
|
2017-09-03T06:13:31.000Z
|
2017-10-10T15:22:30.000Z
|
online_pharmacy/items/views.py
|
geekyJock8/Online-Pharmacy
|
892852857786ec17259b71f2a178896cd6d12e60
|
[
"Apache-2.0"
] | 9
|
2017-09-03T04:59:18.000Z
|
2019-10-17T11:33:18.000Z
|
from django.http import HttpResponse
def showSearch(request):
return HttpResponse('<h1> This is the search page after searching of the element </h1>')
| 31.2
| 92
| 0.762821
| 22
| 156
| 5.409091
| 0.863636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015152
| 0.153846
| 156
| 4
| 93
| 39
| 0.886364
| 0
| 0
| 0
| 0
| 0
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
|
0
| 5
|
7525f766410d6ded7639039cd5a1e1f0334cbbf9
| 17,220
|
py
|
Python
|
sdc/tests/test_join.py
|
densmirn/sdc
|
30e53955a88506a5134d75d843205dbd5d576051
|
[
"BSD-2-Clause"
] | 540
|
2017-06-19T16:29:24.000Z
|
2019-05-21T09:30:07.000Z
|
sdc/tests/test_join.py
|
densmirn/sdc
|
30e53955a88506a5134d75d843205dbd5d576051
|
[
"BSD-2-Clause"
] | 389
|
2019-10-30T18:56:46.000Z
|
2022-03-09T08:21:36.000Z
|
sdc/tests/test_join.py
|
densmirn/sdc
|
30e53955a88506a5134d75d843205dbd5d576051
|
[
"BSD-2-Clause"
] | 36
|
2017-06-19T16:29:15.000Z
|
2019-04-26T09:22:39.000Z
|
# *****************************************************************************
# Copyright (c) 2020, Intel Corporation All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# *****************************************************************************
import numba
import numpy as np
import pandas as pd
import platform
import pyarrow.parquet as pq
import random
import string
import unittest
from pandas.api.types import CategoricalDtype
import sdc
from sdc.str_arr_ext import StringArray
from sdc.tests.test_base import TestCase
from sdc.tests.test_utils import (count_array_OneDs,
count_array_REPs,
count_parfor_OneDs,
count_parfor_REPs,
dist_IR_contains,
get_start_end,
skip_numba_jit)
class TestJoin(TestCase):
@skip_numba_jit
def test_join1(self):
def test_impl(n):
df1 = pd.DataFrame({'key1': np.arange(n) + 3, 'A': np.arange(n) + 1.0})
df2 = pd.DataFrame({'key2': 2 * np.arange(n) + 1, 'B': n + np.arange(n) + 1.0})
df3 = pd.merge(df1, df2, left_on='key1', right_on='key2')
return df3.B.sum()
hpat_func = self.jit(test_impl)
n = 11
self.assertEqual(hpat_func(n), test_impl(n))
self.assertEqual(count_array_REPs(), 0)
self.assertEqual(count_parfor_REPs(), 0)
n = 11111
self.assertEqual(hpat_func(n), test_impl(n))
@skip_numba_jit
def test_join1_seq(self):
def test_impl(df1, df2):
df3 = df1.merge(df2, left_on='key1', right_on='key2')
return df3
hpat_func = self.jit(test_impl)
n = 11
df1 = pd.DataFrame({'key1': np.arange(n) + 3, 'A': np.arange(n) + 1.0})
df2 = pd.DataFrame({'key2': 2 * np.arange(n) + 1, 'B': n + np.arange(n) + 1.0})
pd.testing.assert_frame_equal(hpat_func(df1, df2), test_impl(df1, df2))
n = 11111
df1 = pd.DataFrame({'key1': np.arange(n) + 3, 'A': np.arange(n) + 1.0})
df2 = pd.DataFrame({'key2': 2 * np.arange(n) + 1, 'B': n + np.arange(n) + 1.0})
pd.testing.assert_frame_equal(hpat_func(df1, df2), test_impl(df1, df2))
@skip_numba_jit
def test_join1_seq_str(self):
def test_impl():
df1 = pd.DataFrame({'key1': ['foo', 'bar', 'baz']})
df2 = pd.DataFrame({'key2': ['baz', 'bar', 'baz'], 'B': ['b', 'zzz', 'ss']})
df3 = pd.merge(df1, df2, left_on='key1', right_on='key2')
return df3.B
hpat_func = self.jit(test_impl)
self.assertEqual(set(hpat_func()), set(test_impl()))
@skip_numba_jit
def test_join1_seq_str_na(self):
# test setting NA in string data column
def test_impl():
df1 = pd.DataFrame({'key1': ['foo', 'bar', 'baz']})
df2 = pd.DataFrame({'key2': ['baz', 'bar', 'baz'], 'B': ['b', 'zzz', 'ss']})
df3 = df1.merge(df2, left_on='key1', right_on='key2', how='left')
return df3.B
hpat_func = self.jit(test_impl)
self.assertEqual(set(hpat_func()), set(test_impl()))
@skip_numba_jit
def test_join_mutil_seq1(self):
def test_impl(df1, df2):
return df1.merge(df2, on=['A', 'B'])
hpat_func = self.jit(test_impl)
df1 = pd.DataFrame({'A': [3, 1, 1, 3, 4],
'B': [1, 2, 3, 2, 3],
'C': [7, 8, 9, 4, 5]})
df2 = pd.DataFrame({'A': [2, 1, 4, 4, 3],
'B': [1, 3, 2, 3, 2],
'D': [1, 2, 3, 4, 8]})
pd.testing.assert_frame_equal(hpat_func(df1, df2), test_impl(df1, df2))
@skip_numba_jit
def test_join_mutil_parallel1(self):
def test_impl(A1, B1, C1, A2, B2, D2):
df1 = pd.DataFrame({'A': A1, 'B': B1, 'C': C1})
df2 = pd.DataFrame({'A': A2, 'B': B2, 'D': D2})
df3 = df1.merge(df2, on=['A', 'B'])
return df3.C.sum() + df3.D.sum()
hpat_func = self.jit(locals={
'A1:input': 'distributed',
'B1:input': 'distributed',
'C1:input': 'distributed',
'A2:input': 'distributed',
'B2:input': 'distributed',
'D2:input': 'distributed', })(test_impl)
df1 = pd.DataFrame({'A': [3, 1, 1, 3, 4],
'B': [1, 2, 3, 2, 3],
'C': [7, 8, 9, 4, 5]})
df2 = pd.DataFrame({'A': [2, 1, 4, 4, 3],
'B': [1, 3, 2, 3, 2],
'D': [1, 2, 3, 4, 8]})
start, end = get_start_end(len(df1))
h_A1 = df1.A.values[start:end]
h_B1 = df1.B.values[start:end]
h_C1 = df1.C.values[start:end]
h_A2 = df2.A.values[start:end]
h_B2 = df2.B.values[start:end]
h_D2 = df2.D.values[start:end]
p_A1 = df1.A.values
p_B1 = df1.B.values
p_C1 = df1.C.values
p_A2 = df2.A.values
p_B2 = df2.B.values
p_D2 = df2.D.values
h_res = hpat_func(h_A1, h_B1, h_C1, h_A2, h_B2, h_D2)
p_res = test_impl(p_A1, p_B1, p_C1, p_A2, p_B2, p_D2)
self.assertEqual(h_res, p_res)
@skip_numba_jit
def test_join_left_parallel1(self):
"""
"""
def test_impl(A1, B1, C1, A2, B2, D2):
df1 = pd.DataFrame({'A': A1, 'B': B1, 'C': C1})
df2 = pd.DataFrame({'A': A2, 'B': B2, 'D': D2})
df3 = df1.merge(df2, on=('A', 'B'))
return df3.C.sum() + df3.D.sum()
hpat_func = self.jit(locals={
'A1:input': 'distributed',
'B1:input': 'distributed',
'C1:input': 'distributed', })(test_impl)
df1 = pd.DataFrame({'A': [3, 1, 1, 3, 4],
'B': [1, 2, 3, 2, 3],
'C': [7, 8, 9, 4, 5]})
df2 = pd.DataFrame({'A': [2, 1, 4, 4, 3],
'B': [1, 3, 2, 3, 2],
'D': [1, 2, 3, 4, 8]})
start, end = get_start_end(len(df1))
h_A1 = df1.A.values[start:end]
h_B1 = df1.B.values[start:end]
h_C1 = df1.C.values[start:end]
h_A2 = df2.A.values
h_B2 = df2.B.values
h_D2 = df2.D.values
p_A1 = df1.A.values
p_B1 = df1.B.values
p_C1 = df1.C.values
p_A2 = df2.A.values
p_B2 = df2.B.values
p_D2 = df2.D.values
h_res = hpat_func(h_A1, h_B1, h_C1, h_A2, h_B2, h_D2)
p_res = test_impl(p_A1, p_B1, p_C1, p_A2, p_B2, p_D2)
self.assertEqual(h_res, p_res)
self.assertEqual(count_array_OneDs(), 3)
@skip_numba_jit
def test_join_datetime_seq1(self):
def test_impl(df1, df2):
return pd.merge(df1, df2, on='time')
hpat_func = self.jit(test_impl)
df1 = pd.DataFrame(
{'time': pd.DatetimeIndex(
['2017-01-03', '2017-01-06', '2017-02-21']), 'B': [4, 5, 6]})
df2 = pd.DataFrame(
{'time': pd.DatetimeIndex(
['2017-01-01', '2017-01-06', '2017-01-03']), 'A': [7, 8, 9]})
pd.testing.assert_frame_equal(hpat_func(df1, df2), test_impl(df1, df2))
@unittest.skip("Method max(). Currently function supports only numeric values. Given data type: datetime64[ns]")
def test_join_datetime_parallel1(self):
def test_impl(df1, df2):
df3 = pd.merge(df1, df2, on='time')
return (df3.A.sum(), df3.time.max(), df3.B.sum())
hpat_func = self.jit(distributed=['df1', 'df2'])(test_impl)
df1 = pd.DataFrame(
{'time': pd.DatetimeIndex(
['2017-01-03', '2017-01-06', '2017-02-21']), 'B': [4, 5, 6]})
df2 = pd.DataFrame(
{'time': pd.DatetimeIndex(
['2017-01-01', '2017-01-06', '2017-01-03']), 'A': [7, 8, 9]})
start1, end1 = get_start_end(len(df1))
start2, end2 = get_start_end(len(df2))
self.assertEqual(
hpat_func(df1.iloc[start1:end1], df2.iloc[start2:end2]),
test_impl(df1, df2))
self.assertEqual(count_array_REPs(), 0)
self.assertEqual(count_parfor_REPs(), 0)
@skip_numba_jit
def test_merge_asof_seq1(self):
def test_impl(df1, df2):
return pd.merge_asof(df1, df2, on='time')
hpat_func = self.jit(test_impl)
df1 = pd.DataFrame(
{'time': pd.DatetimeIndex(
['2017-01-03', '2017-01-06', '2017-02-21']), 'B': [4, 5, 6]})
df2 = pd.DataFrame(
{'time': pd.DatetimeIndex(
['2017-01-01', '2017-01-02', '2017-01-04', '2017-02-23',
'2017-02-25']), 'A': [2, 3, 7, 8, 9]})
pd.testing.assert_frame_equal(hpat_func(df1, df2), test_impl(df1, df2))
@unittest.skip("Method max(). Currently function supports only numeric values. Given data type: datetime64[ns]")
def test_merge_asof_parallel1(self):
def test_impl():
df1 = pd.read_parquet('asof1.pq')
df2 = pd.read_parquet('asof2.pq')
df3 = pd.merge_asof(df1, df2, on='time')
return (df3.A.sum(), df3.time.max(), df3.B.sum())
hpat_func = self.jit(test_impl)
self.assertEqual(hpat_func(), test_impl())
@skip_numba_jit
def test_join_left_seq1(self):
def test_impl(df1, df2):
return pd.merge(df1, df2, how='left', on='key')
hpat_func = self.jit(test_impl)
df1 = pd.DataFrame(
{'key': [2, 3, 5, 1, 2, 8], 'A': np.array([4, 6, 3, 9, 9, -1], np.float)})
df2 = pd.DataFrame(
{'key': [1, 2, 9, 3, 2], 'B': np.array([1, 7, 2, 6, 5], np.float)})
h_res = hpat_func(df1, df2)
res = test_impl(df1, df2)
np.testing.assert_array_equal(h_res.key.values, res.key.values)
# converting arrays to sets since order of values can be different
self.assertEqual(set(h_res.A.values), set(res.A.values))
self.assertEqual(
set(h_res.B.dropna().values), set(res.B.dropna().values))
@skip_numba_jit
def test_join_left_seq2(self):
def test_impl(df1, df2):
return pd.merge(df1, df2, how='left', on='key')
hpat_func = self.jit(test_impl)
# test left run where a key is repeated on left but not right side
df1 = pd.DataFrame(
{'key': [2, 3, 5, 3, 2, 8], 'A': np.array([4, 6, 3, 9, 9, -1], np.float)})
df2 = pd.DataFrame(
{'key': [1, 2, 9, 3, 10], 'B': np.array([1, 7, 2, 6, 5], np.float)})
h_res = hpat_func(df1, df2)
res = test_impl(df1, df2)
np.testing.assert_array_equal(h_res.key.values, res.key.values)
# converting arrays to sets since order of values can be different
self.assertEqual(set(h_res.A.values), set(res.A.values))
self.assertEqual(
set(h_res.B.dropna().values), set(res.B.dropna().values))
@skip_numba_jit
def test_join_right_seq1(self):
def test_impl(df1, df2):
return pd.merge(df1, df2, how='right', on='key')
hpat_func = self.jit(test_impl)
df1 = pd.DataFrame(
{'key': [2, 3, 5, 1, 2, 8], 'A': np.array([4, 6, 3, 9, 9, -1], np.float)})
df2 = pd.DataFrame(
{'key': [1, 2, 9, 3, 2], 'B': np.array([1, 7, 2, 6, 5], np.float)})
h_res = hpat_func(df1, df2)
res = test_impl(df1, df2)
self.assertEqual(set(h_res.key.values), set(res.key.values))
# converting arrays to sets since order of values can be different
self.assertEqual(set(h_res.B.values), set(res.B.values))
self.assertEqual(
set(h_res.A.dropna().values), set(res.A.dropna().values))
@skip_numba_jit
def test_join_outer_seq1(self):
def test_impl(df1, df2):
return pd.merge(df1, df2, how='outer', on='key')
hpat_func = self.jit(test_impl)
df1 = pd.DataFrame(
{'key': [2, 3, 5, 1, 2, 8], 'A': np.array([4, 6, 3, 9, 9, -1], np.float)})
df2 = pd.DataFrame(
{'key': [1, 2, 9, 3, 2], 'B': np.array([1, 7, 2, 6, 5], np.float)})
h_res = hpat_func(df1, df2)
res = test_impl(df1, df2)
self.assertEqual(set(h_res.key.values), set(res.key.values))
# converting arrays to sets since order of values can be different
self.assertEqual(
set(h_res.B.dropna().values), set(res.B.dropna().values))
self.assertEqual(
set(h_res.A.dropna().values), set(res.A.dropna().values))
@skip_numba_jit
def test_join1_seq_key_change1(self):
# make sure const list typing doesn't replace const key values
def test_impl(df1, df2, df3, df4):
o1 = df1.merge(df2, on=['A'])
o2 = df3.merge(df4, on=['B'])
return o1, o2
hpat_func = self.jit(test_impl)
n = 11
df1 = pd.DataFrame({'A': np.arange(n) + 3, 'AA': np.arange(n) + 1.0})
df2 = pd.DataFrame({'A': 2 * np.arange(n) + 1, 'AAA': n + np.arange(n) + 1.0})
df3 = pd.DataFrame({'B': 2 * np.arange(n) + 1, 'BB': n + np.arange(n) + 1.0})
df4 = pd.DataFrame({'B': 2 * np.arange(n) + 1, 'BBB': n + np.arange(n) + 1.0})
pd.testing.assert_frame_equal(hpat_func(df1, df2, df3, df4)[1], test_impl(df1, df2, df3, df4)[1])
@skip_numba_jit
@unittest.skipIf(platform.system() == 'Windows', "error on windows")
def test_join_cat1(self):
def test_impl():
ct_dtype = CategoricalDtype(['A', 'B', 'C'])
dtypes = {'C1': np.int, 'C2': ct_dtype, 'C3': str}
df1 = pd.read_csv("csv_data_cat1.csv",
names=['C1', 'C2', 'C3'],
dtype=dtypes,
)
n = len(df1)
df2 = pd.DataFrame({'C1': 2 * np.arange(n) + 1, 'AAA': n + np.arange(n) + 1.0})
df3 = df1.merge(df2, on='C1')
return df3
hpat_func = self.jit(test_impl)
pd.testing.assert_frame_equal(hpat_func(), test_impl())
@skip_numba_jit
@unittest.skipIf(platform.system() == 'Windows', "error on windows")
def test_join_cat2(self):
# test setting NaN in categorical array
def test_impl():
ct_dtype = CategoricalDtype(['A', 'B', 'C'])
dtypes = {'C1': np.int, 'C2': ct_dtype, 'C3': str}
df1 = pd.read_csv("csv_data_cat1.csv",
names=['C1', 'C2', 'C3'],
dtype=dtypes,
)
n = len(df1)
df2 = pd.DataFrame({'C1': 2 * np.arange(n) + 1, 'AAA': n + np.arange(n) + 1.0})
df3 = df1.merge(df2, on='C1', how='right')
return df3
hpat_func = self.jit(test_impl)
pd.testing.assert_frame_equal(
hpat_func().sort_values('C1').reset_index(drop=True),
test_impl().sort_values('C1').reset_index(drop=True))
@skip_numba_jit
@unittest.skipIf(platform.system() == 'Windows', "error on windows")
def test_join_cat_parallel1(self):
# TODO: cat as keys
def test_impl():
ct_dtype = CategoricalDtype(['A', 'B', 'C'])
dtypes = {'C1': np.int, 'C2': ct_dtype, 'C3': str}
df1 = pd.read_csv("csv_data_cat1.csv",
names=['C1', 'C2', 'C3'],
dtype=dtypes,
)
n = len(df1)
df2 = pd.DataFrame({'C1': 2 * np.arange(n) + 1, 'AAA': n + np.arange(n) + 1.0})
df3 = df1.merge(df2, on='C1')
return df3
hpat_func = self.jit(distributed=['df3'])(test_impl)
# TODO: check results
self.assertTrue((hpat_func().columns == test_impl().columns).all())
if __name__ == "__main__":
unittest.main()
| 41.493976
| 116
| 0.53525
| 2,472
| 17,220
| 3.585356
| 0.125405
| 0.053255
| 0.040957
| 0.024822
| 0.774456
| 0.751551
| 0.731355
| 0.704163
| 0.676295
| 0.669751
| 0
| 0.067743
| 0.29878
| 17,220
| 414
| 117
| 41.594203
| 0.666253
| 0.113879
| 0
| 0.700306
| 0
| 0
| 0.07095
| 0
| 0
| 0
| 0
| 0.002415
| 0.103976
| 1
| 0.116208
| false
| 0
| 0.039755
| 0.021407
| 0.217125
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f35637578386b46de58497a3ea6c7231c5cc2970
| 160
|
py
|
Python
|
tezpie/storage/chain_state.py
|
dakk/tezpie
|
04af3ff899ee2f58f5cda010583ca09f9c9d287b
|
[
"MIT"
] | 2
|
2020-09-26T09:51:12.000Z
|
2020-09-26T10:09:28.000Z
|
tezpie/storage/chain_state.py
|
dakk/tezpie
|
04af3ff899ee2f58f5cda010583ca09f9c9d287b
|
[
"MIT"
] | null | null | null |
tezpie/storage/chain_state.py
|
dakk/tezpie
|
04af3ff899ee2f58f5cda010583ca09f9c9d287b
|
[
"MIT"
] | null | null | null |
from .store import Store
class ChainState(Store):
def name(): return 'chainstate'
def __init__ (self):
super(Store, self).__init__()
| 17.777778
| 37
| 0.625
| 18
| 160
| 5.111111
| 0.611111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2625
| 160
| 9
| 38
| 17.777778
| 0.779661
| 0
| 0
| 0
| 0
| 0
| 0.062112
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0.2
| 0.2
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
f36081f004c11bc9cb4edf55b1cf5604021d677f
| 91
|
py
|
Python
|
src/guides/__init__.py
|
silasbrack/special-course
|
47dc396f97b2027d366e90add115d4ed2bc0f1de
|
[
"MIT"
] | null | null | null |
src/guides/__init__.py
|
silasbrack/special-course
|
47dc396f97b2027d366e90add115d4ed2bc0f1de
|
[
"MIT"
] | null | null | null |
src/guides/__init__.py
|
silasbrack/special-course
|
47dc396f97b2027d366e90add115d4ed2bc0f1de
|
[
"MIT"
] | null | null | null |
from .low_rank import LowRank
from .mean_field import MeanField
from .radial import Radial
| 22.75
| 33
| 0.835165
| 14
| 91
| 5.285714
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131868
| 91
| 3
| 34
| 30.333333
| 0.936709
| 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
|
f369b2498a4cefc919dc7461eb05bf5c2fa4f16c
| 21,347
|
py
|
Python
|
evaluate.py
|
Guominyingxiongququ/RAFT
|
04c1bbf2cf404489c7b5fa082a8b883e4df231e7
|
[
"BSD-3-Clause"
] | null | null | null |
evaluate.py
|
Guominyingxiongququ/RAFT
|
04c1bbf2cf404489c7b5fa082a8b883e4df231e7
|
[
"BSD-3-Clause"
] | null | null | null |
evaluate.py
|
Guominyingxiongququ/RAFT
|
04c1bbf2cf404489c7b5fa082a8b883e4df231e7
|
[
"BSD-3-Clause"
] | null | null | null |
import sys
sys.path.append('core')
from PIL import Image
import argparse
import os
import time
import numpy as np
import torch
import torch.nn.functional as F
import matplotlib.pyplot as plt
import datasets
from utils import flow_viz
from utils import frame_utils
from raft import RAFT
from utils.utils import InputPadder, forward_interpolate
from builder import build_dataloader, build_dataset
from metrics import psnr, ssim
@torch.no_grad()
def create_sintel_submission(model, iters=32, warm_start=False, output_path='sintel_submission'):
""" Create submission for the Sintel leaderboard """
model.eval()
for dstype in ['clean', 'final']:
test_dataset = datasets.MpiSintel(split='test', aug_params=None, dstype=dstype)
flow_prev, sequence_prev = None, None
for test_id in range(len(test_dataset)):
image1, image2, (sequence, frame) = test_dataset[test_id]
if sequence != sequence_prev:
flow_prev = None
padder = InputPadder(image1.shape)
image1, image2 = padder.pad(image1[None].cuda(), image2[None].cuda())
flow_low, flow_pr = model(image1, image2, iters=iters, flow_init=flow_prev, test_mode=True)
flow = padder.unpad(flow_pr[0]).permute(1, 2, 0).cpu().numpy()
if warm_start:
flow_prev = forward_interpolate(flow_low[0])[None].cuda()
output_dir = os.path.join(output_path, dstype, sequence)
output_file = os.path.join(output_dir, 'frame%04d.flo' % (frame+1))
if not os.path.exists(output_dir):
os.makedirs(output_dir)
frame_utils.writeFlow(output_file, flow)
sequence_prev = sequence
@torch.no_grad()
def create_kitti_submission(model, iters=24, output_path='kitti_submission'):
""" Create submission for the Sintel leaderboard """
model.eval()
test_dataset = datasets.KITTI(split='testing', aug_params=None)
if not os.path.exists(output_path):
os.makedirs(output_path)
for test_id in range(len(test_dataset)):
image1, image2, (frame_id, ) = test_dataset[test_id]
padder = InputPadder(image1.shape, mode='kitti')
image1, image2 = padder.pad(image1[None].cuda(), image2[None].cuda())
_, flow_pr = model(image1, image2, iters=iters, test_mode=True)
flow = padder.unpad(flow_pr[0]).permute(1, 2, 0).cpu().numpy()
output_filename = os.path.join(output_path, frame_id)
frame_utils.writeFlowKITTI(output_filename, flow)
@torch.no_grad()
def validate_multi_REDS(model, input_num, cfg, iter):
model.eval()
val_dataset = build_dataset(cfg.data.test)
PSNR_sum = 0.0
SSIM_sum = 0.0
output_list = []
denoise = True
for val_id in range(len(val_dataset)):
data_blob = val_dataset[val_id]
input_frames = data_blob['lq'][:input_num]
gt = data_blob['gt'][:input_num]
input_frames = input_frames[None, ...]
gt = gt[None, ...]
gt = gt.cuda()
output = test_big_size_multi(model, input_frames, iter=iter)
output = np.clip(output, 0.0, 1.0)
output_list.append(torch.from_numpy(output[0, 7, ...]))
gt = gt.detach().cpu().numpy()
for i in range(11):
gt_img = gt[0, i, ...] *255
output_img = output[0, i, ...] * 255
PSNR_sum += psnr(gt_img, output_img, crop_border=0, input_order='CHW')
SSIM_sum += ssim(gt_img, output_img, crop_border=0, input_order='CHW')
return output_list, PSNR_sum/(len(val_dataset)*11), SSIM_sum/(len(val_dataset)*11)
@torch.no_grad()
def validate_REDS(model, input_num, cfg, iter):
model.eval()
val_dataset = build_dataset(cfg.data.test)
PSNR_sum = 0.0
SSIM_sum = 0.0
refer_idx = (input_num+1)/2
refer_idx = int(refer_idx)
refer_idx = 0
output_list = []
denoise = True
for val_id in range(len(val_dataset)):
# print("val id: ")
# print(val_id)
data_blob = val_dataset[val_id]
input_frames = data_blob['lq'][:input_num]
if denoise:
gt = data_blob['gt']
else:
gt = data_blob['gt'][refer_idx]
input_frames = input_frames[None, ...]
gt = gt[None, ...]
gt = gt.cuda()
output = test_big_size(model, input_frames, iter=iter)
output_list.append(torch.from_numpy(output[0]))
gt = gt.detach().cpu().numpy()
gt = gt[0] *255
output = output[0] * 255
PSNR_sum += psnr(gt[0], output, crop_border=0, input_order='CHW')
SSIM_sum += ssim(gt[0], output, crop_border=0, input_order='CHW')
return output_list, PSNR_sum/len(val_dataset), SSIM_sum/len(val_dataset)
@torch.no_grad()
def validate_chairs(model, iters=24):
""" Perform evaluation on the FlyingChairs (test) split """
model.eval()
epe_list = []
val_dataset = datasets.FlyingChairs(split='validation')
for val_id in range(len(val_dataset)):
image1, image2, flow_gt, _ = val_dataset[val_id]
image1 = image1[None].cuda()
image2 = image2[None].cuda()
_, flow_pr = model(image1, image2, iters=iters, test_mode=True)
epe = torch.sum((flow_pr[0].cpu() - flow_gt)**2, dim=0).sqrt()
epe_list.append(epe.view(-1).numpy())
epe = np.mean(np.concatenate(epe_list))
print("Validation Chairs EPE: %f" % epe)
return {'chairs': epe}
@torch.no_grad()
def validate_sintel(model, iters=32):
""" Peform validation using the Sintel (train) split """
model.eval()
results = {}
for dstype in ['clean', 'final']:
val_dataset = datasets.MpiSintel(split='training', dstype=dstype)
epe_list = []
for val_id in range(len(val_dataset)):
image1, image2, flow_gt, _ = val_dataset[val_id]
image1 = image1[None].cuda()
image2 = image2[None].cuda()
padder = InputPadder(image1.shape)
image1, image2 = padder.pad(image1, image2)
flow_low, flow_pr = model(image1, image2, iters=iters, test_mode=True)
flow = padder.unpad(flow_pr[0]).cpu()
epe = torch.sum((flow - flow_gt)**2, dim=0).sqrt()
epe_list.append(epe.view(-1).numpy())
epe_all = np.concatenate(epe_list)
epe = np.mean(epe_all)
px1 = np.mean(epe_all<1)
px3 = np.mean(epe_all<3)
px5 = np.mean(epe_all<5)
print("Validation (%s) EPE: %f, 1px: %f, 3px: %f, 5px: %f" % (dstype, epe, px1, px3, px5))
results[dstype] = np.mean(epe_list)
return results
@torch.no_grad()
def validate_kitti(model, iters=24):
""" Peform validation using the KITTI-2015 (train) split """
model.eval()
val_dataset = datasets.KITTI(split='training')
out_list, epe_list = [], []
for val_id in range(len(val_dataset)):
image1, image2, flow_gt, valid_gt = val_dataset[val_id]
image1 = image1[None].cuda()
image2 = image2[None].cuda()
padder = InputPadder(image1.shape, mode='kitti')
image1, image2 = padder.pad(image1, image2)
flow_low, flow_pr = model(image1, image2, iters=iters, test_mode=True)
flow = padder.unpad(flow_pr[0]).cpu()
epe = torch.sum((flow - flow_gt)**2, dim=0).sqrt()
mag = torch.sum(flow_gt**2, dim=0).sqrt()
epe = epe.view(-1)
mag = mag.view(-1)
val = valid_gt.view(-1) >= 0.5
out = ((epe > 3.0) & ((epe/mag) > 0.05)).float()
epe_list.append(epe[val].mean().item())
out_list.append(out[val].cpu().numpy())
epe_list = np.array(epe_list)
out_list = np.concatenate(out_list)
epe = np.mean(epe_list)
f1 = 100 * np.mean(out_list)
print("Validation KITTI: %f, %f" % (epe, f1))
return {'kitti-epe': epe, 'kitti-f1': f1}
def test_big_size(model, input_data, patch_h=64, patch_w=64,
patch_h_overlap=32, patch_w_overlap=32, iter=-1):
# input_data shape n, t, c, h, w
# output shape n, c, h, w
scale = 4
denoise = False
if denoise:
patch_h = 128
patch_w = 128
patch_h_overlap = 64
patch_w_overlap = 64
scale = 1
H = input_data.shape[3]
W = input_data.shape[4]
t = input_data.shape[1]
center_idx = int(t/2)
test_result = np.zeros((input_data.shape[0], 3, scale*H, scale*W))
h_index = 1
while (patch_h*h_index-patch_h_overlap*(h_index-1)) < H:
test_horizontal_result = np.zeros((input_data.shape[0],
3, scale*patch_h, scale*W))
h_begin = patch_h*(h_index-1)-patch_h_overlap*(h_index-1)
h_end = patch_h*h_index-patch_h_overlap*(h_index-1)
w_index = 1
w_end = 0
while (patch_w*w_index-patch_w_overlap*(w_index-1)) < W:
w_begin = patch_w*(w_index-1)-patch_w_overlap*(w_index-1)
w_end = patch_w*w_index-patch_w_overlap*(w_index-1)
test_patch = input_data[:, :, :, h_begin:h_end, w_begin:w_end]
output_patch = model(test_patch)[iter]
output_patch = \
output_patch.cpu().detach().numpy().astype(np.float32)
if w_index == 1:
test_horizontal_result[:, :, :, w_begin*scale:w_end*scale] = \
output_patch
else:
for i in range(patch_w_overlap*scale):
test_horizontal_result[:, :, :, w_begin * scale + i] = \
test_horizontal_result[:, :, :, w_begin * scale + i]\
* (patch_w_overlap * scale-1-i)/(patch_w_overlap * scale -1)\
+ output_patch[:, :, :, i] * i/(patch_w_overlap * scale -1)
cur_begin = w_begin+patch_w_overlap
cur_begin = cur_begin*scale
test_horizontal_result[:, :, :, cur_begin:w_end*scale] = \
output_patch[:, :, :, patch_w_overlap * scale:]
w_index += 1
test_patch = input_data[:, :, :, h_begin:h_end, -patch_w:]
output_patch = model(test_patch)[iter]
output_patch = \
output_patch.cpu().detach().numpy().astype(np.float32)
output_patch = output_patch[:, :, :, :]
last_range = w_end-(W-patch_w)
last_range = last_range * scale
for i in range(last_range):
term1 = test_horizontal_result[:, :, :, W*scale-patch_w*scale+i]
rate1 = (last_range-1-i)/(last_range-1)
term2 = output_patch[:, :, :, i]
rate2 = i/(last_range-1)
test_horizontal_result[:, :, :, W*scale-patch_w*scale+i] = \
term1*rate1+term2*rate2
test_horizontal_result[:, :, :, w_end*scale:] = \
output_patch[:, :, :, last_range:]
if h_index == 1:
test_result[:, :, h_begin*scale:h_end*scale, :] = test_horizontal_result
else:
for i in range(patch_h_overlap*scale):
term1 = test_result[:, :, h_begin*scale+i, :]
rate1 = (patch_h_overlap*scale-1-i)/(patch_h_overlap*scale-1)
term2 = test_horizontal_result[:, :, i, :]
rate2 = i/(patch_h_overlap*scale-1)
test_result[:, :, h_begin*scale+i, :] = \
term1 * rate1 + term2 * rate2
test_result[:, :, h_begin*scale+patch_h_overlap*scale:h_end*scale, :] = \
test_horizontal_result[:, :, patch_h_overlap*scale:, :]
h_index += 1
test_horizontal_result = np.zeros((input_data.shape[0], 3, patch_h*scale, W*scale))
w_index = 1
while (patch_w * w_index - patch_w_overlap * (w_index-1)) < W:
w_begin = patch_w * (w_index-1) - patch_w_overlap * (w_index-1)
w_end = patch_w * w_index - patch_w_overlap * (w_index-1)
test_patch = input_data[:, :, :, -patch_h:, w_begin:w_end]
output_patch = model(test_patch)[iter]
output_patch = \
output_patch.cpu().detach().numpy().astype(np.float32)
output_patch = output_patch
if w_index == 1:
test_horizontal_result[:, :, :, w_begin*scale:w_end*scale] = output_patch
else:
for i in range(patch_w_overlap*scale):
term1 = test_horizontal_result[:, :, :, w_begin*scale+i]
rate1 = (patch_w_overlap*scale-1-i)/(patch_w_overlap*scale-1)
term2 = output_patch[:, :, :, i]
rate2 = i/(patch_w_overlap*scale-1)
test_horizontal_result[:, :, :, w_begin*scale+i] = \
term1*rate1+term2*rate2
cur_begin = w_begin+patch_w_overlap
test_horizontal_result[:, :, :, cur_begin*scale:w_end*scale] = \
output_patch[:, :, :, patch_w_overlap*scale:]
w_index += 1
test_patch = input_data[:, :, :, -patch_h:, -patch_w:]
output_patch = model(test_patch)[iter]
output_patch = output_patch.cpu().detach().numpy().astype(np.float32)
output_patch = output_patch
last_range = w_end-(W-patch_w)
for i in range(last_range*scale):
term1 = test_horizontal_result[:, :, :, W*scale-patch_w*scale+i]
rate1 = (last_range*scale-1-i)/(last_range*scale-1)
term2 = output_patch[:, :, :, i]
rate2 = i/(last_range*scale-1)
test_horizontal_result[:, :, :, W*scale-patch_w*scale+i] = \
term1*rate1+term2*rate2
test_horizontal_result[:, :, :, w_end*scale:] = \
output_patch[:, :, :, last_range*scale:]
last_last_range = h_end-(H-patch_h)
for i in range(last_last_range*scale):
term1 = test_result[:, :, H*scale-patch_w*scale+i, :]
rate1 = (last_last_range*scale-1-i)/(last_last_range*scale-1)
term2 = test_horizontal_result[:, :, i, :]
rate2 = i/(last_last_range*scale-1)
test_result[:, :, H*scale-patch_w*scale+i, :] = \
term1*rate1+term2*rate2
cur_result = test_horizontal_result[:, :, last_last_range*scale:, :]
test_result[:, :, h_end*scale:, :] = cur_result
return test_result
def test_big_size_multi(model, input_data, patch_h=64, patch_w=64,
patch_h_overlap=32, patch_w_overlap=32, iter=-1):
# input_data shape n, t, c, h, w
# output shape n, t, c, h, w
scale = 4
n, t, c, H, W = input_data.shape
test_result = np.zeros((n, t, c, scale*H, scale*W))
h_index = 1
while (patch_h*h_index-patch_h_overlap*(h_index-1)) < H:
test_horizontal_result = np.zeros((n, t, 3, scale*patch_h, scale*W))
h_begin = patch_h*(h_index-1)-patch_h_overlap*(h_index-1)
h_end = patch_h*h_index-patch_h_overlap*(h_index-1)
w_index = 1
w_end = 0
while (patch_w*w_index-patch_w_overlap*(w_index-1)) < W:
w_begin = patch_w*(w_index-1)-patch_w_overlap*(w_index-1)
w_end = patch_w*w_index-patch_w_overlap*(w_index-1)
test_patch = input_data[:, :, :, h_begin:h_end, w_begin:w_end]
output_patch = model(test_patch)[iter]
output_patch = \
[output.cpu().detach().numpy().astype(np.float32) for output in output_patch]
output_patch = np.stack(output_patch, axis=1)
if w_index == 1:
test_horizontal_result[:, :, :, :, w_begin*scale:w_end*scale] = \
output_patch
else:
for i in range(patch_w_overlap*scale):
test_horizontal_result[:, :, :, :, w_begin * scale + i] = \
test_horizontal_result[:, :, :, :, w_begin * scale + i]\
* (patch_w_overlap * scale-1-i)/(patch_w_overlap * scale -1)\
+ output_patch[:, :, :, :, i] * i/(patch_w_overlap * scale -1)
cur_begin = w_begin+patch_w_overlap
cur_begin = cur_begin*scale
test_horizontal_result[:, :, :, :, cur_begin:w_end*scale] = \
output_patch[:, :, :, :, patch_w_overlap * scale:]
w_index += 1
test_patch = input_data[:, :, :, h_begin:h_end, -patch_w:]
output_patch = model(test_patch)[iter]
output_patch = \
[output.cpu().detach().numpy().astype(np.float32) for output in output_patch]
output_patch = np.stack(output_patch, axis=1)
last_range = w_end-(W-patch_w)
last_range = last_range * scale
for i in range(last_range):
term1 = test_horizontal_result[:, :, :, :, W*scale-patch_w*scale+i]
rate1 = (last_range-1-i)/(last_range-1)
term2 = output_patch[:, :, :, :, i]
rate2 = i/(last_range-1)
test_horizontal_result[:, :, :, :, W*scale-patch_w*scale+i] = \
term1*rate1+term2*rate2
test_horizontal_result[:, :, :, :, w_end*scale:] = \
output_patch[:, :, :, :, last_range:]
if h_index == 1:
test_result[:, :, :, h_begin*scale:h_end*scale, :] = test_horizontal_result
else:
for i in range(patch_h_overlap*scale):
term1 = test_result[:, :, :, h_begin*scale+i, :]
rate1 = (patch_h_overlap*scale-1-i)/(patch_h_overlap*scale-1)
term2 = test_horizontal_result[:, :, :, i, :]
rate2 = i/(patch_h_overlap*scale-1)
test_result[:, :, :, h_begin*scale+i, :] = \
term1 * rate1 + term2 * rate2
test_result[:, :, :, h_begin*scale+patch_h_overlap*scale:h_end*scale, :] = \
test_horizontal_result[:, :, :, patch_h_overlap*scale:, :]
h_index += 1
test_horizontal_result = np.zeros((n, t, 3, patch_h*scale, W*scale))
w_index = 1
while (patch_w * w_index - patch_w_overlap * (w_index-1)) < W:
w_begin = patch_w * (w_index-1) - patch_w_overlap * (w_index-1)
w_end = patch_w * w_index - patch_w_overlap * (w_index-1)
test_patch = input_data[:, :, :, -patch_h:, w_begin:w_end]
output_patch = model(test_patch)[iter]
output_patch = \
[output.cpu().detach().numpy().astype(np.float32) for output in output_patch]
output_patch = np.stack(output_patch, axis=1)
if w_index == 1:
test_horizontal_result[:, :, :, :, w_begin*scale:w_end*scale] = output_patch
else:
for i in range(patch_w_overlap*scale):
term1 = test_horizontal_result[:, :, :, :, w_begin*scale+i]
rate1 = (patch_w_overlap*scale-1-i)/(patch_w_overlap*scale-1)
term2 = output_patch[:, :, :, :, i]
rate2 = i/(patch_w_overlap*scale-1)
test_horizontal_result[:, :, :, :, w_begin*scale+i] = \
term1*rate1+term2*rate2
cur_begin = w_begin+patch_w_overlap
test_horizontal_result[:, :, :, :, cur_begin*scale:w_end*scale] = \
output_patch[:, :, :, :, patch_w_overlap*scale:]
w_index += 1
test_patch = input_data[:, :, :, -patch_h:, -patch_w:]
output_patch = model(test_patch)[iter]
output_patch = \
[output.cpu().detach().numpy().astype(np.float32) for output in output_patch]
output_patch = np.stack(output_patch, axis=1)
last_range = w_end-(W-patch_w)
for i in range(last_range*scale):
term1 = test_horizontal_result[:, :, :, :, W*scale-patch_w*scale+i]
rate1 = (last_range*scale-1-i)/(last_range*scale-1)
term2 = output_patch[:, :, :, :, i]
rate2 = i/(last_range*scale-1)
test_horizontal_result[:, :, :, :, W*scale-patch_w*scale+i] = \
term1*rate1+term2*rate2
test_horizontal_result[:, :, :, :, w_end*scale:] = \
output_patch[:, :, :, :, last_range*scale:]
last_last_range = h_end-(H-patch_h)
for i in range(last_last_range*scale):
term1 = test_result[:, :, :, H*scale-patch_w*scale+i, :]
rate1 = (last_last_range*scale-1-i)/(last_last_range*scale-1)
term2 = test_horizontal_result[:, :, :, i, :]
rate2 = i/(last_last_range*scale-1)
test_result[:, :, :, H*scale-patch_w*scale+i, :] = \
term1*rate1+term2*rate2
cur_result = test_horizontal_result[:, :, :, last_last_range*scale:, :]
test_result[:, :, :, h_end*scale:, :] = cur_result
return test_result
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--model', help="restore checkpoint")
parser.add_argument('--dataset', help="dataset for evaluation")
parser.add_argument('--small', action='store_true', help='use small model')
parser.add_argument('--mixed_precision', action='store_true', help='use mixed precision')
parser.add_argument('--alternate_corr', action='store_true', help='use efficent correlation implementation')
args = parser.parse_args()
model = torch.nn.DataParallel(RAFT(args))
model.load_state_dict(torch.load(args.model))
model.cuda()
model.eval()
# create_sintel_submission(model.module, warm_start=True)
# create_kitti_submission(model.module)
with torch.no_grad():
if args.dataset == 'chairs':
validate_chairs(model.module)
elif args.dataset == 'sintel':
validate_sintel(model.module)
elif args.dataset == 'kitti':
validate_kitti(model.module)
| 42.104536
| 112
| 0.591699
| 2,906
| 21,347
| 4.064006
| 0.079491
| 0.037595
| 0.071126
| 0.042676
| 0.765876
| 0.720491
| 0.709907
| 0.708383
| 0.701778
| 0.682727
| 0
| 0.02481
| 0.265517
| 21,347
| 506
| 113
| 42.187747
| 0.728427
| 0.022954
| 0
| 0.595794
| 0
| 0.002336
| 0.023298
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.021028
| false
| 0
| 0.037383
| 0
| 0.074766
| 0.007009
| 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
|
f3991d6332850a19d210d2fbdfac81e250ef52f6
| 196
|
py
|
Python
|
agoracommuns/agoracommuns/core/admin.py
|
daneoshiga/agoracommuns
|
a25f057ab412900b5aab1dc163c053610527cae0
|
[
"MIT"
] | null | null | null |
agoracommuns/agoracommuns/core/admin.py
|
daneoshiga/agoracommuns
|
a25f057ab412900b5aab1dc163c053610527cae0
|
[
"MIT"
] | null | null | null |
agoracommuns/agoracommuns/core/admin.py
|
daneoshiga/agoracommuns
|
a25f057ab412900b5aab1dc163c053610527cae0
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from django.contrib import admin
from .models import (Agenda, Deliberation, Vote)
admin.site.register(Agenda)
admin.site.register(Deliberation)
admin.site.register(Vote)
| 21.777778
| 48
| 0.760204
| 26
| 196
| 5.730769
| 0.538462
| 0.181208
| 0.342282
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005682
| 0.102041
| 196
| 8
| 49
| 24.5
| 0.840909
| 0.107143
| 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
|
342abcedbbd3d5e91ece0916b2f08cc9d091803d
| 443
|
py
|
Python
|
CV/core/views.py
|
joaquingb1993/cv-joaquin-galvez-blanco
|
9e3c8ce2f2f1662bcd4840bffd03c219b2da2ced
|
[
"Apache-2.0"
] | null | null | null |
CV/core/views.py
|
joaquingb1993/cv-joaquin-galvez-blanco
|
9e3c8ce2f2f1662bcd4840bffd03c219b2da2ced
|
[
"Apache-2.0"
] | null | null | null |
CV/core/views.py
|
joaquingb1993/cv-joaquin-galvez-blanco
|
9e3c8ce2f2f1662bcd4840bffd03c219b2da2ced
|
[
"Apache-2.0"
] | null | null | null |
from django.shortcuts import render, HttpResponse
from .models import Project
# Create your views here.
def home(request):
projects = Project.objects.all()
return render(request,"core/home.html",{'projects':projects})
def about(request):
return render(request,"core/about.html")
def portfolio(request):
return render(request, "core/portfolio.html")
def contacto(request):
return render(request, "core/contacto.html")
| 23.315789
| 65
| 0.735892
| 56
| 443
| 5.821429
| 0.428571
| 0.147239
| 0.233129
| 0.282209
| 0.276074
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137698
| 443
| 19
| 66
| 23.315789
| 0.853403
| 0.051919
| 0
| 0
| 0
| 0
| 0.176611
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.363636
| false
| 0
| 0.181818
| 0.272727
| 0.909091
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
342da14d5077e99101d91d41301c12a7040a301a
| 1,169
|
py
|
Python
|
tests/translated_code__expected.py
|
habiter-app/xbot
|
b05f76b0ec23902d9edfc5b79bd2940630c8ed6b
|
[
"MIT"
] | 1
|
2021-07-12T06:21:57.000Z
|
2021-07-12T06:21:57.000Z
|
tests/translated_code__expected.py
|
habiter-app/xbot
|
b05f76b0ec23902d9edfc5b79bd2940630c8ed6b
|
[
"MIT"
] | null | null | null |
tests/translated_code__expected.py
|
habiter-app/xbot
|
b05f76b0ec23902d9edfc5b79bd2940630c8ed6b
|
[
"MIT"
] | 1
|
2020-05-18T20:03:07.000Z
|
2020-05-18T20:03:07.000Z
|
@xbot.xfunction
@bot.command(name='add')
async def add(ctx):
"""__GENERATED__ cross platform generated function"""
try:
message = ctx.message.content
(_, left, right) = message.split(' ')
result = (int(left) + int(right))
await ctx.send(result)
except (IndexError, ValueError):
await ctx.send('Usage: /add <left> <right>')
@xbot.xfunction
@bot.command(name='subtract')
async def subtract(ctx):
"""__GENERATED__ cross platform generated function"""
try:
message = ctx.message.content
(_, left, right) = message.split(' ')
result = (int(left) - int(right))
await ctx.send(result)
except (IndexError, ValueError):
await ctx.send('Usage: /subtract <left> <right>')
@xbot.xfunction
@bot.command(name='echo')
async def echo(ctx):
"""__GENERATED__ cross platform generated function"""
await ctx.send(ctx.message.content)
@xbot.xfunction
@bot.command(name='echo_additional_arguments')
async def echo_additional_arguments(ctx, custom_argument_1, custom_argument_2):
"""__GENERATED__ cross platform generated function"""
await ctx.send(ctx.message.content)
| 33.4
| 79
| 0.673225
| 138
| 1,169
| 5.514493
| 0.253623
| 0.063075
| 0.094612
| 0.120894
| 0.810775
| 0.775296
| 0.725361
| 0.630749
| 0.630749
| 0.630749
| 0
| 0.002103
| 0.186484
| 1,169
| 35
| 80
| 33.4
| 0.798107
| 0
| 0
| 0.571429
| 1
| 0
| 0.10334
| 0.026096
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3434b8b2158b075504c712af40e1e57505835e4d
| 53
|
py
|
Python
|
server/athenian/api/models/precomputed/models.py
|
athenianco/athenian-api
|
dd5556101a8c49703d6b0516e4268b9e8d8eda5b
|
[
"RSA-MD"
] | 9
|
2020-10-11T22:12:03.000Z
|
2022-02-26T02:16:45.000Z
|
server/athenian/api/models/precomputed/models.py
|
athenianco/athenian-api
|
dd5556101a8c49703d6b0516e4268b9e8d8eda5b
|
[
"RSA-MD"
] | 246
|
2019-12-05T06:37:30.000Z
|
2022-03-29T10:00:07.000Z
|
server/athenian/api/models/precomputed/models.py
|
athenianco/athenian-api
|
dd5556101a8c49703d6b0516e4268b9e8d8eda5b
|
[
"RSA-MD"
] | 5
|
2019-12-04T22:38:05.000Z
|
2021-02-26T00:50:04.000Z
|
from athenian.precomputer.db.models import * # noqa
| 26.5
| 52
| 0.773585
| 7
| 53
| 5.857143
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132075
| 53
| 1
| 53
| 53
| 0.891304
| 0.075472
| 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
|
3448e314b5730371d84572e930ed1e08db58d30b
| 101
|
py
|
Python
|
tests/__init__.py
|
isabella232/elections18-general
|
24dfe44c6da6312f062816a6d19c87a39d7ddb7b
|
[
"MIT"
] | 3
|
2018-12-02T21:49:39.000Z
|
2021-01-06T01:43:30.000Z
|
tests/__init__.py
|
nprapps/elections18-general
|
24dfe44c6da6312f062816a6d19c87a39d7ddb7b
|
[
"MIT"
] | 35
|
2018-06-06T15:20:03.000Z
|
2018-11-15T18:30:11.000Z
|
tests/__init__.py
|
isabella232/elections18-general
|
24dfe44c6da6312f062816a6d19c87a39d7ddb7b
|
[
"MIT"
] | 1
|
2021-02-23T10:21:33.000Z
|
2021-02-23T10:21:33.000Z
|
import app_config
from fabfile import data
app_config.configure_targets('test')
data.bootstrap_db()
| 16.833333
| 36
| 0.831683
| 15
| 101
| 5.333333
| 0.733333
| 0.225
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089109
| 101
| 5
| 37
| 20.2
| 0.869565
| 0
| 0
| 0
| 0
| 0
| 0.039604
| 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
|
345e9764350d571b96ef68baf9055799ccf27c32
| 401
|
py
|
Python
|
regex_lab/regex1.py
|
jeremyosborne/examples-python
|
5900b3a4f47d59de0a32d3257a8b90a44e80fdcd
|
[
"MIT"
] | null | null | null |
regex_lab/regex1.py
|
jeremyosborne/examples-python
|
5900b3a4f47d59de0a32d3257a8b90a44e80fdcd
|
[
"MIT"
] | null | null | null |
regex_lab/regex1.py
|
jeremyosborne/examples-python
|
5900b3a4f47d59de0a32d3257a8b90a44e80fdcd
|
[
"MIT"
] | null | null | null |
# Find the IP address in the following line using a regex group and the
# re.search function. Print the IP address using the match object group
# method, as well as the index of where the grouping starts and ends.
log = '208.115.111.73 - - [01/Apr/2013:06:30:26 -0700] "GET /nanowiki/index.php/1_November_2007_-_Day_1 HTTP/1.1" 404 36 "-" "Mozilla/5.0 (compatible; Ezooms/1.0; ezooms.bot@gmail.com)"'
| 80.2
| 186
| 0.735661
| 76
| 401
| 3.815789
| 0.75
| 0.034483
| 0.082759
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12828
| 0.144638
| 401
| 4
| 187
| 100.25
| 0.717201
| 0.516209
| 0
| 0
| 0
| 1
| 0.936842
| 0.452632
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
345f51e07ea03c69b1c901dff6be296bf23ea803
| 725
|
py
|
Python
|
blablacarapi/paging.py
|
arrrlo/BlaBlaCar-Client-Api
|
567f60f0e1ad39b1f8b440ddcce45878f9483a3d
|
[
"MIT"
] | 5
|
2016-10-14T08:59:07.000Z
|
2021-02-28T22:52:03.000Z
|
blablacarapi/paging.py
|
arrrlo/BlaBlaCar-Client-Api
|
567f60f0e1ad39b1f8b440ddcce45878f9483a3d
|
[
"MIT"
] | null | null | null |
blablacarapi/paging.py
|
arrrlo/BlaBlaCar-Client-Api
|
567f60f0e1ad39b1f8b440ddcce45878f9483a3d
|
[
"MIT"
] | 5
|
2017-10-10T12:10:09.000Z
|
2021-12-10T10:51:58.000Z
|
__author__ = 'ivan.arar@gmail.com'
class Paging(object):
def __init__(self, paging_data):
self.paging_data = paging_data
def has_next(self):
if int(self.paging_data['page']) == int(self.paging_data['pages']):
return False
else:
return True
def has_previous(self):
if int(self.paging_data['page']) == 1:
return False
else:
return True
def next(self):
if self.has_next():
return int(self.paging_data['page'])+1
else:
return False
def previous(self):
if self.has_previous():
return int(self.paging_data['page'])-1
else:
return False
| 22.65625
| 75
| 0.547586
| 88
| 725
| 4.284091
| 0.272727
| 0.212202
| 0.259947
| 0.225464
| 0.522546
| 0.522546
| 0.371353
| 0.228117
| 0.228117
| 0.228117
| 0
| 0.006263
| 0.33931
| 725
| 31
| 76
| 23.387097
| 0.780793
| 0
| 0
| 0.416667
| 0
| 0
| 0.055172
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.208333
| false
| 0
| 0
| 0
| 0.583333
| 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
|
ca9e565c695ec3581bd9f5089a82c28df4cdd8ab
| 142
|
py
|
Python
|
hello_origin.py
|
BjornChrisnach/Coursera_Python_concise_intro
|
12c3c022b89dc8bba0fe02000728a69d7e4fd0ef
|
[
"MIT"
] | null | null | null |
hello_origin.py
|
BjornChrisnach/Coursera_Python_concise_intro
|
12c3c022b89dc8bba0fe02000728a69d7e4fd0ef
|
[
"MIT"
] | null | null | null |
hello_origin.py
|
BjornChrisnach/Coursera_Python_concise_intro
|
12c3c022b89dc8bba0fe02000728a69d7e4fd0ef
|
[
"MIT"
] | null | null | null |
# - helloworld.py *- coding: utf-8 -*-
"""
This program simply prints the phrase "Hello, World!"
@author: wboyd
"""
print("Hello, World!")
| 14.2
| 53
| 0.633803
| 18
| 142
| 5
| 0.888889
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008475
| 0.169014
| 142
| 9
| 54
| 15.777778
| 0.754237
| 0.753521
| 0
| 0
| 0
| 0
| 0.5
| 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
|
cae75424142676b5fb927624955a8ef75a4470e3
| 190
|
py
|
Python
|
ai_haste/tester/main.py
|
aidotse/Team-Haste
|
b8e074d396be31c0b5c292053aff160c55b75786
|
[
"MIT"
] | null | null | null |
ai_haste/tester/main.py
|
aidotse/Team-Haste
|
b8e074d396be31c0b5c292053aff160c55b75786
|
[
"MIT"
] | null | null | null |
ai_haste/tester/main.py
|
aidotse/Team-Haste
|
b8e074d396be31c0b5c292053aff160c55b75786
|
[
"MIT"
] | null | null | null |
from ai_haste import tester as test
def run(config, dataloader, models, save_folder):
tester = getattr(test, config["tester"])(config, save_folder)
tester.test(dataloader, models)
| 27.142857
| 65
| 0.742105
| 26
| 190
| 5.307692
| 0.576923
| 0.231884
| 0.231884
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147368
| 190
| 6
| 66
| 31.666667
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0.031579
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
caf19e402f619759ad4a5a4a80861feea02c1edd
| 281
|
py
|
Python
|
ple/games/__init__.py
|
rohanraj96/RL-PriorKnowledge
|
31d7c53f3f9c394f148a7133a7aaf5e550176870
|
[
"MIT"
] | 62
|
2018-06-19T07:57:03.000Z
|
2022-03-12T14:09:40.000Z
|
ple/games/__init__.py
|
rohanraj96/RL-PriorKnowledge
|
31d7c53f3f9c394f148a7133a7aaf5e550176870
|
[
"MIT"
] | 4
|
2018-09-19T21:11:09.000Z
|
2019-05-14T21:38:28.000Z
|
ple/games/__init__.py
|
rach0012/humanRL_prior_games
|
c9fff26af5df3e1cdea023536da5fda114ba5c60
|
[
"MIT"
] | 13
|
2018-06-19T10:52:19.000Z
|
2021-12-21T12:19:18.000Z
|
from ple.games.originalgame import originalGame
from ple.games.nosemantics import nosemantics
from ple.games.nosimilarity import nosimilarity
from ple.games.noobject import noobject
from ple.games.noaffordance import noaffordance
from ple.games.continualgame import continualgame
| 35.125
| 49
| 0.868327
| 36
| 281
| 6.777778
| 0.277778
| 0.172131
| 0.295082
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088968
| 281
| 7
| 50
| 40.142857
| 0.953125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1b0a12fac8da7bcb2d4d7c46dcad1989cf07b91f
| 177
|
py
|
Python
|
data/studio21_generated/interview/0272/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/interview/0272/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/interview/0272/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
class Solution:
def maxCandies(self, status: List[int], candies: List[int], keys: List[List[int]], containedBoxes: List[List[int]], initialBoxes: List[int]) -> int:
| 59
| 152
| 0.672316
| 23
| 177
| 5.173913
| 0.521739
| 0.294118
| 0.184874
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.158192
| 177
| 3
| 153
| 59
| 0.798658
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
1b14eb3388929ebb2a26bdbb6f5c65795193b07d
| 51
|
py
|
Python
|
spekulatio/som/extractors/frontmatter/__init__.py
|
iwilltry42/spekulatio
|
42d678b7d7fcc13284902be5a08fb0407d96ec4d
|
[
"MIT"
] | 10
|
2019-03-19T23:05:04.000Z
|
2022-01-19T14:08:06.000Z
|
spekulatio/som/extractors/frontmatter/__init__.py
|
iwilltry42/spekulatio
|
42d678b7d7fcc13284902be5a08fb0407d96ec4d
|
[
"MIT"
] | 6
|
2019-03-23T08:38:44.000Z
|
2020-11-24T20:50:14.000Z
|
spekulatio/som/extractors/frontmatter/__init__.py
|
iwilltry42/spekulatio
|
42d678b7d7fcc13284902be5a08fb0407d96ec4d
|
[
"MIT"
] | 1
|
2019-09-26T12:21:36.000Z
|
2019-09-26T12:21:36.000Z
|
from .parse_frontmatter import parse_frontmatter
| 12.75
| 48
| 0.862745
| 6
| 51
| 7
| 0.666667
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 51
| 3
| 49
| 17
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
1b1d164aac2e02f498fa1e7e5745a253668fe33a
| 1,822
|
py
|
Python
|
algofi/v1/prepend.py
|
owen-colegrove/algofi-py-sdk
|
2fc137e5895601feef9ccda5ed5de3beebfb2f99
|
[
"MIT"
] | null | null | null |
algofi/v1/prepend.py
|
owen-colegrove/algofi-py-sdk
|
2fc137e5895601feef9ccda5ed5de3beebfb2f99
|
[
"MIT"
] | null | null | null |
algofi/v1/prepend.py
|
owen-colegrove/algofi-py-sdk
|
2fc137e5895601feef9ccda5ed5de3beebfb2f99
|
[
"MIT"
] | null | null | null |
from algofi.config import manager_id, storage_ids, oracle_ids, ordered_symbols
from algosdk.future.transaction import ApplicationNoOpTxn
def get_init_txns(sender_addr, params, account=None):
txn0 = ApplicationNoOpTxn(sender_addr, params, manager_id,
[b'update_prices'], foreign_apps=[oracle_ids[symbol] for symbol in ordered_symbols])
txn1 = ApplicationNoOpTxn(sender_addr, params, manager_id,
[b'update_exchange_rate'], foreign_apps=[storage_ids[symbol] for symbol in ordered_symbols])
if (account):
txn2 = ApplicationNoOpTxn(sender_addr, params, manager_id,
[b'update_collateral_value'],
foreign_apps=[storage_ids[symbol] for symbol in ordered_symbols],
accounts=[account])
txn3 = ApplicationNoOpTxn(sender_addr, params, manager_id,
[b'update_borrow_value'],
foreign_apps=[storage_ids[symbol] for symbol in ordered_symbols],
accounts=[account])
else:
txn2 = ApplicationNoOpTxn(sender_addr, params, manager_id,
[b'update_collateral_value'],
foreign_apps=[storage_ids[symbol] for symbol in ordered_symbols])
txn3 = ApplicationNoOpTxn(sender_addr, params, manager_id,
[b'update_borrow_value'],
foreign_apps=[storage_ids[symbol] for symbol in ordered_symbols])
return [txn0, txn1, txn2, txn3]
| 70.076923
| 136
| 0.535126
| 164
| 1,822
| 5.652439
| 0.27439
| 0.067961
| 0.12082
| 0.220065
| 0.746494
| 0.746494
| 0.746494
| 0.709817
| 0.601942
| 0.601942
| 0
| 0.009091
| 0.396268
| 1,822
| 26
| 137
| 70.076923
| 0.833636
| 0
| 0
| 0.583333
| 0
| 0
| 0.06418
| 0.025233
| 0
| 0
| 0
| 0
| 0
| 1
| 0.041667
| false
| 0
| 0.083333
| 0
| 0.166667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1b81350a022679927de28d3b2e918178f8b36153
| 80
|
py
|
Python
|
akashrajput25/Some_py_prog/print_name.py
|
TechGirl007/Hacktoberfest-2024
|
5d7cbfc8552dd6fb0eebbdc7353c699748b1b51d
|
[
"MIT"
] | 40
|
2021-09-25T04:50:35.000Z
|
2021-11-08T12:47:52.000Z
|
akashrajput25/Some_py_prog/print_name.py
|
TechGirl007/Hacktoberfest-2024
|
5d7cbfc8552dd6fb0eebbdc7353c699748b1b51d
|
[
"MIT"
] | 18
|
2021-09-26T05:50:29.000Z
|
2021-10-05T07:03:22.000Z
|
akashrajput25/Some_py_prog/print_name.py
|
TechGirl007/Hacktoberfest-2024
|
5d7cbfc8552dd6fb0eebbdc7353c699748b1b51d
|
[
"MIT"
] | 213
|
2021-09-24T06:27:35.000Z
|
2021-10-31T17:59:38.000Z
|
name=input("Enter your name")
print(f"Your name in reverse order: {name[::-1]}")
| 40
| 50
| 0.6875
| 14
| 80
| 3.928571
| 0.714286
| 0.290909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013889
| 0.1
| 80
| 2
| 50
| 40
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.679012
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
1b8a9f7e4a06ea16137264fdaa730e76db7b9aff
| 52
|
py
|
Python
|
test.py
|
xjunhello/BetterBuy
|
ee9643a8c3c551bda587951f5c69ef3c308e1d59
|
[
"Apache-2.0"
] | null | null | null |
test.py
|
xjunhello/BetterBuy
|
ee9643a8c3c551bda587951f5c69ef3c308e1d59
|
[
"Apache-2.0"
] | null | null | null |
test.py
|
xjunhello/BetterBuy
|
ee9643a8c3c551bda587951f5c69ef3c308e1d59
|
[
"Apache-2.0"
] | null | null | null |
print "Hello world!"
asdfasdfasdfasdfasdfasdfasdf
| 10.4
| 28
| 0.826923
| 4
| 52
| 10.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 52
| 4
| 29
| 13
| 0.934783
| 0
| 0
| 0
| 0
| 0
| 0.24
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.5
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
1b97dabac3787b6ef6fc795e2f70a3b9f333d3bf
| 127
|
py
|
Python
|
barpyrus.py
|
AckslD/barpyrus
|
a89ef3b1453b27998940137b1ccee47d23a19612
|
[
"BSD-2-Clause-FreeBSD"
] | 23
|
2016-07-12T19:04:51.000Z
|
2022-03-29T01:55:31.000Z
|
barpyrus.py
|
AckslD/barpyrus
|
a89ef3b1453b27998940137b1ccee47d23a19612
|
[
"BSD-2-Clause-FreeBSD"
] | 17
|
2017-02-16T21:03:51.000Z
|
2021-12-04T08:28:13.000Z
|
barpyrus.py
|
AckslD/barpyrus
|
a89ef3b1453b27998940137b1ccee47d23a19612
|
[
"BSD-2-Clause-FreeBSD"
] | 9
|
2016-12-15T13:46:48.000Z
|
2021-07-27T22:11:47.000Z
|
#!/usr/bin/env python3
import barpyrus.mainloop
import sys
if __name__ == '__main__':
sys.exit(barpyrus.mainloop.main())
| 15.875
| 38
| 0.724409
| 17
| 127
| 4.941176
| 0.705882
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009091
| 0.133858
| 127
| 7
| 39
| 18.142857
| 0.754545
| 0.165354
| 0
| 0
| 0
| 0
| 0.07619
| 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
|
1bb68cf12331b69615372a0e8813ad52d46b8d14
| 78
|
py
|
Python
|
hooks/__init__.py
|
rattboi/hangoutsbot
|
be32643e526b6f34c704d1a60c42e8b7f171988a
|
[
"MIT"
] | 6
|
2017-11-27T05:00:26.000Z
|
2021-05-31T16:43:44.000Z
|
hooks/__init__.py
|
rattboi/hangoutsbot
|
be32643e526b6f34c704d1a60c42e8b7f171988a
|
[
"MIT"
] | 5
|
2016-12-09T13:43:11.000Z
|
2017-06-23T01:10:06.000Z
|
hooks/__init__.py
|
rattboi/hangoutsbot
|
be32643e526b6f34c704d1a60c42e8b7f171988a
|
[
"MIT"
] | 5
|
2016-11-13T23:15:23.000Z
|
2020-06-03T14:55:45.000Z
|
from utils.imports import import_all
all_hooks = import_all("hooks", "hook")
| 19.5
| 39
| 0.769231
| 12
| 78
| 4.75
| 0.583333
| 0.315789
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 78
| 3
| 40
| 26
| 0.826087
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1bc26e2845e5d1131ca4db156953e89fe923389b
| 139
|
py
|
Python
|
lc_wrapper/bash/__main__.py
|
YOSHIZAWA-Naomi/Jupyter-LC_wrapper
|
4c14da10e9136dcff9dd2eab24db532a4e7d70a5
|
[
"BSD-3-Clause"
] | 12
|
2017-07-04T13:49:13.000Z
|
2021-12-28T16:06:03.000Z
|
lc_wrapper/bash/__main__.py
|
YOSHIZAWA-Naomi/Jupyter-LC_wrapper
|
4c14da10e9136dcff9dd2eab24db532a4e7d70a5
|
[
"BSD-3-Clause"
] | 26
|
2017-05-16T07:54:08.000Z
|
2022-03-24T07:21:10.000Z
|
lc_wrapper/bash/__main__.py
|
YOSHIZAWA-Naomi/Jupyter-LC_wrapper
|
4c14da10e9136dcff9dd2eab24db532a4e7d70a5
|
[
"BSD-3-Clause"
] | 10
|
2017-05-27T03:15:45.000Z
|
2020-01-23T05:01:00.000Z
|
from ipykernel.kernelapp import IPKernelApp
from . import BashKernelBuffered
IPKernelApp.launch_instance(kernel_class=BashKernelBuffered)
| 27.8
| 60
| 0.884892
| 14
| 139
| 8.642857
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071942
| 139
| 4
| 61
| 34.75
| 0.937985
| 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
|
943e15018cac2590ce6c93cf674d4818349111bb
| 46
|
py
|
Python
|
tests/__init__.py
|
dabble-of-devops-bioanalyze/fab_coreui_theme
|
400dbbf3a62ca0e9933b8a457eb2912541920c58
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
dabble-of-devops-bioanalyze/fab_coreui_theme
|
400dbbf3a62ca0e9933b8a457eb2912541920c58
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
dabble-of-devops-bioanalyze/fab_coreui_theme
|
400dbbf3a62ca0e9933b8a457eb2912541920c58
|
[
"MIT"
] | null | null | null |
"""Unit test package for fab_coreui_theme."""
| 23
| 45
| 0.73913
| 7
| 46
| 4.571429
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108696
| 46
| 1
| 46
| 46
| 0.780488
| 0.847826
| 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
|
84c83fcc11354d829be6ef7a49890d796769bc82
| 79
|
py
|
Python
|
5 Star Python/Power Mod-Power.py
|
TheCodeAlpha26/Hackerrank-Demystified
|
03713a8f3a05e5d6dfed6f6808b06340558e2310
|
[
"Apache-2.0"
] | 6
|
2021-04-26T17:09:54.000Z
|
2021-07-08T17:36:16.000Z
|
5 Star Python/Power Mod-Power.py
|
TheCodeAlpha26/Hackerrank-Demystified
|
03713a8f3a05e5d6dfed6f6808b06340558e2310
|
[
"Apache-2.0"
] | null | null | null |
5 Star Python/Power Mod-Power.py
|
TheCodeAlpha26/Hackerrank-Demystified
|
03713a8f3a05e5d6dfed6f6808b06340558e2310
|
[
"Apache-2.0"
] | null | null | null |
a,b,m=int(input()),int(input()),int(input())
print(pow(a,b))
print(pow(a,b,m))
| 19.75
| 44
| 0.607595
| 18
| 79
| 2.666667
| 0.388889
| 0.125
| 0.125
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037975
| 79
| 3
| 45
| 26.333333
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.666667
| 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
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
84d03737db7c2354c6c9d53ebadbee8221add8d6
| 364
|
py
|
Python
|
pagarme/card.py
|
rbbonfim/pagarme-python
|
a7079fbdd01bd855ea09f89847d6374b499be76b
|
[
"MIT"
] | 79
|
2015-08-25T14:43:34.000Z
|
2021-12-01T18:16:54.000Z
|
pagarme/card.py
|
rbbonfim/pagarme-python
|
a7079fbdd01bd855ea09f89847d6374b499be76b
|
[
"MIT"
] | 103
|
2015-09-15T15:24:14.000Z
|
2021-12-20T22:52:02.000Z
|
pagarme/card.py
|
rbbonfim/pagarme-python
|
a7079fbdd01bd855ea09f89847d6374b499be76b
|
[
"MIT"
] | 53
|
2015-09-11T12:06:26.000Z
|
2022-02-23T02:59:57.000Z
|
from pagarme.resources import handler_request
from pagarme.resources.routes import card_routes
def create(dictionary):
return handler_request.post(card_routes.BASE_URL, dictionary)
def find_all():
return handler_request.get(card_routes.GET_ALL_CARDS)
def find_by(search_params):
return handler_request.get(card_routes.GET_CARD_BY, search_params)
| 24.266667
| 70
| 0.818681
| 53
| 364
| 5.301887
| 0.415094
| 0.199288
| 0.213523
| 0.163701
| 0.256228
| 0.256228
| 0.256228
| 0
| 0
| 0
| 0
| 0
| 0.10989
| 364
| 14
| 71
| 26
| 0.867284
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0.25
| 0.375
| 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
| 0
| 1
| 1
| 0
|
0
| 5
|
ca3dfc002f9cd645b674ee7a8ca5579af90bce9f
| 115
|
py
|
Python
|
gitlab_ldap_sync/__init__.py
|
e5-tu-do/gitlab_ldap_group_sync
|
c387b880ec2f4143776c5386aae144dc28656017
|
[
"MIT"
] | 1
|
2020-03-27T14:46:20.000Z
|
2020-03-27T14:46:20.000Z
|
gitlab_ldap_sync/__init__.py
|
e5-tu-do/gitlab_ldap_group_sync
|
c387b880ec2f4143776c5386aae144dc28656017
|
[
"MIT"
] | null | null | null |
gitlab_ldap_sync/__init__.py
|
e5-tu-do/gitlab_ldap_group_sync
|
c387b880ec2f4143776c5386aae144dc28656017
|
[
"MIT"
] | null | null | null |
from .utils import getenvbool
from .ldap_connection import ldap_connect
__all__ = ['getenvbool', 'ldap_connect']
| 19.166667
| 41
| 0.791304
| 14
| 115
| 6
| 0.571429
| 0.261905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121739
| 115
| 5
| 42
| 23
| 0.831683
| 0
| 0
| 0
| 0
| 0
| 0.191304
| 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
|
ca4c72b7eff591852a1ce7f2fb4c62e08b59c7e7
| 140
|
py
|
Python
|
Guitar Training Remote/model/exercise_step.py
|
keremkoseoglu/Python-Library
|
f66ab246da4eabea94596494cf2bc9b416b65b1d
|
[
"MIT"
] | 3
|
2018-06-28T07:09:04.000Z
|
2019-03-04T14:43:52.000Z
|
Guitar Training Remote/model/exercise_step.py
|
keremkoseoglu/Python-Library
|
f66ab246da4eabea94596494cf2bc9b416b65b1d
|
[
"MIT"
] | null | null | null |
Guitar Training Remote/model/exercise_step.py
|
keremkoseoglu/Python-Library
|
f66ab246da4eabea94596494cf2bc9b416b65b1d
|
[
"MIT"
] | 5
|
2018-06-28T07:12:28.000Z
|
2021-06-03T18:20:21.000Z
|
class ExerciseStep:
def __init__(self, main_text:str, sub_text=""):
self.main_text = main_text
self.sub_text = sub_text
| 28
| 51
| 0.671429
| 20
| 140
| 4.2
| 0.45
| 0.285714
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.228571
| 140
| 5
| 52
| 28
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
047df13b9f9ef7279a6e60721877b05343bbf24d
| 118
|
py
|
Python
|
AoC20/day_03/a.py
|
a-recknagel/AoC20
|
7aa0013dc745bdc0ad357e1168b212bd065fd092
|
[
"MIT"
] | null | null | null |
AoC20/day_03/a.py
|
a-recknagel/AoC20
|
7aa0013dc745bdc0ad357e1168b212bd065fd092
|
[
"MIT"
] | null | null | null |
AoC20/day_03/a.py
|
a-recknagel/AoC20
|
7aa0013dc745bdc0ad357e1168b212bd065fd092
|
[
"MIT"
] | null | null | null |
from AoC20.day_3 import trees, data as data
print(sum(trees([line.strip() for line in data.splitlines()], (1, 3))))
| 23.6
| 71
| 0.694915
| 21
| 118
| 3.857143
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04902
| 0.135593
| 118
| 4
| 72
| 29.5
| 0.745098
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 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
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
0481abd22b5988ea45af4037f97012b308c0e446
| 43
|
py
|
Python
|
montreal_forced_aligner/__main__.py
|
sameerkhurana10/Montreal-Forced-Aligner
|
b64b6bf4aa0394d59236510a05453740e7e7ebf5
|
[
"MIT"
] | null | null | null |
montreal_forced_aligner/__main__.py
|
sameerkhurana10/Montreal-Forced-Aligner
|
b64b6bf4aa0394d59236510a05453740e7e7ebf5
|
[
"MIT"
] | null | null | null |
montreal_forced_aligner/__main__.py
|
sameerkhurana10/Montreal-Forced-Aligner
|
b64b6bf4aa0394d59236510a05453740e7e7ebf5
|
[
"MIT"
] | null | null | null |
from .command_line.mfa import main
main()
| 10.75
| 34
| 0.767442
| 7
| 43
| 4.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.139535
| 43
| 3
| 35
| 14.333333
| 0.864865
| 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
|
04ada8c44a8539a27e7591baa5265dc3d2ba9154
| 215
|
py
|
Python
|
Week14/33.py
|
bobsingh149/LeetCode
|
293ed4931960bf5b9a3d5c4331ba4dfddccfcd55
|
[
"MIT"
] | 101
|
2021-02-26T14:32:37.000Z
|
2022-03-16T18:46:37.000Z
|
Week14/33.py
|
bobsingh149/LeetCode
|
293ed4931960bf5b9a3d5c4331ba4dfddccfcd55
|
[
"MIT"
] | null | null | null |
Week14/33.py
|
bobsingh149/LeetCode
|
293ed4931960bf5b9a3d5c4331ba4dfddccfcd55
|
[
"MIT"
] | 30
|
2021-03-09T05:16:48.000Z
|
2022-03-16T21:16:33.000Z
|
### DO NOT REMOVE THIS
from typing import List
### DO NOT REMOVE THIS
class Solution:
def search(self, nums: List[int], target: int) -> int:
return nums.index(target) if target in nums else -1
| 26.875
| 60
| 0.646512
| 33
| 215
| 4.212121
| 0.666667
| 0.071942
| 0.158273
| 0.215827
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006211
| 0.251163
| 215
| 7
| 61
| 30.714286
| 0.857143
| 0.172093
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 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
|
04e21d69c5026429181a1d186c648fee1ed344e5
| 78
|
py
|
Python
|
whyis/blueprint/entity/entity_blueprint.py
|
tolulomo/whyis
|
eb50ab3301eb7efd27a1a3f6fb2305dedd910397
|
[
"Apache-2.0"
] | 31
|
2018-05-30T02:41:23.000Z
|
2021-10-17T01:25:20.000Z
|
whyis/blueprint/entity/entity_blueprint.py
|
tolulomo/whyis
|
eb50ab3301eb7efd27a1a3f6fb2305dedd910397
|
[
"Apache-2.0"
] | 115
|
2018-04-07T00:59:11.000Z
|
2022-03-02T03:06:45.000Z
|
whyis/blueprint/entity/entity_blueprint.py
|
tolulomo/whyis
|
eb50ab3301eb7efd27a1a3f6fb2305dedd910397
|
[
"Apache-2.0"
] | 25
|
2018-04-07T00:49:55.000Z
|
2021-09-28T14:29:18.000Z
|
from flask import Blueprint
entity_blueprint = Blueprint("entity", __name__)
| 19.5
| 48
| 0.807692
| 9
| 78
| 6.444444
| 0.666667
| 0.517241
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 78
| 3
| 49
| 26
| 0.84058
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 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
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
04f14fd4c887f8e9c7b7abe1b4c9ec8785efd2d7
| 337
|
py
|
Python
|
data_structures/stack/conftest.py
|
asakatida/data-structures-and-algorithms.py
|
587d1a66a6c15a3c7d7786275608f065687e1810
|
[
"MIT"
] | null | null | null |
data_structures/stack/conftest.py
|
asakatida/data-structures-and-algorithms.py
|
587d1a66a6c15a3c7d7786275608f065687e1810
|
[
"MIT"
] | 2
|
2020-09-24T13:13:49.000Z
|
2021-06-25T15:15:35.000Z
|
data_structures/stack/conftest.py
|
grandquista/data-structures-and-algorithms.py
|
587d1a66a6c15a3c7d7786275608f065687e1810
|
[
"MIT"
] | null | null | null |
from .stack import Stack
from pytest import fixture
@fixture
def new_stack():
return Stack()
@fixture
def ordered_stack():
return Stack(range(3, 40, 3))
@fixture
def unordered_stack():
return Stack(map(lambda i: i % 7, range(73, 40, -2)))
@fixture
def large_stack():
return Stack("task" for _ in range(0xFFFFFF))
| 14.652174
| 57
| 0.679525
| 50
| 337
| 4.48
| 0.48
| 0.178571
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.040441
| 0.192878
| 337
| 22
| 58
| 15.318182
| 0.783088
| 0
| 0
| 0.285714
| 0
| 0
| 0.011869
| 0
| 0
| 0
| 0.023739
| 0
| 0
| 1
| 0.285714
| true
| 0
| 0.142857
| 0.285714
| 0.714286
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
04f8fc99a387975ace75ce0a00ca29bc03a5eeca
| 117
|
py
|
Python
|
packs/update.py
|
Habejota/Forge
|
51aa6ef54467fd0e1b98ee2273c062e6e6c7d9f4
|
[
"Apache-2.0"
] | 2
|
2021-06-14T22:37:23.000Z
|
2021-06-15T02:03:09.000Z
|
packs/update.py
|
Habejota/Forge
|
51aa6ef54467fd0e1b98ee2273c062e6e6c7d9f4
|
[
"Apache-2.0"
] | null | null | null |
packs/update.py
|
Habejota/Forge
|
51aa6ef54467fd0e1b98ee2273c062e6e6c7d9f4
|
[
"Apache-2.0"
] | null | null | null |
print("OSystem Forge 1.0")
print("To update forge version use:")
print("\n\n forge --update\n\n")
| 39
| 52
| 0.57265
| 18
| 117
| 3.722222
| 0.555556
| 0.059701
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022989
| 0.25641
| 117
| 3
| 52
| 39
| 0.747126
| 0
| 0
| 0
| 0
| 0
| 0.745763
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
04fb8352a8dcfa17850582c9fa0322b57480f3f0
| 1,742
|
py
|
Python
|
tests/datasets/test_ua_cbsa.py
|
bhagyaramgpo/skills-ml
|
be520fc2a2f88bff756d25e57c3378a465a1dcb2
|
[
"MIT"
] | 147
|
2016-12-05T19:45:05.000Z
|
2022-02-17T03:03:28.000Z
|
tests/datasets/test_ua_cbsa.py
|
bhagyaramgpo/skills-ml
|
be520fc2a2f88bff756d25e57c3378a465a1dcb2
|
[
"MIT"
] | 390
|
2016-12-02T03:11:13.000Z
|
2022-03-28T22:08:20.000Z
|
tests/datasets/test_ua_cbsa.py
|
bhagyaramgpo/skills-ml
|
be520fc2a2f88bff756d25e57c3378a465a1dcb2
|
[
"MIT"
] | 66
|
2017-12-14T16:33:24.000Z
|
2022-02-17T03:03:31.000Z
|
import httpretty
from skills_ml.datasets.ua_cbsa import ua_cbsa, URL
RESPONSE = '''UA,UANAME,CBSA,MNAME,MEMI,POPPT,HUPT,AREAPT,AREALANDPT,UAPOP,UAHU,UAAREA,UAAREALAND,MPOP,MHU,MAREA,MAREALAND,UAPOPPCT,UAHUPCT,UAAREAPCT,UAAREALANDPCT,MPOPPCT,MHUPCT,MAREAPCT,MAREALANDPCT
00037,"Abbeville, LA Urban Cluster",10020,"Abbeville, LA Micro Area",2,19268,8216,28218638,27918141,19824,8460,29523368,29222871,57999,25235,3993941933,3038572441,97.2,97.12,95.58,95.54,33.22,32.56,.71,.92
00037,"Abbeville, LA Urban Cluster",35340,"New Iberia, LA Micro Area",2,556,244,1304730,1304730,19824,8460,29523368,29222871,73240,29698,2669055888,1486940445,2.8,2.88,4.42,4.46,.76,.82,.05,.09
00064,"Abbeville, SC Urban Cluster",99999,"Not in a metro/micro area",,5243,2578,11334983,11315197,5243,2578,11334983,11315197,,,,,100,100,100,100,,,,
00091,"Abbotsford, WI Urban Cluster",48140,"Wausau, WI Metro Area",1,1103,428,2102170,2102170,3966,1616,5376662,5363441,134063,57734,4082627087,4001488029,27.81,26.49,39.1,39.19,.82,.74,.05,.05
00091,"Abbotsford, WI Urban Cluster",99999,"Not in a metro/micro area",,2863,1188,3274492,3261271,3966,1616,5376662,5363441,,,,,72.19,73.51,60.9,60.81,,,,
00118,"Aberdeen, MS Urban Cluster",99999,"Not in a metro/micro area",,4666,2050,7469348,7416616,4666,2050,7469348,7416616,,,,,100,100,100,100,,,,'''
@httpretty.activate
def test_ua_cbsa():
httpretty.register_uri(
httpretty.GET,
URL,
body=RESPONSE,
content_type='text/csv'
)
results = ua_cbsa.__wrapped__()
assert results == {
'00037': [
('10020', 'Abbeville, LA Micro Area'),
('35340', 'New Iberia, LA Micro Area'),
],
'00091': [('48140', 'Wausau, WI Metro Area')]
}
| 56.193548
| 205
| 0.711825
| 264
| 1,742
| 4.651515
| 0.568182
| 0.051303
| 0.035831
| 0.04886
| 0.290717
| 0.131107
| 0.090391
| 0.090391
| 0.090391
| 0
| 0
| 0.363342
| 0.113662
| 1,742
| 30
| 206
| 58.066667
| 0.431995
| 0
| 0
| 0
| 0
| 0.28
| 0.766361
| 0.513777
| 0
| 0
| 0
| 0
| 0.04
| 1
| 0.04
| false
| 0
| 0.08
| 0
| 0.12
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b6d977ad134622d3b86be2421cd8f5fd40d3ef67
| 237
|
py
|
Python
|
wazimap_ng/profile/admin/__init__.py
|
arghyaiitb/wazimap-ng
|
2a77860526d865b8fd0c22a2204f121fdb3b28a0
|
[
"Apache-2.0"
] | 11
|
2019-12-31T20:27:22.000Z
|
2022-03-10T03:55:38.000Z
|
wazimap_ng/profile/admin/__init__.py
|
arghyaiitb/wazimap-ng
|
2a77860526d865b8fd0c22a2204f121fdb3b28a0
|
[
"Apache-2.0"
] | 164
|
2020-02-06T15:02:22.000Z
|
2022-03-30T22:42:00.000Z
|
wazimap_ng/profile/admin/__init__.py
|
arghyaiitb/wazimap-ng
|
2a77860526d865b8fd0c22a2204f121fdb3b28a0
|
[
"Apache-2.0"
] | 16
|
2020-01-03T20:30:24.000Z
|
2022-01-11T11:05:15.000Z
|
from django.contrib.gis import admin
from .. import models
from .admins import (
LogoAdmin, ProfileIndicatorAdmin, ProfileKeyMetricsAdmin, ProfileHighlightAdmin,
IndicatorCategoryAdmin, IndicatorSubcategoryAdmin, ProfileAdmin
)
| 29.625
| 84
| 0.822785
| 19
| 237
| 10.263158
| 0.789474
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122363
| 237
| 7
| 85
| 33.857143
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
b6fda9604a87a35038d74415767c4f9428f747a2
| 131
|
py
|
Python
|
vkwave/api/__init__.py
|
Stunnerr/vkwave
|
605bcfafa8db9d75122b5c66cf8bad5211199883
|
[
"MIT"
] | 222
|
2020-03-30T18:09:20.000Z
|
2022-03-27T18:25:04.000Z
|
vkwave/api/__init__.py
|
Stunnerr/vkwave
|
605bcfafa8db9d75122b5c66cf8bad5211199883
|
[
"MIT"
] | 62
|
2020-03-30T18:31:25.000Z
|
2021-12-21T17:00:44.000Z
|
vkwave/api/__init__.py
|
Stunnerr/vkwave
|
605bcfafa8db9d75122b5c66cf8bad5211199883
|
[
"MIT"
] | 91
|
2020-03-30T18:34:49.000Z
|
2022-03-23T12:58:49.000Z
|
from .methods import API, APIOptionsRequestContext
from .token import Token, BotSyncSingleToken
from .utils.get_all import Fetcher
| 32.75
| 50
| 0.847328
| 16
| 131
| 6.875
| 0.6875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10687
| 131
| 3
| 51
| 43.666667
| 0.940171
| 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
|
8e0a03d4019a11784c1f2055311878f71bf60066
| 23
|
py
|
Python
|
lilanet/model/__init__.py
|
TahjidEshan/pytorch-LiLaNet
|
f15c104ce495c3271b92b8761adadaba18d730dd
|
[
"MIT"
] | 17
|
2019-06-09T09:34:33.000Z
|
2021-10-31T07:37:19.000Z
|
lilanet/model/__init__.py
|
arincbulgur/pytorch-WeatherNet
|
8a39326ad8c2150ac5cb4dfa9b7ae2a4ef4a91e8
|
[
"MIT"
] | 1
|
2021-04-19T12:56:09.000Z
|
2021-04-19T15:05:44.000Z
|
lilanet/model/__init__.py
|
arincbulgur/pytorch-WeatherNet
|
8a39326ad8c2150ac5cb4dfa9b7ae2a4ef4a91e8
|
[
"MIT"
] | 6
|
2019-06-03T04:22:07.000Z
|
2020-12-31T13:39:06.000Z
|
from .lilanet import *
| 11.5
| 22
| 0.73913
| 3
| 23
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 23
| 1
| 23
| 23
| 0.894737
| 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
|
8e3a00569ac9af666de44f40abe822676e1d2b62
| 6,795
|
py
|
Python
|
tests/core/test_ElementInGFpn.py
|
syakoo/galois-field
|
e642adfa7da55f6cd95cadceb0116cdea379c181
|
[
"MIT"
] | 8
|
2020-11-13T08:32:56.000Z
|
2022-02-14T04:22:36.000Z
|
tests/core/test_ElementInGFpn.py
|
syakoo/galois-field
|
e642adfa7da55f6cd95cadceb0116cdea379c181
|
[
"MIT"
] | 3
|
2020-11-13T11:40:53.000Z
|
2020-12-16T10:27:38.000Z
|
tests/core/test_ElementInGFpn.py
|
syakoo/galois-field
|
e642adfa7da55f6cd95cadceb0116cdea379c181
|
[
"MIT"
] | 1
|
2022-02-11T09:45:41.000Z
|
2022-02-11T09:45:41.000Z
|
from typing import Union
import numpy as np
import pytest
from galois_field.core.ElementInGFpn import ElementInGFpn
from galois_field.core.types import Fp, Fpn
@pytest.mark.parametrize('coeffs, p, mod_coeffs, expected_coeffs', [
(np.array([4, 3, 2, 1]), 2, np.array([1, 1, 1]), [1, 0]),
(np.array([4, 3, 2, 1]), 5, np.array([1, 0, 2]), [4, 0]),
(np.array([2, 1]), 11, np.array([1, 0, 1]), [2, 1])
])
def test_ElementInGFpn_init(coeffs, p, mod_coeffs, expected_coeffs):
result = ElementInGFpn(coeffs, p, mod_coeffs)
assert result.coeffs == expected_coeffs
@pytest.mark.parametrize('coeffs, p, mod_coeffs, expected', [
(np.array([0]), 2, np.array([1, 1, 1]), '0'),
(np.array([4, 3, 2, 1]), 2, np.array([1, 1, 1]), '1x'),
(np.array([4, 3, 2, 1]), 5, np.array([1, 0, 2]), '4x'),
(np.array([2, 1]), 11, np.array([1, 0, 1]), '2x + 1')
])
def test_ElementInGFpn_str(coeffs, p, mod_coeffs, expected):
result = ElementInGFpn(coeffs, p, mod_coeffs)
assert str(result) == expected
@pytest.mark.parametrize('coeffs, p, mod_coeffs, expected', [
(np.array([4, 3, 2, 1]), 2, np.array([1, 1, 1]),
'ElementInGFpn([1, 0], 2, [1, 1, 1])'),
(np.array([4, 3, 2, 1]), 5, np.array([1, 0, 2]),
'ElementInGFpn([4, 0], 5, [1, 0, 2])'),
(np.array([2, 1]), 11, np.array([1, 0, 1]),
'ElementInGFpn([2, 1], 11, [1, 0, 1])')
])
def test_ElementInGFpn_repr(coeffs, p, mod_coeffs, expected):
result = ElementInGFpn(coeffs, p, np.poly1d(mod_coeffs))
assert repr(result) == expected
@pytest.mark.parametrize('coeffs1, coeffs2, p, mod_coeffs, expected_coeffs', [
(np.array([1, 2, 3, 4]), np.array([1, 2, 3, 4]), 5,
np.array([1, 0, 0, 0, 2]), [2, 4, 1, 3]),
(np.array([1, 2, 3, 4]), np.array([1, 2, 3, 4]),
11, np.array([1, 0, 1]), [4, 4]),
(3, np.array([1, 2, 3, 4]), 5,
np.array([1, 0, 0, 0, 2]), [1, 2, 3, 2]),
(np.array([1, 2, 3, 4]), 2,
11, np.array([1, 0, 1]), [2, 4])
])
def test_GFpn_add(coeffs1: Fpn, coeffs2: Fpn,
p: int, mod_coeffs: Fpn, expected_coeffs):
if isinstance(coeffs1, int):
el1 = coeffs1
else:
el1 = ElementInGFpn(coeffs1, p, np.poly1d(mod_coeffs))
if isinstance(coeffs2, int):
el2 = coeffs2
else:
el2 = ElementInGFpn(coeffs2, p, np.poly1d(mod_coeffs))
result = el1 + el2
print(result)
assert result.coeffs == expected_coeffs
@pytest.mark.parametrize('coeffs1, coeffs2, p, mod_coeffs, expected_coeffs', [
(np.array([1, 2, 3, 4]), np.array([4, 3, 2, 1]),
5, np.array([1, 0, 0, 0, 2]), [2, 4, 1, 3]),
(np.array([1, 2, 3, 4]), [4, 3, 2, 1], 11, np.array([1, 0, 1]), [4, 4]),
(np.array([1, 2, 3, 4]), 3,
5, np.array([1, 0, 0, 0, 2]), [1, 2, 3, 1]),
(4, [4, 3, 2, 1], 11, np.array([1, 0, 1]), [2, 6])
])
def test_GFpn_sub(coeffs1: Fpn, coeffs2: Fpn,
p: int, mod_coeffs: Fpn, expected_coeffs):
if isinstance(coeffs1, int):
el1 = coeffs1
else:
el1 = ElementInGFpn(coeffs1, p, np.poly1d(mod_coeffs))
if isinstance(coeffs2, int):
el2 = coeffs2
else:
el2 = ElementInGFpn(coeffs2, p, np.poly1d(mod_coeffs))
result = el1 - el2
assert result.coeffs == expected_coeffs
@pytest.mark.parametrize('coeffs1, coeffs2, p, mod_coeffs, expected_coeffs', [
(np.array([1, 2, 3, 4]), np.array([1, 2]), 5,
np.array([1, 0, 0, 0, 2]), [4, 2, 0, 1]),
(np.array([1, 2]), np.array([1, 2, 3, 4]),
11, np.array([1, 0, 1]), [6, 2]),
(np.array([1, 2, 3, 4]), 15, 11, np.array([1, 0, 0, 1, 2]), [4, 8, 1, 5]),
(15, np.array([1, 2, 3, 4]), 11, np.array([1, 0, 0, 1, 2]), [4, 8, 1, 5]),
])
def test_GFpn_mul(coeffs1: Union[Fpn, Fp],
coeffs2: Union[Fpn, Fp],
p: int, mod_coeffs: Fpn, expected_coeffs):
if isinstance(coeffs1, Fp):
el1 = coeffs1
else:
el1 = ElementInGFpn(coeffs1, p, np.poly1d(mod_coeffs))
if isinstance(coeffs2, Fp):
el2 = coeffs2
else:
el2 = ElementInGFpn(coeffs2, p, np.poly1d(mod_coeffs))
result = el1 * el2
assert result.coeffs == expected_coeffs
@pytest.mark.parametrize("coeffs1, coeffs2, p, mod_coeffs, expected_coeffs", [
(np.array([1, 1]), np.array([4]), 11, np.array([1, 0, 1]), [3, 3]),
(np.array([1, 2]), np.array([1, 1]), 5, np.array([1, 0, 2]), [3, 3]),
(2, np.array([1, 1]), 7, np.array([1, 0, 0, 1, 1]), [5, 2, 5, 0]),
(np.array([1, 1]), 5, 7, np.array([1, 0, 0, 1, 1]), [3, 3])
])
def test_GFpn_div(coeffs1: Union[Fpn, Fp],
coeffs2: Union[Fpn, Fp], p, mod_coeffs, expected_coeffs):
"""poly^{-1} = expected (mod mod_poly)"""
if isinstance(coeffs1, Fp):
el1 = coeffs1
else:
el1 = ElementInGFpn(coeffs1, p, np.poly1d(mod_coeffs))
if isinstance(coeffs2, Fp):
el2 = coeffs2
else:
el2 = ElementInGFpn(coeffs2, p, np.poly1d(mod_coeffs))
result = el1 / el2
assert result.coeffs == expected_coeffs
@pytest.mark.parametrize("el, exp, expected_coeffs", [
(ElementInGFpn(np.array([4]), 11, np.poly1d([1, 0, 1])), 3, [9]),
(ElementInGFpn(np.array([1, 1]), 5,
np.poly1d([1, 0, 2])), 23, [3, 2]),
(ElementInGFpn(np.array([1, 1]), 7,
np.poly1d([1, 0, 0, 1, 1])), 2399, [6, 1, 6, 0])
])
def test_GFpn_pow(el, exp, expected_coeffs):
result = el ** exp
assert result.coeffs == expected_coeffs
@pytest.mark.parametrize("el1, el2, expected", [
(ElementInGFpn(np.array([1, 1]), 11, np.array([1, 0, 1])),
ElementInGFpn(np.array([1, 1]), 11, np.array([1, 0, 1])), True),
(ElementInGFpn(np.array([1, 2]), 11, np.array([1, 0, 1])),
ElementInGFpn(np.array([1, 1]), 11, np.array([1, 0, 1])), False),
(ElementInGFpn(np.array([1, 1]), 11, np.array([1, 0, 1])),
ElementInGFpn(np.array([1, 1]), 7, np.array([1, 0, 1])), True),
(ElementInGFpn(np.array([1, 1]), 11, np.array([1, 0, 1])),
ElementInGFpn(np.array([1, 1]), 11, np.array([1, 0, 1, 4])), True),
(ElementInGFpn(np.array([1, 1]), 11, np.array([1, 0, 1])), [1, 1], True),
(ElementInGFpn(np.array([1]), 11, np.array([1, 0, 1])), 1, True),
])
def test_GFpn_equal(el1, el2, expected):
result = el1 == el2
assert result == expected
@pytest.mark.parametrize("el, expected_coeffs", [
(ElementInGFpn(np.array([1, 1]), 7,
np.poly1d([1, 0, 0, 0, 1])), [3, 4, 3, 4]),
(ElementInGFpn(np.array([4]), 11, np.poly1d([1, 0, 1])), [3]),
(ElementInGFpn(np.array([1, 1]), 5, np.poly1d([1, 0, 2])), [3, 2]),
(ElementInGFpn(np.array([1, 1]), 7,
np.poly1d([1, 0, 0, 1, 1])), [6, 1, 6, 0])
])
def test_GFpn_inverse(el, expected_coeffs):
result = el.inverse()
assert result.coeffs == expected_coeffs
| 35.575916
| 78
| 0.554378
| 1,097
| 6,795
| 3.371012
| 0.062899
| 0.160898
| 0.153597
| 0.07788
| 0.857491
| 0.802326
| 0.785289
| 0.734451
| 0.682531
| 0.630882
| 0
| 0.106447
| 0.221634
| 6,795
| 190
| 79
| 35.763158
| 0.59274
| 0.005151
| 0
| 0.430464
| 0
| 0
| 0.069588
| 0
| 0
| 0
| 0
| 0
| 0.066225
| 1
| 0.066225
| false
| 0
| 0.033113
| 0
| 0.099338
| 0.006623
| 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
|
8e5164302bb03348f757042027d5c1d313111aec
| 177
|
py
|
Python
|
sketch/models/MSImageCollection.py
|
shrredd/sketch
|
eebcd5077ae355f914bc77ac44d06410f9caa132
|
[
"MIT",
"Unlicense"
] | 2
|
2018-10-22T12:43:51.000Z
|
2018-12-02T02:41:55.000Z
|
sketch/models/MSImageCollection.py
|
shrredd/sketch
|
eebcd5077ae355f914bc77ac44d06410f9caa132
|
[
"MIT",
"Unlicense"
] | null | null | null |
sketch/models/MSImageCollection.py
|
shrredd/sketch
|
eebcd5077ae355f914bc77ac44d06410f9caa132
|
[
"MIT",
"Unlicense"
] | null | null | null |
class MSImageCollection(object):
def __init__(self, images):
self._images = images
@property
def images(self):
# <list>
return self._images
| 19.666667
| 32
| 0.610169
| 18
| 177
| 5.666667
| 0.555556
| 0.294118
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.293785
| 177
| 8
| 33
| 22.125
| 0.816
| 0.033898
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.166667
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
f3e18113e2b59891ba8661fecfb513f3631116d6
| 213
|
py
|
Python
|
isityaml/urls.py
|
peterkmurphy/isityaml
|
bd1dfddfb4644fa4bd086bbced08e9d7002e724a
|
[
"BSD-3-Clause"
] | 1
|
2016-10-12T08:40:32.000Z
|
2016-10-12T08:40:32.000Z
|
isityaml/urls.py
|
peterkmurphy/isityaml
|
bd1dfddfb4644fa4bd086bbced08e9d7002e724a
|
[
"BSD-3-Clause"
] | null | null | null |
isityaml/urls.py
|
peterkmurphy/isityaml
|
bd1dfddfb4644fa4bd086bbced08e9d7002e724a
|
[
"BSD-3-Clause"
] | null | null | null |
# Deprecated and removed in Django 1.6:
# Deprecated and removed in Django 1.6:
from django.conf.urls import url, include
from isityaml.views import index as viewindex
urlpatterns =[ url(r'^$', viewindex)]
| 30.428571
| 46
| 0.737089
| 32
| 213
| 4.90625
| 0.625
| 0.165605
| 0.254777
| 0.280255
| 0.382166
| 0.382166
| 0.382166
| 0
| 0
| 0
| 0
| 0.022599
| 0.169014
| 213
| 6
| 47
| 35.5
| 0.864407
| 0.352113
| 0
| 0
| 0
| 0
| 0.015504
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f3e8a55e3374c122ef520cf1a0f94ce27b39c2e4
| 99
|
wsgi
|
Python
|
application.wsgi
|
bsrivatsan/TexIt
|
fa2c64e01b316725e7c282cb62cfa6663a7ab527
|
[
"Apache-2.0"
] | 3
|
2018-02-14T05:26:58.000Z
|
2021-01-25T18:52:12.000Z
|
application.wsgi
|
bsrivatsan/TexIt
|
fa2c64e01b316725e7c282cb62cfa6663a7ab527
|
[
"Apache-2.0"
] | null | null | null |
application.wsgi
|
bsrivatsan/TexIt
|
fa2c64e01b316725e7c282cb62cfa6663a7ab527
|
[
"Apache-2.0"
] | null | null | null |
import sys
sys.path.insert(0, '/var/www/html/')
from application import application as application
| 24.75
| 50
| 0.787879
| 15
| 99
| 5.2
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011236
| 0.10101
| 99
| 4
| 50
| 24.75
| 0.865169
| 0
| 0
| 0
| 0
| 0
| 0.14
| 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
|
6d2182cd2aff101ebeaa16d029c8677cc3b44b0d
| 101
|
py
|
Python
|
bitmovin/utils/__init__.py
|
camberbridge/bitmovin-python
|
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
|
[
"Unlicense"
] | 44
|
2016-12-12T17:37:23.000Z
|
2021-03-03T09:48:48.000Z
|
bitmovin/utils/__init__.py
|
camberbridge/bitmovin-python
|
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
|
[
"Unlicense"
] | 38
|
2017-01-09T14:45:45.000Z
|
2022-02-27T18:04:33.000Z
|
bitmovin/utils/__init__.py
|
camberbridge/bitmovin-python
|
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
|
[
"Unlicense"
] | 27
|
2017-02-02T22:49:31.000Z
|
2019-11-21T07:04:57.000Z
|
from .serialization import BitmovinJSONEncoder, Serializable
from .timeout_utils import TimeoutUtils
| 33.666667
| 60
| 0.881188
| 10
| 101
| 8.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089109
| 101
| 2
| 61
| 50.5
| 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
|
6d25b19b956d3e7aaf30ea4a570b8c420fab8e45
| 127
|
py
|
Python
|
console/admin.py
|
unilot/pre-ico
|
6d4bd6648b3a1fbc169bd3e331385736d3974046
|
[
"MIT"
] | 1
|
2018-08-03T03:32:32.000Z
|
2018-08-03T03:32:32.000Z
|
console/admin.py
|
unilot/pre-ico
|
6d4bd6648b3a1fbc169bd3e331385736d3974046
|
[
"MIT"
] | 8
|
2020-02-11T21:44:14.000Z
|
2022-01-13T00:33:35.000Z
|
console/admin.py
|
unilot/pre-ico
|
6d4bd6648b3a1fbc169bd3e331385736d3974046
|
[
"MIT"
] | 1
|
2018-02-17T12:52:46.000Z
|
2018-02-17T12:52:46.000Z
|
from django.contrib import admin
from . import models
# Register your models here.
admin.site.register((models.ExchangeRate,))
| 25.4
| 43
| 0.795276
| 17
| 127
| 5.941176
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110236
| 127
| 5
| 43
| 25.4
| 0.893805
| 0.204724
| 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
|
6d440d06567ea56da1069d964405087809b69189
| 107
|
py
|
Python
|
authors/apps/articles/admin.py
|
andela-gad/Ah-backend-aquaman
|
29cf560063171c2bb8c8aed1ff36436acbc47bc9
|
[
"BSD-3-Clause"
] | 3
|
2019-02-25T12:26:30.000Z
|
2019-10-26T20:32:00.000Z
|
authors/apps/articles/admin.py
|
andela-gad/Ah-backend-aquaman
|
29cf560063171c2bb8c8aed1ff36436acbc47bc9
|
[
"BSD-3-Clause"
] | 130
|
2019-11-07T02:35:18.000Z
|
2021-07-30T02:17:11.000Z
|
authors/apps/articles/admin.py
|
CryceTruly/Ah-backend-aquaman
|
29cf560063171c2bb8c8aed1ff36436acbc47bc9
|
[
"BSD-3-Clause"
] | 6
|
2019-06-29T12:09:37.000Z
|
2020-03-06T07:02:55.000Z
|
from .models import ReportedArticle
from django.contrib import admin
admin.site.register(ReportedArticle)
| 21.4
| 36
| 0.850467
| 13
| 107
| 7
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093458
| 107
| 5
| 36
| 21.4
| 0.938144
| 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
|
eda9e0f45af9d0b04c4a54ca3e8a731c3834156d
| 246
|
py
|
Python
|
judge/tasks.py
|
gogiluv/testrepo
|
55e4a905b70a460e74b8116a130b720821eaf2ce
|
[
"MIT"
] | 1
|
2018-01-28T07:48:13.000Z
|
2018-01-28T07:48:13.000Z
|
judge/tasks.py
|
OnlineJudgeNextGeneration/qduoj2
|
c4889d70850bd91ae7f662c02524d0555b6a3ce7
|
[
"MIT"
] | null | null | null |
judge/tasks.py
|
OnlineJudgeNextGeneration/qduoj2
|
c4889d70850bd91ae7f662c02524d0555b6a3ce7
|
[
"MIT"
] | 1
|
2020-09-29T14:21:27.000Z
|
2020-09-29T14:21:27.000Z
|
from __future__ import absolute_import, unicode_literals
from celery import shared_task
from judge.dispatcher import JudgeDispatcher
@shared_task
def judge_task(submission_id, problem_id):
JudgeDispatcher(submission_id, problem_id).judge()
| 27.333333
| 56
| 0.845528
| 32
| 246
| 6.09375
| 0.5
| 0.102564
| 0.194872
| 0.215385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101626
| 246
| 8
| 57
| 30.75
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.5
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
edbe8e0e1599f44ba177e7c2eab83a6df149f948
| 1,741
|
py
|
Python
|
dojo/unittests/tools/test_spotbugs_parser.py
|
steven-hadfield/django-DefectDojo
|
38609f7316cf6bf6cb30736f644fe2c66cc71061
|
[
"BSD-3-Clause"
] | 1
|
2021-12-14T14:46:42.000Z
|
2021-12-14T14:46:42.000Z
|
dojo/unittests/tools/test_spotbugs_parser.py
|
steven-hadfield/django-DefectDojo
|
38609f7316cf6bf6cb30736f644fe2c66cc71061
|
[
"BSD-3-Clause"
] | 89
|
2021-05-10T04:35:07.000Z
|
2022-03-31T05:08:07.000Z
|
dojo/unittests/tools/test_spotbugs_parser.py
|
steven-hadfield/django-DefectDojo
|
38609f7316cf6bf6cb30736f644fe2c66cc71061
|
[
"BSD-3-Clause"
] | 2
|
2021-09-16T18:30:17.000Z
|
2021-09-17T00:46:38.000Z
|
from django.test import TestCase
from dojo.tools.spotbugs.parser import SpotbugsParser
from dojo.models import Test
class TestSpotbugsParser(TestCase):
def test_no_findings(self):
parser = SpotbugsParser()
findings = parser.get_findings("dojo/unittests/scans/spotbugs/no_finding.xml", Test())
self.assertEqual(0, len(findings))
def test_parse_many_finding(self):
parser = SpotbugsParser()
findings = parser.get_findings("dojo/unittests/scans/spotbugs/many_findings.xml", Test())
self.assertEqual(81, len(findings))
def test_find_sast_source_line(self):
parser = SpotbugsParser()
findings = parser.get_findings("dojo/unittests/scans/spotbugs/many_findings.xml", Test())
test_finding = findings[0]
self.assertEqual(95, test_finding.sast_source_line)
def test_find_sast_source_path(self):
parser = SpotbugsParser()
findings = parser.get_findings("dojo/unittests/scans/spotbugs/many_findings.xml", Test())
test_finding = findings[0]
self.assertEqual("securitytest/command/IdentityFunctionCommandInjection.kt", test_finding.sast_source_file_path)
def test_find_source_line(self):
parser = SpotbugsParser()
findings = parser.get_findings("dojo/unittests/scans/spotbugs/many_findings.xml", Test())
test_finding = findings[0]
self.assertEqual(95, test_finding.line)
def test_find_file_path(self):
parser = SpotbugsParser()
findings = parser.get_findings("dojo/unittests/scans/spotbugs/many_findings.xml", Test())
test_finding = findings[0]
self.assertEqual("securitytest/command/IdentityFunctionCommandInjection.kt", test_finding.file_path)
| 42.463415
| 120
| 0.723148
| 203
| 1,741
| 5.980296
| 0.192118
| 0.072488
| 0.118616
| 0.158155
| 0.743822
| 0.714168
| 0.714168
| 0.714168
| 0.714168
| 0.714168
| 0
| 0.007634
| 0.172315
| 1,741
| 40
| 121
| 43.525
| 0.834837
| 0
| 0
| 0.46875
| 0
| 0
| 0.224584
| 0.224584
| 0
| 0
| 0
| 0
| 0.1875
| 1
| 0.1875
| false
| 0
| 0.09375
| 0
| 0.3125
| 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
|
edc28974421bd04aabd7d4e07348e037a529e629
| 440
|
py
|
Python
|
corai/tests/pytorch_light/estim_history_adapter_example.py
|
Code-Cornelius/libraries
|
2ebd5f78dcedfdce1416280d7d40de7691906951
|
[
"MIT"
] | 1
|
2022-01-01T22:10:04.000Z
|
2022-01-01T22:10:04.000Z
|
corai/tests/pytorch_light/estim_history_adapter_example.py
|
Code-Cornelius/libraries
|
2ebd5f78dcedfdce1416280d7d40de7691906951
|
[
"MIT"
] | null | null | null |
corai/tests/pytorch_light/estim_history_adapter_example.py
|
Code-Cornelius/libraries
|
2ebd5f78dcedfdce1416280d7d40de7691906951
|
[
"MIT"
] | null | null | null |
from corai import Estim_history
log_path = r"/Users/biancateodoracatea/PycharmProjects/python_libraries/corai/pytorch_light/out/csv_logs/default/version_0/metrics.csv"
ckpt = r"/Users/biancateodoracatea/PycharmProjects/python_libraries/corai/pytorch_light/out/default_default_Logger_custom_plot/2_6_1.0/checkpoints/epoch=259-step=2339.ckpt"
estimator = Estim_history.from_pl_logs(log_path=log_path, checkpoint_path=ckpt)
print(estimator)
| 55
| 172
| 0.863636
| 65
| 440
| 5.538462
| 0.584615
| 0.058333
| 0.133333
| 0.216667
| 0.411111
| 0.411111
| 0.411111
| 0.411111
| 0.411111
| 0.411111
| 0
| 0.028369
| 0.038636
| 440
| 8
| 173
| 55
| 0.822695
| 0
| 0
| 0
| 0
| 0.4
| 0.641723
| 0.641723
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0.2
| 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
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b61996b3a58daec50c7481006e9e4f0261e74725
| 157
|
py
|
Python
|
bouser_ws/__init__.py
|
MarsStirner/bouser.ws
|
ccecda4d58b91f0690e9789fbaec1a060df43733
|
[
"0BSD"
] | null | null | null |
bouser_ws/__init__.py
|
MarsStirner/bouser.ws
|
ccecda4d58b91f0690e9789fbaec1a060df43733
|
[
"0BSD"
] | null | null | null |
bouser_ws/__init__.py
|
MarsStirner/bouser.ws
|
ccecda4d58b91f0690e9789fbaec1a060df43733
|
[
"0BSD"
] | null | null | null |
# -*- coding: utf-8 -*-
from . import factory, proto, resource, service
__author__ = 'viruzzz-kun'
def make(config):
return service.WsService(config)
| 17.444444
| 47
| 0.687898
| 19
| 157
| 5.473684
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007634
| 0.165605
| 157
| 8
| 48
| 19.625
| 0.78626
| 0.133758
| 0
| 0
| 0
| 0
| 0.08209
| 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
|
b62ef74a057ed39620fdbf5a7dc6c6e5669c73fe
| 55
|
py
|
Python
|
src/xmlutil.py
|
aydjay/moatools
|
37cb2d6fc3fa03ef86e410c501a70dd67e09cef4
|
[
"Apache-2.0"
] | null | null | null |
src/xmlutil.py
|
aydjay/moatools
|
37cb2d6fc3fa03ef86e410c501a70dd67e09cef4
|
[
"Apache-2.0"
] | null | null | null |
src/xmlutil.py
|
aydjay/moatools
|
37cb2d6fc3fa03ef86e410c501a70dd67e09cef4
|
[
"Apache-2.0"
] | null | null | null |
def ParseXMLWithXPath(xmlString, xpath):
return
| 9.166667
| 40
| 0.727273
| 5
| 55
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 55
| 6
| 41
| 9.166667
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
b66d405794ce9f1dea59588ae3a39bb74c0d99f9
| 107
|
py
|
Python
|
speech_packer/__init__.py
|
asyaf/speech-packer
|
5c576ef8922f2ec1279a53cb7ebbc6e5fd51157c
|
[
"MIT"
] | null | null | null |
speech_packer/__init__.py
|
asyaf/speech-packer
|
5c576ef8922f2ec1279a53cb7ebbc6e5fd51157c
|
[
"MIT"
] | null | null | null |
speech_packer/__init__.py
|
asyaf/speech-packer
|
5c576ef8922f2ec1279a53cb7ebbc6e5fd51157c
|
[
"MIT"
] | null | null | null |
from .version import __version__
from .speech_packer import Packer, SpeechAnalyzer
name = "speech_packer"
| 21.4
| 49
| 0.82243
| 13
| 107
| 6.307692
| 0.538462
| 0.292683
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121495
| 107
| 4
| 50
| 26.75
| 0.87234
| 0
| 0
| 0
| 0
| 0
| 0.121495
| 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
|
b6748f6bf46e4b67ad5a4d9edfc161033fadafca
| 62
|
py
|
Python
|
python_target/FoxySheep/AST/pattern/BlankNode.py
|
rljacobson/FoxySheep
|
78451ba9f868d21f20f23ee880649f20669e7644
|
[
"BSD-2-Clause"
] | 41
|
2016-02-08T12:35:11.000Z
|
2021-11-17T11:45:47.000Z
|
python_target/FoxySheep/AST/pattern/BlankNode.py
|
rljacobson/FoxySheep
|
78451ba9f868d21f20f23ee880649f20669e7644
|
[
"BSD-2-Clause"
] | 4
|
2020-09-09T20:43:34.000Z
|
2021-01-21T22:32:26.000Z
|
FoxySheep/tree/pattern/BlankNode.py
|
rocky/FoxySheep2
|
94400a7e135035dadb63d703740859a69fbf9c97
|
[
"BSD-2-Clause"
] | 4
|
2017-08-20T01:04:10.000Z
|
2021-08-07T19:51:52.000Z
|
from AST import ASTNode
class BlankNode(ASTNode):
pass
| 8.857143
| 25
| 0.725806
| 8
| 62
| 5.625
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.225806
| 62
| 6
| 26
| 10.333333
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
b6b4a67b969615dc7dad17bf098d3fd68deccd6c
| 174
|
py
|
Python
|
rankers/fact_ranker.py
|
rubencart/LIIR-TextGraphs-14
|
272849e74ef16f1499249048a0502e6e2236756d
|
[
"MIT"
] | 1
|
2021-03-17T12:36:11.000Z
|
2021-03-17T12:36:11.000Z
|
rankers/fact_ranker.py
|
rubencart/LIIR-TextGraphs-14
|
272849e74ef16f1499249048a0502e6e2236756d
|
[
"MIT"
] | null | null | null |
rankers/fact_ranker.py
|
rubencart/LIIR-TextGraphs-14
|
272849e74ef16f1499249048a0502e6e2236756d
|
[
"MIT"
] | 1
|
2021-03-23T02:31:09.000Z
|
2021-03-23T02:31:09.000Z
|
from abc import ABC
class FactRanker(ABC):
def train(self, *args):
raise NotImplementedError
def evaluate(self, *args):
raise NotImplementedError
| 15.818182
| 33
| 0.672414
| 19
| 174
| 6.157895
| 0.631579
| 0.136752
| 0.222222
| 0.547009
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.252874
| 174
| 10
| 34
| 17.4
| 0.9
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
fcc3242c3136113fff30edf70bd228ac11f48f30
| 212
|
py
|
Python
|
test/AllPaths/conftest.py
|
rustam-azimov/CFPQ_PyAlgo
|
1f40c300a2dfeded5297ca48d0ddde26cfa8887c
|
[
"Apache-2.0"
] | 11
|
2020-08-16T15:29:32.000Z
|
2022-01-26T12:45:39.000Z
|
test/AllPaths/conftest.py
|
rustam-azimov/CFPQ_PyAlgo
|
1f40c300a2dfeded5297ca48d0ddde26cfa8887c
|
[
"Apache-2.0"
] | 4
|
2021-02-10T13:35:54.000Z
|
2021-06-04T07:14:32.000Z
|
test/AllPaths/conftest.py
|
rustam-azimov/CFPQ_PyAlgo
|
1f40c300a2dfeded5297ca48d0ddde26cfa8887c
|
[
"Apache-2.0"
] | 3
|
2020-06-27T07:59:31.000Z
|
2020-07-11T14:46:08.000Z
|
import pytest
from src.problems.AllPaths.algo.tensor.tensor import TensorSimpleAlgo, TensorDynamicAlgo
@pytest.fixture(params=[TensorSimpleAlgo, TensorDynamicAlgo])
def algo(request):
return request.param
| 23.555556
| 88
| 0.820755
| 23
| 212
| 7.565217
| 0.695652
| 0.37931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09434
| 212
| 8
| 89
| 26.5
| 0.90625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0.2
| 0.8
| 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
| 1
| 0
| 0
|
0
| 5
|
fce39eb23c89747ec92c0a98a117536343924c23
| 1,298
|
py
|
Python
|
sparkUtils.py
|
VulcanoAhab/waybackeess
|
141c6535849c446494409020e8fc866be6fc09db
|
[
"MIT"
] | null | null | null |
sparkUtils.py
|
VulcanoAhab/waybackeess
|
141c6535849c446494409020e8fc866be6fc09db
|
[
"MIT"
] | null | null | null |
sparkUtils.py
|
VulcanoAhab/waybackeess
|
141c6535849c446494409020e8fc866be6fc09db
|
[
"MIT"
] | null | null | null |
import logging
from pyspark import SparkContext, SparkConf
class SparkDo:
"""
"""
_appName=None
@classmethod
def setAppName(cls, name):
"""
"""
cls._appName=name
@classmethod
def devContext(cls):
"""
"""
_conf = SparkConf()
_conf.set("spark.executor.memory", "1g")
_conf.set("spark.app.name", cls._appName)
_sc = SparkContext(conf=_conf, pyFiles=[
"snapSparkProcessor.py",
"sparkUtils.py"
])
#quiet context
logger = logging.getLogger('py4j')
logger.setLevel(logging.WARN)
return _sc
@classmethod
def devTestContext(cls):
"""
"""
_conf = SparkConf()
_conf.set("spark.executor.memory", "1g")
_conf.set("spark.app.name", cls._appName)
_sc = SparkContext(conf=_conf, pyFiles=[
"../snapSparkProcessor.py",
"../sparkUtils.py",
])
#quiet context
logger = logging.getLogger('py4j')
logger.setLevel(logging.WARN)
return _sc
| 26.489796
| 68
| 0.459938
| 99
| 1,298
| 5.868687
| 0.373737
| 0.048193
| 0.082616
| 0.068847
| 0.70568
| 0.70568
| 0.70568
| 0.70568
| 0.70568
| 0.70568
| 0
| 0.005391
| 0.428351
| 1,298
| 48
| 69
| 27.041667
| 0.777628
| 0.020031
| 0
| 0.612903
| 0
| 0
| 0.128501
| 0.071664
| 0
| 0
| 0
| 0
| 0
| 1
| 0.096774
| false
| 0
| 0.064516
| 0
| 0.290323
| 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
|
fcee168a77fbe5bc8d53771338a9476f98b3aca2
| 5,832
|
py
|
Python
|
simpletransformers/metrics/eval_faq.py
|
getoutreach/simpletransformers
|
071f9f709891d6c8ba6da6af54bf4a378008e729
|
[
"Apache-2.0"
] | null | null | null |
simpletransformers/metrics/eval_faq.py
|
getoutreach/simpletransformers
|
071f9f709891d6c8ba6da6af54bf4a378008e729
|
[
"Apache-2.0"
] | null | null | null |
simpletransformers/metrics/eval_faq.py
|
getoutreach/simpletransformers
|
071f9f709891d6c8ba6da6af54bf4a378008e729
|
[
"Apache-2.0"
] | null | null | null |
from simpletransformers.metrics.ranking_metrics import MAP, MRR, NDCG, Prec, Recall, F1
import numpy as np
import sys
def print_metrics(metrics, f=sys.stdout):
print('MRR = %.4f, MAP = %.4f, NDCG = %.4f' % (metrics['MRR'], metrics['MAP'], metrics['NDCG']), file=f)
print('P@5 = %.4f, R@5 = %.4f, F1@5 = %.4f' % (metrics['P@5'], metrics['R@5'], metrics['F1@5']), file=f)
print('P@10 = %.4f, R@10 = %.4f, F1@10 = %.4f' % (metrics['P@10'], metrics['R@10'], metrics['F1@10']), file=f)
def faq_evaluate(model, df_eval_input, mode='dev'):
if 'text' in df_eval_input.columns:
# This is evaluated as a 'classification' task
predictions, raw_outputs = model.predict(df_eval_input['text'], mode=mode)
labels = np.array(list(df_eval_input['labels']))
# predictions = np.array(predictions)
elif 'text_a' in df_eval_input.columns and 'text_b' in df_eval_input.columns \
and 'addfeatures' not in df_eval_input.columns and 'url_id' not in df_eval_input.columns:
# This is evaluated as a 'sentence pair' matching task
predictions, raw_outputs = model.predict(list(map(
list, zip(df_eval_input['text_a'], df_eval_input['text_b']))), mode=mode)
df_eval = df_eval_input.copy()
df_eval['predictions'] = predictions
df_eval['scores'] = raw_outputs[:, 1]
# Transfering the results back from pairwise binary classification to ranking
labels, predictions, raw_outputs = [], [], []
for _, df in df_eval.groupby(by='reps_response_id'):
# All lines should share the same "url_labels"
assert all([x == df.iloc[0]['url_labels'] for x in df['url_labels']])
# "url_labels" should be recovered from individual "labels"
assert set(list(df[df['labels'] == 1]['url'])) == set(df.iloc[0]['url_labels'])
labels.append(list(df['labels']))
# predictions.append(list(df['predictions']))
raw_outputs.append(list(df['scores']))
# predictions = np.array(predictions)
raw_outputs = np.array(raw_outputs)
labels = np.array(labels)
elif 'text_a' in df_eval_input.columns and 'text_b' in df_eval_input.columns \
and 'addfeatures' in df_eval_input.columns:
# This is evaluated as a 'sentence pair' matching task
predictions, raw_outputs = model.predict(list(map(
list, zip(df_eval_input['text_a'], df_eval_input['text_b'], df_eval_input['addfeatures']))), mode=mode)
df_eval = df_eval_input.copy()
df_eval['predictions'] = predictions
df_eval['scores'] = raw_outputs[:, 1]
# Transfering the results back from pairwise binary classification to ranking
labels, predictions, raw_outputs = [], [], []
for _, df in df_eval.groupby(by='reps_response_id'):
# All lines should share the same "url_labels"
assert all([x == df.iloc[0]['url_labels'] for x in df['url_labels']])
# "url_labels" should be recovered from individual "labels"
assert set(list(df[df['labels'] == 1]['url'])) == set(df.iloc[0]['url_labels'])
labels.append(list(df['labels']))
# predictions.append(list(df['predictions']))
raw_outputs.append(list(df['scores']))
# predictions = np.array(predictions)
raw_outputs = np.array(raw_outputs)
labels = np.array(labels)
elif 'text_a' in df_eval_input.columns and 'text_b' in df_eval_input.columns \
and 'url_id' in df_eval_input.columns:
# This is evaluated as a 'sentence pair' matching task
predictions, raw_outputs = model.predict(list(map(
list, zip(df_eval_input['text_a'], df_eval_input['text_b'], df_eval_input['url_id']))), mode=mode)
df_eval = df_eval_input.copy()
df_eval['predictions'] = predictions
df_eval['scores'] = raw_outputs[:, 1]
# Transfering the results back from pairwise binary classification to ranking
labels, predictions, raw_outputs = [], [], []
for _, df in df_eval.groupby(by='reps_response_id'):
# All lines should share the same "url_labels"
assert all([x == df.iloc[0]['url_labels'] for x in df['url_labels']])
# "url_labels" should be recovered from individual "labels"
assert set(list(df[df['labels'] == 1]['url'])) == set(df.iloc[0]['url_labels'])
labels.append(list(df['labels']))
# predictions.append(list(df['predictions']))
raw_outputs.append(list(df['scores']))
# predictions = np.array(predictions)
raw_outputs = np.array(raw_outputs)
labels = np.array(labels)
else:
raise ValueError(f'FAQ evaluation mode not defined.')
# Evaluation metrics
pos_idx = [_.nonzero()[0].tolist() for _ in labels]
rank_idx = np.flip(np.argsort(raw_outputs, axis=1), axis=1).tolist()
mrrs = [MRR(x, y) for x, y in zip(pos_idx, rank_idx)]
maps = [MAP(x, y) for x, y in zip(pos_idx, rank_idx)]
ndcgs = [NDCG(x, y) for x, y in zip(pos_idx, rank_idx)]
p_5 = [Prec(x, y, 5) for x, y in zip(pos_idx, rank_idx)]
r_5 = [Recall(x, y, 5) for x, y in zip(pos_idx, rank_idx)]
f1_5 = [F1(x, y, 5) for x, y in zip(pos_idx, rank_idx)]
p_10 = [Prec(x, y, 10) for x, y in zip(pos_idx, rank_idx)]
r_10 = [Recall(x, y, 10) for x, y in zip(pos_idx, rank_idx)]
f1_10 = [F1(x, y, 10) for x, y in zip(pos_idx, rank_idx)]
metrics = {
'MRR': np.mean(mrrs),
'MAP': np.mean(maps),
'NDCG': np.mean(ndcgs),
'P@5': np.mean(p_5),
'R@5': np.mean(r_5),
'F1@5': np.mean(f1_5),
'P@10': np.mean(p_10),
'R@10': np.mean(r_10),
'F1@10': np.mean(f1_10),
}
return metrics, raw_outputs, rank_idx
| 52.540541
| 115
| 0.614026
| 865
| 5,832
| 3.954913
| 0.126012
| 0.064893
| 0.080386
| 0.041801
| 0.766735
| 0.766735
| 0.754165
| 0.754165
| 0.744519
| 0.744519
| 0
| 0.020367
| 0.233882
| 5,832
| 111
| 116
| 52.540541
| 0.7453
| 0.177469
| 0
| 0.481481
| 0
| 0
| 0.126466
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 1
| 0.024691
| false
| 0
| 0.037037
| 0
| 0.074074
| 0.049383
| 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
|
1e10c8dc1b1bf1ca8c953abfc64a63aa5b53035b
| 106
|
py
|
Python
|
Lib/site-packages/openpyxl/comments/__init__.py
|
percevalm/aumyproject
|
b24b38005188ce9dd41ed663cf54dad5464afef3
|
[
"bzip2-1.0.6"
] | 1
|
2019-12-15T01:44:17.000Z
|
2019-12-15T01:44:17.000Z
|
Lib/site-packages/openpyxl/comments/__init__.py
|
percevalm/aumyproject
|
b24b38005188ce9dd41ed663cf54dad5464afef3
|
[
"bzip2-1.0.6"
] | 16
|
2020-03-24T17:30:37.000Z
|
2022-03-11T23:57:41.000Z
|
Lib/site-packages/openpyxl/comments/__init__.py
|
percevalm/aumyproject
|
b24b38005188ce9dd41ed663cf54dad5464afef3
|
[
"bzip2-1.0.6"
] | null | null | null |
from __future__ import absolute_import
# Copyright (c) 2010-2017 openpyxl
from .comments import Comment
| 17.666667
| 38
| 0.811321
| 14
| 106
| 5.785714
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 0.141509
| 106
| 5
| 39
| 21.2
| 0.802198
| 0.301887
| 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
|
1e382aa4abfa26fa6a4f1e75e00ec559e8f09d67
| 757
|
gyp
|
Python
|
binding.gyp
|
dpnishant/Modsecurity-nodejs
|
44f37c20150f36df56a39cb9e8dff5376177578e
|
[
"MIT"
] | null | null | null |
binding.gyp
|
dpnishant/Modsecurity-nodejs
|
44f37c20150f36df56a39cb9e8dff5376177578e
|
[
"MIT"
] | null | null | null |
binding.gyp
|
dpnishant/Modsecurity-nodejs
|
44f37c20150f36df56a39cb9e8dff5376177578e
|
[
"MIT"
] | null | null | null |
{
"targets": [
{
"target_name": "modsecurity",
"sources": [ "modsecurity_wrap.cxx" ],
"include_dirs": ['usr/local/modsecurity/include/modsecurity',],
"libraries": ['/usr/local/modsecurity/lib/libmodsecurity.a',
'/usr/local/modsecurity/lib/libmodsecurity.dylib',
'/usr/local/modsecurity/lib/libmodsecurity.la',
'/usr/local/modsecurity/lib/libmodsecurity.3.dylib'
'/usr/lib/libxml2.dylib',
'/usr/lib/libcurl.dylib',
'/usr/local/lib/libpcre.dylib',
'/usr/local/lib/libyajl.dylib',
'/usr/local/lib/libGeoIP.dylib',
'/usr/local/lib/liblmdb.dylib'],
"cflags" : [ "-std=c++11" ],
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ]
}
]
}
| 32.913043
| 69
| 0.598415
| 80
| 757
| 5.6125
| 0.3875
| 0.160356
| 0.211581
| 0.195991
| 0.320713
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006557
| 0.194188
| 757
| 22
| 70
| 34.409091
| 0.729508
| 0
| 0
| 0
| 0
| 0
| 0.688243
| 0.503303
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1e42e03b17e296fca0605634dcb6a935c369edb5
| 1,296
|
py
|
Python
|
shopify/orders/tests/test_lineItem.py
|
alikhan126/python-shopify-api
|
656cdf1af99485b25be545e2ed527bcb653076fd
|
[
"Unlicense"
] | 10
|
2016-12-29T06:53:21.000Z
|
2022-03-01T10:35:32.000Z
|
shopify/orders/tests/test_lineItem.py
|
alikhan126/python-shopify-api
|
656cdf1af99485b25be545e2ed527bcb653076fd
|
[
"Unlicense"
] | 4
|
2016-12-30T15:12:47.000Z
|
2021-07-24T07:14:20.000Z
|
shopify/orders/tests/test_lineItem.py
|
alikhan126/python-shopify-api
|
656cdf1af99485b25be545e2ed527bcb653076fd
|
[
"Unlicense"
] | 8
|
2016-12-29T19:13:39.000Z
|
2022-03-22T18:02:58.000Z
|
from unittest import TestCase
class TestLineItem(TestCase):
def test_variant_id(self):
self.fail()
def test_title(self):
self.fail()
def test_quantity(self):
self.fail()
def test_price(self):
self.fail()
def test_grams(self):
self.fail()
def test_sku(self):
self.fail()
def test_variant_title(self):
self.fail()
def test_vendor(self):
self.fail()
def test_fulfillment_service(self):
self.fail()
def test_product_id(self):
self.fail()
def test_requires_shipping(self):
self.fail()
def test_taxable(self):
self.fail()
def test_gift_card(self):
self.fail()
def test_name(self):
self.fail()
def test_variant_inventory_management(self):
self.fail()
def test_properties(self):
self.fail()
def test_product_exists(self):
self.fail()
def test_fulfillable_quantity(self):
self.fail()
def test_total_discount(self):
self.fail()
def test_fulfillment_status(self):
self.fail()
def test_tax_lines(self):
self.fail()
def test_origin_location(self):
self.fail()
def test_destination_location(self):
self.fail()
| 17.753425
| 48
| 0.601852
| 160
| 1,296
| 4.6375
| 0.25
| 0.216981
| 0.371968
| 0.444744
| 0.671159
| 0.415094
| 0
| 0
| 0
| 0
| 0
| 0
| 0.289352
| 1,296
| 72
| 49
| 18
| 0.805646
| 0
| 0
| 0.479167
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.479167
| false
| 0
| 0.020833
| 0
| 0.520833
| 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
|
1e630e3c1c8eed6a1dced9124d912532a6d4efa4
| 100
|
py
|
Python
|
flexlate/__init__.py
|
nickderobertis/flexlate
|
81d6dbc2d87219a2a89266d6e8fb03310a24a3a1
|
[
"MIT"
] | null | null | null |
flexlate/__init__.py
|
nickderobertis/flexlate
|
81d6dbc2d87219a2a89266d6e8fb03310a24a3a1
|
[
"MIT"
] | 25
|
2021-12-05T18:57:53.000Z
|
2022-03-29T13:45:47.000Z
|
flexlate/__init__.py
|
nickderobertis/flexlate
|
81d6dbc2d87219a2a89266d6e8fb03310a24a3a1
|
[
"MIT"
] | null | null | null |
"""
A composable, maintainable system for managing templates
"""
from flexlate.main import Flexlate
| 20
| 56
| 0.79
| 12
| 100
| 6.583333
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13
| 100
| 4
| 57
| 25
| 0.908046
| 0.56
| 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
|
1e7b5bb5d9ac2ec19f2a5b7d52cb4aff6171f74b
| 118
|
py
|
Python
|
src/domain/pipeline/Pipeline.py
|
lorenzomartino86/anomaly-detector
|
46f4f059ac9f36820fb6d5b5cf823a992013ffda
|
[
"Apache-2.0"
] | 1
|
2020-07-06T14:09:33.000Z
|
2020-07-06T14:09:33.000Z
|
src/domain/pipeline/Pipeline.py
|
lorenzomartino86/anomaly-detector
|
46f4f059ac9f36820fb6d5b5cf823a992013ffda
|
[
"Apache-2.0"
] | null | null | null |
src/domain/pipeline/Pipeline.py
|
lorenzomartino86/anomaly-detector
|
46f4f059ac9f36820fb6d5b5cf823a992013ffda
|
[
"Apache-2.0"
] | null | null | null |
from abc import abstractmethod
class Pipeline:
@abstractmethod
def detect(self, train_raw, test_raw): pass
| 14.75
| 47
| 0.745763
| 15
| 118
| 5.733333
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.194915
| 118
| 7
| 48
| 16.857143
| 0.905263
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
1ec04e5ba8b90b4f279342bedb225cc91fa9984c
| 158
|
py
|
Python
|
test.py
|
CN-Tower/funclib.py
|
7407fc4078a7eb2ac6595898ec0a3a0f1185e614
|
[
"MIT"
] | null | null | null |
test.py
|
CN-Tower/funclib.py
|
7407fc4078a7eb2ac6595898ec0a3a0f1185e614
|
[
"MIT"
] | null | null | null |
test.py
|
CN-Tower/funclib.py
|
7407fc4078a7eb2ac6595898ec0a3a0f1185e614
|
[
"MIT"
] | null | null | null |
import os
def test_funclib():
os.system('coverage run funclib.test.py')
os.system('coverage report -m')
if __name__=='__main__':
test_funclib()
| 17.555556
| 45
| 0.683544
| 22
| 158
| 4.454545
| 0.636364
| 0.22449
| 0.326531
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170886
| 158
| 8
| 46
| 19.75
| 0.748092
| 0
| 0
| 0
| 0
| 0
| 0.341772
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0
| 0.166667
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
94f31aadff8b7023504f9da7975f9f62965d8697
| 128
|
py
|
Python
|
vkapp/bot/models/__init__.py
|
ParuninPavel/lenta4_hack
|
6d3340201deadf5757e37ddd7cf5580b928d7bda
|
[
"MIT"
] | 1
|
2017-11-23T13:33:13.000Z
|
2017-11-23T13:33:13.000Z
|
vkapp/bot/models/__init__.py
|
ParuninPavel/lenta4_hack
|
6d3340201deadf5757e37ddd7cf5580b928d7bda
|
[
"MIT"
] | null | null | null |
vkapp/bot/models/__init__.py
|
ParuninPavel/lenta4_hack
|
6d3340201deadf5757e37ddd7cf5580b928d7bda
|
[
"MIT"
] | null | null | null |
from .users import Blogger, VKUser, Admin
from .news import News, AdminReview, Publication
from .balance import Income, Payment
| 32
| 48
| 0.804688
| 17
| 128
| 6.058824
| 0.705882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132813
| 128
| 3
| 49
| 42.666667
| 0.927928
| 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
|
a21e1936a95e1c7587aad6dae8b0ddca052e39af
| 184
|
py
|
Python
|
src/models/modules/__init__.py
|
ri-heme/mnist-classifier
|
be5e83d6a9c3e649a6291644a7ff4b7544fb1649
|
[
"MIT"
] | null | null | null |
src/models/modules/__init__.py
|
ri-heme/mnist-classifier
|
be5e83d6a9c3e649a6291644a7ff4b7544fb1649
|
[
"MIT"
] | null | null | null |
src/models/modules/__init__.py
|
ri-heme/mnist-classifier
|
be5e83d6a9c3e649a6291644a7ff4b7544fb1649
|
[
"MIT"
] | null | null | null |
__all__ = ["CNN", "Distiller", "ShallowNN"]
from src.models.modules.cnn import CNN
from src.models.modules.distiller import Distiller
from src.models.modules.shallow import ShallowNN
| 30.666667
| 50
| 0.793478
| 25
| 184
| 5.68
| 0.4
| 0.147887
| 0.274648
| 0.422535
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097826
| 184
| 5
| 51
| 36.8
| 0.855422
| 0
| 0
| 0
| 0
| 0
| 0.11413
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
bf73184d2dc7b742c1476d334333e57c234b4998
| 153
|
py
|
Python
|
secret/loss/__init__.py
|
LunarShen/SECRET
|
0f652e63ce760ece8690cbad013f0d9bdb341e84
|
[
"MIT"
] | null | null | null |
secret/loss/__init__.py
|
LunarShen/SECRET
|
0f652e63ce760ece8690cbad013f0d9bdb341e84
|
[
"MIT"
] | null | null | null |
secret/loss/__init__.py
|
LunarShen/SECRET
|
0f652e63ce760ece8690cbad013f0d9bdb341e84
|
[
"MIT"
] | null | null | null |
from __future__ import absolute_import
from .triplet import SoftTripletLoss, TripletLoss
from .crossentropy import CrossEntropyLabelSmooth, SoftEntropy
| 30.6
| 62
| 0.875817
| 15
| 153
| 8.6
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098039
| 153
| 4
| 63
| 38.25
| 0.934783
| 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
|
bf82481b4e96ee27fc93e2801b000eacaad0c7ac
| 58
|
py
|
Python
|
LEDController/__init__.py
|
tharrry/LEDController
|
b31eea2552360df9385729408f41179d7e59e5c1
|
[
"MIT"
] | null | null | null |
LEDController/__init__.py
|
tharrry/LEDController
|
b31eea2552360df9385729408f41179d7e59e5c1
|
[
"MIT"
] | null | null | null |
LEDController/__init__.py
|
tharrry/LEDController
|
b31eea2552360df9385729408f41179d7e59e5c1
|
[
"MIT"
] | null | null | null |
"""Initialize package."""
from .light import prettyLight
| 14.5
| 30
| 0.741379
| 6
| 58
| 7.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12069
| 58
| 3
| 31
| 19.333333
| 0.843137
| 0.327586
| 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
|
44c80e50e282972dbe6bea6e813411fa81fa8a03
| 1,120
|
py
|
Python
|
python/seldon_deploy_sdk/api/__init__.py
|
agrski/seldon-deploy-sdk
|
fc6c1e0157ad83a910eac0f108180c0e78f4fa46
|
[
"Apache-2.0"
] | null | null | null |
python/seldon_deploy_sdk/api/__init__.py
|
agrski/seldon-deploy-sdk
|
fc6c1e0157ad83a910eac0f108180c0e78f4fa46
|
[
"Apache-2.0"
] | null | null | null |
python/seldon_deploy_sdk/api/__init__.py
|
agrski/seldon-deploy-sdk
|
fc6c1e0157ad83a910eac0f108180c0e78f4fa46
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import
# flake8: noqa
# import apis into api package
from seldon_deploy_sdk.api.application_logs_api import ApplicationLogsApi
from seldon_deploy_sdk.api.batch_jobs_api import BatchJobsApi
from seldon_deploy_sdk.api.drift_detector_api import DriftDetectorApi
from seldon_deploy_sdk.api.environment_api import EnvironmentApi
from seldon_deploy_sdk.api.explain_api import ExplainApi
from seldon_deploy_sdk.api.git_ops_api import GitOpsApi
from seldon_deploy_sdk.api.inference_services_api import InferenceServicesApi
from seldon_deploy_sdk.api.kubernetes_resources_api import KubernetesResourcesApi
from seldon_deploy_sdk.api.loadtest_jobs_api import LoadtestJobsApi
from seldon_deploy_sdk.api.metrics_server_api import MetricsServerApi
from seldon_deploy_sdk.api.model_metadata_service_api import ModelMetadataServiceApi
from seldon_deploy_sdk.api.monitor_api import MonitorApi
from seldon_deploy_sdk.api.outlier_detector_api import OutlierDetectorApi
from seldon_deploy_sdk.api.predict_api import PredictApi
from seldon_deploy_sdk.api.seldon_deployments_api import SeldonDeploymentsApi
| 53.333333
| 84
| 0.903571
| 159
| 1,120
| 5.974843
| 0.327044
| 0.157895
| 0.252632
| 0.3
| 0.347368
| 0
| 0
| 0
| 0
| 0
| 0
| 0.000957
| 0.066964
| 1,120
| 20
| 85
| 56
| 0.908134
| 0.036607
| 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
|
7827d5c3c673bb2de55557e988e06279997b1d31
| 106
|
py
|
Python
|
report/admin.py
|
rafimuhammad01/donasi-covid-19-2
|
eee8fb28ce492639d900923c985bbb5e0a8ec07f
|
[
"Unlicense"
] | null | null | null |
report/admin.py
|
rafimuhammad01/donasi-covid-19-2
|
eee8fb28ce492639d900923c985bbb5e0a8ec07f
|
[
"Unlicense"
] | null | null | null |
report/admin.py
|
rafimuhammad01/donasi-covid-19-2
|
eee8fb28ce492639d900923c985bbb5e0a8ec07f
|
[
"Unlicense"
] | null | null | null |
from django.contrib import admin
from .models import Report
#register model
admin.site.register(Report)
| 17.666667
| 32
| 0.811321
| 15
| 106
| 5.733333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122642
| 106
| 5
| 33
| 21.2
| 0.924731
| 0.132075
| 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
|
782ecbea370a8fa8f7490ed1a5b6b957439c206f
| 262
|
py
|
Python
|
deepclr/models/__init__.py
|
mhorn11/deepclr
|
6ee21963a402776851950a51709eef849ff96b5f
|
[
"Apache-2.0"
] | 8
|
2020-12-01T21:22:01.000Z
|
2022-03-13T13:11:56.000Z
|
deepclr/models/__init__.py
|
mhorn11/deepclr
|
6ee21963a402776851950a51709eef849ff96b5f
|
[
"Apache-2.0"
] | null | null | null |
deepclr/models/__init__.py
|
mhorn11/deepclr
|
6ee21963a402776851950a51709eef849ff96b5f
|
[
"Apache-2.0"
] | null | null | null |
from .base import BaseModel, ModelInferenceHelper
from .build import build_model, load_trained_model, ModelType, store_models_code
__all__ = ['BaseModel', 'ModelInferenceHelper',
'build_model', 'load_trained_model', 'ModelType', 'store_models_code']
| 43.666667
| 81
| 0.778626
| 29
| 262
| 6.551724
| 0.482759
| 0.305263
| 0.147368
| 0.221053
| 0.526316
| 0.526316
| 0.526316
| 0.526316
| 0.526316
| 0
| 0
| 0
| 0.122137
| 262
| 5
| 82
| 52.4
| 0.826087
| 0
| 0
| 0
| 0
| 0
| 0.320611
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 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
| 0
| 0
|
0
| 5
|
787bb2dae8b10ee07379f2b8196d0d46e6b7bffa
| 72
|
py
|
Python
|
run.py
|
LuukJonko/climate_change_simulation
|
49edeb06b3129a3756b90edbe5d1a85847651a66
|
[
"MIT"
] | null | null | null |
run.py
|
LuukJonko/climate_change_simulation
|
49edeb06b3129a3756b90edbe5d1a85847651a66
|
[
"MIT"
] | 2
|
2020-10-08T10:00:05.000Z
|
2021-02-03T23:25:13.000Z
|
run.py
|
LuukJonko/climate_change_simulation
|
49edeb06b3129a3756b90edbe5d1a85847651a66
|
[
"MIT"
] | null | null | null |
if __name__ == '__main__':
from program import main
main.main()
| 18
| 28
| 0.652778
| 9
| 72
| 4.333333
| 0.666667
| 0.410256
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.236111
| 72
| 3
| 29
| 24
| 0.709091
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
1581ced1c8ebbc6f46e56dd94f63f8f126e5f6e4
| 101
|
py
|
Python
|
enthought/model/numeric_editor.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 3
|
2016-12-09T06:05:18.000Z
|
2018-03-01T13:00:29.000Z
|
enthought/model/numeric_editor.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 1
|
2020-12-02T00:51:32.000Z
|
2020-12-02T08:48:55.000Z
|
enthought/model/numeric_editor.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | null | null | null |
# proxy module
from __future__ import absolute_import
from blockcanvas.model.numeric_editor import *
| 25.25
| 46
| 0.851485
| 13
| 101
| 6.153846
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108911
| 101
| 3
| 47
| 33.666667
| 0.888889
| 0.118812
| 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
|
15a7b10807aa7d9e8cb0027cc620a8116fec4ab8
| 138
|
py
|
Python
|
pcap2har/http/__init__.py
|
s55-labs/pcap2har
|
c1b7a31aae6a5400d7d08df488981227eb5b4707
|
[
"BSD-2-Clause"
] | null | null | null |
pcap2har/http/__init__.py
|
s55-labs/pcap2har
|
c1b7a31aae6a5400d7d08df488981227eb5b4707
|
[
"BSD-2-Clause"
] | null | null | null |
pcap2har/http/__init__.py
|
s55-labs/pcap2har
|
c1b7a31aae6a5400d7d08df488981227eb5b4707
|
[
"BSD-2-Clause"
] | null | null | null |
from .common import Error
from .flow import Flow
from .message import Message
from .request import Request
from .response import Response
| 23
| 30
| 0.818841
| 20
| 138
| 5.65
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144928
| 138
| 5
| 31
| 27.6
| 0.957627
| 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
|
ec62cc311d4e2d0c2cfb73fdef3296f79bc288a4
| 374
|
py
|
Python
|
raft_asyncio/abc.py
|
aratz-lasa/py-raft
|
d9de8cf1f366c977cb5c69f1c06796ef09096322
|
[
"MIT"
] | null | null | null |
raft_asyncio/abc.py
|
aratz-lasa/py-raft
|
d9de8cf1f366c977cb5c69f1c06796ef09096322
|
[
"MIT"
] | null | null | null |
raft_asyncio/abc.py
|
aratz-lasa/py-raft
|
d9de8cf1f366c977cb5c69f1c06796ef09096322
|
[
"MIT"
] | null | null | null |
from abc import ABC, abstractmethod
class IRaftServer(ABC):
@abstractmethod
async def join_cluster(self, random_server):
pass
@abstractmethod
async def leave_cluster(self):
pass
@abstractmethod
async def remove_cluster_member(self, id):
pass
@abstractmethod
async def update_state(self, key, value):
pass
| 18.7
| 48
| 0.668449
| 42
| 374
| 5.809524
| 0.52381
| 0.311475
| 0.360656
| 0.319672
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.26738
| 374
| 19
| 49
| 19.684211
| 0.890511
| 0
| 0
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.285714
| 0.071429
| 0
| 0.142857
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
ecbe271cc9812157b92bbfb13f7572a0708763bf
| 161
|
py
|
Python
|
problems/function_3__multiplying_two_numbers.py
|
stereoabuse/codewars
|
d6437afaef38c3601903891b8b9cb0f84c108c54
|
[
"MIT"
] | null | null | null |
problems/function_3__multiplying_two_numbers.py
|
stereoabuse/codewars
|
d6437afaef38c3601903891b8b9cb0f84c108c54
|
[
"MIT"
] | null | null | null |
problems/function_3__multiplying_two_numbers.py
|
stereoabuse/codewars
|
d6437afaef38c3601903891b8b9cb0f84c108c54
|
[
"MIT"
] | null | null | null |
## Function 3 - multiplying two numbers
## 8 kyu
## https://www.codewars.com/kata/523b66342d0c301ae400003b
def multiply(x,y):
return x * y
| 17.888889
| 59
| 0.63354
| 20
| 161
| 5.1
| 0.9
| 0.039216
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.165289
| 0.248447
| 161
| 9
| 60
| 17.888889
| 0.677686
| 0.614907
| 0
| 0
| 0
| 0
| 0
| 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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.