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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
284161d2858570d19e2c34a719c9bc99319c3c20 | 90 | py | Python | get_CSV.py | skywalkerzhang/ECG-classifier | 5cd5db84f5bf2ad4b9309584cd636d69a43cc795 | [
"BSD-2-Clause"
] | null | null | null | get_CSV.py | skywalkerzhang/ECG-classifier | 5cd5db84f5bf2ad4b9309584cd636d69a43cc795 | [
"BSD-2-Clause"
] | null | null | null | get_CSV.py | skywalkerzhang/ECG-classifier | 5cd5db84f5bf2ad4b9309584cd636d69a43cc795 | [
"BSD-2-Clause"
] | null | null | null | import pandas as pd
import numpy as np
PR_pred_2 = np.load("../data/predict_label0.npz")
| 18 | 49 | 0.744444 | 17 | 90 | 3.764706 | 0.823529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025641 | 0.133333 | 90 | 4 | 50 | 22.5 | 0.794872 | 0 | 0 | 0 | 0 | 0 | 0.288889 | 0.288889 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
2882db7ee63ab4e2146415d4dd5dc7922be73079 | 142 | py | Python | polyaxon/api/projects/queries.py | elyase/polyaxon | 1c19f059a010a6889e2b7ea340715b2bcfa382a0 | [
"MIT"
] | null | null | null | polyaxon/api/projects/queries.py | elyase/polyaxon | 1c19f059a010a6889e2b7ea340715b2bcfa382a0 | [
"MIT"
] | null | null | null | polyaxon/api/projects/queries.py | elyase/polyaxon | 1c19f059a010a6889e2b7ea340715b2bcfa382a0 | [
"MIT"
] | null | null | null | from db.models.projects import Project
projects = Project.objects.select_related('user')
projects_details = projects.select_related('repo')
| 23.666667 | 50 | 0.809859 | 18 | 142 | 6.222222 | 0.666667 | 0.232143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.084507 | 142 | 5 | 51 | 28.4 | 0.861538 | 0 | 0 | 0 | 0 | 0 | 0.056338 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
9570ac784e22e35b94235df8d32c310457445d12 | 223 | py | Python | clusterresults/rundr7drw.py | rohinkumar/CorrelCalc | d7887448af8d3dc3170c00c0aae6ee2561b8a3d5 | [
"MIT"
] | null | null | null | clusterresults/rundr7drw.py | rohinkumar/CorrelCalc | d7887448af8d3dc3170c00c0aae6ee2561b8a3d5 | [
"MIT"
] | null | null | null | clusterresults/rundr7drw.py | rohinkumar/CorrelCalc | d7887448af8d3dc3170c00c0aae6ee2561b8a3d5 | [
"MIT"
] | null | null | null | from correlcalc import *
bins = np.arange(0.002,0.062,0.002)
corrdr7flcdmlsw=tpcf('/usr3/vstr/yrohin/Downloads/DR7-Full.ascii',bins,randfile='/usr3/vstr/yrohin/Downloads/random-DR7-Full.ascii',estimator='ls',weights=True)
| 44.6 | 160 | 0.775785 | 35 | 223 | 4.942857 | 0.685714 | 0.046243 | 0.16185 | 0.265896 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.079439 | 0.040359 | 223 | 4 | 161 | 55.75 | 0.728972 | 0 | 0 | 0 | 0 | 0 | 0.418919 | 0.40991 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 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 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
95796012c296ab0a99d1e2b78e492075802ee878 | 99 | py | Python | telefire.py | LeiShi1313/telefire | d4eb2ffc002d13b20161e49d3b19bf4668f54144 | [
"MIT"
] | 18 | 2020-01-08T18:50:55.000Z | 2022-02-10T12:43:14.000Z | telefire.py | LeiShi1313/telefire | d4eb2ffc002d13b20161e49d3b19bf4668f54144 | [
"MIT"
] | null | null | null | telefire.py | LeiShi1313/telefire | d4eb2ffc002d13b20161e49d3b19bf4668f54144 | [
"MIT"
] | 3 | 2020-07-03T05:33:42.000Z | 2022-02-10T12:42:41.000Z | import fire
from plugins.base import Commands
if __name__ == '__main__':
fire.Fire(Commands)
| 14.142857 | 33 | 0.737374 | 13 | 99 | 5 | 0.692308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.171717 | 99 | 6 | 34 | 16.5 | 0.792683 | 0 | 0 | 0 | 0 | 0 | 0.080808 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
958764c96c81cc63ec96f9d34f2e61ec49856c91 | 261 | py | Python | comcrawl/utils/__init__.py | akozlo/comcrawl | 3460fe6809679645cd174099d1578066b847ec1b | [
"MIT"
] | 118 | 2020-04-06T08:06:03.000Z | 2022-03-28T10:37:52.000Z | comcrawl/utils/__init__.py | MarkusSagen/comcrawl | a89236080c5e7f4ce6a2e0d39c5f59671f22181e | [
"MIT"
] | 29 | 2020-01-15T21:08:44.000Z | 2022-03-31T12:28:36.000Z | comcrawl/utils/__init__.py | MarkusSagen/comcrawl | a89236080c5e7f4ce6a2e0d39c5f59671f22181e | [
"MIT"
] | 20 | 2020-05-10T08:41:32.000Z | 2022-03-28T10:37:55.000Z | """This module contains utility functions used in the core class."""
from .download import download_multiple_results
from .initialization import fetch_available_indexes
from .multithreading import make_multithreaded
from .search import search_multiple_indexes
| 37.285714 | 68 | 0.854406 | 33 | 261 | 6.545455 | 0.69697 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.103448 | 261 | 6 | 69 | 43.5 | 0.923077 | 0.237548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
95930d69f5413b790bae3f5d5aac1565f01fbc8d | 19,157 | py | Python | tests/test_uri.py | t-8ch/rfc3986 | a66bb6b0c5d4c2c51b2ac0a93000309cf910c7d7 | [
"Apache-2.0"
] | null | null | null | tests/test_uri.py | t-8ch/rfc3986 | a66bb6b0c5d4c2c51b2ac0a93000309cf910c7d7 | [
"Apache-2.0"
] | null | null | null | tests/test_uri.py | t-8ch/rfc3986 | a66bb6b0c5d4c2c51b2ac0a93000309cf910c7d7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
from rfc3986.exceptions import InvalidAuthority, ResolutionError
from rfc3986.misc import URI_MATCHER
from rfc3986.uri import URIReference
valid_hosts = [
'[21DA:00D3:0000:2F3B:02AA:00FF:FE28:9C5A]', '[::1]',
'[21DA:D3:0:2F3B:2AA:FF:FE28:9C5A]', '[FE80::2AA:FF:FE9A:4CA2]',
'[FF02::2]', '[FF02:3::5]', '[FF02:0:0:0:0:0:0:2]',
'[FF02:30:0:0:0:0:0:5]', '127.0.0.1', 'www.example.com', 'localhost'
]
invalid_hosts = [
'[FF02::3::5]', # IPv6 can only have one ::
'[FADF:01]', # Not properly compacted (missing a :)
'localhost:80:80:80', # Too many ports
'256.256.256.256' # Invalid IPv4 Address
]
@pytest.fixture(params=valid_hosts)
def basic_uri(request):
return 'http://%s' % request.param
@pytest.fixture(params=valid_hosts)
def basic_uri_with_port(request):
return 'ftp://%s:21' % request.param
@pytest.fixture(params=valid_hosts)
def uri_with_port_and_userinfo(request):
return 'ssh://user:pass@%s:22' % request.param
@pytest.fixture(params=valid_hosts)
def basic_uri_with_path(request):
return 'http://%s/path/to/resource' % request.param
@pytest.fixture(params=valid_hosts)
def uri_with_path_and_query(request):
return 'http://%s/path/to/resource?key=value' % request.param
@pytest.fixture(params=valid_hosts)
def uri_with_everything(request):
return 'https://user:pass@%s:443/path/to/resource?key=value#fragment' % (
request.param)
@pytest.fixture(params=valid_hosts)
def relative_uri(request):
return '//%s' % request.param
@pytest.fixture
def absolute_path_uri():
return '/path/to/file'
@pytest.fixture(params=invalid_hosts)
def invalid_uri(request):
return 'https://%s' % request.param
@pytest.fixture
def scheme_and_path_uri():
return 'mailto:user@example.com'
class TestURIReferenceParsesURIs:
"""Tests for URIReference handling of URIs."""
def test_handles_basic_uri(self, basic_uri):
"""Test that URIReference can handle a simple URI."""
uri = URIReference.from_string(basic_uri)
assert uri.scheme == 'http'
assert uri.authority == basic_uri[7:] # len('http://')
assert uri.host == uri.authority
assert uri.path is None
assert uri.query is None
assert uri.fragment is None
assert uri.port is None
assert uri.userinfo is None
def test_handles_basic_uri_with_port(self, basic_uri_with_port):
"""Test that URIReference can handle a simple URI with a port."""
uri = URIReference.from_string(basic_uri_with_port)
assert uri.scheme == 'ftp'
assert uri.authority == basic_uri_with_port[6:] # len('ftp://')
assert uri.host != uri.authority
assert uri.port == '21'
assert uri.path is None
assert uri.query is None
assert uri.fragment is None
assert uri.userinfo is None
def test_handles_uri_with_port_and_userinfo(
self, uri_with_port_and_userinfo):
"""
Test that URIReference can handle a URI with a port and userinfo.
"""
uri = URIReference.from_string(uri_with_port_and_userinfo)
assert uri.scheme == 'ssh'
# 6 == len('ftp://')
assert uri.authority == uri_with_port_and_userinfo[6:]
assert uri.host != uri.authority
assert uri.port == '22'
assert uri.path is None
assert uri.query is None
assert uri.fragment is None
assert uri.userinfo == 'user:pass'
def test_handles_basic_uri_with_path(self, basic_uri_with_path):
"""Test that URIReference can handle a URI with a path."""
uri = URIReference.from_string(basic_uri_with_path)
assert uri.scheme == 'http'
assert basic_uri_with_path == (uri.scheme + '://' + uri.authority
+ uri.path)
assert uri.host == uri.authority
assert uri.path == '/path/to/resource'
assert uri.query is None
assert uri.fragment is None
assert uri.userinfo is None
assert uri.port is None
def test_handles_uri_with_path_and_query(self, uri_with_path_and_query):
"""
Test that URIReference can handle a URI with a path and query.
"""
uri = URIReference.from_string(uri_with_path_and_query)
assert uri.scheme == 'http'
assert uri.host == uri.authority
assert uri.path == '/path/to/resource'
assert uri.query == 'key=value'
assert uri.fragment is None
assert uri.userinfo is None
assert uri.port is None
def test_handles_uri_with_everything(self, uri_with_everything):
"""
Test that URIReference can handle and with everything in it.
"""
uri = URIReference.from_string(uri_with_everything)
assert uri.scheme == 'https'
assert uri.path == '/path/to/resource'
assert uri.query == 'key=value'
assert uri.fragment == 'fragment'
assert uri.userinfo == 'user:pass'
assert uri.port == '443'
def test_authority_info_raises_InvalidAuthority(self, invalid_uri):
"""Test that an invalid IPv6 is caught by authority_info()."""
uri = URIReference.from_string(invalid_uri)
with pytest.raises(InvalidAuthority):
uri.authority_info()
def test_attributes_catch_InvalidAuthority(self, invalid_uri):
"""Test that an invalid IPv6 is caught by authority_info()."""
uri = URIReference.from_string(invalid_uri)
assert uri.host is None
assert uri.userinfo is None
assert uri.port is None
def test_handles_relative_uri(self, relative_uri):
"""Test that URIReference can handle a relative URI."""
uri = URIReference.from_string(relative_uri)
assert uri.scheme is None
assert uri.authority == relative_uri[2:]
def test_handles_absolute_path_uri(self, absolute_path_uri):
"""Test that URIReference can handle a path-only URI."""
uri = URIReference.from_string(absolute_path_uri)
assert uri.path == absolute_path_uri
assert uri.authority_info() == {
'userinfo': None,
'host': None,
'port': None,
}
def test_handles_scheme_and_path_uri(self, scheme_and_path_uri):
"""Test that URIReference can handle a `scheme:path` URI."""
uri = URIReference.from_string(scheme_and_path_uri)
assert uri.path == 'user@example.com'
assert uri.scheme == 'mailto'
assert uri.query is None
assert uri.host is None
assert uri.port is None
assert uri.userinfo is None
assert uri.authority is None
class TestURIValidation:
# Valid URI tests
def test_basic_uri_is_valid(self, basic_uri):
uri = URIReference.from_string(basic_uri)
assert uri.is_valid() is True
def test_basic_uri_requiring_scheme(self, basic_uri):
uri = URIReference.from_string(basic_uri)
assert uri.is_valid(require_scheme=True) is True
def test_basic_uri_requiring_authority(self, basic_uri):
uri = URIReference.from_string(basic_uri)
assert uri.is_valid(require_authority=True) is True
def test_uri_with_everything_requiring_path(self, uri_with_everything):
uri = URIReference.from_string(uri_with_everything)
assert uri.is_valid(require_path=True) is True
def test_uri_with_everything_requiring_query(self, uri_with_everything):
uri = URIReference.from_string(uri_with_everything)
assert uri.is_valid(require_query=True) is True
def test_uri_with_everything_requiring_fragment(self,
uri_with_everything):
uri = URIReference.from_string(uri_with_everything)
assert uri.is_valid(require_fragment=True) is True
def test_basic_uri_with_port_is_valid(self, basic_uri_with_port):
uri = URIReference.from_string(basic_uri_with_port)
assert uri.is_valid() is True
def test_uri_with_port_and_userinfo_is_valid(self,
uri_with_port_and_userinfo):
uri = URIReference.from_string(uri_with_port_and_userinfo)
assert uri.is_valid() is True
def test_basic_uri_with_path_is_valid(self, basic_uri_with_path):
uri = URIReference.from_string(basic_uri_with_path)
assert uri.is_valid() is True
def test_uri_with_path_and_query_is_valid(self, uri_with_path_and_query):
uri = URIReference.from_string(uri_with_path_and_query)
assert uri.is_valid() is True
def test_uri_with_everything_is_valid(self, uri_with_everything):
uri = URIReference.from_string(uri_with_everything)
assert uri.is_valid() is True
def test_relative_uri_is_valid(self, relative_uri):
uri = URIReference.from_string(relative_uri)
assert uri.is_valid() is True
def test_absolute_path_uri_is_valid(self, absolute_path_uri):
uri = URIReference.from_string(absolute_path_uri)
assert uri.is_valid() is True
def test_scheme_and_path_uri_is_valid(self, scheme_and_path_uri):
uri = URIReference.from_string(scheme_and_path_uri)
assert uri.is_valid() is True
# Invalid URI tests
def test_invalid_uri_is_not_valid(self, invalid_uri):
uri = URIReference.from_string(invalid_uri)
assert uri.is_valid() is False
def test_invalid_scheme(self):
uri = URIReference('123', None, None, None, None)
assert uri.is_valid() is False
def test_invalid_path(self):
uri = URIReference(None, None, 'foo#bar', None, None)
assert uri.is_valid() is False
def test_invalid_query_component(self):
uri = URIReference(None, None, None, 'foo#bar', None)
assert uri.is_valid() is False
def test_invalid_fragment_component(self):
uri = URIReference(None, None, None, None, 'foo#bar')
assert uri.is_valid() is False
class TestURIReferenceUnsplits:
def test_basic_uri_unsplits(self, basic_uri):
uri = URIReference.from_string(basic_uri)
assert uri.unsplit() == basic_uri
def test_basic_uri_with_port_unsplits(self, basic_uri_with_port):
uri = URIReference.from_string(basic_uri_with_port)
assert uri.unsplit() == basic_uri_with_port
def test_uri_with_port_and_userinfo_unsplits(self,
uri_with_port_and_userinfo):
uri = URIReference.from_string(uri_with_port_and_userinfo)
assert uri.unsplit() == uri_with_port_and_userinfo
def test_basic_uri_with_path_unsplits(self, basic_uri_with_path):
uri = URIReference.from_string(basic_uri_with_path)
assert uri.unsplit() == basic_uri_with_path
def test_uri_with_path_and_query_unsplits(self, uri_with_path_and_query):
uri = URIReference.from_string(uri_with_path_and_query)
assert uri.unsplit() == uri_with_path_and_query
def test_uri_with_everything_unsplits(self, uri_with_everything):
uri = URIReference.from_string(uri_with_everything)
assert uri.unsplit() == uri_with_everything
def test_relative_uri_unsplits(self, relative_uri):
uri = URIReference.from_string(relative_uri)
assert uri.unsplit() == relative_uri
def test_absolute_path_uri_unsplits(self, absolute_path_uri):
uri = URIReference.from_string(absolute_path_uri)
assert uri.unsplit() == absolute_path_uri
def test_scheme_and_path_uri_unsplits(self, scheme_and_path_uri):
uri = URIReference.from_string(scheme_and_path_uri)
assert uri.unsplit() == scheme_and_path_uri
class TestURIReferenceComparesToStrings:
def test_basic_uri(self, basic_uri):
uri = URIReference.from_string(basic_uri)
assert uri == basic_uri
def test_basic_uri_with_port(self, basic_uri_with_port):
uri = URIReference.from_string(basic_uri_with_port)
assert uri == basic_uri_with_port
def test_uri_with_port_and_userinfo(self, uri_with_port_and_userinfo):
uri = URIReference.from_string(uri_with_port_and_userinfo)
assert uri == uri_with_port_and_userinfo
def test_basic_uri_with_path(self, basic_uri_with_path):
uri = URIReference.from_string(basic_uri_with_path)
assert uri == basic_uri_with_path
def test_uri_with_path_and_query(self, uri_with_path_and_query):
uri = URIReference.from_string(uri_with_path_and_query)
assert uri == uri_with_path_and_query
def test_uri_with_everything(self, uri_with_everything):
uri = URIReference.from_string(uri_with_everything)
assert uri == uri_with_everything
def test_relative_uri(self, relative_uri):
uri = URIReference.from_string(relative_uri)
assert uri == relative_uri
def test_absolute_path_uri(self, absolute_path_uri):
uri = URIReference.from_string(absolute_path_uri)
assert uri == absolute_path_uri
def test_scheme_and_path_uri(self, scheme_and_path_uri):
uri = URIReference.from_string(scheme_and_path_uri)
assert uri == scheme_and_path_uri
class TestURIReferenceComparesToTuples:
def to_tuple(self, uri):
return URI_MATCHER.match(uri).groups()
def test_basic_uri(self, basic_uri):
uri = URIReference.from_string(basic_uri)
assert uri == self.to_tuple(basic_uri)
def test_basic_uri_with_port(self, basic_uri_with_port):
uri = URIReference.from_string(basic_uri_with_port)
assert uri == self.to_tuple(basic_uri_with_port)
def test_uri_with_port_and_userinfo(self, uri_with_port_and_userinfo):
uri = URIReference.from_string(uri_with_port_and_userinfo)
assert uri == self.to_tuple(uri_with_port_and_userinfo)
def test_basic_uri_with_path(self, basic_uri_with_path):
uri = URIReference.from_string(basic_uri_with_path)
assert uri == self.to_tuple(basic_uri_with_path)
def test_uri_with_path_and_query(self, uri_with_path_and_query):
uri = URIReference.from_string(uri_with_path_and_query)
assert uri == self.to_tuple(uri_with_path_and_query)
def test_uri_with_everything(self, uri_with_everything):
uri = URIReference.from_string(uri_with_everything)
assert uri == self.to_tuple(uri_with_everything)
def test_relative_uri(self, relative_uri):
uri = URIReference.from_string(relative_uri)
assert uri == self.to_tuple(relative_uri)
def test_absolute_path_uri(self, absolute_path_uri):
uri = URIReference.from_string(absolute_path_uri)
assert uri == self.to_tuple(absolute_path_uri)
def test_scheme_and_path_uri(self, scheme_and_path_uri):
uri = URIReference.from_string(scheme_and_path_uri)
assert uri == self.to_tuple(scheme_and_path_uri)
def test_uri_comparison_raises_TypeError(basic_uri):
uri = URIReference.from_string(basic_uri)
with pytest.raises(TypeError):
uri == 1
class TestURIReferenceComparesToURIReferences:
def test_same_basic_uri(self, basic_uri):
uri = URIReference.from_string(basic_uri)
assert uri == uri
def test_different_basic_uris(self, basic_uri, basic_uri_with_port):
uri = URIReference.from_string(basic_uri)
assert (uri == URIReference.from_string(basic_uri_with_port)) is False
class TestURIReferenceIsAbsolute:
def test_basic_uris_are_absolute(self, basic_uri):
uri = URIReference.from_string(basic_uri)
assert uri.is_absolute() is True
def test_basic_uris_with_ports_are_absolute(self, basic_uri_with_port):
uri = URIReference.from_string(basic_uri_with_port)
assert uri.is_absolute() is True
def test_basic_uris_with_paths_are_absolute(self, basic_uri_with_path):
uri = URIReference.from_string(basic_uri_with_path)
assert uri.is_absolute() is True
def test_uri_with_everything_are_not_absolute(self, uri_with_everything):
uri = URIReference.from_string(uri_with_everything)
assert uri.is_absolute() is False
def test_absolute_paths_are_not_absolute_uris(self, absolute_path_uri):
uri = URIReference.from_string(absolute_path_uri)
assert uri.is_absolute() is False
# @pytest.fixture(params=[
# basic_uri, basic_uri_with_port, basic_uri_with_path,
# scheme_and_path_uri, uri_with_path_and_query
# ])
# @pytest.fixture(params=[absolute_path_uri, relative_uri])
class TestURIReferencesResolve:
def test_with_basic_and_relative_uris(self, basic_uri, relative_uri):
R = URIReference.from_string(relative_uri)
B = URIReference.from_string(basic_uri)
T = R.resolve_with(basic_uri)
assert T.scheme == B.scheme
assert T.host == R.host
assert T.path == R.path
def test_with_basic_and_absolute_path_uris(self, basic_uri,
absolute_path_uri):
R = URIReference.from_string(absolute_path_uri)
B = URIReference.from_string(basic_uri).normalize()
T = R.resolve_with(B)
assert T.scheme == B.scheme
assert T.host == B.host
assert T.path == R.path
def test_with_basic_uri_and_relative_path(self, basic_uri):
R = URIReference.from_string('foo/bar/bogus')
B = URIReference.from_string(basic_uri).normalize()
T = R.resolve_with(B)
assert T.scheme == B.scheme
assert T.host == B.host
assert T.path == '/' + R.path
def test_basic_uri_with_path_and_relative_path(self, basic_uri_with_path):
R = URIReference.from_string('foo/bar/bogus')
B = URIReference.from_string(basic_uri_with_path).normalize()
T = R.resolve_with(B)
assert T.scheme == B.scheme
assert T.host == B.host
index = B.path.rfind('/')
assert T.path == B.path[:index] + '/' + R.path
def test_uri_with_everything_raises_exception(self, uri_with_everything):
R = URIReference.from_string('foo/bar/bogus')
B = URIReference.from_string(uri_with_everything)
with pytest.raises(ResolutionError):
R.resolve_with(B)
def test_basic_uri_resolves_itself(self, basic_uri):
R = URIReference.from_string(basic_uri)
B = URIReference.from_string(basic_uri)
T = R.resolve_with(B)
assert T == B
def test_differing_schemes(self, basic_uri):
R = URIReference.from_string('https://example.com/path')
B = URIReference.from_string(basic_uri)
T = R.resolve_with(B)
assert T.scheme == R.scheme
def test_resolve_pathless_fragment(self, basic_uri):
R = URIReference.from_string('#fragment')
B = URIReference.from_string(basic_uri)
T = R.resolve_with(B)
assert T.path is None
assert T.fragment == 'fragment'
def test_resolve_pathless_query(self, basic_uri):
R = URIReference.from_string('?query')
B = URIReference.from_string(basic_uri)
T = R.resolve_with(B)
assert T.path is None
assert T.query == 'query'
| 37.71063 | 78 | 0.693271 | 2,645 | 19,157 | 4.678639 | 0.063138 | 0.074101 | 0.142222 | 0.125253 | 0.811313 | 0.754667 | 0.721859 | 0.664808 | 0.618667 | 0.576162 | 0 | 0.00887 | 0.217257 | 19,157 | 507 | 79 | 37.78501 | 0.816405 | 0.055384 | 0 | 0.482385 | 0 | 0.00271 | 0.041632 | 0.009072 | 0 | 0 | 0 | 0 | 0.352304 | 1 | 0.230352 | false | 0.01084 | 0.01084 | 0.02981 | 0.292683 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
95a523b39618c4299cea9ec9c3d00dc6ed140461 | 102 | py | Python | workspace/forms.py | CaptainVee/ace-1 | 28df10148fcf1d783aa60237e47d1704d75d55f8 | [
"MIT"
] | null | null | null | workspace/forms.py | CaptainVee/ace-1 | 28df10148fcf1d783aa60237e47d1704d75d55f8 | [
"MIT"
] | null | null | null | workspace/forms.py | CaptainVee/ace-1 | 28df10148fcf1d783aa60237e47d1704d75d55f8 | [
"MIT"
] | null | null | null | from django import forms
class ContributorForm(forms.Form):
email = forms.EmailField(max_length=100) | 25.5 | 41 | 0.813725 | 14 | 102 | 5.857143 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032609 | 0.098039 | 102 | 4 | 41 | 25.5 | 0.858696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
95b15254ad8fa473256624608bad69b8b2c7cbf2 | 34 | py | Python | other/m_solutions2019_a.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | other/m_solutions2019_a.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | other/m_solutions2019_a.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | n = int(input())
print((n-2)*180)
| 11.333333 | 16 | 0.558824 | 7 | 34 | 2.714286 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.133333 | 0.117647 | 34 | 2 | 17 | 17 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 4 |
95ca69ea1f3e42ed7e8196ead874df51cdb4f522 | 64 | py | Python | Rozwiazania-zadan/1_Podstawy/hello.py | bzglinicki/Programowanie-I-R | 02a63a44bb9eeea2aa7dbbb0ec18c0462d692ef0 | [
"MIT"
] | 2 | 2022-03-01T14:45:01.000Z | 2022-03-19T17:36:07.000Z | Rozwiazania-zadan/1_Podstawy/hello.py | bzglinicki/Programowanie-I-R | 02a63a44bb9eeea2aa7dbbb0ec18c0462d692ef0 | [
"MIT"
] | null | null | null | Rozwiazania-zadan/1_Podstawy/hello.py | bzglinicki/Programowanie-I-R | 02a63a44bb9eeea2aa7dbbb0ec18c0462d692ef0 | [
"MIT"
] | 1 | 2021-03-20T21:01:37.000Z | 2021-03-20T21:01:37.000Z | # Programowanie I R
# Pierwszy program
print("Witaj, świecie!") | 16 | 24 | 0.734375 | 8 | 64 | 5.875 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.140625 | 64 | 4 | 24 | 16 | 0.854545 | 0.53125 | 0 | 0 | 0 | 0 | 0.535714 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 4 |
95d4e7340066c56ba88b788f217bb30f14b00ef3 | 201 | py | Python | wd_cw04/zad3.py | kamil-lipinski/wizualizacja-danych | be774088a6039eab2ba6bba261216d8e84c052b8 | [
"MIT"
] | null | null | null | wd_cw04/zad3.py | kamil-lipinski/wizualizacja-danych | be774088a6039eab2ba6bba261216d8e84c052b8 | [
"MIT"
] | null | null | null | wd_cw04/zad3.py | kamil-lipinski/wizualizacja-danych | be774088a6039eab2ba6bba261216d8e84c052b8 | [
"MIT"
] | null | null | null | with open("zad3.txt", "w+") as plik:
plik.write(str(print("witaj")))
plik.write(str(print("hej")))
with open("zad3.txt", "r") as plik:
for linia in plik:
print(linia, end="") | 28.714286 | 37 | 0.562189 | 31 | 201 | 3.645161 | 0.548387 | 0.141593 | 0.212389 | 0.265487 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012739 | 0.218905 | 201 | 7 | 38 | 28.714286 | 0.707006 | 0 | 0 | 0 | 0 | 0 | 0.137755 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 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 | 0 | 0 | 0 | 1 | 0 | 4 |
95d76f6d567bfca1bfed4cdcd559ed4cb672b543 | 3,502 | py | Python | py/src/test_generate_test_global_tree.py | kaboosan/pathfinder | b3ee72c60db9a9685fb52167cd9cec088543b59c | [
"Apache-2.0",
"MIT"
] | 173 | 2021-11-25T11:52:06.000Z | 2022-03-31T15:19:35.000Z | py/src/test_generate_test_global_tree.py | kaboosan/pathfinder | b3ee72c60db9a9685fb52167cd9cec088543b59c | [
"Apache-2.0",
"MIT"
] | 90 | 2021-11-25T08:32:23.000Z | 2022-03-31T14:25:47.000Z | py/src/test_generate_test_global_tree.py | kaboosan/pathfinder | b3ee72c60db9a9685fb52167cd9cec088543b59c | [
"Apache-2.0",
"MIT"
] | 15 | 2021-11-25T13:43:21.000Z | 2022-03-28T00:45:55.000Z | from generate_test_global_tree import generate_root_and_nodes, parse_value, parse_bytes
import asyncio
def test_existing_example():
contract_address = parse_value(
"0x0797a50901fb5f57c8f231f5ce3b312851adc4b178dd557da00f6fd4d2dce006"
)
contract_hash = parse_bytes(
"0x02ff4903e17f87b298ded00c44bfeb22874c5f73be2ced8f1d9d9556fb509779"
)
contract_commitment_tree_root = parse_bytes(
"0x04fb440e8ca9b74fc12a22ebffe0bc0658206337897226117b985434c239c028"
)
(root, nodes) = asyncio.run(
generate_root_and_nodes(
[(contract_address, contract_hash, contract_commitment_tree_root)]
)
)
assert root == bytes.fromhex(
"07b3590ce37bfe958d1b1066e05969834e5cea6fca10724f62924523bdafc7ee"
)
assert len(nodes) == 2
cs_key = b"contract_state:" + bytes.fromhex(
"07161b591c893836263a64f2a7e0d829c92f6956148a60ce5e99a3f55c7973f3"
)
# we don't care about this contents; it's json but it's order is not stable
# so we cannot really do byte per byte equals
assert cs_key in nodes
pn_key = b"patricia_node:" + bytes.fromhex(
"07b3590ce37bfe958d1b1066e05969834e5cea6fca10724f62924523bdafc7ee"
)
assert nodes[pn_key] == bytes.fromhex(
"07161b591c893836263a64f2a7e0d829c92f6956148a60ce5e99a3f55c7973f30797a50901fb5f57c8f231f5ce3b312851adc4b178dd557da00f6fd4d2dce006fb"
)
def test_existing_example_of_two():
c_hash = bytes.fromhex(
"02ff4903e17f87b298ded00c44bfeb22874c5f73be2ced8f1d9d9556fb509779"
)
first_root = bytes.fromhex(
"0287ac1196abb9501ac540b88e74b6a2b9476903c3f7e85e71d573c997ce1e5b"
)
input = [
(
978257171231527130811587576456504820066317852047211009343890029541393479136,
c_hash,
first_root,
),
(
2216396239273623009628046076940816512923808178401142985552926513489037661413,
c_hash,
(0).to_bytes(32, "big"),
),
]
(root, nodes) = asyncio.run(generate_root_and_nodes(input))
assert root == bytes.fromhex(
"05b4ca9e1caff46ebf6416f6d7192a9e562a6cf193b4fe73c30bf7d8062f0e13"
)
assert len(nodes) == 5
expected_contract_states = [
"0624c583dc39acbe616dacfec32cc6daf56c754e645008cd58136db126525ba8",
"032226432c9e57372cb07542bb0c3b3f502e2784ccfd26deaa8dad398cecb5d4",
]
expected_pt_nodes = [
(
"0789650716d1a126a537fa5f32a3e794ce87347df439fbe862624064f13876c2",
"0624c583dc39acbe616dacfec32cc6daf56c754e645008cd58136db126525ba80229ac872a344da1032254ffe7b8f6324b436a761c7a63efa68bddfa63f8b5e0fa",
),
(
"02ffc18b80a602a01211f692ec5fb9a818b8fbe6271da8521f4fe4309ae96641",
"032226432c9e57372cb07542bb0c3b3f502e2784ccfd26deaa8dad398cecb5d400e66f91a1784d761964de85a8fd55f6cce24ff756262f9cbc404329bcf294e5fa",
),
(
"05b4ca9e1caff46ebf6416f6d7192a9e562a6cf193b4fe73c30bf7d8062f0e13",
"0789650716d1a126a537fa5f32a3e794ce87347df439fbe862624064f13876c202ffc18b80a602a01211f692ec5fb9a818b8fbe6271da8521f4fe4309ae96641",
),
]
for k in expected_contract_states:
k = b"contract_state:" + bytes.fromhex(k)
assert k in nodes
# same as before: don't look into value
for k, v in expected_pt_nodes:
k = b"patricia_node:" + bytes.fromhex(k)
v = bytes.fromhex(v)
assert nodes[k] == v
| 33.352381 | 145 | 0.724729 | 225 | 3,502 | 11.035556 | 0.417778 | 0.048329 | 0.018123 | 0.024164 | 0.072493 | 0.031414 | 0.031414 | 0.031414 | 0 | 0 | 0 | 0.385288 | 0.215877 | 3,502 | 104 | 146 | 33.673077 | 0.518937 | 0.04426 | 0 | 0.1375 | 1 | 0 | 0.443015 | 0.424768 | 0 | 0 | 0.059228 | 0 | 0.1 | 1 | 0.025 | false | 0 | 0.025 | 0 | 0.05 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
251b5339ab3b8643627eaf5e847fe96a53064228 | 25 | py | Python | data/studio21_generated/introductory/3287/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/3287/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/3287/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | def mouth_size(animal):
| 12.5 | 23 | 0.76 | 4 | 25 | 4.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.12 | 25 | 2 | 24 | 12.5 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
256dd9b126f8b01588bc14ccdea73af62a0b9bc4 | 556 | py | Python | static/imports.py | mindsy/mindsy-microservice-evaluation | 22f4314e2da8ac50094bdf7419c38b5a598fc955 | [
"MIT"
] | null | null | null | static/imports.py | mindsy/mindsy-microservice-evaluation | 22f4314e2da8ac50094bdf7419c38b5a598fc955 | [
"MIT"
] | null | null | null | static/imports.py | mindsy/mindsy-microservice-evaluation | 22f4314e2da8ac50094bdf7419c38b5a598fc955 | [
"MIT"
] | null | null | null | from models.person import PersonModel
from models.telephone import TelephoneModel
from models.psychologist import PsychologistModel
from models.hospital import HospitalModel
from models.psychologist_hospital import PsychologistHospitalModel
from models.accountable import AccountableModel
from models.patient import PatientModel
from models.pat_psycho_hosp import PatPsychoHospModel
from models.evaluation import EvaluationModel
from models.result import ResultModel
from models.evaluation_test import EvaluationTestModel
from models.test import TestModel
| 42.769231 | 66 | 0.892086 | 64 | 556 | 7.6875 | 0.421875 | 0.243902 | 0.089431 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.086331 | 556 | 12 | 67 | 46.333333 | 0.968504 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
256e2e7cd8edd45168bc2a01ab07d60b35e43b28 | 108 | py | Python | grr/client/grr_response_client/local/__init__.py | tsehori/grr | 048506f22f74642bfe61749069a45ddf496fdab3 | [
"Apache-2.0"
] | 1 | 2021-07-01T01:43:06.000Z | 2021-07-01T01:43:06.000Z | grr/client/grr_response_client/local/__init__.py | tsehori/grr | 048506f22f74642bfe61749069a45ddf496fdab3 | [
"Apache-2.0"
] | 44 | 2021-05-14T22:49:24.000Z | 2022-03-13T21:54:02.000Z | grr/client/grr_response_client/local/__init__.py | tsehori/grr | 048506f22f74642bfe61749069a45ddf496fdab3 | [
"Apache-2.0"
] | 1 | 2020-06-25T14:25:54.000Z | 2020-06-25T14:25:54.000Z | #!/usr/bin/env python
# Lint as: python3
"""This directory contains local site-specific implementations."""
| 27 | 66 | 0.75 | 14 | 108 | 5.785714 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010417 | 0.111111 | 108 | 3 | 67 | 36 | 0.833333 | 0.907407 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
c2536cff4bee85c6bd4f3c43fbd3cbbe6fbf87a3 | 228 | py | Python | movie_reviews/lower_capacity_model.py | slaily/deep-learning-bits | cb9ce7ec539efbdfcaa023d141466f919bd31b71 | [
"MIT"
] | null | null | null | movie_reviews/lower_capacity_model.py | slaily/deep-learning-bits | cb9ce7ec539efbdfcaa023d141466f919bd31b71 | [
"MIT"
] | null | null | null | movie_reviews/lower_capacity_model.py | slaily/deep-learning-bits | cb9ce7ec539efbdfcaa023d141466f919bd31b71 | [
"MIT"
] | null | null | null | from keras models
from keras layers
model = models.Sequential()
model.add(layers.Dense(4, activation='relu', input_shape=(10000,)))
model.add(layers.Dense(4, activation='relu'))
model.add(layers.Dense(1, activation='sigmoid')) | 28.5 | 67 | 0.754386 | 33 | 228 | 5.181818 | 0.484848 | 0.140351 | 0.245614 | 0.333333 | 0.397661 | 0.397661 | 0.397661 | 0 | 0 | 0 | 0 | 0.037915 | 0.074561 | 228 | 8 | 68 | 28.5 | 0.772512 | 0 | 0 | 0 | 0 | 0 | 0.065502 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
c287399e2b9fd431e4a029e3dc1eb5a8816d9aeb | 518 | py | Python | swingers/management/tests.py | jawaidm/pbs | 87f5c535c976d6a5eccbfbbf2073589b6e366d04 | [
"Apache-2.0"
] | null | null | null | swingers/management/tests.py | jawaidm/pbs | 87f5c535c976d6a5eccbfbbf2073589b6e366d04 | [
"Apache-2.0"
] | 12 | 2019-10-22T23:16:38.000Z | 2022-03-11T23:17:45.000Z | swingers/management/tests.py | jawaidm/pbs | 87f5c535c976d6a5eccbfbbf2073589b6e366d04 | [
"Apache-2.0"
] | 5 | 2019-12-19T06:18:42.000Z | 2022-01-07T01:16:18.000Z | from django.test import TestCase
class ManagementTests(TestCase):
def test_commands_can_be_found(self):
from swingers.management.commands.create_db import Command
from swingers.management.commands.deploy import Command
from swingers.management.commands.drop_create_db import Command
from swingers.management.commands.metrics import Command
from swingers.management.commands.quickdeploy import Command
from swingers.management.commands.syncdbmigrate import Command
| 43.166667 | 71 | 0.785714 | 60 | 518 | 6.666667 | 0.383333 | 0.18 | 0.33 | 0.45 | 0.5775 | 0.5775 | 0.255 | 0.255 | 0 | 0 | 0 | 0 | 0.166023 | 518 | 11 | 72 | 47.090909 | 0.925926 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0.777778 | 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 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
c28a098dd4a66b40df3f6ff05fe692b2fa702e2e | 103 | py | Python | lib/d2yabt/konvoy/check.py | jeffwhite530/d2yabt | ff70bc9e46f6d7238fdcc48bb2eff106b198270a | [
"BSD-3-Clause"
] | null | null | null | lib/d2yabt/konvoy/check.py | jeffwhite530/d2yabt | ff70bc9e46f6d7238fdcc48bb2eff106b198270a | [
"BSD-3-Clause"
] | null | null | null | lib/d2yabt/konvoy/check.py | jeffwhite530/d2yabt | ff70bc9e46f6d7238fdcc48bb2eff106b198270a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""This file contains the health check functions used on a Konvoy bundle.
"""
| 17.166667 | 73 | 0.718447 | 16 | 103 | 4.625 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011628 | 0.165049 | 103 | 5 | 74 | 20.6 | 0.848837 | 0.893204 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
c28d46ab138041711860dc8a1857ae2b2c4e56d8 | 245 | py | Python | capnp/lib/pickle_helper.py | p4l1ly/pycapnp | 73e83c91ee907fa1df7b3b3ab945a581238e755b | [
"BSD-2-Clause"
] | 188 | 2017-06-14T20:13:41.000Z | 2022-03-08T09:15:45.000Z | capnp/lib/pickle_helper.py | p4l1ly/pycapnp | 73e83c91ee907fa1df7b3b3ab945a581238e755b | [
"BSD-2-Clause"
] | 146 | 2017-06-10T05:57:02.000Z | 2022-03-09T15:13:20.000Z | capnp/lib/pickle_helper.py | p4l1ly/pycapnp | 73e83c91ee907fa1df7b3b3ab945a581238e755b | [
"BSD-2-Clause"
] | 67 | 2017-06-07T22:19:52.000Z | 2022-03-25T21:57:14.000Z | import capnp
def _struct_reducer(schema_id, data):
'Hack to deal with pypy not allowing reduce functions to be "built-in" methods (ie. compiled from a .pyx)'
return capnp._global_schema_parser.modules_by_id[schema_id].from_bytes(data)
| 35 | 110 | 0.77551 | 40 | 245 | 4.5 | 0.8 | 0.088889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 245 | 6 | 111 | 40.833333 | 0.857143 | 0.42449 | 0 | 0 | 0 | 0.25 | 0.42449 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
c2a2eb6568f767bca538cac40e581580baa35eac | 1,028 | py | Python | atm/tests/test_constants.py | moeyensj/atm | 0523600cf44423a1ef72ca40fff29bbfbe1281a8 | [
"BSD-3-Clause"
] | 10 | 2019-05-04T01:02:16.000Z | 2021-12-29T11:20:23.000Z | atm/tests/test_constants.py | moeyensj/atm | 0523600cf44423a1ef72ca40fff29bbfbe1281a8 | [
"BSD-3-Clause"
] | 22 | 2019-04-26T03:17:24.000Z | 2021-03-03T23:38:02.000Z | atm/tests/test_constants.py | moeyensj/atm | 0523600cf44423a1ef72ca40fff29bbfbe1281a8 | [
"BSD-3-Clause"
] | 2 | 2019-09-23T05:52:18.000Z | 2021-12-29T11:20:21.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import numpy as np
from astropy.constants import astropyconst20 as c
from ..constants import Constants
# Test speed of light is consistent with Astropy
def test_lightspeed():
np.testing.assert_equal(Constants.LIGHTSPEED, c.c.si.value)
# Test Planck's constant is consistent with Astropy
def test_planck():
np.testing.assert_equal(Constants.PLANCK, c.h.si.value)
# Test Boltzmann's constant is consistent with Astropy
def test_boltzmann():
np.testing.assert_equal(Constants.BOLTZMANN, c.k_B.si.value)
# Test Stefan-Boltzmann's constant is consistent with Astropy
def test_stefan_boltzmann():
np.testing.assert_equal(Constants.STEFAN_BOLTZMANN, c.sigma_sb.si.value)
# Test an AU is consistent with Astropy
def test_astronomical_unit():
np.testing.assert_equal(Constants.ASTRONOMICAL_UNIT, c.au.si.value)
# Test solar radius is consistent with Astropy
def test_constants_solar_radius():
np.testing.assert_equal(Constants.SOLAR_RADIUS, c.R_sun.si.value)
| 32.125 | 76 | 0.781128 | 157 | 1,028 | 4.974522 | 0.305732 | 0.09219 | 0.122919 | 0.176697 | 0.533931 | 0.385403 | 0.172855 | 0.172855 | 0.122919 | 0 | 0 | 0.003326 | 0.122568 | 1,028 | 31 | 77 | 33.16129 | 0.862528 | 0.325875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.4 | 1 | 0.4 | true | 0 | 0.2 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
c2ae55116e5210374421eea07dc6a370bf366431 | 22,873 | py | Python | cardboard/cards/sets/homelands.py | Julian/cardboard | 6ab676d04b38bf9b0d0c4a849364159947b8ea7f | [
"MIT"
] | 5 | 2015-03-23T10:25:40.000Z | 2021-05-29T06:00:40.000Z | cardboard/cards/sets/homelands.py | Julian/cardboard | 6ab676d04b38bf9b0d0c4a849364159947b8ea7f | [
"MIT"
] | null | null | null | cardboard/cards/sets/homelands.py | Julian/cardboard | 6ab676d04b38bf9b0d0c4a849364159947b8ea7f | [
"MIT"
] | 1 | 2019-02-17T14:45:29.000Z | 2019-02-17T14:45:29.000Z | from cardboard import types
from cardboard.ability import (
AbilityNotImplemented, spell, activated, triggered, static
)
from cardboard.cards import card, common, keywords, match
@card("Feroz's Ban")
def ferozs_ban(card, abilities):
def ferozs_ban():
return AbilityNotImplemented
return ferozs_ban,
@card("Dark Maze")
def dark_maze(card, abilities):
def dark_maze():
return AbilityNotImplemented
def dark_maze():
return AbilityNotImplemented
return dark_maze, dark_maze,
@card("Samite Alchemist")
def samite_alchemist(card, abilities):
def samite_alchemist():
return AbilityNotImplemented
return samite_alchemist,
@card("Grandmother Sengir")
def grandmother_sengir(card, abilities):
def grandmother_sengir():
return AbilityNotImplemented
return grandmother_sengir,
@card("Winter Sky")
def winter_sky(card, abilities):
def winter_sky():
return AbilityNotImplemented
return winter_sky,
@card("Memory Lapse")
def memory_lapse(card, abilities):
def memory_lapse():
return AbilityNotImplemented
return memory_lapse,
@card("Roots")
def roots(card, abilities):
def roots():
return AbilityNotImplemented
def roots():
return AbilityNotImplemented
def roots():
return AbilityNotImplemented
return roots, roots, roots,
@card("Joven's Tools")
def jovens_tools(card, abilities):
def jovens_tools():
return AbilityNotImplemented
return jovens_tools,
@card("Serra Aviary")
def serra_aviary(card, abilities):
def serra_aviary():
return AbilityNotImplemented
return serra_aviary,
@card("Baki's Curse")
def bakis_curse(card, abilities):
def bakis_curse():
return AbilityNotImplemented
return bakis_curse,
@card("Cemetery Gate")
def cemetery_gate(card, abilities):
def cemetery_gate():
return AbilityNotImplemented
def cemetery_gate():
return AbilityNotImplemented
return cemetery_gate, cemetery_gate,
@card("Hazduhr the Abbot")
def hazduhr_the_abbot(card, abilities):
def hazduhr_the_abbot():
return AbilityNotImplemented
return hazduhr_the_abbot,
@card("An-Havva Constable")
def anhavva_constable(card, abilities):
def anhavva_constable():
return AbilityNotImplemented
return anhavva_constable,
@card("Jinx")
def jinx(card, abilities):
def jinx():
return AbilityNotImplemented
def jinx():
return AbilityNotImplemented
return jinx, jinx,
@card("Serra Inquisitors")
def serra_inquisitors(card, abilities):
def serra_inquisitors():
return AbilityNotImplemented
return serra_inquisitors,
@card("Roterothopter")
def roterothopter(card, abilities):
def roterothopter():
return AbilityNotImplemented
def roterothopter():
return AbilityNotImplemented
return roterothopter, roterothopter,
@card("Aysen Bureaucrats")
def aysen_bureaucrats(card, abilities):
def aysen_bureaucrats():
return AbilityNotImplemented
return aysen_bureaucrats,
@card("Sengir Bats")
def sengir_bats(card, abilities):
def sengir_bats():
return AbilityNotImplemented
def sengir_bats():
return AbilityNotImplemented
return sengir_bats, sengir_bats,
@card("Wizards' School")
def wizards_school(card, abilities):
def wizards_school():
return AbilityNotImplemented
def wizards_school():
return AbilityNotImplemented
def wizards_school():
return AbilityNotImplemented
return wizards_school, wizards_school, wizards_school,
@card("Dry Spell")
def dry_spell(card, abilities):
def dry_spell():
return AbilityNotImplemented
return dry_spell,
@card("Hungry Mist")
def hungry_mist(card, abilities):
def hungry_mist():
return AbilityNotImplemented
return hungry_mist,
@card("Baron Sengir")
def baron_sengir(card, abilities):
def baron_sengir():
return AbilityNotImplemented
def baron_sengir():
return AbilityNotImplemented
def baron_sengir():
return AbilityNotImplemented
return baron_sengir, baron_sengir, baron_sengir,
@card("Serra Paladin")
def serra_paladin(card, abilities):
def serra_paladin():
return AbilityNotImplemented
def serra_paladin():
return AbilityNotImplemented
return serra_paladin, serra_paladin,
@card("Clockwork Swarm")
def clockwork_swarm(card, abilities):
def clockwork_swarm():
return AbilityNotImplemented
def clockwork_swarm():
return AbilityNotImplemented
def clockwork_swarm():
return AbilityNotImplemented
def clockwork_swarm():
return AbilityNotImplemented
return clockwork_swarm, clockwork_swarm, clockwork_swarm, clockwork_swarm,
@card("Shrink")
def shrink(card, abilities):
def shrink():
return AbilityNotImplemented
return shrink,
@card("Greater Werewolf")
def greater_werewolf(card, abilities):
def greater_werewolf():
return AbilityNotImplemented
return greater_werewolf,
@card("Rashka the Slayer")
def rashka_the_slayer(card, abilities):
def rashka_the_slayer():
return AbilityNotImplemented
def rashka_the_slayer():
return AbilityNotImplemented
return rashka_the_slayer, rashka_the_slayer,
@card("Ihsan's Shade")
def ihsans_shade(card, abilities):
def ihsans_shade():
return AbilityNotImplemented
return ihsans_shade,
@card("Daughter of Autumn")
def daughter_of_autumn(card, abilities):
def daughter_of_autumn():
return AbilityNotImplemented
return daughter_of_autumn,
@card("Feast of the Unicorn")
def feast_of_the_unicorn(card, abilities):
def feast_of_the_unicorn():
return AbilityNotImplemented
def feast_of_the_unicorn():
return AbilityNotImplemented
return feast_of_the_unicorn, feast_of_the_unicorn,
@card("Ambush Party")
def ambush_party(card, abilities):
def ambush_party():
return AbilityNotImplemented
return ambush_party,
@card("Black Carriage")
def black_carriage(card, abilities):
def black_carriage():
return AbilityNotImplemented
def black_carriage():
return AbilityNotImplemented
def black_carriage():
return AbilityNotImplemented
return black_carriage, black_carriage, black_carriage,
@card("Sengir Autocrat")
def sengir_autocrat(card, abilities):
def sengir_autocrat():
return AbilityNotImplemented
def sengir_autocrat():
return AbilityNotImplemented
return sengir_autocrat, sengir_autocrat,
@card("Anaba Spirit Crafter")
def anaba_spirit_crafter(card, abilities):
def anaba_spirit_crafter():
return AbilityNotImplemented
return anaba_spirit_crafter,
@card("Irini Sengir")
def irini_sengir(card, abilities):
def irini_sengir():
return AbilityNotImplemented
return irini_sengir,
@card("Leaping Lizard")
def leaping_lizard(card, abilities):
def leaping_lizard():
return AbilityNotImplemented
return leaping_lizard,
@card("Mesa Falcon")
def mesa_falcon(card, abilities):
def mesa_falcon():
return AbilityNotImplemented
def mesa_falcon():
return AbilityNotImplemented
return mesa_falcon, mesa_falcon,
@card("Wall of Kelp")
def wall_of_kelp(card, abilities):
def wall_of_kelp():
return AbilityNotImplemented
def wall_of_kelp():
return AbilityNotImplemented
return wall_of_kelp, wall_of_kelp,
@card("Spectral Bears")
def spectral_bears(card, abilities):
def spectral_bears():
return AbilityNotImplemented
return spectral_bears,
@card("Coral Reef")
def coral_reef(card, abilities):
def coral_reef():
return AbilityNotImplemented
def coral_reef():
return AbilityNotImplemented
def coral_reef():
return AbilityNotImplemented
return coral_reef, coral_reef, coral_reef,
@card("Orcish Mine")
def orcish_mine(card, abilities):
def orcish_mine():
return AbilityNotImplemented
def orcish_mine():
return AbilityNotImplemented
def orcish_mine():
return AbilityNotImplemented
return orcish_mine, orcish_mine, orcish_mine,
@card("Sea Troll")
def sea_troll(card, abilities):
def sea_troll():
return AbilityNotImplemented
return sea_troll,
@card("Folk of An-Havva")
def folk_of_anhavva(card, abilities):
def folk_of_anhavva():
return AbilityNotImplemented
return folk_of_anhavva,
@card("Ebony Rhino")
def ebony_rhino(card, abilities):
def ebony_rhino():
return AbilityNotImplemented
return ebony_rhino,
@card("Clockwork Steed")
def clockwork_steed(card, abilities):
def clockwork_steed():
return AbilityNotImplemented
def clockwork_steed():
return AbilityNotImplemented
def clockwork_steed():
return AbilityNotImplemented
def clockwork_steed():
return AbilityNotImplemented
return clockwork_steed, clockwork_steed, clockwork_steed, clockwork_steed,
@card("Reveka, Wizard Savant")
def reveka_wizard_savant(card, abilities):
def reveka_wizard_savant():
return AbilityNotImplemented
return reveka_wizard_savant,
@card("Root Spider")
def root_spider(card, abilities):
def root_spider():
return AbilityNotImplemented
return root_spider,
@card("Clockwork Gnomes")
def clockwork_gnomes(card, abilities):
def clockwork_gnomes():
return AbilityNotImplemented
return clockwork_gnomes,
@card("Didgeridoo")
def didgeridoo(card, abilities):
def didgeridoo():
return AbilityNotImplemented
return didgeridoo,
@card("Reef Pirates")
def reef_pirates(card, abilities):
def reef_pirates():
return AbilityNotImplemented
return reef_pirates,
@card("Rysorian Badger")
def rysorian_badger(card, abilities):
def rysorian_badger():
return AbilityNotImplemented
return rysorian_badger,
@card("Serra Bestiary")
def serra_bestiary(card, abilities):
def serra_bestiary():
return AbilityNotImplemented
def serra_bestiary():
return AbilityNotImplemented
def serra_bestiary():
return AbilityNotImplemented
return serra_bestiary, serra_bestiary, serra_bestiary,
@card("Joven")
def joven(card, abilities):
def joven():
return AbilityNotImplemented
return joven,
@card("Chain Stasis")
def chain_stasis(card, abilities):
def chain_stasis():
return AbilityNotImplemented
return chain_stasis,
@card("Giant Oyster")
def giant_oyster(card, abilities):
def giant_oyster():
return AbilityNotImplemented
def giant_oyster():
return AbilityNotImplemented
return giant_oyster, giant_oyster,
@card("Autumn Willow")
def autumn_willow(card, abilities):
def autumn_willow():
return AbilityNotImplemented
def autumn_willow():
return AbilityNotImplemented
return autumn_willow, autumn_willow,
@card("Abbey Matron")
def abbey_matron(card, abilities):
def abbey_matron():
return AbilityNotImplemented
return abbey_matron,
@card("Ghost Hounds")
def ghost_hounds(card, abilities):
def ghost_hounds():
return AbilityNotImplemented
def ghost_hounds():
return AbilityNotImplemented
return ghost_hounds, ghost_hounds,
@card("Leeches")
def leeches(card, abilities):
def leeches():
return AbilityNotImplemented
return leeches,
@card("Carapace")
def carapace(card, abilities):
def carapace():
return AbilityNotImplemented
def carapace():
return AbilityNotImplemented
def carapace():
return AbilityNotImplemented
return carapace, carapace, carapace,
@card("Headstone")
def headstone(card, abilities):
def headstone():
return AbilityNotImplemented
def headstone():
return AbilityNotImplemented
return headstone, headstone,
@card("Joven's Ferrets")
def jovens_ferrets(card, abilities):
def jovens_ferrets():
return AbilityNotImplemented
def jovens_ferrets():
return AbilityNotImplemented
return jovens_ferrets, jovens_ferrets,
@card("Drudge Spell")
def drudge_spell(card, abilities):
def drudge_spell():
return AbilityNotImplemented
def drudge_spell():
return AbilityNotImplemented
return drudge_spell, drudge_spell,
@card("Koskun Keep")
def koskun_keep(card, abilities):
def koskun_keep():
return AbilityNotImplemented
def koskun_keep():
return AbilityNotImplemented
def koskun_keep():
return AbilityNotImplemented
return koskun_keep, koskun_keep, koskun_keep,
@card("Marjhan")
def marjhan(card, abilities):
def marjhan():
return AbilityNotImplemented
def marjhan():
return AbilityNotImplemented
def marjhan():
return AbilityNotImplemented
def marjhan():
return AbilityNotImplemented
def marjhan():
return AbilityNotImplemented
return marjhan, marjhan, marjhan, marjhan, marjhan,
@card("Abbey Gargoyles")
def abbey_gargoyles(card, abilities):
def abbey_gargoyles():
return AbilityNotImplemented
return abbey_gargoyles,
@card("Prophecy")
def prophecy(card, abilities):
def prophecy():
return AbilityNotImplemented
def prophecy():
return AbilityNotImplemented
return prophecy, prophecy,
@card("Merchant Scroll")
def merchant_scroll(card, abilities):
def merchant_scroll():
return AbilityNotImplemented
return merchant_scroll,
@card("Willow Faerie")
def willow_faerie(card, abilities):
def willow_faerie():
return AbilityNotImplemented
return willow_faerie,
@card("An-Havva Township")
def anhavva_township(card, abilities):
def anhavva_township():
return AbilityNotImplemented
def anhavva_township():
return AbilityNotImplemented
def anhavva_township():
return AbilityNotImplemented
return anhavva_township, anhavva_township, anhavva_township,
@card("Dwarven Pony")
def dwarven_pony(card, abilities):
def dwarven_pony():
return AbilityNotImplemented
return dwarven_pony,
@card("Mammoth Harness")
def mammoth_harness(card, abilities):
def mammoth_harness():
return AbilityNotImplemented
def mammoth_harness():
return AbilityNotImplemented
def mammoth_harness():
return AbilityNotImplemented
return mammoth_harness, mammoth_harness, mammoth_harness,
@card("Broken Visage")
def broken_visage(card, abilities):
def broken_visage():
return AbilityNotImplemented
return broken_visage,
@card("Primal Order")
def primal_order(card, abilities):
def primal_order():
return AbilityNotImplemented
return primal_order,
@card("Castle Sengir")
def castle_sengir(card, abilities):
def castle_sengir():
return AbilityNotImplemented
def castle_sengir():
return AbilityNotImplemented
def castle_sengir():
return AbilityNotImplemented
return castle_sengir, castle_sengir, castle_sengir,
@card("Retribution")
def retribution(card, abilities):
def retribution():
return AbilityNotImplemented
return retribution,
@card("Serrated Arrows")
def serrated_arrows(card, abilities):
def serrated_arrows():
return AbilityNotImplemented
def serrated_arrows():
return AbilityNotImplemented
def serrated_arrows():
return AbilityNotImplemented
return serrated_arrows, serrated_arrows, serrated_arrows,
@card("Evaporate")
def evaporate(card, abilities):
def evaporate():
return AbilityNotImplemented
return evaporate,
@card("Sea Sprite")
def sea_sprite(card, abilities):
def sea_sprite():
return AbilityNotImplemented
return sea_sprite,
@card("Trade Caravan")
def trade_caravan(card, abilities):
def trade_caravan():
return AbilityNotImplemented
def trade_caravan():
return AbilityNotImplemented
return trade_caravan, trade_caravan,
@card("AEther Storm")
def aether_storm(card, abilities):
def aether_storm():
return AbilityNotImplemented
def aether_storm():
return AbilityNotImplemented
return aether_storm, aether_storm,
@card("Faerie Noble")
def faerie_noble(card, abilities):
def faerie_noble():
return AbilityNotImplemented
def faerie_noble():
return AbilityNotImplemented
def faerie_noble():
return AbilityNotImplemented
return faerie_noble, faerie_noble, faerie_noble,
@card("Giant Albatross")
def giant_albatross(card, abilities):
def giant_albatross():
return AbilityNotImplemented
def giant_albatross():
return AbilityNotImplemented
return giant_albatross, giant_albatross,
@card("Aliban's Tower")
def alibans_tower(card, abilities):
def alibans_tower():
return AbilityNotImplemented
return alibans_tower,
@card("Torture")
def torture(card, abilities):
def torture():
return AbilityNotImplemented
def torture():
return AbilityNotImplemented
return torture, torture,
@card("Mystic Decree")
def mystic_decree(card, abilities):
def mystic_decree():
return AbilityNotImplemented
return mystic_decree,
@card("Eron the Relentless")
def eron_the_relentless(card, abilities):
def eron_the_relentless():
return AbilityNotImplemented
def eron_the_relentless():
return AbilityNotImplemented
return eron_the_relentless, eron_the_relentless,
@card("Willow Priestess")
def willow_priestess(card, abilities):
def willow_priestess():
return AbilityNotImplemented
def willow_priestess():
return AbilityNotImplemented
return willow_priestess, willow_priestess,
@card("Anaba Ancestor")
def anaba_ancestor(card, abilities):
def anaba_ancestor():
return AbilityNotImplemented
return anaba_ancestor,
@card("Timmerian Fiends")
def timmerian_fiends(card, abilities):
def timmerian_fiends():
return AbilityNotImplemented
def timmerian_fiends():
return AbilityNotImplemented
return timmerian_fiends, timmerian_fiends,
@card("Anaba Bodyguard")
def anaba_bodyguard(card, abilities):
def anaba_bodyguard():
return AbilityNotImplemented
return anaba_bodyguard,
@card("Anaba Shaman")
def anaba_shaman(card, abilities):
def anaba_shaman():
return AbilityNotImplemented
return anaba_shaman,
@card("Apocalypse Chime")
def apocalypse_chime(card, abilities):
def apocalypse_chime():
return AbilityNotImplemented
return apocalypse_chime,
@card("Koskun Falls")
def koskun_falls(card, abilities):
def koskun_falls():
return AbilityNotImplemented
def koskun_falls():
return AbilityNotImplemented
return koskun_falls, koskun_falls,
@card("Aysen Crusader")
def aysen_crusader(card, abilities):
def aysen_crusader():
return AbilityNotImplemented
return aysen_crusader,
@card("Soraya the Falconer")
def soraya_the_falconer(card, abilities):
def soraya_the_falconer():
return AbilityNotImplemented
def soraya_the_falconer():
return AbilityNotImplemented
return soraya_the_falconer, soraya_the_falconer,
@card("Dwarven Sea Clan")
def dwarven_sea_clan(card, abilities):
def dwarven_sea_clan():
return AbilityNotImplemented
return dwarven_sea_clan,
@card("Beast Walkers")
def beast_walkers(card, abilities):
def beast_walkers():
return AbilityNotImplemented
return beast_walkers,
@card("Aysen Abbey")
def aysen_abbey(card, abilities):
def aysen_abbey():
return AbilityNotImplemented
def aysen_abbey():
return AbilityNotImplemented
def aysen_abbey():
return AbilityNotImplemented
return aysen_abbey, aysen_abbey, aysen_abbey,
@card("Chandler")
def chandler(card, abilities):
def chandler():
return AbilityNotImplemented
return chandler,
@card("Ambush")
def ambush(card, abilities):
def ambush():
return AbilityNotImplemented
return ambush,
@card("Renewal")
def renewal(card, abilities):
def renewal():
return AbilityNotImplemented
def renewal():
return AbilityNotImplemented
def renewal():
return AbilityNotImplemented
return renewal, renewal, renewal,
@card("Heart Wolf")
def heart_wolf(card, abilities):
def heart_wolf():
return AbilityNotImplemented
def heart_wolf():
return AbilityNotImplemented
return heart_wolf, heart_wolf,
@card("Death Speakers")
def death_speakers(card, abilities):
def death_speakers():
return AbilityNotImplemented
return death_speakers,
@card("Labyrinth Minotaur")
def labyrinth_minotaur(card, abilities):
def labyrinth_minotaur():
return AbilityNotImplemented
return labyrinth_minotaur,
@card("Truce")
def truce(card, abilities):
def truce():
return AbilityNotImplemented
return truce,
@card("An-Zerrin Ruins")
def anzerrin_ruins(card, abilities):
def anzerrin_ruins():
return AbilityNotImplemented
def anzerrin_ruins():
return AbilityNotImplemented
return anzerrin_ruins, anzerrin_ruins,
@card("An-Havva Inn")
def anhavva_inn(card, abilities):
def anhavva_inn():
return AbilityNotImplemented
return anhavva_inn,
@card("Narwhal")
def narwhal(card, abilities):
def narwhal():
return AbilityNotImplemented
return narwhal,
@card("Ironclaw Curse")
def ironclaw_curse(card, abilities):
def ironclaw_curse():
return AbilityNotImplemented
def ironclaw_curse():
return AbilityNotImplemented
def ironclaw_curse():
return AbilityNotImplemented
return ironclaw_curse, ironclaw_curse, ironclaw_curse,
@card("Aysen Highway")
def aysen_highway(card, abilities):
def aysen_highway():
return AbilityNotImplemented
return aysen_highway,
@card("Veldrane of Sengir")
def veldrane_of_sengir(card, abilities):
def veldrane_of_sengir():
return AbilityNotImplemented
return veldrane_of_sengir,
@card("Funeral March")
def funeral_march(card, abilities):
def funeral_march():
return AbilityNotImplemented
def funeral_march():
return AbilityNotImplemented
return funeral_march, funeral_march,
@card("Forget")
def forget(card, abilities):
def forget():
return AbilityNotImplemented
return forget, | 18.254589 | 78 | 0.707734 | 2,328 | 22,873 | 6.75988 | 0.08677 | 0.322552 | 0.115905 | 0.014869 | 0.312131 | 0.203025 | 0.173159 | 0.167186 | 0.146216 | 0.146216 | 0 | 0 | 0.213483 | 22,873 | 1,253 | 79 | 18.254589 | 0.874764 | 0 | 0 | 0.431535 | 0 | 0 | 0.063216 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.417704 | false | 0 | 0.004149 | 0.260028 | 0.839557 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 4 |
c2be4fc0a90454abf9ba0b97b35fb66112c379e1 | 198 | py | Python | reviews/serializer.py | wmalott23/Products_app | 691e156ed6f2607a257b18bc988c789013505ee1 | [
"MIT"
] | null | null | null | reviews/serializer.py | wmalott23/Products_app | 691e156ed6f2607a257b18bc988c789013505ee1 | [
"MIT"
] | null | null | null | reviews/serializer.py | wmalott23/Products_app | 691e156ed6f2607a257b18bc988c789013505ee1 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from .models import Review
class ReviewSerializer(serializers.ModelSerializer):
class Meta:
model = Review
fields = ['prod_num', 'review'] | 28.285714 | 52 | 0.727273 | 21 | 198 | 6.761905 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.19697 | 198 | 7 | 53 | 28.285714 | 0.893082 | 0 | 0 | 0 | 0 | 0 | 0.070352 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
c2d6f4fb33cd37cc8414c16e4919ed1489f3166a | 70 | py | Python | login.py | sdd1992/yeah-yeah | 6b14f3a00f291b246f837d1575e2d7caafe30a57 | [
"MIT"
] | null | null | null | login.py | sdd1992/yeah-yeah | 6b14f3a00f291b246f837d1575e2d7caafe30a57 | [
"MIT"
] | null | null | null | login.py | sdd1992/yeah-yeah | 6b14f3a00f291b246f837d1575e2d7caafe30a57 | [
"MIT"
] | null | null | null | num=100
num=1000000000000
name=zhangsan
num=200
`````````````
| 5 | 17 | 0.571429 | 8 | 70 | 5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.333333 | 0.185714 | 70 | 13 | 18 | 5.384615 | 0.368421 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
c2dc38d71f731be78612dfd0172d68fae163af82 | 286 | py | Python | tests/pyccel/project_rel_imports/project/folder2/mod3.py | dina-fouad/pyccel | f4d919e673b400442b9c7b81212b6fbef749c7b7 | [
"MIT"
] | 206 | 2018-06-28T00:28:47.000Z | 2022-03-29T05:17:03.000Z | tests/pyccel/project_rel_imports/project/folder2/mod3.py | dina-fouad/pyccel | f4d919e673b400442b9c7b81212b6fbef749c7b7 | [
"MIT"
] | 670 | 2018-07-23T11:02:24.000Z | 2022-03-30T07:28:05.000Z | tests/pyccel/project_rel_imports/project/folder2/mod3.py | dina-fouad/pyccel | f4d919e673b400442b9c7b81212b6fbef749c7b7 | [
"MIT"
] | 19 | 2019-09-19T06:01:00.000Z | 2022-03-29T05:17:06.000Z | # pylint: disable=missing-function-docstring, missing-module-docstring/
from pyccel.decorators import types, pure
from ..folder1.mod1 import add2
from .mod2 import sum_to_n_squared
@pure
@types('int')
def one_hundred_plus_sum_to_n_squared(n):
return add2(100, sum_to_n_squared(n))
| 28.6 | 71 | 0.797203 | 46 | 286 | 4.695652 | 0.586957 | 0.069444 | 0.083333 | 0.180556 | 0.12963 | 0 | 0 | 0 | 0 | 0 | 0 | 0.031128 | 0.101399 | 286 | 9 | 72 | 31.777778 | 0.809339 | 0.241259 | 0 | 0 | 0 | 0 | 0.013953 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.428571 | 0.142857 | 0.714286 | 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 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 4 |
c2f266e84108a82928f3ce1df2df7908a31d0ac2 | 268 | py | Python | dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/impl/__init__.py | mjames-upc/python-awips | e2b05f5587b02761df3b6dd5c6ee1f196bd5f11c | [
"BSD-3-Clause"
] | null | null | null | dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/impl/__init__.py | mjames-upc/python-awips | e2b05f5587b02761df3b6dd5c6ee1f196bd5f11c | [
"BSD-3-Clause"
] | null | null | null | dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/impl/__init__.py | mjames-upc/python-awips | e2b05f5587b02761df3b6dd5c6ee1f196bd5f11c | [
"BSD-3-Clause"
] | null | null | null | ##
##
# File auto-generated by PythonFileGenerator
__all__ = [
'DefaultDataRequest',
'DefaultNotificationFilter'
]
from .DefaultDataRequest import DefaultDataRequest
from .DefaultNotificationFilter import DefaultNotificationFilter
| 20.615385 | 64 | 0.723881 | 16 | 268 | 11.875 | 0.625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.216418 | 268 | 12 | 65 | 22.333333 | 0.904762 | 0.156716 | 0 | 0 | 1 | 0 | 0.195455 | 0.113636 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
6c1471cad409b83406183e10a5261642959f5333 | 168 | py | Python | tools/utils/gitprogress.py | vertexportus/devdock | 786e210bba7d607db2aee0ff7410de41e81d94ce | [
"MIT"
] | 5 | 2020-01-15T14:46:16.000Z | 2021-06-01T19:50:51.000Z | tools/utils/gitprogress.py | vertexportus/devdock | 786e210bba7d607db2aee0ff7410de41e81d94ce | [
"MIT"
] | 1 | 2021-03-23T12:15:17.000Z | 2021-03-23T12:15:17.000Z | tools/utils/gitprogress.py | vertexportus/devdock | 786e210bba7d607db2aee0ff7410de41e81d94ce | [
"MIT"
] | 1 | 2020-11-16T23:50:23.000Z | 2020-11-16T23:50:23.000Z | from git import RemoteProgress
class GitProgress(RemoteProgress):
def update(self, op_code, cur_count, max_count=None, message=''):
print(self._cur_line)
| 24 | 69 | 0.738095 | 22 | 168 | 5.409091 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.160714 | 168 | 6 | 70 | 28 | 0.843972 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.75 | 0.25 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
6c2b6fa7ce671c2ec75b4086ddf96798c52fc351 | 244 | py | Python | settings.py | arianbakh/stock-dynamics | 3d929b7159d82d652cba346b7ac26fcf495fe609 | [
"MIT"
] | 1 | 2020-04-28T20:03:58.000Z | 2020-04-28T20:03:58.000Z | settings.py | arianbakh/stock-dynamics | 3d929b7159d82d652cba346b7ac26fcf495fe609 | [
"MIT"
] | null | null | null | settings.py | arianbakh/stock-dynamics | 3d929b7159d82d652cba346b7ac26fcf495fe609 | [
"MIT"
] | null | null | null | import os
BASE_DIR = os.path.dirname(os.path.realpath(__file__))
DATA_DIR = os.path.join(BASE_DIR, 'data')
DEBUG_DIR = os.path.join(BASE_DIR, 'debug')
OUTPUT_DIR = os.path.join(BASE_DIR, 'output')
XI_PATH = os.path.join(OUTPUT_DIR, 'xi.npy')
| 27.111111 | 54 | 0.733607 | 44 | 244 | 3.772727 | 0.318182 | 0.216867 | 0.216867 | 0.23494 | 0.361446 | 0.361446 | 0 | 0 | 0 | 0 | 0 | 0 | 0.094262 | 244 | 8 | 55 | 30.5 | 0.751131 | 0 | 0 | 0 | 0 | 0 | 0.086066 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 0.166667 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
6c5002051084ad2af08daef90aa414332d30e487 | 2,598 | py | Python | Examples/python_client/openapi_client/com.h21lab.TS29573_N32_Handshake.handler/__init__.py | H21lab/5GC_build | bbc8bbd9158a2124ca486572906020a91789733e | [
"Apache-2.0"
] | 12 | 2020-06-04T06:58:13.000Z | 2021-12-15T14:26:56.000Z | Examples/python_client/openapi_client/com.h21lab.TS29573_N32_Handshake.handler/__init__.py | H21lab/5GC_build | bbc8bbd9158a2124ca486572906020a91789733e | [
"Apache-2.0"
] | 3 | 2021-05-27T12:13:58.000Z | 2021-12-15T05:45:44.000Z | Examples/python_client/openapi_client/com.h21lab.TS29573_N32_Handshake.handler/__init__.py | H21lab/5GC_build | bbc8bbd9158a2124ca486572906020a91789733e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# flake8: noqa
"""
N32 Handshake API
N32-c Handshake Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. # noqa: E501
The version of the OpenAPI document: 1.1.0.alpha-3
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
# import models into model package
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.api_ie_mapping import ApiIeMapping
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.api_signature import ApiSignature
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.callback_name import CallbackName
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.failed_modification_info import FailedModificationInfo
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.failure_reason import FailureReason
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.http_method import HttpMethod
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.ie_info import IeInfo
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.ie_location import IeLocation
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.ie_type import IeType
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.invalid_param import InvalidParam
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.ipx_provider_sec_info import IpxProviderSecInfo
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.n32f_context_info import N32fContextInfo
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.n32f_error_detail import N32fErrorDetail
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.n32f_error_info import N32fErrorInfo
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.n32f_error_type import N32fErrorType
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.problem_details import ProblemDetails
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.protection_policy import ProtectionPolicy
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.sec_negotiate_req_data import SecNegotiateReqData
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.sec_negotiate_rsp_data import SecNegotiateRspData
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.sec_param_exch_req_data import SecParamExchReqData
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.sec_param_exch_rsp_data import SecParamExchRspData
from openapi_client.com.h21lab.TS29573_N32_Handshake.handler.security_capability import SecurityCapability
| 66.615385 | 146 | 0.878753 | 360 | 2,598 | 6.036111 | 0.302778 | 0.127013 | 0.172112 | 0.202485 | 0.568339 | 0.568339 | 0.568339 | 0.568339 | 0.568339 | 0.352968 | 0 | 0.095395 | 0.063895 | 2,598 | 38 | 147 | 68.368421 | 0.797697 | 0.122787 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 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 | 4 |
665f9799aac82ca707f6ee0060c3e7b68f9c591c | 145 | py | Python | quaddicted/packages/apps.py | dan-passaro/quaddicted | e9d56696a92ea2256f2fe3d9f7dbc351ac9688bc | [
"MIT"
] | 8 | 2019-12-29T23:01:25.000Z | 2022-02-05T23:28:45.000Z | quaddicted/packages/apps.py | dan-passaro/quaddicted | e9d56696a92ea2256f2fe3d9f7dbc351ac9688bc | [
"MIT"
] | 43 | 2019-12-27T16:15:36.000Z | 2021-01-04T16:47:28.000Z | quaddicted/packages/apps.py | dan-passaro/quaddicted | e9d56696a92ea2256f2fe3d9f7dbc351ac9688bc | [
"MIT"
] | 1 | 2020-04-09T23:39:23.000Z | 2020-04-09T23:39:23.000Z | from django.apps import AppConfig
class QuaddictedPackagesConfig(AppConfig):
name = 'quaddicted.packages'
label = 'quaddicted_packages'
| 24.166667 | 42 | 0.77931 | 14 | 145 | 8 | 0.785714 | 0.321429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.144828 | 145 | 5 | 43 | 29 | 0.903226 | 0 | 0 | 0 | 0 | 0 | 0.262069 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 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 | 0 | 0 | 1 | 0 | 0 | 4 |
666b590e6e455308159600ad7949ec632b72d1e0 | 332 | py | Python | saleor/rest/serializers/account/__init__.py | Chaoslecion123/Diver | 8c5c493701422eada49cbf95b0b0add08f1ea561 | [
"BSD-3-Clause"
] | null | null | null | saleor/rest/serializers/account/__init__.py | Chaoslecion123/Diver | 8c5c493701422eada49cbf95b0b0add08f1ea561 | [
"BSD-3-Clause"
] | null | null | null | saleor/rest/serializers/account/__init__.py | Chaoslecion123/Diver | 8c5c493701422eada49cbf95b0b0add08f1ea561 | [
"BSD-3-Clause"
] | null | null | null | from .user import UserSerializer
from .address import AddressSerializer
from .customer_note import CustomerNoteSerializer
from .review import ReviewSerializer
from .favorite import FavoriteSerializer
from .favorite_collection import FavoriteCollectionSerializer
from .newsletter_subscription import NewsletterSubscriptionSerializer
| 41.5 | 69 | 0.894578 | 31 | 332 | 9.483871 | 0.580645 | 0.081633 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.084337 | 332 | 7 | 70 | 47.428571 | 0.967105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
6672c4669cf5d8f0e26be2f7799b77f3c28390bb | 66 | py | Python | examples/unused_test.py | fomightez/riscv-newop | 743871523a9fbe52eeebebcc66a0109bd21979f5 | [
"BSD-2-Clause"
] | 13 | 2020-05-26T23:17:47.000Z | 2021-12-30T05:57:56.000Z | examples/unused_test.py | fomightez/riscv-newop | 743871523a9fbe52eeebebcc66a0109bd21979f5 | [
"BSD-2-Clause"
] | 30 | 2020-06-25T20:15:30.000Z | 2022-03-12T00:47:40.000Z | examples/unused_test.py | fomightez/riscv-newop | 743871523a9fbe52eeebebcc66a0109bd21979f5 | [
"BSD-2-Clause"
] | 3 | 2020-09-11T18:00:51.000Z | 2021-07-09T14:39:56.000Z | import sys
sys.path.append("..")
import rvnewop
rvnewop.unused()
| 11 | 21 | 0.727273 | 9 | 66 | 5.333333 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.106061 | 66 | 5 | 22 | 13.2 | 0.813559 | 0 | 0 | 0 | 0 | 0 | 0.030303 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
66bc64e10e73f60c906d7a33d772dbe7001a64c4 | 77 | py | Python | opensimpanel/__main__.py | dodubassman/SimPanel | 9a702eced67eede96d26db865cb1d2b0e9d690f7 | [
"MIT"
] | 2 | 2019-11-01T01:35:25.000Z | 2020-10-05T14:10:00.000Z | opensimpanel/__main__.py | dodubassman/OpenSimPanel | 9a702eced67eede96d26db865cb1d2b0e9d690f7 | [
"MIT"
] | null | null | null | opensimpanel/__main__.py | dodubassman/OpenSimPanel | 9a702eced67eede96d26db865cb1d2b0e9d690f7 | [
"MIT"
] | null | null | null | from opensimpanel.simpanel import SimPanelApp
app = SimPanelApp()
app.run()
| 15.4 | 45 | 0.792208 | 9 | 77 | 6.777778 | 0.777778 | 0.459016 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.116883 | 77 | 4 | 46 | 19.25 | 0.897059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
66d69400a57e48e0f370ea2e08bb53e4f1dfb136 | 190 | py | Python | tests/conftest.py | vyahello/pypi-fastapi-clone | 8afcde375909aaba96ae81c59eb08a932b5ffdc2 | [
"MIT"
] | 1 | 2021-06-10T09:19:24.000Z | 2021-06-10T09:19:24.000Z | tests/conftest.py | vyahello/pypi-fastapi-clone | 8afcde375909aaba96ae81c59eb08a932b5ffdc2 | [
"MIT"
] | 1 | 2022-01-20T22:30:34.000Z | 2022-01-20T22:30:34.000Z | tests/conftest.py | vyahello/pypi-fastapi-clone | 8afcde375909aaba96ae81c59eb08a932b5ffdc2 | [
"MIT"
] | null | null | null | # flake8: noqa
import pytest
from tests.mock.pypi import PyPiMock
@pytest.fixture()
def pypi_mock() -> PyPiMock:
with PyPiMock(host='0.0.0.0', port=8080) as mock:
return mock
| 17.272727 | 53 | 0.684211 | 29 | 190 | 4.448276 | 0.62069 | 0.046512 | 0.046512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.058442 | 0.189474 | 190 | 10 | 54 | 19 | 0.779221 | 0.063158 | 0 | 0 | 0 | 0 | 0.039773 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | true | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
dd55b2f66e8d65ea47386433b4a76c8a1fd22755 | 89 | py | Python | edcUtils/edcmgmt/apps.py | darren-wrigley/EDC-Utils-App | 6c2ef80e90d7edbdb7fd670b5386fe71b0919f0e | [
"MIT"
] | 1 | 2021-08-17T21:08:45.000Z | 2021-08-17T21:08:45.000Z | edcUtils/edcmgmt/apps.py | darren-wrigley/EDC-Utils-App | 6c2ef80e90d7edbdb7fd670b5386fe71b0919f0e | [
"MIT"
] | null | null | null | edcUtils/edcmgmt/apps.py | darren-wrigley/EDC-Utils-App | 6c2ef80e90d7edbdb7fd670b5386fe71b0919f0e | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class EdcmgmtConfig(AppConfig):
name = 'edcmgmt'
| 14.833333 | 33 | 0.752809 | 10 | 89 | 6.7 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.168539 | 89 | 5 | 34 | 17.8 | 0.905405 | 0 | 0 | 0 | 0 | 0 | 0.078652 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
dd63acb53ef27c710c525a01648c0cb7cf2f2f58 | 178 | py | Python | sampletest/sample.py | lcskrishna/python-sample-project | 96976f63fc7f2956a0893a6d9a26894d1bfc7703 | [
"MIT"
] | null | null | null | sampletest/sample.py | lcskrishna/python-sample-project | 96976f63fc7f2956a0893a6d9a26894d1bfc7703 | [
"MIT"
] | null | null | null | sampletest/sample.py | lcskrishna/python-sample-project | 96976f63fc7f2956a0893a6d9a26894d1bfc7703 | [
"MIT"
] | null | null | null |
def say_hello():
print ("------------> Hey Mr. hello <-----------")
def main():
print ("Entry to the main call")
say_hello()
if __name__ == "__main__":
main()
| 16.181818 | 54 | 0.494382 | 21 | 178 | 3.714286 | 0.619048 | 0.205128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.230337 | 178 | 10 | 55 | 17.8 | 0.569343 | 0 | 0 | 0 | 0 | 0 | 0.39548 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | true | 0 | 0 | 0 | 0.285714 | 0.285714 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
dd770a25126ef736bf20693c58e19f31ceaee10f | 96 | py | Python | BestStore/user_master/apps.py | rishabh-22/ECommerce | cc47c71bcfe60db5da10de6be37902a990506326 | [
"MIT"
] | 1 | 2019-11-08T04:52:26.000Z | 2019-11-08T04:52:26.000Z | BestStore/user_master/apps.py | rishabh-22/ECommerce | cc47c71bcfe60db5da10de6be37902a990506326 | [
"MIT"
] | 12 | 2019-06-08T17:48:01.000Z | 2022-03-11T23:49:17.000Z | BestStore/user_master/apps.py | rishabh-22/ECommerce | cc47c71bcfe60db5da10de6be37902a990506326 | [
"MIT"
] | 8 | 2019-05-27T08:08:00.000Z | 2019-06-10T07:09:41.000Z | from django.apps import AppConfig
class UserMasterConfig(AppConfig):
name = 'user_master'
| 16 | 34 | 0.770833 | 11 | 96 | 6.636364 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15625 | 96 | 5 | 35 | 19.2 | 0.901235 | 0 | 0 | 0 | 0 | 0 | 0.114583 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
dd8d8bbbf79869d0696d62572ca1f9877fb69ac8 | 781 | py | Python | YingXao_Expo/(deprecated) flask_served_version/app.py | savage12138/YingXao | 66bc13046f86cef3ca8912d28df57f3de5491189 | [
"MIT"
] | 1 | 2021-04-10T20:03:25.000Z | 2021-04-10T20:03:25.000Z | YingXao_Expo/(deprecated) flask_served_version/app.py | savage12138/YingXao | 66bc13046f86cef3ca8912d28df57f3de5491189 | [
"MIT"
] | null | null | null | YingXao_Expo/(deprecated) flask_served_version/app.py | savage12138/YingXao | 66bc13046f86cef3ca8912d28df57f3de5491189 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, send_file
app = Flask(__name__,
static_url_path="",
static_folder="static",
template_folder="templates")
@app.route("/")
def index():
return render_template("index.html")
@app.route("/team")
def team():
return render_template("team.html")
@app.route("/technology")
def tech():
return render_template("technology.html")
@app.route("/documents")
def docs():
return render_template("documents.html")
@app.route("/section/<string:section>")
def temp(section: str):
return render_template(f"section/{section}.html")
@app.route("/download/<string:filename>")
def download(filename: str):
return send_file(f"static/download/{filename}")
if __name__ == "__main__":
app.run("0.0.0.0", port=5000, debug=True) | 21.108108 | 53 | 0.704225 | 104 | 781 | 5.057692 | 0.375 | 0.159696 | 0.190114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011594 | 0.116517 | 781 | 37 | 54 | 21.108108 | 0.750725 | 0 | 0 | 0 | 0 | 0 | 0.262148 | 0.127877 | 0 | 0 | 0 | 0 | 0 | 1 | 0.24 | false | 0 | 0.04 | 0.24 | 0.52 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 4 |
dda286839183d60285bbe59db6902804791c6fca | 159 | py | Python | venv/bin/django-admin.py | mesodiar/kitten | bac15a04bcffeed6039b6680554d951268121832 | [
"MIT"
] | null | null | null | venv/bin/django-admin.py | mesodiar/kitten | bac15a04bcffeed6039b6680554d951268121832 | [
"MIT"
] | null | null | null | venv/bin/django-admin.py | mesodiar/kitten | bac15a04bcffeed6039b6680554d951268121832 | [
"MIT"
] | null | null | null | #!/Users/mesodiar/Job/djangogirls/venv/bin/python3.5
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 26.5 | 52 | 0.786164 | 21 | 159 | 5.428571 | 0.904762 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013889 | 0.09434 | 159 | 5 | 53 | 31.8 | 0.777778 | 0.320755 | 0 | 0 | 0 | 0 | 0.074766 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
06bf508872f4e3d54d4a8df7c57479144725e25e | 208 | py | Python | orb_simulator/parser/eval_rule.py | dmguezjaviersnet/IA-Sim-Comp-Project | 8165b9546efc45f98091a3774e2dae4f45942048 | [
"MIT"
] | 1 | 2022-01-19T22:49:09.000Z | 2022-01-19T22:49:09.000Z | orb_simulator/parser/eval_rule.py | dmguezjaviersnet/IA-Sim-Comp-Project | 8165b9546efc45f98091a3774e2dae4f45942048 | [
"MIT"
] | 15 | 2021-11-10T14:25:02.000Z | 2022-02-12T19:17:11.000Z | orb_simulator/parser/eval_rule.py | dmguezjaviersnet/IA-Sim-Comp-Project | 8165b9546efc45f98091a3774e2dae4f45942048 | [
"MIT"
] | null | null | null | from typing import Callable, List
from parser.non_terminal import Non_terminal
from parser.own_symbol import Symbol
def eval_rule(rule: Callable, head: Non_terminal, tail: List[Symbol]):
rule(head, tail) | 34.666667 | 70 | 0.798077 | 32 | 208 | 5.03125 | 0.46875 | 0.204969 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 208 | 6 | 71 | 34.666667 | 0.884615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.6 | 0 | 0.8 | 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 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
06e304d2d1ccad5068b80dc0d901d45c7583a5c1 | 14,906 | py | Python | extra/currency/userserveractivity.py | costaluu/sloth-bot | 48727aff5859ec96c48691a638b3b8c0a90c70f9 | [
"MIT"
] | null | null | null | extra/currency/userserveractivity.py | costaluu/sloth-bot | 48727aff5859ec96c48691a638b3b8c0a90c70f9 | [
"MIT"
] | null | null | null | extra/currency/userserveractivity.py | costaluu/sloth-bot | 48727aff5859ec96c48691a638b3b8c0a90c70f9 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from mysqldb import the_database
from typing import List, Union
from extra import utils
import os
afk_channel_id = int(os.getenv('AFK_CHANNEL_ID', 123))
class UserVoiceSystem(commands.Cog):
""" Cog for the inner systems of UserVoice events. """
def __init__(self, client: commands.Bot) -> None:
""" Class init method. """
self.client = client
@commands.Cog.listener(name="on_voice_state_update")
async def on_voice_state_update_join_leave(self, member, before, after) -> None:
""" For when users join or leave the Voice Channel. """
if member.bot:
return
current_ts: int = await utils.get_timestamp()
# Get before/after channels and their categories
bc = before.channel
ac = after.channel
# # Check voice states
# if before.mute != after.mute:
# return
# if before.deaf != before.deaf:
# return
if before.self_stream != after.self_stream:
if not before.self_stream and after.self_stream:
return
if bc == ac:
return
if before.self_video != after.self_video:
if not before.self_video and after.self_video:
return
if bc == ac:
return
# Get before/after channels and their categories
bc = before.channel
ac = after.channel
user_info = await self.get_user_activity_info(member.id)
if not user_info and not after.self_mute:
if ac:
return await self.insert_user_server_activity(member.id, 0, current_ts)
else:
return await self.insert_user_server_activity(member.id, 0)
if not user_info:
return
SlothClass: commands.Cog = self.client.get_cog('SlothClass')
Moderation: commands.Cog = self.client.get_cog('Moderation')
# Join
if ac and not bc:
if not after.self_mute and not after.self_deaf and not after.mute and not after.deaf and after.channel.id != afk_channel_id:
await self.update_user_server_timestamp(member.id, current_ts)
# Switch
elif (ac and bc) and (bc.id != ac.id) and not after.self_mute and not after.mute and not after.deaf:
alts = await Moderation.get_fake_accounts(member.id)
alts_list: List[int] = []
for alt in alts:
alts_list.append(alt[0])
alts_list.append(alt[1])
alts = list(set(alts_list))
try:
alts.remove(member.id)
except ValueError:
pass
people_in_vc: int = len([m for m in bc.members if not m.bot and m.id not in alts]) + 1
if people_in_vc < 2 or after.self_mute or after.mute or after.deaf or after.channel.id == afk_channel_id:
return await self.update_user_server_time(member.id, 0, current_ts)
if not user_info[0][3]: return
increment: int = current_ts - user_info[0][3]
effects = await SlothClass.get_user_effects(member)
if 'sabotaged' in effects:
increment = 0
await self.update_user_server_time(member.id, increment, current_ts)
# Muted/unmuted
elif (ac and bc) and (bc.id == ac.id) and before.self_mute != after.self_mute:
if not after.self_mute and not after.self_deaf and not after.mute and not after.deaf and after.channel.id != afk_channel_id:
return await self.update_user_server_timestamp(member.id, current_ts)
alts = await Moderation.get_fake_accounts(member.id)
alts_list: List[int] = []
for alt in alts:
alts_list.append(alt[0])
alts_list.append(alt[1])
alts = list(set(alts_list))
try:
alts.remove(member.id)
except ValueError:
pass
people_in_vc: int = len([m for m in bc.members if not m.bot and m.id not in alts])
if people_in_vc < 2 or after.self_mute or after.self_deaf:
return await self.update_user_server_time(member.id, 0, None)
if not user_info[0][3]: return
increment: int = current_ts - user_info[0][3]
effects = await SlothClass.get_user_effects(member)
if 'sabotaged' in effects:
increment = 0
await self.update_user_server_time(member.id, increment, current_ts)
# Deafened/undeafened
elif (ac and bc) and (bc.id == ac.id) and before.self_deaf != after.self_deaf:
if not after.self_mute and not after.self_deaf and not after.mute and not after.deaf and after.channel.id != afk_channel_id:
return await self.update_user_server_timestamp(member.id, current_ts)
alts = await Moderation.get_fake_accounts(member.id)
alts_list: List[int] = []
for alt in alts:
alts_list.append(alt[0])
alts_list.append(alt[1])
alts = list(set(alts_list))
try:
alts.remove(member.id)
except ValueError:
pass
people_in_vc: int = len([m for m in bc.members if not m.bot and m.id not in alts])
if people_in_vc < 2 or after.self_mute or after.self_deaf:
return await self.update_user_server_time(member.id, 0, None)
if not user_info[0][3]: return
increment: int = current_ts - user_info[0][3]
effects = await SlothClass.get_user_effects(member)
if 'sabotaged' in effects:
increment = 0
await self.update_user_server_time(member.id, increment, current_ts)
# Server Muted/unmuted
elif (ac and bc) and (bc.id == ac.id) and before.mute != after.mute:
if not after.self_mute and not after.self_deaf and not after.mute and not after.deaf and after.channel.id != afk_channel_id:
return await self.update_user_server_timestamp(member.id, current_ts)
alts = await Moderation.get_fake_accounts(member.id)
alts_list: List[int] = []
for alt in alts:
alts_list.append(alt[0])
alts_list.append(alt[1])
alts = list(set(alts_list))
try:
alts.remove(member.id)
except ValueError:
pass
people_in_vc: int = len([m for m in bc.members if not m.bot and m.id not in alts])
if people_in_vc < 2 or after.mute or after.deaf:
return await self.update_user_server_time(member.id, 0, None)
if not user_info[0][3]: return
increment: int = current_ts - user_info[0][3]
effects = await SlothClass.get_user_effects(member)
if 'sabotaged' in effects:
increment = 0
await self.update_user_server_time(member.id, increment, current_ts)
# Server Deafened/undeafened
elif (ac and bc) and (bc.id == ac.id) and before.deaf != after.deaf:
if not after.self_mute and not after.self_deaf and not after.mute and not after.deaf and after.channel.id != afk_channel_id:
return await self.update_user_server_timestamp(member.id, current_ts)
alts = await Moderation.get_fake_accounts(member.id)
alts_list: List[int] = []
for alt in alts:
alts_list.append(alt[0])
alts_list.append(alt[1])
alts = list(set(alts_list))
try:
alts.remove(member.id)
except ValueError:
pass
people_in_vc: int = len([m for m in bc.members if not m.bot and m.id not in alts])
if people_in_vc < 2 or after.mute or after.deaf:
return await self.update_user_server_time(member.id, 0, None)
if not user_info[0][3]: return
increment: int = current_ts - user_info[0][3]
effects = await SlothClass.get_user_effects(member)
if 'sabotaged' in effects:
increment = 0
await self.update_user_server_time(member.id, increment, current_ts)
# Leave
elif bc and not ac:
alts = await Moderation.get_fake_accounts(member.id)
alts_list: List[int] = []
for alt in alts:
alts_list.append(alt[0])
alts_list.append(alt[1])
alts = list(set(alts_list))
try:
alts.remove(member.id)
except ValueError:
pass
people_in_vc: int = len([m for m in bc.members if not m.bot and m.id not in alts]) + 1
if people_in_vc < 2 or before.self_mute or before.mute or before.deaf or before.channel.id == afk_channel_id:
return await self.update_user_server_timestamp(member.id, None)
if not user_info[0][3]: return
increment: int = current_ts - user_info[0][3]
effects = await SlothClass.get_user_effects(member)
if 'sabotaged' in effects:
increment = 0
await self.update_user_server_time(member.id, increment)
class UserServerActivityTable(commands.Cog):
""" Class for the UserServerActivity table in the database. """
def __init__(self, client: commands.Bot) -> None:
""" Class init method. """
self.client = client
# ===== Discord commands =====
@commands.command(hidden=True)
@commands.has_permissions(administrator=True)
async def create_table_server_activity(self, ctx):
""" (ADM) Creates the UserServerActivity table. """
await ctx.message.delete()
if await self.check_user_server_activity_table_exists():
return await ctx.send("The `UserServerActivity` already exists!**")
mycursor, db = await the_database()
await mycursor.execute("CREATE TABLE UserServerActivity (user_id BIGINT, user_messages BIGINT, user_time BIGINT, user_timestamp BIGINT DEFAULT NULL)")
await db.commit()
await mycursor.close()
return await ctx.send("**Table `UserServerActivity` created!**")
@commands.command(hidden=True)
@commands.has_permissions(administrator=True)
async def drop_table_server_activity(self, ctx):
""" (ADM) Drops the UserServerActivity table. """
await ctx.message.delete()
if not await self.check_user_server_activity_table_exists():
return await ctx.send("The `UserServerActivity` doesn't exist!**")
mycursor, db = await the_database()
await mycursor.execute("DROP TABLE UserServerActivity")
await db.commit()
await mycursor.close()
return await ctx.send("**Table `UserServerActivity` dropped!**")
@commands.command(hidden=True)
@commands.has_permissions(administrator=True)
async def reset_table_server_activity(self, ctx):
""" (ADM) Resets the UserServerActivity table. """
await ctx.message.delete()
if not await self.check_user_server_activity_table_exists():
return await ctx.send("The `UserServerActivity` doesn't exist yet!**")
mycursor, db = await the_database()
await mycursor.execute("DELETE FROM UserServerActivity")
await db.commit()
await mycursor.close()
return await ctx.send("**Table `UserServerActivity` reset!**")
# ===== SHOW =====
async def check_user_server_activity_table_exists(self) -> bool:
""" Checks whether the UserServerActivity table exists. """
mycursor, _ = await the_database()
await mycursor.execute("SHOW TABLE STATUS LIKE 'UserServerActivity'")
exists = await mycursor.fetchone()
await mycursor.close()
if exists:
return True
else:
return False
# ===== INSERT =====
async def insert_user_server_activity(self, user_id: int, add_msg: int, new_ts: int = None) -> None:
""" Inserts a user into the UserServerActivity table.
:param user_id: The ID of the user to insert.
:param add_msg: The initial message counter for the user to have.
:param new_ts: The current timestamp. """
mycursor, db = await the_database()
await mycursor.execute(
"INSERT INTO UserServerActivity (user_id, user_messages, user_time, user_timestamp) VALUES (%s, %s, %s, %s)",
(user_id, add_msg, 0, new_ts))
await db.commit()
await mycursor.close()
# ===== SELECT =====
async def get_user_activity_info(self, user_id: int) -> List[List[int]]:
""" Gets a user from the UserServerActivity table.
:param user_id: The ID of the user to get. """
mycursor, _ = await the_database()
await mycursor.execute("SELECT * FROM UserServerActivity WHERE user_id = %s", (user_id,))
user_info = await mycursor.fetchall()
await mycursor.close()
return user_info
# ===== UPDATE =====
async def update_user_server_messages(self, user_id: int, add_msg: int) -> None:
""" Updates the user's message counter.
:param user_id: The ID of the user to update.
:param add_msg: The increment to apply to their current message counter. """
mycursor, db = await the_database()
await mycursor.execute("UPDATE UserServerActivity SET user_messages = user_messages + %s WHERE user_id = %s", (add_msg, user_id))
await db.commit()
await mycursor.close()
async def update_user_server_time(self, user_id: int, increment: int, current_ts: int = None) -> None:
""" Updates the user's voice time information.
:param user_id: The ID of the user to update.
:param increment: The increment value in seconds to apply.
:param current_ts: The current timestamp. [Optional] """
mycursor, db = await the_database()
await mycursor.execute("""
UPDATE UserServerActivity SET user_time = user_time + %s, user_timestamp = %s WHERE user_id = %s
""", (increment, current_ts, user_id))
await db.commit()
await mycursor.close()
async def update_user_server_timestamp(self, user_id: int, new_ts: int) -> None:
""" Updates the user's Server Activity timestamp.
:param user_id: The ID of the user to update.
:param new_ts: The new timestamp to set to. """
mycursor, db = await the_database()
await mycursor.execute("UPDATE UserServerActivity SET user_timestamp = %s WHERE user_id = %s", (new_ts, user_id))
await db.commit()
await mycursor.close()
| 38.91906 | 158 | 0.610291 | 1,947 | 14,906 | 4.496662 | 0.091423 | 0.02924 | 0.036551 | 0.036893 | 0.756368 | 0.739349 | 0.709423 | 0.687036 | 0.656996 | 0.652313 | 0 | 0.005827 | 0.297665 | 14,906 | 382 | 159 | 39.020942 | 0.830452 | 0.036562 | 0 | 0.702041 | 0 | 0.004082 | 0.076671 | 0.001597 | 0 | 0 | 0 | 0 | 0 | 1 | 0.008163 | false | 0.02449 | 0.02449 | 0 | 0.15102 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
06eaedd391e659c5d5d95546e28ef23b90edb55e | 298 | py | Python | fintec/__init__.py | bhenk/fintec | 11688c7f1ac308466f069a36122dcae78aca0b2b | [
"Apache-2.0"
] | null | null | null | fintec/__init__.py | bhenk/fintec | 11688c7f1ac308466f069a36122dcae78aca0b2b | [
"Apache-2.0"
] | null | null | null | fintec/__init__.py | bhenk/fintec | 11688c7f1ac308466f069a36122dcae78aca0b2b | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
""" A collection of utilities to do financial calculations. """
import fintec.version
__version__ = version.__version__
__release_date__ = version.__release_date__
#
from fintec.styling import *
from fintec.data import *
from fintec.calc import *
| 21.285714 | 63 | 0.748322 | 38 | 298 | 5.394737 | 0.631579 | 0.204878 | 0.204878 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007813 | 0.14094 | 298 | 13 | 64 | 22.923077 | 0.792969 | 0.338926 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
06fd0df76b3e812b2b21ff60ff3e68659b35238a | 1,413 | py | Python | nip/utils/path.py | RopePy/nip | 80a6a4debed5ffe0fedfd8e4bb87873f70e5fe92 | [
"MIT"
] | 1 | 2017-11-21T20:14:27.000Z | 2017-11-21T20:14:27.000Z | nip/utils/path.py | RopePy/nip | 80a6a4debed5ffe0fedfd8e4bb87873f70e5fe92 | [
"MIT"
] | null | null | null | nip/utils/path.py | RopePy/nip | 80a6a4debed5ffe0fedfd8e4bb87873f70e5fe92 | [
"MIT"
] | 1 | 2021-06-24T21:04:16.000Z | 2021-06-24T21:04:16.000Z | import os
from os.path import join
from nip.config import defaults
def get_basename():
return os.path.basename(os.getcwd().rstrip('/'))
def directory_is_empty(target_dir):
if os.path.exists(target_dir):
for _, folders, files in os.walk(target_dir):
return False if (files or folders) else True
else:
return True
def current_working_directory_is_empty():
return directory_is_empty(os.getcwd())
def get_nipfile_path(env=defaults):
return join(os.getcwd(), env.NIPFILE)
def get_python_setup_py_path(env=defaults):
return join(os.getcwd(), env.PYTHON_SETUP_PY)
def get_gitignore_path(env=defaults):
return join(os.getcwd(), env.GITIGNORE)
def get_requirements_path(env=defaults):
return join(os.getcwd(), env.REQUIREMENTS_FILE)
def get_dev_requirements_path(env=defaults):
return join(os.getcwd(), env.DEV_REQUIREMENTS_FILE)
def get_python_modules_path(env=defaults):
return join(os.getcwd(), env.PYTHON_MODULES)
def get_python_modules_bin_path(env=defaults):
return join(get_python_modules_path(env), 'bin')
def get_pip_executable_path(env=defaults):
return join(get_python_modules_bin_path(env), env.PIP)
def get_python_executable_path(env=defaults):
return join(get_python_modules_bin_path(env), env.PYTHON)
def file_write_lines(lines, to):
with open(to, 'w+') as fs:
fs.write("\n".join(lines))
| 22.790323 | 61 | 0.73673 | 214 | 1,413 | 4.593458 | 0.252336 | 0.085453 | 0.137335 | 0.192269 | 0.471007 | 0.447609 | 0.428281 | 0.428281 | 0.313327 | 0.130214 | 0 | 0 | 0.150035 | 1,413 | 61 | 62 | 23.163934 | 0.818485 | 0 | 0 | 0 | 0 | 0 | 0.005662 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.382353 | false | 0 | 0.088235 | 0.323529 | 0.852941 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 4 |
06ffa2e642e99984abf9e4691548cc2e5cf371f8 | 269 | py | Python | egg/resources/utils.py | PythonForChange/Egg | 24fe5b9e95654ac41a2be46fbd0e5e7224bf70eb | [
"MIT"
] | 1 | 2021-06-07T02:10:41.000Z | 2021-06-07T02:10:41.000Z | egg/resources/utils.py | PythonForChange/Egg | 24fe5b9e95654ac41a2be46fbd0e5e7224bf70eb | [
"MIT"
] | null | null | null | egg/resources/utils.py | PythonForChange/Egg | 24fe5b9e95654ac41a2be46fbd0e5e7224bf70eb | [
"MIT"
] | null | null | null | import json, math
def dump(structure, file):
json.dump(structure, file, indent=2)
def floor(f: float):
return math.floor(f)
def colour(id: int,bgcolor:int =0):
if bgcolor!=0:
return "\033[1;"+str(id)+";"+str(bgcolor+10)+"m "
return "\033[1;"+str(id)+"m"
| 20.692308 | 53 | 0.635688 | 46 | 269 | 3.717391 | 0.521739 | 0.152047 | 0.19883 | 0.152047 | 0.175439 | 0 | 0 | 0 | 0 | 0 | 0 | 0.056769 | 0.148699 | 269 | 12 | 54 | 22.416667 | 0.689956 | 0 | 0 | 0 | 0 | 0 | 0.066915 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.111111 | 0.111111 | 0.777778 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 4 |
6600319ca9bdf473ecdb8d53b1c4fb36feb52bfe | 147 | py | Python | tests/vergisses_test.py | schlind/Karlsruher | e9d817ef1b0cd4bc6bf0296294b80c6043d75b95 | [
"Unlicense"
] | 5 | 2019-01-15T19:07:32.000Z | 2021-11-08T12:22:19.000Z | tests/vergisses_test.py | schlind/Karlsruher | e9d817ef1b0cd4bc6bf0296294b80c6043d75b95 | [
"Unlicense"
] | 1 | 2021-01-11T08:10:16.000Z | 2021-01-12T17:07:02.000Z | tests/vergisses_test.py | schlind/Karlsruher | e9d817ef1b0cd4bc6bf0296294b80c6043d75b95 | [
"Unlicense"
] | 4 | 2019-02-19T10:01:00.000Z | 2021-01-11T09:27:03.000Z | from unittest import TestCase
class VergissesTest(TestCase):
def test_can_delete_aged_tweets(self):
self.fail('Not yet implemented')
| 21 | 42 | 0.755102 | 19 | 147 | 5.631579 | 0.894737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.170068 | 147 | 6 | 43 | 24.5 | 0.877049 | 0 | 0 | 0 | 0 | 0 | 0.129252 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 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 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
661d9da8a251fb662d2a455fc83d19af3c3f06d2 | 29 | py | Python | src/bot/common/constants.py | iBalag/claimant | ab695d7105ba2572ef019e45f30258346e2d36e9 | [
"BSD-3-Clause"
] | 3 | 2022-03-03T19:10:25.000Z | 2022-03-03T19:57:15.000Z | src/bot/common/constants.py | iBalag/claimant | ab695d7105ba2572ef019e45f30258346e2d36e9 | [
"BSD-3-Clause"
] | 9 | 2022-03-03T18:56:37.000Z | 2022-03-29T18:34:02.000Z | src/bot/common/constants.py | iBalag/claimant | ab695d7105ba2572ef019e45f30258346e2d36e9 | [
"BSD-3-Clause"
] | 1 | 2022-03-04T11:59:11.000Z | 2022-03-04T11:59:11.000Z | WORK_DAYS_PER_MONTH: int = 20 | 29 | 29 | 0.827586 | 6 | 29 | 3.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 0.103448 | 29 | 1 | 29 | 29 | 0.730769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
66317a1e342d4b57c81384f236ffe9f0118b56b6 | 8,003 | py | Python | aws_saml_auth/tests/test_configuration.py | ekreative/aws-google-auth | a2a3e0f588067cfe90efb01f28d35562e591ee8d | [
"MIT"
] | 3 | 2021-09-09T14:36:17.000Z | 2022-02-17T05:52:35.000Z | aws_saml_auth/tests/test_configuration.py | ekreative/aws-google-auth | a2a3e0f588067cfe90efb01f28d35562e591ee8d | [
"MIT"
] | null | null | null | aws_saml_auth/tests/test_configuration.py | ekreative/aws-google-auth | a2a3e0f588067cfe90efb01f28d35562e591ee8d | [
"MIT"
] | 2 | 2022-01-07T10:09:54.000Z | 2022-03-16T17:05:28.000Z | #!/usr/bin/env python
import unittest
from aws_saml_auth import configuration
class TestConfigurationMethods(unittest.TestCase):
def test_config_profile(self):
self.assertEqual(
configuration.Configuration.config_profile("default"), "default"
)
self.assertEqual(
configuration.Configuration.config_profile("DEFAULT"), "DEFAULT"
)
self.assertEqual(
configuration.Configuration.config_profile("testing"), "profile testing"
)
self.assertEqual(
configuration.Configuration.config_profile(None), "profile None"
)
self.assertEqual(
configuration.Configuration.config_profile(123456), "profile 123456"
)
def test_duration_invalid_values(self):
# Duration must be an integer
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
c.duration = "bad_type"
c.region = "sample_region"
with self.assertRaises(AssertionError) as e:
c.raise_if_invalid()
self.assertIn("Expected duration to be an integer.", str(e.exception))
# Duration can not be negative
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
c.duration = -1
with self.assertRaises(AssertionError) as e:
c.raise_if_invalid()
self.assertIn(
"Expected duration to be greater than or equal to 900.", str(e.exception)
)
# Duration can not be greater than MAX_DURATION
valid = configuration.Configuration()
valid.login_url = "sample_login_url"
valid.duration = 900
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
c.duration = valid.max_duration + 1
with self.assertRaises(AssertionError) as e:
c.raise_if_invalid()
self.assertIn(
"Expected duration to be less than or equal to max_duration",
str(e.exception),
)
def test_duration_valid_values(self):
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
c.duration = 900
self.assertEqual(c.duration, 900)
c.raise_if_invalid()
c.duration = c.max_duration
self.assertEqual(c.duration, c.max_duration)
c.raise_if_invalid()
c.duration = c.max_duration - 1
self.assertEqual(c.duration, c.max_duration - 1)
c.raise_if_invalid()
def test_duration_defaults_to_max_duration(self):
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
self.assertEqual(c.duration, c.max_duration)
c.raise_if_invalid()
def test_ask_role_invalid_values(self):
# ask_role must be a boolean
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
c.ask_role = "bad_value"
with self.assertRaises(AssertionError) as e:
c.raise_if_invalid()
self.assertIn("Expected ask_role to be a boolean.", str(e.exception))
def test_ask_role_valid_values(self):
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
c.ask_role = True
self.assertTrue(c.ask_role)
c.raise_if_invalid()
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
c.ask_role = False
self.assertFalse(c.ask_role)
c.raise_if_invalid()
def test_ask_role_optional(self):
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "samlple_login_url"
self.assertTrue(c.ask_role)
c.raise_if_invalid()
def test_login_url_invalid_values(self):
# sp_id must not be None
c = configuration.Configuration()
c.region = "sample_region"
with self.assertRaises(AssertionError) as e:
c.raise_if_invalid()
self.assertIn(
"Expected login_url to be set to non-None value.", str(e.exception)
)
def test_profile_defaults_to_sts(self):
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
self.assertEqual(c.profile, "default")
c.raise_if_invalid()
def test_profile_invalid_values(self):
# profile must be a string
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
c.profile = 123456
with self.assertRaises(AssertionError) as e:
c.raise_if_invalid()
self.assertIn("Expected profile to be a string.", str(e.exception))
def test_profile_valid_values(self):
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
c.profile = "default"
self.assertEqual(c.profile, "default")
c.raise_if_invalid()
c.profile = "sts"
self.assertEqual(c.profile, "sts")
c.raise_if_invalid()
def test_profile_defaults(self):
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
self.assertEqual(c.profile, "default")
c.raise_if_invalid()
def test_region_invalid_values(self):
# region must be a string
c = configuration.Configuration()
c.login_url = "sample_login_url"
c.region = 1234
with self.assertRaises(AssertionError) as e:
c.raise_if_invalid()
self.assertIn("Expected region to be a string.", str(e.exception))
def test_region_valid_values(self):
c = configuration.Configuration()
c.login_url = "sample_login_url"
c.region = "us-east-1"
self.assertEqual(c.region, "us-east-1")
c.raise_if_invalid()
c.region = "us-west-2"
self.assertEqual(c.region, "us-west-2")
c.raise_if_invalid()
def test_region_defaults_to_none(self):
c = configuration.Configuration()
c.login_url = "sample_login_url"
self.assertEqual(c.region, None)
with self.assertRaises(AssertionError) as e:
c.raise_if_invalid()
self.assertIn("Expected region to be a string.", str(e.exception))
def test_role_arn_invalid_values(self):
# role_arn must be a string
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
c.role_arn = 1234
with self.assertRaises(AssertionError) as e:
c.raise_if_invalid()
self.assertIn("Expected role_arn to be None or a string.", str(e.exception))
# role_arn be a arn-looking string
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
c.role_arn = "bad_string"
with self.assertRaises(AssertionError) as e:
c.raise_if_invalid()
self.assertIn("Expected role_arn to contain 'arn:aws:iam::'", str(e.exception))
def test_role_arn_is_optional(self):
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
self.assertIsNone(c.role_arn)
c.raise_if_invalid()
def test_role_arn_valid_values(self):
c = configuration.Configuration()
c.region = "sample_region"
c.login_url = "sample_login_url"
c.role_arn = "arn:aws:iam::some_arn_1"
self.assertEqual(c.role_arn, "arn:aws:iam::some_arn_1")
c.raise_if_invalid()
c.role_arn = "arn:aws:iam::some_other_arn_2"
self.assertEqual(c.role_arn, "arn:aws:iam::some_other_arn_2")
c.raise_if_invalid()
| 35.887892 | 87 | 0.633887 | 991 | 8,003 | 4.871847 | 0.093845 | 0.072908 | 0.043082 | 0.080779 | 0.81193 | 0.775684 | 0.730116 | 0.681234 | 0.674192 | 0.605427 | 0 | 0.008528 | 0.2674 | 8,003 | 222 | 88 | 36.04955 | 0.814941 | 0.035112 | 0 | 0.595745 | 0 | 0 | 0.164289 | 0.013485 | 0 | 0 | 0 | 0 | 0.223404 | 1 | 0.095745 | false | 0 | 0.010638 | 0 | 0.111702 | 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 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
b0d8cc3b776d408764d76f1343872162d8169bec | 3,276 | py | Python | let/index/migrations/0001_initial.py | noob54321/oop-survey | e64aa0cd8964999bcc184d4961d383102de848a3 | [
"MIT"
] | 1 | 2019-12-30T13:08:25.000Z | 2019-12-30T13:08:25.000Z | let/index/migrations/0001_initial.py | Kiel-Hyre/oop-survey | e64aa0cd8964999bcc184d4961d383102de848a3 | [
"MIT"
] | 6 | 2020-06-06T00:46:11.000Z | 2022-02-10T09:46:51.000Z | let/index/migrations/0001_initial.py | Kiel-Hyre/oop-survey | e64aa0cd8964999bcc184d4961d383102de848a3 | [
"MIT"
] | 2 | 2019-11-25T12:04:39.000Z | 2021-02-21T05:09:52.000Z | # Generated by Django 2.2.2 on 2019-12-09 11:50
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Statistic',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100, validators=[django.core.validators.RegexValidator(message='Only Alphabets are allowed', regex='^[a-zA-Z ]*$')])),
('f1', models.IntegerField(verbose_name='Personal Factor 1')),
('f2', models.IntegerField(verbose_name='Personal Factor 2')),
('f3', models.IntegerField(verbose_name='Personal Factor 3')),
('f4', models.IntegerField(verbose_name='Personal Factor 4')),
('f5', models.IntegerField(verbose_name='Personal Factor 5')),
('f6', models.IntegerField(verbose_name='Family Factor 1')),
('f7', models.IntegerField(verbose_name='Family Factor 2')),
('f8', models.IntegerField(verbose_name='Family Factor 3')),
('f9', models.IntegerField(verbose_name='Family Factor 4')),
('f10', models.IntegerField(verbose_name='Family Factor 5')),
('f11', models.IntegerField(verbose_name='Peer Factor 1')),
('f12', models.IntegerField(verbose_name='Peer Factor 2')),
('f13', models.IntegerField(verbose_name='Peer Factor 3')),
('f14', models.IntegerField(verbose_name='Peer Factor 4')),
('f15', models.IntegerField(verbose_name='Peer Factor 5')),
('f16', models.IntegerField(verbose_name='School Factor 1')),
('f17', models.IntegerField(verbose_name='School Factor 2')),
('f18', models.IntegerField(verbose_name='School Factor 3')),
('f19', models.IntegerField(verbose_name='School Factor 4')),
('f20', models.IntegerField(verbose_name='School Factor 5')),
('f21', models.IntegerField(verbose_name='School Factor 1')),
('f22', models.IntegerField(verbose_name='School Factor 2')),
('f23', models.IntegerField(verbose_name='School Factor 3')),
('f24', models.IntegerField(verbose_name='School Factor 4')),
('f25', models.IntegerField(verbose_name='School Factor 5')),
('total', models.IntegerField(default=0, null=True, verbose_name='Total')),
('over', models.IntegerField(default=0, null=True, verbose_name='Average')),
('o1', models.IntegerField(default=0, null=True, verbose_name='Overall 1')),
('o2', models.IntegerField(default=0, null=True, verbose_name='Overall 2')),
('o3', models.IntegerField(default=0, null=True, verbose_name='Overall 3')),
('o4', models.IntegerField(default=0, null=True, verbose_name='Overall 4')),
('o5', models.IntegerField(default=0, null=True, verbose_name='Overall 5')),
],
),
]
| 59.563636 | 172 | 0.587607 | 344 | 3,276 | 5.491279 | 0.281977 | 0.192165 | 0.330863 | 0.383801 | 0.733192 | 0.733192 | 0.407623 | 0.185283 | 0.137639 | 0 | 0 | 0.041718 | 0.260989 | 3,276 | 54 | 173 | 60.666667 | 0.738538 | 0.013736 | 0 | 0 | 1 | 0 | 0.180157 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.042553 | 0 | 0.12766 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
b0eaf3ab89863a731234fb9a339e971a8cab4f56 | 75 | py | Python | data_structures/__init__.py | JakobHavtorn/data-structures | d183599c357e6dd55736ba98cd099bd8f56e9940 | [
"MIT"
] | null | null | null | data_structures/__init__.py | JakobHavtorn/data-structures | d183599c357e6dd55736ba98cd099bd8f56e9940 | [
"MIT"
] | null | null | null | data_structures/__init__.py | JakobHavtorn/data-structures | d183599c357e6dd55736ba98cd099bd8f56e9940 | [
"MIT"
] | null | null | null | from .stack import Stack
from .queue import Queue
from .graph import Graph
| 18.75 | 24 | 0.8 | 12 | 75 | 5 | 0.416667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16 | 75 | 3 | 25 | 25 | 0.952381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
9fdb47be55366a500a51271e9ab59058fc7f6459 | 1,462 | py | Python | v1/data/src/db/write/main.py | avgupta456/statbotics | 8847cec161104ec54f4c501653cd4ec558d30379 | [
"MIT"
] | 14 | 2020-05-28T21:54:45.000Z | 2022-03-17T19:39:23.000Z | v1/data/src/db/write/main.py | avgupta456/statbotics | 8847cec161104ec54f4c501653cd4ec558d30379 | [
"MIT"
] | 59 | 2020-05-28T21:39:45.000Z | 2022-03-25T23:51:39.000Z | data/src/db/write/main.py | statbotics/statbotics | 37bb0e3730d5b3aff7b6a5ba6e78ef2eada950bc | [
"MIT"
] | 1 | 2020-07-04T07:30:40.000Z | 2020-07-04T07:30:40.000Z | from typing import List
from src.db.models.event import Event, EventORM
from src.db.models.match import Match, MatchORM
from src.db.models.team import Team, TeamORM
from src.db.models.team_event import TeamEvent, TeamEventORM
from src.db.models.team_match import TeamMatch, TeamMatchORM
from src.db.models.team_year import TeamYear, TeamYearORM
from src.db.models.year import Year, YearORM
from src.db.write.template import update_template
def update_events(items: List[Event], only_insert: bool = False) -> None:
return update_template(EventORM, Event)(items, only_insert)
def update_matches(items: List[Match], only_insert: bool = False) -> None:
return update_template(MatchORM, Match)(items, only_insert)
def update_teams(items: List[Team], only_insert: bool = False) -> None:
return update_template(TeamORM, Team)(items, only_insert)
def update_years(items: List[Year], only_insert: bool = False) -> None:
return update_template(YearORM, Year)(items, only_insert)
def update_team_events(items: List[TeamEvent], only_insert: bool = False) -> None:
return update_template(TeamEventORM, TeamEvent)(items, only_insert)
def update_team_matches(items: List[TeamMatch], only_insert: bool = False) -> None:
return update_template(TeamMatchORM, TeamMatch)(items, only_insert)
def update_team_years(items: List[TeamYear], only_insert: bool = False) -> None:
return update_template(TeamYearORM, TeamYear)(items, only_insert)
| 37.487179 | 83 | 0.776334 | 207 | 1,462 | 5.31401 | 0.173913 | 0.127273 | 0.065455 | 0.095455 | 0.484545 | 0.35 | 0.273636 | 0.273636 | 0 | 0 | 0 | 0 | 0.121067 | 1,462 | 38 | 84 | 38.473684 | 0.856031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.304348 | false | 0 | 0.391304 | 0.304348 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 4 |
b011142f477d5984acaeac1884e69fa9290fb6ac | 358 | py | Python | specifAimplementer/Bateau.py | kevinhassan/batailleNavalePython | ac7419b2616518157b03d96a8aa1623187a0decc | [
"MIT"
] | null | null | null | specifAimplementer/Bateau.py | kevinhassan/batailleNavalePython | ac7419b2616518157b03d96a8aa1623187a0decc | [
"MIT"
] | 1 | 2016-12-15T14:52:49.000Z | 2016-12-19T11:17:56.000Z | specifAimplementer/Bateau.py | kevinhassan/batailleNavalePython | ac7419b2616518157b03d96a8aa1623187a0decc | [
"MIT"
] | 1 | 2018-11-15T00:31:11.000Z | 2018-11-15T00:31:11.000Z | #! /usr/bin/python
#authors : Thais Aurard, Maxime Soustelle
class Bateau:
def positionsBateau(self):return
# Bateau --> [int x int](n)
def etatPosition(self):return
# Bateau --> [bool](n)
def longueurBateau(self):return
# Bateau --> int
def creerBateau(longueur, orientation, coordX, coordY):return
# int x str x int x int --> Bateau | 23.866667 | 63 | 0.675978 | 47 | 358 | 5.148936 | 0.553191 | 0.123967 | 0.198347 | 0.157025 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.189944 | 358 | 15 | 64 | 23.866667 | 0.834483 | 0.446927 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.8 | false | 0 | 0 | 0.8 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 4 |
b01bd9c05401621ebc2211d68708fce762768805 | 714 | py | Python | quarter.py | itsolver/fetch-bank-statements | a7b8a44047e3f70a4bc193b2136c6030d328320d | [
"MIT"
] | null | null | null | quarter.py | itsolver/fetch-bank-statements | a7b8a44047e3f70a4bc193b2136c6030d328320d | [
"MIT"
] | null | null | null | quarter.py | itsolver/fetch-bank-statements | a7b8a44047e3f70a4bc193b2136c6030d328320d | [
"MIT"
] | null | null | null | from datetime import date
import datetime
today = date.today()
def previous_quarter_end(ref):
if ref.month < 4:
return datetime.date(ref.year - 1, 12, 31)
elif ref.month < 7:
return datetime.date(ref.year, 3, 31)
elif ref.month < 10:
return datetime.date(ref.year, 6, 30)
return datetime.date(ref.year, 9, 30)
def previous_quarter_start(ref):
if ref.month < 4:
return datetime.date(ref.year - 1, 10, 1)
elif ref.month < 7:
return datetime.date(ref.year, 1, 1)
elif ref.month < 10:
return datetime.date(ref.year, 4, 1)
return datetime.date(ref.year, 7, 1)
print(previous_quarter_start(today))
print(previous_quarter_end(today))
| 24.62069 | 50 | 0.652661 | 111 | 714 | 4.126126 | 0.243243 | 0.244541 | 0.31441 | 0.366812 | 0.622271 | 0.5131 | 0.510917 | 0.510917 | 0.510917 | 0.174672 | 0 | 0.057971 | 0.226891 | 714 | 28 | 51 | 25.5 | 0.771739 | 0 | 0 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.095238 | false | 0 | 0.095238 | 0 | 0.571429 | 0.095238 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
b0274a0314cbe1e8220f031c80848f408da4f96b | 152 | py | Python | testsuite/utils.py | MarouenMechtri/accords-platform-1 | 4f950fffd9fbbf911840cc5ad0fe5b5a331edf42 | [
"Apache-2.0"
] | 1 | 2015-02-28T21:25:54.000Z | 2015-02-28T21:25:54.000Z | testsuite/utils.py | MarouenMechtri/compatibleone | 6e1be42ba023bb64421073d139dc57bb0386b180 | [
"Apache-2.0"
] | null | null | null | testsuite/utils.py | MarouenMechtri/compatibleone | 6e1be42ba023bb64421073d139dc57bb0386b180 | [
"Apache-2.0"
] | null | null | null | # vim: set et sw=4 ts=4 ai:
import os
import sys
devnull = open(os.devnull,"w")
sys.path.append('/tmp')
from cocredentials import User, Pass, Host
| 13.818182 | 42 | 0.690789 | 27 | 152 | 3.888889 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015873 | 0.171053 | 152 | 10 | 43 | 15.2 | 0.81746 | 0.164474 | 0 | 0 | 0 | 0 | 0.04 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.2 | 0.6 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 4 |
b044c6d1e403d63fdb1acebbec9f81e9cba35ede | 239 | py | Python | boto3_exceptions/xray.py | siteshen/boto3_exceptions | d6174c2577c9d4b17a09a89cd0e4bd1fe555b26b | [
"MIT"
] | 2 | 2021-06-22T00:00:35.000Z | 2021-07-15T03:25:52.000Z | boto3_exceptions/xray.py | siteshen/boto3_exceptions | d6174c2577c9d4b17a09a89cd0e4bd1fe555b26b | [
"MIT"
] | null | null | null | boto3_exceptions/xray.py | siteshen/boto3_exceptions | d6174c2577c9d4b17a09a89cd0e4bd1fe555b26b | [
"MIT"
] | null | null | null | import boto3
exceptions = boto3.client('xray').exceptions
InvalidRequestException = exceptions.InvalidRequestException
RuleLimitExceededException = exceptions.RuleLimitExceededException
ThrottledException = exceptions.ThrottledException
| 29.875 | 66 | 0.878661 | 16 | 239 | 13.125 | 0.5 | 0.314286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008969 | 0.066946 | 239 | 7 | 67 | 34.142857 | 0.932735 | 0 | 0 | 0 | 0 | 0 | 0.016736 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.2 | 0 | 1 | 0 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
b0550a922365caaaf754b070964964f9c5aa536b | 87 | py | Python | waterpump/modems/apps.py | hwan27/WATERPUMP_django | dcc6bf27ae3c0e6ca851e854e51fc512f96eab56 | [
"MIT"
] | null | null | null | waterpump/modems/apps.py | hwan27/WATERPUMP_django | dcc6bf27ae3c0e6ca851e854e51fc512f96eab56 | [
"MIT"
] | null | null | null | waterpump/modems/apps.py | hwan27/WATERPUMP_django | dcc6bf27ae3c0e6ca851e854e51fc512f96eab56 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class ModemsConfig(AppConfig):
name = 'modems'
| 14.5 | 33 | 0.747126 | 10 | 87 | 6.5 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.172414 | 87 | 5 | 34 | 17.4 | 0.902778 | 0 | 0 | 0 | 0 | 0 | 0.068966 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
c66f95657cec47dab442326976693a3767d5883e | 211 | py | Python | slovenian_press/__init__.py | mkorman9/ai_slovenian_press | 8087b9379e0cd3464d5aa21f6bf1bbff19a69fdf | [
"MIT"
] | null | null | null | slovenian_press/__init__.py | mkorman9/ai_slovenian_press | 8087b9379e0cd3464d5aa21f6bf1bbff19a69fdf | [
"MIT"
] | null | null | null | slovenian_press/__init__.py | mkorman9/ai_slovenian_press | 8087b9379e0cd3464d5aa21f6bf1bbff19a69fdf | [
"MIT"
] | null | null | null | import configuration
import commons
import output
import learning
import aggregation
import text
__author__ = 'Michal Korman'
__all__ = ['configuration', 'commons', 'output', 'learning', 'aggregation', 'text']
| 21.1 | 83 | 0.772512 | 22 | 211 | 7.045455 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.118483 | 211 | 9 | 84 | 23.444444 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0.293839 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.75 | 0 | 0.75 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
c68b910152b5315ae89e6dcb1f563e3ff9338bb1 | 67 | py | Python | code/abc100_a_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | 3 | 2019-08-16T16:55:48.000Z | 2021-04-11T10:21:40.000Z | code/abc100_a_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | code/abc100_a_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | a,b=map(int,input().split())
print("Yay!" if a<9 and b<9 else ":(") | 33.5 | 38 | 0.58209 | 15 | 67 | 2.6 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.033333 | 0.104478 | 67 | 2 | 38 | 33.5 | 0.616667 | 0 | 0 | 0 | 0 | 0 | 0.088235 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 4 |
c691a4182fd331075d4ab85ac63e5c558ec463a0 | 219 | py | Python | tests/api/catalog/test_catalog.py | mohamedfawzy96/python-amazon-sp-api | fb7fa85d06032e51b50d5fd7ed8d6082e88181a4 | [
"MIT"
] | null | null | null | tests/api/catalog/test_catalog.py | mohamedfawzy96/python-amazon-sp-api | fb7fa85d06032e51b50d5fd7ed8d6082e88181a4 | [
"MIT"
] | null | null | null | tests/api/catalog/test_catalog.py | mohamedfawzy96/python-amazon-sp-api | fb7fa85d06032e51b50d5fd7ed8d6082e88181a4 | [
"MIT"
] | null | null | null | from sp_api.api import Catalog
from sp_api.base import Marketplaces
def test_catalog_get_item():
asin = ''
print(Catalog().get_item(asin))
# print(Catalog(marketplace=Marketplaces.DE).list_items(EAN=''))
| 21.9 | 68 | 0.730594 | 31 | 219 | 4.935484 | 0.580645 | 0.078431 | 0.117647 | 0.235294 | 0.346405 | 0.346405 | 0 | 0 | 0 | 0 | 0 | 0 | 0.141553 | 219 | 9 | 69 | 24.333333 | 0.81383 | 0.283105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.4 | 0 | 0.6 | 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 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
c6c0782d94791c8b6b73371e6cd6e9994318d5f7 | 168 | py | Python | model_controller/mixins.py | Ic3Sandy/django-model-controller | 552a0a2360fbd82e7c25e560fc59c858d5d65943 | [
"BSD-2-Clause"
] | null | null | null | model_controller/mixins.py | Ic3Sandy/django-model-controller | 552a0a2360fbd82e7c25e560fc59c858d5d65943 | [
"BSD-2-Clause"
] | null | null | null | model_controller/mixins.py | Ic3Sandy/django-model-controller | 552a0a2360fbd82e7c25e560fc59c858d5d65943 | [
"BSD-2-Clause"
] | null | null | null | from braces.views import LoginRequiredMixin
from django.conf import settings
class ExtendedLoginRequiredMixin(LoginRequiredMixin):
login_url = settings.LOGIN_URL
| 24 | 53 | 0.845238 | 18 | 168 | 7.777778 | 0.666667 | 0.114286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.113095 | 168 | 6 | 54 | 28 | 0.939597 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
c6c5cffe0aba84af798b1932c46cbbf269330ad1 | 117 | py | Python | zoo/policies/keep_lane_agent.py | Semanti1/smarts_baseline | 77dbc350f37ae7735c74a2b8f1585c2818ac3421 | [
"MIT"
] | 554 | 2020-10-16T02:30:35.000Z | 2022-03-29T14:13:00.000Z | zoo/policies/keep_lane_agent.py | Semanti1/smarts_baseline | 77dbc350f37ae7735c74a2b8f1585c2818ac3421 | [
"MIT"
] | 917 | 2020-10-17T00:10:31.000Z | 2022-03-31T23:00:47.000Z | zoo/policies/keep_lane_agent.py | Semanti1/smarts_baseline | 77dbc350f37ae7735c74a2b8f1585c2818ac3421 | [
"MIT"
] | 135 | 2020-10-20T01:44:49.000Z | 2022-03-27T04:51:31.000Z | from smarts.core.agent import Agent
class KeepLaneAgent(Agent):
def act(self, obs):
return "keep_lane"
| 16.714286 | 35 | 0.692308 | 16 | 117 | 5 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.213675 | 117 | 6 | 36 | 19.5 | 0.869565 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 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 | 0 | 0 | 0 | 4 |
c6d17bc0b9efbba85f05f881a8f3c1da2545192d | 1,714 | py | Python | vector_objects.py | michaelwinn/python | e811c654f949b020aee5e10c5e2740d564fbc407 | [
"MIT"
] | null | null | null | vector_objects.py | michaelwinn/python | e811c654f949b020aee5e10c5e2740d564fbc407 | [
"MIT"
] | null | null | null | vector_objects.py | michaelwinn/python | e811c654f949b020aee5e10c5e2740d564fbc407 | [
"MIT"
] | null | null | null | import math
class Vector():
def __init__(self, data=[]):
self.data = data
def __add__(self, other_vector):
"""Define the additive property of vectors"""
num = []
for i in range(0,len(self.data)):
num.append(self.data[i] + other_vector.data[i])
return Vector(num)
def __sub__(self, other_vector):
num = []
for i in range(0,len(self.data)):
num.append(self.data[i] - other_vector.data[i])
return Vector(num)
def __mul__(self, other_vector):
if type(other_vector) == type(self):
return self.dot_product(other_vector)
elif isinstance(other_vector,int) or isinstance(other_vector,float):
num = []
for i in range(0,len(self.data)):
num.append(other_vector*self.data[i])
return Vector(num)
def __rmul__(self, other_vector):
return self.__mul__(other_vector)
def __truediv__(self, other_vector):
if isinstance(other_vector,int) or isinstance(other_vector,float):
num = []
for i in range(0,len(self.data)):
num.append(self.data[i] / other_vector)
return Vector(num)
else:
raise TypeError('Can only divide vector by scalar.')
def dot_product(self, other_vector):
num = 0
for i in range(0,len(self.data)):
num += self.data[i]*other_vector.data[i]
return num
def norm(self):
return math.sqrt(self.dot_product(self))
def __str__(self):
return str(self.data)
def __repr__(self):
return str(self.data)
def __iter__(self):
return self.data.__iter__()
| 29.551724 | 76 | 0.584014 | 225 | 1,714 | 4.16 | 0.226667 | 0.211538 | 0.096154 | 0.058761 | 0.510684 | 0.510684 | 0.434829 | 0.434829 | 0.401709 | 0.373932 | 0 | 0.004988 | 0.298133 | 1,714 | 57 | 77 | 30.070175 | 0.773067 | 0.022754 | 0 | 0.333333 | 0 | 0 | 0.019772 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.244444 | false | 0 | 0.022222 | 0.111111 | 0.533333 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 4 |
c6f3bc315f2f798ba901980610fc1376fe50e146 | 172 | py | Python | urllibLearing.py | ViterbiDevelopment/LearingPython | fb96de790a14650a90b9eb2d71f3ee6befde11e4 | [
"Apache-2.0"
] | null | null | null | urllibLearing.py | ViterbiDevelopment/LearingPython | fb96de790a14650a90b9eb2d71f3ee6befde11e4 | [
"Apache-2.0"
] | null | null | null | urllibLearing.py | ViterbiDevelopment/LearingPython | fb96de790a14650a90b9eb2d71f3ee6befde11e4 | [
"Apache-2.0"
] | null | null | null | # urlLib learing
import urllib2
import urllib
response = urllib2.urlopen('http://blog.csdn.net/pleasecallmewhy/article/details/8923067')
html = response.read()
print html | 21.5 | 90 | 0.790698 | 22 | 172 | 6.181818 | 0.772727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.057692 | 0.093023 | 172 | 8 | 91 | 21.5 | 0.814103 | 0.081395 | 0 | 0 | 0 | 0 | 0.382166 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.4 | null | null | 0.2 | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
c6f6c1cfeb04901024cc2f9c5713c0d10c1b16ef | 193 | py | Python | cookbook/tests/core/intermediate.py | frsann/flytesnacks | c788b79283d62788295ac3f059168113ec1e0a5a | [
"Apache-2.0"
] | 23 | 2021-02-12T05:46:56.000Z | 2022-03-23T08:21:23.000Z | cookbook/tests/core/intermediate.py | frsann/flytesnacks | c788b79283d62788295ac3f059168113ec1e0a5a | [
"Apache-2.0"
] | 154 | 2020-09-27T19:57:45.000Z | 2022-03-30T04:14:57.000Z | cookbook/tests/core/intermediate.py | frsann/flytesnacks | c788b79283d62788295ac3f059168113ec1e0a5a | [
"Apache-2.0"
] | 33 | 2020-09-25T19:16:31.000Z | 2022-02-11T15:07:55.000Z | from core.intermediate import custom_objects
def test_custom_objects():
res = custom_objects.wf(x=10, y=20)
assert res == custom_objects.Datum(x=30, y="1020", z={10: "10", 20: "20"})
| 27.571429 | 78 | 0.683938 | 32 | 193 | 3.96875 | 0.59375 | 0.409449 | 0.251969 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.109756 | 0.150259 | 193 | 6 | 79 | 32.166667 | 0.664634 | 0 | 0 | 0 | 0 | 0 | 0.041451 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
05c14a4b679b678271504f9f56a665649981ad86 | 95 | py | Python | backend/anotherapp/apps.py | manjunath-satyamurthy/manjunathsatyamurthy.com | 3d9d529afa4ec7f022008ea29bec98b7b0133f46 | [
"MIT"
] | null | null | null | backend/anotherapp/apps.py | manjunath-satyamurthy/manjunathsatyamurthy.com | 3d9d529afa4ec7f022008ea29bec98b7b0133f46 | [
"MIT"
] | 5 | 2020-06-06T00:58:41.000Z | 2021-09-08T01:48:18.000Z | anotherapp/apps.py | manjunath-satyamurthy/mysite-django-react | 5dc52d572552bb443b4ef5a3761b002bc2348f4e | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class AnotherappConfig(AppConfig):
name = 'anotherapp'
| 15.833333 | 34 | 0.768421 | 10 | 95 | 7.3 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.157895 | 95 | 5 | 35 | 19 | 0.9125 | 0 | 0 | 0 | 0 | 0 | 0.105263 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
05c5dcefbb378ffd4cdd9653bd779b0652e9bc80 | 78 | py | Python | action/__init__.py | J4CKVVH173/evolution2.0 | 8f36b010caf9f22b3d0fcb2d45b7a1020313266e | [
"MIT"
] | null | null | null | action/__init__.py | J4CKVVH173/evolution2.0 | 8f36b010caf9f22b3d0fcb2d45b7a1020313266e | [
"MIT"
] | null | null | null | action/__init__.py | J4CKVVH173/evolution2.0 | 8f36b010caf9f22b3d0fcb2d45b7a1020313266e | [
"MIT"
] | null | null | null | from .move import MoveBuilder
from .arbiter import HerbArbiter, ActionContext
| 26 | 47 | 0.846154 | 9 | 78 | 7.333333 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115385 | 78 | 2 | 48 | 39 | 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 | 0 | 0 | 0 | 4 |
af149536cf750ffd00b4a7460a87298982cdb8db | 246 | py | Python | onepanman_api/views/api/friend.py | Capstone-onepanman/api-server | 1a5174fbc441d2718f3963863590f634ba2014e1 | [
"MIT"
] | null | null | null | onepanman_api/views/api/friend.py | Capstone-onepanman/api-server | 1a5174fbc441d2718f3963863590f634ba2014e1 | [
"MIT"
] | 12 | 2020-03-24T18:09:30.000Z | 2022-03-12T00:15:07.000Z | onepanman_api/views/api/friend.py | Capstone-onepanman/api-server | 1a5174fbc441d2718f3963863590f634ba2014e1 | [
"MIT"
] | null | null | null | from rest_framework import viewsets
from onepanman_api.models import Friend
from onepanman_api.serializers.friend import FriendSerializer
class FriendViewSet(viewsets.ModelViewSet):
queryset = Friend
serializer_class = FriendSerializer | 27.333333 | 61 | 0.841463 | 27 | 246 | 7.518519 | 0.592593 | 0.128079 | 0.157635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121951 | 246 | 9 | 62 | 27.333333 | 0.939815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
afb27cec90b609a0cc93a80ebfd4a1d4d4dcc813 | 45 | py | Python | sksos/__init__.py | jeroenjanssens/scikit-sos | 615c1627ede2095c037ad6ad486f34eeea3e3338 | [
"BSD-3-Clause"
] | 48 | 2016-10-15T07:55:03.000Z | 2021-09-06T15:09:49.000Z | sksos/__init__.py | chrinide/scikit-sos | 615c1627ede2095c037ad6ad486f34eeea3e3338 | [
"BSD-3-Clause"
] | 6 | 2016-10-15T09:11:53.000Z | 2020-02-17T04:16:24.000Z | sksos/__init__.py | chrinide/scikit-sos | 615c1627ede2095c037ad6ad486f34eeea3e3338 | [
"BSD-3-Clause"
] | 18 | 2016-11-11T04:00:49.000Z | 2022-01-29T04:45:37.000Z | from .sos import SOS
__version__ = '0.1.10'
| 11.25 | 22 | 0.688889 | 8 | 45 | 3.375 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.108108 | 0.177778 | 45 | 3 | 23 | 15 | 0.621622 | 0 | 0 | 0 | 0 | 0 | 0.133333 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
bb629aedb23db252a770bb21f05707708bb10ac4 | 681 | py | Python | manti_by/apps/blog/migrations/0012_auto_20180425_1523.py | manti-by/m2 | ee2d2bad412c265962675c94dbfd29cdec07910c | [
"BSD-3-Clause"
] | 2 | 2017-09-07T09:28:29.000Z | 2018-04-10T03:03:32.000Z | manti_by/apps/blog/migrations/0012_auto_20180425_1523.py | manti-by/m2 | ee2d2bad412c265962675c94dbfd29cdec07910c | [
"BSD-3-Clause"
] | 11 | 2021-03-23T13:59:39.000Z | 2022-02-02T10:16:58.000Z | manti_by/apps/blog/migrations/0012_auto_20180425_1523.py | manti-by/Manti.by | ee2d2bad412c265962675c94dbfd29cdec07910c | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 1.11.12 on 2018-04-25 15:23
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("blog", "0011_auto_20170721_1151")]
operations = [
migrations.RenameField(
model_name="post", old_name="description_by", new_name="description_be"
),
migrations.RenameField(
model_name="post", old_name="meta_by", new_name="meta_be"
),
migrations.RenameField(
model_name="post", old_name="name_by", new_name="name_be"
),
migrations.RenameField(
model_name="post", old_name="summary_by", new_name="summary_be"
),
]
| 28.375 | 83 | 0.625551 | 80 | 681 | 5.0375 | 0.4375 | 0.208437 | 0.258065 | 0.297767 | 0.421836 | 0.421836 | 0.421836 | 0.320099 | 0 | 0 | 0 | 0.064706 | 0.251101 | 681 | 23 | 84 | 29.608696 | 0.72549 | 0.069016 | 0 | 0.470588 | 1 | 0 | 0.188291 | 0.036392 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.058824 | 0 | 0.235294 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
bb7afdf387e5d3bd1ecf1dcf5294705c317f5440 | 204 | py | Python | boards/urls.py | EthanYan6/forum_project | ec07dc3b6004b38f3fce36f559ac512af6fb2a46 | [
"MIT"
] | 3 | 2019-06-17T06:15:12.000Z | 2020-10-19T09:05:49.000Z | boards/urls.py | EthanYan6/forum_project | ec07dc3b6004b38f3fce36f559ac512af6fb2a46 | [
"MIT"
] | null | null | null | boards/urls.py | EthanYan6/forum_project | ec07dc3b6004b38f3fce36f559ac512af6fb2a46 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from boards import views
# urlpatterns = [
# # url(r'^$', views.home, name='home'),
# url(r'^boards/(?P<pk>\d+)/$', views.board_topics, name='board_topics'),
# ] | 25.5 | 77 | 0.622549 | 29 | 204 | 4.310345 | 0.586207 | 0.064 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.156863 | 204 | 8 | 78 | 25.5 | 0.726744 | 0.661765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
bbbd33f1f54eef672db583aebe4970b99cc543ea | 250 | py | Python | eds/openmtc-gevent/common/openmtc/src/openmtc/mapper/TestMapper.py | piyush82/elastest-device-emulator-service | b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7 | [
"Apache-2.0"
] | null | null | null | eds/openmtc-gevent/common/openmtc/src/openmtc/mapper/TestMapper.py | piyush82/elastest-device-emulator-service | b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7 | [
"Apache-2.0"
] | null | null | null | eds/openmtc-gevent/common/openmtc/src/openmtc/mapper/TestMapper.py | piyush82/elastest-device-emulator-service | b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7 | [
"Apache-2.0"
] | null | null | null | '''
Created on 04.06.2013
@author: kca
'''
from openmtc.mapper import BasicMapper
class TestMapper(BasicMapper):
def _send_request_indication(self, request_indication):
self.logger.info("Request indication: %s" % (request_indication, )) | 25 | 75 | 0.74 | 30 | 250 | 6 | 0.733333 | 0.377778 | 0.233333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.037209 | 0.14 | 250 | 10 | 75 | 25 | 0.8 | 0.14 | 0 | 0 | 0 | 0 | 0.105769 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
bbbf0bfc7296b64822e389c0759bb77d12976398 | 164 | py | Python | hong/datasets/HKU_IS/__init__.py | SherylHYX/Ro-SOS-Metric-Expression-Network-MEnet-for-Robust-Salient-Object-Segmentation | d774372e474161aae4dd26a033ae3858ed7255cf | [
"MIT"
] | 2 | 2021-12-21T03:20:28.000Z | 2022-02-08T12:35:34.000Z | hong/datasets/HKU_IS/__init__.py | SherylHYX/Ro-SOS-Metric-Expression-Network-MEnet-for-Robust-Salient-Object-Segmentation | d774372e474161aae4dd26a033ae3858ed7255cf | [
"MIT"
] | null | null | null | hong/datasets/HKU_IS/__init__.py | SherylHYX/Ro-SOS-Metric-Expression-Network-MEnet-for-Robust-Salient-Object-Segmentation | d774372e474161aae4dd26a033ae3858ed7255cf | [
"MIT"
] | null | null | null | import scipy.io
tsplit = scipy.io.loadmat('datasets/HKU_IS/testImgSet')
data = {'HKU_IS': ['datasets/HKU_IS/imgs/'+line[0][0] for line in tsplit['testImgSet']]}
| 41 | 89 | 0.707317 | 26 | 164 | 4.346154 | 0.576923 | 0.132743 | 0.230089 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013514 | 0.097561 | 164 | 3 | 90 | 54.666667 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0.391304 | 0.291925 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
bbcf4f1d4e64c215209707bf930210cc2ee4617e | 138 | py | Python | server/src/__init__.py | Opportunity-Hack-2015-Arizona/Team1 | 49b432d1e1bfae90551967f796338cfb9da6a89d | [
"MIT"
] | 1 | 2015-10-11T05:33:44.000Z | 2015-10-11T05:33:44.000Z | server/src/__init__.py | Opportunity-Hack-2015-Arizona/Team1 | 49b432d1e1bfae90551967f796338cfb9da6a89d | [
"MIT"
] | null | null | null | server/src/__init__.py | Opportunity-Hack-2015-Arizona/Team1 | 49b432d1e1bfae90551967f796338cfb9da6a89d | [
"MIT"
] | null | null | null | from flask import Flask
from db_layer import GideonDatabaseClient
app = Flask(__name__)
db = GideonDatabaseClient()
from views import *
| 17.25 | 41 | 0.804348 | 17 | 138 | 6.235294 | 0.529412 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.144928 | 138 | 7 | 42 | 19.714286 | 0.898305 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.6 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
a51f96413c53b5b63af5ccc224b1e2b3df25529d | 1,132 | py | Python | location/migrations/0002_auto_20170217_1544.py | 9sneha-n/pari | 78e1e4851e484c076ce6ba3c76d1db081aacbc9a | [
"BSD-3-Clause"
] | 35 | 2015-10-04T17:07:20.000Z | 2022-03-23T08:10:13.000Z | location/migrations/0002_auto_20170217_1544.py | 9sneha-n/pari | 78e1e4851e484c076ce6ba3c76d1db081aacbc9a | [
"BSD-3-Clause"
] | 322 | 2015-07-31T17:06:47.000Z | 2022-02-10T07:17:55.000Z | location/migrations/0002_auto_20170217_1544.py | 9sneha-n/pari | 78e1e4851e484c076ce6ba3c76d1db081aacbc9a | [
"BSD-3-Clause"
] | 14 | 2016-05-09T10:50:20.000Z | 2021-05-08T14:48:51.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('location', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='location',
name='mandapam',
field=models.CharField(max_length=100, null=True, blank=True),
),
migrations.AddField(
model_name='location',
name='others',
field=models.CharField(max_length=100, null=True, blank=True),
),
migrations.AddField(
model_name='location',
name='sub_district',
field=models.CharField(max_length=100, null=True, blank=True),
),
migrations.AddField(
model_name='location',
name='taluka',
field=models.CharField(max_length=100, null=True, blank=True),
),
migrations.AddField(
model_name='location',
name='tehsil',
field=models.CharField(max_length=100, null=True, blank=True),
),
]
| 28.3 | 74 | 0.568021 | 109 | 1,132 | 5.743119 | 0.330275 | 0.14377 | 0.183706 | 0.215655 | 0.702875 | 0.702875 | 0.640575 | 0.640575 | 0.640575 | 0.640575 | 0 | 0.025575 | 0.309187 | 1,132 | 39 | 75 | 29.025641 | 0.774936 | 0.018551 | 0 | 0.606061 | 0 | 0 | 0.088368 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.060606 | 0 | 0.151515 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
a5261b238c4a4f75d4ac279b5757faeba9387306 | 144 | py | Python | amadeus/airport/__init__.py | minjikarin/amadeus-python | 14a004912ee8c36ee4fd79651ea1b23afe6b2a6e | [
"MIT"
] | null | null | null | amadeus/airport/__init__.py | minjikarin/amadeus-python | 14a004912ee8c36ee4fd79651ea1b23afe6b2a6e | [
"MIT"
] | null | null | null | amadeus/airport/__init__.py | minjikarin/amadeus-python | 14a004912ee8c36ee4fd79651ea1b23afe6b2a6e | [
"MIT"
] | null | null | null | from ._predictions import AirportOnTime
from ._direct_destinations import DirectDestinations
__all__ = ['AirportOnTime', 'DirectDestinations']
| 28.8 | 52 | 0.840278 | 12 | 144 | 9.5 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.090278 | 144 | 4 | 53 | 36 | 0.870229 | 0 | 0 | 0 | 0 | 0 | 0.215278 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
a58c03a757c74f4ed12896520ace3dfe16252247 | 421 | py | Python | test/conftest.py | KMilhan/wc_over_internet | b275eb125d81328879a80e35d6611b02f70da1b9 | [
"Unlicense"
] | null | null | null | test/conftest.py | KMilhan/wc_over_internet | b275eb125d81328879a80e35d6611b02f70da1b9 | [
"Unlicense"
] | null | null | null | test/conftest.py | KMilhan/wc_over_internet | b275eb125d81328879a80e35d6611b02f70da1b9 | [
"Unlicense"
] | null | null | null | import pytest
from simplewc.storage import MockDocumentStorage, MockQueryCache
@pytest.fixture(scope="function")
def mock_doc_storage():
yield MockDocumentStorage("")
@pytest.fixture(scope="function")
def mock_query_cache():
yield MockQueryCache("")
def mds():
"""Get mock document storage"""
return MockDocumentStorage("")
def mqc():
"""Get mock query cache"""
return MockQueryCache("")
| 17.541667 | 64 | 0.710214 | 44 | 421 | 6.704545 | 0.477273 | 0.088136 | 0.122034 | 0.176271 | 0.223729 | 0.223729 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15677 | 421 | 23 | 65 | 18.304348 | 0.830986 | 0.109264 | 0 | 0.166667 | 0 | 0 | 0.043956 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 0 | 0.166667 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
a591d1b3fad13cdb42aa6452420680b58f25bb01 | 117 | py | Python | osprey/__init__.py | khatuka31/osprey | 4bfbb1430db8632d1234597b9a97bcdbed2e21a2 | [
"Apache-2.0"
] | 59 | 2016-03-10T08:12:23.000Z | 2021-03-01T12:33:03.000Z | osprey/__init__.py | khatuka31/osprey | 4bfbb1430db8632d1234597b9a97bcdbed2e21a2 | [
"Apache-2.0"
] | 112 | 2016-03-04T22:34:01.000Z | 2020-11-14T15:11:26.000Z | osprey/__init__.py | khatuka31/osprey | 4bfbb1430db8632d1234597b9a97bcdbed2e21a2 | [
"Apache-2.0"
] | 15 | 2016-03-10T07:13:44.000Z | 2020-03-17T02:25:45.000Z | # Don't disallow importing osprey.version the module
from .version import version as _version
__version__ = _version
| 29.25 | 52 | 0.820513 | 16 | 117 | 5.625 | 0.6875 | 0.311111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136752 | 117 | 3 | 53 | 39 | 0.891089 | 0.42735 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
3c0453bde354a282bd5ae01bc3698683d9ca1b6e | 1,205 | py | Python | S4/S4 Library/simulation/lot_decoration/lot_decoration.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | 1 | 2021-05-20T19:33:37.000Z | 2021-05-20T19:33:37.000Z | S4/S4 Library/simulation/lot_decoration/lot_decoration.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | S4/S4 Library/simulation/lot_decoration/lot_decoration.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | from interactions.utils.display_mixin import get_display_mixin
from lot_decoration.lot_decoration_enums import DecorationLocation, DecorationPickerCategory
from sims4.tuning.instances import HashedTunedInstanceMetaclass
from sims4.tuning.tunable import HasTunableReference, TunableDecoTrim, TunableEnumSet
import services
import sims4
class LotDecoration(HasTunableReference, get_display_mixin(has_icon=True, has_description=True, has_tooltip=True), metaclass=HashedTunedInstanceMetaclass, manager=services.get_instance_manager(sims4.resources.Types.LOT_DECORATION)):
INSTANCE_TUNABLES = {'decoration_resource': TunableDecoTrim(description='\n The catalog decoration resource used for this lot decoration.\n '), 'available_locations': TunableEnumSet(description='\n The locations where this decoration may be applied. Used for\n picker filtering.\n ', enum_type=DecorationLocation), 'picker_categories': TunableEnumSet(description='\n The categories this decoration applies to. Used for picker\n drop-down filtering.\n ', enum_type=DecorationPickerCategory, default_enum_list=(DecorationPickerCategory.ALL,))}
| 120.5 | 635 | 0.788382 | 129 | 1,205 | 7.193798 | 0.457364 | 0.056034 | 0.048491 | 0.0625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003868 | 0.141909 | 1,205 | 9 | 636 | 133.888889 | 0.893617 | 0 | 0 | 0 | 0 | 0 | 0.319502 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.75 | 0 | 1 | 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 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
3c41214cd7a6483d61532732e65c58853873b353 | 924 | py | Python | classic/exceptions.py | codefresh-customer-success/yeti | 70ce4798591bbc279dbe397fd1173aed969da7f9 | [
"MIT"
] | null | null | null | classic/exceptions.py | codefresh-customer-success/yeti | 70ce4798591bbc279dbe397fd1173aed969da7f9 | [
"MIT"
] | null | null | null | classic/exceptions.py | codefresh-customer-success/yeti | 70ce4798591bbc279dbe397fd1173aed969da7f9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
### IMPORTS ###
### GLOBALS ###
### FUNCTIONS ###
### CLASSES ###
class ManifestMissingValueException(Exception):
pass
class ManifestEmptyException(Exception):
pass
class InvalidYamlAsPipeline(Exception):
pass
class InvalidYamlAsIngress(Exception):
pass
class OnlySupportGitTriggerException(Exception):
pass
class OnlySupportGithubProvider(Exception):
pass
class StepTypeNotSupported(Exception):
pass
class ParallelModeNotSupported(Exception):
pass
class ImageRequired(Exception):
pass
class EmptyObjectException(Exception):
pass
class VariableNotSupportedInField(Exception):
pass
class VariableSourceNotSupported(Exception):
pass
class OnlyOneEventSupportbyTrigger(Exception):
pass
class ShellTypeNotSupported(Exception):
pass
class ConditionStateNotSupported(Exception):
pass
class OnlyStepConditionsSupported(Exception):
pass | 22 | 48 | 0.771645 | 72 | 924 | 9.902778 | 0.375 | 0.291725 | 0.378682 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001266 | 0.145022 | 924 | 42 | 49 | 22 | 0.901266 | 0.062771 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 4 |
3c444d852936795428074bbe202a2af157d12953 | 77 | py | Python | crawler/__init__.py | umatbro/crawler-helper | dbdc2f2766abeef0a3a29a3e16642764822b1d47 | [
"MIT"
] | null | null | null | crawler/__init__.py | umatbro/crawler-helper | dbdc2f2766abeef0a3a29a3e16642764822b1d47 | [
"MIT"
] | 3 | 2019-09-19T15:02:29.000Z | 2019-09-25T22:15:45.000Z | crawler/__init__.py | umatbro/crawler-helper | dbdc2f2766abeef0a3a29a3e16642764822b1d47 | [
"MIT"
] | null | null | null | from crawler.celery_cfg import app as celery_app
__all__ = ('celery_app', )
| 19.25 | 48 | 0.766234 | 12 | 77 | 4.333333 | 0.666667 | 0.346154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 77 | 3 | 49 | 25.666667 | 0.787879 | 0 | 0 | 0 | 0 | 0 | 0.12987 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
3c5a952247cf0446d1a6eddbfd85f1045a04548a | 85 | py | Python | sermon/interface/themes.py | eeshiken/Sermon | 42c89b388267905c822d0a1aecc0b0e2c719e341 | [
"MIT"
] | null | null | null | sermon/interface/themes.py | eeshiken/Sermon | 42c89b388267905c822d0a1aecc0b0e2c719e341 | [
"MIT"
] | null | null | null | sermon/interface/themes.py | eeshiken/Sermon | 42c89b388267905c822d0a1aecc0b0e2c719e341 | [
"MIT"
] | null | null | null | from sermon.resources import loadStyleSheet
DARK_STYLE = loadStyleSheet('dark.css')
| 21.25 | 43 | 0.823529 | 10 | 85 | 6.9 | 0.8 | 0.521739 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.094118 | 85 | 3 | 44 | 28.333333 | 0.896104 | 0 | 0 | 0 | 0 | 0 | 0.094118 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
3c691166b67ccc03851c0ee74fd54962be67fe49 | 627 | py | Python | list2/task2/test_block.py | KamilKrol5/metaheuristics-algorithms | 19270489fe54c7288429c6edbd7940bcb73bb481 | [
"MIT"
] | null | null | null | list2/task2/test_block.py | KamilKrol5/metaheuristics-algorithms | 19270489fe54c7288429c6edbd7940bcb73bb481 | [
"MIT"
] | null | null | null | list2/task2/test_block.py | KamilKrol5/metaheuristics-algorithms | 19270489fe54c7288429c6edbd7940bcb73bb481 | [
"MIT"
] | null | null | null | from unittest import TestCase
from task2 import _Block
class TestBlock(TestCase):
def test_contains(self):
block = _Block(105, 120, 10, 20, value_inside=255)
self.assertTrue(block.contains(105, 120))
self.assertTrue(block.contains(106, 139))
self.assertTrue(block.contains(114, 120))
self.assertTrue(block.contains(110, 125))
self.assertFalse(block.contains(106, 141))
self.assertFalse(block.contains(105, 119))
self.assertFalse(block.contains(104, 125))
self.assertFalse(block.contains(115, 120))
self.assertFalse(block.contains(100, 145))
| 36.882353 | 58 | 0.681021 | 78 | 627 | 5.423077 | 0.410256 | 0.276596 | 0.236407 | 0.330969 | 0.288416 | 0 | 0 | 0 | 0 | 0 | 0 | 0.134921 | 0.196172 | 627 | 16 | 59 | 39.1875 | 0.704365 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.642857 | 1 | 0.071429 | false | 0 | 0.142857 | 0 | 0.285714 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
3c6ed2553a73c7466ce08567667ce7e7e0b9ded1 | 160 | py | Python | kili/queries/tool/queries.py | marcenacp/kili-playground | d3a711d1908725d127cc99ceb504301482bf41d8 | [
"Apache-2.0"
] | null | null | null | kili/queries/tool/queries.py | marcenacp/kili-playground | d3a711d1908725d127cc99ceb504301482bf41d8 | [
"Apache-2.0"
] | null | null | null | kili/queries/tool/queries.py | marcenacp/kili-playground | d3a711d1908725d127cc99ceb504301482bf41d8 | [
"Apache-2.0"
] | null | null | null | from .fragments import TOOL_FRAGMENT
GQL_GET_TOOLS = f'''
query($projectID: ID!) {{
data: getTools(projectID: $projectID) {{
{TOOL_FRAGMENT}
}}
}}
'''
| 16 | 42 | 0.65625 | 18 | 160 | 5.611111 | 0.777778 | 0.237624 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16875 | 160 | 9 | 43 | 17.777778 | 0.759399 | 0 | 0 | 0.25 | 0 | 0 | 0.6125 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.125 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
3c8a1f830c7f047ef07d8911eb4ff5b21e84ba0a | 245 | py | Python | cdm_souffleur/model/unauthorized_reset_pwd_request.py | alexanderlopoukhov/CDMSouffleur | 2f44624d956c5b3e2d8b7b6d92b7a9d808b7bfed | [
"Apache-2.0"
] | 9 | 2021-05-06T15:38:17.000Z | 2022-02-22T16:00:56.000Z | cdm_souffleur/model/unauthorized_reset_pwd_request.py | alexanderlopoukhov/CDMSouffleur | 2f44624d956c5b3e2d8b7b6d92b7a9d808b7bfed | [
"Apache-2.0"
] | 12 | 2019-02-28T13:16:42.000Z | 2021-03-16T09:37:40.000Z | cdm_souffleur/model/unauthorized_reset_pwd_request.py | alexanderlopoukhov/CDMSouffleur | 2f44624d956c5b3e2d8b7b6d92b7a9d808b7bfed | [
"Apache-2.0"
] | 3 | 2019-03-11T17:31:26.000Z | 2019-09-04T19:45:44.000Z | from peewee import AutoField, CharField, DateTimeField
from cdm_souffleur.model.baseModel import BaseModel
class unauthorized_reset_pwd_request(BaseModel):
report_id = AutoField()
username = CharField()
report_date = DateTimeField() | 35 | 54 | 0.8 | 27 | 245 | 7.037037 | 0.703704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.134694 | 245 | 7 | 55 | 35 | 0.896226 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
b1b24db1216a51926539e1e7a065bcf29aeb66a0 | 2,126 | py | Python | MeshTestConsole/lib/ANSIEscape.py | dntoll/loraMesh | c157182d23f659572799b60e07094e4e9809a1f2 | [
"MIT"
] | null | null | null | MeshTestConsole/lib/ANSIEscape.py | dntoll/loraMesh | c157182d23f659572799b60e07094e4e9809a1f2 | [
"MIT"
] | null | null | null | MeshTestConsole/lib/ANSIEscape.py | dntoll/loraMesh | c157182d23f659572799b60e07094e4e9809a1f2 | [
"MIT"
] | null | null | null | class ANSIEscape:
COLORS = {
"Black": "0",
"Red": "1",
"Green": "2",
"Yellow": "3",
"Blue": "4",
"Magenta": "5",
"Cyan": "6",
"White": "7",}
def getTextColor(colorString):
return "\u001b[3" + ANSIEscape.COLORS[colorString] + "m"
def getBrightColor(colorString):
return "\u001b[3" + ANSIEscape.COLORS[colorString] + ";1m"
def getBackgroundColor(colorString):
return "\u001b[4"+ ANSIEscape.COLORS[colorString] + "m"
def getBrightBackgroundColor(colorString):
return "\u001b[4"+ ANSIEscape.COLORS[colorString] + ";1m"
#RGB between 0-5
def getColorBackgroundColorRGB(r, g, b):
index = 16 + 36 * r + 6 * g + b
return "\u001b[48;5;" + str(index) + "m"
""" https://en.wikipedia.org/wiki/ANSI_escape_code
0- 7: standard colors (as in ESC [ 30–37 m)
8- 15: high intensity colors (as in ESC [ 90–97 m)
16-231: 6 × 6 × 6 cube (216 colors): 16 + 36 × r + 6 × g + b (0 ≤ r, g, b ≤ 5)
232-255: grayscale from black to white in 24 steps"""
def getResetCode():
return "\u001b[0m"
def getBold():
return "\u001b[1m"
def getUnderline():
return "\u001b[4m"
def getReversed():
return "\u001b[7m"
def goToXY(x, y):
return "\u001b[" +str(y) + ";"+ str(x)+"H"
def clearScreen():
return "\u001b[2J"
def moveCursorUp(n):
return "\u001b[{n}A"
def moveCursorDown(n):
return "\u001b[{n}B"
def moveCursorRight(n):
return "\u001b[{n}C"
def moveCursorLeft(n):
return "\u001b[{n}D"
def clearFromCursorToEnd():
return "\u001b[0J"
def clearFromCursorToBeginning():
return "\u001b[1J"
def clearScreen():
return "\u001b[2J"
def clearLineCursorToEnd():
return "\u001b[0K"
def clearLineCursorToStart():
return "\u001b[1K"
def clearLine():
return "\u001b[2K"
def saveState():
return "\u001b7"
def loadState():
return "\u001b8"
| 25.614458 | 87 | 0.539981 | 250 | 2,126 | 4.616 | 0.432 | 0.200173 | 0.076257 | 0.045061 | 0.232236 | 0.225303 | 0.17331 | 0 | 0 | 0 | 0 | 0.098372 | 0.306679 | 2,126 | 82 | 88 | 25.926829 | 0.679104 | 0.007056 | 0 | 0.070175 | 0 | 0 | 0.148272 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.403509 | false | 0 | 0 | 0.385965 | 0.842105 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 4 |
b1ba70ea11bf065b1365ca873f5053f7667f57de | 88 | py | Python | loqusdb/exceptions/__init__.py | bjhall/loqusdb | 55ee806662848eeffd266bf65d4b4eb24e534a89 | [
"MIT"
] | 4 | 2018-06-04T12:42:45.000Z | 2021-03-29T20:36:12.000Z | loqusdb/exceptions/__init__.py | bjhall/loqusdb | 55ee806662848eeffd266bf65d4b4eb24e534a89 | [
"MIT"
] | 50 | 2016-02-26T07:54:39.000Z | 2021-10-12T07:52:01.000Z | loqusdb/exceptions/__init__.py | bjhall/loqusdb | 55ee806662848eeffd266bf65d4b4eb24e534a89 | [
"MIT"
] | 8 | 2016-02-29T13:50:46.000Z | 2020-04-22T10:15:23.000Z | from .case import CaseError
from .vcf import VcfError
from .profile import ProfileError
| 22 | 33 | 0.829545 | 12 | 88 | 6.083333 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136364 | 88 | 3 | 34 | 29.333333 | 0.960526 | 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 | 0 | 0 | 0 | 4 |
b1cde0c5f743caeeeaa52d6ca2d08b1a49d66481 | 821 | py | Python | build/ros/common_msgs/shape_msgs/cmake/shape_msgs-genmsg-context.py | hyu-nani/ydlidar_ws | 56316db999c057c4315a20ba8277826d6a043120 | [
"MIT"
] | 1 | 2021-11-08T12:24:24.000Z | 2021-11-08T12:24:24.000Z | build/ros/common_msgs/shape_msgs/cmake/shape_msgs-genmsg-context.py | hyu-nani/ydlidar_ws | 56316db999c057c4315a20ba8277826d6a043120 | [
"MIT"
] | null | null | null | build/ros/common_msgs/shape_msgs/cmake/shape_msgs-genmsg-context.py | hyu-nani/ydlidar_ws | 56316db999c057c4315a20ba8277826d6a043120 | [
"MIT"
] | null | null | null | # generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/pls/ydlidar_ws/src/ros/common_msgs/shape_msgs/msg/Mesh.msg;/home/pls/ydlidar_ws/src/ros/common_msgs/shape_msgs/msg/MeshTriangle.msg;/home/pls/ydlidar_ws/src/ros/common_msgs/shape_msgs/msg/Plane.msg;/home/pls/ydlidar_ws/src/ros/common_msgs/shape_msgs/msg/SolidPrimitive.msg"
services_str = ""
pkg_name = "shape_msgs"
dependencies_str = "geometry_msgs;std_msgs"
langs = "gencpp;genlisp;genpy"
dep_include_paths_str = "shape_msgs;/home/pls/ydlidar_ws/src/ros/common_msgs/shape_msgs/msg;geometry_msgs;/home/pls/ydlidar_ws/src/ros/common_msgs/geometry_msgs/msg;std_msgs;/usr/share/std_msgs/cmake/../msg"
PYTHON_EXECUTABLE = "/usr/bin/python3"
package_has_static_sources = '' == 'TRUE'
genmsg_check_deps_script = "/usr/lib/genmsg/genmsg_check_deps.py"
| 68.416667 | 295 | 0.812424 | 137 | 821 | 4.569343 | 0.372263 | 0.100639 | 0.134185 | 0.153355 | 0.429712 | 0.429712 | 0.429712 | 0.429712 | 0.429712 | 0.365815 | 0 | 0.001271 | 0.041413 | 821 | 11 | 296 | 74.636364 | 0.794155 | 0.059683 | 0 | 0 | 1 | 0.222222 | 0.736364 | 0.671429 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
b1e35f9dfe3c410e7da69c8ffe94e017b2876609 | 35 | py | Python | opalalgorithms/__init__.py | shubhamjain0594/opalalgorithms | d575747f2e45672b88f2545ff79c9ae771e483a6 | [
"MIT"
] | 8 | 2018-11-06T10:16:34.000Z | 2021-04-23T14:05:07.000Z | opalalgorithms/__init__.py | OPAL-Project/opalalgorithms | d575747f2e45672b88f2545ff79c9ae771e483a6 | [
"MIT"
] | 2 | 2018-01-15T21:44:09.000Z | 2018-03-19T14:35:42.000Z | opalalgorithms/__init__.py | OPAL-Project/opalalgorithms | d575747f2e45672b88f2545ff79c9ae771e483a6 | [
"MIT"
] | null | null | null | """Initialization of submodule."""
| 17.5 | 34 | 0.714286 | 3 | 35 | 8.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085714 | 35 | 1 | 35 | 35 | 0.78125 | 0.8 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
b1f6ed43ef06f59526897be53003bad925d8c723 | 164 | py | Python | problem0389.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | problem0389.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | problem0389.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | ###########################
#
# #389 Platonic Dice - Project Euler
# https://projecteuler.net/problem=389
#
# Code by Kevin Marciniak
#
###########################
| 18.222222 | 38 | 0.469512 | 14 | 164 | 5.5 | 0.928571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.041379 | 0.115854 | 164 | 8 | 39 | 20.5 | 0.489655 | 0.573171 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
59140e3ca64814d12c41bbbe9d83fa8d88217568 | 86 | py | Python | src/bigbluebutton/__init__.py | Th3R3alDuk3/BigBlueButtonDownloader | fc5374a5f3d6b24329eaa249ea9ca85b65d7664a | [
"MIT"
] | 18 | 2021-01-23T14:19:57.000Z | 2022-03-10T19:54:49.000Z | src/bigbluebutton/__init__.py | Th3R3alDuk3/BigBlueButtonDownloader | fc5374a5f3d6b24329eaa249ea9ca85b65d7664a | [
"MIT"
] | 2 | 2021-04-08T11:00:57.000Z | 2021-08-21T11:16:13.000Z | src/bigbluebutton/__init__.py | Th3R3alDuk3/BigBlueButtonDownloader | fc5374a5f3d6b24329eaa249ea9ca85b65d7664a | [
"MIT"
] | 1 | 2021-03-22T10:56:46.000Z | 2021-03-22T10:56:46.000Z | from .webview import WebView
from .downloader import Downloader
__version__ = "v1.3"
| 17.2 | 34 | 0.790698 | 11 | 86 | 5.818182 | 0.636364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027027 | 0.139535 | 86 | 4 | 35 | 21.5 | 0.837838 | 0 | 0 | 0 | 0 | 0 | 0.046512 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 4 |
59152e6e0db70a9def2cf86a6464f79fb6f0bbc6 | 114 | py | Python | libraries/Mongo/exception.py | fabiano-teichmann/robot_guide | e5e9521ebddec22c082a9da227cdef7d54591ab5 | [
"Apache-1.1"
] | null | null | null | libraries/Mongo/exception.py | fabiano-teichmann/robot_guide | e5e9521ebddec22c082a9da227cdef7d54591ab5 | [
"Apache-1.1"
] | null | null | null | libraries/Mongo/exception.py | fabiano-teichmann/robot_guide | e5e9521ebddec22c082a9da227cdef7d54591ab5 | [
"Apache-1.1"
] | null | null | null | class NotFound(Exception):
def __init__(self, *args):
super().__init__(f"Not found query - {args}")
| 19 | 53 | 0.631579 | 14 | 114 | 4.571429 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.210526 | 114 | 5 | 54 | 22.8 | 0.711111 | 0 | 0 | 0 | 0 | 0 | 0.214286 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 |
591f419fd81550734482197d6f99a0e5b44e4a97 | 1,067 | py | Python | type-hints/example/01_builtin-type.py | chenpota/python | 314b61d890dd9b38a668e20353bbc949621d075b | [
"MIT"
] | 3 | 2017-05-02T09:59:18.000Z | 2017-05-10T03:25:25.000Z | type-hints/example/01_builtin-type.py | chenpota/python | 314b61d890dd9b38a668e20353bbc949621d075b | [
"MIT"
] | null | null | null | type-hints/example/01_builtin-type.py | chenpota/python | 314b61d890dd9b38a668e20353bbc949621d075b | [
"MIT"
] | null | null | null | def pass_int(v: int) -> None:
pass
pass_int(3.4) # error
pass_int(5)
#######################################
def pass_float(v: float) -> None:
pass
pass_float(3.4)
pass_float(5)
#######################################
def pass_str(v: str) -> None:
pass
pass_str('text')
pass_str(3.4) # error
#######################################
def pass_bool(v: bool) -> None:
pass
pass_bool(3 == 3)
pass_bool(3) # error
#######################################
def pass_list(v: list) -> None:
pass
pass_list([])
pass_list([1, 's'])
pass_list(()) # error
#######################################
def pass_tuple(v: tuple) -> None:
pass
pass_tuple(())
pass_tuple((1, 's'))
pass_tuple([]) # error
#######################################
def get_int_v1() -> int:
return 1
def get_int_v2() -> int:
return 1.0 # error
#######################################
def get_float_v1() -> float:
return 1.0
def get_float_v2() -> float:
return 1
#######################################
def get_str() -> str:
return 'text'
| 15.028169 | 39 | 0.42268 | 128 | 1,067 | 3.296875 | 0.171875 | 0.099526 | 0.170616 | 0.061611 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02593 | 0.168697 | 1,067 | 70 | 40 | 15.242857 | 0.449831 | 0.032802 | 0 | 0.277778 | 0 | 0 | 0.014025 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.305556 | false | 0.722222 | 0 | 0.138889 | 0.444444 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 4 |
594188c3ed7e2dbb9104a5a3882e940753c09ec9 | 33 | py | Python | tests/__init__.py | muditbac/dtd | 356a78e6eda45ff96a171d7891d2881714f6b4c2 | [
"MIT"
] | null | null | null | tests/__init__.py | muditbac/dtd | 356a78e6eda45ff96a171d7891d2881714f6b4c2 | [
"MIT"
] | null | null | null | tests/__init__.py | muditbac/dtd | 356a78e6eda45ff96a171d7891d2881714f6b4c2 | [
"MIT"
] | null | null | null | """Unit test package for dtd."""
| 16.5 | 32 | 0.636364 | 5 | 33 | 4.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.151515 | 33 | 1 | 33 | 33 | 0.75 | 0.787879 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
3ccec5cf967ac3ab471c95f658b2d1c3a49cb607 | 92 | py | Python | Pacote download/PythonExercíciosHARDMODE/ex030HM.py | RodrigoMASRamos/Projects.py | ed15981b320914c9667305dcd5fb5b7906fd9b00 | [
"MIT"
] | null | null | null | Pacote download/PythonExercíciosHARDMODE/ex030HM.py | RodrigoMASRamos/Projects.py | ed15981b320914c9667305dcd5fb5b7906fd9b00 | [
"MIT"
] | null | null | null | Pacote download/PythonExercíciosHARDMODE/ex030HM.py | RodrigoMASRamos/Projects.py | ed15981b320914c9667305dcd5fb5b7906fd9b00 | [
"MIT"
] | null | null | null | #ex030: Crie um programa que leia um número inteiro e mostre na tela se ele é par ou ímpar.
| 46 | 91 | 0.76087 | 19 | 92 | 3.684211 | 0.947368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.041096 | 0.206522 | 92 | 1 | 92 | 92 | 0.917808 | 0.978261 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
a701150996305f57d6745f93c5d4ef9930eed9ca | 324 | py | Python | tests/test_pathlib.py | muditbac/dtd | 356a78e6eda45ff96a171d7891d2881714f6b4c2 | [
"MIT"
] | null | null | null | tests/test_pathlib.py | muditbac/dtd | 356a78e6eda45ff96a171d7891d2881714f6b4c2 | [
"MIT"
] | null | null | null | tests/test_pathlib.py | muditbac/dtd | 356a78e6eda45ff96a171d7891d2881714f6b4c2 | [
"MIT"
] | null | null | null | import pathlib
def test_ds_store_recognized_without_patch():
assert pathlib.Path('tests/.DS_Store') in list(pathlib.Path('tests/').iterdir())
def test_ds_store_not_recognized_without_patch():
import dtd
dtd.patch_all()
assert pathlib.Path('tests/.DS_Store') not in list(pathlib.Path('tests/').iterdir())
| 27 | 88 | 0.743827 | 47 | 324 | 4.829787 | 0.382979 | 0.123348 | 0.281938 | 0.123348 | 0.511013 | 0.511013 | 0 | 0 | 0 | 0 | 0 | 0 | 0.117284 | 324 | 11 | 89 | 29.454545 | 0.793706 | 0 | 0 | 0 | 0 | 0 | 0.12963 | 0 | 0 | 0 | 0 | 0 | 0.285714 | 1 | 0.285714 | true | 0 | 0.285714 | 0 | 0.571429 | 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 | 0 | 1 | 0 | 0 | 4 |
a718422f0e79b8f1737748cd85b477b4e7860875 | 133 | py | Python | base_code/Filter.py | Mahmoud-SaadEl-Din/Graduation-project | 97fee7ffc6f362db34a155f44f1ea62689afb6dd | [
"MIT"
] | null | null | null | base_code/Filter.py | Mahmoud-SaadEl-Din/Graduation-project | 97fee7ffc6f362db34a155f44f1ea62689afb6dd | [
"MIT"
] | null | null | null | base_code/Filter.py | Mahmoud-SaadEl-Din/Graduation-project | 97fee7ffc6f362db34a155f44f1ea62689afb6dd | [
"MIT"
] | null | null | null | import sys
class Filter:
def FilterFiles(self,filesDic,filesList):
return list(filesDic.difference(filesList))
| 16.625 | 52 | 0.691729 | 14 | 133 | 6.571429 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.225564 | 133 | 7 | 53 | 19 | 0.893204 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 4 |
a7307c12a5e2362e55815fb0812d5ceff02f3f59 | 186 | py | Python | device/urls.py | edwardmpgh/engine4_IoT | 4195167ccdd7c2fa3fa80b8752b07a44370de0ca | [
"MIT"
] | null | null | null | device/urls.py | edwardmpgh/engine4_IoT | 4195167ccdd7c2fa3fa80b8752b07a44370de0ca | [
"MIT"
] | 3 | 2018-09-20T02:04:40.000Z | 2020-06-05T19:26:07.000Z | device/urls.py | edwardmpgh/engine4_IoT | 4195167ccdd7c2fa3fa80b8752b07a44370de0ca | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='device_index'),
path('register/', views.register_device, name='register_device')
]
| 20.666667 | 68 | 0.704301 | 23 | 186 | 5.565217 | 0.478261 | 0.21875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.150538 | 186 | 8 | 69 | 23.25 | 0.810127 | 0 | 0 | 0 | 0 | 0 | 0.193548 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
596d21fd8dd5ed4ce33b24c513ad5c22399191f4 | 230 | py | Python | config.py | Aaliyah6022/BetterSheri_BOT | 5b84e281c18ab9e1f97f68cdfb7930b59f372141 | [
"MIT"
] | null | null | null | config.py | Aaliyah6022/BetterSheri_BOT | 5b84e281c18ab9e1f97f68cdfb7930b59f372141 | [
"MIT"
] | null | null | null | config.py | Aaliyah6022/BetterSheri_BOT | 5b84e281c18ab9e1f97f68cdfb7930b59f372141 | [
"MIT"
] | null | null | null | # Can be multiple prefixes, like this: ("!", "?")
BOT_PREFIX = (".", "fur.", "Fur.", "drago")
OWNERS = [378615179673600004, 731859960451039252]
BLACKLIST = []
LOG_CHANNEL = [730409785891225721]
HUG = ["debug1", "debug2", "debug3"] | 38.333333 | 49 | 0.656522 | 22 | 230 | 6.772727 | 0.954545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.283582 | 0.126087 | 230 | 6 | 50 | 38.333333 | 0.457711 | 0.204348 | 0 | 0 | 0 | 0 | 0.175824 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
59982370fb0800829f303169122bd4c934fbfa86 | 44 | py | Python | cgroup_parser/__init__.py | ZhuYuJin/cgroup-parser | 7132791c496dc87af04d0458ad1f820eac8a8f0f | [
"Apache-2.0"
] | null | null | null | cgroup_parser/__init__.py | ZhuYuJin/cgroup-parser | 7132791c496dc87af04d0458ad1f820eac8a8f0f | [
"Apache-2.0"
] | null | null | null | cgroup_parser/__init__.py | ZhuYuJin/cgroup-parser | 7132791c496dc87af04d0458ad1f820eac8a8f0f | [
"Apache-2.0"
] | null | null | null | from .utils import *
__version__ = '0.0.2'
| 11 | 21 | 0.659091 | 7 | 44 | 3.571429 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 0.181818 | 44 | 3 | 22 | 14.666667 | 0.611111 | 0 | 0 | 0 | 0 | 0 | 0.113636 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
59ab6738ce654d7f979c755f5b56716375fd6999 | 310 | py | Python | example/module.py | amorenocb/pyPackage | ec3d5118ea3b739e0e079f3134c3c833545c605c | [
"MIT"
] | 1 | 2021-07-04T21:19:45.000Z | 2021-07-04T21:19:45.000Z | example/module.py | amorenocb/pyPackage | ec3d5118ea3b739e0e079f3134c3c833545c605c | [
"MIT"
] | null | null | null | example/module.py | amorenocb/pyPackage | ec3d5118ea3b739e0e079f3134c3c833545c605c | [
"MIT"
] | null | null | null | import numpy as np
"""
Test function. Generates N numbers from a normal distribution with unit variance and mean 0.
Parameters:
- n (int) : Number of samples to draw from distribution
Returns:
Numpy.array of floats with the n samples taken
"""
def test(n=100):
return np.random.normal(size=n)
| 19.375 | 92 | 0.719355 | 49 | 310 | 4.55102 | 0.734694 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.016194 | 0.203226 | 310 | 15 | 93 | 20.666667 | 0.88664 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 4 |
59d4b21791471bd6eb73143eef6f080e1037efbf | 93 | py | Python | autotranslate/__init__.py | smlbiobot/SML-Cogs-v3 | 49f6b00b7719c9ff83891b79484c67e023a6ede2 | [
"MIT"
] | 5 | 2018-09-09T15:04:18.000Z | 2021-12-19T18:53:29.000Z | autotranslate/__init__.py | smlbiobot/SML-Cogs-v3 | 49f6b00b7719c9ff83891b79484c67e023a6ede2 | [
"MIT"
] | 7 | 2018-03-21T19:30:27.000Z | 2022-02-11T16:08:30.000Z | autotranslate/__init__.py | smlbiobot/SML-Cogs-v3 | 49f6b00b7719c9ff83891b79484c67e023a6ede2 | [
"MIT"
] | 4 | 2018-03-20T23:22:30.000Z | 2022-03-28T01:21:37.000Z | from .autotranslate import AutoTranslate
def setup(bot):
bot.add_cog(AutoTranslate(bot)) | 23.25 | 40 | 0.784946 | 12 | 93 | 6 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.11828 | 93 | 4 | 41 | 23.25 | 0.878049 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
ab8512372822e7ff0210c373df1ffa6ca6a17d83 | 729 | py | Python | python/phonenumbers/shortdata/region_NP.py | rodgar-nvkz/python-phonenumbers | 4c7c4892211dbc9bc328bc3356b03853eaf993dc | [
"Apache-2.0"
] | 2,424 | 2015-01-05T05:34:45.000Z | 2022-03-28T22:37:53.000Z | python/phonenumbers/shortdata/region_NP.py | rodgar-nvkz/python-phonenumbers | 4c7c4892211dbc9bc328bc3356b03853eaf993dc | [
"Apache-2.0"
] | 166 | 2015-01-30T23:59:18.000Z | 2022-03-14T21:08:42.000Z | python/phonenumbers/shortdata/region_NP.py | rodgar-nvkz/python-phonenumbers | 4c7c4892211dbc9bc328bc3356b03853eaf993dc | [
"Apache-2.0"
] | 345 | 2015-01-02T00:33:27.000Z | 2022-03-26T13:06:57.000Z | """Auto-generated file, do not edit by hand. NP metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_NP = PhoneMetadata(id='NP', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='1\\d{2,3}', possible_length=(3, 4)),
toll_free=PhoneNumberDesc(national_number_pattern='1(?:0[0-36]|12)|1(?:09|11)\\d', example_number='100', possible_length=(3, 4)),
emergency=PhoneNumberDesc(national_number_pattern='1(?:0[0-3]|12)', example_number='100', possible_length=(3,)),
short_code=PhoneNumberDesc(national_number_pattern='1(?:0(?:[0-36]|98)|1(?:1[1-4]|2))', example_number='100', possible_length=(3, 4)),
short_data=True)
| 72.9 | 138 | 0.737997 | 106 | 729 | 4.858491 | 0.45283 | 0.178641 | 0.225243 | 0.279612 | 0.491262 | 0.419417 | 0.359223 | 0.159223 | 0 | 0 | 0 | 0.072808 | 0.076818 | 729 | 9 | 139 | 81 | 0.692422 | 0.072702 | 0 | 0 | 1 | 0 | 0.143284 | 0.092537 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.142857 | 0 | 0.142857 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
ab9a7f64cd253ca386460c69cc2668655e2a4173 | 104 | py | Python | tornadobase/handlers/__init__.py | coyote240/tornadobase | 33c7b453dc4a42f09da7ff437387e0ba081a1918 | [
"MIT"
] | 1 | 2020-01-24T14:44:11.000Z | 2020-01-24T14:44:11.000Z | tornadobase/handlers/__init__.py | coyote240/tornadobase | 33c7b453dc4a42f09da7ff437387e0ba081a1918 | [
"MIT"
] | 3 | 2017-04-23T23:14:55.000Z | 2017-06-27T17:33:50.000Z | tornadobase/handlers/__init__.py | coyote240/tornadobase | 33c7b453dc4a42f09da7ff437387e0ba081a1918 | [
"MIT"
] | null | null | null | from .basehandler import BaseHandler, BaseStaticHandler
__all__ = ['BaseHandler', 'BaseStaticHandler']
| 26 | 55 | 0.807692 | 8 | 104 | 10 | 0.625 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.096154 | 104 | 3 | 56 | 34.666667 | 0.851064 | 0 | 0 | 0 | 0 | 0 | 0.269231 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.