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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dfb761d74a538cc12bfa2b646ff2b9b67e5a61ea | 153 | py | Python | isotp/__init__.py | johanbrus/python-can-isotp | 5ab7f7e9843004197813cfec3b1ecadf6e5e4bc4 | [
"MIT"
] | 130 | 2018-06-16T22:37:18.000Z | 2022-02-28T13:51:45.000Z | isotp/__init__.py | johanbrus/python-can-isotp | 5ab7f7e9843004197813cfec3b1ecadf6e5e4bc4 | [
"MIT"
] | 58 | 2018-09-19T11:20:15.000Z | 2022-03-20T21:31:45.000Z | isotp/__init__.py | johanbrus/python-can-isotp | 5ab7f7e9843004197813cfec3b1ecadf6e5e4bc4 | [
"MIT"
] | 57 | 2018-04-27T15:03:42.000Z | 2022-01-22T23:31:54.000Z | from isotp.tpsock import socket
from isotp.protocol import TransportLayer, CanStack, CanMessage
from isotp.address import *
from isotp.errors import * | 38.25 | 64 | 0.816993 | 20 | 153 | 6.25 | 0.55 | 0.288 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130719 | 153 | 4 | 65 | 38.25 | 0.93985 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
dffcc22228eb0bb9abc6eb214a6e4d94ac8bb83a | 3,027 | py | Python | tests/context/test_data/test_context_load.py | rvyjidacek/fcapsy | 6d531a337b0e65cac10e41b84d232498f3a05b76 | [
"MIT"
] | null | null | null | tests/context/test_data/test_context_load.py | rvyjidacek/fcapsy | 6d531a337b0e65cac10e41b84d232498f3a05b76 | [
"MIT"
] | null | null | null | tests/context/test_data/test_context_load.py | rvyjidacek/fcapsy | 6d531a337b0e65cac10e41b84d232498f3a05b76 | [
"MIT"
] | null | null | null | from fcapsy import Context
from bitsets import bitset
from tests import load_all_test_files
import os
import pytest
import json
import pandas as pd
TEST_DATA_DIR_FIMI = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'fimi',
)
@pytest.mark.parametrize("data_file, json_file",
load_all_test_files(TEST_DATA_DIR_FIMI))
def test_context_from_fimi(data_file, json_file):
# Load dataset file
with open(data_file) as f:
context = Context.from_fimi(data_file)
# Load expected output
with open(json_file) as f:
expected_json = json.load(f)
# Compare
assert list(context.Attributes.supremum.members(
)) == expected_json['attributes']
assert list(context.Objects.supremum.members(
)) == expected_json['objects']
assert tuple(context.to_bools()) == tuple(
map(tuple, expected_json['bools']))
TEST_DATA_DIR_CSV = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'csv', 'no_parameter'
)
@pytest.mark.parametrize("data_file, json_file",
load_all_test_files(TEST_DATA_DIR_CSV))
def test_context_from_csv(data_file, json_file):
# Load dataset file
with open(data_file) as f:
context = Context.from_csv(data_file)
# Load expected output
with open(json_file) as f:
expected_json = json.load(f)
# Compare
assert list(context.Attributes.supremum.members(
)) == expected_json['attributes']
assert list(context.Objects.supremum.members(
)) == expected_json['objects']
assert tuple(context.to_bools()) == tuple(
map(tuple, expected_json['bools']))
TEST_DATA_DIR_CSV_DELIMITER = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'csv', 'delimiter'
)
@pytest.mark.parametrize("data_file, json_file",
load_all_test_files(TEST_DATA_DIR_CSV_DELIMITER))
def test_context_from_csv_delimiter(data_file, json_file):
# Load dataset file
with open(data_file) as f:
context = Context.from_csv(data_file, delimiter=';')
# Load expected output
with open(json_file) as f:
expected_json = json.load(f)
# Compare
assert list(context.Attributes.supremum.members(
)) == expected_json['attributes']
assert list(context.Objects.supremum.members(
)) == expected_json['objects']
assert tuple(context.to_bools()) == tuple(
map(tuple, expected_json['bools']))
def test_context_from_pandas():
bools = (
(2, 0, 6),
(132, 1, 0)
)
expected_bools = (
(1, 0, 1),
(1, 1, 0)
)
context = Context.from_pandas(pd.DataFrame(bools))
assert tuple(context.to_bools()) == expected_bools
def test_context_from_pandas_truth_values():
bools = (
(2, 0, 6),
(132, 1, 0)
)
expected_bools = (
(0, 0, 1),
(1, 0, 0)
)
df = pd.DataFrame(bools)
context = Context.from_pandas(df > 2)
assert tuple(context.to_bools()) == expected_bools
| 24.811475 | 74 | 0.653783 | 399 | 3,027 | 4.684211 | 0.145363 | 0.051364 | 0.035313 | 0.051364 | 0.840021 | 0.797753 | 0.772071 | 0.731407 | 0.731407 | 0.703585 | 0 | 0.012367 | 0.225306 | 3,027 | 121 | 75 | 25.016529 | 0.784648 | 0.04625 | 0 | 0.530864 | 0 | 0 | 0.054918 | 0 | 0 | 0 | 0 | 0 | 0.135802 | 1 | 0.061728 | false | 0 | 0.08642 | 0 | 0.148148 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
a028386844d447b3d5ca71255cd739195143e85a | 2,980 | py | Python | src/the_tale/the_tale/finances/xsolla/helpers.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 85 | 2017-11-21T12:22:02.000Z | 2022-03-27T23:07:17.000Z | src/the_tale/the_tale/finances/xsolla/helpers.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 545 | 2017-11-04T14:15:04.000Z | 2022-03-27T14:19:27.000Z | src/the_tale/the_tale/finances/xsolla/helpers.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 45 | 2017-11-11T12:36:30.000Z | 2022-02-25T06:10:44.000Z |
import smart_imports
smart_imports.all()
class TestInvoiceFabric(object):
def __init__(self):
self.user_email = 'test@mailinator.com'
self.xsolla_id = '1'
self.payment_sum = '101'
self.account_id = 666
self._test = None
self.v2 = 'bla-bla'
self.v3 = 'alb-alb'
self.date = None
self.request_url = 'bla-bla.test.com'
def create_invoice(self, **kwargs):
if set(kwargs.keys()) - set(['account_id', 'user_email', 'xsolla_id', 'payment_sum', 'test', 'date', 'request_url']):
raise Exception('wrong agruments in create_invoice')
account_id = kwargs.get('account_id', self.account_id)
user_email = kwargs.get('user_email', self.user_email)
xsolla_id = kwargs.get('xsolla_id', self.xsolla_id)
payment_sum = kwargs.get('payment_sum', self.payment_sum)
test = kwargs.get('test', self._test)
date = kwargs.get('date', self.date)
request_url = kwargs.get('request_url', self.request_url)
with mock.patch('the_tale.finances.bank.logic.get_account_id', mock.Mock(return_value=account_id)):
return prototypes.InvoicePrototype.create(v1=user_email,
v2=self.v2,
v3=self.v3,
xsolla_id=xsolla_id,
payment_sum=payment_sum,
test=test,
date=date,
request_url=request_url)
def pay(self, **kwargs):
if set(kwargs.keys()) - set(['account_id', 'user_email', 'xsolla_id', 'payment_sum', 'test', 'date', 'request_url']):
raise Exception('wrong agruments in pay')
account_id = kwargs.get('account_id', self.account_id)
user_email = kwargs.get('user_email', self.user_email)
xsolla_id = kwargs.get('xsolla_id', self.xsolla_id)
payment_sum = kwargs.get('payment_sum', self.payment_sum)
test = kwargs.get('test', self._test)
date = kwargs.get('date', self.date)
request_url = kwargs.get('request_url', self.request_url)
with mock.patch('the_tale.finances.bank.logic.get_account_id', mock.Mock(return_value=account_id)):
return prototypes.InvoicePrototype.pay(v1=user_email,
v2=self.v2,
v3=self.v3,
xsolla_id=xsolla_id,
payment_sum=payment_sum,
test=test,
date=date,
request_url=request_url)
| 47.301587 | 125 | 0.502013 | 313 | 2,980 | 4.523962 | 0.182109 | 0.088983 | 0.063559 | 0.076271 | 0.809322 | 0.809322 | 0.809322 | 0.809322 | 0.809322 | 0.809322 | 0 | 0.010509 | 0.393289 | 2,980 | 62 | 126 | 48.064516 | 0.772677 | 0 | 0 | 0.627451 | 0 | 0 | 0.144344 | 0.028869 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.039216 | 0 | 0.156863 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
a06395499f599d95d8a39662aa314026bcd7b325 | 205 | py | Python | latteys/latteys/doctype/sales_partner_registration/sales_partner_registration.py | hrgadesha/lattyeys | 428b752ac99620ac7ad706fd305f07210bdcb315 | [
"MIT"
] | 1 | 2021-09-10T03:51:22.000Z | 2021-09-10T03:51:22.000Z | latteys/latteys/doctype/sales_partner_registration/sales_partner_registration.py | hrgadesha/lattyeys | 428b752ac99620ac7ad706fd305f07210bdcb315 | [
"MIT"
] | null | null | null | latteys/latteys/doctype/sales_partner_registration/sales_partner_registration.py | hrgadesha/lattyeys | 428b752ac99620ac7ad706fd305f07210bdcb315 | [
"MIT"
] | null | null | null | # Copyright (c) 2021, B2Grow and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class SalesPartnerRegistration(Document):
pass
| 22.777778 | 49 | 0.804878 | 25 | 205 | 6.6 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02809 | 0.131707 | 205 | 8 | 50 | 25.625 | 0.898876 | 0.512195 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
a071c968fae8d60d35f03009f01b37a53f04a1f3 | 140 | py | Python | diffusion_maps/__init__.py | vishalbelsare/diffusion-maps | b1721aba1fb20a19437e721a9a1f9ba877571698 | [
"MIT"
] | 35 | 2017-05-21T01:39:33.000Z | 2022-03-02T23:03:15.000Z | diffusion_maps/__init__.py | vishalbelsare/diffusion-maps | b1721aba1fb20a19437e721a9a1f9ba877571698 | [
"MIT"
] | 2 | 2018-10-29T23:55:59.000Z | 2020-09-26T15:01:28.000Z | diffusion_maps/__init__.py | vishalbelsare/diffusion-maps | b1721aba1fb20a19437e721a9a1f9ba877571698 | [
"MIT"
] | 7 | 2018-02-18T15:19:46.000Z | 2020-07-08T12:55:10.000Z | """Diffusion maps module.
"""
from .diffusion_maps import *
from .geometric_harmonics import *
from .plot import *
from .version import *
| 15.555556 | 34 | 0.735714 | 17 | 140 | 5.941176 | 0.529412 | 0.29703 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.157143 | 140 | 8 | 35 | 17.5 | 0.855932 | 0.157143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
a09fa886a53a9a894dcc12ee6f05592d4d053432 | 83 | py | Python | tests/test_tf_event.py | Hadjubuntu/sweet-rl | f0dedadf8a7187e9b9b70436f05c637960fd72a7 | [
"MIT"
] | 3 | 2020-01-31T09:39:32.000Z | 2020-03-04T16:41:53.000Z | tests/test_tf_event.py | Hadjubuntu/sweet-rl | f0dedadf8a7187e9b9b70436f05c637960fd72a7 | [
"MIT"
] | 4 | 2020-11-13T18:29:43.000Z | 2022-02-10T00:40:51.000Z | tests/test_tf_event.py | Hadjubuntu/sweet-rl | f0dedadf8a7187e9b9b70436f05c637960fd72a7 | [
"MIT"
] | null | null | null |
from sweet.common.logging import Logger
def test_logger():
logger = Logger() | 13.833333 | 39 | 0.722892 | 11 | 83 | 5.363636 | 0.727273 | 0.40678 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.180723 | 83 | 6 | 40 | 13.833333 | 0.867647 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
a0a4898ee33890976f7e0683a2890b9fde653c5a | 6,846 | py | Python | tests/features/test_extract.py | ratschlab/tools-project-archives | a42ef1d3d60b24ff39ce5aa73a8fb332b4f25056 | [
"MIT"
] | 1 | 2021-12-02T15:13:47.000Z | 2021-12-02T15:13:47.000Z | tests/features/test_extract.py | ratschlab/tools-project-archives | a42ef1d3d60b24ff39ce5aa73a8fb332b4f25056 | [
"MIT"
] | null | null | null | tests/features/test_extract.py | ratschlab/tools-project-archives | a42ef1d3d60b24ff39ce5aa73a8fb332b4f25056 | [
"MIT"
] | null | null | null | import filecmp
import os
from pathlib import Path
import pytest
from archiver.extract import extract_archive
from tests import helpers
def test_extract_archive(tmp_path):
FOLDER_NAME = "test-folder"
extraction_path = tmp_path / "extraction-folder"
# access existing archive dir
archive_path = helpers.get_directory_with_name("normal-archive")
folder_path = helpers.get_directory_with_name(FOLDER_NAME)
# wait until this aciton has completed
extract_archive(archive_path, extraction_path)
dir_listing = os.listdir(extraction_path)
# assert listing of extracted folder
assert dir_listing == [FOLDER_NAME]
# assert content of extracted file
assert filecmp.cmp(folder_path.joinpath("file1.txt"), extraction_path.joinpath(FOLDER_NAME + "/file1.txt"))
assert filecmp.cmp(folder_path.joinpath("folder-in-archive/file2.txt"), extraction_path.joinpath(FOLDER_NAME + "/folder-in-archive/file2.txt"))
def test_extract_archive_partial(tmp_path):
FOLDER_NAME = "test-folder"
extraction_path = tmp_path / "extraction-folder"
# access existing archive dir
archive_path = helpers.get_directory_with_name("normal-archive")
folder_path = helpers.get_directory_with_name(FOLDER_NAME)
extracted_file_path = Path(FOLDER_NAME) / "folder-in-archive" / "file2.txt"
extract_archive(archive_path, extraction_path, extracted_file_path)
# assert listing of extracted folder
assert [e[2] for e in os.walk(extraction_path) if e[2]] == [[extracted_file_path.name]]
# assert content of extracted file
assert filecmp.cmp(folder_path.joinpath(extracted_file_path.relative_to(Path(FOLDER_NAME))),
extraction_path.joinpath(extracted_file_path))
@pytest.mark.parametrize("partial_extraction_path",
[
None, # "normal" extraction
'large-folder' # for testing purpose, extracting all files via partial extraction
])
def test_extract_split(tmp_path, partial_extraction_path):
FOLDER_NAME = "large-folder"
# access existing archive dir
archive_path = helpers.get_directory_with_name("split-archive")
folder_path = helpers.get_directory_with_name(FOLDER_NAME)
extraction_path = tmp_path / "extraction-folder"
extract_archive(archive_path, extraction_path, partial_extraction_path)
dir_listing = os.listdir(extraction_path)
# assert listing of extracted folder
assert dir_listing == [FOLDER_NAME]
# assert content of extracted file
assert filecmp.cmp(folder_path.joinpath("file_a.txt"), extraction_path.joinpath(FOLDER_NAME + "/file_a.txt"))
assert filecmp.cmp(folder_path.joinpath("file_b.txt"), extraction_path.joinpath(FOLDER_NAME + "/file_b.txt"))
assert filecmp.cmp(folder_path.joinpath("subfolder/file_c.txt"), extraction_path.joinpath(FOLDER_NAME + "/subfolder/file_c.txt"))
def test_extract_split_partial(tmp_path):
FOLDER_NAME = "large-folder"
# access existing archive dir
archive_path = helpers.get_directory_with_name("split-archive")
folder_path = helpers.get_directory_with_name(FOLDER_NAME)
extraction_path = tmp_path / "extraction-folder"
extracted_file_path = Path(FOLDER_NAME) / "file_b.txt"
extract_archive(archive_path, extraction_path, extracted_file_path)
# assert listing of extracted folder
assert [e[2] for e in os.walk(extraction_path) if e[2]] == [
[extracted_file_path.name]]
# assert content of extracted file
assert filecmp.cmp(folder_path.joinpath("file_b.txt"), extraction_path.joinpath(FOLDER_NAME + "/file_b.txt"))
def test_extract_symlink(tmp_path):
FOLDER_NAME = "symlink-folder"
# access existing archive dir
archive_path = helpers.get_directory_with_name("symlink-archive")
folder_path = helpers.get_directory_with_name(FOLDER_NAME)
extraction_path = tmp_path / "extraction-folder"
# wait until this aciton has completed
extract_archive(archive_path, extraction_path)
dir_listing = os.listdir(extraction_path)
# assert listing of extracted folder
assert dir_listing == [FOLDER_NAME]
# check if symlink exists
assert extraction_path.joinpath(FOLDER_NAME, "folder-in-archive", "link.txt").is_symlink()
# assert content of extracted file
assert filecmp.cmp(folder_path.joinpath("file1.txt"), extraction_path.joinpath(FOLDER_NAME + "/file1.txt"))
assert filecmp.cmp(folder_path.joinpath("folder-in-archive/file2.txt"), extraction_path.joinpath(FOLDER_NAME + "/folder-in-archive/file2.txt"))
def test_extract_encrypted_archive(tmp_path, setup_gpg):
FOLDER_NAME = "test-folder"
# access existing archive dir
archive_path = helpers.get_directory_with_name("encrypted-archive")
folder_path = helpers.get_directory_with_name(FOLDER_NAME)
extraction_path = tmp_path / "extraction-folder"
# wait until this aciton has completed
extract_archive(archive_path, extraction_path)
dir_listing = os.listdir(extraction_path)
# assert listing of extracted folder
assert dir_listing == [FOLDER_NAME]
# assert content of extracted file
assert filecmp.cmp(folder_path.joinpath("file1.txt"), extraction_path.joinpath(FOLDER_NAME + "/file1.txt"))
assert filecmp.cmp(folder_path.joinpath("folder-in-archive/file2.txt"), extraction_path.joinpath(FOLDER_NAME + "/folder-in-archive/file2.txt"))
# Cleanup
# Required because currently encryption leaves unencrypted archives in source archive
os.remove(archive_path / (FOLDER_NAME + ".tar.lz"))
def test_extract_encrypted_split(tmp_path, setup_gpg):
FOLDER_NAME = "large-folder"
# access existing archive dir
archive_path = helpers.get_directory_with_name("split-encrypted-archive")
folder_path = helpers.get_directory_with_name(FOLDER_NAME)
extraction_path = tmp_path / "extraction-folder"
# wait until this aciton has completed
extract_archive(archive_path, extraction_path)
dir_listing = os.listdir(extraction_path)
# assert listing of extracted folder
assert dir_listing == [FOLDER_NAME]
# assert content of extracted file
assert filecmp.cmp(folder_path.joinpath("file_a.txt"), extraction_path.joinpath(FOLDER_NAME + "/file_a.txt"))
assert filecmp.cmp(folder_path.joinpath("file_b.txt"), extraction_path.joinpath(FOLDER_NAME + "/file_b.txt"))
assert filecmp.cmp(folder_path.joinpath("subfolder/file_c.txt"), extraction_path.joinpath(FOLDER_NAME + "/subfolder/file_c.txt"))
# Cleanup
# Required because currently encryption leaves unencrypted archives in source archive
os.remove(archive_path / (FOLDER_NAME + ".part1.tar.lz"))
os.remove(archive_path / (FOLDER_NAME + ".part2.tar.lz"))
os.remove(archive_path / (FOLDER_NAME + ".part3.tar.lz"))
| 39.572254 | 147 | 0.743646 | 897 | 6,846 | 5.399108 | 0.100334 | 0.082593 | 0.063184 | 0.066488 | 0.888292 | 0.874252 | 0.847202 | 0.841008 | 0.817262 | 0.817262 | 0 | 0.003476 | 0.159509 | 6,846 | 172 | 148 | 39.802326 | 0.8382 | 0.162431 | 0 | 0.602273 | 0 | 0 | 0.151202 | 0.044378 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0.079545 | false | 0 | 0.068182 | 0 | 0.147727 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
2609d1d677ddabb363ce1962fc161bd5a3876f69 | 29 | py | Python | main/projects/scraper_image/__init__.py | Koubae/Portfolio | cb0add30e1f171a42a715f9a3549fb90eb9a7b1e | [
"MIT"
] | null | null | null | main/projects/scraper_image/__init__.py | Koubae/Portfolio | cb0add30e1f171a42a715f9a3549fb90eb9a7b1e | [
"MIT"
] | null | null | null | main/projects/scraper_image/__init__.py | Koubae/Portfolio | cb0add30e1f171a42a715f9a3549fb90eb9a7b1e | [
"MIT"
] | null | null | null | from .views import scrap_proj | 29 | 29 | 0.862069 | 5 | 29 | 4.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.103448 | 29 | 1 | 29 | 29 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
26504ecd6e97492c1ca1a85844bc7e2051e5bfba | 8,446 | py | Python | tests/request/test_parameter_type_number_in_query.py | Colin-b/pyxelrest | 5c8db40d1537d0f9c29acd928ec9519b6bb557ec | [
"MIT"
] | 7 | 2018-12-07T10:08:53.000Z | 2021-03-24T07:52:36.000Z | tests/request/test_parameter_type_number_in_query.py | Colin-b/pyxelrest | 5c8db40d1537d0f9c29acd928ec9519b6bb557ec | [
"MIT"
] | 76 | 2018-12-07T10:29:48.000Z | 2021-11-17T00:54:24.000Z | tests/request/test_parameter_type_number_in_query.py | Colin-b/pyxelrest | 5c8db40d1537d0f9c29acd928ec9519b6bb557ec | [
"MIT"
] | null | null | null | import datetime
from dateutil.tz import tzutc
from responses import RequestsMock
from tests import loader
def test_exclusive_maximum(responses: RequestsMock, tmpdir):
responses.add(
responses.GET,
url="http://test/",
json={
"swagger": "2.0",
"paths": {
"/exclusive_max": {
"get": {
"parameters": [
{
"in": "query",
"name": "int",
"type": "integer",
"maximum": 10,
"exclusiveMaximum": True,
},
],
"responses": {
"200": {
"type": "string",
}
},
}
}
},
},
match_querystring=True,
)
generated_functions = loader.load(
tmpdir,
{
"number": {
"open_api": {"definition": "http://test/"},
"formulas": {"dynamic_array": {"lock_excel": True}},
}
},
)
responses.add(
responses.GET,
url="http://test/exclusive_max?int=9",
json=[],
match_querystring=True,
)
assert (
generated_functions.number_get_exclusive_max(11)
== 'int value "11" must be strictly inferior to 10.'
)
assert (
generated_functions.number_get_exclusive_max(10)
== 'int value "10" must be strictly inferior to 10.'
)
assert generated_functions.number_get_exclusive_max(9) == [[""]]
def test_maximum(responses: RequestsMock, tmpdir):
responses.add(
responses.GET,
url="http://test/",
json={
"swagger": "2.0",
"paths": {
"/max": {
"get": {
"parameters": [
{
"in": "query",
"name": "int",
"type": "integer",
"maximum": 10,
},
],
"responses": {
"200": {
"type": "string",
}
},
}
}
},
},
match_querystring=True,
)
generated_functions = loader.load(
tmpdir,
{
"number": {
"open_api": {"definition": "http://test/"},
"formulas": {"dynamic_array": {"lock_excel": True}},
}
},
)
responses.add(
responses.GET,
url="http://test/max?int=10",
json=[],
match_querystring=True,
)
responses.add(
responses.GET,
url="http://test/max?int=9",
json=[],
match_querystring=True,
)
assert (
generated_functions.number_get_max(11)
== 'int value "11" must be inferior or equals to 10.'
)
assert generated_functions.number_get_max(10) == [[""]]
assert generated_functions.number_get_max(9) == [[""]]
def test_exclusive_minimum(responses: RequestsMock, tmpdir):
responses.add(
responses.GET,
url="http://test/",
json={
"swagger": "2.0",
"paths": {
"/exclusive_min": {
"get": {
"parameters": [
{
"in": "query",
"name": "int",
"type": "integer",
"minimum": 10,
"exclusiveMinimum": True,
},
],
"responses": {
"200": {
"type": "string",
}
},
}
}
},
},
match_querystring=True,
)
generated_functions = loader.load(
tmpdir,
{
"number": {
"open_api": {"definition": "http://test/"},
"formulas": {"dynamic_array": {"lock_excel": True}},
}
},
)
responses.add(
responses.GET,
url="http://test/exclusive_min?int=11",
json=[],
match_querystring=True,
)
assert generated_functions.number_get_exclusive_min(11) == [[""]]
assert (
generated_functions.number_get_exclusive_min(10)
== 'int value "10" must be strictly superior to 10.'
)
assert (
generated_functions.number_get_exclusive_min(9)
== 'int value "9" must be strictly superior to 10.'
)
def test_minimum(responses: RequestsMock, tmpdir):
responses.add(
responses.GET,
url="http://test/",
json={
"swagger": "2.0",
"paths": {
"/min": {
"get": {
"parameters": [
{
"in": "query",
"name": "int",
"type": "integer",
"minimum": 10,
},
],
"responses": {
"200": {
"type": "string",
}
},
}
}
},
},
match_querystring=True,
)
generated_functions = loader.load(
tmpdir,
{
"number": {
"open_api": {"definition": "http://test/"},
"formulas": {"dynamic_array": {"lock_excel": True}},
}
},
)
responses.add(
responses.GET,
url="http://test/min?int=11",
json=[],
match_querystring=True,
)
responses.add(
responses.GET,
url="http://test/min?int=10",
json=[],
match_querystring=True,
)
assert generated_functions.number_get_min(11) == [[""]]
assert generated_functions.number_get_min(10) == [[""]]
assert (
generated_functions.number_get_min(9)
== 'int value "9" must be superior or equals to 10.'
)
def test_multiple_of(responses: RequestsMock, tmpdir):
responses.add(
responses.GET,
url="http://test/",
json={
"swagger": "2.0",
"paths": {
"/multiple": {
"get": {
"parameters": [
{
"in": "query",
"name": "int",
"type": "integer",
"multipleOf": 2,
},
],
"responses": {
"200": {
"type": "string",
}
},
}
}
},
},
match_querystring=True,
)
generated_functions = loader.load(
tmpdir,
{
"number": {
"open_api": {"definition": "http://test/"},
"formulas": {"dynamic_array": {"lock_excel": True}},
}
},
)
responses.add(
responses.GET,
url="http://test/multiple?int=4",
json=[],
match_querystring=True,
)
responses.add(
responses.GET,
url="http://test/multiple?int=2",
json=[],
match_querystring=True,
)
assert generated_functions.number_get_multiple(4) == [[""]]
assert (
generated_functions.number_get_multiple(3)
== 'int value "3" must be a multiple of 2.'
)
assert generated_functions.number_get_multiple(2) == [[""]]
assert (
generated_functions.number_get_multiple(1)
== 'int value "1" must be a multiple of 2.'
)
| 28.43771 | 69 | 0.378641 | 595 | 8,446 | 5.208403 | 0.122689 | 0.121975 | 0.123911 | 0.154889 | 0.914166 | 0.914166 | 0.864472 | 0.744434 | 0.717328 | 0.680542 | 0 | 0.022594 | 0.496922 | 8,446 | 296 | 70 | 28.533784 | 0.706755 | 0 | 0 | 0.53405 | 0 | 0 | 0.171087 | 0 | 0 | 0 | 0 | 0 | 0.057348 | 1 | 0.017921 | false | 0 | 0.014337 | 0 | 0.032258 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
265cab2b2a593f01fde71c997a6c48bbc53c8457 | 18 | py | Python | krrt/search/localsearch/__init__.py | QuMuLab/krtoolkit | a09525cb4835dc06eedf79f7465ee5da527cbb0d | [
"MIT"
] | 3 | 2020-07-25T12:38:49.000Z | 2021-11-16T02:16:37.000Z | src/Recursive_Symmetry_Aware_Materials_Microstructure_Explorer/viz/__init__.py | m3-learning/Recursive_Symmetry_Aware_Materials_Microstructure_Explorer | 93f4b568998a28ff474e98d8c68f3fefb4365232 | [
"BSD-3-Clause"
] | 8 | 2020-04-04T18:05:17.000Z | 2020-04-04T18:09:19.000Z | src/Recursive_Symmetry_Aware_Materials_Microstructure_Explorer/viz/__init__.py | m3-learning/Recursive_Symmetry_Aware_Materials_Microstructure_Explorer | 93f4b568998a28ff474e98d8c68f3fefb4365232 | [
"BSD-3-Clause"
] | 2 | 2020-07-26T10:53:48.000Z | 2020-08-14T19:11:48.000Z | from . import viz
| 9 | 17 | 0.722222 | 3 | 18 | 4.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.222222 | 18 | 1 | 18 | 18 | 0.928571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
267bf625fdf13333ec1fb8147d833bc28b9874b4 | 31 | py | Python | redlines/__init__.py | houfu/redlines | d5cb55f5e3bd39866d58b71485081067c3324fe1 | [
"MIT"
] | 1 | 2022-02-12T16:30:11.000Z | 2022-02-12T16:30:11.000Z | redlines/__init__.py | houfu/redlines | d5cb55f5e3bd39866d58b71485081067c3324fe1 | [
"MIT"
] | null | null | null | redlines/__init__.py | houfu/redlines | d5cb55f5e3bd39866d58b71485081067c3324fe1 | [
"MIT"
] | null | null | null | from .redlines import Redlines
| 15.5 | 30 | 0.83871 | 4 | 31 | 6.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.129032 | 31 | 1 | 31 | 31 | 0.962963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
cd0842cd8b6429debe791feb920e4b59fd1ac8de | 2,575 | py | Python | tests/actor/test_graph.py | schmidtbt/actor | d47d5f32285aa32469632a3147a64ecda833a643 | [
"BSD-2-Clause"
] | 1 | 2017-03-06T15:26:58.000Z | 2017-03-06T15:26:58.000Z | tests/actor/test_graph.py | schmidtbt/actor | d47d5f32285aa32469632a3147a64ecda833a643 | [
"BSD-2-Clause"
] | null | null | null | tests/actor/test_graph.py | schmidtbt/actor | d47d5f32285aa32469632a3147a64ecda833a643 | [
"BSD-2-Clause"
] | null | null | null | import unittest
import actor.actor as act
import actor.graph as g
class GraphTestCase(unittest.TestCase):
def test_graph(self):
graph = act.ActorSystem("graph")
node1 = graph.actor_of(g.BasicNode, name="node1")
node2 = graph.actor_of(g.BasicNode, name="node2")
node3 = graph.actor_of(g.BasicNode, name="node3")
edge1 = graph.actor_of(g.Edge, name="n1n2", node1=node1, node2=node2)
edge2 = graph.actor_of(g.Edge, name="n1n3", node1=node1, node2=node3)
node1.tell(g.Message.create('add_edge', edge1))
node2.tell(g.Message.create('add_edge', edge1))
node1.tell(g.Message.create('add_edge', edge2))
node3.tell(g.Message.create('add_edge', edge2))
node1.tell(g.Message.create('broadcast', 'around the world'))
node1.tell(g.Message.create('remove_edge', edge2))
node3.tell(g.Message.create('remove_edge', edge2))
node1.tell(g.Message.create('broadcast', 'second time'))
def test_graph_utilities(self):
graph = act.ActorSystem("graph")
node1 = graph.actor_of(g.BasicNode, name="node1")
node2 = graph.actor_of(g.BasicNode, name="node2")
node3 = graph.actor_of(g.BasicNode, name="node3")
# edge1 = graph.actor_of(g.Edge, name="n1n2", node1=node1, node2=node2)
# edge2 = graph.actor_of(g.Edge, name="n1n3", node1=node1, node2=node3)
g.Utility.insert_edge(graph, node1, node2, name="n1n2")
g.Utility.insert_edge(graph, node1, node3, name="n1n3")
node1.tell(g.Message.create('broadcast', 'around the world'))
#
# node1.tell(g.Message.create('remove_edge', edge2))
# node3.tell(g.Message.create('remove_edge', edge2))
node1.tell(g.Message.create('broadcast', 'second time'))
def test_edge_insert_graph(self):
graph = act.ActorSystem("graph")
node1 = graph.actor_of(g.BasicNode, name="node1")
node2 = graph.actor_of(g.BasicNode, name="node2")
node3 = graph.actor_of(g.BasicNode, name="node3")
edge1 = graph.actor_of(g.Edge, name="n1n2", node1=node1, node2=node2)
edge2 = graph.actor_of(g.Edge, name="n1n3", node1=node1, node2=node3)
edge1.tell(g.Message.create('edge_insert', None))
edge2.tell(g.Message.create('edge_insert', None))
node1.tell(g.Message.create('broadcast', 'around the world'))
edge2.tell(g.Message.create('edge_remove', None))
node1.tell(g.Message.create('broadcast', 'second time'))
if __name__ == '__main__':
unittest.main()
| 35.763889 | 79 | 0.646214 | 349 | 2,575 | 4.647564 | 0.120344 | 0.052404 | 0.125771 | 0.188656 | 0.887176 | 0.887176 | 0.832922 | 0.713317 | 0.681874 | 0.653514 | 0 | 0.044906 | 0.195728 | 2,575 | 71 | 80 | 36.267606 | 0.738291 | 0.093592 | 0 | 0.52381 | 0 | 0 | 0.13488 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0.071429 | 0 | 0.166667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
cd143bd29309d48c8aec8b2fa0dbc96f567766a9 | 24 | py | Python | cursesqr/bin/__init__.py | Ruunyox/CursesQR | cd3be10eaae77f20eca765fc77c946a284712ad8 | [
"MIT"
] | 5 | 2020-11-01T17:19:25.000Z | 2020-11-05T20:28:21.000Z | cursesqr/bin/__init__.py | Ruunyox/CursesQR | cd3be10eaae77f20eca765fc77c946a284712ad8 | [
"MIT"
] | null | null | null | cursesqr/bin/__init__.py | Ruunyox/CursesQR | cd3be10eaae77f20eca765fc77c946a284712ad8 | [
"MIT"
] | null | null | null | from .cursesqr import *
| 12 | 23 | 0.75 | 3 | 24 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 24 | 1 | 24 | 24 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
26b882644b088d93ada86766fea648ffb5b5a76c | 37 | py | Python | qplex_smac/smac/env/lbforaging/foraging/__init__.py | LAMDA-RL/MAIC | 715ab22b531f9a6867276f85e1d8c1342d8b6d00 | [
"Apache-2.0"
] | 7 | 2022-02-23T10:41:29.000Z | 2022-03-16T07:01:58.000Z | qplex_smac/smac/env/lbforaging/foraging/__init__.py | LAMDA-RL/MAIC | 715ab22b531f9a6867276f85e1d8c1342d8b6d00 | [
"Apache-2.0"
] | null | null | null | qplex_smac/smac/env/lbforaging/foraging/__init__.py | LAMDA-RL/MAIC | 715ab22b531f9a6867276f85e1d8c1342d8b6d00 | [
"Apache-2.0"
] | 4 | 2022-02-22T13:59:19.000Z | 2022-03-30T16:23:23.000Z | from .environment import ForagingEnv
| 18.5 | 36 | 0.864865 | 4 | 37 | 8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.108108 | 37 | 1 | 37 | 37 | 0.969697 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
26f82689d729fe01063f9fd78948751d4e4ddeb1 | 31 | py | Python | tests/data/__init__.py | Art-Ev/aequilibrae | 9f438278e09c875717779bfcc99bf7ba75ed1372 | [
"MIT"
] | 82 | 2018-07-18T09:58:21.000Z | 2022-03-30T15:36:25.000Z | tests/data/__init__.py | Art-Ev/aequilibrae | 9f438278e09c875717779bfcc99bf7ba75ed1372 | [
"MIT"
] | 197 | 2018-06-30T07:01:46.000Z | 2022-03-30T06:30:43.000Z | tests/data/__init__.py | Art-Ev/aequilibrae | 9f438278e09c875717779bfcc99bf7ba75ed1372 | [
"MIT"
] | 29 | 2018-07-16T18:10:39.000Z | 2022-03-30T15:36:26.000Z | from .reference_files import *
| 15.5 | 30 | 0.806452 | 4 | 31 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.129032 | 31 | 1 | 31 | 31 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
f886db8e7bc191f07bc5ed72b04b29d20a6900c0 | 112 | py | Python | UE4Parse/Provider/__init__.py | zbx911/pyUE4Parse | eb30d27a4341ad68a7104458a0fdfae6a360d153 | [
"MIT"
] | null | null | null | UE4Parse/Provider/__init__.py | zbx911/pyUE4Parse | eb30d27a4341ad68a7104458a0fdfae6a360d153 | [
"MIT"
] | null | null | null | UE4Parse/Provider/__init__.py | zbx911/pyUE4Parse | eb30d27a4341ad68a7104458a0fdfae6a360d153 | [
"MIT"
] | null | null | null | from .MappingProvider import MappingProvider, PropMappings
from .DefaultFileProvider import DefaultFileProvider
| 37.333333 | 58 | 0.892857 | 9 | 112 | 11.111111 | 0.555556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.080357 | 112 | 2 | 59 | 56 | 0.970874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
f88d22f52ba947bd62a1b675a389913c3b625501 | 1,264 | py | Python | utils/__init__.py | simonamtoft/tfde-tfp | cd8c7a6fe9d09870df6359957a95c99a6c5f762a | [
"MIT"
] | null | null | null | utils/__init__.py | simonamtoft/tfde-tfp | cd8c7a6fe9d09870df6359957a95c99a6c5f762a | [
"MIT"
] | null | null | null | utils/__init__.py | simonamtoft/tfde-tfp | cd8c7a6fe9d09870df6359957a95c99a6c5f762a | [
"MIT"
] | null | null | null | from .plotting import plot_contours, plot_density
from .density_functions import unitTest, plot_density_3d, plot_density_3d_paper, \
plot_density_2d_paper
from .CV_functions import CV_1_fold, CV_holdout
from .helpers import get_fair_Ks,get_free_params
# From ffjord util functions
from .ffjord_util_functions import isposint
from .ffjord_util_functions import logistic
from .ffjord_util_functions import logit
from .ffjord_util_functions import disp_imdata
from .ffjord_util_functions import isdistribution
from .ffjord_util_functions import discrete_sample
from .ffjord_util_functions import ess_importance
from .ffjord_util_functions import ess_mcmc
from .ffjord_util_functions import probs2contours
from .ffjord_util_functions import plot_pdf_marginals
from .ffjord_util_functions import plot_hist_marginals
from .ffjord_util_functions import save
from .ffjord_util_functions import load
from .ffjord_util_functions import calc_whitening_transform
from .ffjord_util_functions import whiten
from .ffjord_util_functions import select_theano_act_function
from .ffjord_util_functions import copy_model_parms
from .ffjord_util_functions import one_hot_encode
from .ffjord_util_functions import make_folder
from .ffjord_util_functions import convert_to_bits_dim
| 45.142857 | 82 | 0.886076 | 186 | 1,264 | 5.591398 | 0.322581 | 0.317308 | 0.282692 | 0.464423 | 0.588462 | 0.170192 | 0 | 0 | 0 | 0 | 0 | 0.00434 | 0.088608 | 1,264 | 27 | 83 | 46.814815 | 0.898438 | 0.02057 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.96 | 0 | 0.96 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
3e3e1636062e7b6021bf9e7bd814e1ed24cdd3d7 | 40 | py | Python | utils/33.py | Jy-stdio/pspnet_pytorch | 76cdf9d8e075f2eb61f3c001c8a0ce43b2d3f3e3 | [
"MIT"
] | null | null | null | utils/33.py | Jy-stdio/pspnet_pytorch | 76cdf9d8e075f2eb61f3c001c8a0ce43b2d3f3e3 | [
"MIT"
] | null | null | null | utils/33.py | Jy-stdio/pspnet_pytorch | 76cdf9d8e075f2eb61f3c001c8a0ce43b2d3f3e3 | [
"MIT"
] | null | null | null | import numpy
print(numpy.__version__)
| 13.333333 | 25 | 0.8 | 5 | 40 | 5.6 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 40 | 2 | 26 | 20 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0.5 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 6 |
e41d19a9b87a6a6490e516e0a901ba98755bc522 | 190 | py | Python | sui/ml/__init__.py | AdrianLeonLhy/sui | 06e0636e98e862a0fa95d97cfd56b1f0ef51b299 | [
"MIT"
] | null | null | null | sui/ml/__init__.py | AdrianLeonLhy/sui | 06e0636e98e862a0fa95d97cfd56b1f0ef51b299 | [
"MIT"
] | null | null | null | sui/ml/__init__.py | AdrianLeonLhy/sui | 06e0636e98e862a0fa95d97cfd56b1f0ef51b299 | [
"MIT"
] | null | null | null | """sui.ml
Machine learning algorithm implementations
"""
from __future__ import absolute_import, division, print_function, unicode_literals
from .mf import FunkSVD, BiasSVD, SVDpp, BPR, ALS
| 31.666667 | 82 | 0.810526 | 24 | 190 | 6.125 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.110526 | 190 | 5 | 83 | 38 | 0.869822 | 0.257895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0.5 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 6 |
e42f927fae2535c57790eb367c666879e98b50b4 | 39 | py | Python | python/testData/inspections/PyUnresolvedReferencesInspection/InstanceAttributeCreatedThroughWithStatementInAnotherFile/a.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2018-12-29T09:53:39.000Z | 2018-12-29T09:53:42.000Z | python/testData/inspections/PyUnresolvedReferencesInspection/InstanceAttributeCreatedThroughWithStatementInAnotherFile/a.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/inspections/PyUnresolvedReferencesInspection/InstanceAttributeCreatedThroughWithStatementInAnotherFile/a.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | from foo import Foo
print(Foo().scope) | 13 | 19 | 0.74359 | 7 | 39 | 4.142857 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.128205 | 39 | 3 | 20 | 13 | 0.852941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0.5 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 6 |
e472ed95dc1593b3fcf70112d7d54b386e8c4045 | 43 | py | Python | tango/__init__.py | romainmartinez/tango | 76acb2fd9e9f32858534604158edfee25392616e | [
"Apache-2.0"
] | null | null | null | tango/__init__.py | romainmartinez/tango | 76acb2fd9e9f32858534604158edfee25392616e | [
"Apache-2.0"
] | null | null | null | tango/__init__.py | romainmartinez/tango | 76acb2fd9e9f32858534604158edfee25392616e | [
"Apache-2.0"
] | null | null | null | from .reader import *
from .writer import * | 21.5 | 21 | 0.744186 | 6 | 43 | 5.333333 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.162791 | 43 | 2 | 22 | 21.5 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
e48c34c96f30d2d92a3bc1c0940c21c6d89ea182 | 269 | py | Python | disciplina/views.py | Professor-Vanderson/LMS | 16a20223fe6956f7420bad4c1f817589fc013f09 | [
"Apache-2.0"
] | null | null | null | disciplina/views.py | Professor-Vanderson/LMS | 16a20223fe6956f7420bad4c1f817589fc013f09 | [
"Apache-2.0"
] | null | null | null | disciplina/views.py | Professor-Vanderson/LMS | 16a20223fe6956f7420bad4c1f817589fc013f09 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return render(request,'index.html')
'''def disciplina(request):
return render(request,'discplina.html')
def professor(request):
return render(request,'professor.html')''' | 24.454545 | 43 | 0.776952 | 34 | 269 | 6.147059 | 0.441176 | 0.186603 | 0.272727 | 0.373206 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.092937 | 269 | 11 | 43 | 24.454545 | 0.856557 | 0 | 0 | 0 | 0 | 0 | 0.075188 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.5 | 0.25 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 6 |
e48ebc82b99ee04597ff751293b41d4fd9d84884 | 162 | py | Python | web/util.py | wdias/validation-min-non-missing-values-check | 95f5da52b8758650717fc025a7f2325dce634679 | [
"Apache-2.0"
] | null | null | null | web/util.py | wdias/validation-min-non-missing-values-check | 95f5da52b8758650717fc025a7f2325dce634679 | [
"Apache-2.0"
] | null | null | null | web/util.py | wdias/validation-min-non-missing-values-check | 95f5da52b8758650717fc025a7f2325dce634679 | [
"Apache-2.0"
] | null | null | null |
HOST_URL = 'http://validation-min-non-missing-values-check.default.svc.cluster.local'
METADATA_ADAPTER_URL = 'http://adapter-metadata.default.svc.cluster.local'
| 40.5 | 85 | 0.796296 | 23 | 162 | 5.478261 | 0.652174 | 0.111111 | 0.269841 | 0.349206 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.04321 | 162 | 3 | 86 | 54 | 0.812903 | 0 | 0 | 0 | 0 | 0.5 | 0.751553 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
e4a0e57efeb42142168e90a9154b126aadc43152 | 508 | py | Python | octicons16px/mail.py | andrewp-as-is/octicons16px.py | 1272dc9f290619d83bd881e87dbd723b0c48844c | [
"Unlicense"
] | 1 | 2021-01-28T06:47:39.000Z | 2021-01-28T06:47:39.000Z | octicons16px/mail.py | andrewp-as-is/octicons16px.py | 1272dc9f290619d83bd881e87dbd723b0c48844c | [
"Unlicense"
] | null | null | null | octicons16px/mail.py | andrewp-as-is/octicons16px.py | 1272dc9f290619d83bd881e87dbd723b0c48844c | [
"Unlicense"
] | null | null | null |
OCTICON_MAIL = """
<svg class="octicon octicon-mail" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M1.75 2A1.75 1.75 0 000 3.75v.736a.75.75 0 000 .027v7.737C0 13.216.784 14 1.75 14h12.5A1.75 1.75 0 0016 12.25v-8.5A1.75 1.75 0 0014.25 2H1.75zM14.5 4.07v-.32a.25.25 0 00-.25-.25H1.75a.25.25 0 00-.25.25v.32L8 7.88l6.5-3.81zm-13 1.74v6.441c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25V5.809L8.38 9.397a.75.75 0 01-.76 0L1.5 5.809z"></path></svg>
"""
| 101.6 | 483 | 0.675197 | 124 | 508 | 2.758065 | 0.564516 | 0.04386 | 0.04386 | 0.052632 | 0.131579 | 0 | 0 | 0 | 0 | 0 | 0 | 0.460526 | 0.102362 | 508 | 4 | 484 | 127 | 0.289474 | 0 | 0 | 0 | 0 | 0.333333 | 0.956608 | 0.142012 | 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 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
e4c59c63b699dac6db537aa10620900b7bc8ce01 | 432 | py | Python | cobrakbase/core/__init__.py | Fxe/cobrakbase | a41c142b0808b4ded16b400167c70b2466eebd85 | [
"MIT"
] | 3 | 2018-11-28T12:48:54.000Z | 2022-02-28T22:20:32.000Z | cobrakbase/core/__init__.py | Fxe/cobrakbase | a41c142b0808b4ded16b400167c70b2466eebd85 | [
"MIT"
] | 2 | 2020-06-26T20:13:16.000Z | 2020-10-27T05:10:34.000Z | cobrakbase/core/__init__.py | Fxe/cobrakbase | a41c142b0808b4ded16b400167c70b2466eebd85 | [
"MIT"
] | 1 | 2020-09-02T17:40:34.000Z | 2020-09-02T17:40:34.000Z | import cobrakbase.core.kbasefba
import cobrakbase.core.kbasebiochem
import cobrakbase.core.kbasegenome
import cobrakbase.core.kbasematrices
from cobrakbase.core.model import KBaseFBAModel
from cobrakbase.core.kbasebiochemmedia import KBaseBiochemMedia
from cobrakbase.core.kbasefbafba import KBaseFBA
from cobrakbase.core.kbasegenomesgenome import KBaseGenome
from cobrakbase.core.build_metabolic_model import build_metabolic_model
| 43.2 | 71 | 0.893519 | 50 | 432 | 7.64 | 0.3 | 0.329843 | 0.235602 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.064815 | 432 | 9 | 72 | 48 | 0.945545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
e4cd39068c074f58cd5403147c90ec66f078c995 | 37 | py | Python | sfd/__init__.py | zeta1999/sfd.gluoncv | 163cfe9870b2a82212672a6f47cb882957bdfb63 | [
"Apache-2.0"
] | 28 | 2018-12-20T01:05:35.000Z | 2020-08-10T09:51:28.000Z | sfd/__init__.py | fangzhiweigg/sfd.gluoncv | 163cfe9870b2a82212672a6f47cb882957bdfb63 | [
"Apache-2.0"
] | 3 | 2018-12-21T09:36:25.000Z | 2020-08-10T03:21:34.000Z | sfd/__init__.py | fangzhiweigg/sfd.gluoncv | 163cfe9870b2a82212672a6f47cb882957bdfb63 | [
"Apache-2.0"
] | 6 | 2018-12-19T13:44:32.000Z | 2021-07-02T05:04:57.000Z | from .data import *
from .nn import * | 18.5 | 19 | 0.702703 | 6 | 37 | 4.333333 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.189189 | 37 | 2 | 20 | 18.5 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
e4f21b6bac5079f9ce7e3ac856c8ac8bae04c60e | 23 | py | Python | tests/cfb/__init__.py | saiemgilani/sportsdataverse-py | 77ae3accbb071b5308335b931e4e55a65e1500cd | [
"MIT"
] | 12 | 2021-10-15T01:24:18.000Z | 2022-03-15T17:00:22.000Z | tests/cfb/__init__.py | saiemgilani/sportsdataverse-py | 77ae3accbb071b5308335b931e4e55a65e1500cd | [
"MIT"
] | 19 | 2021-11-02T05:53:41.000Z | 2022-03-16T14:16:51.000Z | tests/cfb/__init__.py | saiemgilani/sportsdataverse-py | 77ae3accbb071b5308335b931e4e55a65e1500cd | [
"MIT"
] | 1 | 2021-12-21T14:49:25.000Z | 2021-12-21T14:49:25.000Z | from .test_pbp import * | 23 | 23 | 0.782609 | 4 | 23 | 4.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130435 | 23 | 1 | 23 | 23 | 0.85 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
e4fd9ceed06c1a9ade3b2e948b844ded9a94ec1b | 31 | py | Python | cover-letter-generator/gen.py | Maffblaster/cover-letter-generator | 71a97a112d480082230e9cf7917e3ba20d31431b | [
"MIT"
] | null | null | null | cover-letter-generator/gen.py | Maffblaster/cover-letter-generator | 71a97a112d480082230e9cf7917e3ba20d31431b | [
"MIT"
] | null | null | null | cover-letter-generator/gen.py | Maffblaster/cover-letter-generator | 71a97a112d480082230e9cf7917e3ba20d31431b | [
"MIT"
] | null | null | null |
import cli
import argparse
| 4.428571 | 15 | 0.741935 | 4 | 31 | 5.75 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.258065 | 31 | 6 | 16 | 5.166667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
900ca6b69de38b9d481044cf07d19cf7e2a5bd05 | 132 | py | Python | Lib/site-packages/rails/response.py | FredyJoelSis/herokuapi | e203e1c7ba70ff384d43db27f6fa8b1d56c73b76 | [
"BSD-3-Clause"
] | 15 | 2015-11-19T03:56:51.000Z | 2022-03-06T06:24:52.000Z | Lib/site-packages/rails/response.py | FredyJoelSis/herokuapi | e203e1c7ba70ff384d43db27f6fa8b1d56c73b76 | [
"BSD-3-Clause"
] | 4 | 2015-07-31T22:12:08.000Z | 2015-09-08T17:19:00.000Z | rails/response.py | PythonRails/pythonrails | 1e199b9da4da5b24fef39fc6212d71fc9fbb18a5 | [
"MIT"
] | 2 | 2021-09-15T02:30:27.000Z | 2022-03-23T14:13:41.000Z | from webob import Response as WebobResponse
class Response(WebobResponse):
"""
Extended response object.
"""
pass
| 14.666667 | 43 | 0.681818 | 13 | 132 | 6.923077 | 0.769231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.242424 | 132 | 8 | 44 | 16.5 | 0.9 | 0.189394 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
90136e9550cae1f6aa9b3b6e94b439d217e14fe3 | 146 | py | Python | sbml2julia/__init__.py | paulflang/DisFit | 84aec7b01139f2675511ae2165cdcc169ceedb72 | [
"MIT"
] | 5 | 2020-11-06T13:56:30.000Z | 2021-12-06T13:28:38.000Z | sbml2julia/__init__.py | paulflang/DisFit | 84aec7b01139f2675511ae2165cdcc169ceedb72 | [
"MIT"
] | 9 | 2020-05-28T16:15:15.000Z | 2020-10-04T12:08:15.000Z | sbml2julia/__init__.py | paulflang/DisFit | 84aec7b01139f2675511ae2165cdcc169ceedb72 | [
"MIT"
] | null | null | null | # read version
from ._version import __version__ # noqa: F401
from .core import SBML2JuliaProblem # noqa: F401
import sbml2julia # noqa: F401
| 24.333333 | 49 | 0.760274 | 18 | 146 | 5.888889 | 0.5 | 0.226415 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.091667 | 0.178082 | 146 | 5 | 50 | 29.2 | 0.791667 | 0.308219 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
90458f8fe5d1e441811b3e935ec01e3918935c2e | 34 | py | Python | src/dbspy/core/analyze/curve/__init__.py | ZhengKeli/PositronSpector | be0281fe50fe634183b6f239f03b7140c1dc0b7f | [
"MIT"
] | 1 | 2019-06-18T09:23:42.000Z | 2019-06-18T09:23:42.000Z | src/dbspy/core/analyze/curve/__init__.py | ZhengKeli/DBSpy | be0281fe50fe634183b6f239f03b7140c1dc0b7f | [
"MIT"
] | null | null | null | src/dbspy/core/analyze/curve/__init__.py | ZhengKeli/DBSpy | be0281fe50fe634183b6f239f03b7140c1dc0b7f | [
"MIT"
] | null | null | null | from ._curve import Conf, Process
| 17 | 33 | 0.794118 | 5 | 34 | 5.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147059 | 34 | 1 | 34 | 34 | 0.896552 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
5f471522196d36ff8fe7a02ea6ce38c30fafe802 | 138,663 | py | Python | step1/bilibili-rank-list.py | karoyqiu/xbmc-kodi-private-china-addons | e63026c15a72736f7a9d04480639891979b36cca | [
"MIT"
] | 420 | 2020-03-03T06:41:55.000Z | 2022-03-31T00:10:43.000Z | step1/bilibili-rank-list.py | karoyqiu/xbmc-kodi-private-china-addons | e63026c15a72736f7a9d04480639891979b36cca | [
"MIT"
] | 21 | 2020-05-19T00:05:14.000Z | 2022-02-18T16:34:31.000Z | step1/bilibili-rank-list.py | karoyqiu/xbmc-kodi-private-china-addons | e63026c15a72736f7a9d04480639891979b36cca | [
"MIT"
] | 72 | 2020-04-06T13:15:39.000Z | 2022-03-31T23:23:51.000Z | #b站全站排行列表
from bs4 import BeautifulSoup
html_doc = """
<!DOCTYPE html><html lang="zh-Hans"><head><title>热门视频排行榜 - 哔哩哔哩 (゜-゜)つロ 干杯~-bilibili</title><meta charset="utf-8"><meta name="spm_prefix" content="333.158"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="renderer" content="webkit"><meta name="description" content="bilibili是国内知名的视频弹幕网站,这里有最及时的动漫新番,最棒的ACG氛围,最有创意的Up主。大家可以在这里找到许多欢乐。"><meta name="keywords" content="B站,弹幕,字幕,AMV,MAD,MTV,ANIME,动漫,动漫音乐,游戏,游戏解说,ACG,galgame,动画,番组,新番,初音,洛天依,vocaloid"><script type="text/javascript">window.spmReportData={},window.reportConfig={sample:1,scrollTracker:!0,msgObjects:"spmReportData"}</script><script type="text/javascript">window.__BILI_CONFIG__={"show_bv":false}</script><link rel="preload" href="//s1.hdslb.com/bfs/static/jinkela/rank/1.rank.66267091ff49e189079246486d715b1a4f140057.js" as="script"><link rel="preload" href="//s1.hdslb.com/bfs/static/jinkela/rank/css/rank.0.66267091ff49e189079246486d715b1a4f140057.css" as="style"><link rel="preload" href="//s1.hdslb.com/bfs/static/jinkela/rank/rank.66267091ff49e189079246486d715b1a4f140057.js" as="script"><link rel="stylesheet" href="//s1.hdslb.com/bfs/static/jinkela/rank/css/rank.0.66267091ff49e189079246486d715b1a4f140057.css"></head><body><div id="biliMainHeader" type="all" style="height:263px"></div><div id="rank-app"></div><script type="text/javascript" src="//s1.hdslb.com/bfs/static/jinkela/long/js/jquery/jquery1.7.2.min.js"></script><script type="text/javascript" src="//s1.hdslb.com/bfs/seed/jinkela/header-v2/header.js" defer="defer"></script><script type="text/javascript" src="//s1.hdslb.com/bfs/cm/st/bundle.js" crossorigin></script><div id="app" data-server-rendered="true"><div class="b-page-body"><div class="main-inner b-wrap"><div class="rank-container"><div class="rank-head"><ul class="rank-menu"><li type="all" class="active"><span class="rank-icon all"></span><span class="text">全站榜</span></li><li type="origin"><span class="rank-icon origin"></span><span class="text">原创榜</span></li><li type="bangumi"><span class="rank-icon bangumi"></span><span class="text">新番榜</span></li><li type="cinema"><span class="rank-icon cinema"></span><span class="text">影视榜</span></li><li type="rookie"><span class="rank-icon rookie"></span><span class="text">新人榜</span></li></ul></div><div class="rank-body"><div seasonType="1" class="rank-tab-wrap"><ul class="rank-tab"><li class="active">全站</li><li>动画</li><li>国创相关</li><li>音乐</li><li>舞蹈</li><li>游戏</li><li>科技</li><li>数码</li><li>生活</li><li>鬼畜</li><li>时尚</li><li>娱乐</li><li>影视</li></ul><div class="rank-type-dropdown"><div class="bili-dropdown rank-dropdown"><span class="selected">全部投稿</span><i class="icon icon-arrow-down"></i><ul class="dropdown-list"><li class="dropdown-item" style="display:none;">全部投稿</li><li class="dropdown-item" style="display:;">近期投稿</li></ul></div><div class="bili-dropdown rank-dropdown"><span class="selected">三日排行</span><i class="icon icon-arrow-down"></i><ul class="dropdown-list"><li class="dropdown-item" style="display:;">日排行</li><li class="dropdown-item" style="display:none;">三日排行</li><li class="dropdown-item" style="display:;">周排行</li><li class="dropdown-item" style="display:;">月排行</li></ul></div></div></div><div class="rank-list-head"><div class="rank_tips"><i class="b-icon-tip"></i><span class="tip-txt">统计所有投稿在 2020年02月27日 - 2020年03月01日 的数据综合得分,每日更新一次</span></div></div><div class="rank-list-wrap"><ul class="rank-list"><li class="rank-item"><div class="num">1</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91835249" target="_blank"><div class="lazy-img cover"><img alt="这十个软件,让你的电脑舒适度提升1400%" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91835249" target="_blank" class="title">这十个软件,让你的电脑舒适度提升1400%</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>174.5万</span><span class="data-box"><i class="b-icon view"></i>7492</span><a target="_blank" href="//space.bilibili.com/17873487"><span class="data-box"><i class="b-icon author"></i>飞鱼不在天</span></a></div><div class="pts"><div>7874690</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">2</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92252043" target="_blank"><div class="lazy-img cover"><img alt="《崩坏3》动画短片「天穹流星」" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92252043" target="_blank" class="title">《崩坏3》动画短片「天穹流星」</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>264.4万</span><span class="data-box"><i class="b-icon view"></i>9.7万</span><a target="_blank" href="//space.bilibili.com/27534330"><span class="data-box"><i class="b-icon author"></i>崩坏3第一偶像爱酱</span></a></div><div class="pts"><div>7573351</div>综合得分
</div></div><div class="other-panel"><div class="other"><a target="_blank" href="//www.bilibili.com/video/av92253209" class="other-link"><span class="title">「Starfall」——《崩坏3》印象曲(演唱者:袁娅维)</span><span>综合评分</span><strong>1830537</strong></a></div><a class="more-data" style="display:none;">显示UP主全部上榜视频<i></i></a></div></div></li><li class="rank-item"><div class="num">3</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91572143" target="_blank"><div class="lazy-img cover"><img alt="病 名 为 钉 钉钉钉钉钉钉...(钉钉音效与人声完美契合电音 无限循环 疯狂洗脑)" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91572143" target="_blank" class="title">病 名 为 钉 钉钉钉钉钉钉...(钉钉音效与人声完美契合电音 无限循环 疯狂洗脑)</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>171.9万</span><span class="data-box"><i class="b-icon view"></i>3.0万</span><a target="_blank" href="//space.bilibili.com/228651"><span class="data-box"><i class="b-icon author"></i>赤leopard_大暴</span></a></div><div class="pts"><div>3192103</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">4</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92699533" target="_blank"><div class="lazy-img cover"><img alt="【何同学】二十万元的电脑是什么样子的?苹果Mac Pro深度体验" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92699533" target="_blank" class="title">【何同学】二十万元的电脑是什么样子的?苹果Mac Pro深度体验</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>146.9万</span><span class="data-box"><i class="b-icon view"></i>2.4万</span><a target="_blank" href="//space.bilibili.com/163637592"><span class="data-box"><i class="b-icon author"></i>老师好我叫何同学</span></a></div><div class="pts"><div>2874317</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">5</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91822864" target="_blank"><div class="lazy-img cover"><img alt="面对疫情日本为何消极?中国真的太NB了" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91822864" target="_blank" class="title">面对疫情日本为何消极?中国真的太NB了</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>326.5万</span><span class="data-box"><i class="b-icon view"></i>3.7万</span><a target="_blank" href="//space.bilibili.com/378885845"><span class="data-box"><i class="b-icon author"></i>不正经老丝</span></a></div><div class="pts"><div>2749905</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">6</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92274735" target="_blank"><div class="lazy-img cover"><img alt="分享烹饪3580元一位的顶级日料中最好吃的一道菜!包教包会!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92274735" target="_blank" class="title">分享烹饪3580元一位的顶级日料中最好吃的一道菜!包教包会!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>191.7万</span><span class="data-box"><i class="b-icon view"></i>1.9万</span><a target="_blank" href="//space.bilibili.com/2920960"><span class="data-box"><i class="b-icon author"></i>大祥哥来了</span></a></div><div class="pts"><div>2574448</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">7</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92177270" target="_blank"><div class="lazy-img cover"><img alt="我,老坛胡说,实名diss中国BOY超级大猩猩" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92177270" target="_blank" class="title">我,老坛胡说,实名diss中国BOY超级大猩猩</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>240.7万</span><span class="data-box"><i class="b-icon view"></i>11.0万</span><a target="_blank" href="//space.bilibili.com/279583114"><span class="data-box"><i class="b-icon author"></i>老坛胡说</span></a></div><div class="pts"><div>2499235</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">8</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92146996" target="_blank"><div class="lazy-img cover"><img alt="我回来了!我最近一年想做的事情!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92146996" target="_blank" class="title">我回来了!我最近一年想做的事情!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>323.8万</span><span class="data-box"><i class="b-icon view"></i>9.8万</span><a target="_blank" href="//space.bilibili.com/9824766"><span class="data-box"><i class="b-icon author"></i>敬汉卿</span></a></div><div class="pts"><div>2443710</div>综合得分
</div></div><div class="other-panel"><div class="other"><a target="_blank" href="//www.bilibili.com/video/av92424738" class="other-link"><span class="title">挑战三块黄油一口气吃完!除了油腻剩下的就是想呕吐了!</span><span>综合评分</span><strong>2225967</strong></a></div><a class="more-data" style="display:none;">显示UP主全部上榜视频<i></i></a></div></div></li><li class="rank-item"><div class="num">9</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91317525" target="_blank"><div class="lazy-img cover"><img alt="《野草》:我把16篇鲁迅写成了一首歌" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91317525" target="_blank" class="title">《野草》:我把16篇鲁迅写成了一首歌</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>64.0万</span><span class="data-box"><i class="b-icon view"></i>2561</span><a target="_blank" href="//space.bilibili.com/157831228"><span class="data-box"><i class="b-icon author"></i>SealWu吴一凡</span></a></div><div class="pts"><div>2323158</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">10</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91710819" target="_blank"><div class="lazy-img cover"><img alt="快 放 我 下 车!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91710819" target="_blank" class="title">快 放 我 下 车!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>100.9万</span><span class="data-box"><i class="b-icon view"></i>4376</span><a target="_blank" href="//space.bilibili.com/368912467"><span class="data-box"><i class="b-icon author"></i>Devil青酱</span></a></div><div class="pts"><div>2306169</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">11</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91521896" target="_blank"><div class="lazy-img cover"><img alt="珍 贵 录 像 : 慈善三巨头聚首斗地主" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91521896" target="_blank" class="title">珍 贵 录 像 : 慈善三巨头聚首斗地主</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>204.9万</span><span class="data-box"><i class="b-icon view"></i>4160</span><a target="_blank" href="//space.bilibili.com/13575288"><span class="data-box"><i class="b-icon author"></i>宇智钵啥是gay</span></a></div><div class="pts"><div>2006316</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">12</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92008692" target="_blank"><div class="lazy-img cover"><img alt="深层次解析日韩开卷考为何不及格,日韩的难言之隐(思密达没了)" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92008692" target="_blank" class="title">深层次解析日韩开卷考为何不及格,日韩的难言之隐(思密达没了)</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>104.2万</span><span class="data-box"><i class="b-icon view"></i>2.3万</span><a target="_blank" href="//space.bilibili.com/99336697"><span class="data-box"><i class="b-icon author"></i>树根龙门阵</span></a></div><div class="pts"><div>1965003</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">13</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91720074" target="_blank"><div class="lazy-img cover"><img alt="人干事?为阻止少年轻生,狙击手成功将其击毙【阅片无数36】" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91720074" target="_blank" class="title">人干事?为阻止少年轻生,狙击手成功将其击毙【阅片无数36】</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>200.2万</span><span class="data-box"><i class="b-icon view"></i>2.1万</span><a target="_blank" href="//space.bilibili.com/14110780"><span class="data-box"><i class="b-icon author"></i>凉风Kaze</span></a></div><div class="pts"><div>1937061</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">14</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91833336" target="_blank"><div class="lazy-img cover"><img alt="真实叶问本人咏春木人桩演示(全站最清晰胶片版)" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91833336" target="_blank" class="title">真实叶问本人咏春木人桩演示(全站最清晰胶片版)</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>227.3万</span><span class="data-box"><i class="b-icon view"></i>1.0万</span><a target="_blank" href="//space.bilibili.com/363116832"><span class="data-box"><i class="b-icon author"></i>天佑咏春</span></a></div><div class="pts"><div>1878186</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">15</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92101881" target="_blank"><div class="lazy-img cover"><img alt="弓箭高手老番茄" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92101881" target="_blank" class="title">弓箭高手老番茄</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>325.2万</span><span class="data-box"><i class="b-icon view"></i>5.5万</span><a target="_blank" href="//space.bilibili.com/546195"><span class="data-box"><i class="b-icon author"></i>老番茄</span></a></div><div class="pts"><div>1845017</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">16</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92536625" target="_blank"><div class="lazy-img cover"><img alt="好 兄 弟" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92536625" target="_blank" class="title">好 兄 弟</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>89.4万</span><span class="data-box"><i class="b-icon view"></i>7.7万</span><a target="_blank" href="//space.bilibili.com/2206456"><span class="data-box"><i class="b-icon author"></i>花少北丶</span></a></div><div class="pts"><div>1830732</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">17</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92523652" target="_blank"><div class="lazy-img cover"><img alt="【老E】比宇宙还要古老的存在!行星一样大的安康鱼!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92523652" target="_blank" class="title">【老E】比宇宙还要古老的存在!行星一样大的安康鱼!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>78.4万</span><span class="data-box"><i class="b-icon view"></i>6626</span><a target="_blank" href="//space.bilibili.com/433351"><span class="data-box"><i class="b-icon author"></i>EdmundDZhang</span></a></div><div class="pts"><div>1810956</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">18</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91610100" target="_blank"><div class="lazy-img cover"><img alt="【郭老师】华 农 捕 郭" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91610100" target="_blank" class="title">【郭老师】华 农 捕 郭</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>108.5万</span><span class="data-box"><i class="b-icon view"></i>5923</span><a target="_blank" href="//space.bilibili.com/375116258"><span class="data-box"><i class="b-icon author"></i>-Super屎蛋</span></a></div><div class="pts"><div>1732198</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">19</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91878989" target="_blank"><div class="lazy-img cover"><img alt="父母反对我做up主!该怎么说服他们?【读评论01】" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91878989" target="_blank" class="title">父母反对我做up主!该怎么说服他们?【读评论01】</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>161.2万</span><span class="data-box"><i class="b-icon view"></i>2.9万</span><a target="_blank" href="//space.bilibili.com/777536"><span class="data-box"><i class="b-icon author"></i>LexBurner</span></a></div><div class="pts"><div>1668614</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">20</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91755251" target="_blank"><div class="lazy-img cover"><img alt="见识下什么叫TMD绿茶婊!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91755251" target="_blank" class="title">见识下什么叫TMD绿茶婊!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>169.9万</span><span class="data-box"><i class="b-icon view"></i>3.2万</span><a target="_blank" href="//space.bilibili.com/318223"><span class="data-box"><i class="b-icon author"></i>Reiji-白龙</span></a></div><div class="pts"><div>1650296</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">21</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91844781" target="_blank"><div class="lazy-img cover"><img alt="我在3平米的房间住了两年............" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91844781" target="_blank" class="title">我在3平米的房间住了两年............</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>270.5万</span><span class="data-box"><i class="b-icon view"></i>9223</span><a target="_blank" href="//space.bilibili.com/8237763"><span class="data-box"><i class="b-icon author"></i>东亚悍匪阿_张</span></a></div><div class="pts"><div>1595133</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">22</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91556645" target="_blank"><div class="lazy-img cover"><img alt="“那是我日夜思念,深深爱着的人啊”" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91556645" target="_blank" class="title">“那是我日夜思念,深深爱着的人啊”</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>142.0万</span><span class="data-box"><i class="b-icon view"></i>1.5万</span><a target="_blank" href="//space.bilibili.com/178135921"><span class="data-box"><i class="b-icon author"></i>囧墙先生</span></a></div><div class="pts"><div>1556583</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">23</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91669955" target="_blank"><div class="lazy-img cover"><img alt="腾讯加持B站股权,B站又双叒叕变味了?【膨胀说】" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91669955" target="_blank" class="title">腾讯加持B站股权,B站又双叒叕变味了?【膨胀说】</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>162.5万</span><span class="data-box"><i class="b-icon view"></i>1.2万</span><a target="_blank" href="//space.bilibili.com/80304"><span class="data-box"><i class="b-icon author"></i>亚食人</span></a></div><div class="pts"><div>1535679</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">24</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91750514" target="_blank"><div class="lazy-img cover"><img alt="【 唱 首 歌 】我 钉 起 来 真 好 听" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91750514" target="_blank" class="title">【 唱 首 歌 】我 钉 起 来 真 好 听</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>118.1万</span><span class="data-box"><i class="b-icon view"></i>2.6万</span><a target="_blank" href="//space.bilibili.com/481393564"><span class="data-box"><i class="b-icon author"></i>钉钉DingTalk</span></a></div><div class="pts"><div>1491066</div>综合得分
</div></div><div class="other-panel"><div class="other"><a target="_blank" href="//www.bilibili.com/video/av89441613" class="other-link"><span class="title">【 钉 钉 本 钉 ,在 线 求 饶 】</span><span>综合评分</span><strong>998745</strong></a></div><a class="more-data" style="display:none;">显示UP主全部上榜视频<i></i></a></div></div></li><li class="rank-item"><div class="num">25</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92424996" target="_blank"><div class="lazy-img cover"><img alt="【党妹】懒人在家煮火锅!再来串甜到心里的冰糖草莓~不出门也能吃到美味!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92424996" target="_blank" class="title">【党妹】懒人在家煮火锅!再来串甜到心里的冰糖草莓~不出门也能吃到美味!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>103.9万</span><span class="data-box"><i class="b-icon view"></i>2.7万</span><a target="_blank" href="//space.bilibili.com/466272"><span class="data-box"><i class="b-icon author"></i>机智的党妹</span></a></div><div class="pts"><div>1481200</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">26</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av90748215" target="_blank"><div class="lazy-img cover"><img alt="【师 生 对 线】这网课上得就尼玛离谱!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av90748215" target="_blank" class="title">【师 生 对 线】这网课上得就尼玛离谱!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>83.6万</span><span class="data-box"><i class="b-icon view"></i>7071</span><a target="_blank" href="//space.bilibili.com/3353026"><span class="data-box"><i class="b-icon author"></i>鹤吱菌</span></a></div><div class="pts"><div>1446500</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">27</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92290565" target="_blank"><div class="lazy-img cover"><img alt="处 处 删 (注意!脖子以下不可描述!)" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92290565" target="_blank" class="title">处 处 删 (注意!脖子以下不可描述!)</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>50.1万</span><span class="data-box"><i class="b-icon view"></i>5396</span><a target="_blank" href="//space.bilibili.com/27692819"><span class="data-box"><i class="b-icon author"></i>切粒粒</span></a></div><div class="pts"><div>1411936</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">28</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92285943" target="_blank"><div class="lazy-img cover"><img alt="【祖娅纳惜】 囍 【这什么灵魂唢呐!!】" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92285943" target="_blank" class="title">【祖娅纳惜】 囍 【这什么灵魂唢呐!!】</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>45.1万</span><span class="data-box"><i class="b-icon view"></i>3366</span><a target="_blank" href="//space.bilibili.com/3046429"><span class="data-box"><i class="b-icon author"></i>祖娅纳惜</span></a></div><div class="pts"><div>1403823</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">29</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av34107674" target="_blank"><div class="lazy-img cover"><img alt="10分钟改善斜方肌粗大、溜肩圆肩富贵包、背厚、肩颈背疼痛、高低肩!【周六野Zoey】" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av34107674" target="_blank" class="title">10分钟改善斜方肌粗大、溜肩圆肩富贵包、背厚、肩颈背疼痛、高低肩!【周六野Zoey】</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>62.0万</span><span class="data-box"><i class="b-icon view"></i>6897</span><a target="_blank" href="//space.bilibili.com/62540916"><span class="data-box"><i class="b-icon author"></i>周六野Zoey</span></a></div><div class="pts"><div>1339601</div>综合得分
</div></div><div class="other-panel"><div class="other"><a target="_blank" href="//www.bilibili.com/video/av8879609" class="other-link"><span class="title">快速瘦小腿运动!摆脱萝卜腿让小腿更细长,拉伸小腿【周六野Zoey】</span><span>综合评分</span><strong>1165409</strong></a><a target="_blank" href="//www.bilibili.com/video/av8775849" class="other-link"><span class="title">五分钟在家瘦腰运动!快速瘦肚子小蛮腰,马甲线一周现形!适合初学者【周六野Zoey】</span><span>综合评分</span><strong>1069408</strong></a></div><a class="more-data">显示UP主全部上榜视频<i></i></a></div></div></li><li class="rank-item"><div class="num">30</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92437162" target="_blank"><div class="lazy-img cover"><img alt="撕逼剧透全滚粗!百万粉up主教你提升弹幕质量的秘诀!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92437162" target="_blank" class="title">撕逼剧透全滚粗!百万粉up主教你提升弹幕质量的秘诀!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>82.3万</span><span class="data-box"><i class="b-icon view"></i>1.0万</span><a target="_blank" href="//space.bilibili.com/63231"><span class="data-box"><i class="b-icon author"></i>泛式</span></a></div><div class="pts"><div>1336186</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">31</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av90782208" target="_blank"><div class="lazy-img cover"><img alt="这 TM 才叫 无 缝 衔 接 !!!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av90782208" target="_blank" class="title">这 TM 才叫 无 缝 衔 接 !!!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>51.0万</span><span class="data-box"><i class="b-icon view"></i>2350</span><a target="_blank" href="//space.bilibili.com/36117352"><span class="data-box"><i class="b-icon author"></i>一颗糖糖゛</span></a></div><div class="pts"><div>1291730</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">32</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91675841" target="_blank"><div class="lazy-img cover"><img alt="孩子要出道了,《被 迫 营 业》MV正式首发!!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91675841" target="_blank" class="title">孩子要出道了,《被 迫 营 业》MV正式首发!!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>51.8万</span><span class="data-box"><i class="b-icon view"></i>939</span><a target="_blank" href="//space.bilibili.com/27756469"><span class="data-box"><i class="b-icon author"></i>奶糕成精档案社</span></a></div><div class="pts"><div>1274818</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">33</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92135544" target="_blank"><div class="lazy-img cover"><img alt="沙雕不能拯救单身狗!!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92135544" target="_blank" class="title">沙雕不能拯救单身狗!!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>41.8万</span><span class="data-box"><i class="b-icon view"></i>3391</span><a target="_blank" href="//space.bilibili.com/32172331"><span class="data-box"><i class="b-icon author"></i>战场ヶ原様</span></a></div><div class="pts"><div>1262560</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">34</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92393584" target="_blank"><div class="lazy-img cover"><img alt="害怕!和熊同桌吃早饭,60斤食物,吃完要陪练格斗?!【北极大宝荐06】" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92393584" target="_blank" class="title">害怕!和熊同桌吃早饭,60斤食物,吃完要陪练格斗?!【北极大宝荐06】</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>134.8万</span><span class="data-box"><i class="b-icon view"></i>1.6万</span><a target="_blank" href="//space.bilibili.com/39627524"><span class="data-box"><i class="b-icon author"></i>食贫道</span></a></div><div class="pts"><div>1225581</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">35</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91655656" target="_blank"><div class="lazy-img cover"><img alt="【处处吻】物理版 进来挑战一下" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91655656" target="_blank" class="title">【处处吻】物理版 进来挑战一下</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>69.0万</span><span class="data-box"><i class="b-icon view"></i>4333</span><a target="_blank" href="//space.bilibili.com/250648682"><span class="data-box"><i class="b-icon author"></i>红豆稀饭中</span></a></div><div class="pts"><div>1219087</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">36</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91871151" target="_blank"><div class="lazy-img cover"><img alt="【经典老番】我一路向北,离开有怡的季节" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91871151" target="_blank" class="title">【经典老番】我一路向北,离开有怡的季节</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>86.1万</span><span class="data-box"><i class="b-icon view"></i>8554</span><a target="_blank" href="//space.bilibili.com/345259842"><span class="data-box"><i class="b-icon author"></i>BEmow</span></a></div><div class="pts"><div>1216950</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">37</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91880741" target="_blank"><div class="lazy-img cover"><img alt="外国小哥体验了一天月经之后,决定给湖北的医护人员捐卫生巾和安心裤" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91880741" target="_blank" class="title">外国小哥体验了一天月经之后,决定给湖北的医护人员捐卫生巾和安心裤</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>77.4万</span><span class="data-box"><i class="b-icon view"></i>1.8万</span><a target="_blank" href="//space.bilibili.com/398597377"><span class="data-box"><i class="b-icon author"></i>贝乐泰是冠军</span></a></div><div class="pts"><div>1215165</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">38</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av70455264" target="_blank"><div class="lazy-img cover"><img alt="女团腿 去头尾 自用" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av70455264" target="_blank" class="title">女团腿 去头尾 自用</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>57.9万</span><span class="data-box"><i class="b-icon view"></i>3070</span><a target="_blank" href="//space.bilibili.com/248404676"><span class="data-box"><i class="b-icon author"></i>木马唧唧</span></a></div><div class="pts"><div>1199618</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">39</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av90866754" target="_blank"><div class="lazy-img cover"><img alt="简单高效学生党瘦胳膊运动|每天8分钟,亲测一周见效!去拜拜肉,消副乳|无器械,无需场地,站着做瘦手臂操!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av90866754" target="_blank" class="title">简单高效学生党瘦胳膊运动|每天8分钟,亲测一周见效!去拜拜肉,消副乳|无器械,无需场地,站着做瘦手臂操!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>24.6万</span><span class="data-box"><i class="b-icon view"></i>3727</span><a target="_blank" href="//space.bilibili.com/369750017"><span class="data-box"><i class="b-icon author"></i>韩小四April</span></a></div><div class="pts"><div>1199036</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">40</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91770298" target="_blank"><div class="lazy-img cover"><img alt="服了日本,在东京告诉你为啥日本的确诊人数涨的慢。日本佛系抗疫下的日常惊悚加无奈加震惊vlog" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91770298" target="_blank" class="title">服了日本,在东京告诉你为啥日本的确诊人数涨的慢。日本佛系抗疫下的日常惊悚加无奈加震惊vlog</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>291.9万</span><span class="data-box"><i class="b-icon view"></i>8241</span><a target="_blank" href="//space.bilibili.com/254726274"><span class="data-box"><i class="b-icon author"></i>东京大明白</span></a></div><div class="pts"><div>1178981</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">41</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92333422" target="_blank"><div class="lazy-img cover"><img alt="普 通 木 门" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92333422" target="_blank" class="title">普 通 木 门</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>50.2万</span><span class="data-box"><i class="b-icon view"></i>3688</span><a target="_blank" href="//space.bilibili.com/36298367"><span class="data-box"><i class="b-icon author"></i>Jimoki_</span></a></div><div class="pts"><div>1145975</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">42</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91458840" target="_blank"><div class="lazy-img cover"><img alt="“我们的存在 本身就是谋逆”【燃向双声道|权谋|帝王霸业】" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91458840" target="_blank" class="title">“我们的存在 本身就是谋逆”【燃向双声道|权谋|帝王霸业】</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>41.8万</span><span class="data-box"><i class="b-icon view"></i>2582</span><a target="_blank" href="//space.bilibili.com/500619654"><span class="data-box"><i class="b-icon author"></i>爱打瞌睡的考拉-</span></a></div><div class="pts"><div>1123438</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">43</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91888385" target="_blank"><div class="lazy-img cover"><img alt="相亲对象居然是我的粉丝!场面一度尴尬!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91888385" target="_blank" class="title">相亲对象居然是我的粉丝!场面一度尴尬!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>215.6万</span><span class="data-box"><i class="b-icon view"></i>3.1万</span><a target="_blank" href="//space.bilibili.com/449825072"><span class="data-box"><i class="b-icon author"></i>高冷小姜</span></a></div><div class="pts"><div>1118607</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">44</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92389548" target="_blank"><div class="lazy-img cover"><img alt="【半佛】减肥产品是如何骗你钱的?" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92389548" target="_blank" class="title">【半佛】减肥产品是如何骗你钱的?</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>74.1万</span><span class="data-box"><i class="b-icon view"></i>1.2万</span><a target="_blank" href="//space.bilibili.com/37663924"><span class="data-box"><i class="b-icon author"></i>硬核的半佛仙人</span></a></div><div class="pts"><div>1092769</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">45</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av90824584" target="_blank"><div class="lazy-img cover"><img alt="当 前 老 师 网 课 现 状" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av90824584" target="_blank" class="title">当 前 老 师 网 课 现 状</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>37.4万</span><span class="data-box"><i class="b-icon view"></i>2264</span><a target="_blank" href="//space.bilibili.com/120586"><span class="data-box"><i class="b-icon author"></i>凯玟桑</span></a></div><div class="pts"><div>1092370</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">46</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91941319" target="_blank"><div class="lazy-img cover"><img alt="【三神定喘】治一个死一百个,三个疗程彻底断气,让你体验升天的感觉" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91941319" target="_blank" class="title">【三神定喘】治一个死一百个,三个疗程彻底断气,让你体验升天的感觉</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>55.1万</span><span class="data-box"><i class="b-icon view"></i>5974</span><a target="_blank" href="//space.bilibili.com/394201823"><span class="data-box"><i class="b-icon author"></i>狗辉大师</span></a></div><div class="pts"><div>1087881</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">47</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91703457" target="_blank"><div class="lazy-img cover"><img alt="【海绵宝宝】B 站 等 级 现 状" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91703457" target="_blank" class="title">【海绵宝宝】B 站 等 级 现 状</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>71.9万</span><span class="data-box"><i class="b-icon view"></i>3.4万</span><a target="_blank" href="//space.bilibili.com/12876332"><span class="data-box"><i class="b-icon author"></i>霍顿</span></a></div><div class="pts"><div>1058754</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">48</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92166013" target="_blank"><div class="lazy-img cover"><img alt="我真的太难了!这些东西要怎么选啊!我要做老八!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92166013" target="_blank" class="title">我真的太难了!这些东西要怎么选啊!我要做老八!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>114.4万</span><span class="data-box"><i class="b-icon view"></i>14.0万</span><a target="_blank" href="//space.bilibili.com/562197"><span class="data-box"><i class="b-icon author"></i>中国BOY超级大猩猩</span></a></div><div class="pts"><div>1054284</div>综合得分
</div></div><div class="other-panel"><div class="other"><a target="_blank" href="//www.bilibili.com/video/av92538218" class="other-link"><span class="title">每天使用健身环锻炼身体,持续一周,会有什么改变吗?</span><span>综合评分</span><strong>872755</strong></a></div><a class="more-data" style="display:none;">显示UP主全部上榜视频<i></i></a></div></div></li><li class="rank-item"><div class="num">49</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92378722" target="_blank"><div class="lazy-img cover"><img alt="五斤鸡胸肉可以做出多少鸡精?小伙花两天时间才做出来这么点" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92378722" target="_blank" class="title">五斤鸡胸肉可以做出多少鸡精?小伙花两天时间才做出来这么点</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>111.6万</span><span class="data-box"><i class="b-icon view"></i>2.7万</span><a target="_blank" href="//space.bilibili.com/337521240"><span class="data-box"><i class="b-icon author"></i>记录生活的蛋黄派</span></a></div><div class="pts"><div>1052990</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">50</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av50314054" target="_blank"><div class="lazy-img cover"><img alt="瘦腿课表(美丽芭蕾外侧+内侧+第三套+第四套+美丽芭蕾拉伸)" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av50314054" target="_blank" class="title">瘦腿课表(美丽芭蕾外侧+内侧+第三套+第四套+美丽芭蕾拉伸)</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>50.0万</span><span class="data-box"><i class="b-icon view"></i>1.1万</span><a target="_blank" href="//space.bilibili.com/2993682"><span class="data-box"><i class="b-icon author"></i>普鲁士ll</span></a></div><div class="pts"><div>1045804</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">51</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av3534854" target="_blank"><div class="lazy-img cover"><img alt="【更新1p,告别蝴蝶袖】美丽芭蕾 天鹅臂 累断手" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av3534854" target="_blank" class="title">【更新1p,告别蝴蝶袖】美丽芭蕾 天鹅臂 累断手</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>69.2万</span><span class="data-box"><i class="b-icon view"></i>1.3万</span><a target="_blank" href="//space.bilibili.com/3751951"><span class="data-box"><i class="b-icon author"></i>废柴家里蹲</span></a></div><div class="pts"><div>1042484</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">52</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av83835400" target="_blank"><div class="lazy-img cover"><img alt="康复专家手把手教学,「石原里美」式下颌线!(P2完整跟练)" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av83835400" target="_blank" class="title">康复专家手把手教学,「石原里美」式下颌线!(P2完整跟练)</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>24.9万</span><span class="data-box"><i class="b-icon view"></i>6103</span><a target="_blank" href="//space.bilibili.com/152015773"><span class="data-box"><i class="b-icon author"></i>瘦不了猫</span></a></div><div class="pts"><div>1029120</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">53</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92180296" target="_blank"><div class="lazy-img cover"><img alt="《明日方舟》携手WWF联合公益活动「万类共生」宣传PV" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92180296" target="_blank" class="title">《明日方舟》携手WWF联合公益活动「万类共生」宣传PV</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>78.6万</span><span class="data-box"><i class="b-icon view"></i>1.0万</span><a target="_blank" href="//space.bilibili.com/161775300"><span class="data-box"><i class="b-icon author"></i>明日方舟</span></a></div><div class="pts"><div>1016104</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">54</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92147507" target="_blank"><div class="lazy-img cover"><img alt="吃 虾 大 户" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92147507" target="_blank" class="title">吃 虾 大 户</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>107.4万</span><span class="data-box"><i class="b-icon view"></i>8699</span><a target="_blank" href="//space.bilibili.com/99157282"><span class="data-box"><i class="b-icon author"></i>盗月社食遇记</span></a></div><div class="pts"><div>1010436</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">55</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av90541176" target="_blank"><div class="lazy-img cover"><img alt="传说中要靠吸吮少女“续命”的老两口,遇到富江会怎样呢?《富江:养女》" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av90541176" target="_blank" class="title">传说中要靠吸吮少女“续命”的老两口,遇到富江会怎样呢?《富江:养女》</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>88.1万</span><span class="data-box"><i class="b-icon view"></i>4566</span><a target="_blank" href="//space.bilibili.com/452309333"><span class="data-box"><i class="b-icon author"></i>丸子叨叨叨</span></a></div><div class="pts"><div>1008646</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">56</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91996500" target="_blank"><div class="lazy-img cover"><img alt="【醋醋】这就是二次元广场舞吗,真香!彩虹节拍【bdf2020】" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91996500" target="_blank" class="title">【醋醋】这就是二次元广场舞吗,真香!彩虹节拍【bdf2020】</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>86.4万</span><span class="data-box"><i class="b-icon view"></i>2634</span><a target="_blank" href="//space.bilibili.com/2689967"><span class="data-box"><i class="b-icon author"></i>醋醋cucu</span></a></div><div class="pts"><div>1002846</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">57</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91847164" target="_blank"><div class="lazy-img cover"><img alt="5分钟让你明白BGM的重要性~你见过配乐欺负诗朗诵吗?到底是配乐重要还是诗朗诵重要?侯乐天音乐喜剧之《钢琴不是吹的》—配乐诗朗诵" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91847164" target="_blank" class="title">5分钟让你明白BGM的重要性~你见过配乐欺负诗朗诵吗?到底是配乐重要还是诗朗诵重要?侯乐天音乐喜剧之《钢琴不是吹的》—配乐诗朗诵</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>50.7万</span><span class="data-box"><i class="b-icon view"></i>2462</span><a target="_blank" href="//space.bilibili.com/64840236"><span class="data-box"><i class="b-icon author"></i>侯乐天工作室</span></a></div><div class="pts"><div>998398</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">58</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92119607" target="_blank"><div class="lazy-img cover"><img alt="祖 安 一 家 亲 ????(大结局)" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92119607" target="_blank" class="title">祖 安 一 家 亲 ????(大结局)</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>65.9万</span><span class="data-box"><i class="b-icon view"></i>3180</span><a target="_blank" href="//space.bilibili.com/9354231"><span class="data-box"><i class="b-icon author"></i>快乐的台长</span></a></div><div class="pts"><div>994276</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">59</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92194218" target="_blank"><div class="lazy-img cover"><img alt="称霸了6亿年 ,才发现自己忘了长脑子【龙女动物学07】刺胞动物门" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92194218" target="_blank" class="title">称霸了6亿年 ,才发现自己忘了长脑子【龙女动物学07】刺胞动物门</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>79.1万</span><span class="data-box"><i class="b-icon view"></i>3083</span><a target="_blank" href="//space.bilibili.com/18706318"><span class="data-box"><i class="b-icon author"></i>龙女之声</span></a></div><div class="pts"><div>978966</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">60</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92142952" target="_blank"><div class="lazy-img cover"><img alt="那些说话喜欢夹英文的中国人" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92142952" target="_blank" class="title">那些说话喜欢夹英文的中国人</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>115.4万</span><span class="data-box"><i class="b-icon view"></i>6936</span><a target="_blank" href="//space.bilibili.com/297242063"><span class="data-box"><i class="b-icon author"></i>黄一刀有毒</span></a></div><div class="pts"><div>975355</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">61</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91341454" target="_blank"><div class="lazy-img cover"><img alt="自制KFC肯德基炸鸡翅,鲜嫩多汁,酥脆外皮的关键" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91341454" target="_blank" class="title">自制KFC肯德基炸鸡翅,鲜嫩多汁,酥脆外皮的关键</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>32.1万</span><span class="data-box"><i class="b-icon view"></i>459</span><a target="_blank" href="//space.bilibili.com/99795254"><span class="data-box"><i class="b-icon author"></i>丁抠抠的小厨房</span></a></div><div class="pts"><div>974872</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">62</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92121576" target="_blank"><div class="lazy-img cover"><img alt="我被女朋友捆绑在厕所,公开处刑!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92121576" target="_blank" class="title">我被女朋友捆绑在厕所,公开处刑!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>106.8万</span><span class="data-box"><i class="b-icon view"></i>2.3万</span><a target="_blank" href="//space.bilibili.com/147166910"><span class="data-box"><i class="b-icon author"></i>雨哥到处跑</span></a></div><div class="pts"><div>967790</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">63</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92186513" target="_blank"><div class="lazy-img cover"><img alt="教大家破解闪照,不用看闪照就知道里面是什么。" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92186513" target="_blank" class="title">教大家破解闪照,不用看闪照就知道里面是什么。</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>95.3万</span><span class="data-box"><i class="b-icon view"></i>1357</span><a target="_blank" href="//space.bilibili.com/174452295"><span class="data-box"><i class="b-icon author"></i>女装完就改名</span></a></div><div class="pts"><div>965132</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">64</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92674262" target="_blank"><div class="lazy-img cover"><img alt="龙吟草莓的妹妹:羊 啸 草 莓" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92674262" target="_blank" class="title">龙吟草莓的妹妹:羊 啸 草 莓</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>50.0万</span><span class="data-box"><i class="b-icon view"></i>4.0万</span><a target="_blank" href="//space.bilibili.com/18202105"><span class="data-box"><i class="b-icon author"></i>绵羊料理</span></a></div><div class="pts"><div>953045</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">65</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91930007" target="_blank"><div class="lazy-img cover"><img alt="【人狗共演】猜 猜 我 是 谁" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91930007" target="_blank" class="title">【人狗共演】猜 猜 我 是 谁</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>91.1万</span><span class="data-box"><i class="b-icon view"></i>1824</span><a target="_blank" href="//space.bilibili.com/297675463"><span class="data-box"><i class="b-icon author"></i>是我的星星啊啊</span></a></div><div class="pts"><div>947392</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">66</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av22227629" target="_blank"><div class="lazy-img cover"><img alt="在床上就可以做的20分钟特快瘦大腿操 2星期内明显见效【Coffee林芊妤】" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av22227629" target="_blank" class="title">在床上就可以做的20分钟特快瘦大腿操 2星期内明显见效【Coffee林芊妤】</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>43.1万</span><span class="data-box"><i class="b-icon view"></i>9117</span><a target="_blank" href="//space.bilibili.com/1960460"><span class="data-box"><i class="b-icon author"></i>带枪小女孩weibo</span></a></div><div class="pts"><div>939475</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">67</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92012084" target="_blank"><div class="lazy-img cover"><img alt="【嘟督咆哮解说】这才是疫情期间正确制作生日蛋糕的方式!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92012084" target="_blank" class="title">【嘟督咆哮解说】这才是疫情期间正确制作生日蛋糕的方式!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>54.9万</span><span class="data-box"><i class="b-icon view"></i>3.9万</span><a target="_blank" href="//space.bilibili.com/2403047"><span class="data-box"><i class="b-icon author"></i>嘟督不噶油</span></a></div><div class="pts"><div>926570</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">68</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av89411163" target="_blank"><div class="lazy-img cover"><img alt="这宇航员我TM不当了!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av89411163" target="_blank" class="title">这宇航员我TM不当了!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>69.9万</span><span class="data-box"><i class="b-icon view"></i>2730</span><a target="_blank" href="//space.bilibili.com/258547693"><span class="data-box"><i class="b-icon author"></i>麦老当</span></a></div><div class="pts"><div>922076</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">69</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91900795" target="_blank"><div class="lazy-img cover"><img alt="骁话一下:每百人6个被忽悠,引爆韩国疫情的奇葩邪教,为何如此猖獗?" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91900795" target="_blank" class="title">骁话一下:每百人6个被忽悠,引爆韩国疫情的奇葩邪教,为何如此猖獗?</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>90.0万</span><span class="data-box"><i class="b-icon view"></i>2.0万</span><a target="_blank" href="//space.bilibili.com/10330740"><span class="data-box"><i class="b-icon author"></i>观察者网</span></a></div><div class="pts"><div>920023</div>综合得分
</div></div><div class="other-panel"><div class="other"><a target="_blank" href="//www.bilibili.com/video/av92433763" class="other-link"><span class="title">【懂点儿啥32】韩国最大的“疫情”,就是他们的邪教</span><span>综合评分</span><strong>775616</strong></a></div><a class="more-data" style="display:none;">显示UP主全部上榜视频<i></i></a></div></div></li><li class="rank-item"><div class="num">70</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91544129" target="_blank"><div class="lazy-img cover"><img alt="当时我害怕极了,我....哈哈哈哈哈" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91544129" target="_blank" class="title">当时我害怕极了,我....哈哈哈哈哈</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>73.6万</span><span class="data-box"><i class="b-icon view"></i>1637</span><a target="_blank" href="//space.bilibili.com/79153003"><span class="data-box"><i class="b-icon author"></i>异瞳才不是死宅-</span></a></div><div class="pts"><div>912292</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">71</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av82766716" target="_blank"><div class="lazy-img cover"><img alt="【处处吻】 愣着干嘛 进来白嫖啊" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av82766716" target="_blank" class="title">【处处吻】 愣着干嘛 进来白嫖啊</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>46.3万</span><span class="data-box"><i class="b-icon view"></i>1207</span><a target="_blank" href="//space.bilibili.com/400413571"><span class="data-box"><i class="b-icon author"></i>一本正经的小方</span></a></div><div class="pts"><div>905272</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">72</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92188887" target="_blank"><div class="lazy-img cover"><img alt="【官方回播】Bilibili Macro Link-Visual Release 2019" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92188887" target="_blank" class="title">【官方回播】Bilibili Macro Link-Visual Release 2019</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>35.0万</span><span class="data-box"><i class="b-icon view"></i>3.9万</span><a target="_blank" href="//space.bilibili.com/403748305"><span class="data-box"><i class="b-icon author"></i>BML制作指挥部</span></a></div><div class="pts"><div>902541</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">73</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92157578" target="_blank"><div class="lazy-img cover"><img alt="【朱一旦】148 发现了一个全新的商机!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92157578" target="_blank" class="title">【朱一旦】148 发现了一个全新的商机!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>195.4万</span><span class="data-box"><i class="b-icon view"></i>4672</span><a target="_blank" href="//space.bilibili.com/437316738"><span class="data-box"><i class="b-icon author"></i>朱一旦的枯燥生活</span></a></div><div class="pts"><div>898603</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">74</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91763054" target="_blank"><div class="lazy-img cover"><img alt="【犬科踩点混剪|捕猎集锦|燃向】天性如此/Natural(野生狗片混剪)" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91763054" target="_blank" class="title">【犬科踩点混剪|捕猎集锦|燃向】天性如此/Natural(野生狗片混剪)</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>22.1万</span><span class="data-box"><i class="b-icon view"></i>1220</span><a target="_blank" href="//space.bilibili.com/1583050"><span class="data-box"><i class="b-icon author"></i>爱福西西一级学者</span></a></div><div class="pts"><div>897922</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">75</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91922911" target="_blank"><div class="lazy-img cover"><img alt="【允星河】这TM才是神仙打架" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91922911" target="_blank" class="title">【允星河】这TM才是神仙打架</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>108.0万</span><span class="data-box"><i class="b-icon view"></i>2017</span><a target="_blank" href="//space.bilibili.com/1605721"><span class="data-box"><i class="b-icon author"></i>允星河Yoseya</span></a></div><div class="pts"><div>876911</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">76</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91835142" target="_blank"><div class="lazy-img cover"><img alt="撸大猫" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91835142" target="_blank" class="title">撸大猫</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>116.6万</span><span class="data-box"><i class="b-icon view"></i>835</span><a target="_blank" href="//space.bilibili.com/12248850"><span class="data-box"><i class="b-icon author"></i>岑子舟</span></a></div><div class="pts"><div>868578</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">77</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91644176" target="_blank"><div class="lazy-img cover"><img alt="【神经病式配音】谁都是你老婆?!DD斩首!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91644176" target="_blank" class="title">【神经病式配音】谁都是你老婆?!DD斩首!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>41.9万</span><span class="data-box"><i class="b-icon view"></i>1303</span><a target="_blank" href="//space.bilibili.com/249118"><span class="data-box"><i class="b-icon author"></i>shourei小N</span></a></div><div class="pts"><div>841941</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">78</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91955082" target="_blank"><div class="lazy-img cover"><img alt="因为疑似新冠肺炎,我被澳洲医院隔离了【nya酱】" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91955082" target="_blank" class="title">因为疑似新冠肺炎,我被澳洲医院隔离了【nya酱】</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>66.5万</span><span class="data-box"><i class="b-icon view"></i>3405</span><a target="_blank" href="//space.bilibili.com/1885078"><span class="data-box"><i class="b-icon author"></i>nya酱的一生</span></a></div><div class="pts"><div>841561</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">79</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av89799412" target="_blank"><div class="lazy-img cover"><img alt="【声优接到诈骗电话】哈哈哈哈真的好好玩!!!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av89799412" target="_blank" class="title">【声优接到诈骗电话】哈哈哈哈真的好好玩!!!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>66.4万</span><span class="data-box"><i class="b-icon view"></i>2420</span><a target="_blank" href="//space.bilibili.com/491936052"><span class="data-box"><i class="b-icon author"></i>啊脑袋_</span></a></div><div class="pts"><div>818727</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">80</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91651051" target="_blank"><div class="lazy-img cover"><img alt="【沙雕新闻】直接笑到原地去世,喝水吃饭慎入" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91651051" target="_blank" class="title">【沙雕新闻】直接笑到原地去世,喝水吃饭慎入</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>108.3万</span><span class="data-box"><i class="b-icon view"></i>2.7万</span><a target="_blank" href="//space.bilibili.com/20892823"><span class="data-box"><i class="b-icon author"></i>柠檬派奇幻漂流</span></a></div><div class="pts"><div>812443</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">81</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92211150" target="_blank"><div class="lazy-img cover"><img alt="在抖音买的水果真的有视频里那么好吗" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92211150" target="_blank" class="title">在抖音买的水果真的有视频里那么好吗</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>174.4万</span><span class="data-box"><i class="b-icon view"></i>2.6万</span><a target="_blank" href="//space.bilibili.com/196356191"><span class="data-box"><i class="b-icon author"></i>翔翔大作战</span></a></div><div class="pts"><div>808270</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">82</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92069282" target="_blank"><div class="lazy-img cover"><img alt="【每 天 一 遍 ,肥 肉 再 见】8分钟无器械燃脂训练" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92069282" target="_blank" class="title">【每 天 一 遍 ,肥 肉 再 见】8分钟无器械燃脂训练</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>18.8万</span><span class="data-box"><i class="b-icon view"></i>1948</span><a target="_blank" href="//space.bilibili.com/66391032"><span class="data-box"><i class="b-icon author"></i>帅soserious</span></a></div><div class="pts"><div>806151</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">83</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91688086" target="_blank"><div class="lazy-img cover"><img alt="【基德】日本这次被各国打脸,来,看看背后的博弈" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91688086" target="_blank" class="title">【基德】日本这次被各国打脸,来,看看背后的博弈</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>74.1万</span><span class="data-box"><i class="b-icon view"></i>7419</span><a target="_blank" href="//space.bilibili.com/510856133"><span class="data-box"><i class="b-icon author"></i>吟游诗人基德</span></a></div><div class="pts"><div>798819</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">84</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91772980" target="_blank"><div class="lazy-img cover"><img alt="《抽烟模拟器》玩过没??" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91772980" target="_blank" class="title">《抽烟模拟器》玩过没??</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>101.9万</span><span class="data-box"><i class="b-icon view"></i>9899</span><a target="_blank" href="//space.bilibili.com/13354765"><span class="data-box"><i class="b-icon author"></i>徐大虾咯</span></a></div><div class="pts"><div>791469</div>综合得分
</div></div><div class="other-panel"><div class="other"><a target="_blank" href="//www.bilibili.com/video/av92014380" class="other-link"><span class="title">丢人合集</span><span>综合评分</span><strong>782064</strong></a></div><a class="more-data" style="display:none;">显示UP主全部上榜视频<i></i></a></div></div></li><li class="rank-item"><div class="num">85</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91662776" target="_blank"><div class="lazy-img cover"><img alt="对不起,我真的累了,这次压力打败了我" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91662776" target="_blank" class="title">对不起,我真的累了,这次压力打败了我</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>42.0万</span><span class="data-box"><i class="b-icon view"></i>1.6万</span><a target="_blank" href="//space.bilibili.com/1654470"><span class="data-box"><i class="b-icon author"></i>席拉瑞丝</span></a></div><div class="pts"><div>790450</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">86</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91814419" target="_blank"><div class="lazy-img cover"><img alt="华农兄弟:看一下兄弟家的野池塘还有没有鱼,再拔点枇杷苗来种" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91814419" target="_blank" class="title">华农兄弟:看一下兄弟家的野池塘还有没有鱼,再拔点枇杷苗来种</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>154.0万</span><span class="data-box"><i class="b-icon view"></i>1.4万</span><a target="_blank" href="//space.bilibili.com/250858633"><span class="data-box"><i class="b-icon author"></i>华农兄弟</span></a></div><div class="pts"><div>769222</div>综合得分
</div></div><div class="other-panel"><div class="other"><a target="_blank" href="//www.bilibili.com/video/av92472600" class="other-link"><span class="title">华农兄弟:扔了4个地笼到水潭里,第二天带个桶,高兴的去收鱼</span><span>综合评分</span><strong>750301</strong></a></div><a class="more-data" style="display:none;">显示UP主全部上榜视频<i></i></a></div></div></li><li class="rank-item"><div class="num">87</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av68364792" target="_blank"><div class="lazy-img cover"><img alt="压抑到极致的瞬间燃爆!!!我拯救了世界 世界却抛弃了我" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av68364792" target="_blank" class="title">压抑到极致的瞬间燃爆!!!我拯救了世界 世界却抛弃了我</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>33.2万</span><span class="data-box"><i class="b-icon view"></i>1350</span><a target="_blank" href="//space.bilibili.com/8055928"><span class="data-box"><i class="b-icon author"></i>在下蕾姆有何贵干</span></a></div><div class="pts"><div>758711</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">88</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av90525290" target="_blank"><div class="lazy-img cover"><img alt="奇…奇怪的知识增加了!!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av90525290" target="_blank" class="title">奇…奇怪的知识增加了!!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>32.9万</span><span class="data-box"><i class="b-icon view"></i>2365</span><a target="_blank" href="//space.bilibili.com/124735327"><span class="data-box"><i class="b-icon author"></i>-柠萌菌-</span></a></div><div class="pts"><div>754583</div>综合得分
</div></div><div class="other-panel"><div class="other"><a target="_blank" href="//www.bilibili.com/video/av91507560" class="other-link"><span class="title">他笑的那一刻,我们长大了!</span><span>综合评分</span><strong>746456</strong></a></div><a class="more-data" style="display:none;">显示UP主全部上榜视频<i></i></a></div></div></li><li class="rank-item"><div class="num">89</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92649884" target="_blank"><div class="lazy-img cover"><img alt="日本绝学!试着做这个动作1秒你的背会发生什么变化...." src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92649884" target="_blank" class="title">日本绝学!试着做这个动作1秒你的背会发生什么变化....</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>40.7万</span><span class="data-box"><i class="b-icon view"></i>7088</span><a target="_blank" href="//space.bilibili.com/6574487"><span class="data-box"><i class="b-icon author"></i>纳豆奶奶</span></a></div><div class="pts"><div>754397</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">90</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91188408" target="_blank"><div class="lazy-img cover"><img alt="谁才是普通人-月薪3000是什么水平?" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91188408" target="_blank" class="title">谁才是普通人-月薪3000是什么水平?</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>36.9万</span><span class="data-box"><i class="b-icon view"></i>5206</span><a target="_blank" href="//space.bilibili.com/492564948"><span class="data-box"><i class="b-icon author"></i>手绢舞者</span></a></div><div class="pts"><div>753818</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">91</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91139496" target="_blank"><div class="lazy-img cover"><img alt="关于抑郁 沉于海底" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91139496" target="_blank" class="title">关于抑郁 沉于海底</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>20.9万</span><span class="data-box"><i class="b-icon view"></i>629</span><a target="_blank" href="//space.bilibili.com/33338837"><span class="data-box"><i class="b-icon author"></i>一支榴莲</span></a></div><div class="pts"><div>753380</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">92</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92077273" target="_blank"><div class="lazy-img cover"><img alt="老干妈,辣子鸡,炸辣椒,大sao第一次吃辣味拌面,这是辣懵了吧" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92077273" target="_blank" class="title">老干妈,辣子鸡,炸辣椒,大sao第一次吃辣味拌面,这是辣懵了吧</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>139.9万</span><span class="data-box"><i class="b-icon view"></i>2.0万</span><a target="_blank" href="//space.bilibili.com/390461123"><span class="data-box"><i class="b-icon author"></i>徐大sao</span></a></div><div class="pts"><div>748323</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">93</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92245724" target="_blank"><div class="lazy-img cover"><img alt="您TM是女娲投胎?" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92245724" target="_blank" class="title">您TM是女娲投胎?</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>84.7万</span><span class="data-box"><i class="b-icon view"></i>9416</span><a target="_blank" href="//space.bilibili.com/397540531"><span class="data-box"><i class="b-icon author"></i>不知耻の紫烟老师</span></a></div><div class="pts"><div>747972</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">94</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91439496" target="_blank"><div class="lazy-img cover"><img alt="唯 美 至 极!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91439496" target="_blank" class="title">唯 美 至 极!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>21.4万</span><span class="data-box"><i class="b-icon view"></i>865</span><a target="_blank" href="//space.bilibili.com/404215032"><span class="data-box"><i class="b-icon author"></i>萌新の阿文</span></a></div><div class="pts"><div>733429</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">95</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av87560221" target="_blank"><div class="lazy-img cover"><img alt="这小孩有大富大贵之相" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av87560221" target="_blank" class="title">这小孩有大富大贵之相</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>63.6万</span><span class="data-box"><i class="b-icon view"></i>2611</span><a target="_blank" href="//space.bilibili.com/451115073"><span class="data-box"><i class="b-icon author"></i>长白山小野猪</span></a></div><div class="pts"><div>722305</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">96</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92232733" target="_blank"><div class="lazy-img cover"><img alt="“你没穷过,你不懂”" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92232733" target="_blank" class="title">“你没穷过,你不懂”</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>31.4万</span><span class="data-box"><i class="b-icon view"></i>1073</span><a target="_blank" href="//space.bilibili.com/13544375"><span class="data-box"><i class="b-icon author"></i>像素企鹅</span></a></div><div class="pts"><div>721921</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">97</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92423699" target="_blank"><div class="lazy-img cover"><img alt="徐老师来巡山254:气急败坏石头人,一头撞死在路上" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92423699" target="_blank" class="title">徐老师来巡山254:气急败坏石头人,一头撞死在路上</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>113.7万</span><span class="data-box"><i class="b-icon view"></i>8599</span><a target="_blank" href="//space.bilibili.com/16794231"><span class="data-box"><i class="b-icon author"></i>靠脸吃饭的徐大王</span></a></div><div class="pts"><div>721042</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">98</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av92298355" target="_blank"><div class="lazy-img cover"><img alt="厨师长教你:“懒人烧豆腐”的家常做法,很简单懒人的做法,收藏" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av92298355" target="_blank" class="title">厨师长教你:“懒人烧豆腐”的家常做法,很简单懒人的做法,收藏</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>83.1万</span><span class="data-box"><i class="b-icon view"></i>5639</span><a target="_blank" href="//space.bilibili.com/290526283"><span class="data-box"><i class="b-icon author"></i>美食作家王刚R</span></a></div><div class="pts"><div>720682</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">99</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av90771418" target="_blank"><div class="lazy-img cover"><img alt="祖 安 の 鹿" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av90771418" target="_blank" class="title">祖 安 の 鹿</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>106.3万</span><span class="data-box"><i class="b-icon view"></i>4656</span><a target="_blank" href="//space.bilibili.com/33496214"><span class="data-box"><i class="b-icon author"></i>伦砸-StatTrak-绿宝石</span></a></div><div class="pts"><div>717508</div>综合得分
</div></div><!----></div></li><li class="rank-item"><div class="num">100</div><div class="content"><div class="img"><a href="https://www.bilibili.com/video/av91919224" target="_blank"><div class="lazy-img cover"><img alt="钟南山院士年轻时究竟长啥样?学术界顶流们教你什么叫颜值与实力齐飞!" src=""></div></a><div class="watch-later-trigger w-later"></div></div><div class="info"><a href="https://www.bilibili.com/video/av91919224" target="_blank" class="title">钟南山院士年轻时究竟长啥样?学术界顶流们教你什么叫颜值与实力齐飞!</a><!----><div class="detail"><span class="data-box"><i class="b-icon play"></i>76.0万</span><span class="data-box"><i class="b-icon view"></i>3160</span><a target="_blank" href="//space.bilibili.com/38887907"><span class="data-box"><i class="b-icon author"></i>偶尔性别女</span></a></div><div class="pts"><div>715103</div>综合得分
</div></div><!----></div></li></ul><!----><!----></div></div></div><!----></div></div><div class="go-top-m" style="display:none;"><div title="返回顶部" class="go-top icon"></div></div></div><script>window.__INITIAL_STATE__={"rankList":[{"aid":"91835249","bvid":"","author":"飞鱼不在天","coins":152531,"duration":"6:00","mid":17873487,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002Fba98d75553c0f34eeceddbf141e3f5d25dc16122.jpg","cid":156813498,"play":1745264,"pts":7874690,"title":"这十个软件,让你的电脑舒适度提升1400%","trend":null,"video_review":7492,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92252043","bvid":"","author":"崩坏3第一偶像爱酱","coins":562078,"duration":"6:18","mid":27534330,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F2ee7d828e6defd70f932dc6ae098e9429da3a8ac.jpg","cid":157513459,"play":2643534,"pts":7573351,"title":"《崩坏3》动画短片「天穹流星」","trend":null,"video_review":97245,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"others":[{"aid":92253209,"bvid":"","play":727089,"video_review":6291,"coins":95544,"pts":1830537,"title":"「Starfall」——《崩坏3》印象曲(演唱者:袁娅维)","pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002Fd0d39d512c4eb7d31d29bf7c25926753100d1d28.jpg","duration":"3:12","rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0}}],"open":false},{"aid":"91572143","bvid":"","author":"赤leopard_大暴","coins":116070,"duration":"2:03","mid":228651,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Fbd2964a3e16475763a2cf73d6f07fa2f828afe9c.jpg","cid":156798884,"play":1718868,"pts":3192103,"title":"病 名 为 钉 钉钉钉钉钉钉...(钉钉音效与人声完美契合电音 无限循环 疯狂洗脑)","trend":null,"video_review":30215,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":1,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92699533","bvid":"","author":"老师好我叫何同学","coins":283283,"duration":"8:12","mid":163637592,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F5e18e772a4383abe3f0762f2f07083d1d8789ca4.jpg","cid":158298604,"play":1468730,"pts":2874317,"title":"【何同学】二十万元的电脑是什么样子的?苹果Mac Pro深度体验","trend":null,"video_review":24031,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91822864","bvid":"","author":"不正经老丝","coins":158953,"duration":"7:14","mid":378885845,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F0574097906c643e4a7123775a1a784b329e4837f.jpg","cid":156793573,"play":3264616,"pts":2749905,"title":"面对疫情日本为何消极?中国真的太NB了","trend":null,"video_review":37485,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92274735","bvid":"","author":"大祥哥来了","coins":138014,"duration":"8:18","mid":2920960,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Fc828665a3f04cbe71c0b41e96e2631af2a5a42ea.jpg","cid":157553560,"play":1917108,"pts":2574448,"title":"分享烹饪3580元一位的顶级日料中最好吃的一道菜!包教包会!","trend":null,"video_review":18862,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92177270","bvid":"","author":"老坛胡说","coins":168819,"duration":"12:14","mid":279583114,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F40e024d05172e3d3419074b0e8947f726de2a7b6.jpg","cid":157389373,"play":2406565,"pts":2499235,"title":"我,老坛胡说,实名diss中国BOY超级大猩猩","trend":null,"video_review":109984,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92146996","bvid":"","author":"敬汉卿","coins":202845,"duration":"4:37","mid":9824766,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Fdc460102dece057873afa1db5846ad1b756ca227.jpg","cid":157339475,"play":3237509,"pts":2443710,"title":"我回来了!我最近一年想做的事情!","trend":null,"video_review":97761,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"others":[{"aid":92424738,"bvid":"","play":2664898,"video_review":54447,"coins":233694,"pts":2225967,"title":"挑战三块黄油一口气吃完!除了油腻剩下的就是想呕吐了!","pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F40dddcfeaae7cf8f5d32590ac8b9ed341a80f2d6.jpg","duration":"4:48","rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0}}],"open":false},{"aid":"91317525","bvid":"","author":"SealWu吴一凡","coins":104867,"duration":"4:31","mid":157831228,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Feeaf109a27eace7e6f2fdf02ee677787fb021582.jpg","cid":155923456,"play":639775,"pts":2323158,"title":"《野草》:我把16篇鲁迅写成了一首歌","trend":null,"video_review":2561,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91710819","bvid":"","author":"Devil青酱","coins":80294,"duration":"2:17","mid":368912467,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F45fc8f12fe13a05944ad10315ed6b396a82db90f.jpg","cid":156598792,"play":1009044,"pts":2306169,"title":"快 放 我 下 车!","trend":null,"video_review":4376,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91521896","bvid":"","author":"宇智钵啥是gay","coins":54580,"duration":"2:19","mid":13575288,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F26015f5f8761891b684382c693449c52a27c3246.jpg","cid":156279698,"play":2049252,"pts":2006316,"title":"珍 贵 录 像 : 慈善三巨头聚首斗地主","trend":null,"video_review":4160,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92008692","bvid":"","author":"树根龙门阵","coins":145382,"duration":"16:54","mid":99336697,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F7ea25f9cb0ebd519edd6036c04ac4822bd02837d.jpg","cid":157132250,"play":1042458,"pts":1965003,"title":"深层次解析日韩开卷考为何不及格,日韩的难言之隐(思密达没了)","trend":null,"video_review":22810,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91720074","bvid":"","author":"凉风Kaze","coins":139981,"duration":"12:03","mid":14110780,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F611655e4e9748633bfe30f62998fb079702d49ef.jpg","cid":156611244,"play":2001677,"pts":1937061,"title":"人干事?为阻止少年轻生,狙击手成功将其击毙【阅片无数36】","trend":null,"video_review":20797,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91833336","bvid":"","author":"天佑咏春","coins":26904,"duration":"2:51","mid":363116832,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Ff92a404b42a024a3a9f4c74d69e36be0e9074cfb.jpg","cid":156809442,"play":2272693,"pts":1878186,"title":"真实叶问本人咏春木人桩演示(全站最清晰胶片版)","trend":null,"video_review":10121,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":0,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92101881","bvid":"","author":"老番茄","coins":81210,"duration":"14:56","mid":546195,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F54e1a688cc0dbc021423cf82390d70d1f0d39cce.jpg","cid":157261590,"play":3252304,"pts":1845017,"title":"弓箭高手老番茄","trend":null,"video_review":55169,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92536625","bvid":"","author":"花少北丶","coins":117510,"duration":"28:29","mid":2206456,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F02e5dd707cd63bb60d9c262bcfd46e7cb7bf4ad2.jpg","cid":157992034,"play":894452,"pts":1830732,"title":"好 兄 弟","trend":null,"video_review":77123,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92523652","bvid":"","author":"EdmundDZhang","coins":93426,"duration":"17:03","mid":433351,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002Fea1e5ee52e19ee759bea6fa33ec2d4cf7afa93a9.jpg","cid":157974244,"play":784403,"pts":1810956,"title":"【老E】比宇宙还要古老的存在!行星一样大的安康鱼!","trend":null,"video_review":6626,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91610100","bvid":"","author":"-Super屎蛋","coins":54317,"duration":"2:38","mid":375116258,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F17ebc22bcdc63c6b1db1306d58e3ac3f82904264.jpg","cid":156430051,"play":1085079,"pts":1732198,"title":"【郭老师】华 农 捕 郭","trend":null,"video_review":5923,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91878989","bvid":"","author":"LexBurner","coins":90420,"duration":"7:34","mid":777536,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F811f4e4e747de8641b6b1714622a60503d279b86.jpg","cid":156887648,"play":1612425,"pts":1668614,"title":"父母反对我做up主!该怎么说服他们?【读评论01】","trend":null,"video_review":29321,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91755251","bvid":"","author":"Reiji-白龙","coins":31711,"duration":"13:07","mid":318223,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F82e74cf78f8ed113b0e8c3eecda3a109e8757db3.jpg","cid":156673048,"play":1698698,"pts":1650296,"title":"见识下什么叫TMD绿茶婊!","trend":null,"video_review":32275,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91844781","bvid":"","author":"东亚悍匪阿_张","coins":99338,"duration":"6:12","mid":8237763,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F03a3a6bf107997ca208697d7cd8b7e1208bd31f3.jpg","cid":156829347,"play":2704911,"pts":1595133,"title":"我在3平米的房间住了两年............","trend":null,"video_review":9223,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91556645","bvid":"","author":"囧墙先生","coins":45063,"duration":"4:40","mid":178135921,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F68fd18d70f02dd41e888a181c6bc8e4e0183d044.jpg","cid":156350380,"play":1420074,"pts":1556583,"title":"“那是我日夜思念,深深爱着的人啊”","trend":null,"video_review":14758,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91669955","bvid":"","author":"亚食人","coins":88999,"duration":"6:36","mid":80304,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F196c664b534d35cc565621758e8bee27218b4c30.jpg","cid":156524890,"play":1625417,"pts":1535679,"title":"腾讯加持B站股权,B站又双叒叕变味了?【膨胀说】","trend":null,"video_review":12450,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91750514","bvid":"","author":"钉钉DingTalk","coins":56353,"duration":"2:51","mid":481393564,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Fb7baed780bf509fef2babb8aa68c9b52d67bdd86.jpg","cid":157525597,"play":1180654,"pts":1491066,"title":"【 唱 首 歌 】我 钉 起 来 真 好 听","trend":null,"video_review":26492,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"others":[{"aid":89441613,"bvid":"","play":17538870,"video_review":220976,"coins":882104,"pts":998745,"title":"【 钉 钉 本 钉 ,在 线 求 饶 】","pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Fa5cfd2589d5e3d7d389dd355877c2821b5a80034.jpg","duration":"1:45","rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0}}],"open":false},{"aid":"92424996","bvid":"","author":"机智的党妹","coins":97789,"duration":"20:35","mid":466272,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F6af3db68ce8d469a5e60f7912c80b652c389d63f.jpg","cid":157810914,"play":1039385,"pts":1481200,"title":"【党妹】懒人在家煮火锅!再来串甜到心里的冰糖草莓~不出门也能吃到美味!","trend":null,"video_review":26941,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"90748215","bvid":"","author":"鹤吱菌","coins":55625,"duration":"6:26","mid":3353026,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F3abd68fd895fa93b110f25495ed3d76e66f35bcd.jpg","cid":154970537,"play":836108,"pts":1446500,"title":"【师 生 对 线】这网课上得就尼玛离谱!","trend":null,"video_review":7071,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92290565","bvid":"","author":"切粒粒","coins":45093,"duration":"4:10","mid":27692819,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F6711ed3a50d676c199e565c3b22b65f8f1adaa58.jpg","cid":157577835,"play":500594,"pts":1411936,"title":"处 处 删 (注意!脖子以下不可描述!)","trend":null,"video_review":5396,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92285943","bvid":"","author":"祖娅纳惜","coins":47665,"duration":"3:34","mid":3046429,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Ffe5262e45f4d6242672cf97086ebbcd177c3cd1f.jpg","cid":157601200,"play":451251,"pts":1403823,"title":"【祖娅纳惜】 囍 【这什么灵魂唢呐!!】","trend":null,"video_review":3366,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"34107674","bvid":"","author":"周六野Zoey","coins":4404,"duration":"17:36","mid":62540916,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F746e3c53d9a7a15e2436b5c57431a2caf4eb328e.jpg","cid":59740709,"play":619625,"pts":1339601,"title":"10分钟改善斜方肌粗大、溜肩圆肩富贵包、背厚、肩颈背疼痛、高低肩!【周六野Zoey】","trend":null,"video_review":6897,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"others":[{"aid":8879609,"bvid":"","play":13706752,"video_review":118205,"coins":102913,"pts":1165409,"title":"快速瘦小腿运动!摆脱萝卜腿让小腿更细长,拉伸小腿【周六野Zoey】","pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F7dcd5d51e6f7b19d806f3dea1630f656b5134984.jpg","duration":"9:31","rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":0,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0}},{"aid":8775849,"bvid":"","play":15786505,"video_review":153972,"coins":99713,"pts":1069408,"title":"五分钟在家瘦腰运动!快速瘦肚子小蛮腰,马甲线一周现形!适合初学者【周六野Zoey】","pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002Fe161008a0355e91901a8cf518becfa47261c607b.jpg","duration":"7:51","rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":0,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0}}],"open":false},{"aid":"92437162","bvid":"","author":"泛式","coins":44006,"duration":"8:03","mid":63231,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F3c7add1871de8bbfc7bf819df08c72efd59d831c.jpg","cid":157829966,"play":822634,"pts":1336186,"title":"撕逼剧透全滚粗!百万粉up主教你提升弹幕质量的秘诀!","trend":null,"video_review":10189,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"90782208","bvid":"","author":"一颗糖糖゛","coins":52235,"duration":"2:38","mid":36117352,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F5f0ef1c2fdab1222887faaf805c418c2603fb5e9.jpg","cid":155028241,"play":510353,"pts":1291730,"title":"这 TM 才叫 无 缝 衔 接 !!!","trend":null,"video_review":2350,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91675841","bvid":"","author":"奶糕成精档案社","coins":72659,"duration":"1:49","mid":27756469,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002Fc9e287f6a90ad0edd0e2a3a0725c1f12eee81a1a.jpg","cid":156538565,"play":518466,"pts":1274818,"title":"孩子要出道了,《被 迫 营 业》MV正式首发!!","trend":null,"video_review":939,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92135544","bvid":"","author":"战场ヶ原様","coins":36029,"duration":"2:29","mid":32172331,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F0bc1aec592b0712621d5ec658b8164793c8cf220.jpg","cid":157356947,"play":418226,"pts":1262560,"title":"沙雕不能拯救单身狗!!","trend":null,"video_review":3391,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92393584","bvid":"","author":"食贫道","coins":63274,"duration":"19:14","mid":39627524,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F8c8241080aee8f128d4e9136bbbeb4564387e913.jpg","cid":157845466,"play":1348195,"pts":1225581,"title":"害怕!和熊同桌吃早饭,60斤食物,吃完要陪练格斗?!【北极大宝荐06】","trend":null,"video_review":16248,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":1,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91655656","bvid":"","author":"红豆稀饭中","coins":31964,"duration":"2:15","mid":250648682,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F57a75235eda87c14b2495f2f6af6228e24a2be41.jpg","cid":156508429,"play":690430,"pts":1219087,"title":"【处处吻】物理版 进来挑战一下","trend":null,"video_review":4333,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91871151","bvid":"","author":"BEmow","coins":49856,"duration":"6:52","mid":345259842,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F5e7b057613d64faa0fc06254bdfd2f88717e3ce8.jpg","cid":157349137,"play":861195,"pts":1216950,"title":"【经典老番】我一路向北,离开有怡的季节","trend":null,"video_review":8554,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91880741","bvid":"","author":"贝乐泰是冠军","coins":119268,"duration":"10:40","mid":398597377,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F57760014d5563aef30fa615fed281b6e2f136f60.jpg","cid":156930327,"play":774250,"pts":1215165,"title":"外国小哥体验了一天月经之后,决定给湖北的医护人员捐卫生巾和安心裤","trend":null,"video_review":17526,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"70455264","bvid":"","author":"木马唧唧","coins":1007,"duration":"10:00","mid":248404676,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F267699a61ab574ffcfee26ea9f6d2d35ab183e30.jpg","cid":122062746,"play":578605,"pts":1199618,"title":"女团腿 去头尾 自用","trend":null,"video_review":3070,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":0,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"90866754","bvid":"","author":"韩小四April","coins":5605,"duration":"9:29","mid":369750017,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F2ef8fc7df888360b9f4b57eb9782238268dc6d4d.jpg","cid":156325567,"play":245714,"pts":1199036,"title":"简单高效学生党瘦胳膊运动|每天8分钟,亲测一周见效!去拜拜肉,消副乳|无器械,无需场地,站着做瘦手臂操!","trend":null,"video_review":3727,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91770298","bvid":"","author":"东京大明白","coins":19272,"duration":"3:10","mid":254726274,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Fb0258d1229bdad24fa74d222ec5113e4b51b4da8.jpg","cid":156698057,"play":2918720,"pts":1178981,"title":"服了日本,在东京告诉你为啥日本的确诊人数涨的慢。日本佛系抗疫下的日常惊悚加无奈加震惊vlog","trend":null,"video_review":8241,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92333422","bvid":"","author":"Jimoki_","coins":42136,"duration":"3:01","mid":36298367,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F255d6b7239c8022d795ab71945e28a1f3bec98dc.jpg","cid":157653408,"play":501662,"pts":1145975,"title":"普 通 木 门","trend":null,"video_review":3688,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91458840","bvid":"","author":"爱打瞌睡的考拉-","coins":25034,"duration":"4:38","mid":500619654,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F3f8eb827f3a34d43b9796d3e573136faa72e6c6c.jpg","cid":156166833,"play":417592,"pts":1123438,"title":"“我们的存在 本身就是谋逆”【燃向双声道|权谋|帝王霸业】","trend":null,"video_review":2582,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91888385","bvid":"","author":"高冷小姜","coins":33200,"duration":"7:55","mid":449825072,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Fb409aef88f867b7b10c5da6ffa5e4817d2dbfa11.jpg","cid":156902631,"play":2155694,"pts":1118607,"title":"相亲对象居然是我的粉丝!场面一度尴尬!","trend":null,"video_review":31154,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92389548","bvid":"","author":"硬核的半佛仙人","coins":58853,"duration":"18:10","mid":37663924,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F87c3d9dd17d4b1b297904f6c81a0a8b7bf34e727.jpg","cid":157743516,"play":740651,"pts":1092769,"title":"【半佛】减肥产品是如何骗你钱的?","trend":null,"video_review":12298,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"90824584","bvid":"","author":"凯玟桑","coins":49332,"duration":"3:59","mid":120586,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Fb9e130ae57d29870697096bead7553a265c01ef8.jpg","cid":155096324,"play":374334,"pts":1092370,"title":"当 前 老 师 网 课 现 状","trend":null,"video_review":2264,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":1,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91941319","bvid":"","author":"狗辉大师","coins":34579,"duration":"6:19","mid":394201823,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F8a7d4ac78cfc06005f3e9587d28ce509a699e67f.jpg","cid":156986205,"play":550788,"pts":1087881,"title":"【三神定喘】治一个死一百个,三个疗程彻底断气,让你体验升天的感觉","trend":null,"video_review":5974,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91703457","bvid":"","author":"霍顿","coins":101537,"duration":"2:57","mid":12876332,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F6481c78d758665af135c83c98fcfb4c53a891ce9.jpg","cid":156586738,"play":718732,"pts":1058754,"title":"【海绵宝宝】B 站 等 级 现 状","trend":null,"video_review":34280,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92166013","bvid":"","author":"中国BOY超级大猩猩","coins":34835,"duration":"19:38","mid":562197,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F640ebd19288b3e2a68d93d4a7cab31643167546f.jpg","cid":157371155,"play":1144395,"pts":1054284,"title":"我真的太难了!这些东西要怎么选啊!我要做老八!","trend":null,"video_review":140412,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"others":[{"aid":92538218,"bvid":"","play":755702,"video_review":15781,"coins":38780,"pts":872755,"title":"每天使用健身环锻炼身体,持续一周,会有什么改变吗?","pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Fa4dff0319db39edf869eafc96e71eefc36ec9682.jpg","duration":"15:44","rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0}}],"open":false},{"aid":"92378722","bvid":"","author":"记录生活的蛋黄派","coins":70533,"duration":"7:16","mid":337521240,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002Fcc23dd14cde5a061d53742a57e79cb58317c9ae1.jpg","cid":157723410,"play":1115556,"pts":1052990,"title":"五斤鸡胸肉可以做出多少鸡精?小伙花两天时间才做出来这么点","trend":null,"video_review":26720,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"50314054","bvid":"","author":"普鲁士ll","coins":993,"duration":"72:29","mid":2993682,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002Fb4303266776e43a0e4b27123c29cef547ed20a0c.jpg","cid":88081446,"play":500174,"pts":1045804,"title":"瘦腿课表(美丽芭蕾外侧+内侧+第三套+第四套+美丽芭蕾拉伸)","trend":null,"video_review":11458,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":0,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"3534854","bvid":"","author":"废柴家里蹲","coins":1147,"duration":"26:43","mid":3751951,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002Fcffa0a6189e281516b3bb31aa120e8fe6bce3ff5.jpg","cid":5627945,"play":691669,"pts":1042484,"title":"【更新1p,告别蝴蝶袖】美丽芭蕾 天鹅臂 累断手","trend":null,"video_review":12870,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":0,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"83835400","bvid":"","author":"瘦不了猫","coins":3771,"duration":"25:48","mid":152015773,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Fd97fb032a39f7b774a47cec9d80ab4eca2e16d4e.jpg","cid":143438940,"play":248963,"pts":1029120,"title":"康复专家手把手教学,「石原里美」式下颌线!(P2完整跟练)","trend":null,"video_review":6103,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92180296","bvid":"","author":"明日方舟","coins":48695,"duration":"1:17","mid":161775300,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F0ab733084b20e6327177b0e6988bcbd60089f897.jpg","cid":157357960,"play":786271,"pts":1016104,"title":"《明日方舟》携手WWF联合公益活动「万类共生」宣传PV","trend":null,"video_review":10312,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92147507","bvid":"","author":"盗月社食遇记","coins":32417,"duration":"7:15","mid":99157282,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F89eb6b657a49705a1f95411319e2e8ff9a454738.jpg","cid":157338786,"play":1073877,"pts":1010436,"title":"吃 虾 大 户","trend":null,"video_review":8699,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"90541176","bvid":"","author":"丸子叨叨叨","coins":73952,"duration":"8:57","mid":452309333,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F3d47220db4f9ab6cfad299f45739b7fcd6b22b94.jpg","cid":154622835,"play":880937,"pts":1008646,"title":"传说中要靠吸吮少女“续命”的老两口,遇到富江会怎样呢?《富江:养女》","trend":null,"video_review":4566,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91996500","bvid":"","author":"醋醋cucu","coins":23636,"duration":"4:27","mid":2689967,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F6a2c43c0b45ef896b54ccbe8cc43cb2d55cfb23c.jpg","cid":157074730,"play":864138,"pts":1002846,"title":"【醋醋】这就是二次元广场舞吗,真香!彩虹节拍【bdf2020】","trend":null,"video_review":2634,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91847164","bvid":"","author":"侯乐天工作室","coins":48480,"duration":"8:52","mid":64840236,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F421d08c69802aeec87a82e0df37ac0cdd9cb0008.jpg","cid":156822997,"play":507497,"pts":998398,"title":"5分钟让你明白BGM的重要性~你见过配乐欺负诗朗诵吗?到底是配乐重要还是诗朗诵重要?侯乐天音乐喜剧之《钢琴不是吹的》—配乐诗朗诵","trend":null,"video_review":2462,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92119607","bvid":"","author":"快乐的台长","coins":23227,"duration":"2:06","mid":9354231,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F763a17177edfaccd7d20fea4a3b3dff0413510f2.jpg","cid":157284353,"play":659284,"pts":994276,"title":"祖 安 一 家 亲 ????(大结局)","trend":null,"video_review":3180,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92194218","bvid":"","author":"龙女之声","coins":57349,"duration":"10:39","mid":18706318,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F78659c3af7d9cfe7d0eef8ca09dca2911d1c7a62.jpg","cid":157407693,"play":791202,"pts":978966,"title":"称霸了6亿年 ,才发现自己忘了长脑子【龙女动物学07】刺胞动物门","trend":null,"video_review":3083,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92142952","bvid":"","author":"黄一刀有毒","coins":27886,"duration":"4:38","mid":297242063,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F6cc9b070c7b9eb8ca40a21ea23fe1ad95768dadc.jpg","cid":157327428,"play":1154477,"pts":975355,"title":"那些说话喜欢夹英文的中国人","trend":null,"video_review":6936,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91341454","bvid":"","author":"丁抠抠的小厨房","coins":14370,"duration":"4:15","mid":99795254,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F195fcf99f2a3e06d5d1b09ca12eb0903b01e3e62.jpg","cid":155967713,"play":321332,"pts":974872,"title":"自制KFC肯德基炸鸡翅,鲜嫩多汁,酥脆外皮的关键","trend":null,"video_review":459,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92121576","bvid":"","author":"雨哥到处跑","coins":42243,"duration":"9:49","mid":147166910,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Fb18747c017c4656edd5e1cd8d5147a3aba0d4dd2.jpg","cid":157283467,"play":1068244,"pts":967790,"title":"我被女朋友捆绑在厕所,公开处刑!","trend":null,"video_review":23404,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92186513","bvid":"","author":"女装完就改名","coins":17828,"duration":"1:36","mid":174452295,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F473442c579341d5af23a8107710673dc13d0a1da.jpg","cid":157405772,"play":953349,"pts":965132,"title":"教大家破解闪照,不用看闪照就知道里面是什么。","trend":null,"video_review":1357,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92674262","bvid":"","author":"绵羊料理","coins":77608,"duration":"5:48","mid":18202105,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F948d5e77e59c4600f678665c737ee12ac9cd088a.jpg","cid":158229347,"play":499772,"pts":953045,"title":"龙吟草莓的妹妹:羊 啸 草 莓","trend":null,"video_review":40325,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91930007","bvid":"","author":"是我的星星啊啊","coins":18428,"duration":"1:51","mid":297675463,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F5ee958360c431b4e3904d9d27a17ea5f794b0a47.jpg","cid":156972756,"play":911353,"pts":947392,"title":"【人狗共演】猜 猜 我 是 谁","trend":null,"video_review":1824,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"22227629","bvid":"","author":"带枪小女孩weibo","coins":890,"duration":"21:22","mid":1960460,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Fc55b99b53c1a4a7421648aced820d91bf69a7ac1.png","cid":36779723,"play":430642,"pts":939475,"title":"在床上就可以做的20分钟特快瘦大腿操 2星期内明显见效【Coffee林芊妤】","trend":null,"video_review":9117,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":0,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92012084","bvid":"","author":"嘟督不噶油","coins":62628,"duration":"6:13","mid":2403047,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Fc55cc734bcb970a85d0da8f79df237945692e15d.jpg","cid":157104613,"play":548512,"pts":926570,"title":"【嘟督咆哮解说】这才是疫情期间正确制作生日蛋糕的方式!","trend":null,"video_review":38991,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"89411163","bvid":"","author":"麦老当","coins":34894,"duration":"7:25","mid":258547693,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Fa8ee511b60d923e9a1980181e8c2615f8aadaf78.jpg","cid":152715653,"play":699248,"pts":922076,"title":"这宇航员我TM不当了!","trend":null,"video_review":2730,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91900795","bvid":"","author":"观察者网","coins":32480,"duration":"16:17","mid":10330740,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F14d2c499a1e080d020f55673667857802b91aa52.jpg","cid":156905256,"play":900410,"pts":920023,"title":"骁话一下:每百人6个被忽悠,引爆韩国疫情的奇葩邪教,为何如此猖獗?","trend":null,"video_review":20130,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"others":[{"aid":92433763,"bvid":"","play":860751,"video_review":45055,"coins":24154,"pts":775616,"title":"【懂点儿啥32】韩国最大的“疫情”,就是他们的邪教","pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F710bee480a3f72f0551c391c44da059713ab04e7.jpg","duration":"21:30","rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0}}],"open":false},{"aid":"91544129","bvid":"","author":"异瞳才不是死宅-","coins":5698,"duration":"3:13","mid":79153003,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F284cd935a896a16eba002afbe3a2c55f95025674.jpg","cid":156476693,"play":735581,"pts":912292,"title":"当时我害怕极了,我....哈哈哈哈哈","trend":null,"video_review":1637,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":0,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"82766716","bvid":"","author":"一本正经的小方","coins":29300,"duration":"2:39","mid":400413571,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F003b4a739080944140cab368825a624f1d2949ae.jpg","cid":147308234,"play":463319,"pts":905272,"title":"【处处吻】 愣着干嘛 进来白嫖啊","trend":null,"video_review":1207,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92188887","bvid":"","author":"BML制作指挥部","coins":27571,"duration":"189:22","mid":403748305,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002Fd439545794b99d3ca88facc56fb2e1564a2e570f.jpg","cid":157392610,"play":350009,"pts":902541,"title":"【官方回播】Bilibili Macro Link-Visual Release 2019","trend":null,"video_review":38582,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":1,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92157578","bvid":"","author":"朱一旦的枯燥生活","coins":22871,"duration":"1:22","mid":437316738,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F69d9519adb157724a304e416a6e98b1cbccf2fc9.jpg","cid":157357772,"play":1954384,"pts":898603,"title":"【朱一旦】148 发现了一个全新的商机!","trend":null,"video_review":4672,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91763054","bvid":"","author":"爱福西西一级学者","coins":20675,"duration":"3:42","mid":1583050,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F8247337415385379c10bd784b1f4e51f20157d58.jpg","cid":156701266,"play":221142,"pts":897922,"title":"【犬科踩点混剪|捕猎集锦|燃向】天性如此\u002FNatural(野生狗片混剪)","trend":null,"video_review":1220,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91922911","bvid":"","author":"允星河Yoseya","coins":20356,"duration":"6:36","mid":1605721,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Faf5812cb3962f53875ea27b01ddba922e039359a.jpg","cid":156961476,"play":1079560,"pts":876911,"title":"【允星河】这TM才是神仙打架","trend":null,"video_review":2017,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91835142","bvid":"","author":"岑子舟","coins":1393,"duration":"0:34","mid":12248850,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F3d9a3edb2f563f5f5270f3b2873289a9a48afa2d.jpg","cid":156813685,"play":1165588,"pts":868578,"title":"撸大猫","trend":null,"video_review":835,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":0,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91644176","bvid":"","author":"shourei小N","coins":22588,"duration":"1:02","mid":249118,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F76e4c7cf95659836bd7375f9c917a8499ebf611d.jpg","cid":156541898,"play":418641,"pts":841941,"title":"【神经病式配音】谁都是你老婆?!DD斩首!","trend":null,"video_review":1303,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91955082","bvid":"","author":"nya酱的一生","coins":54379,"duration":"11:14","mid":1885078,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F1d05675fbb3c319a0272e5c145e0a62bd05a3baa.jpg","cid":157182797,"play":664815,"pts":841561,"title":"因为疑似新冠肺炎,我被澳洲医院隔离了【nya酱】","trend":null,"video_review":3405,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"89799412","bvid":"","author":"啊脑袋_","coins":11645,"duration":"1:49","mid":491936052,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F85fe37d9a7c1645111a9c55d161aec859da983ff.jpg","cid":153371262,"play":663670,"pts":818727,"title":"【声优接到诈骗电话】哈哈哈哈真的好好玩!!!","trend":null,"video_review":2420,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91651051","bvid":"","author":"柠檬派奇幻漂流","coins":20684,"duration":"5:41","mid":20892823,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F0a97ef168b6e92a89d94bccae15eebc203e53dc3.jpg","cid":156501542,"play":1083027,"pts":812443,"title":"【沙雕新闻】直接笑到原地去世,喝水吃饭慎入","trend":null,"video_review":27091,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92211150","bvid":"","author":"翔翔大作战","coins":17628,"duration":"6:56","mid":196356191,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Ff92684246f2854216d66419994fa694590babb7e.jpg","cid":157446898,"play":1744081,"pts":808270,"title":"在抖音买的水果真的有视频里那么好吗","trend":null,"video_review":25906,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92069282","bvid":"","author":"帅soserious","coins":23524,"duration":"9:41","mid":66391032,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Faabdd88ba7be63c0999097a46f32fa06fc60bf00.jpg","cid":157179772,"play":188211,"pts":806151,"title":"【每 天 一 遍 ,肥 肉 再 见】8分钟无器械燃脂训练","trend":null,"video_review":1948,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91688086","bvid":"","author":"吟游诗人基德","coins":18830,"duration":"9:27","mid":510856133,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Fca238446412558e6e60d26f419e0454c6d6566f6.jpg","cid":156550625,"play":740668,"pts":798819,"title":"【基德】日本这次被各国打脸,来,看看背后的博弈","trend":null,"video_review":7419,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91772980","bvid":"","author":"徐大虾咯","coins":13813,"duration":"10:52","mid":13354765,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Fe52018da05ad5a0682cdd0d07dc457598999854d.jpg","cid":156701136,"play":1019300,"pts":791469,"title":"《抽烟模拟器》玩过没??","trend":null,"video_review":9899,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"others":[{"aid":92014380,"bvid":"","play":1465267,"video_review":20418,"coins":12417,"pts":782064,"title":"丢人合集","pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F9dfd305a11d9706d38eb166be5283ad52665c392.jpg","duration":"10:52","rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0}}],"open":false},{"aid":"91662776","bvid":"","author":"席拉瑞丝","coins":53130,"duration":"9:34","mid":1654470,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Fcd7610e1c20f9588b589c4670334a40cc1915f63.jpg","cid":156519835,"play":420000,"pts":790450,"title":"对不起,我真的累了,这次压力打败了我","trend":null,"video_review":16041,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91814419","bvid":"","author":"华农兄弟","coins":18580,"duration":"3:49","mid":250858633,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Fbea7cf7e016f9822cb79619ef519a80fa0a616d2.jpg","cid":156773242,"play":1540301,"pts":769222,"title":"华农兄弟:看一下兄弟家的野池塘还有没有鱼,再拔点枇杷苗来种","trend":null,"video_review":13942,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"others":[{"aid":92472600,"bvid":"","play":1231276,"video_review":30927,"coins":25351,"pts":750301,"title":"华农兄弟:扔了4个地笼到水潭里,第二天带个桶,高兴的去收鱼","pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F8cc82c47ccdda03d61b04613ec9fb2917300cd60.jpg","duration":"7:52","rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0}}],"open":false},{"aid":"68364792","bvid":"","author":"在下蕾姆有何贵干","coins":20995,"duration":"2:47","mid":8055928,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F0c2dc4393889679833f97855157377e3d5a49d30.jpg","cid":118490002,"play":331540,"pts":758711,"title":"压抑到极致的瞬间燃爆!!!我拯救了世界 世界却抛弃了我","trend":null,"video_review":1350,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"90525290","bvid":"","author":"-柠萌菌-","coins":20873,"duration":"2:38","mid":124735327,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Fbab23d07d1fcfdec6a34249035d5407a3d5eb753.jpg","cid":154595114,"play":329430,"pts":754583,"title":"奇…奇怪的知识增加了!!","trend":null,"video_review":2365,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"others":[{"aid":91507560,"bvid":"","play":577554,"video_review":1860,"coins":34275,"pts":746456,"title":"他笑的那一刻,我们长大了!","pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002Fe15e098d1c1f81a46b25fdd5585a08b0845fa4be.jpg","duration":"3:59","rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0}}],"open":false},{"aid":"92649884","bvid":"","author":"纳豆奶奶","coins":12070,"duration":"7:46","mid":6574487,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F3e0c31af8c1977f6a2c074df23b3d03e1525c0c1.jpg","cid":158184419,"play":406623,"pts":754397,"title":"日本绝学!试着做这个动作1秒你的背会发生什么变化....","trend":null,"video_review":7088,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91188408","bvid":"","author":"手绢舞者","coins":35040,"duration":"21:06","mid":492564948,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F48a1032f86ae755bb4014fb3d854f04696eba4ab.jpg","cid":155708753,"play":369191,"pts":753818,"title":"谁才是普通人-月薪3000是什么水平?","trend":null,"video_review":5206,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91139496","bvid":"","author":"一支榴莲","coins":22799,"duration":"1:45","mid":33338837,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F8225c2684fc92204d6e64838e8407d7aff3140b2.jpg","cid":155629749,"play":208636,"pts":753380,"title":"关于抑郁 沉于海底","trend":null,"video_review":629,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92077273","bvid":"","author":"徐大sao","coins":18349,"duration":"7:15","mid":390461123,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F72af2a1befe0782a47a76c8b3f0f47c563ccb521.jpg","cid":157190754,"play":1399417,"pts":748323,"title":"老干妈,辣子鸡,炸辣椒,大sao第一次吃辣味拌面,这是辣懵了吧","trend":null,"video_review":20176,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92245724","bvid":"","author":"不知耻の紫烟老师","coins":10994,"duration":"6:27","mid":397540531,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F24031623755881904a218869ae1ad1c2af268cb7.jpg","cid":157502407,"play":846832,"pts":747972,"title":"您TM是女娲投胎?","trend":null,"video_review":9416,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91439496","bvid":"","author":"萌新の阿文","coins":20491,"duration":"2:09","mid":404215032,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F6ef83fddb43e8f960b75d9966588f65bfda245fe.jpg","cid":156139989,"play":214229,"pts":733429,"title":"唯 美 至 极!","trend":null,"video_review":865,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"87560221","bvid":"","author":"长白山小野猪","coins":23794,"duration":"1:33","mid":451115073,"pic":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Farchive\u002F81d1e78eed762a531180d692cb4d14162fc024b7.jpg","cid":149608614,"play":636060,"pts":722305,"title":"这小孩有大富大贵之相","trend":null,"video_review":2611,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":0,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92232733","bvid":"","author":"像素企鹅","coins":16549,"duration":"3:23","mid":13544375,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002Fcb14786a27c500e8e7124e25982e34ee2b4adc5c.jpg","cid":157477753,"play":313655,"pts":721921,"title":"“你没穷过,你不懂”","trend":null,"video_review":1073,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92423699","bvid":"","author":"靠脸吃饭的徐大王","coins":14691,"duration":"11:15","mid":16794231,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F2ea1f8bb1c224730aec0156c0109d70dd77565c8.jpg","cid":157806242,"play":1136539,"pts":721042,"title":"徐老师来巡山254:气急败坏石头人,一头撞死在路上","trend":null,"video_review":8599,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":0,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"92298355","bvid":"","author":"美食作家王刚R","coins":8899,"duration":"3:30","mid":290526283,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Fa09f221b206cc90e525a1527cc9621bb9080c46b.jpg","cid":157595181,"play":831170,"pts":720682,"title":"厨师长教你:“懒人烧豆腐”的家常做法,很简单懒人的做法,收藏","trend":null,"video_review":5639,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"90771418","bvid":"","author":"伦砸-StatTrak-绿宝石","coins":5156,"duration":"3:06","mid":33496214,"pic":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F08d1b9006c4e07c0a66f00f33d67fe7503625c1d.jpg","cid":155007864,"play":1063112,"pts":717508,"title":"祖 安 の 鹿","trend":null,"video_review":4656,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":0,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false},{"aid":"91919224","bvid":"","author":"偶尔性别女","coins":4602,"duration":"1:17","mid":38887907,"pic":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002Fdd28248c9e9bb1e4e2f25e17388361084453263c.jpg","cid":156948634,"play":760295,"pts":715103,"title":"钟南山院士年轻时究竟长啥样?学术界顶流们教你什么叫颜值与实力齐飞!","trend":null,"video_review":3160,"rights":{"bp":0,"elec":0,"download":0,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"open":false}],"rankRouteParams":{"rankTab":"all","rid":0,"arc_type":0,"day":3,"season_type":1},"channels":[{"name":"全站","tid":0},{"name":"动画","tid":1},{"name":"国创相关","tid":168},{"name":"音乐","tid":3},{"name":"舞蹈","tid":129},{"name":"游戏","tid":4},{"name":"科技","tid":36},{"name":"数码","tid":188},{"name":"生活","tid":160},{"name":"鬼畜","tid":119},{"name":"时尚","tid":155},{"name":"娱乐","tid":5},{"name":"影视","tid":181}],"showTypes":true,"typeList":[{"name":"全部投稿","value":0},{"name":"近期投稿","value":1}],"times":[{"name":"日排行","value":1},{"name":"三日排行","value":3},{"name":"周排行","value":7},{"name":"月排行","value":30}],"note":"统计所有投稿在 2020年02月27日 - 2020年03月01日 的数据综合得分,每日更新一次","loading":false};(function(){var s;(s=document.currentScript||document.scripts[document.scripts.length-1]).parentNode.removeChild(s);}());</script><script src="//s1.hdslb.com/bfs/static/jinkela/rank/1.rank.66267091ff49e189079246486d715b1a4f140057.js" defer></script><script src="//s1.hdslb.com/bfs/static/jinkela/rank/rank.66267091ff49e189079246486d715b1a4f140057.js" defer></script><!-- built files will be auto injected --><script type="text/javascript">0</script><div class="footer bili-footer report-wrap-module"></div><script type="text/javascript" src="//s1.hdslb.com/bfs/seed/jinkela/footer-v2/footer.js" defer="defer"></script></body></html>
"""
soup = BeautifulSoup(html_doc, 'html.parser')
htmll = soup.find_all('li',class_='rank-item')
print('视频总数:')
print(len(htmll))
for index in range(len(htmll)):
print('视频标题:')
print(htmll[index].img['alt'])
print('视频地址:')
print(htmll[index].a['href'])
| 1,145.975207 | 54,921 | 0.686081 | 21,797 | 138,663 | 4.314676 | 0.087122 | 0.070688 | 0.036726 | 0.035206 | 0.716716 | 0.70166 | 0.688337 | 0.65765 | 0.575223 | 0.536625 | 0 | 0.11847 | 0.033448 | 138,663 | 120 | 54,922 | 1,155.525 | 0.583093 | 0.000058 | 0 | 0 | 0 | 0.893805 | 0.998024 | 0.698956 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.00885 | 0 | 0.00885 | 0.061947 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
5f69d377ab85667c0ad33cf8447b107775cb5862 | 79 | py | Python | src/categories/managers.py | VorontsovAlex/web-interface-backend | 4bcb37a89f8b61603df4112962eb6aefa04993b9 | [
"MIT"
] | null | null | null | src/categories/managers.py | VorontsovAlex/web-interface-backend | 4bcb37a89f8b61603df4112962eb6aefa04993b9 | [
"MIT"
] | null | null | null | src/categories/managers.py | VorontsovAlex/web-interface-backend | 4bcb37a89f8b61603df4112962eb6aefa04993b9 | [
"MIT"
] | null | null | null | from django.db import models
class CategoryManager(models.Manager):
pass
| 13.166667 | 38 | 0.772152 | 10 | 79 | 6.1 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.164557 | 79 | 5 | 39 | 15.8 | 0.924242 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
5f709e98e5075cc50e164bdfdee0ae543e91795d | 44 | py | Python | python/dgl/backend/pytorch/__init__.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 9,516 | 2018-12-08T22:11:31.000Z | 2022-03-31T13:04:33.000Z | python/dgl/backend/pytorch/__init__.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 2,494 | 2018-12-08T22:43:00.000Z | 2022-03-31T21:16:27.000Z | python/dgl/backend/pytorch/__init__.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 2,529 | 2018-12-08T22:56:14.000Z | 2022-03-31T13:07:41.000Z | from .tensor import *
from .sparse import *
| 14.666667 | 21 | 0.727273 | 6 | 44 | 5.333333 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.181818 | 44 | 2 | 22 | 22 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
5f70e723da97d1710d36ce60e64240b709412238 | 96 | py | Python | venv/lib/python3.8/site-packages/debugpy/_vendored/pydevd/pydev_ipython/inputhookpyglet.py | Retraces/UkraineBot | 3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/debugpy/_vendored/pydevd/pydev_ipython/inputhookpyglet.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/debugpy/_vendored/pydevd/pydev_ipython/inputhookpyglet.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/08/f8/4a/7cddc842ab6d4a4694f39ca6d634ecf94528507b7296dfeb073fb61541 | 96 | 96 | 0.895833 | 9 | 96 | 9.555556 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.416667 | 0 | 96 | 1 | 96 | 96 | 0.479167 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
3990eb07c411106a7e541b3be681df6a9e2060e5 | 43 | py | Python | stemplates/__init__.py | comonadd/stemplates | 63b159909ec9e67402e3f080bf8c4a3e4515bd45 | [
"MIT"
] | null | null | null | stemplates/__init__.py | comonadd/stemplates | 63b159909ec9e67402e3f080bf8c4a3e4515bd45 | [
"MIT"
] | null | null | null | stemplates/__init__.py | comonadd/stemplates | 63b159909ec9e67402e3f080bf8c4a3e4515bd45 | [
"MIT"
] | null | null | null | from stemplates.template_renderer import *
| 21.5 | 42 | 0.860465 | 5 | 43 | 7.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.093023 | 43 | 1 | 43 | 43 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
f2d4993ce05b3c14b1a01803617451f4d6a12c90 | 142 | py | Python | celery_task_plugins/__init__.py | sihrc/celery-task-plugins | 090824ab9d3c621020bdd91533faec13d434466e | [
"MIT"
] | null | null | null | celery_task_plugins/__init__.py | sihrc/celery-task-plugins | 090824ab9d3c621020bdd91533faec13d434466e | [
"MIT"
] | 5 | 2019-05-08T04:27:26.000Z | 2019-05-12T03:12:43.000Z | celery_task_plugins/__init__.py | sihrc/celery-task-plugins | 090824ab9d3c621020bdd91533faec13d434466e | [
"MIT"
] | null | null | null | """
celery-task-plugins module.
---------------
Celery task plugins that wrap celery tasks
Author: Chris Lee
Email: sihrc.c.lee@gmail.com
""" | 17.75 | 42 | 0.669014 | 20 | 142 | 4.75 | 0.75 | 0.210526 | 0.357895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.119718 | 142 | 8 | 43 | 17.75 | 0.76 | 0.943662 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 0 | 0 | null | 1 | 1 | 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 | 6 |
f2dfcd3d5b10210d3cefa0e1352dc71f8796b963 | 2,531 | py | Python | src/l0_regularization.py | aziz-ayed/HolisticDL | 265d3097542d80002a11791d10cac51886c455ea | [
"MIT"
] | 4 | 2021-11-18T17:37:13.000Z | 2022-02-09T19:57:34.000Z | src/l0_regularization.py | aziz-ayed/HolisticDL | 265d3097542d80002a11791d10cac51886c455ea | [
"MIT"
] | null | null | null | src/l0_regularization.py | aziz-ayed/HolisticDL | 265d3097542d80002a11791d10cac51886c455ea | [
"MIT"
] | 1 | 2021-11-26T22:11:10.000Z | 2021-11-26T22:11:10.000Z | import math
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
GAMMA = -0.1
ZETA = 1.1
BETA = 2/3
def hard_sigmoid(x):
return tf.minimum(tf.maximum(x,tf.zeros_like(x)),tf.ones_like(x))
def get_l0_norm_full(x, varname):
shape = x.get_shape()
# sample u
u = tf.random_uniform(shape)
# initialize log a from normal distribution
log_a = tf.Variable(tf.random_normal(shape, mean=0.0, stddev=0.01), name="log_a_" + varname)
# compute hard concrete distribution
s = tf.sigmoid((tf.log(u) - tf.log(1.0 - u) + log_a)/BETA)
# stretch hard concrete distribution
s_bar = s * (ZETA - GAMMA) + GAMMA
# compute differentiable l0 norm
l0_norm = tf.reduce_sum(tf.sigmoid(log_a - BETA * math.log(-GAMMA / ZETA)), name="l0_norm_" + varname)
# get mask for calculating sparse version of tensor
mask = hard_sigmoid(s_bar)
# return masked version of tensor and l0 norm
return tf.Variable(tf.multiply(x, mask, name = varname + 'masked')), l0_norm
def get_l0_norm(x, varname):
shape = x.get_shape()
# sample u
u = tf.random_uniform(shape)
# initialize log a from normal distribution
log_a = tf.Variable(tf.random_normal(shape, mean=0.0, stddev=0.01), name="log_a_" + varname)
# compute hard concrete distribution
s = tf.sigmoid((tf.log(u) - tf.log(1.0 - u) + log_a)/BETA)
# stretch hard concrete distribution
s_bar = s * (ZETA - GAMMA) + GAMMA
# compute differentiable l0 norm
l0_norm = tf.reduce_sum(tf.sigmoid(log_a - BETA * math.log(-GAMMA / ZETA)), name="l0_norm_" + varname)
# get mask for calculating sparse version of tensor
mask = hard_sigmoid(s_bar)
# return masked version of tensor and l0 norm
return l0_norm
def get_l0_mask(x, varname):
shape = x.get_shape()
# sample u
u = tf.random_uniform(shape)
# initialize log a from normal distribution
log_a = tf.Variable(tf.random_normal(shape, mean=0.0, stddev=0.01), name="log_a_" + varname)
# compute hard concrete distribution
s = tf.sigmoid((tf.log(u) - tf.log(1.0 - u) + log_a)/BETA)
# stretch hard concrete distribution
s_bar = s * (ZETA - GAMMA) + GAMMA
# compute differentiable l0 norm
l0_norm = tf.reduce_sum(tf.sigmoid(log_a - BETA * math.log(-GAMMA / ZETA)), name="l0_norm_" + varname)
# get mask for calculating sparse version of tensor
mask = hard_sigmoid(s_bar)
# return masked version of tensor and l0 norm
return mask#tf.multiply(x,mask, name=varname + "_masked") | 29.776471 | 106 | 0.674042 | 400 | 2,531 | 4.115 | 0.165 | 0.058323 | 0.087485 | 0.09113 | 0.892467 | 0.875456 | 0.875456 | 0.836574 | 0.836574 | 0.836574 | 0 | 0.022954 | 0.208218 | 2,531 | 85 | 107 | 29.776471 | 0.798403 | 0.308969 | 0 | 0.6 | 0 | 0 | 0.027794 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.114286 | false | 0 | 0.057143 | 0.028571 | 0.285714 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
f2f8532769f02a601c26423073cd338307d199a9 | 344 | py | Python | examples/minitwit/tesseract_ex.py | txdywy/flask | 5cf167b448267aedec8f5b2e30ad4ee0ad9b3f55 | [
"BSD-3-Clause"
] | 2 | 2015-08-07T18:01:01.000Z | 2015-08-14T03:29:10.000Z | examples/minitwit/tesseract_ex.py | txdywy/flask | 5cf167b448267aedec8f5b2e30ad4ee0ad9b3f55 | [
"BSD-3-Clause"
] | 2 | 2015-03-30T05:28:35.000Z | 2015-06-28T01:08:50.000Z | examples/minitwit/tesseract_ex.py | txdywy/flask | 5cf167b448267aedec8f5b2e30ad4ee0ad9b3f55 | [
"BSD-3-Clause"
] | 2 | 2015-03-04T05:06:55.000Z | 2015-03-29T22:46:19.000Z | #http://stackoverflow.com/questions/2363490/limit-characters-tesseract-is-looking-for
import pytesseract
from PIL import Image
print pytesseract.image_to_string(Image.open('Captcha_gcjwazwmwn.jpg'))
print pytesseract.image_to_string(Image.open('Captcha_qrdiqokdiw.jpg'))
print pytesseract.image_to_string(Image.open('Captcha_mobwoaprwv.jpg'))
| 43 | 85 | 0.843023 | 47 | 344 | 5.978723 | 0.531915 | 0.170819 | 0.224199 | 0.245552 | 0.501779 | 0.501779 | 0.501779 | 0.501779 | 0.341637 | 0 | 0 | 0.021212 | 0.040698 | 344 | 7 | 86 | 49.142857 | 0.830303 | 0.244186 | 0 | 0 | 0 | 0 | 0.255814 | 0.255814 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.4 | null | null | 0.6 | 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 | 1 | 0 | 0 | 1 | 0 | 6 |
840b37e9a3d78193f8e82be1404f226d273271b9 | 2,433 | py | Python | src/genie/libs/parser/iosxe/tests/ShowLicenseEventlog2/cli/equal/golden_output_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowLicenseEventlog2/cli/equal/golden_output_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowLicenseEventlog2/cli/equal/golden_output_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | expected_output = {
"load_time":"0%/0%",
"one_minute":"0%",
"five_minutes":"0%",
"ntp_time":"10:45:23.029 UTC Thu Nov 18 2021",
"event_log":[
{
"log_message":"SAEVT_PLATFORM eventSource=\"INFRA_SL\" eventName=\"INFRA_SL_EVLOG_ERM_RESET\" MSG=\"ERM-Reset: Client 0, AP-GROUP group, 2 features air-network-advantage,air-dna-advantage\""
},
{
"log_message":"SAEVT_ENDPOINT_USAGE count=\"0\" entitlementTag=\"regid.2018-06.com.cisco.DNA_NWStack,1.0_e7244e71-3ad5-4608-8bf0-d12f67c80896\""
},
{
"log_message":"SAEVT_ENDPOINT_USAGE count=\"0\" entitlementTag=\"regid.2017-08.com.cisco.AIR-DNA-A,1.0_b6308627-3ab0-4a11-a3d9-586911a0d790\""
},
{
"log_message":"SAEVT_PLATFORM eventSource=\"INFRA_SL\" eventName=\"INFRA_SL_EVLOG_ERM_RESET\" MSG=\"ERM-Reset: Client 0, AP-GROUP group, 2 features air-network-advantage,air-dna-advantage\""
},
{
"log_message":"SAEVT_ENDPOINT_USAGE count=\"0\" entitlementTag=\"regid.2018-06.com.cisco.DNA_NWStack,1.0_e7244e71-3ad5-4608-8bf0-d12f67c80896\""
},
{
"log_message":"SAEVT_ENDPOINT_USAGE count=\"0\" entitlementTag=\"regid.2017-08.com.cisco.AIR-DNA-A,1.0_b6308627-3ab0-4a11-a3d9-586911a0d790\""
},
{
"log_message":"SAEVT_PLATFORM eventSource=\"INFRA_SL\" eventName=\"INFRA_SL_EVLOG_ERM_RESET\" MSG=\"ERM-Reset: Client 0, AP-GROUP group, 2 features air-network-advantage,air-dna-advantage\""
},
{
"log_message":"SAEVT_ENDPOINT_USAGE count=\"0\" entitlementTag=\"regid.2018-06.com.cisco.DNA_NWStack,1.0_e7244e71-3ad5-4608-8bf0-d12f67c80896\""
},
{
"log_message":"SAEVT_ENDPOINT_USAGE count=\"0\" entitlementTag=\"regid.2017-08.com.cisco.AIR-DNA-A,1.0_b6308627-3ab0-4a11-a3d9-586911a0d790\""
},
{
"log_message":"SAEVT_PLATFORM eventSource=\"INFRA_SL\" eventName=\"INFRA_SL_EVLOG_ERM_RESET\" MSG=\"ERM-Reset: Client 0, AP-GROUP group, 2 features air-network-advantage,air-dna-advantage\""
},
{
"log_message":"SAEVT_ENDPOINT_USAGE count=\"0\" entitlementTag=\"regid.2018-06.com.cisco.DNA_NWStack,1.0_e7244e71-3ad5-4608-8bf0-d12f67c80896\""
},
{
"log_message":"SAEVT_ENDPOINT_USAGE count=\"0\" entitlementTag=\"regid.2017-08.com.cisco.AIR-DNA-A,1.0_b6308627-3ab0-4a11-a3d9-586911a0d790\""
}
]
} | 55.295455 | 200 | 0.658857 | 321 | 2,433 | 4.775701 | 0.202492 | 0.078278 | 0.117417 | 0.120026 | 0.944553 | 0.944553 | 0.944553 | 0.944553 | 0.944553 | 0.944553 | 0 | 0.142502 | 0.172215 | 2,433 | 44 | 201 | 55.295455 | 0.618669 | 0 | 0 | 0.272727 | 0 | 0 | 0.31995 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
8417ace958b152fbca185e5f18bd95cbcb657a22 | 2,163 | py | Python | plugins/tale.py | pxdnbluesoul/Pixeltasim-Alexandra | 435eecec9544e011bc4195251e944f2b3b6c5901 | [
"Unlicense"
] | 1 | 2021-01-02T08:14:23.000Z | 2021-01-02T08:14:23.000Z | plugins/tale.py | pxdnbluesoul/Pixeltasim-Alexandra | 435eecec9544e011bc4195251e944f2b3b6c5901 | [
"Unlicense"
] | null | null | null | plugins/tale.py | pxdnbluesoul/Pixeltasim-Alexandra | 435eecec9544e011bc4195251e944f2b3b6c5901 | [
"Unlicense"
] | null | null | null | from whiffle import wikidotapi
from util import hook
import re
import time,threading
@hook.command()
def tale(inp): #this is for WL use, easily adaptable to SCP
".tale <Article Name> -- Will return first page containing exact match to Article Name"
line = re.sub("[ ,']",'-',inp) #removes spaces and apostrophes and replaces them with dashes, per wikidot's standards
for page in scppages:
if line.lower() in page.lower(): #check for first match to input
if "tale" in taglist[page] or "goi-format" in taglist[page]: #check for tag
rating = ratinglist[page]
ratesign = ""
if rating >= 0:
ratesign = "+" #adds + or minus sign in front of rating
ratestring = "Rating:"+ratesign+str(rating)+""
author = authorlist[page]
authorstring = "Written by "+author
if ":rewrite:" in author:
bothauths = authorlist[page].split(":rewrite:")
orgauth = bothauths[0]
newauth = bothauths[1]
authorstring = "Originally written by "+orgauth +", rewritten by "+newauth
title = titlelist[page]
sepstring = ", "
return ""+title+" ("+ratestring+sepstring+authorstring+") - http://scp-wiki.net/"+page.lower()
else:
return "Match found but page does not exist, please consult pixeltasim for error."
if inp.lower() in titlelist[page].lower(): #check for first match to input
if "tale" in taglist[page] or "goi-format" in taglist[page]: #check for tag
rating = ratinglist[page]
ratesign = ""
if rating >= 0:
ratesign = "+" #adds + or minus sign in front of rating
ratestring = "Rating:"+ratesign+str(rating)+""
author = authorlist[page]
authorstring = "Written by "+author
if ":rewrite:" in author:
bothauths = authorlist[page].split(":rewrite:")
orgauth = bothauths[0]
newauth = bothauths[1]
authorstring = "Originally written by "+orgauth +", rewritten by "+newauth
title = titlelist[page]
sepstring = ", "
return ""+title+" ("+ratestring+sepstring+authorstring+") - http://scp-wiki.net/"+page.lower()
else:
return "Match found but page does not exist, please consult pixeltasim for error."
return "Page not found"
| 43.26 | 118 | 0.666204 | 278 | 2,163 | 5.183453 | 0.345324 | 0.024983 | 0.036086 | 0.023595 | 0.759195 | 0.759195 | 0.759195 | 0.759195 | 0.759195 | 0.759195 | 0 | 0.003474 | 0.201572 | 2,163 | 50 | 119 | 43.26 | 0.830921 | 0.174757 | 0 | 0.75 | 0 | 0 | 0.263412 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.020833 | false | 0 | 0.083333 | 0 | 0.208333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
84260b46232969fdcd2916db2aab3914bce9449b | 150 | py | Python | cerami/reconstructor/__init__.py | gummybuns/dorm | e97c0baa42c4bdfb10bbe3b4b859873e3d50aa3a | [
"MIT"
] | null | null | null | cerami/reconstructor/__init__.py | gummybuns/dorm | e97c0baa42c4bdfb10bbe3b4b859873e3d50aa3a | [
"MIT"
] | null | null | null | cerami/reconstructor/__init__.py | gummybuns/dorm | e97c0baa42c4bdfb10bbe3b4b859873e3d50aa3a | [
"MIT"
] | null | null | null | from .base_reconstructor import BaseReconstructor
from .raw_reconstructor import RawReconstructor
from .model_reconstructor import ModelReconstructor
| 37.5 | 51 | 0.9 | 15 | 150 | 8.8 | 0.6 | 0.431818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08 | 150 | 3 | 52 | 50 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
84265edc30645a1c34569404857f8667d36935d7 | 28 | py | Python | brightcove_api/__init__.py | nickymikail/brightcove-api | fa78532a60df03e426da7bcc323daadfffae5bc5 | [
"BSD-3-Clause"
] | 1 | 2018-06-19T01:23:37.000Z | 2018-06-19T01:23:37.000Z | brightcove_api/__init__.py | nickymikail/brightcove-api | fa78532a60df03e426da7bcc323daadfffae5bc5 | [
"BSD-3-Clause"
] | null | null | null | brightcove_api/__init__.py | nickymikail/brightcove-api | fa78532a60df03e426da7bcc323daadfffae5bc5 | [
"BSD-3-Clause"
] | null | null | null | from brightcove_api import * | 28 | 28 | 0.857143 | 4 | 28 | 5.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.107143 | 28 | 1 | 28 | 28 | 0.92 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
84325938a818bfd199acbca6674b476ffee5f81d | 38 | py | Python | jobs/jobs/__init__.py | gitdaniel228/jobSearch | 5dc1c69a3750f92ca0bcd378dfdc500143204a5a | [
"MIT"
] | null | null | null | jobs/jobs/__init__.py | gitdaniel228/jobSearch | 5dc1c69a3750f92ca0bcd378dfdc500143204a5a | [
"MIT"
] | null | null | null | jobs/jobs/__init__.py | gitdaniel228/jobSearch | 5dc1c69a3750f92ca0bcd378dfdc500143204a5a | [
"MIT"
] | null | null | null | from .celeryp import app as celery_app | 38 | 38 | 0.842105 | 7 | 38 | 4.428571 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.131579 | 38 | 1 | 38 | 38 | 0.939394 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
fff2f0ad20195b835b3fe164150a7ee02db0f903 | 227 | py | Python | mamba_client/station/__init__.py | ismaelJimenez/mamba_client | 2be6a14d61bbcd16db020f41146cca63c17ebf50 | [
"MIT"
] | null | null | null | mamba_client/station/__init__.py | ismaelJimenez/mamba_client | 2be6a14d61bbcd16db020f41146cca63c17ebf50 | [
"MIT"
] | null | null | null | mamba_client/station/__init__.py | ismaelJimenez/mamba_client | 2be6a14d61bbcd16db020f41146cca63c17ebf50 | [
"MIT"
] | null | null | null | from .network_controller import NetworkController
from .parameter_get import ParameterGet
from .parameter_set import ParameterSet
from .parameter import Parameter
from .instrument import Instrument
from .station import Station
| 32.428571 | 49 | 0.867841 | 27 | 227 | 7.185185 | 0.444444 | 0.201031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.105727 | 227 | 6 | 50 | 37.833333 | 0.955665 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
fff6a43f20220ace9821c56e35a52f62b173bf9a | 210 | py | Python | vestlus/models/__init__.py | lehvitus/vestlus | 6d9c8b1de7821e544e0c7c99f42d60f8f3805557 | [
"BSD-3-Clause"
] | 12 | 2020-07-02T23:36:02.000Z | 2020-12-15T07:29:20.000Z | vestlus/models/__init__.py | lehvitus/vestlus | 6d9c8b1de7821e544e0c7c99f42d60f8f3805557 | [
"BSD-3-Clause"
] | null | null | null | vestlus/models/__init__.py | lehvitus/vestlus | 6d9c8b1de7821e544e0c7c99f42d60f8f3805557 | [
"BSD-3-Clause"
] | null | null | null | # vestlus:models
from .message import Message
from .message import PrivateMessage
from .message import GroupMessage
from .message import Reaction
from .channel import Channel
from .membership import Membership
| 26.25 | 35 | 0.838095 | 26 | 210 | 6.769231 | 0.384615 | 0.25 | 0.386364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.12381 | 210 | 7 | 36 | 30 | 0.956522 | 0.066667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
08001a4e4f8494011e62cdd2e5a143077729ee0b | 1,979 | py | Python | tests/converter_test/test_dataloop.py | yuki-inaho/superannotate-python-sdk | cae3ab09125631ef48d76e6ac017b94a4d7bc4a7 | [
"MIT"
] | null | null | null | tests/converter_test/test_dataloop.py | yuki-inaho/superannotate-python-sdk | cae3ab09125631ef48d76e6ac017b94a4d7bc4a7 | [
"MIT"
] | null | null | null | tests/converter_test/test_dataloop.py | yuki-inaho/superannotate-python-sdk | cae3ab09125631ef48d76e6ac017b94a4d7bc4a7 | [
"MIT"
] | null | null | null | import superannotate as sa
def dataloop_convert_vector(tmpdir):
out_dir = tmpdir / 'output_vector'
sa.import_annotation_format(
'tests/converter_test/DataLoop/input/toSuperAnnotate', str(out_dir),
'DataLoop', '', 'Vector', 'vector_annotation', 'Web'
)
# project_name = "dataloop_test"
# projects = sa.search_projects(project_name, True)
# if projects:
# sa.delete_project(projects[0])
# project = sa.create_project(project_name, "converter vector", "Vector")
# sa.create_annotation_classes_from_classes_json(
# project, out_dir + "/classes/classes.json"
# )
# sa.upload_images_from_folder_to_project(project, out_dir)
# sa.upload_annotations_from_folder_to_project(project, out_dir)
return 0
def dataloop_convert_object(tmpdir):
out_dir = tmpdir / 'output_object'
sa.import_annotation_format(
'tests/converter_test/DataLoop/input/toSuperAnnotate', str(out_dir),
'DataLoop', '', 'Vector', 'object_detection', 'Desktop'
)
# project_name = "dataloop_test"
# projects = sa.search_projects(project_name, True)
# if projects:
# sa.delete_project(projects[0])
# project = sa.create_project(project_name, "converter vector", "Vector")
# sa.create_annotation_classes_from_classes_json(
# project, out_dir + "/classes/classes.json"
# )
# sa.upload_images_from_folder_to_project(project, out_dir)
# sa.upload_annotations_from_folder_to_project(project, out_dir)
return 0
def dataloop_convert_instance(tmpdir):
out_dir = tmpdir / 'output_instance'
sa.import_annotation_format(
'tests/converter_test/DataLoop/input/toSuperAnnotate', str(out_dir),
'DataLoop', '', 'Vector', 'instance_segmentation', 'Web'
)
return 0
def test_dataloop(tmpdir):
assert dataloop_convert_vector(tmpdir) == 0
assert dataloop_convert_object(tmpdir) == 0
assert dataloop_convert_instance(tmpdir) == 0
| 33.542373 | 77 | 0.706417 | 236 | 1,979 | 5.567797 | 0.190678 | 0.054795 | 0.059361 | 0.057839 | 0.831811 | 0.734399 | 0.734399 | 0.734399 | 0.734399 | 0.734399 | 0 | 0.004941 | 0.18191 | 1,979 | 58 | 78 | 34.12069 | 0.806671 | 0.422941 | 0 | 0.346154 | 0 | 0 | 0.270294 | 0.155219 | 0 | 0 | 0 | 0 | 0.115385 | 1 | 0.153846 | false | 0 | 0.153846 | 0 | 0.423077 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
083a5d39b715916ac5ede8939185d7870924f6e4 | 6,114 | py | Python | s_store_api/tests/tests_feature/test_stores_permission.py | Saknowman/django-s-store-api | a14e000ea32cc527ad2c822f09f812194a5c8a47 | [
"MIT"
] | 1 | 2019-12-24T03:50:04.000Z | 2019-12-24T03:50:04.000Z | s_store_api/tests/tests_feature/test_stores_permission.py | Saknowman/django-s-store-api | a14e000ea32cc527ad2c822f09f812194a5c8a47 | [
"MIT"
] | 6 | 2020-06-05T20:16:37.000Z | 2021-09-22T18:18:13.000Z | s_store_api/tests/tests_feature/test_stores_permission.py | Saknowman/django-s-store-api | a14e000ea32cc527ad2c822f09f812194a5c8a47 | [
"MIT"
] | null | null | null | from rest_framework import status
from s_store_api.tests.utils import BaseAPITestCase, STORE_LIST_URL, get_detail_store_url, get_hire_staff_url, \
get_dismiss_staff_url, get_invite_user_to_access_limited_store_url
class GetStoresPermissionTestCase(BaseAPITestCase):
def test_get_stores___with_out_authentication___404(self):
# Arrange
self.client.logout()
# Act
list_response = self.client.get(STORE_LIST_URL)
detail_response = self.client.get(get_detail_store_url(self.default_store))
# Assert
self.assertEqual(status.HTTP_404_NOT_FOUND, list_response.status_code)
self.assertEqual(status.HTTP_404_NOT_FOUND, detail_response.status_code)
def test_get_stores___to_limited_access_store___404(self):
# Arrange
self.store_a.is_limited_access = True
self.store_a.save()
# Act
detail_response = self.client.get(get_detail_store_url(self.store_a))
# Assert
self.assertEqual(status.HTTP_404_NOT_FOUND, detail_response.status_code)
class OpenStoresPermissionTestCase(BaseAPITestCase):
def test_open_stores___with_out_authentication__404(self):
# Arrange
self.client.logout()
# Act
response = self.client.post(STORE_LIST_URL, {})
# Assert
self.assertEqual(status.HTTP_404_NOT_FOUND, response.status_code)
def test_open_store___has_not_permission___403(self):
# Arrange
self.default_user.groups.remove(self.management_store_group)
# Act
response = self.client.post(STORE_LIST_URL, {})
# Assert
self.assertEqual(status.HTTP_403_FORBIDDEN, response.status_code)
class CloseStoresPermissionTestCase(BaseAPITestCase):
def test_close_stores___without_authentication__404(self):
# Arrange
self.client.logout()
# Act
response = self.client.delete(get_detail_store_url(self.default_store))
# Assert
self.assertEqual(status.HTTP_404_NOT_FOUND, response.status_code)
def test_close_store___has_not_permission___403(self):
# Arrange
self.default_user.groups.remove(self.management_store_group)
# Act
response = self.client.delete(get_detail_store_url(self.default_store))
# Assert
self.assertEqual(status.HTTP_403_FORBIDDEN, response.status_code)
def test_close_store___store_is_not_users_store___403(self):
# Arrange
self.default_user.groups.add(self.management_store_group)
# Act
response = self.client.delete(get_detail_store_url(self.store_a))
# Assert
self.assertEqual(status.HTTP_403_FORBIDDEN, response.status_code)
class UpdateStoresPermissionTestCase(BaseAPITestCase):
def test_update_store___without_authentication__404(self):
# Arrange
self.client.logout()
# Act
response = self.client.put(get_detail_store_url(self.default_store), {})
# Assert
self.assertEqual(status.HTTP_404_NOT_FOUND, response.status_code)
def test_update_store___has_not_permission___403(self):
# Arrange
self.default_user.groups.remove(self.management_store_group)
# Act
put_response = self.client.put(get_detail_store_url(self.default_store), {})
patch_response = self.client.patch(get_detail_store_url(self.default_store), {})
# Assert
self.assertEqual(status.HTTP_403_FORBIDDEN, put_response.status_code)
self.assertEqual(status.HTTP_403_FORBIDDEN, patch_response.status_code)
def test_update_store___store_is_not_users_store___403(self):
# Arrange
self.default_user.groups.add(self.management_store_group)
# Act
put_response = self.client.put(get_detail_store_url(self.store_a), {})
patch_response = self.client.patch(get_detail_store_url(self.store_a), {})
# Assert
self.assertEqual(status.HTTP_403_FORBIDDEN, put_response.status_code)
self.assertEqual(status.HTTP_403_FORBIDDEN, patch_response.status_code)
def test_hire_staff___by_staff___403(self):
# Arrange
self.default_user.groups.add(self.management_store_group)
self.default_user.groups.add(self.store_a.staff_group)
# Act
response = self.client.put(get_hire_staff_url(self.store_a), {'staff': self.un_relation_user})
# Assert
self.assertEqual(status.HTTP_403_FORBIDDEN, response.status_code)
def test_dismiss_staff___by_staff___403(self):
# Arrange
self.default_user.groups.add(self.management_store_group)
self.default_user.groups.add(self.store_a.staff_group)
# Act
response = self.client.put(get_dismiss_staff_url(self.store_a), {'staff': self.un_relation_user})
# Assert
self.assertEqual(status.HTTP_403_FORBIDDEN, response.status_code)
def test_hire_and_dismiss_staff___is_limited_access___404(self):
# Arrange
self.store_a.is_limited_access = True
self.store_a.save()
# Act
hire_response = self.client.put(get_hire_staff_url(self.store_a), {'staff': self.un_relation_user})
dismiss_response = self.client.put(get_dismiss_staff_url(self.store_a), {'staff': self.un_relation_user})
# Assert
self.assertEqual(status.HTTP_404_NOT_FOUND, hire_response.status_code)
self.assertEqual(status.HTTP_404_NOT_FOUND, dismiss_response.status_code)
def test_invite_users_to_access_limited_store___by_not_staff___403(self):
# Arrange
self.store_a.is_limited_access = True
self.store_a.save()
self.default_user.groups.add(self.management_store_group)
self.default_user.groups.add(self.store_a.limited_customer_group)
# Act
response = self.client.put(get_invite_user_to_access_limited_store_url(self.store_a), {})
# Assert
self.assertEqual(status.HTTP_403_FORBIDDEN, response.status_code)
| 43.671429 | 114 | 0.708538 | 769 | 6,114 | 5.153446 | 0.097529 | 0.055514 | 0.081756 | 0.11355 | 0.858693 | 0.8486 | 0.846581 | 0.832198 | 0.813273 | 0.813273 | 0 | 0.019847 | 0.208865 | 6,114 | 139 | 115 | 43.985612 | 0.799462 | 0.043343 | 0 | 0.5 | 0 | 0 | 0.003529 | 0 | 0 | 0 | 0 | 0 | 0.230769 | 1 | 0.179487 | false | 0 | 0.025641 | 0 | 0.25641 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
f29ee0f4812ccc91af3ec7aaa8b0734488b9945b | 932 | py | Python | test_move_zeroes_5kyu.py | chelseadole/code-katas | 1b433282b2acc7eea4080656febc61881e08a7e1 | [
"MIT"
] | null | null | null | test_move_zeroes_5kyu.py | chelseadole/code-katas | 1b433282b2acc7eea4080656febc61881e08a7e1 | [
"MIT"
] | null | null | null | test_move_zeroes_5kyu.py | chelseadole/code-katas | 1b433282b2acc7eea4080656febc61881e08a7e1 | [
"MIT"
] | null | null | null | """Tests for move_zeroes"""
import pytest
TEST_ARRAYS = [
([1, 2, 0, 1, 0, 1, 0, 3, 0, 1], [1, 2, 1, 1, 3, 1, 0, 0, 0, 0]),
([9, 0.0, 0, 9, 1, 2, 0, 1, 0, 1, 0.0, 3, 0, 1, 9, 0, 0, 0, 0, 9], [9, 9, 1, 2, 1, 1, 3, 1, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
(["a", 0, 0, "b", "c", "d", 0, 1, 0, 1, 0, 3, 0, 1, 9, 0, 0, 0, 0, 9], ["a", "b", "c", "d", 1, 1, 3, 1, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
(["a", 0, 0, "b", None, "c", "d", 0, 1, False, 0, 1, 0, 3, [], 0, 1, 9, 0, 0, {}, 0, 0, 9], ["a", "b", None, "c", "d", 1, False, 1, 3, [], 1, 9, {}, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
([0, 1, None, 2, False, 1, 0], [1, None, 2, False, 1, 0, 0]),
(["a", "b"], ["a", "b"]),
([0, 0], [0, 0]),
([0], [0]),
([], [])
]
@pytest.mark.parametrize('array, result', TEST_ARRAYS)
def test_move_zeroes_5kyu(array, result):
from move_zeroes_5kyu import move_zeroes
assert move_zeroes(array) == result
| 40.521739 | 187 | 0.410944 | 204 | 932 | 1.828431 | 0.132353 | 0.273458 | 0.30563 | 0.310992 | 0.423592 | 0.410188 | 0.372654 | 0.27882 | 0.252011 | 0.252011 | 0 | 0.209913 | 0.263949 | 932 | 22 | 188 | 42.363636 | 0.333819 | 0.022532 | 0 | 0 | 0 | 0 | 0.036464 | 0 | 0 | 0 | 0 | 0 | 0.0625 | 1 | 0.0625 | false | 0 | 0.125 | 0 | 0.1875 | 0 | 0 | 0 | 1 | null | 1 | 1 | 1 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
f2abc52ac9418dec7988d878aa75e094a3102efb | 29 | py | Python | src/chainalytic_icon/cli/__init__.py | yudus-lab/chainalytic-icon | 2c4ef9dde9e94a98a2efabccfb84f853e3a85b0d | [
"Apache-2.0"
] | 45 | 2020-11-28T04:45:45.000Z | 2022-03-31T05:53:37.000Z | src/chainalytic_icon/cli/__init__.py | yudus-lab/chainalytic-icon | 2c4ef9dde9e94a98a2efabccfb84f853e3a85b0d | [
"Apache-2.0"
] | 13 | 2021-01-15T00:50:10.000Z | 2022-02-02T15:16:49.000Z | src/chainalytic_icon/cli/__init__.py | yudus-lab/chainalytic-icon | 2c4ef9dde9e94a98a2efabccfb84f853e3a85b0d | [
"Apache-2.0"
] | 14 | 2020-12-21T10:03:31.000Z | 2021-11-22T04:03:03.000Z | from .console import Console
| 14.5 | 28 | 0.827586 | 4 | 29 | 6 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.137931 | 29 | 1 | 29 | 29 | 0.96 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
29902a8dc884708eb7b1a8c8418d0688867c50b5 | 92 | py | Python | dvclive/__init__.py | iterative/dvclive | 1eca63f44ac4c9f60945546ae3495a0d45ea2f43 | [
"Apache-2.0"
] | 46 | 2021-02-20T13:38:52.000Z | 2022-03-03T06:16:14.000Z | dvclive/__init__.py | iterative/dvclive | 1eca63f44ac4c9f60945546ae3495a0d45ea2f43 | [
"Apache-2.0"
] | 163 | 2021-02-18T10:40:08.000Z | 2022-03-30T19:09:49.000Z | dvclive/__init__.py | iterative/dvclive | 1eca63f44ac4c9f60945546ae3495a0d45ea2f43 | [
"Apache-2.0"
] | 13 | 2021-03-02T10:58:48.000Z | 2021-12-31T05:21:24.000Z | from dvclive.version import __version__ # noqa: F401
from .live import Live # noqa: F401
| 23 | 53 | 0.75 | 13 | 92 | 5 | 0.538462 | 0.246154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08 | 0.184783 | 92 | 3 | 54 | 30.666667 | 0.786667 | 0.228261 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
29faacfd63f33b2c8863658f67a5cf3481fdbbbb | 168 | py | Python | Vid-Server/vidserver/communication/response.py | CUITCHE/Vid | ebd46d0ec64c1920c47bdde8e47efafd5797e88c | [
"MIT"
] | null | null | null | Vid-Server/vidserver/communication/response.py | CUITCHE/Vid | ebd46d0ec64c1920c47bdde8e47efafd5797e88c | [
"MIT"
] | null | null | null | Vid-Server/vidserver/communication/response.py | CUITCHE/Vid | ebd46d0ec64c1920c47bdde8e47efafd5797e88c | [
"MIT"
] | 1 | 2021-01-14T12:50:02.000Z | 2021-01-14T12:50:02.000Z | import vidserver.responses_pb2
import vidserver.base_pb2
Response = vidserver.base_pb2.Response
DirectoryVerification = vidserver.responses_pb2.DirectoryVerification
| 24 | 69 | 0.880952 | 18 | 168 | 8 | 0.388889 | 0.208333 | 0.291667 | 0.333333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025641 | 0.071429 | 168 | 6 | 70 | 28 | 0.897436 | 0 | 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 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
d9b0bd91cb01b86a6ceec2960396ea09bf01e386 | 26 | py | Python | sec08/vegeket/base/views/__init__.py | TakumaFujimoto/vegeket | b6beff22b86a349b5f0acce81164312878aa21ac | [
"MIT"
] | 3 | 2021-09-10T08:35:20.000Z | 2022-02-14T03:40:33.000Z | sec08/vegeket/base/views/__init__.py | TakumaFujimoto/vegeket | b6beff22b86a349b5f0acce81164312878aa21ac | [
"MIT"
] | 1 | 2021-09-08T13:50:36.000Z | 2021-09-08T13:50:36.000Z | sec08/vegeket/base/views/__init__.py | TakumaFujimoto/vegeket | b6beff22b86a349b5f0acce81164312878aa21ac | [
"MIT"
] | 4 | 2021-09-26T01:50:40.000Z | 2022-02-28T04:03:56.000Z | from .item_views import *
| 13 | 25 | 0.769231 | 4 | 26 | 4.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 26 | 1 | 26 | 26 | 0.863636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
8a291a789f87d8bd3cc1ff04ebe2e591b44ab4b0 | 167 | py | Python | App/order/__init__.py | BrandonZhangGithub/flask | d439a95e28c231b690bdc8cd533b4b70e092bdfa | [
"BSD-3-Clause"
] | null | null | null | App/order/__init__.py | BrandonZhangGithub/flask | d439a95e28c231b690bdc8cd533b4b70e092bdfa | [
"BSD-3-Clause"
] | null | null | null | App/order/__init__.py | BrandonZhangGithub/flask | d439a95e28c231b690bdc8cd533b4b70e092bdfa | [
"BSD-3-Clause"
] | null | null | null | from flask import Blueprint
order_blue = Blueprint('order', __name__, template_folder='templates', static_folder='static', static_url_path='/s')
from . import views
| 27.833333 | 116 | 0.778443 | 22 | 167 | 5.5 | 0.681818 | 0.231405 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.101796 | 167 | 5 | 117 | 33.4 | 0.806667 | 0 | 0 | 0 | 0 | 0 | 0.131737 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0.666667 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 6 |
8a82896ea2a6ca5c900fc34faeb8c1487b96ff4a | 39,599 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_mpls_static_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_mpls_static_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_mpls_static_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
import re
import collections
from enum import Enum
from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum
from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict
from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLIST, REFERENCE_IDENTITY_CLASS, REFERENCE_ENUM_CLASS, REFERENCE_BITS, REFERENCE_UNION
from ydk.errors import YPYError, YPYModelError
from ydk.providers._importer import _yang_ns
_meta_table = {
'MgmtMplsStaticLabelStatusEnum' : _MetaInfoEnum('MgmtMplsStaticLabelStatusEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper',
{
'not-created':'not_created',
'vrf-down':'vrf_down',
'rewrite-vrf-down':'rewrite_vrf_down',
'lsd-disconnected':'lsd_disconnected',
'lsd-failed':'lsd_failed',
'wait-for-lsd-reply':'wait_for_lsd_reply',
'label-created':'label_created',
'label-create-failed':'label_create_failed',
'label-rewrite-failed':'label_rewrite_failed',
'rewrite-next-hop-interface-missing':'rewrite_next_hop_interface_missing',
'label-discrepancy':'label_discrepancy',
'rewrite-discrepancy':'rewrite_discrepancy',
'label-status-unknown':'label_status_unknown',
}, 'Cisco-IOS-XR-mpls-static-oper', _yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper']),
'MgmtStaticPathEnum' : _MetaInfoEnum('MgmtStaticPathEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper',
{
'cross-connect-path':'cross_connect_path',
'pop-lookup-path':'pop_lookup_path',
}, 'Cisco-IOS-XR-mpls-static-oper', _yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper']),
'MgmtStaticNhLblEnum' : _MetaInfoEnum('MgmtStaticNhLblEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper',
{
'out-label':'out_label',
'out-pop':'out_pop',
'out-explicit-null':'out_explicit_null',
}, 'Cisco-IOS-XR-mpls-static-oper', _yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper']),
'MgmtStaticAddrEnum' : _MetaInfoEnum('MgmtStaticAddrEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper',
{
'ipv4':'ipv4',
'ipv6':'ipv6',
}, 'Cisco-IOS-XR-mpls-static-oper', _yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper']),
'MgmtMplsStaticLabelModeEnum' : _MetaInfoEnum('MgmtMplsStaticLabelModeEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper',
{
'none':'none',
'per-prefix':'per_prefix',
'per-vrf':'per_vrf',
'cross-connect':'cross_connect',
}, 'Cisco-IOS-XR-mpls-static-oper', _yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper']),
'MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.Prefix.Prefix_' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.Prefix.Prefix_',
False,
[
_MetaInfoClassMember('af-name', REFERENCE_ENUM_CLASS, 'MgmtStaticAddrEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtStaticAddrEnum',
[], [],
''' AFName
''',
'af_name',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('ipv4-prefix', ATTRIBUTE, 'str' , None, None,
[], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IPv4 context
''',
'ipv4_prefix',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('ipv6-prefix', ATTRIBUTE, 'str' , None, None,
[], ['((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'],
''' IPv6 context
''',
'ipv6_prefix',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'prefix',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.Prefix' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.Prefix',
False,
[
_MetaInfoClassMember('prefix', REFERENCE_CLASS, 'Prefix_' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.Prefix.Prefix_',
[], [],
''' Prefix
''',
'prefix',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('prefix-length', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Prefix length
''',
'prefix_length',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'prefix',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.PathInfo' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.PathInfo',
False,
[
_MetaInfoClassMember('next-hop-interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Next-Hop Interface Name
''',
'next_hop_interface_name',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('next-hop-ipv4-address', ATTRIBUTE, 'str' , None, None,
[], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Next-Hop Ipv4 Address
''',
'next_hop_ipv4_address',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('next-hop-ipv4-address-set', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Next-Hop Ipv4 Set
''',
'next_hop_ipv4_address_set',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('next-hop-label', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Next-Hop Label
''',
'next_hop_label',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('next-hop-label-type', REFERENCE_ENUM_CLASS, 'MgmtStaticNhLblEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtStaticNhLblEnum',
[], [],
''' Next-Hop Label Type
''',
'next_hop_label_type',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('path', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Number
''',
'path',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('type', REFERENCE_ENUM_CLASS, 'MgmtStaticPathEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtStaticPathEnum',
[], [],
''' Path Type
''',
'type',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'path-info',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label',
False,
[
_MetaInfoClassMember('label', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Label value
''',
'label',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('label-mode', REFERENCE_ENUM_CLASS, 'MgmtMplsStaticLabelModeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtMplsStaticLabelModeEnum',
[], [],
''' Label Mode
''',
'label_mode',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('label-status', REFERENCE_ENUM_CLASS, 'MgmtMplsStaticLabelStatusEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtMplsStaticLabelStatusEnum',
[], [],
''' Label Status
''',
'label_status',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('path-info', REFERENCE_LIST, 'PathInfo' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.PathInfo',
[], [],
''' Path Information
''',
'path_info',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('prefix', REFERENCE_CLASS, 'Prefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.Prefix',
[], [],
''' Prefix Information
''',
'prefix',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('vrf-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' VRF name
''',
'vrf_name',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'label',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Vrfs.Vrf.Lsps.Lsp' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs.Vrf.Lsps.Lsp',
False,
[
_MetaInfoClassMember('lsp-name', ATTRIBUTE, 'str' , None, None,
[], ['[\\w\\-\\.:,_@#%$\\+=\\|;]+'],
''' LSP Name
''',
'lsp_name',
'Cisco-IOS-XR-mpls-static-oper', True),
_MetaInfoClassMember('label', REFERENCE_CLASS, 'Label' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label',
[], [],
''' Label Information
''',
'label',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('lsp-name-xr', ATTRIBUTE, 'str' , None, None,
[], [],
''' LSP Name
''',
'lsp_name_xr',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'lsp',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Vrfs.Vrf.Lsps' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs.Vrf.Lsps',
False,
[
_MetaInfoClassMember('lsp', REFERENCE_LIST, 'Lsp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs.Vrf.Lsps.Lsp',
[], [],
''' Data for static lsp
''',
'lsp',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'lsps',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.Prefix.Prefix_' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.Prefix.Prefix_',
False,
[
_MetaInfoClassMember('af-name', REFERENCE_ENUM_CLASS, 'MgmtStaticAddrEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtStaticAddrEnum',
[], [],
''' AFName
''',
'af_name',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('ipv4-prefix', ATTRIBUTE, 'str' , None, None,
[], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IPv4 context
''',
'ipv4_prefix',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('ipv6-prefix', ATTRIBUTE, 'str' , None, None,
[], ['((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'],
''' IPv6 context
''',
'ipv6_prefix',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'prefix',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.Prefix' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.Prefix',
False,
[
_MetaInfoClassMember('prefix', REFERENCE_CLASS, 'Prefix_' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.Prefix.Prefix_',
[], [],
''' Prefix
''',
'prefix',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('prefix-length', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Prefix length
''',
'prefix_length',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'prefix',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.PathInfo' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.PathInfo',
False,
[
_MetaInfoClassMember('next-hop-interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Next-Hop Interface Name
''',
'next_hop_interface_name',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('next-hop-ipv4-address', ATTRIBUTE, 'str' , None, None,
[], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Next-Hop Ipv4 Address
''',
'next_hop_ipv4_address',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('next-hop-ipv4-address-set', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Next-Hop Ipv4 Set
''',
'next_hop_ipv4_address_set',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('next-hop-label', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Next-Hop Label
''',
'next_hop_label',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('next-hop-label-type', REFERENCE_ENUM_CLASS, 'MgmtStaticNhLblEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtStaticNhLblEnum',
[], [],
''' Next-Hop Label Type
''',
'next_hop_label_type',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('path', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Number
''',
'path',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('type', REFERENCE_ENUM_CLASS, 'MgmtStaticPathEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtStaticPathEnum',
[], [],
''' Path Type
''',
'type',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'path-info',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel',
False,
[
_MetaInfoClassMember('local-label-id', ATTRIBUTE, 'int' , None, None,
[('16', '1048575')], [],
''' Local Label
''',
'local_label_id',
'Cisco-IOS-XR-mpls-static-oper', True),
_MetaInfoClassMember('label', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Label value
''',
'label',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('label-mode', REFERENCE_ENUM_CLASS, 'MgmtMplsStaticLabelModeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtMplsStaticLabelModeEnum',
[], [],
''' Label Mode
''',
'label_mode',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('label-status', REFERENCE_ENUM_CLASS, 'MgmtMplsStaticLabelStatusEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtMplsStaticLabelStatusEnum',
[], [],
''' Label Status
''',
'label_status',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('path-info', REFERENCE_LIST, 'PathInfo' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.PathInfo',
[], [],
''' Path Information
''',
'path_info',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('prefix', REFERENCE_CLASS, 'Prefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.Prefix',
[], [],
''' Prefix Information
''',
'prefix',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('vrf-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' VRF name
''',
'vrf_name',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'local-label',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Vrfs.Vrf.LocalLabels' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs.Vrf.LocalLabels',
False,
[
_MetaInfoClassMember('local-label', REFERENCE_LIST, 'LocalLabel' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel',
[], [],
''' Data for static label
''',
'local_label',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'local-labels',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Vrfs.Vrf' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs.Vrf',
False,
[
_MetaInfoClassMember('vrf-name', ATTRIBUTE, 'str' , None, None,
[], ['[\\w\\-\\.:,_@#%$\\+=\\|;]+'],
''' VRF Name
''',
'vrf_name',
'Cisco-IOS-XR-mpls-static-oper', True),
_MetaInfoClassMember('local-labels', REFERENCE_CLASS, 'LocalLabels' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs.Vrf.LocalLabels',
[], [],
''' data for static local-label table
''',
'local_labels',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('lsps', REFERENCE_CLASS, 'Lsps' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs.Vrf.Lsps',
[], [],
''' data for static lsp table
''',
'lsps',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'vrf',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Vrfs' : {
'meta_info' : _MetaInfoClass('MplsStatic.Vrfs',
False,
[
_MetaInfoClassMember('vrf', REFERENCE_LIST, 'Vrf' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs.Vrf',
[], [],
''' VRF Name
''',
'vrf',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'vrfs',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.Summary' : {
'meta_info' : _MetaInfoClass('MplsStatic.Summary',
False,
[
_MetaInfoClassMember('active-vrf-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Active VRF Active
''',
'active_vrf_count',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('im-connected', ATTRIBUTE, 'bool' , None, None,
[], [],
''' IM is connected
''',
'im_connected',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Interface
''',
'interface_count',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('interface-foward-reference-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Active Interface
''',
'interface_foward_reference_count',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('label-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Labels
''',
'label_count',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('label-discrepancy-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Labels with Discrepancies
''',
'label_discrepancy_count',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('label-error-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Labels with Errors
''',
'label_error_count',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('lsd-connected', ATTRIBUTE, 'bool' , None, None,
[], [],
''' LSD connection is up
''',
'lsd_connected',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('mpls-enabled-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of MPLS enabled Interface
''',
'mpls_enabled_interface_count',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('rsi-connected', ATTRIBUTE, 'bool' , None, None,
[], [],
''' RSI is connected
''',
'rsi_connected',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('vrf-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of VRF configured
''',
'vrf_count',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'summary',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.LocalLabels.LocalLabel.Prefix.Prefix_' : {
'meta_info' : _MetaInfoClass('MplsStatic.LocalLabels.LocalLabel.Prefix.Prefix_',
False,
[
_MetaInfoClassMember('af-name', REFERENCE_ENUM_CLASS, 'MgmtStaticAddrEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtStaticAddrEnum',
[], [],
''' AFName
''',
'af_name',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('ipv4-prefix', ATTRIBUTE, 'str' , None, None,
[], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IPv4 context
''',
'ipv4_prefix',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('ipv6-prefix', ATTRIBUTE, 'str' , None, None,
[], ['((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'],
''' IPv6 context
''',
'ipv6_prefix',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'prefix',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.LocalLabels.LocalLabel.Prefix' : {
'meta_info' : _MetaInfoClass('MplsStatic.LocalLabels.LocalLabel.Prefix',
False,
[
_MetaInfoClassMember('prefix', REFERENCE_CLASS, 'Prefix_' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.LocalLabels.LocalLabel.Prefix.Prefix_',
[], [],
''' Prefix
''',
'prefix',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('prefix-length', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Prefix length
''',
'prefix_length',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'prefix',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.LocalLabels.LocalLabel.PathInfo' : {
'meta_info' : _MetaInfoClass('MplsStatic.LocalLabels.LocalLabel.PathInfo',
False,
[
_MetaInfoClassMember('next-hop-interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Next-Hop Interface Name
''',
'next_hop_interface_name',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('next-hop-ipv4-address', ATTRIBUTE, 'str' , None, None,
[], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Next-Hop Ipv4 Address
''',
'next_hop_ipv4_address',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('next-hop-ipv4-address-set', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Next-Hop Ipv4 Set
''',
'next_hop_ipv4_address_set',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('next-hop-label', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Next-Hop Label
''',
'next_hop_label',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('next-hop-label-type', REFERENCE_ENUM_CLASS, 'MgmtStaticNhLblEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtStaticNhLblEnum',
[], [],
''' Next-Hop Label Type
''',
'next_hop_label_type',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('path', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Number
''',
'path',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('type', REFERENCE_ENUM_CLASS, 'MgmtStaticPathEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtStaticPathEnum',
[], [],
''' Path Type
''',
'type',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'path-info',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.LocalLabels.LocalLabel' : {
'meta_info' : _MetaInfoClass('MplsStatic.LocalLabels.LocalLabel',
False,
[
_MetaInfoClassMember('local-label-id', ATTRIBUTE, 'int' , None, None,
[('16', '1048575')], [],
''' Local Label
''',
'local_label_id',
'Cisco-IOS-XR-mpls-static-oper', True),
_MetaInfoClassMember('label', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Label value
''',
'label',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('label-mode', REFERENCE_ENUM_CLASS, 'MgmtMplsStaticLabelModeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtMplsStaticLabelModeEnum',
[], [],
''' Label Mode
''',
'label_mode',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('label-status', REFERENCE_ENUM_CLASS, 'MgmtMplsStaticLabelStatusEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MgmtMplsStaticLabelStatusEnum',
[], [],
''' Label Status
''',
'label_status',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('path-info', REFERENCE_LIST, 'PathInfo' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.LocalLabels.LocalLabel.PathInfo',
[], [],
''' Path Information
''',
'path_info',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('prefix', REFERENCE_CLASS, 'Prefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.LocalLabels.LocalLabel.Prefix',
[], [],
''' Prefix Information
''',
'prefix',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('vrf-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' VRF name
''',
'vrf_name',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'local-label',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic.LocalLabels' : {
'meta_info' : _MetaInfoClass('MplsStatic.LocalLabels',
False,
[
_MetaInfoClassMember('local-label', REFERENCE_LIST, 'LocalLabel' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.LocalLabels.LocalLabel',
[], [],
''' Data for static label
''',
'local_label',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'local-labels',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
'MplsStatic' : {
'meta_info' : _MetaInfoClass('MplsStatic',
False,
[
_MetaInfoClassMember('local-labels', REFERENCE_CLASS, 'LocalLabels' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.LocalLabels',
[], [],
''' data for static local-label table
''',
'local_labels',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('summary', REFERENCE_CLASS, 'Summary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Summary',
[], [],
''' MPLS STATIC summary data
''',
'summary',
'Cisco-IOS-XR-mpls-static-oper', False),
_MetaInfoClassMember('vrfs', REFERENCE_CLASS, 'Vrfs' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper', 'MplsStatic.Vrfs',
[], [],
''' VRF table
''',
'vrfs',
'Cisco-IOS-XR-mpls-static-oper', False),
],
'Cisco-IOS-XR-mpls-static-oper',
'mpls-static',
_yang_ns._namespaces['Cisco-IOS-XR-mpls-static-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper'
),
},
}
_meta_table['MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.Prefix.Prefix_']['meta_info'].parent =_meta_table['MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.Prefix']['meta_info']
_meta_table['MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.Prefix']['meta_info'].parent =_meta_table['MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label']['meta_info']
_meta_table['MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label.PathInfo']['meta_info'].parent =_meta_table['MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label']['meta_info']
_meta_table['MplsStatic.Vrfs.Vrf.Lsps.Lsp.Label']['meta_info'].parent =_meta_table['MplsStatic.Vrfs.Vrf.Lsps.Lsp']['meta_info']
_meta_table['MplsStatic.Vrfs.Vrf.Lsps.Lsp']['meta_info'].parent =_meta_table['MplsStatic.Vrfs.Vrf.Lsps']['meta_info']
_meta_table['MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.Prefix.Prefix_']['meta_info'].parent =_meta_table['MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.Prefix']['meta_info']
_meta_table['MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.Prefix']['meta_info'].parent =_meta_table['MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel']['meta_info']
_meta_table['MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel.PathInfo']['meta_info'].parent =_meta_table['MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel']['meta_info']
_meta_table['MplsStatic.Vrfs.Vrf.LocalLabels.LocalLabel']['meta_info'].parent =_meta_table['MplsStatic.Vrfs.Vrf.LocalLabels']['meta_info']
_meta_table['MplsStatic.Vrfs.Vrf.Lsps']['meta_info'].parent =_meta_table['MplsStatic.Vrfs.Vrf']['meta_info']
_meta_table['MplsStatic.Vrfs.Vrf.LocalLabels']['meta_info'].parent =_meta_table['MplsStatic.Vrfs.Vrf']['meta_info']
_meta_table['MplsStatic.Vrfs.Vrf']['meta_info'].parent =_meta_table['MplsStatic.Vrfs']['meta_info']
_meta_table['MplsStatic.LocalLabels.LocalLabel.Prefix.Prefix_']['meta_info'].parent =_meta_table['MplsStatic.LocalLabels.LocalLabel.Prefix']['meta_info']
_meta_table['MplsStatic.LocalLabels.LocalLabel.Prefix']['meta_info'].parent =_meta_table['MplsStatic.LocalLabels.LocalLabel']['meta_info']
_meta_table['MplsStatic.LocalLabels.LocalLabel.PathInfo']['meta_info'].parent =_meta_table['MplsStatic.LocalLabels.LocalLabel']['meta_info']
_meta_table['MplsStatic.LocalLabels.LocalLabel']['meta_info'].parent =_meta_table['MplsStatic.LocalLabels']['meta_info']
_meta_table['MplsStatic.Vrfs']['meta_info'].parent =_meta_table['MplsStatic']['meta_info']
_meta_table['MplsStatic.Summary']['meta_info'].parent =_meta_table['MplsStatic']['meta_info']
_meta_table['MplsStatic.LocalLabels']['meta_info'].parent =_meta_table['MplsStatic']['meta_info']
| 51.029639 | 223 | 0.513422 | 3,951 | 39,599 | 4.90534 | 0.037459 | 0.102368 | 0.12796 | 0.136525 | 0.91213 | 0.89918 | 0.894278 | 0.87658 | 0.852588 | 0.815077 | 0 | 0.02446 | 0.326852 | 39,599 | 775 | 224 | 51.095484 | 0.702619 | 0 | 0 | 0.609012 | 0 | 0.013081 | 0.459943 | 0.35196 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.011628 | 0 | 0.011628 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
8a9157835997355b2219ed31c816a0469bf23509 | 83 | py | Python | library/wumpy-interactions/wumpy/interactions/__init__.py | Bluenix2/wumpy | 8b75f15ca31601d8699fc04d10fb42f98ac71fa5 | [
"MIT"
] | 16 | 2021-08-28T10:18:52.000Z | 2021-12-12T21:35:13.000Z | library/wumpy-interactions/wumpy/interactions/__init__.py | Bluenix2/wumpy | 8b75f15ca31601d8699fc04d10fb42f98ac71fa5 | [
"MIT"
] | 5 | 2021-10-04T13:18:24.000Z | 2021-11-13T19:17:33.000Z | library/wumpy-interactions/wumpy/interactions/__init__.py | Bluenix2/wumpy | 8b75f15ca31601d8699fc04d10fb42f98ac71fa5 | [
"MIT"
] | 2 | 2021-08-28T10:58:21.000Z | 2021-11-01T14:55:28.000Z | from .app import *
from .base import *
from .commands import *
from .rest import *
| 16.6 | 23 | 0.710843 | 12 | 83 | 4.916667 | 0.5 | 0.508475 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.192771 | 83 | 4 | 24 | 20.75 | 0.880597 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
8aa9c3e37590bb9147d25da8538dd69c63631da1 | 11,433 | py | Python | tests/components/august/test_config_flow.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/august/test_config_flow.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | tests/components/august/test_config_flow.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Test the August config flow."""
from unittest.mock import patch
from yalexs.authenticator import ValidationResult
from homeassistant import config_entries
from homeassistant.components.august.const import (
CONF_ACCESS_TOKEN_CACHE_FILE,
CONF_INSTALL_ID,
CONF_LOGIN_METHOD,
DOMAIN,
VERIFICATION_CODE_KEY,
)
from homeassistant.components.august.exceptions import (
CannotConnect,
InvalidAuth,
RequireValidation,
)
from homeassistant.const import CONF_PASSWORD, CONF_TIMEOUT, CONF_USERNAME
from tests.common import MockConfigEntry
async def test_form(hass):
"""Test we get the form."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
assert result["type"] == "form"
assert result["errors"] == {}
with patch(
"homeassistant.components.august.config_flow.AugustGateway.async_authenticate",
return_value=True,
), patch(
"homeassistant.components.august.async_setup_entry",
return_value=True,
) as mock_setup_entry:
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
{
CONF_LOGIN_METHOD: "email",
CONF_USERNAME: "my@email.tld",
CONF_PASSWORD: "test-password",
},
)
await hass.async_block_till_done()
assert result2["type"] == "create_entry"
assert result2["title"] == "my@email.tld"
assert result2["data"] == {
CONF_LOGIN_METHOD: "email",
CONF_USERNAME: "my@email.tld",
CONF_INSTALL_ID: None,
CONF_ACCESS_TOKEN_CACHE_FILE: ".my@email.tld.august.conf",
}
assert len(mock_setup_entry.mock_calls) == 1
async def test_form_invalid_auth(hass):
"""Test we handle invalid auth."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
with patch(
"homeassistant.components.august.config_flow.AugustGateway.async_authenticate",
side_effect=InvalidAuth,
):
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
{
CONF_LOGIN_METHOD: "email",
CONF_USERNAME: "my@email.tld",
CONF_PASSWORD: "test-password",
},
)
assert result2["type"] == "form"
assert result2["errors"] == {"base": "invalid_auth"}
async def test_user_unexpected_exception(hass):
"""Test we handle an unexpected exception."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
with patch(
"homeassistant.components.august.config_flow.AugustGateway.async_authenticate",
side_effect=ValueError,
):
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
{
CONF_LOGIN_METHOD: "email",
CONF_USERNAME: "my@email.tld",
CONF_PASSWORD: "test-password",
},
)
assert result2["type"] == "form"
assert result2["errors"] == {"base": "unknown"}
async def test_form_cannot_connect(hass):
"""Test we handle cannot connect error."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
with patch(
"homeassistant.components.august.config_flow.AugustGateway.async_authenticate",
side_effect=CannotConnect,
):
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
{
CONF_LOGIN_METHOD: "email",
CONF_USERNAME: "my@email.tld",
CONF_PASSWORD: "test-password",
},
)
assert result2["type"] == "form"
assert result2["errors"] == {"base": "cannot_connect"}
async def test_form_needs_validate(hass):
"""Test we present validation when we need to validate."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
with patch(
"homeassistant.components.august.config_flow.AugustGateway.async_authenticate",
side_effect=RequireValidation,
), patch(
"homeassistant.components.august.gateway.AuthenticatorAsync.async_send_verification_code",
return_value=True,
) as mock_send_verification_code:
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
{
CONF_LOGIN_METHOD: "email",
CONF_USERNAME: "my@email.tld",
CONF_PASSWORD: "test-password",
},
)
assert len(mock_send_verification_code.mock_calls) == 1
assert result2["type"] == "form"
assert result2["errors"] is None
assert result2["step_id"] == "validation"
# Try with the WRONG verification code give us the form back again
with patch(
"homeassistant.components.august.config_flow.AugustGateway.async_authenticate",
side_effect=RequireValidation,
), patch(
"homeassistant.components.august.gateway.AuthenticatorAsync.async_validate_verification_code",
return_value=ValidationResult.INVALID_VERIFICATION_CODE,
) as mock_validate_verification_code, patch(
"homeassistant.components.august.gateway.AuthenticatorAsync.async_send_verification_code",
return_value=True,
) as mock_send_verification_code, patch(
"homeassistant.components.august.async_setup_entry", return_value=True
) as mock_setup_entry:
result3 = await hass.config_entries.flow.async_configure(
result["flow_id"],
{VERIFICATION_CODE_KEY: "incorrect"},
)
# Make sure we do not resend the code again
# so they have a chance to retry
assert len(mock_send_verification_code.mock_calls) == 0
assert len(mock_validate_verification_code.mock_calls) == 1
assert result3["type"] == "form"
assert result3["errors"] is None
assert result3["step_id"] == "validation"
# Try with the CORRECT verification code and we setup
with patch(
"homeassistant.components.august.config_flow.AugustGateway.async_authenticate",
return_value=True,
), patch(
"homeassistant.components.august.gateway.AuthenticatorAsync.async_validate_verification_code",
return_value=ValidationResult.VALIDATED,
) as mock_validate_verification_code, patch(
"homeassistant.components.august.gateway.AuthenticatorAsync.async_send_verification_code",
return_value=True,
) as mock_send_verification_code, patch(
"homeassistant.components.august.async_setup_entry", return_value=True
) as mock_setup_entry:
result4 = await hass.config_entries.flow.async_configure(
result["flow_id"],
{VERIFICATION_CODE_KEY: "correct"},
)
await hass.async_block_till_done()
assert len(mock_send_verification_code.mock_calls) == 0
assert len(mock_validate_verification_code.mock_calls) == 1
assert result4["type"] == "create_entry"
assert result4["title"] == "my@email.tld"
assert result4["data"] == {
CONF_LOGIN_METHOD: "email",
CONF_USERNAME: "my@email.tld",
CONF_INSTALL_ID: None,
CONF_ACCESS_TOKEN_CACHE_FILE: ".my@email.tld.august.conf",
}
assert len(mock_setup_entry.mock_calls) == 1
async def test_form_reauth(hass):
"""Test reauthenticate."""
entry = MockConfigEntry(
domain=DOMAIN,
data={
CONF_LOGIN_METHOD: "email",
CONF_USERNAME: "my@email.tld",
CONF_PASSWORD: "test-password",
CONF_INSTALL_ID: None,
CONF_TIMEOUT: 10,
CONF_ACCESS_TOKEN_CACHE_FILE: ".my@email.tld.august.conf",
},
unique_id="my@email.tld",
)
entry.add_to_hass(hass)
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_REAUTH}, data=entry.data
)
assert result["type"] == "form"
assert result["errors"] == {}
with patch(
"homeassistant.components.august.config_flow.AugustGateway.async_authenticate",
return_value=True,
), patch(
"homeassistant.components.august.async_setup_entry",
return_value=True,
) as mock_setup_entry:
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
{
CONF_PASSWORD: "new-test-password",
},
)
await hass.async_block_till_done()
assert result2["type"] == "abort"
assert result2["reason"] == "reauth_successful"
assert len(mock_setup_entry.mock_calls) == 1
async def test_form_reauth_with_2fa(hass):
"""Test reauthenticate with 2fa."""
entry = MockConfigEntry(
domain=DOMAIN,
data={
CONF_LOGIN_METHOD: "email",
CONF_USERNAME: "my@email.tld",
CONF_PASSWORD: "test-password",
CONF_INSTALL_ID: None,
CONF_TIMEOUT: 10,
CONF_ACCESS_TOKEN_CACHE_FILE: ".my@email.tld.august.conf",
},
unique_id="my@email.tld",
)
entry.add_to_hass(hass)
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_REAUTH}, data=entry.data
)
assert result["type"] == "form"
assert result["errors"] == {}
with patch(
"homeassistant.components.august.config_flow.AugustGateway.async_authenticate",
side_effect=RequireValidation,
), patch(
"homeassistant.components.august.gateway.AuthenticatorAsync.async_send_verification_code",
return_value=True,
) as mock_send_verification_code:
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
{
CONF_PASSWORD: "new-test-password",
},
)
await hass.async_block_till_done()
assert len(mock_send_verification_code.mock_calls) == 1
assert result2["type"] == "form"
assert result2["errors"] is None
assert result2["step_id"] == "validation"
# Try with the CORRECT verification code and we setup
with patch(
"homeassistant.components.august.config_flow.AugustGateway.async_authenticate",
return_value=True,
), patch(
"homeassistant.components.august.gateway.AuthenticatorAsync.async_validate_verification_code",
return_value=ValidationResult.VALIDATED,
) as mock_validate_verification_code, patch(
"homeassistant.components.august.gateway.AuthenticatorAsync.async_send_verification_code",
return_value=True,
) as mock_send_verification_code, patch(
"homeassistant.components.august.async_setup_entry", return_value=True
) as mock_setup_entry:
result3 = await hass.config_entries.flow.async_configure(
result2["flow_id"],
{VERIFICATION_CODE_KEY: "correct"},
)
await hass.async_block_till_done()
assert len(mock_validate_verification_code.mock_calls) == 1
assert len(mock_send_verification_code.mock_calls) == 0
assert result3["type"] == "abort"
assert result3["reason"] == "reauth_successful"
assert len(mock_setup_entry.mock_calls) == 1
| 35.178462 | 102 | 0.660632 | 1,260 | 11,433 | 5.719841 | 0.110317 | 0.071042 | 0.100597 | 0.108506 | 0.841265 | 0.832108 | 0.832108 | 0.832108 | 0.832108 | 0.832108 | 0 | 0.00617 | 0.234497 | 11,433 | 324 | 103 | 35.287037 | 0.817299 | 0.023703 | 0 | 0.687732 | 0 | 0 | 0.23978 | 0.166559 | 0 | 0 | 0 | 0 | 0.159851 | 1 | 0 | false | 0.037175 | 0.026022 | 0 | 0.026022 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
8acf02081850bd281f69d6fe1cd7e9938a35b3ce | 45 | py | Python | test.py | lovendatj/password-manager | a899b595bcb7d1876234768418cc703fec595a5d | [
"MIT"
] | null | null | null | test.py | lovendatj/password-manager | a899b595bcb7d1876234768418cc703fec595a5d | [
"MIT"
] | null | null | null | test.py | lovendatj/password-manager | a899b595bcb7d1876234768418cc703fec595a5d | [
"MIT"
] | null | null | null | print("hello, this is a test python script")
| 22.5 | 44 | 0.733333 | 8 | 45 | 4.125 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.155556 | 45 | 1 | 45 | 45 | 0.868421 | 0 | 0 | 0 | 0 | 0 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
8ad28236b04c12a8a01946633f1ff1f682ea643b | 110 | py | Python | edx_data_research/web_app/report/__init__.py | gopa1959/test | 3e224d0d86015b1e3e2da426e914aeb86c80d3c8 | [
"MIT"
] | null | null | null | edx_data_research/web_app/report/__init__.py | gopa1959/test | 3e224d0d86015b1e3e2da426e914aeb86c80d3c8 | [
"MIT"
] | null | null | null | edx_data_research/web_app/report/__init__.py | gopa1959/test | 3e224d0d86015b1e3e2da426e914aeb86c80d3c8 | [
"MIT"
] | null | null | null | from flask import Blueprint
report = Blueprint('report', __name__, url_prefix='/report')
from . import views | 22 | 60 | 0.763636 | 14 | 110 | 5.642857 | 0.642857 | 0.379747 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.127273 | 110 | 5 | 61 | 22 | 0.822917 | 0 | 0 | 0 | 0 | 0 | 0.117117 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0.666667 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 6 |
76ded4e9db2b1134c21f92c3b9969b7d38b469ec | 186 | py | Python | nursing_calculators.py | raustal/nursingcalculator | 3939f56172f2f830b04f491ada55775c98e3f0ab | [
"MIT"
] | null | null | null | nursing_calculators.py | raustal/nursingcalculator | 3939f56172f2f830b04f491ada55775c98e3f0ab | [
"MIT"
] | null | null | null | nursing_calculators.py | raustal/nursingcalculator | 3939f56172f2f830b04f491ada55775c98e3f0ab | [
"MIT"
] | null | null | null | def bmi(height, weight):
"""Returns the BMI of a client with the given values.
Formula used is: BMI = (weight * 703) / height ^2 """
return round(((weight * 703) / height**2), 1)
| 37.2 | 56 | 0.634409 | 29 | 186 | 4.068966 | 0.689655 | 0.152542 | 0.254237 | 0.271186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.061224 | 0.209677 | 186 | 4 | 57 | 46.5 | 0.741497 | 0.537634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 6 |
0a0721fba7612a7f63ea35f460a7529cbf7ac91b | 27 | py | Python | slos/test/mocks/cinder/openstack/common/gettextutils.py | softlayer/softlayer-cinder-driver | 465c2a15b7692f9fa1171a212fe162a990267e62 | [
"MIT"
] | 2 | 2016-04-19T14:08:47.000Z | 2016-05-30T02:57:19.000Z | slos/test/mocks/cinder/openstack/common/gettextutils.py | softlayer/softlayer-cinder-driver | 465c2a15b7692f9fa1171a212fe162a990267e62 | [
"MIT"
] | 1 | 2015-02-23T09:32:25.000Z | 2015-02-23T09:32:25.000Z | slos/test/mocks/cinder/openstack/common/gettextutils.py | softlayer/softlayer-cinder-driver | 465c2a15b7692f9fa1171a212fe162a990267e62 | [
"MIT"
] | 1 | 2016-04-19T14:17:13.000Z | 2016-04-19T14:17:13.000Z | def _(arg):
return arg
| 9 | 14 | 0.592593 | 4 | 27 | 3.75 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.296296 | 27 | 2 | 15 | 13.5 | 0.789474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 0.5 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
0a276e32fb8f9120d40e772d5e7b37d48b32c38c | 35 | py | Python | src/config/__init__.py | ZhuYing-CSU/Heuristic-Algorithms-for-TSP | 5274558c586626e371489cac776c871fa991cf75 | [
"MIT"
] | 2 | 2021-12-17T05:45:40.000Z | 2021-12-20T16:26:38.000Z | src/config/__init__.py | ZhuYing-CSU/Heuristic-Algorithms-for-TSP | 5274558c586626e371489cac776c871fa991cf75 | [
"MIT"
] | 11 | 2021-12-17T05:01:57.000Z | 2021-12-22T13:58:59.000Z | src/config/__init__.py | ZhuYing-CSU/Heuristic-Algorithms-for-TSP | 5274558c586626e371489cac776c871fa991cf75 | [
"MIT"
] | null | null | null | from config.config import getConfig | 35 | 35 | 0.885714 | 5 | 35 | 6.2 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085714 | 35 | 1 | 35 | 35 | 0.96875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
0a489685a79be65110eb7e1e565c00b605352a30 | 175 | py | Python | API/utils/json_response.py | anadiamaq/BCN-air | 942f218ba0227150fd1f7ad94c57ea81e17a5a41 | [
"Apache-2.0"
] | null | null | null | API/utils/json_response.py | anadiamaq/BCN-air | 942f218ba0227150fd1f7ad94c57ea81e17a5a41 | [
"Apache-2.0"
] | 1 | 2021-08-20T17:56:20.000Z | 2021-08-20T17:56:20.000Z | API/utils/json_response.py | anadiamaq/BCN-air | 942f218ba0227150fd1f7ad94c57ea81e17a5a41 | [
"Apache-2.0"
] | null | null | null | from flask import Response
from bson.json_util import dumps
def json_response(data, status=200):
return Response(dumps(data), status, mimetype="application/json")
| 25 | 70 | 0.754286 | 24 | 175 | 5.416667 | 0.625 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02027 | 0.154286 | 175 | 6 | 71 | 29.166667 | 0.858108 | 0 | 0 | 0 | 0 | 0 | 0.094675 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.5 | 0.25 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 6 |
0a4f54f55974afc48b5428f7d85b6b4571800e1c | 69 | py | Python | django/common/normalizers/__init__.py | arkhn/fhir-river | a12179c34fad131d16dedc20c61297ed83d805e6 | [
"Apache-2.0"
] | 42 | 2020-03-25T16:47:30.000Z | 2022-01-31T21:26:38.000Z | django/common/normalizers/__init__.py | arkhn/fhir-river | a12179c34fad131d16dedc20c61297ed83d805e6 | [
"Apache-2.0"
] | 367 | 2020-04-08T12:46:34.000Z | 2022-02-16T01:15:32.000Z | django/common/normalizers/__init__.py | arkhn/fhir-river | a12179c34fad131d16dedc20c61297ed83d805e6 | [
"Apache-2.0"
] | 3 | 2020-05-14T08:24:46.000Z | 2021-08-04T05:00:16.000Z | from .normalizers import normalize_to_bool, normalize_to_str # noqa
| 34.5 | 68 | 0.84058 | 10 | 69 | 5.4 | 0.8 | 0.407407 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115942 | 69 | 1 | 69 | 69 | 0.885246 | 0.057971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
0a63c587c3c4c9c817f534830224c0b646283a32 | 17,262 | py | Python | sympy/physics/quantum/pauli.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 603 | 2020-12-23T13:49:32.000Z | 2022-03-31T23:38:03.000Z | sympy/physics/quantum/pauli.py | curzel-it/KiPyCalc | 909c783d5e6967ea58ca93f875106d8a8e3ca5db | [
"MIT"
] | 387 | 2020-12-15T14:54:04.000Z | 2022-03-31T07:00:21.000Z | sympy/physics/quantum/pauli.py | curzel-it/KiPyCalc | 909c783d5e6967ea58ca93f875106d8a8e3ca5db | [
"MIT"
] | 35 | 2021-03-26T03:12:04.000Z | 2022-03-23T10:15:10.000Z | """Pauli operators and states"""
from sympy import I, Mul, Add, Pow, exp, Integer
from sympy.physics.quantum import Operator, Ket, Bra
from sympy.physics.quantum import ComplexSpace
from sympy.matrices import Matrix
from sympy.functions.special.tensor_functions import KroneckerDelta
__all__ = [
'SigmaX', 'SigmaY', 'SigmaZ', 'SigmaMinus', 'SigmaPlus', 'SigmaZKet',
'SigmaZBra', 'qsimplify_pauli'
]
class SigmaOpBase(Operator):
"""Pauli sigma operator, base class"""
@property
def name(self):
return self.args[0]
@property
def use_name(self):
return bool(self.args[0]) is not False
@classmethod
def default_args(self):
return (False,)
def __new__(cls, *args, **hints):
return Operator.__new__(cls, *args, **hints)
def _eval_commutator_BosonOp(self, other, **hints):
return Integer(0)
class SigmaX(SigmaOpBase):
"""Pauli sigma x operator
Parameters
==========
name : str
An optional string that labels the operator. Pauli operators with
different names commute.
Examples
========
>>> from sympy.physics.quantum import represent
>>> from sympy.physics.quantum.pauli import SigmaX
>>> sx = SigmaX()
>>> sx
SigmaX()
>>> represent(sx)
Matrix([
[0, 1],
[1, 0]])
"""
def __new__(cls, *args, **hints):
return SigmaOpBase.__new__(cls, *args, **hints)
def _eval_commutator_SigmaY(self, other, **hints):
if self.name != other.name:
return Integer(0)
else:
return 2 * I * SigmaZ(self.name)
def _eval_commutator_SigmaZ(self, other, **hints):
if self.name != other.name:
return Integer(0)
else:
return - 2 * I * SigmaY(self.name)
def _eval_commutator_BosonOp(self, other, **hints):
return Integer(0)
def _eval_anticommutator_SigmaY(self, other, **hints):
return Integer(0)
def _eval_anticommutator_SigmaZ(self, other, **hints):
return Integer(0)
def _eval_adjoint(self):
return self
def _print_contents_latex(self, printer, *args):
if self.use_name:
return r'{\sigma_x^{(%s)}}' % str(self.name)
else:
return r'{\sigma_x}'
def _print_contents(self, printer, *args):
return 'SigmaX()'
def _eval_power(self, e):
if e.is_Integer and e.is_positive:
return SigmaX(self.name).__pow__(int(e) % 2)
def _represent_default_basis(self, **options):
format = options.get('format', 'sympy')
if format == 'sympy':
return Matrix([[0, 1], [1, 0]])
else:
raise NotImplementedError('Representation in format ' +
format + ' not implemented.')
class SigmaY(SigmaOpBase):
"""Pauli sigma y operator
Parameters
==========
name : str
An optional string that labels the operator. Pauli operators with
different names commute.
Examples
========
>>> from sympy.physics.quantum import represent
>>> from sympy.physics.quantum.pauli import SigmaY
>>> sy = SigmaY()
>>> sy
SigmaY()
>>> represent(sy)
Matrix([
[0, -I],
[I, 0]])
"""
def __new__(cls, *args, **hints):
return SigmaOpBase.__new__(cls, *args)
def _eval_commutator_SigmaZ(self, other, **hints):
if self.name != other.name:
return Integer(0)
else:
return 2 * I * SigmaX(self.name)
def _eval_commutator_SigmaX(self, other, **hints):
if self.name != other.name:
return Integer(0)
else:
return - 2 * I * SigmaZ(self.name)
def _eval_anticommutator_SigmaX(self, other, **hints):
return Integer(0)
def _eval_anticommutator_SigmaZ(self, other, **hints):
return Integer(0)
def _eval_adjoint(self):
return self
def _print_contents_latex(self, printer, *args):
if self.use_name:
return r'{\sigma_y^{(%s)}}' % str(self.name)
else:
return r'{\sigma_y}'
def _print_contents(self, printer, *args):
return 'SigmaY()'
def _eval_power(self, e):
if e.is_Integer and e.is_positive:
return SigmaY(self.name).__pow__(int(e) % 2)
def _represent_default_basis(self, **options):
format = options.get('format', 'sympy')
if format == 'sympy':
return Matrix([[0, -I], [I, 0]])
else:
raise NotImplementedError('Representation in format ' +
format + ' not implemented.')
class SigmaZ(SigmaOpBase):
"""Pauli sigma z operator
Parameters
==========
name : str
An optional string that labels the operator. Pauli operators with
different names commute.
Examples
========
>>> from sympy.physics.quantum import represent
>>> from sympy.physics.quantum.pauli import SigmaZ
>>> sz = SigmaZ()
>>> sz ** 3
SigmaZ()
>>> represent(sz)
Matrix([
[1, 0],
[0, -1]])
"""
def __new__(cls, *args, **hints):
return SigmaOpBase.__new__(cls, *args)
def _eval_commutator_SigmaX(self, other, **hints):
if self.name != other.name:
return Integer(0)
else:
return 2 * I * SigmaY(self.name)
def _eval_commutator_SigmaY(self, other, **hints):
if self.name != other.name:
return Integer(0)
else:
return - 2 * I * SigmaX(self.name)
def _eval_anticommutator_SigmaX(self, other, **hints):
return Integer(0)
def _eval_anticommutator_SigmaY(self, other, **hints):
return Integer(0)
def _eval_adjoint(self):
return self
def _print_contents_latex(self, printer, *args):
if self.use_name:
return r'{\sigma_z^{(%s)}}' % str(self.name)
else:
return r'{\sigma_z}'
def _print_contents(self, printer, *args):
return 'SigmaZ()'
def _eval_power(self, e):
if e.is_Integer and e.is_positive:
return SigmaZ(self.name).__pow__(int(e) % 2)
def _represent_default_basis(self, **options):
format = options.get('format', 'sympy')
if format == 'sympy':
return Matrix([[1, 0], [0, -1]])
else:
raise NotImplementedError('Representation in format ' +
format + ' not implemented.')
class SigmaMinus(SigmaOpBase):
"""Pauli sigma minus operator
Parameters
==========
name : str
An optional string that labels the operator. Pauli operators with
different names commute.
Examples
========
>>> from sympy.physics.quantum import represent, Dagger
>>> from sympy.physics.quantum.pauli import SigmaMinus
>>> sm = SigmaMinus()
>>> sm
SigmaMinus()
>>> Dagger(sm)
SigmaPlus()
>>> represent(sm)
Matrix([
[0, 0],
[1, 0]])
"""
def __new__(cls, *args, **hints):
return SigmaOpBase.__new__(cls, *args)
def _eval_commutator_SigmaX(self, other, **hints):
if self.name != other.name:
return Integer(0)
else:
return -SigmaZ(self.name)
def _eval_commutator_SigmaY(self, other, **hints):
if self.name != other.name:
return Integer(0)
else:
return I * SigmaZ(self.name)
def _eval_commutator_SigmaZ(self, other, **hints):
return 2 * self
def _eval_commutator_SigmaMinus(self, other, **hints):
return SigmaZ(self.name)
def _eval_anticommutator_SigmaZ(self, other, **hints):
return Integer(0)
def _eval_anticommutator_SigmaX(self, other, **hints):
return Integer(1)
def _eval_anticommutator_SigmaY(self, other, **hints):
return - I * Integer(1)
def _eval_anticommutator_SigmaPlus(self, other, **hints):
return Integer(1)
def _eval_adjoint(self):
return SigmaPlus(self.name)
def _eval_power(self, e):
if e.is_Integer and e.is_positive:
return Integer(0)
def _print_contents_latex(self, printer, *args):
if self.use_name:
return r'{\sigma_-^{(%s)}}' % str(self.name)
else:
return r'{\sigma_-}'
def _print_contents(self, printer, *args):
return 'SigmaMinus()'
def _represent_default_basis(self, **options):
format = options.get('format', 'sympy')
if format == 'sympy':
return Matrix([[0, 0], [1, 0]])
else:
raise NotImplementedError('Representation in format ' +
format + ' not implemented.')
class SigmaPlus(SigmaOpBase):
"""Pauli sigma plus operator
Parameters
==========
name : str
An optional string that labels the operator. Pauli operators with
different names commute.
Examples
========
>>> from sympy.physics.quantum import represent, Dagger
>>> from sympy.physics.quantum.pauli import SigmaPlus
>>> sp = SigmaPlus()
>>> sp
SigmaPlus()
>>> Dagger(sp)
SigmaMinus()
>>> represent(sp)
Matrix([
[0, 1],
[0, 0]])
"""
def __new__(cls, *args, **hints):
return SigmaOpBase.__new__(cls, *args)
def _eval_commutator_SigmaX(self, other, **hints):
if self.name != other.name:
return Integer(0)
else:
return SigmaZ(self.name)
def _eval_commutator_SigmaY(self, other, **hints):
if self.name != other.name:
return Integer(0)
else:
return I * SigmaZ(self.name)
def _eval_commutator_SigmaZ(self, other, **hints):
if self.name != other.name:
return Integer(0)
else:
return -2 * self
def _eval_commutator_SigmaMinus(self, other, **hints):
return SigmaZ(self.name)
def _eval_anticommutator_SigmaZ(self, other, **hints):
return Integer(0)
def _eval_anticommutator_SigmaX(self, other, **hints):
return Integer(1)
def _eval_anticommutator_SigmaY(self, other, **hints):
return I * Integer(1)
def _eval_anticommutator_SigmaMinus(self, other, **hints):
return Integer(1)
def _eval_adjoint(self):
return SigmaMinus(self.name)
def _eval_mul(self, other):
return self * other
def _eval_power(self, e):
if e.is_Integer and e.is_positive:
return Integer(0)
def _print_contents_latex(self, printer, *args):
if self.use_name:
return r'{\sigma_+^{(%s)}}' % str(self.name)
else:
return r'{\sigma_+}'
def _print_contents(self, printer, *args):
return 'SigmaPlus()'
def _represent_default_basis(self, **options):
format = options.get('format', 'sympy')
if format == 'sympy':
return Matrix([[0, 1], [0, 0]])
else:
raise NotImplementedError('Representation in format ' +
format + ' not implemented.')
class SigmaZKet(Ket):
"""Ket for a two-level system quantum system.
Parameters
==========
n : Number
The state number (0 or 1).
"""
def __new__(cls, n):
if n not in [0, 1]:
raise ValueError("n must be 0 or 1")
return Ket.__new__(cls, n)
@property
def n(self):
return self.label[0]
@classmethod
def dual_class(self):
return SigmaZBra
@classmethod
def _eval_hilbert_space(cls, label):
return ComplexSpace(2)
def _eval_innerproduct_SigmaZBra(self, bra, **hints):
return KroneckerDelta(self.n, bra.n)
def _apply_operator_SigmaZ(self, op, **options):
if self.n == 0:
return self
else:
return Integer(-1) * self
def _apply_operator_SigmaX(self, op, **options):
return SigmaZKet(1) if self.n == 0 else SigmaZKet(0)
def _apply_operator_SigmaY(self, op, **options):
return I * SigmaZKet(1) if self.n == 0 else (-I) * SigmaZKet(0)
def _apply_operator_SigmaMinus(self, op, **options):
if self.n == 0:
return SigmaZKet(1)
else:
return Integer(0)
def _apply_operator_SigmaPlus(self, op, **options):
if self.n == 0:
return Integer(0)
else:
return SigmaZKet(0)
def _represent_default_basis(self, **options):
format = options.get('format', 'sympy')
if format == 'sympy':
return Matrix([[1], [0]]) if self.n == 0 else Matrix([[0], [1]])
else:
raise NotImplementedError('Representation in format ' +
format + ' not implemented.')
class SigmaZBra(Bra):
"""Bra for a two-level quantum system.
Parameters
==========
n : Number
The state number (0 or 1).
"""
def __new__(cls, n):
if n not in [0, 1]:
raise ValueError("n must be 0 or 1")
return Bra.__new__(cls, n)
@property
def n(self):
return self.label[0]
@classmethod
def dual_class(self):
return SigmaZKet
def _qsimplify_pauli_product(a, b):
"""
Internal helper function for simplifying products of Pauli operators.
"""
if not (isinstance(a, SigmaOpBase) and isinstance(b, SigmaOpBase)):
return Mul(a, b)
if a.name != b.name:
# Pauli matrices with different labels commute; sort by name
if a.name < b.name:
return Mul(a, b)
else:
return Mul(b, a)
elif isinstance(a, SigmaX):
if isinstance(b, SigmaX):
return Integer(1)
if isinstance(b, SigmaY):
return I * SigmaZ(a.name)
if isinstance(b, SigmaZ):
return - I * SigmaY(a.name)
if isinstance(b, SigmaMinus):
return (Integer(1)/2 + SigmaZ(a.name)/2)
if isinstance(b, SigmaPlus):
return (Integer(1)/2 - SigmaZ(a.name)/2)
elif isinstance(a, SigmaY):
if isinstance(b, SigmaX):
return - I * SigmaZ(a.name)
if isinstance(b, SigmaY):
return Integer(1)
if isinstance(b, SigmaZ):
return I * SigmaX(a.name)
if isinstance(b, SigmaMinus):
return -I * (Integer(1) + SigmaZ(a.name))/2
if isinstance(b, SigmaPlus):
return I * (Integer(1) - SigmaZ(a.name))/2
elif isinstance(a, SigmaZ):
if isinstance(b, SigmaX):
return I * SigmaY(a.name)
if isinstance(b, SigmaY):
return - I * SigmaX(a.name)
if isinstance(b, SigmaZ):
return Integer(1)
if isinstance(b, SigmaMinus):
return - SigmaMinus(a.name)
if isinstance(b, SigmaPlus):
return SigmaPlus(a.name)
elif isinstance(a, SigmaMinus):
if isinstance(b, SigmaX):
return (Integer(1) - SigmaZ(a.name))/2
if isinstance(b, SigmaY):
return - I * (Integer(1) - SigmaZ(a.name))/2
if isinstance(b, SigmaZ):
# (SigmaX(a.name) - I * SigmaY(a.name))/2
return SigmaMinus(b.name)
if isinstance(b, SigmaMinus):
return Integer(0)
if isinstance(b, SigmaPlus):
return Integer(1)/2 - SigmaZ(a.name)/2
elif isinstance(a, SigmaPlus):
if isinstance(b, SigmaX):
return (Integer(1) + SigmaZ(a.name))/2
if isinstance(b, SigmaY):
return I * (Integer(1) + SigmaZ(a.name))/2
if isinstance(b, SigmaZ):
#-(SigmaX(a.name) + I * SigmaY(a.name))/2
return -SigmaPlus(a.name)
if isinstance(b, SigmaMinus):
return (Integer(1) + SigmaZ(a.name))/2
if isinstance(b, SigmaPlus):
return Integer(0)
else:
return a * b
def qsimplify_pauli(e):
"""
Simplify an expression that includes products of pauli operators.
Parameters
==========
e : expression
An expression that contains products of Pauli operators that is
to be simplified.
Examples
========
>>> from sympy.physics.quantum.pauli import SigmaX, SigmaY
>>> from sympy.physics.quantum.pauli import qsimplify_pauli
>>> sx, sy = SigmaX(), SigmaY()
>>> sx * sy
SigmaX()*SigmaY()
>>> qsimplify_pauli(sx * sy)
I*SigmaZ()
"""
if isinstance(e, Operator):
return e
if isinstance(e, (Add, Pow, exp)):
t = type(e)
return t(*(qsimplify_pauli(arg) for arg in e.args))
if isinstance(e, Mul):
c, nc = e.args_cnc()
nc_s = []
while nc:
curr = nc.pop(0)
while (len(nc) and
isinstance(curr, SigmaOpBase) and
isinstance(nc[0], SigmaOpBase) and
curr.name == nc[0].name):
x = nc.pop(0)
y = _qsimplify_pauli_product(curr, x)
c1, nc1 = y.args_cnc()
curr = Mul(*nc1)
c = c + c1
nc_s.append(curr)
return Mul(*c) * Mul(*nc_s)
return e
| 25.725782 | 76 | 0.564824 | 2,012 | 17,262 | 4.695825 | 0.079523 | 0.031859 | 0.044454 | 0.04022 | 0.762278 | 0.731583 | 0.714331 | 0.676757 | 0.639183 | 0.631774 | 0 | 0.012676 | 0.309929 | 17,262 | 670 | 77 | 25.764179 | 0.780473 | 0.161858 | 0 | 0.634877 | 0 | 0 | 0.045373 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.220708 | false | 0 | 0.013624 | 0.128065 | 0.613079 | 0.027248 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
6a8497a5c91dfb7033f9c7049f05f843927ae15f | 33 | py | Python | twitch/__init__.py | Agnew0/Python-TwitchAPI | 007857851d5a83f05f5ff5cb9b36beb6c8ea3445 | [
"MIT"
] | 2 | 2020-05-18T08:53:50.000Z | 2020-07-30T14:27:10.000Z | twitch/__init__.py | Agnew0/Python-TwitchAPI | 007857851d5a83f05f5ff5cb9b36beb6c8ea3445 | [
"MIT"
] | 3 | 2020-05-14T19:42:26.000Z | 2020-10-17T11:49:08.000Z | twitch/__init__.py | Agnew0/Python-TwitchAPI | 007857851d5a83f05f5ff5cb9b36beb6c8ea3445 | [
"MIT"
] | 1 | 2020-09-15T14:50:09.000Z | 2020-09-15T14:50:09.000Z | from twitch.twitch import Twitch
| 16.5 | 32 | 0.848485 | 5 | 33 | 5.6 | 0.6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121212 | 33 | 1 | 33 | 33 | 0.965517 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
6a98123005d1a82c7f66c2a94dbb5cce2f730e80 | 73 | py | Python | control_block_diagram/pdf_viewer/__init__.py | upb-lea/control-block-diagram | d1d8377d6ff8a60900580b654c975cc06ff2e564 | [
"MIT"
] | 4 | 2022-01-14T07:42:59.000Z | 2022-01-24T15:05:59.000Z | control_block_diagram/pdf_viewer/__init__.py | upb-lea/control-block-diagram | d1d8377d6ff8a60900580b654c975cc06ff2e564 | [
"MIT"
] | null | null | null | control_block_diagram/pdf_viewer/__init__.py | upb-lea/control-block-diagram | d1d8377d6ff8a60900580b654c975cc06ff2e564 | [
"MIT"
] | null | null | null | from .pdf_viewer import PDFViewer
from .pdf_viewer_nb import PDFViewerNB
| 24.333333 | 38 | 0.863014 | 11 | 73 | 5.454545 | 0.636364 | 0.233333 | 0.433333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.109589 | 73 | 2 | 39 | 36.5 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
6ab270825033a813f1d1a019f04a42a02287a58d | 326 | py | Python | tp/tp03/2-read-write/read-write.py | UPB-FILS/sde | 7c02249b6ff4aaf0efef23d35b0a842f44903015 | [
"Apache-2.0"
] | 5 | 2020-03-09T15:53:16.000Z | 2021-03-02T08:11:19.000Z | tp/tp03/2-read-write/read-write.py | UPB-FILS/sde | 7c02249b6ff4aaf0efef23d35b0a842f44903015 | [
"Apache-2.0"
] | 101 | 2019-02-17T15:32:03.000Z | 2020-05-20T17:43:54.000Z | tp/tp03/2-read-write/read-write.py | UPB-FILS/sde | 7c02249b6ff4aaf0efef23d35b0a842f44903015 | [
"Apache-2.0"
] | 2 | 2019-04-01T11:33:54.000Z | 2020-04-02T07:39:11.000Z | import os
# TODO 1 write your name in the name variable and display it on the screen using the write function
# os.write (...)
#TODO 2 read your name from the keyboard using the read function and write it to the screen using the write function
#TODO 3 write your name in a file using the printf function (redirect, dup2)
| 32.6 | 116 | 0.757669 | 59 | 326 | 4.186441 | 0.474576 | 0.129555 | 0.105263 | 0.121457 | 0.242915 | 0.242915 | 0 | 0 | 0 | 0 | 0 | 0.015385 | 0.202454 | 326 | 9 | 117 | 36.222222 | 0.934615 | 0.92638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
6ac0940a85ad8b1b17846f870f220213d1c790c8 | 2,444 | py | Python | configs/r3_cnn/r3_cnn-exp_4-row_6.py | IMPLabUniPr/mmdetection-groie | 21b85c119c29a6e255caf0ff21baabe7d64aa9c5 | [
"Apache-2.0"
] | 9 | 2020-04-29T02:00:19.000Z | 2020-06-02T23:27:08.000Z | configs/r3_cnn/r3_cnn-exp_4-row_6.py | marcovalenti/mmdetection | 215ea4174c1234ac4c3e23bf29020fc1cefc36ad | [
"Apache-2.0"
] | null | null | null | configs/r3_cnn/r3_cnn-exp_4-row_6.py | marcovalenti/mmdetection | 215ea4174c1234ac4c3e23bf29020fc1cefc36ad | [
"Apache-2.0"
] | 1 | 2020-05-12T16:28:11.000Z | 2020-05-12T16:28:11.000Z | _base_ = './r3_cnn-exp_1-row_5.py'
model = dict(
roi_head=dict(
num_stages=4,
stages=(0, 0, 1, 1),
stage_loss_weights=[1, 0.75, 0.5, 0.4]),
train_cfg=dict(
rcnn=[
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.5,
neg_iou_thr=0.5,
min_pos_iou=0.5,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.6,
neg_iou_thr=0.6,
min_pos_iou=0.6,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.7,
min_pos_iou=0.7,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.8,
neg_iou_thr=0.8,
min_pos_iou=0.8,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False)
]
)
)
| 32.157895 | 48 | 0.376841 | 239 | 2,444 | 3.543933 | 0.221757 | 0.075561 | 0.066116 | 0.094451 | 0.774498 | 0.774498 | 0.774498 | 0.774498 | 0.774498 | 0.72255 | 0 | 0.073749 | 0.533961 | 2,444 | 75 | 49 | 32.586667 | 0.669886 | 0 | 0 | 0.68 | 0 | 0 | 0.053601 | 0.009411 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
6ac7004e9d49e6122425170c97027b242029305c | 39 | py | Python | robosuite/renderers/__init__.py | s-tian/robosuite | 56c20db6231e03ec5910869f7227819943fc24b2 | [
"MIT"
] | 4 | 2022-01-24T07:18:21.000Z | 2022-01-25T02:29:17.000Z | robosuite/renderers/__init__.py | s-tian/robosuite | 56c20db6231e03ec5910869f7227819943fc24b2 | [
"MIT"
] | 1 | 2022-01-24T09:06:45.000Z | 2022-01-24T09:06:45.000Z | robosuite/renderers/__init__.py | s-tian/robosuite | 56c20db6231e03ec5910869f7227819943fc24b2 | [
"MIT"
] | null | null | null | from .base import load_renderer_config
| 19.5 | 38 | 0.871795 | 6 | 39 | 5.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.102564 | 39 | 1 | 39 | 39 | 0.914286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
0a772d31349cc05d26081d3ee414855e80d4a6bc | 16,506 | py | Python | api_tests/comments/views/test_comment_report_list.py | alexschiller/osf.io | 4122d4be152c6189142c2ebb19cfdee09c77035d | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | api_tests/comments/views/test_comment_report_list.py | alexschiller/osf.io | 4122d4be152c6189142c2ebb19cfdee09c77035d | [
"Apache-2.0"
] | 4 | 2016-05-13T14:24:16.000Z | 2017-03-30T15:28:31.000Z | api_tests/comments/views/test_comment_report_list.py | alexschiller/osf.io | 4122d4be152c6189142c2ebb19cfdee09c77035d | [
"Apache-2.0"
] | null | null | null | import mock
import pytest
from django.utils import timezone
from nose.tools import * # flake8: noqa
from datetime import datetime
from framework.guid.model import Guid
from api.base.settings.defaults import API_BASE
from api_tests import utils as test_utils
from tests.base import ApiTestCase
from osf_tests.factories import ProjectFactory, AuthUserFactory, CommentFactory
from addons.wiki.tests.factories import NodeWikiFactory
class CommentReportsMixin(object):
def setUp(self):
super(CommentReportsMixin, self).setUp()
self.user = AuthUserFactory()
self.contributor = AuthUserFactory()
self.non_contributor = AuthUserFactory()
self.payload = {
'data': {
'type': 'comment_reports',
'attributes': {
'category': 'spam',
'message': 'delicious spam'
}
}
}
def _set_up_private_project_comment_reports(self):
raise NotImplementedError
def _set_up_public_project_comment_reports(self, comment_level='public'):
raise NotImplementedError
def test_private_node_logged_out_user_cannot_view_reports(self):
self._set_up_private_project_comment_reports()
res = self.app.get(self.private_url, expect_errors=True)
assert_equal(res.status_code, 401)
def test_private_node_logged_in_non_contributor_cannot_view_reports(self):
self._set_up_private_project_comment_reports()
res = self.app.get(self.private_url, auth=self.non_contributor.auth, expect_errors=True)
assert_equal(res.status_code, 403)
def test_private_node_only_reporting_user_can_view_reports(self):
self._set_up_private_project_comment_reports()
res = self.app.get(self.private_url, auth=self.user.auth)
assert_equal(res.status_code, 200)
report_json = res.json['data']
report_ids = [report['id'] for report in report_json]
assert_equal(len(report_json), 1)
assert_in(self.user._id, report_ids)
def test_private_node_reported_user_does_not_see_report(self):
self._set_up_private_project_comment_reports()
res = self.app.get(self.private_url, auth=self.contributor.auth)
assert_equal(res.status_code, 200)
report_json = res.json['data']
report_ids = [report['id'] for report in report_json]
assert_equal(len(report_json), 0)
assert_not_in(self.contributor._id, report_ids)
def test_public_node_only_reporting_contributor_can_view_report(self):
self._set_up_public_project_comment_reports()
res = self.app.get(self.public_url, auth=self.user.auth)
assert_equal(res.status_code, 200)
report_json = res.json['data']
report_ids = [report['id'] for report in report_json]
assert_equal(len(report_json), 1)
assert_in(self.user._id, report_ids)
def test_public_node_reported_user_does_not_see_report(self):
self._set_up_public_project_comment_reports()
res = self.app.get(self.public_url, auth=self.contributor.auth)
assert_equal(res.status_code, 200)
report_json = res.json['data']
report_ids = [report['id'] for report in report_json]
assert_equal(len(report_json), 0)
assert_not_in(self.contributor._id, report_ids)
def test_public_node_non_contributor_does_not_see_other_user_reports(self):
self._set_up_public_project_comment_reports()
res = self.app.get(self.public_url, auth=self.non_contributor.auth, expect_errors=True)
assert_equal(res.status_code, 200)
report_json = res.json['data']
report_ids = [report['id'] for report in report_json]
assert_equal(len(report_json), 0)
assert_not_in(self.non_contributor._id, report_ids)
def test_public_node_non_contributor_reporter_can_view_own_report(self):
self._set_up_public_project_comment_reports()
self.public_comment.reports[self.non_contributor._id] = {
'category': 'spam',
'text': 'This is spam',
'date': timezone.now(),
'retracted': False,
}
self.public_comment.save()
res = self.app.get(self.public_url, auth=self.non_contributor.auth)
assert_equal(res.status_code, 200)
report_json = res.json['data']
report_ids = [report['id'] for report in report_json]
assert_equal(len(report_json), 1)
assert_in(self.non_contributor._id, report_ids)
def test_public_node_logged_out_user_cannot_view_reports(self):
self._set_up_public_project_comment_reports()
res = self.app.get(self.public_url, expect_errors=True)
assert_equal(res.status_code, 401)
def test_public_node_private_comment_level_non_contributor_cannot_see_reports(self):
self._set_up_public_project_comment_reports(comment_level='private')
res = self.app.get(self.public_url, auth=self.non_contributor.auth, expect_errors=True)
assert_equal(res.status_code, 403)
assert_equal(res.json['errors'][0]['detail'], 'You do not have permission to perform this action.')
def test_report_comment_invalid_type(self):
self._set_up_private_project_comment_reports()
payload = {
'data': {
'type': 'Not a valid type.',
'attributes': {
'category': 'spam',
'message': 'delicious spam'
}
}
}
res = self.app.post_json_api(self.private_url, payload, auth=self.user.auth, expect_errors=True)
assert_equal(res.status_code, 409)
def test_report_comment_no_type(self):
self._set_up_private_project_comment_reports()
payload = {
'data': {
'type': '',
'attributes': {
'category': 'spam',
'message': 'delicious spam'
}
}
}
res = self.app.post_json_api(self.private_url, payload, auth=self.user.auth, expect_errors=True)
assert_equal(res.status_code, 400)
assert_equal(res.json['errors'][0]['detail'], 'This field may not be blank.')
assert_equal(res.json['errors'][0]['source']['pointer'], '/data/type')
def test_report_comment_invalid_spam_category(self):
self._set_up_private_project_comment_reports()
category = 'Not a valid category'
payload = {
'data': {
'type': 'comment_reports',
'attributes': {
'category': category,
'message': 'delicious spam'
}
}
}
res = self.app.post_json_api(self.private_url, payload, auth=self.user.auth, expect_errors=True)
assert_equal(res.status_code, 400)
assert_equal(res.json['errors'][0]['detail'], '\"' + category + '\"' + ' is not a valid choice.')
def test_report_comment_allow_blank_message(self):
self._set_up_private_project_comment_reports()
comment = CommentFactory(node=self.private_project, user=self.contributor, target=self.comment.target)
url = '/{}comments/{}/reports/'.format(API_BASE, comment._id)
payload = {
'data': {
'type': 'comment_reports',
'attributes': {
'category': 'spam',
'message': ''
}
}
}
res = self.app.post_json_api(url, payload, auth=self.user.auth)
assert_equal(res.status_code, 201)
assert_equal(res.json['data']['id'], self.user._id)
assert_equal(res.json['data']['attributes']['message'], payload['data']['attributes']['message'])
def test_private_node_logged_out_user_cannot_report_comment(self):
self._set_up_private_project_comment_reports()
res = self.app.post_json_api(self.private_url, self.payload, expect_errors=True)
assert_equal(res.status_code, 401)
def test_private_node_logged_in_non_contributor_cannot_report_comment(self):
self._set_up_private_project_comment_reports()
res = self.app.post_json_api(self.private_url, self.payload, auth=self.non_contributor.auth, expect_errors=True)
assert_equal(res.status_code, 403)
def test_private_node_logged_in_contributor_can_report_comment(self):
self._set_up_private_project_comment_reports()
comment = CommentFactory(node=self.private_project, user=self.contributor, target=self.comment.target)
url = '/{}comments/{}/reports/'.format(API_BASE, comment._id)
res = self.app.post_json_api(url, self.payload, auth=self.user.auth)
assert_equal(res.status_code, 201)
assert_equal(res.json['data']['id'], self.user._id)
def test_user_cannot_report_own_comment(self):
self._set_up_private_project_comment_reports()
res = self.app.post_json_api(self.private_url, self.payload, auth=self.contributor.auth, expect_errors=True)
assert_equal(res.status_code, 400)
assert_equal(res.json['errors'][0]['detail'], 'You cannot report your own comment.')
def test_user_cannot_report_comment_twice(self):
self._set_up_private_project_comment_reports()
# User cannot report the comment again
res = self.app.post_json_api(self.private_url, self.payload, auth=self.user.auth, expect_errors=True)
assert_equal(res.status_code, 400)
assert_equal(res.json['errors'][0]['detail'], 'Comment already reported.')
def test_public_node_logged_out_user_cannot_report_comment(self):
self._set_up_public_project_comment_reports()
res = self.app.post_json_api(self.public_url, self.payload, expect_errors=True)
assert_equal(res.status_code, 401)
def test_public_node_contributor_can_report_comment(self):
self._set_up_public_project_comment_reports()
comment = CommentFactory(node=self.public_project, user=self.contributor, target=self.public_comment.target)
url = '/{}comments/{}/reports/'.format(API_BASE, comment._id)
res = self.app.post_json_api(url, self.payload, auth=self.user.auth)
assert_equal(res.status_code, 201)
assert_equal(res.json['data']['id'], self.user._id)
def test_public_node_non_contributor_can_report_comment(self):
""" Test that when a public project allows any osf user to
comment (comment_level == 'public), non-contributors
can also report comments.
"""
self._set_up_public_project_comment_reports()
res = self.app.post_json_api(self.public_url, self.payload, auth=self.non_contributor.auth)
assert_equal(res.status_code, 201)
assert_equal(res.json['data']['id'], self.non_contributor._id)
def test_public_node_private_comment_level_non_contributor_cannot_report_comment(self):
self._set_up_public_project_comment_reports(comment_level='private')
res = self.app.get(self.public_url, auth=self.non_contributor.auth, expect_errors=True)
assert_equal(res.status_code, 403)
assert_equal(res.json['errors'][0]['detail'], 'You do not have permission to perform this action.')
class TestCommentReportsView(CommentReportsMixin, ApiTestCase):
def _set_up_private_project_comment_reports(self):
self.private_project = ProjectFactory.create(is_public=False, creator=self.user)
self.private_project.add_contributor(contributor=self.contributor, save=True)
self.comment = CommentFactory.build(node=self.private_project, user=self.contributor)
self.comment.reports = self.comment.reports or {}
self.comment.reports[self.user._id] = {
'category': 'spam',
'text': 'This is spam',
'date': timezone.now(),
'retracted': False,
}
self.comment.save()
self.private_url = '/{}comments/{}/reports/'.format(API_BASE, self.comment._id)
def _set_up_public_project_comment_reports(self, comment_level='public'):
self.public_project = ProjectFactory.create(is_public=True, creator=self.user, comment_level=comment_level)
self.public_project.add_contributor(contributor=self.contributor, save=True)
self.public_comment = CommentFactory.build(node=self.public_project, user=self.contributor)
self.public_comment.reports = self.public_comment.reports or {}
self.public_comment.reports[self.user._id] = {
'category': 'spam',
'text': 'This is spam',
'date': timezone.now(),
'retracted': False,
}
self.public_comment.save()
self.public_url = '/{}comments/{}/reports/'.format(API_BASE, self.public_comment._id)
class TestWikiCommentReportsView(CommentReportsMixin, ApiTestCase):
def _set_up_private_project_comment_reports(self):
self.private_project = ProjectFactory.create(is_public=False, creator=self.user)
self.private_project.add_contributor(contributor=self.contributor, save=True)
with mock.patch('osf.models.AbstractNode.update_search'):
self.wiki = NodeWikiFactory(node=self.private_project, user=self.user)
self.comment = CommentFactory.build(node=self.private_project, target=Guid.load(self.wiki._id), user=self.contributor)
self.comment.reports = self.comment.reports or {}
self.comment.reports[self.user._id] = {
'category': 'spam',
'text': 'This is spam',
'date': timezone.now(),
'retracted': False,
}
self.comment.save()
self.private_url = '/{}comments/{}/reports/'.format(API_BASE, self.comment._id)
def _set_up_public_project_comment_reports(self, comment_level='public'):
self.public_project = ProjectFactory.create(is_public=True, creator=self.user, comment_level=comment_level)
self.public_project.add_contributor(contributor=self.contributor, save=True)
with mock.patch('osf.models.AbstractNode.update_search'):
self.public_wiki = NodeWikiFactory(node=self.public_project, user=self.user)
self.public_comment = CommentFactory.build(node=self.public_project, target=Guid.load(self.public_wiki._id), user=self.contributor)
self.public_comment.reports = self.public_comment.reports or {}
self.public_comment.reports[self.user._id] = {
'category': 'spam',
'text': 'This is spam',
'date': timezone.now(),
'retracted': False,
}
self.public_comment.save()
self.public_url = '/{}comments/{}/reports/'.format(API_BASE, self.public_comment._id)
class TestFileCommentReportsView(CommentReportsMixin, ApiTestCase):
def _set_up_private_project_comment_reports(self):
self.private_project = ProjectFactory.create(is_public=False, creator=self.user)
self.private_project.add_contributor(contributor=self.contributor, save=True)
self.file = test_utils.create_test_file(self.private_project, self.user)
self.comment = CommentFactory.build(node=self.private_project, target=self.file.get_guid(), user=self.contributor)
self.comment.reports = self.comment.reports or {}
self.comment.reports[self.user._id] = {
'category': 'spam',
'text': 'This is spam',
'date': timezone.now(),
'retracted': False,
}
self.comment.save()
self.private_url = '/{}comments/{}/reports/'.format(API_BASE, self.comment._id)
def _set_up_public_project_comment_reports(self, comment_level='public'):
self.public_project = ProjectFactory.create(is_public=True, creator=self.user, comment_level=comment_level)
self.public_project.add_contributor(contributor=self.contributor, save=True)
self.public_file = test_utils.create_test_file(self.public_project, self.user)
self.public_comment = CommentFactory.build(node=self.public_project, target=self.public_file.get_guid(), user=self.contributor)
self.public_comment.reports = self.public_comment.reports or {}
self.public_comment.reports[self.user._id] = {
'category': 'spam',
'text': 'This is spam',
'date': timezone.now(),
'retracted': False,
}
self.public_comment.save()
self.public_url = '/{}comments/{}/reports/'.format(API_BASE, self.public_comment._id)
| 47.843478 | 139 | 0.677935 | 2,056 | 16,506 | 5.11965 | 0.077821 | 0.070492 | 0.046551 | 0.043701 | 0.876116 | 0.860441 | 0.844955 | 0.82415 | 0.801159 | 0.780638 | 0 | 0.006367 | 0.210287 | 16,506 | 344 | 140 | 47.982558 | 0.801151 | 0.011147 | 0 | 0.633898 | 0 | 0 | 0.082499 | 0.017262 | 0 | 0 | 0 | 0 | 0.159322 | 1 | 0.108475 | false | 0 | 0.037288 | 0 | 0.159322 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
0a8194b1d8db673770d33a4f4ec2590035ba635f | 12,079 | py | Python | test/test_md036.py | scop/pymarkdown | 562ba8f7857d99ba09e86e42de5a37ec6d9b2c30 | [
"MIT"
] | null | null | null | test/test_md036.py | scop/pymarkdown | 562ba8f7857d99ba09e86e42de5a37ec6d9b2c30 | [
"MIT"
] | null | null | null | test/test_md036.py | scop/pymarkdown | 562ba8f7857d99ba09e86e42de5a37ec6d9b2c30 | [
"MIT"
] | null | null | null | """
Module to provide tests related to the MD036 rule.
"""
import os
from test.markdown_scanner import MarkdownScanner
import pytest
from .utils import write_temporary_configuration
@pytest.mark.rules
def test_md036_proper_headings_atx():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that normal atx headings.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md036/proper_headings_atx.md",
]
expected_return_code = 0
expected_output = ""
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md036_proper_headings_setext():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that normal setext headings.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md036/proper_headings_setext.md",
]
expected_return_code = 0
expected_output = ""
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md036_proper_emphasis_with_link():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that has a single line wrapped in emphasis
that contains an inline link.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md036/proper_emphasis_with_link.md",
]
expected_return_code = 0
expected_output = ""
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md036_proper_emphasis_with_text_then_link():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that has a single line wrapped in emphasis
that contains text and then an inline link.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md036/proper_emphasis_with_text_then_link.md",
]
expected_return_code = 0
expected_output = ""
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md036_proper_emphasis_with_text_then_link_then_text():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that has a single line wrapped in emphasis
that contains text, an inline link, and then text again.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md036/proper_emphasis_with_text_then_link_then_text.md",
]
expected_return_code = 0
expected_output = ""
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md036_proper_emphasis_with_text_end_emphasis_more_text():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that has a single line wrapped with emphasis
that contains text, followed by more text.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md036/proper_emphasis_with_text_end_emphasis_more_text.md",
]
expected_return_code = 0
expected_output = ""
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md036_proper_emphasis_within_text():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that has a single line with emphasis within
the text.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md036/proper_emphasis_within_text.md",
]
expected_return_code = 0
expected_output = ""
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md036_proper_emphasis_within_multiline_text():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that has a single line with emphasis wrapped
around the multiline text.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md036/proper_emphasis_within_multiline_text.md",
]
expected_return_code = 0
expected_output = ""
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md036_proper_emphasis_ending_with_punctuation():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that has a single line with emphasis wrapped
around the text, the text ending with punctuation.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md036/proper_emphasis_ending_with_punctuation.md",
]
expected_return_code = 0
expected_output = ""
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md036_proper_emphasis_ending_with_punctuation_with_configuration():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that has a single line with emphasis wrapped
around the text, the text ending with punctuation, with configuration that makes
the punctuation okay.
"""
# Arrange
scanner = MarkdownScanner()
supplied_configuration = {"plugins": {"md036": {"punctuation": ".!"}}}
configuration_file = None
try:
configuration_file = write_temporary_configuration(supplied_configuration)
supplied_arguments = [
"-c",
configuration_file,
"scan",
"test/resources/rules/md036/proper_emphasis_ending_with_punctuation.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md036/proper_emphasis_ending_with_punctuation.md:1:1: "
+ "MD036: Emphasis possibly used instead of a heading element. (no-emphasis-as-heading,no-emphasis-as-header)\n"
+ "test/resources/rules/md036/proper_emphasis_ending_with_punctuation.md:5:1: "
+ "MD036: Emphasis possibly used instead of a heading element. (no-emphasis-as-heading,no-emphasis-as-header)\n"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
finally:
if configuration_file and os.path.exists(configuration_file):
os.remove(configuration_file)
@pytest.mark.rules
def test_md036_valid_emphasis_headings():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that has a single line with emphasis wrapped
around the text, valid golden case for recommending.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md036/valid_emphasis_headings.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md036/valid_emphasis_headings.md:1:1: "
+ "MD036: Emphasis possibly used instead of a heading element. (no-emphasis-as-heading,no-emphasis-as-header)\n"
+ "test/resources/rules/md036/valid_emphasis_headings.md:5:1: "
+ "MD036: Emphasis possibly used instead of a heading element. (no-emphasis-as-heading,no-emphasis-as-header)\n"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md036_valid_emphasis_headings_in_list():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that has a single line with emphasis wrapped
around the text, valid golden case for recommending.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md036/valid_emphasis_headings_in_list.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md036/valid_emphasis_headings_in_list.md:1:3: "
+ "MD036: Emphasis possibly used instead of a heading element. (no-emphasis-as-heading,no-emphasis-as-header)\n"
+ "test/resources/rules/md036/valid_emphasis_headings_in_list.md:5:3: "
+ "MD036: Emphasis possibly used instead of a heading element. (no-emphasis-as-heading,no-emphasis-as-header)\n"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md036_valid_emphasis_headings_in_block_quote():
"""
Test to make sure we get the expected behavior after scanning a good file from the
test/resources/rules/md036 directory that has a single line with emphasis wrapped
around the text, valid golden case for recommending.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md036/valid_emphasis_headings_in_block_quote.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md036/valid_emphasis_headings_in_block_quote.md:1:3: "
+ "MD036: Emphasis possibly used instead of a heading element. (no-emphasis-as-heading,no-emphasis-as-header)\n"
+ "test/resources/rules/md036/valid_emphasis_headings_in_block_quote.md:5:3: "
+ "MD036: Emphasis possibly used instead of a heading element. (no-emphasis-as-heading,no-emphasis-as-header)\n"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
| 29.972705 | 124 | 0.705522 | 1,478 | 12,079 | 5.524357 | 0.077131 | 0.054134 | 0.074954 | 0.095775 | 0.929455 | 0.925291 | 0.922596 | 0.921372 | 0.91537 | 0.904838 | 0 | 0.021115 | 0.215829 | 12,079 | 402 | 125 | 30.047264 | 0.840899 | 0.242156 | 0 | 0.651163 | 0 | 0.037209 | 0.262226 | 0.197889 | 0 | 0 | 0 | 0 | 0.060465 | 1 | 0.060465 | false | 0 | 0.018605 | 0 | 0.07907 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
7c2aec3e6fedc35a3dfe5772b75d1346bd00a64c | 27,007 | py | Python | awswrangler/s3/_read_text.py | lukaswerner/aws-data-wrangler | 10475967649ab6244315a769ef42a96ea1bd22cc | [
"Apache-2.0"
] | null | null | null | awswrangler/s3/_read_text.py | lukaswerner/aws-data-wrangler | 10475967649ab6244315a769ef42a96ea1bd22cc | [
"Apache-2.0"
] | null | null | null | awswrangler/s3/_read_text.py | lukaswerner/aws-data-wrangler | 10475967649ab6244315a769ef42a96ea1bd22cc | [
"Apache-2.0"
] | null | null | null | """Amazon S3 Read Module (PRIVATE)."""
import datetime
import logging
import pprint
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union
import boto3
import pandas as pd
import pandas.io.parsers
from pandas.io.common import infer_compression
from awswrangler import _utils, exceptions
from awswrangler.s3._fs import open_s3_object
from awswrangler.s3._list import _path2list
from awswrangler.s3._read import (
_apply_partition_filter,
_apply_partitions,
_get_path_ignore_suffix,
_get_path_root,
_read_dfs_from_multiple_paths,
_union,
)
_logger: logging.Logger = logging.getLogger(__name__)
def _get_read_details(path: str, pandas_kwargs: Dict[str, Any]) -> Tuple[str, Optional[str], Optional[str]]:
if pandas_kwargs.get("compression", "infer") == "infer":
pandas_kwargs["compression"] = infer_compression(path, compression="infer")
mode: str = "r" if pandas_kwargs.get("compression") is None else "rb"
encoding: Optional[str] = pandas_kwargs.get("encoding", None)
newline: Optional[str] = pandas_kwargs.get("lineterminator", None)
return mode, encoding, newline
def _read_text_chunked(
paths: List[str],
chunksize: int,
parser_func: Callable[..., pd.DataFrame],
path_root: Optional[str],
boto3_session: boto3.Session,
pandas_kwargs: Dict[str, Any],
s3_additional_kwargs: Optional[Dict[str, str]],
dataset: bool,
use_threads: bool,
version_ids: Optional[Dict[str, str]] = None,
) -> Iterator[pd.DataFrame]:
for path in paths:
_logger.debug("path: %s", path)
mode, encoding, newline = _get_read_details(path=path, pandas_kwargs=pandas_kwargs)
with open_s3_object(
path=path,
version_id=version_ids.get(path) if version_ids else None,
mode=mode,
s3_block_size=10_485_760, # 10 MB (10 * 2**20)
encoding=encoding,
use_threads=use_threads,
s3_additional_kwargs=s3_additional_kwargs,
newline=newline,
boto3_session=boto3_session,
) as f:
reader: pandas.io.parsers.TextFileReader = parser_func(f, chunksize=chunksize, **pandas_kwargs)
for df in reader:
yield _apply_partitions(df=df, dataset=dataset, path=path, path_root=path_root)
def _read_text_file(
path: str,
version_id: Optional[str],
parser_func: Callable[..., pd.DataFrame],
path_root: Optional[str],
boto3_session: Union[boto3.Session, _utils.Boto3PrimitivesType],
pandas_kwargs: Dict[str, Any],
s3_additional_kwargs: Optional[Dict[str, str]],
dataset: bool,
use_threads: bool,
) -> pd.DataFrame:
boto3_session = _utils.ensure_session(boto3_session)
mode, encoding, newline = _get_read_details(path=path, pandas_kwargs=pandas_kwargs)
with open_s3_object(
path=path,
version_id=version_id,
mode=mode,
use_threads=use_threads,
s3_block_size=-1, # One shot download
encoding=encoding,
s3_additional_kwargs=s3_additional_kwargs,
newline=newline,
boto3_session=boto3_session,
) as f:
df: pd.DataFrame = parser_func(f, **pandas_kwargs)
return _apply_partitions(df=df, dataset=dataset, path=path, path_root=path_root)
def _read_text(
parser_func: Callable[..., pd.DataFrame],
path: Union[str, List[str]],
path_suffix: Union[str, List[str], None],
path_ignore_suffix: Union[str, List[str], None],
ignore_empty: bool,
use_threads: Union[bool, int],
last_modified_begin: Optional[datetime.datetime],
last_modified_end: Optional[datetime.datetime],
boto3_session: Optional[boto3.Session],
s3_additional_kwargs: Optional[Dict[str, str]],
chunksize: Optional[int],
dataset: bool,
partition_filter: Optional[Callable[[Dict[str, str]], bool]],
ignore_index: bool,
version_id: Optional[Union[str, Dict[str, str]]] = None,
**pandas_kwargs: Any,
) -> Union[pd.DataFrame, Iterator[pd.DataFrame]]:
if "iterator" in pandas_kwargs:
raise exceptions.InvalidArgument("Please, use the chunksize argument instead of iterator.")
session: boto3.Session = _utils.ensure_session(session=boto3_session)
paths: List[str] = _path2list(
path=path,
boto3_session=session,
suffix=path_suffix,
ignore_suffix=_get_path_ignore_suffix(path_ignore_suffix=path_ignore_suffix),
ignore_empty=ignore_empty,
last_modified_begin=last_modified_begin,
last_modified_end=last_modified_end,
s3_additional_kwargs=s3_additional_kwargs,
)
path_root: Optional[str] = _get_path_root(path=path, dataset=dataset)
if path_root is not None:
paths = _apply_partition_filter(path_root=path_root, paths=paths, filter_func=partition_filter)
if len(paths) < 1:
raise exceptions.NoFilesFound(f"No files Found on: {path}.")
_logger.debug("paths:\n%s", paths)
args: Dict[str, Any] = {
"parser_func": parser_func,
"boto3_session": session,
"dataset": dataset,
"path_root": path_root,
"pandas_kwargs": pandas_kwargs,
"s3_additional_kwargs": s3_additional_kwargs,
"use_threads": use_threads,
}
_logger.debug("args:\n%s", pprint.pformat(args))
ret: Union[pd.DataFrame, Iterator[pd.DataFrame]]
if chunksize is not None:
ret = _read_text_chunked(
paths=paths, version_ids=version_id if isinstance(version_id, dict) else None, chunksize=chunksize, **args
)
elif len(paths) == 1:
ret = _read_text_file(
path=paths[0], version_id=version_id[paths[0]] if isinstance(version_id, dict) else version_id, **args
)
else:
ret = _union(
dfs=_read_dfs_from_multiple_paths(
read_func=_read_text_file,
paths=paths,
version_ids=version_id if isinstance(version_id, dict) else None,
use_threads=use_threads,
kwargs=args,
),
ignore_index=ignore_index,
)
return ret
def read_csv(
path: Union[str, List[str]],
path_suffix: Union[str, List[str], None] = None,
path_ignore_suffix: Union[str, List[str], None] = None,
version_id: Optional[Union[str, Dict[str, str]]] = None,
ignore_empty: bool = True,
use_threads: Union[bool, int] = True,
last_modified_begin: Optional[datetime.datetime] = None,
last_modified_end: Optional[datetime.datetime] = None,
boto3_session: Optional[boto3.Session] = None,
s3_additional_kwargs: Optional[Dict[str, Any]] = None,
chunksize: Optional[int] = None,
dataset: bool = False,
partition_filter: Optional[Callable[[Dict[str, str]], bool]] = None,
**pandas_kwargs: Any,
) -> Union[pd.DataFrame, Iterator[pd.DataFrame]]:
"""Read CSV file(s) from from a received S3 prefix or list of S3 objects paths.
This function accepts Unix shell-style wildcards in the path argument.
* (matches everything), ? (matches any single character),
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
you can use `glob.escape(path)` before passing the path to this function.
Note
----
For partial and gradual reading use the argument ``chunksize`` instead of ``iterator``.
Note
----
In case of `use_threads=True` the number of threads
that will be spawned will be gotten from os.cpu_count().
Note
----
The filter by last_modified begin last_modified end is applied after list all S3 files
Parameters
----------
path : Union[str, List[str]]
S3 prefix (accepts Unix shell-style wildcards)
(e.g. s3://bucket/prefix) or list of S3 objects paths (e.g. ``[s3://bucket/key0, s3://bucket/key1]``).
path_suffix: Union[str, List[str], None]
Suffix or List of suffixes to be read (e.g. [".csv"]).
If None, will try to read all files. (default)
path_ignore_suffix: Union[str, List[str], None]
Suffix or List of suffixes for S3 keys to be ignored.(e.g. ["_SUCCESS"]).
If None, will try to read all files. (default)
version_id: Optional[Union[str, Dict[str, str]]]
Version id of the object or mapping of object path to version id.
(e.g. {'s3://bucket/key0': '121212', 's3://bucket/key1': '343434'})
ignore_empty: bool
Ignore files with 0 bytes.
use_threads : Union[bool, int]
True to enable concurrent requests, False to disable multiple threads.
If enabled os.cpu_count() will be used as the max number of threads.
If given an int will use the given amount of threads.
last_modified_begin
Filter the s3 files by the Last modified date of the object.
The filter is applied only after list all s3 files.
last_modified_end: datetime, optional
Filter the s3 files by the Last modified date of the object.
The filter is applied only after list all s3 files.
boto3_session : boto3.Session(), optional
Boto3 Session. The default boto3 session will be used if boto3_session receive None.
s3_additional_kwargs : Optional[Dict[str, Any]]
Forward to botocore requests, only "SSECustomerAlgorithm" and "SSECustomerKey" arguments will be considered.
chunksize: int, optional
If specified, return an generator where chunksize is the number of rows to include in each chunk.
dataset : bool
If `True` read a CSV dataset instead of simple file(s) loading all the related partitions as columns.
partition_filter : Optional[Callable[[Dict[str, str]], bool]]
Callback Function filters to apply on PARTITION columns (PUSH-DOWN filter).
This function MUST receive a single argument (Dict[str, str]) where keys are partitions
names and values are partitions values. Partitions values will be always strings extracted from S3.
This function MUST return a bool, True to read the partition or False to ignore it.
Ignored if `dataset=False`.
E.g ``lambda x: True if x["year"] == "2020" and x["month"] == "1" else False``
https://aws-data-wrangler.readthedocs.io/en/2.9.0/tutorials/023%20-%20Flexible%20Partitions%20Filter.html
pandas_kwargs :
KEYWORD arguments forwarded to pandas.read_csv(). You can NOT pass `pandas_kwargs` explicit, just add valid
Pandas arguments in the function call and Wrangler will accept it.
e.g. wr.s3.read_csv('s3://bucket/prefix/', sep='|', na_values=['null', 'none'], skip_blank_lines=True)
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html
Returns
-------
Union[pandas.DataFrame, Generator[pandas.DataFrame, None, None]]
Pandas DataFrame or a Generator in case of `chunksize != None`.
Examples
--------
Reading all CSV files under a prefix
>>> import awswrangler as wr
>>> df = wr.s3.read_csv(path='s3://bucket/prefix/')
Reading all CSV files under a prefix and using pandas_kwargs
>>> import awswrangler as wr
>>> df = wr.s3.read_csv('s3://bucket/prefix/', sep='|', na_values=['null', 'none'], skip_blank_lines=True)
Reading all CSV files from a list
>>> import awswrangler as wr
>>> df = wr.s3.read_csv(path=['s3://bucket/filename0.csv', 's3://bucket/filename1.csv'])
Reading in chunks of 100 lines
>>> import awswrangler as wr
>>> dfs = wr.s3.read_csv(path=['s3://bucket/filename0.csv', 's3://bucket/filename1.csv'], chunksize=100)
>>> for df in dfs:
>>> print(df) # 100 lines Pandas DataFrame
Reading CSV Dataset with PUSH-DOWN filter over partitions
>>> import awswrangler as wr
>>> my_filter = lambda x: True if x["city"].startswith("new") else False
>>> df = wr.s3.read_csv(path, dataset=True, partition_filter=my_filter)
"""
if "pandas_kwargs" in pandas_kwargs:
raise exceptions.InvalidArgument(
"You can NOT pass `pandas_kwargs` explicit, just add valid "
"Pandas arguments in the function call and Wrangler will accept it."
"e.g. wr.s3.read_csv('s3://bucket/prefix/', sep='|', skip_blank_lines=True)"
)
ignore_index: bool = "index_col" not in pandas_kwargs
return _read_text(
parser_func=pd.read_csv,
path=path,
path_suffix=path_suffix,
path_ignore_suffix=path_ignore_suffix,
version_id=version_id,
ignore_empty=ignore_empty,
use_threads=use_threads,
boto3_session=boto3_session,
s3_additional_kwargs=s3_additional_kwargs,
chunksize=chunksize,
dataset=dataset,
partition_filter=partition_filter,
last_modified_begin=last_modified_begin,
last_modified_end=last_modified_end,
ignore_index=ignore_index,
**pandas_kwargs,
)
def read_fwf(
path: Union[str, List[str]],
path_suffix: Union[str, List[str], None] = None,
path_ignore_suffix: Union[str, List[str], None] = None,
version_id: Optional[Union[str, Dict[str, str]]] = None,
ignore_empty: bool = True,
use_threads: Union[bool, int] = True,
last_modified_begin: Optional[datetime.datetime] = None,
last_modified_end: Optional[datetime.datetime] = None,
boto3_session: Optional[boto3.Session] = None,
s3_additional_kwargs: Optional[Dict[str, Any]] = None,
chunksize: Optional[int] = None,
dataset: bool = False,
partition_filter: Optional[Callable[[Dict[str, str]], bool]] = None,
**pandas_kwargs: Any,
) -> Union[pd.DataFrame, Iterator[pd.DataFrame]]:
"""Read fixed-width formatted file(s) from from a received S3 prefix or list of S3 objects paths.
This function accepts Unix shell-style wildcards in the path argument.
* (matches everything), ? (matches any single character),
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
you can use `glob.escape(path)` before passing the path to this function.
Note
----
For partial and gradual reading use the argument ``chunksize`` instead of ``iterator``.
Note
----
In case of `use_threads=True` the number of threads
that will be spawned will be gotten from os.cpu_count().
Note
----
The filter by last_modified begin last_modified end is applied after list all S3 files
Parameters
----------
path : Union[str, List[str]]
S3 prefix (accepts Unix shell-style wildcards)
(e.g. s3://bucket/prefix) or list of S3 objects paths (e.g. ``[s3://bucket/key0, s3://bucket/key1]``).
path_suffix: Union[str, List[str], None]
Suffix or List of suffixes to be read (e.g. [".txt"]).
If None, will try to read all files. (default)
path_ignore_suffix: Union[str, List[str], None]
Suffix or List of suffixes for S3 keys to be ignored.(e.g. ["_SUCCESS"]).
If None, will try to read all files. (default)
version_id: Optional[Union[str, Dict[str, str]]]
Version id of the object or mapping of object path to version id.
(e.g. {'s3://bucket/key0': '121212', 's3://bucket/key1': '343434'})
ignore_empty: bool
Ignore files with 0 bytes.
use_threads : Union[bool, int]
True to enable concurrent requests, False to disable multiple threads.
If enabled os.cpu_count() will be used as the max number of threads.
If given an int will use the given amount of threads.
last_modified_begin
Filter the s3 files by the Last modified date of the object.
The filter is applied only after list all s3 files.
last_modified_end: datetime, optional
Filter the s3 files by the Last modified date of the object.
The filter is applied only after list all s3 files.
boto3_session : boto3.Session(), optional
Boto3 Session. The default boto3 session will be used if boto3_session receive None.
s3_additional_kwargs : Optional[Dict[str, Any]]
Forward to botocore requests, only "SSECustomerAlgorithm" and "SSECustomerKey" arguments will be considered.
chunksize: int, optional
If specified, return an generator where chunksize is the number of rows to include in each chunk.
dataset: bool
If `True` read a FWF dataset instead of simple file(s) loading all the related partitions as columns.
partition_filter: Optional[Callable[[Dict[str, str]], bool]]
Callback Function filters to apply on PARTITION columns (PUSH-DOWN filter).
This function MUST receive a single argument (Dict[str, str]) where keys are partitions
names and values are partitions values. Partitions values will be always strings extracted from S3.
This function MUST return a bool, True to read the partition or False to ignore it.
Ignored if `dataset=False`.
E.g ``lambda x: True if x["year"] == "2020" and x["month"] == "1" else False``
https://aws-data-wrangler.readthedocs.io/en/2.9.0/tutorials/023%20-%20Flexible%20Partitions%20Filter.html
pandas_kwargs:
KEYWORD arguments forwarded to pandas.read_fwf(). You can NOT pass `pandas_kwargs` explicit, just add valid
Pandas arguments in the function call and Wrangler will accept it.
e.g. wr.s3.read_fwf(path='s3://bucket/prefix/', widths=[1, 3], names=["c0", "c1"])
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_fwf.html
Returns
-------
Union[pandas.DataFrame, Generator[pandas.DataFrame, None, None]]
Pandas DataFrame or a Generator in case of `chunksize != None`.
Examples
--------
Reading all fixed-width formatted (FWF) files under a prefix
>>> import awswrangler as wr
>>> df = wr.s3.read_fwf(path='s3://bucket/prefix/', widths=[1, 3], names=['c0', 'c1'])
Reading all fixed-width formatted (FWF) files from a list
>>> import awswrangler as wr
>>> df = wr.s3.read_fwf(path=['s3://bucket/0.txt', 's3://bucket/1.txt'], widths=[1, 3], names=['c0', 'c1'])
Reading in chunks of 100 lines
>>> import awswrangler as wr
>>> dfs = wr.s3.read_fwf(
... path=['s3://bucket/0.txt', 's3://bucket/1.txt'],
... chunksize=100,
... widths=[1, 3],
... names=["c0", "c1"]
... )
>>> for df in dfs:
>>> print(df) # 100 lines Pandas DataFrame
Reading FWF Dataset with PUSH-DOWN filter over partitions
>>> import awswrangler as wr
>>> my_filter = lambda x: True if x["city"].startswith("new") else False
>>> df = wr.s3.read_fwf(path, dataset=True, partition_filter=my_filter, widths=[1, 3], names=["c0", "c1"])
"""
if "pandas_kwargs" in pandas_kwargs:
raise exceptions.InvalidArgument(
"You can NOT pass `pandas_kwargs` explicit, just add valid "
"Pandas arguments in the function call and Wrangler will accept it."
"e.g. wr.s3.read_fwf(path, widths=[1, 3], names=['c0', 'c1'])"
)
return _read_text(
parser_func=pd.read_fwf,
path=path,
path_suffix=path_suffix,
path_ignore_suffix=path_ignore_suffix,
version_id=version_id,
ignore_empty=ignore_empty,
use_threads=use_threads,
boto3_session=boto3_session,
s3_additional_kwargs=s3_additional_kwargs,
chunksize=chunksize,
dataset=dataset,
partition_filter=partition_filter,
last_modified_begin=last_modified_begin,
last_modified_end=last_modified_end,
ignore_index=True,
sort_index=False,
**pandas_kwargs,
)
def read_json(
path: Union[str, List[str]],
path_suffix: Union[str, List[str], None] = None,
path_ignore_suffix: Union[str, List[str], None] = None,
version_id: Optional[Union[str, Dict[str, str]]] = None,
ignore_empty: bool = True,
orient: str = "columns",
use_threads: Union[bool, int] = True,
last_modified_begin: Optional[datetime.datetime] = None,
last_modified_end: Optional[datetime.datetime] = None,
boto3_session: Optional[boto3.Session] = None,
s3_additional_kwargs: Optional[Dict[str, Any]] = None,
chunksize: Optional[int] = None,
dataset: bool = False,
partition_filter: Optional[Callable[[Dict[str, str]], bool]] = None,
**pandas_kwargs: Any,
) -> Union[pd.DataFrame, Iterator[pd.DataFrame]]:
"""Read JSON file(s) from from a received S3 prefix or list of S3 objects paths.
This function accepts Unix shell-style wildcards in the path argument.
* (matches everything), ? (matches any single character),
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
you can use `glob.escape(path)` before passing the path to this function.
Note
----
For partial and gradual reading use the argument ``chunksize`` instead of ``iterator``.
Note
----
In case of `use_threads=True` the number of threads
that will be spawned will be gotten from os.cpu_count().
Note
----
The filter by last_modified begin last_modified end is applied after list all S3 files
Parameters
----------
path : Union[str, List[str]]
S3 prefix (accepts Unix shell-style wildcards)
(e.g. s3://bucket/prefix) or list of S3 objects paths (e.g. ``[s3://bucket/key0, s3://bucket/key1]``).
path_suffix: Union[str, List[str], None]
Suffix or List of suffixes to be read (e.g. [".json"]).
If None, will try to read all files. (default)
path_ignore_suffix: Union[str, List[str], None]
Suffix or List of suffixes for S3 keys to be ignored.(e.g. ["_SUCCESS"]).
If None, will try to read all files. (default)
version_id: Optional[Union[str, Dict[str, str]]]
Version id of the object or mapping of object path to version id.
(e.g. {'s3://bucket/key0': '121212', 's3://bucket/key1': '343434'})
ignore_empty: bool
Ignore files with 0 bytes.
orient : str
Same as Pandas: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_json.html
use_threads : Union[bool, int]
True to enable concurrent requests, False to disable multiple threads.
If enabled os.cpu_count() will be used as the max number of threads.
If given an int will use the given amount of threads.
last_modified_begin
Filter the s3 files by the Last modified date of the object.
The filter is applied only after list all s3 files.
last_modified_end: datetime, optional
Filter the s3 files by the Last modified date of the object.
The filter is applied only after list all s3 files.
boto3_session : boto3.Session(), optional
Boto3 Session. The default boto3 session will be used if boto3_session receive None.
s3_additional_kwargs : Optional[Dict[str, Any]]
Forward to botocore requests, only "SSECustomerAlgorithm" and "SSECustomerKey" arguments will be considered.
chunksize: int, optional
If specified, return an generator where chunksize is the number of rows to include in each chunk.
dataset: bool
If `True` read a JSON dataset instead of simple file(s) loading all the related partitions as columns.
If `True`, the `lines=True` will be assumed by default.
partition_filter: Optional[Callable[[Dict[str, str]], bool]]
Callback Function filters to apply on PARTITION columns (PUSH-DOWN filter).
This function MUST receive a single argument (Dict[str, str]) where keys are partitions
names and values are partitions values. Partitions values will be always strings extracted from S3.
This function MUST return a bool, True to read the partition or False to ignore it.
Ignored if `dataset=False`.
E.g ``lambda x: True if x["year"] == "2020" and x["month"] == "1" else False``
https://aws-data-wrangler.readthedocs.io/en/2.9.0/tutorials/023%20-%20Flexible%20Partitions%20Filter.html
pandas_kwargs:
KEYWORD arguments forwarded to pandas.read_json(). You can NOT pass `pandas_kwargs` explicit, just add valid
Pandas arguments in the function call and Wrangler will accept it.
e.g. wr.s3.read_json('s3://bucket/prefix/', lines=True, keep_default_dates=True)
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_json.html
Returns
-------
Union[pandas.DataFrame, Generator[pandas.DataFrame, None, None]]
Pandas DataFrame or a Generator in case of `chunksize != None`.
Examples
--------
Reading all JSON files under a prefix
>>> import awswrangler as wr
>>> df = wr.s3.read_json(path='s3://bucket/prefix/')
Reading all CSV files under a prefix and using pandas_kwargs
>>> import awswrangler as wr
>>> df = wr.s3.read_json('s3://bucket/prefix/', lines=True, keep_default_dates=True)
Reading all JSON files from a list
>>> import awswrangler as wr
>>> df = wr.s3.read_json(path=['s3://bucket/filename0.json', 's3://bucket/filename1.json'])
Reading in chunks of 100 lines
>>> import awswrangler as wr
>>> dfs = wr.s3.read_json(path=['s3://bucket/0.json', 's3://bucket/1.json'], chunksize=100, lines=True)
>>> for df in dfs:
>>> print(df) # 100 lines Pandas DataFrame
Reading JSON Dataset with PUSH-DOWN filter over partitions
>>> import awswrangler as wr
>>> my_filter = lambda x: True if x["city"].startswith("new") else False
>>> df = wr.s3.read_json(path, dataset=True, partition_filter=my_filter)
"""
if "pandas_kwargs" in pandas_kwargs:
raise exceptions.InvalidArgument(
"You can NOT pass `pandas_kwargs` explicit, just add valid "
"Pandas arguments in the function call and Wrangler will accept it."
"e.g. wr.s3.read_json(path, lines=True, keep_default_dates=True)"
)
if (dataset is True) and ("lines" not in pandas_kwargs):
pandas_kwargs["lines"] = True
pandas_kwargs["orient"] = orient
ignore_index: bool = orient not in ("split", "index", "columns")
return _read_text(
parser_func=pd.read_json,
path=path,
path_suffix=path_suffix,
path_ignore_suffix=path_ignore_suffix,
version_id=version_id,
ignore_empty=ignore_empty,
use_threads=use_threads,
boto3_session=boto3_session,
s3_additional_kwargs=s3_additional_kwargs,
chunksize=chunksize,
dataset=dataset,
partition_filter=partition_filter,
last_modified_begin=last_modified_begin,
last_modified_end=last_modified_end,
ignore_index=ignore_index,
**pandas_kwargs,
)
| 43.913821 | 118 | 0.672159 | 3,728 | 27,007 | 4.730418 | 0.084227 | 0.030621 | 0.023476 | 0.017862 | 0.855118 | 0.835101 | 0.815027 | 0.796257 | 0.793706 | 0.789736 | 0 | 0.017045 | 0.220128 | 27,007 | 614 | 119 | 43.985342 | 0.820245 | 0.538009 | 0 | 0.545126 | 0 | 0.00722 | 0.081686 | 0.009135 | 0 | 0 | 0 | 0 | 0 | 1 | 0.025271 | false | 0.01083 | 0.043321 | 0 | 0.090253 | 0.00722 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
7c789d1ae688f3b652c6cd92d7b7db56847508d0 | 32 | py | Python | codestuff/rnd/python/fox.py | aphran/crap | d1c3147010262e1be00801360e8bcaeb7b5b6f1d | [
"Unlicense"
] | null | null | null | codestuff/rnd/python/fox.py | aphran/crap | d1c3147010262e1be00801360e8bcaeb7b5b6f1d | [
"Unlicense"
] | null | null | null | codestuff/rnd/python/fox.py | aphran/crap | d1c3147010262e1be00801360e8bcaeb7b5b6f1d | [
"Unlicense"
] | null | null | null | def say():
print("helloes")
| 10.666667 | 20 | 0.5625 | 4 | 32 | 4.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.21875 | 32 | 2 | 21 | 16 | 0.72 | 0 | 0 | 0 | 0 | 0 | 0.21875 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 0 | 0 | 0 | 0.5 | 0.5 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
7c7986be130dfc9e3f861dc9f5251aaad970004c | 62 | py | Python | Script2.py | Xavitheforce/Warm-up | dec1ea021f2b25ea9ad3d8007ee12f9f87ee8923 | [
"Apache-2.0"
] | null | null | null | Script2.py | Xavitheforce/Warm-up | dec1ea021f2b25ea9ad3d8007ee12f9f87ee8923 | [
"Apache-2.0"
] | null | null | null | Script2.py | Xavitheforce/Warm-up | dec1ea021f2b25ea9ad3d8007ee12f9f87ee8923 | [
"Apache-2.0"
] | null | null | null | #Tarea 2#
print(u"\u001b[32mHello World")
print (u"\u001b[0m") | 20.666667 | 31 | 0.693548 | 11 | 62 | 3.909091 | 0.727273 | 0.27907 | 0.511628 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.175439 | 0.080645 | 62 | 3 | 32 | 20.666667 | 0.578947 | 0.112903 | 0 | 0 | 0 | 0 | 0.555556 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
7c7fc597da5dbea61cf7c25db6e0e7e462d90302 | 32 | py | Python | iuml/training/detection/__init__.py | fierval/mlsdk | e0b54732d154efc3ed89f0ac1561c0e7c5c49d8a | [
"MIT"
] | null | null | null | iuml/training/detection/__init__.py | fierval/mlsdk | e0b54732d154efc3ed89f0ac1561c0e7c5c49d8a | [
"MIT"
] | null | null | null | iuml/training/detection/__init__.py | fierval/mlsdk | e0b54732d154efc3ed89f0ac1561c0e7c5c49d8a | [
"MIT"
] | null | null | null | from .retinanet import RetinaNet | 32 | 32 | 0.875 | 4 | 32 | 7 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.09375 | 32 | 1 | 32 | 32 | 0.965517 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
7c83d879c06cb7338b3de89fb3d9db8ca8a65e8f | 12,813 | py | Python | pythonosc/test/test_osc_message.py | rawbengal/python-osc | 18c836fc4cab49f1b662e0b47f25831e58b84c3a | [
"Unlicense"
] | null | null | null | pythonosc/test/test_osc_message.py | rawbengal/python-osc | 18c836fc4cab49f1b662e0b47f25831e58b84c3a | [
"Unlicense"
] | null | null | null | pythonosc/test/test_osc_message.py | rawbengal/python-osc | 18c836fc4cab49f1b662e0b47f25831e58b84c3a | [
"Unlicense"
] | null | null | null | import unittest
from pythonosc import osc_message
from datetime import datetime
# Datagrams sent by Reaktor 5.8 by Native Instruments (c).
_DGRAM_KNOB_ROTATES = (
b"/FB\x00"
b",f\x00\x00"
b">xca=q")
_DGRAM_SWITCH_GOES_OFF = (
b"/SYNC\x00\x00\x00"
b",f\x00\x00"
b"\x00\x00\x00\x00")
_DGRAM_SWITCH_GOES_ON = (
b"/SYNC\x00\x00\x00"
b",f\x00\x00"
b"?\x00\x00\x00")
_DGRAM_NO_PARAMS = b"/SYNC\x00\x00\x00"
_DGRAM_ALL_STANDARD_TYPES_OF_PARAMS = (
b"/SYNC\x00\x00\x00"
b",ifsb\x00\x00\x00"
b"\x00\x00\x00\x03" # 3
b"@\x00\x00\x00" # 2.0
b"ABC\x00" # "ABC"
b"\x00\x00\x00\x08stuff\x00\x00\x00") # b"stuff\x00\x00\x00"
_DGRAM_ALL_NON_STANDARD_TYPES_OF_PARAMS = (
b"/SYNC\x00\x00\x00"
b"T" # True
b"F" # False
b"[]\x00\x00\x00" # Empty array
b"t\x00\x00\x00\x00\x00\x00\x00\x00"
)
_DGRAM_COMPLEX_ARRAY_PARAMS = (
b"/SYNC\x00\x00\x00"
b",[i][[ss]][[i][i[s]]]\x00\x00\x00"
b"\x00\x00\x00\x01" # 1
b"ABC\x00" # "ABC"
b"DEF\x00" # "DEF"
b"\x00\x00\x00\x02" # 2
b"\x00\x00\x00\x03" # 3
b"GHI\x00") # "GHI"
_DGRAM_UNKNOWN_PARAM_TYPE = (
b"/SYNC\x00\x00\x00"
b",fx\x00" # x is an unknown param type.
b"?\x00\x00\x00")
# range(512) param list.
_DGRAM_LONG_LIST = (
b'/SYNC\x00\x00\x00,[iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii]\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x06\x00\x00\x00\x07\x00\x00\x00\x08\x00\x00\x00\t\x00\x00\x00\n\x00\x00\x00\x0b\x00\x00\x00\x0c\x00\x00\x00\r\x00\x00\x00\x0e\x00\x00\x00\x0f\x00\x00\x00\x10\x00\x00\x00\x11\x00\x00\x00\x12\x00\x00\x00\x13\x00\x00\x00\x14\x00\x00\x00\x15\x00\x00\x00\x16\x00\x00\x00\x17\x00\x00\x00\x18\x00\x00\x00\x19\x00\x00\x00\x1a\x00\x00\x00\x1b\x00\x00\x00\x1c\x00\x00\x00\x1d\x00\x00\x00\x1e\x00\x00\x00\x1f\x00\x00\x00 \x00\x00\x00!\x00\x00\x00"\x00\x00\x00#\x00\x00\x00$\x00\x00\x00%\x00\x00\x00&\x00\x00\x00\'\x00\x00\x00(\x00\x00\x00)\x00\x00\x00*\x00\x00\x00+\x00\x00\x00,\x00\x00\x00-\x00\x00\x00.\x00\x00\x00/\x00\x00\x000\x00\x00\x001\x00\x00\x002\x00\x00\x003\x00\x00\x004\x00\x00\x005\x00\x00\x006\x00\x00\x007\x00\x00\x008\x00\x00\x009\x00\x00\x00:\x00\x00\x00;\x00\x00\x00<\x00\x00\x00=\x00\x00\x00>\x00\x00\x00?\x00\x00\x00@\x00\x00\x00A\x00\x00\x00B\x00\x00\x00C\x00\x00\x00D\x00\x00\x00E\x00\x00\x00F\x00\x00\x00G\x00\x00\x00H\x00\x00\x00I\x00\x00\x00J\x00\x00\x00K\x00\x00\x00L\x00\x00\x00M\x00\x00\x00N\x00\x00\x00O\x00\x00\x00P\x00\x00\x00Q\x00\x00\x00R\x00\x00\x00S\x00\x00\x00T\x00\x00\x00U\x00\x00\x00V\x00\x00\x00W\x00\x00\x00X\x00\x00\x00Y\x00\x00\x00Z\x00\x00\x00[\x00\x00\x00\\\x00\x00\x00]\x00\x00\x00^\x00\x00\x00_\x00\x00\x00`\x00\x00\x00a\x00\x00\x00b\x00\x00\x00c\x00\x00\x00d\x00\x00\x00e\x00\x00\x00f\x00\x00\x00g\x00\x00\x00h\x00\x00\x00i\x00\x00\x00j\x00\x00\x00k\x00\x00\x00l\x00\x00\x00m\x00\x00\x00n\x00\x00\x00o\x00\x00\x00p\x00\x00\x00q\x00\x00\x00r\x00\x00\x00s\x00\x00\x00t\x00\x00\x00u\x00\x00\x00v\x00\x00\x00w\x00\x00\x00x\x00\x00\x00y\x00\x00\x00z\x00\x00\x00{\x00\x00\x00|\x00\x00\x00}\x00\x00\x00~\x00\x00\x00\x7f\x00\x00\x00\x80\x00\x00\x00\x81\x00\x00\x00\x82\x00\x00\x00\x83\x00\x00\x00\x84\x00\x00\x00\x85\x00\x00\x00\x86\x00\x00\x00\x87\x00\x00\x00\x88\x00\x00\x00\x89\x00\x00\x00\x8a\x00\x00\x00\x8b\x00\x00\x00\x8c\x00\x00\x00\x8d\x00\x00\x00\x8e\x00\x00\x00\x8f\x00\x00\x00\x90\x00\x00\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x00\x00\x95\x00\x00\x00\x96\x00\x00\x00\x97\x00\x00\x00\x98\x00\x00\x00\x99\x00\x00\x00\x9a\x00\x00\x00\x9b\x00\x00\x00\x9c\x00\x00\x00\x9d\x00\x00\x00\x9e\x00\x00\x00\x9f\x00\x00\x00\xa0\x00\x00\x00\xa1\x00\x00\x00\xa2\x00\x00\x00\xa3\x00\x00\x00\xa4\x00\x00\x00\xa5\x00\x00\x00\xa6\x00\x00\x00\xa7\x00\x00\x00\xa8\x00\x00\x00\xa9\x00\x00\x00\xaa\x00\x00\x00\xab\x00\x00\x00\xac\x00\x00\x00\xad\x00\x00\x00\xae\x00\x00\x00\xaf\x00\x00\x00\xb0\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\xba\x00\x00\x00\xbb\x00\x00\x00\xbc\x00\x00\x00\xbd\x00\x00\x00\xbe\x00\x00\x00\xbf\x00\x00\x00\xc0\x00\x00\x00\xc1\x00\x00\x00\xc2\x00\x00\x00\xc3\x00\x00\x00\xc4\x00\x00\x00\xc5\x00\x00\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\x00\x00\xca\x00\x00\x00\xcb\x00\x00\x00\xcc\x00\x00\x00\xcd\x00\x00\x00\xce\x00\x00\x00\xcf\x00\x00\x00\xd0\x00\x00\x00\xd1\x00\x00\x00\xd2\x00\x00\x00\xd3\x00\x00\x00\xd4\x00\x00\x00\xd5\x00\x00\x00\xd6\x00\x00\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\xd9\x00\x00\x00\xda\x00\x00\x00\xdb\x00\x00\x00\xdc\x00\x00\x00\xdd\x00\x00\x00\xde\x00\x00\x00\xdf\x00\x00\x00\xe0\x00\x00\x00\xe1\x00\x00\x00\xe2\x00\x00\x00\xe3\x00\x00\x00\xe4\x00\x00\x00\xe5\x00\x00\x00\xe6\x00\x00\x00\xe7\x00\x00\x00\xe8\x00\x00\x00\xe9\x00\x00\x00\xea\x00\x00\x00\xeb\x00\x00\x00\xec\x00\x00\x00\xed\x00\x00\x00\xee\x00\x00\x00\xef\x00\x00\x00\xf0\x00\x00\x00\xf1\x00\x00\x00\xf2\x00\x00\x00\xf3\x00\x00\x00\xf4\x00\x00\x00\xf5\x00\x00\x00\xf6\x00\x00\x00\xf7\x00\x00\x00\xf8\x00\x00\x00\xf9\x00\x00\x00\xfa\x00\x00\x00\xfb\x00\x00\x00\xfc\x00\x00\x00\xfd\x00\x00\x00\xfe\x00\x00\x00\xff\x00\x00\x01\x00\x00\x00\x01\x01\x00\x00\x01\x02\x00\x00\x01\x03\x00\x00\x01\x04\x00\x00\x01\x05\x00\x00\x01\x06\x00\x00\x01\x07\x00\x00\x01\x08\x00\x00\x01\t\x00\x00\x01\n\x00\x00\x01\x0b\x00\x00\x01\x0c\x00\x00\x01\r\x00\x00\x01\x0e\x00\x00\x01\x0f\x00\x00\x01\x10\x00\x00\x01\x11\x00\x00\x01\x12\x00\x00\x01\x13\x00\x00\x01\x14\x00\x00\x01\x15\x00\x00\x01\x16\x00\x00\x01\x17\x00\x00\x01\x18\x00\x00\x01\x19\x00\x00\x01\x1a\x00\x00\x01\x1b\x00\x00\x01\x1c\x00\x00\x01\x1d\x00\x00\x01\x1e\x00\x00\x01\x1f\x00\x00\x01 \x00\x00\x01!\x00\x00\x01"\x00\x00\x01#\x00\x00\x01$\x00\x00\x01%\x00\x00\x01&\x00\x00\x01\'\x00\x00\x01(\x00\x00\x01)\x00\x00\x01*\x00\x00\x01+\x00\x00\x01,\x00\x00\x01-\x00\x00\x01.\x00\x00\x01/\x00\x00\x010\x00\x00\x011\x00\x00\x012\x00\x00\x013\x00\x00\x014\x00\x00\x015\x00\x00\x016\x00\x00\x017\x00\x00\x018\x00\x00\x019\x00\x00\x01:\x00\x00\x01;\x00\x00\x01<\x00\x00\x01=\x00\x00\x01>\x00\x00\x01?\x00\x00\x01@\x00\x00\x01A\x00\x00\x01B\x00\x00\x01C\x00\x00\x01D\x00\x00\x01E\x00\x00\x01F\x00\x00\x01G\x00\x00\x01H\x00\x00\x01I\x00\x00\x01J\x00\x00\x01K\x00\x00\x01L\x00\x00\x01M\x00\x00\x01N\x00\x00\x01O\x00\x00\x01P\x00\x00\x01Q\x00\x00\x01R\x00\x00\x01S\x00\x00\x01T\x00\x00\x01U\x00\x00\x01V\x00\x00\x01W\x00\x00\x01X\x00\x00\x01Y\x00\x00\x01Z\x00\x00\x01[\x00\x00\x01\\\x00\x00\x01]\x00\x00\x01^\x00\x00\x01_\x00\x00\x01`\x00\x00\x01a\x00\x00\x01b\x00\x00\x01c\x00\x00\x01d\x00\x00\x01e\x00\x00\x01f\x00\x00\x01g\x00\x00\x01h\x00\x00\x01i\x00\x00\x01j\x00\x00\x01k\x00\x00\x01l\x00\x00\x01m\x00\x00\x01n\x00\x00\x01o\x00\x00\x01p\x00\x00\x01q\x00\x00\x01r\x00\x00\x01s\x00\x00\x01t\x00\x00\x01u\x00\x00\x01v\x00\x00\x01w\x00\x00\x01x\x00\x00\x01y\x00\x00\x01z\x00\x00\x01{\x00\x00\x01|\x00\x00\x01}\x00\x00\x01~\x00\x00\x01\x7f\x00\x00\x01\x80\x00\x00\x01\x81\x00\x00\x01\x82\x00\x00\x01\x83\x00\x00\x01\x84\x00\x00\x01\x85\x00\x00\x01\x86\x00\x00\x01\x87\x00\x00\x01\x88\x00\x00\x01\x89\x00\x00\x01\x8a\x00\x00\x01\x8b\x00\x00\x01\x8c\x00\x00\x01\x8d\x00\x00\x01\x8e\x00\x00\x01\x8f\x00\x00\x01\x90\x00\x00\x01\x91\x00\x00\x01\x92\x00\x00\x01\x93\x00\x00\x01\x94\x00\x00\x01\x95\x00\x00\x01\x96\x00\x00\x01\x97\x00\x00\x01\x98\x00\x00\x01\x99\x00\x00\x01\x9a\x00\x00\x01\x9b\x00\x00\x01\x9c\x00\x00\x01\x9d\x00\x00\x01\x9e\x00\x00\x01\x9f\x00\x00\x01\xa0\x00\x00\x01\xa1\x00\x00\x01\xa2\x00\x00\x01\xa3\x00\x00\x01\xa4\x00\x00\x01\xa5\x00\x00\x01\xa6\x00\x00\x01\xa7\x00\x00\x01\xa8\x00\x00\x01\xa9\x00\x00\x01\xaa\x00\x00\x01\xab\x00\x00\x01\xac\x00\x00\x01\xad\x00\x00\x01\xae\x00\x00\x01\xaf\x00\x00\x01\xb0\x00\x00\x01\xb1\x00\x00\x01\xb2\x00\x00\x01\xb3\x00\x00\x01\xb4\x00\x00\x01\xb5\x00\x00\x01\xb6\x00\x00\x01\xb7\x00\x00\x01\xb8\x00\x00\x01\xb9\x00\x00\x01\xba\x00\x00\x01\xbb\x00\x00\x01\xbc\x00\x00\x01\xbd\x00\x00\x01\xbe\x00\x00\x01\xbf\x00\x00\x01\xc0\x00\x00\x01\xc1\x00\x00\x01\xc2\x00\x00\x01\xc3\x00\x00\x01\xc4\x00\x00\x01\xc5\x00\x00\x01\xc6\x00\x00\x01\xc7\x00\x00\x01\xc8\x00\x00\x01\xc9\x00\x00\x01\xca\x00\x00\x01\xcb\x00\x00\x01\xcc\x00\x00\x01\xcd\x00\x00\x01\xce\x00\x00\x01\xcf\x00\x00\x01\xd0\x00\x00\x01\xd1\x00\x00\x01\xd2\x00\x00\x01\xd3\x00\x00\x01\xd4\x00\x00\x01\xd5\x00\x00\x01\xd6\x00\x00\x01\xd7\x00\x00\x01\xd8\x00\x00\x01\xd9\x00\x00\x01\xda\x00\x00\x01\xdb\x00\x00\x01\xdc\x00\x00\x01\xdd\x00\x00\x01\xde\x00\x00\x01\xdf\x00\x00\x01\xe0\x00\x00\x01\xe1\x00\x00\x01\xe2\x00\x00\x01\xe3\x00\x00\x01\xe4\x00\x00\x01\xe5\x00\x00\x01\xe6\x00\x00\x01\xe7\x00\x00\x01\xe8\x00\x00\x01\xe9\x00\x00\x01\xea\x00\x00\x01\xeb\x00\x00\x01\xec\x00\x00\x01\xed\x00\x00\x01\xee\x00\x00\x01\xef\x00\x00\x01\xf0\x00\x00\x01\xf1\x00\x00\x01\xf2\x00\x00\x01\xf3\x00\x00\x01\xf4\x00\x00\x01\xf5\x00\x00\x01\xf6\x00\x00\x01\xf7\x00\x00\x01\xf8\x00\x00\x01\xf9\x00\x00\x01\xfa\x00\x00\x01\xfb\x00\x00\x01\xfc\x00\x00\x01\xfd\x00\x00\x01\xfe\x00\x00\x01\xff'
)
class TestOscMessage(unittest.TestCase):
def test_switch_goes_off(self):
msg = osc_message.OscMessage(_DGRAM_SWITCH_GOES_OFF)
self.assertEqual("/SYNC", msg.address)
self.assertEqual(1, len(msg.params))
self.assertTrue(type(msg.params[0]) == float)
self.assertAlmostEqual(0.0, msg.params[0])
def test_switch_goes_on(self):
msg = osc_message.OscMessage(_DGRAM_SWITCH_GOES_ON)
self.assertEqual("/SYNC", msg.address)
self.assertEqual(1, len(msg.params))
self.assertTrue(type(msg.params[0]) == float)
self.assertAlmostEqual(0.5, msg.params[0])
def test_knob_rotates(self):
msg = osc_message.OscMessage(_DGRAM_KNOB_ROTATES)
self.assertEqual("/FB", msg.address)
self.assertEqual(1, len(msg.params))
self.assertTrue(type(msg.params[0]) == float)
def test_no_params(self):
msg = osc_message.OscMessage(_DGRAM_NO_PARAMS)
self.assertEqual("/SYNC", msg.address)
self.assertEqual(0, len(msg.params))
def test_all_standard_types_off_params(self):
msg = osc_message.OscMessage(_DGRAM_ALL_STANDARD_TYPES_OF_PARAMS)
self.assertEqual("/SYNC", msg.address)
self.assertEqual(4, len(msg.params))
self.assertEqual(3, msg.params[0])
self.assertAlmostEqual(2.0, msg.params[1])
self.assertEqual("ABC", msg.params[2])
self.assertEqual(b"stuff\x00\x00\x00", msg.params[3])
self.assertEqual(4, len(list(msg)))
def test_all_non_standard_params(self):
msg = osc_message.OscMessage(_DGRAM_ALL_NON_STANDARD_TYPES_OF_PARAMS)
self.assertEqual("/SYNC", msg.address)
self.assertEqual(4, len(msg.params))
self.assertEqual(True, msg.params[0])
self.assertEqual(False, msg.params[1])
self.assertEqual([], msg.params[2])
self.assertEqual((datetime(1900, 1, 1, 0, 0, 0), 0), msg.params[3])
self.assertEqual(4, len(list(msg)))
def test_complex_array_params(self):
msg = osc_message.OscMessage(_DGRAM_COMPLEX_ARRAY_PARAMS)
self.assertEqual("/SYNC", msg.address)
self.assertEqual(3, len(msg.params))
self.assertEqual([1], msg.params[0])
self.assertEqual([["ABC", "DEF"]], msg.params[1])
self.assertEqual([[2], [3, ["GHI"]]], msg.params[2])
self.assertEqual(3, len(list(msg)))
def test_raises_on_empty_datargram(self):
self.assertRaises(osc_message.ParseError, osc_message.OscMessage, b'')
def test_ignores_unknown_param(self):
msg = osc_message.OscMessage(_DGRAM_UNKNOWN_PARAM_TYPE)
self.assertEqual("/SYNC", msg.address)
self.assertEqual(1, len(msg.params))
self.assertTrue(type(msg.params[0]) == float)
self.assertAlmostEqual(0.5, msg.params[0])
def test_raises_on_invalid_array(self):
self.assertRaises(osc_message.ParseError,
osc_message.OscMessage,
b"/SYNC\x00\x00\x00[]]\x00")
self.assertRaises(osc_message.ParseError,
osc_message.OscMessage,
b"/SYNC\x00\x00\x00[[]\x00")
def test_raises_on_incorrect_datargram(self):
self.assertRaises(
osc_message.ParseError, osc_message.OscMessage, b'foobar')
def test_parse_long_params_list(self):
msg = osc_message.OscMessage(_DGRAM_LONG_LIST)
self.assertEqual("/SYNC", msg.address)
self.assertEqual(1, len(msg.params))
self.assertEqual(512, len(msg.params[0]))
if __name__ == "__main__":
unittest.main()
| 85.42 | 8,155 | 0.729962 | 2,558 | 12,813 | 3.599687 | 0.127052 | 0.525195 | 0.292246 | 0.14205 | 0.421481 | 0.383362 | 0.363705 | 0.345352 | 0.311251 | 0.311251 | 0 | 0.306829 | 0.061656 | 12,813 | 149 | 8,156 | 85.993289 | 0.459037 | 0.014595 | 0 | 0.352941 | 0 | 0.02521 | 0.390515 | 0.355936 | 0 | 1 | 0 | 0 | 0.369748 | 1 | 0.10084 | false | 0 | 0.02521 | 0 | 0.134454 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
7cb3cf244a9104c3b80b10eee5a24952750d6153 | 1,835 | py | Python | pyvista/examples/hdr.py | eino/pyvista | b9c4e67d43491958f70b04cd2664965b938910ba | [
"MIT"
] | 1,107 | 2019-05-13T06:40:26.000Z | 2022-03-31T22:16:32.000Z | pyvista/examples/hdr.py | eino/pyvista | b9c4e67d43491958f70b04cd2664965b938910ba | [
"MIT"
] | 1,709 | 2019-05-13T05:52:42.000Z | 2022-03-31T18:16:53.000Z | pyvista/examples/hdr.py | eino/pyvista | b9c4e67d43491958f70b04cd2664965b938910ba | [
"MIT"
] | 225 | 2019-05-16T04:24:20.000Z | 2022-03-31T18:14:02.000Z | """HDR texture examples."""
from .downloads import _download_and_read
def download_dikhololo_night(): # pragma: no cover
"""Download and read the dikholo night hdr texture example.
Files hosted at https://polyhaven.com/
Returns
-------
pyvista.texture
HDR Texture.
Examples
--------
>>> import pyvista
>>> from pyvista import examples # doctest:+SKIP
>>> gltf_file = examples.gltf.download_damaged_helmet() # doctest:+SKIP
>>> texture = examples.hdr.download_dikhololo_night() # doctest:+SKIP
>>> pl = pyvista.Plotter() # doctest:+SKIP
>>> pl.import_gltf(gltf_file) # doctest:+SKIP
>>> pl.set_environment_texture(texture) # doctest:+SKIP
>>> pl.show() # doctest:+SKIP
"""
texture = _download_and_read('dikhololo_night_4k.hdr', texture=True)
texture.SetColorModeToDirectScalars()
texture.SetMipmap(True)
texture.SetInterpolate(True)
return texture
def download_parched_canal(): # pragma: no cover
"""Download and read the parched canal hdr texture example.
Files hosted at https://polyhaven.com/
Returns
-------
pyvista.texture
HDR Texture.
Examples
--------
>>> import pyvista
>>> from pyvista import examples # doctest:+SKIP
>>> gltf_file = examples.gltf.download_damaged_helmet() # doctest:+SKIP
>>> texture = examples.hdr.download_parched_canal() # doctest:+SKIP
>>> pl = pyvista.Plotter() # doctest:+SKIP
>>> pl.import_gltf(gltf_file) # doctest:+SKIP
>>> pl.set_environment_texture(texture) # doctest:+SKIP
>>> pl.show() # doctest:+SKIP
"""
texture = _download_and_read('parched_canal_4k.hdr', texture=True)
texture.SetColorModeToDirectScalars()
texture.SetMipmap(True)
texture.SetInterpolate(True)
return texture
| 29.596774 | 76 | 0.661035 | 201 | 1,835 | 5.860697 | 0.223881 | 0.13073 | 0.088285 | 0.035654 | 0.850594 | 0.850594 | 0.850594 | 0.797963 | 0.797963 | 0.797963 | 0 | 0.001371 | 0.204905 | 1,835 | 61 | 77 | 30.081967 | 0.806032 | 0.639782 | 0 | 0.615385 | 0 | 0 | 0.082031 | 0.042969 | 0 | 0 | 0 | 0 | 0 | 1 | 0.153846 | false | 0 | 0.076923 | 0 | 0.384615 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
7cde1cf28319ebbb784e3e938ff516f7ee582e6c | 161 | py | Python | src/scraper_ui/admin.py | gsagrawal/scraperpy | c139f92ffd22d1b167bf8be84849595fb30114e1 | [
"MIT"
] | 2 | 2016-09-14T05:08:30.000Z | 2016-09-14T05:08:52.000Z | src/scraper_ui/admin.py | gsagrawal/scraperpy | c139f92ffd22d1b167bf8be84849595fb30114e1 | [
"MIT"
] | 1 | 2021-01-23T19:34:07.000Z | 2021-01-23T19:34:07.000Z | src/scraper_ui/admin.py | gsagrawal/scraperpy | c139f92ffd22d1b167bf8be84849595fb30114e1 | [
"MIT"
] | 3 | 2016-01-18T06:13:34.000Z | 2019-03-11T00:32:46.000Z | from django.contrib import admin
from scraper_ui.models import Poll
from scraper_ui.models import Choice
admin.site.register(Choice)
admin.site.register(Poll)
| 20.125 | 36 | 0.832298 | 25 | 161 | 5.28 | 0.48 | 0.166667 | 0.19697 | 0.287879 | 0.378788 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.099379 | 161 | 7 | 37 | 23 | 0.910345 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.6 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
7cea4d1bc74520316a5b086056c0658809c4478d | 282 | py | Python | Inventory_Home/adminInv/views.py | shaykhsiddique/Inventory-management-with-Django | 2313c5b460dafe817399213cabf91b66dd2c0b24 | [
"Apache-2.0"
] | 1 | 2020-06-18T23:42:55.000Z | 2020-06-18T23:42:55.000Z | Inventory_Home/adminInv/views.py | shaykhsiddique/Inventory-management-with-Django | 2313c5b460dafe817399213cabf91b66dd2c0b24 | [
"Apache-2.0"
] | 11 | 2020-06-20T09:12:11.000Z | 2020-06-20T09:33:07.000Z | Inventory_Home/adminInv/views.py | MarzanulHoque/Inventory-management-with-Django | 2313c5b460dafe817399213cabf91b66dd2c0b24 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.http import HttpResponse
from django.shortcuts import render
def login(request):
return render(request,'adminInv/login.html')
def register(request):
return render(request,'adminInv/register.html')
| 28.2 | 51 | 0.769504 | 36 | 282 | 5.888889 | 0.555556 | 0.09434 | 0.179245 | 0.245283 | 0.320755 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004032 | 0.120567 | 282 | 9 | 52 | 31.333333 | 0.850806 | 0.074468 | 0 | 0 | 0 | 0 | 0.158301 | 0.084942 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0.428571 | 0.285714 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 6 |
6b2f3b952149ff55c2d4c4bdea01b1b1d45e76f9 | 29,488 | py | Python | test/unit/test_buildconfigurations.py | vibe13/pnc-cli | 9020462cac5254bdd40cc7d8fa239433242cce45 | [
"Apache-2.0"
] | 2 | 2016-05-18T15:01:34.000Z | 2016-08-11T14:04:17.000Z | test/unit/test_buildconfigurations.py | vibe13/pnc-cli | 9020462cac5254bdd40cc7d8fa239433242cce45 | [
"Apache-2.0"
] | 47 | 2016-06-23T19:58:40.000Z | 2020-03-10T17:58:11.000Z | test/unit/test_buildconfigurations.py | vibe13/pnc-cli | 9020462cac5254bdd40cc7d8fa239433242cce45 | [
"Apache-2.0"
] | 21 | 2016-05-30T20:34:17.000Z | 2021-09-07T13:22:20.000Z | import pytest
from argh import CommandError
import test.testutils
__author__ = 'thauser'
from mock import MagicMock, patch, call
from pnc_cli import buildconfigurations
from pnc_cli import common
from pnc_cli.swagger_client import BuildConfigurationRest
from pnc_cli.swagger_client import ProductsApi
def test_create_build_conf_object():
compare = BuildConfigurationRest()
compare.name = 'test'
result = buildconfigurations.create_build_conf_object(name='test')
assert compare.to_dict() == result.to_dict()
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_specific',
return_value=MagicMock(content=MagicMock(id=1)))
def test_config_id_exists(mock):
result = buildconfigurations.config_id_exists(1)
mock.assert_called_once_with(id=1)
assert result
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_specific',
return_value=None)
def test_config_id_exists_false(mock):
result = buildconfigurations.config_id_exists(5)
mock.assert_called_once_with(id=5)
assert not result
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_all')
def test_get_build_configuration_id_by_name(mock):
mock.return_value = test.testutils.create_mock_list_with_name_attribute()
result = buildconfigurations.get_build_configuration_id_by_name('testerino')
mock.assert_called_once_with(q='name==testerino')
assert result == 1
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_all',
return_value=MagicMock(content=[]))
def test_get_build_configuration_id_by_name_notexist(mock):
result = buildconfigurations.get_build_configuration_id_by_name('doesntexist')
mock.assert_called_once_with(q='name==doesntexist')
assert not result
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.trigger', return_value=MagicMock(content='buildstarted'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_build_id(mock_configs_api, mock_trigger, mock_set_id):
result = buildconfigurations.build_raw(id=1)
mock_set_id.assert_called_once_with(mock_configs_api, 1, None)
mock_trigger.assert_called_once_with(id=1, build_dependencies=True, force_rebuild=False, keep_pod_on_failure=False, temporary_build=False, timestamp_alignment=False, rebuild_mode=common.REBUILD_MODES_DEFAULT)
assert result == 'buildstarted'
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.trigger', return_value=MagicMock(content='buildstarted'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_build_name(mock_configs_api, mock_trigger, mock_set_id):
result = buildconfigurations.build_raw(name='testerino')
mock_set_id.assert_called_once_with(mock_configs_api, None, 'testerino')
mock_trigger.assert_called_once_with(id=1, build_dependencies=True, force_rebuild=False, keep_pod_on_failure=False, temporary_build=False, timestamp_alignment=False, rebuild_mode=common.REBUILD_MODES_DEFAULT)
assert result == 'buildstarted'
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_specific', return_value=MagicMock(content='buildconfiguration'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_get_build_configuration_id(mock_configs_api, mock_get_specific, mock_set_id):
result = buildconfigurations.get_build_configuration_raw(id=1)
mock_set_id.assert_called_once_with(mock_configs_api, 1, None)
mock_get_specific.assert_called_once_with(id=1)
assert result == 'buildconfiguration'
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_specific', return_value=MagicMock(content='buildconfiguration'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_get_build_configuration_id(mock_configs_api, mock_get_specific, mock_set_id):
result = buildconfigurations.get_build_configuration_raw(name='testerino')
mock_set_id.assert_called_once_with(mock_configs_api, None, 'testerino')
mock_get_specific.assert_called_once_with(id=1)
assert result == 'buildconfiguration'
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_specific')
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.update', return_value=MagicMock(content='SUCCESS'))
@patch('pnc_cli.common.get_entity', return_value='mock-entity')
@patch('pnc_cli.buildconfigurations.pnc_api.projects', autospec=True)
@patch('pnc_cli.buildconfigurations.pnc_api.environments', autospec=True)
def test_update_build_configuration(mock_envs_api, mock_projects_api, mock_entity, mock_update, mock_get_specific):
mock = MagicMock()
mockcontent = MagicMock(content=mock)
mock_get_specific.return_value = mockcontent
result = buildconfigurations.update_build_configuration_raw(id=1, build_script='mvn install', project=1, environment=1)
mock_entity.assert_has_calls([call(mock_projects_api, 1), call(mock_envs_api, 1)])
mock_get_specific.assert_called_once_with(id=1)
# object returned by get_specific is appropriately modified
assert getattr(mock, 'build_script') == 'mvn install'
mock_update.assert_called_once_with(id=1, body=mock)
assert result == 'SUCCESS'
@patch('pnc_cli.buildconfigurations.create_build_conf_object', return_value='test-build-config-object')
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.create_new', return_value=MagicMock(content='test-build-config-object'))
@patch('pnc_cli.common.get_entity', return_value='mock-entity')
@patch('pnc_cli.buildconfigurations.pnc_api.projects', autospec=True)
@patch('pnc_cli.buildconfigurations.pnc_api.environments', autospec=True)
@patch('pnc_cli.buildconfigurations.pnc_api.repositories', autospec=True)
def test_create_build_configuration(mock_repos_api, mock_projects_api, mock_envs_api, mock_entity, mock_create_new,
mock_create_build_conf_object):
result = buildconfigurations.create_build_configuration_raw(name='testerino', description='test description', project=1,
environment=1, repository_configuration=1)
mock_create_build_conf_object.assert_called_once_with(name='testerino', description='test description',
project='mock-entity', environment='mock-entity',
repository_configuration="mock-entity")
mock_entity.assert_has_calls([call(mock_envs_api, 1), call(mock_repos_api, 1), call(mock_projects_api, 1)])
mock_create_new.assert_called_once_with(body='test-build-config-object')
assert result == 'test-build-config-object'
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.list_build_configurations_raw', return_value=[])
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.delete_specific', return_value=MagicMock(content=True))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_delete_build_configuration_id(mock_configs_api, mock_delete_specific, mock_list_configs, mock_set_id):
result = buildconfigurations.delete_build_configuration_raw(id=1)
mock_set_id.assert_called_once_with(mock_configs_api, 1, None)
mock_list_configs.assert_called_once_with(page_size=1000000000)
mock_delete_specific.assert_called_once_with(id=1)
assert result
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.list_build_configurations_raw', return_value=[])
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.delete_specific', return_value=MagicMock(content=True))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_delete_build_configuration_name(mock_configs_api, mock_delete_specific, mock_list_configs, mock_set_id):
result = buildconfigurations.delete_build_configuration_raw(name='testerino')
mock_set_id.assert_called_once_with(mock_configs_api, None, 'testerino')
mock_list_configs.assert_called_once_with(page_size=1000000000)
mock_delete_specific.assert_called_once_with(id=1)
assert result
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.list_build_configurations_raw', return_value=[MagicMock(dependency_ids=[1])])
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.delete_specific', return_value=MagicMock(content=True))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_delete_build_configuration_hasdep(mock_configs_api, mock_delete_specific, mock_list_configs, mock_set_id):
with pytest.raises(CommandError):
result = buildconfigurations.delete_build_configuration_raw(id='1')
mock_set_id.assert_called_once_with(mock_configs_api, '1', None)
mock_list_configs.assert_called_once_with(page_size=1000000000)
mock_delete_specific.assert_not_called
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_all_by_product_id', return_value=MagicMock(content=[1, 2, 3]))
@patch('pnc_cli.buildconfigurations.pnc_api.products', autospec=True)
def test_list_build_configurations_for_product_id(mock_products_api, mock_get_all_by_product_id, mock_set_id):
result = buildconfigurations.list_build_configurations_for_product_raw(id=1)
mock_set_id.called_once_with(mock_products_api, 1, None)
mock_get_all_by_product_id.called_once_with(product_id=1, page_index=0, page_size=200, sort="", q="")
assert result == [1, 2, 3]
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_all_by_product_id', return_value=MagicMock(content=[1, 2, 3]))
@patch('pnc_cli.buildconfigurations.pnc_api.products', autospec=True)
def test_list_build_configurations_for_product_name(mock_products_api, mock_get_all_by_product_id, mock_set_id):
result = buildconfigurations.list_build_configurations_for_product_raw(name='testerino')
mock_set_id.called_once_with(mock_products_api, None, 'testerino')
mock_get_all_by_product_id.called_once_with(product_id=1)
assert result == [1, 2, 3]
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_all_by_product_version_id',
return_value=MagicMock(content=[1, 2, 3]))
@patch('pnc_cli.buildconfigurations.pnc_api.products', autospec=ProductsApi)
def test_list_build_configurations_for_product_version(mock_products_api, mock_get_all_by_product_version_id,
mock_set_id):
result = buildconfigurations.list_build_configurations_for_product_version_raw(product_id=1, version_id=2)
mock_set_id.assert_called_once_with(mock_products_api, 1, None)
mock_get_all_by_product_version_id.assert_called_once_with(product_id=1, version_id=2, page_index=0, page_size=200, sort="", q="")
assert result == [1, 2, 3]
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_dependencies', return_value=MagicMock(content=['dep1', 'dep2']))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_list_dependencies_id(mock_configs_api, mock_get_dependencies, mock_set_id):
result = buildconfigurations.list_dependencies_raw(id=1)
mock_set_id.assert_called_once_with(mock_configs_api, 1, None)
mock_get_dependencies.assert_called_once_with(id=1, page_index=0, page_size=200, sort="", q="")
assert result == ['dep1', 'dep2']
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_dependencies', return_value=MagicMock(content=['dep1', 'dep2']))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_list_dependencies_name(mock_configs_api, mock_get_dependencies, mock_set_id):
result = buildconfigurations.list_dependencies_raw(name='testerino')
mock_set_id.assert_called_once_with(mock_configs_api, None, 'testerino')
mock_get_dependencies.assert_called_once_with(id=1, page_index=0, page_size=200, sort="", q="")
assert result == ['dep1', 'dep2']
@patch('pnc_cli.common.set_id', side_effect=[1, 2])
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_specific', return_value=MagicMock(content='added-dep'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.add_dependency', return_value=MagicMock(content='SUCCESS'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_add_dependency_ids(mock_configs_api, mock_add_dependency, mock_get_specific, mock_set_id):
result = buildconfigurations.add_dependency_raw(id=1, dependency_id=2)
calls = [call(mock_configs_api, 1, None), call(mock_configs_api, 2, None)]
mock_set_id.assert_has_calls(calls)
mock_get_specific.assert_called_once_with(id=2)
mock_add_dependency.assert_called_once_with(id=1, body='added-dep')
assert result == 'SUCCESS'
@patch('pnc_cli.common.set_id', side_effect=[1, 2])
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_specific', return_value=MagicMock(content='added-dep'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.add_dependency', return_value=MagicMock(content='SUCCESS'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_add_dependency_id_name(mock_configs_api, mock_add_dependency, mock_get_specific, mock_set_id):
result = buildconfigurations.add_dependency_raw(id=1, dependency_name='testerino')
calls = [call(mock_configs_api, 1, None), call(mock_configs_api, None, 'testerino')]
mock_set_id.assert_has_calls(calls)
mock_get_specific.assert_called_once_with(id=2)
mock_add_dependency.assert_called_once_with(id=1, body='added-dep')
assert result == 'SUCCESS'
@patch('pnc_cli.common.set_id', side_effect=[1, 2])
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_specific', return_value=MagicMock(content='added-dep'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.add_dependency', return_value=MagicMock(content='SUCCESS'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_add_dependency_name_id(mock_configs_api, mock_add_dependency, mock_get_specific, mock_set_id):
result = buildconfigurations.add_dependency_raw(name='testerino', dependency_id=2)
calls = [call(mock_configs_api, None, 'testerino'), call(mock_configs_api, 2, None)]
mock_set_id.assert_has_calls(calls)
mock_get_specific.assert_called_once_with(id=2)
mock_add_dependency.assert_called_once_with(id=1, body='added-dep')
assert result == 'SUCCESS'
@patch('pnc_cli.common.set_id', side_effect=[1, 2])
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_specific', return_value=MagicMock(content='added-dep'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.add_dependency', return_value=MagicMock(content='SUCCESS'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_add_dependency_names(mock_configs_api, mock_add_dependency, mock_get_specific, mock_set_id):
result = buildconfigurations.add_dependency_raw(name='testerino', dependency_name='testerino2')
calls = [call(mock_configs_api, None, 'testerino'), call(mock_configs_api, None, 'testerino2')]
mock_set_id.assert_has_calls(calls)
mock_get_specific.assert_called_once_with(id=2)
mock_add_dependency.assert_called_once_with(id=1, body='added-dep')
assert result == 'SUCCESS'
@patch('pnc_cli.common.set_id', side_effect=[1, 2])
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.remove_dependency', return_value=MagicMock(content='SUCCESS'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_remove_dependency_ids(mock_configs_api, mock_remove_dependency, mock_set_id):
result = buildconfigurations.remove_dependency_raw(id=1, dependency_id=2)
calls = [call(mock_configs_api, 1, None), call(mock_configs_api, 2, None)]
mock_set_id.assert_has_calls(calls)
mock_remove_dependency.assert_called_once_with(id=1, dependency_id=2)
assert result == 'SUCCESS'
@patch('pnc_cli.common.set_id', side_effect=[1, 2])
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.remove_dependency', return_value=MagicMock(content='SUCCESS'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_remove_dependency_id_name(mock_configs_api, mock_remove_dependency, mock_set_id):
result = buildconfigurations.remove_dependency_raw(id=1, dependency_name='testerino')
calls = [call(mock_configs_api, 1, None), call(mock_configs_api, None, 'testerino')]
mock_set_id.assert_has_calls(calls)
mock_remove_dependency.assert_called_once_with(id=1, dependency_id=2)
assert result == 'SUCCESS'
@patch('pnc_cli.common.set_id', side_effect=[1, 2])
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.remove_dependency', return_value=MagicMock(content='SUCCESS'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_remove_dependency_name_id(mock_configs_api, mock_remove_dependency, mock_set_id):
result = buildconfigurations.remove_dependency_raw(name='testerino', dependency_id=2)
calls = [call(mock_configs_api, None, 'testerino'), call(mock_configs_api, 2, None)]
mock_set_id.assert_has_calls(calls)
mock_remove_dependency.assert_called_once_with(id=1, dependency_id=2)
assert result == 'SUCCESS'
@patch('pnc_cli.common.set_id', side_effect=[1, 2])
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.remove_dependency', return_value=MagicMock(content='SUCCESS'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_remove_dependency_names(mock_configs_api, mock_remove_dependency, mock_set_id):
result = buildconfigurations.remove_dependency_raw(name='testerino', dependency_name='testerino')
calls = [call(mock_configs_api, None, 'testerino'), call(mock_configs_api, None, 'testerino')]
mock_set_id.assert_has_calls(calls)
mock_remove_dependency.assert_called_once_with(id=1, dependency_id=2)
assert result == 'SUCCESS'
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_product_versions', return_value=MagicMock(content=[1, 2, 3]))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_list_product_versions_for_build_configuration_id(mock_configs_api, mock_get_product_versions, mock_set_id):
result = buildconfigurations.list_product_versions_for_build_configuration_raw(id=1)
mock_set_id.assert_called_once_with(mock_configs_api, 1, None)
mock_get_product_versions.assert_called_once_with(id=1, page_index=0, page_size=200, sort="", q="")
assert result == [1, 2, 3]
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_product_versions', return_value=MagicMock(content=[1, 2, 3]))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_list_product_versions_for_build_configuration_name(mock_configs_api, mock_get_product_versions, mock_set_id):
result = buildconfigurations.list_product_versions_for_build_configuration_raw(name='testerino')
mock_set_id.assert_called_once_with(mock_configs_api, None, 'testerino')
mock_get_product_versions.assert_called_once_with(id=1, page_index=0, page_size=200, sort="", q="")
assert result == [1, 2, 3]
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.common.get_entity', return_value='productversion')
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.add_product_version', return_value=MagicMock(content='testresponse'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
@patch('pnc_cli.buildconfigurations.pnc_api.product_versions', autospec=True)
def test_add_product_version_to_build_configuration_id(mock_versions_api,
mock_configs_api,
mock_add_product_version,
mock_get_entity,
mock_set_id):
result = buildconfigurations.add_product_version_to_build_configuration_raw(id=1, product_version_id=2)
mock_set_id.assert_called_once_with(mock_configs_api, 1, None)
mock_get_entity.assert_called_once_with(mock_versions_api, 2)
mock_add_product_version.assert_called_once_with(id=1, body='productversion')
assert result == 'testresponse'
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.common.get_entity', return_value='productversion')
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.add_product_version', return_value=MagicMock(content='testresponse'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
@patch('pnc_cli.buildconfigurations.pnc_api.product_versions', autospec=True)
def test_add_product_version_to_build_configuration_name(mock_versions_api,
mock_configs_api,
mock_add_product_version,
mock_get_entity,
mock_set_id):
result = buildconfigurations.add_product_version_to_build_configuration_raw(name='testerino', product_version_id=2)
mock_set_id.assert_called_once_with(mock_configs_api, None, 'testerino')
mock_get_entity.assert_called_once_with(mock_versions_api, 2)
mock_add_product_version.assert_called_once_with(id=1, body='productversion')
assert result == 'testresponse'
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.remove_product_version', return_value=MagicMock(content='SUCCESS'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_remove_product_version_from_build_configuration_id(mock_configs_api,
mock_remove_product_version,
mock_set_id):
result = buildconfigurations.remove_product_version_from_build_configuration_raw(id=1, product_version_id=1)
mock_set_id.assert_called_once_with(mock_configs_api, 1, None)
mock_remove_product_version.assert_called_once_with(id=1, product_version_id=1)
assert result == 'SUCCESS'
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.remove_product_version', return_value=MagicMock(content='SUCCESS'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_remove_product_version_from_build_configuration_name(mock_configs_api,
mock_remove_product_version,
mock_set_id):
result = buildconfigurations.remove_product_version_from_build_configuration_raw(name='testerino', product_version_id=1)
mock_set_id.assert_called_once_with(mock_configs_api, None, 'testerino')
mock_remove_product_version.assert_called_once_with(id=1, product_version_id=1)
assert result == 'SUCCESS'
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_revisions', return_value=MagicMock(content=['rev1', 'rev2']))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_list_revisions_of_build_configuration_id(mock_configs_api, mock_get_revisions, mock_set_id):
result = buildconfigurations.list_revisions_of_build_configuration_raw(id=1)
mock_set_id.assert_called_once_with(mock_configs_api, 1, None)
mock_get_revisions.assert_called_once_with(id=1, page_index=0, page_size=200, sort="")
assert result == ['rev1', 'rev2']
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_revisions', return_value=MagicMock(content=['rev1', 'rev2']))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_list_revisions_of_build_configuration(mock_configs_api, mock_get_revisions, mock_set_id):
result = buildconfigurations.list_revisions_of_build_configuration_raw(name='testerino')
mock_set_id.assert_called_once_with(mock_configs_api, None, 'testerino')
mock_get_revisions.assert_called_once_with(id=1, page_index=0, page_size=200, sort="")
assert result == ['rev1', 'rev2']
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_revision', return_value=MagicMock(content='test-revision'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_get_revision_of_build_configuration_id(mock_configs_api, mock_get_revision, mock_set_id):
result = buildconfigurations.get_revision_of_build_configuration_raw(id=1, revision_id=1)
mock_set_id.assert_called_once_with(mock_configs_api, 1, None)
mock_get_revision.assert_called_once_with(id=1, rev=1)
assert result == 'test-revision'
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_revision', return_value=MagicMock(content='test-revision'))
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs', autospec=True)
def test_get_revision_of_build_configuration_name(mock_configs_api, mock_get_revision, mock_set_id):
result = buildconfigurations.get_revision_of_build_configuration_raw(name="testerino", revision_id=1)
mock_set_id.assert_called_once_with(mock_configs_api, None, 'testerino')
mock_get_revision.assert_called_once_with(id=1, rev=1)
assert result == 'test-revision'
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_all_by_project_id', return_value=MagicMock(content=[1, 2, 3]))
@patch('pnc_cli.buildconfigurations.pnc_api.projects', autospec=True)
def test_list_build_configurations_for_project_id(mock_projects_api, mock_get_all_by_project_id, mock_set_id):
result = buildconfigurations.list_build_configurations_for_project_raw(id=1)
mock_set_id.assert_called_once_with(mock_projects_api, 1, None)
mock_get_all_by_project_id.assert_called_once_with(project_id=1, page_index=0, page_size=200, sort="", q="")
assert result == [1, 2, 3]
@patch('pnc_cli.common.set_id', return_value=1)
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_all_by_project_id', return_value=MagicMock(content=[1, 2, 3]))
@patch('pnc_cli.buildconfigurations.pnc_api.projects', autospec=True)
def test_list_build_configurations_for_project_name(mock_projects_api, mock_get_all_by_project_id, mock_set_id):
result = buildconfigurations.list_build_configurations_for_project_raw(name='testerino-project')
mock_set_id.assert_called_once_with(mock_projects_api, None, 'testerino-project')
mock_get_all_by_project_id.assert_called_once_with(project_id=1, page_index=0, page_size=200, sort="", q="")
assert result == [1, 2, 3]
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_all', return_value=MagicMock(content=[1, 2, 3]))
def test_list_build_configurations(mock):
result = buildconfigurations.list_build_configurations_raw()
mock.assert_called_once_with(page_index=0, page_size=200, sort="", q="")
assert result == [1, 2, 3]
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.trigger_audited', return_value=MagicMock(content='SUCCESS'))
def test_build_a_revision(mock_trigger_audited):
result = buildconfigurations.build_raw(1, revision=2, temporary_build=True, force_rebuild=True)
mock_trigger_audited.assert_called_once_with(id=1, rev=2, temporary_build=True, force_rebuild=True,
timestamp_alignment=False, build_dependencies=True,
keep_pod_on_failure=False, rebuild_mode=common.REBUILD_MODES_DEFAULT)
assert result == 'SUCCESS'
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.get_specific')
@patch('pnc_cli.buildconfigurations.pnc_api.build_configs.update_and_get_audited', return_value=MagicMock(content='SUCCESS'))
@patch('pnc_cli.common.get_entity', return_value='mock-entity')
@patch('pnc_cli.buildconfigurations.pnc_api.projects', autospec=True)
@patch('pnc_cli.buildconfigurations.pnc_api.environments', autospec=True)
def test_update_and_get_audited(mock_envs_api, mock_projects_api, mock_entity, mock_update, mock_get_specific):
mock = MagicMock()
mockcontent = MagicMock(content=mock)
mock_get_specific.return_value = mockcontent
result = buildconfigurations.update_build_configuration_raw(id=1, build_script='mvn install', project=1, environment=1, get_revision=True)
mock_entity.assert_has_calls([call(mock_projects_api, 1), call(mock_envs_api, 1)])
mock_get_specific.assert_called_once_with(id=1)
# object returned by get_specific is appropriately modified
assert getattr(mock, 'build_script') == 'mvn install'
mock_update.assert_called_once_with(id=1, body=mock)
assert result == 'SUCCESS'
| 60.92562 | 212 | 0.7871 | 4,115 | 29,488 | 5.213609 | 0.035237 | 0.037196 | 0.066142 | 0.128647 | 0.945511 | 0.927007 | 0.905798 | 0.89009 | 0.871679 | 0.866132 | 0 | 0.011606 | 0.105874 | 29,488 | 483 | 213 | 61.05176 | 0.802094 | 0.0039 | 0 | 0.642132 | 0 | 0 | 0.249847 | 0.20875 | 0 | 0 | 0 | 0 | 0.322335 | 1 | 0.106599 | false | 0 | 0.020305 | 0 | 0.126904 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
868dd2e200872772dc7a9f8a61b42865b624bc55 | 194 | py | Python | contact/urls.py | tamuseanmiller/Politistats | 4273d4c2488b28207019e42c003ba67a26294082 | [
"MIT"
] | 1 | 2021-01-14T05:12:51.000Z | 2021-01-14T05:12:51.000Z | contact/urls.py | tamuseanmiller/Politistats | 4273d4c2488b28207019e42c003ba67a26294082 | [
"MIT"
] | null | null | null | contact/urls.py | tamuseanmiller/Politistats | 4273d4c2488b28207019e42c003ba67a26294082 | [
"MIT"
] | null | null | null | from django.urls import path
from contact import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('', views.contact, name='contact'),
] | 24.25 | 44 | 0.762887 | 27 | 194 | 5.481481 | 0.444444 | 0.202703 | 0.189189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.139175 | 194 | 8 | 45 | 24.25 | 0.886228 | 0 | 0 | 0 | 0 | 0 | 0.035897 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.571429 | 0 | 0.571429 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
86ac3bebbb67c3423318a778116577728bedfcd5 | 31 | py | Python | transposition/nmcipher/transposition/__init__.py | neilmarshall/ciphers | 9a50afd1851a199fccc7c0e6802075e3e6af96eb | [
"MIT"
] | null | null | null | transposition/nmcipher/transposition/__init__.py | neilmarshall/ciphers | 9a50afd1851a199fccc7c0e6802075e3e6af96eb | [
"MIT"
] | null | null | null | transposition/nmcipher/transposition/__init__.py | neilmarshall/ciphers | 9a50afd1851a199fccc7c0e6802075e3e6af96eb | [
"MIT"
] | null | null | null | from .columnar import Columnar
| 15.5 | 30 | 0.83871 | 4 | 31 | 6.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.129032 | 31 | 1 | 31 | 31 | 0.962963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
86cd8ea6e3e1a70d7fa71fd5d6a184d14ea4fd6e | 47 | py | Python | python/testData/refactoring/inlineFunction/nestedCalls/main.after.py | tgodzik/intellij-community | f5ef4191fc30b69db945633951fb160c1cfb7b6f | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/refactoring/inlineFunction/nestedCalls/main.after.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2022-02-19T09:45:05.000Z | 2022-02-27T20:32:55.000Z | python/testData/refactoring/inlineFunction/nestedCalls/main.after.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | print("fun called")
print("fun called")
res = 1 | 15.666667 | 19 | 0.680851 | 8 | 47 | 4 | 0.625 | 0.5 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02439 | 0.12766 | 47 | 3 | 20 | 15.666667 | 0.756098 | 0 | 0 | 0.666667 | 0 | 0 | 0.416667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.666667 | 1 | 1 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
86e392c913260f26ddab5406e3a4946af438e469 | 100 | py | Python | solutions/server/server-14-login-logout-user/server/routes/__init__.py | FroeMic/CDTM-Backend-Workshop | de3ef16dc89dfd1217565ab2dd4aec753e59cda0 | [
"MIT"
] | null | null | null | solutions/server/server-14-login-logout-user/server/routes/__init__.py | FroeMic/CDTM-Backend-Workshop | de3ef16dc89dfd1217565ab2dd4aec753e59cda0 | [
"MIT"
] | null | null | null | solutions/server/server-14-login-logout-user/server/routes/__init__.py | FroeMic/CDTM-Backend-Workshop | de3ef16dc89dfd1217565ab2dd4aec753e59cda0 | [
"MIT"
] | null | null | null | from general import *
from list import *
from task import *
from upload import *
from user import *
| 16.666667 | 21 | 0.75 | 15 | 100 | 5 | 0.466667 | 0.533333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 100 | 5 | 22 | 20 | 0.9375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
86f1121b5a8259131026ec90e8117bee60d5a95f | 28,621 | py | Python | e2e/cli/buckets/versioning/test_data_storage_versioning.py | NShaforostov/cloud-pipeline | 8d25b2b5f4838be569d9c25a307b77df5b0e73fc | [
"Apache-2.0"
] | null | null | null | e2e/cli/buckets/versioning/test_data_storage_versioning.py | NShaforostov/cloud-pipeline | 8d25b2b5f4838be569d9c25a307b77df5b0e73fc | [
"Apache-2.0"
] | 1 | 2019-03-25T10:32:44.000Z | 2019-03-27T17:45:19.000Z | e2e/cli/buckets/versioning/test_data_storage_versioning.py | NShaforostov/cloud-pipeline | 8d25b2b5f4838be569d9c25a307b77df5b0e73fc | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2020 EPAM Systems, Inc. (https://www.epam.com/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import pytest
from buckets.utils.cloud.azure_client import AzureClient
from buckets.utils.cloud.utilities import object_exists, get_versions
from buckets.utils.listing import *
from buckets.utils.file_utils import *
from common_utils.pipe_cli import *
ERROR_MESSAGE = "An error occurred in case "
@pytest.mark.skipif(os.environ['CP_PROVIDER'] == AzureClient.name, reason="Versioning is not supported for AZURE provider")
class TestDataStorageVersioning(object):
test_file_1 = "versioning1.txt"
test_file_1_without_extension = "versioning1"
test_file_2 = "versioning2.txt"
test_file_3 = "versioning3.txt"
test_folder_1 = "test_folder1"
test_folder_2 = "test_folder2"
test_folder_3 = "test_folder3"
bucket = 'epmcmbibpc-versioning-it{}'.format(get_test_prefix())
path_to_bucket = 'cp://{}'.format(bucket)
token = os.environ['USER_TOKEN']
user = os.environ['TEST_USER']
@classmethod
def setup_class(cls):
create_data_storage(cls.bucket, versioning=True)
create_test_file(os.path.abspath(cls.test_file_1), TestFiles.DEFAULT_CONTENT)
create_test_file(os.path.abspath(cls.test_file_2), TestFiles.COPY_CONTENT)
@classmethod
def teardown_class(cls):
clean_test_data(os.path.abspath(cls.test_file_1))
clean_test_data(os.path.abspath(cls.test_file_2))
delete_data_storage(cls.bucket)
def teardown_method(self, method):
pipe_output = get_pipe_listing(self.path_to_bucket, recursive=True)
for record in pipe_output:
pipe_storage_rm('cp://{}/{}'.format(self.bucket, record.name), args=['--hard-delete'], recursive=True,
expected_status=None)
pipe_output = get_pipe_listing(self.path_to_bucket, recursive=True)
assert len(pipe_output) == 0
pipe_storage_rm('cp://{}/{}'.format(self.bucket, self.test_file_1), args=['--hard-delete'], recursive=True,
expected_status=None)
pipe_storage_rm('cp://{}/{}'.format(self.bucket, self.test_folder_1), args=['--hard-delete'], recursive=True,
expected_status=None)
def test_list_marked_for_deletion_object(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
try:
pipe_storage_cp(self.test_file_1, destination)
pipe_storage_rm(destination)
actual_output = get_pipe_listing(self.path_to_bucket)
assert len(actual_output) == 0
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing(self.path_to_bucket, versioning=True))
expected_output = [
f(self.test_file_1, deleted=True, latest=True),
f(self.test_file_1, 10, added=True)
]
compare_listing(actual_output, expected_output, 2)
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-877:" + "\n" + e.message)
def test_restore_marked_for_deletion_file(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
try:
pipe_storage_cp(self.test_file_1, destination)
pipe_storage_rm(destination)
output = pipe_storage_ls(self.path_to_bucket, show_details=False)[0]
assert len(output) == 0
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing(self.path_to_bucket, versioning=True))
expected_output = [
f(self.test_file_1, deleted=True, latest=True),
f(self.test_file_1, 10, added=True)
]
compare_listing(actual_output, expected_output, 2)
pipe_storage_restore(destination)
actual_output = get_pipe_listing(self.path_to_bucket)
expected_output = [
f(self.test_file_1, 10)
]
compare_listing(actual_output, expected_output, 1)
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-881:" + "\n" + e.message)
def test_object_versions(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
try:
pipe_storage_cp(self.test_file_1, destination)
pipe_storage_cp(self.test_file_2, destination, force=True) # another file with same name
actual_output = get_pipe_listing(self.path_to_bucket)
expected_output = [
f(self.test_file_1, 14)
]
compare_listing(actual_output, expected_output, 1)
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing(self.path_to_bucket, versioning=True))
expected_output = [
f(self.test_file_1, 14, added=True, latest=True),
f(self.test_file_1, 10, added=True)
]
compare_listing(actual_output, expected_output, 2)
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-882:" + "\n" + e.message)
def test_restore_specific_version(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
try:
pipe_storage_cp(self.test_file_1, destination)
pipe_storage_cp(self.test_file_2, destination, force=True)
pipe_storage_rm(destination)
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing(self.path_to_bucket, versioning=True))
expected_output = [
f(self.test_file_1, deleted=True, latest=True),
f(self.test_file_1, 14, added=True),
f(self.test_file_1, 10, added=True)
]
compare_listing(actual_output, expected_output, 3, sort=False)
version = get_non_latest_version(actual_output)
assert version, "No version available to restore."
pipe_storage_restore(destination, version=version, expected_status=0)
actual_output = get_pipe_listing(self.path_to_bucket)
expected_output = [
f(self.test_file_1, 14)
]
compare_listing(actual_output, expected_output, 1)
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-883:" + "\n" + e.message)
def test_object_hard_deletion(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
try:
pipe_storage_cp(os.path.abspath(self.test_file_1), destination)
pipe_storage_rm(destination, args=['--hard-delete'])
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing(self.path_to_bucket, versioning=True), result_not_empty=False)
expected_output = []
compare_listing(actual_output, expected_output, 0)
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-884:" + "\n" + e.message)
def test_marked_object_hard_deletion(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
try:
pipe_storage_cp(os.path.abspath(self.test_file_1), destination)
pipe_storage_rm(destination)
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing(self.path_to_bucket, versioning=True))
expected_output = [
f(self.test_file_1, deleted=True, latest=True),
f(self.test_file_1, 10, added=True),
]
compare_listing(actual_output, expected_output, 2)
pipe_storage_rm(destination, args=['--hard-delete'], recursive=True)
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing(self.path_to_bucket, versioning=True), result_not_empty=False)
expected_output = []
compare_listing(actual_output, expected_output, 0)
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-993:" + "\n" + e.message)
def test_mark_for_deletion_non_empty_folder(self):
destination_1 = 'cp://{}/{}/{}'.format(self.bucket, self.test_folder_1, self.test_file_1)
try:
pipe_storage_cp(os.path.abspath(self.test_file_1), destination_1)
pipe_storage_rm('cp://{}/{}'.format(self.bucket, self.test_folder_1), recursive=True)
actual_output = get_pipe_listing(self.path_to_bucket)
assert len(actual_output) == 0
actual_output = get_pipe_listing(self.path_to_bucket, versioning=True)
assert len(actual_output) == 1 and self.test_folder_1 in actual_output[0].name
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing('cp://{}/{}'.format(self.bucket, self.test_folder_1), versioning=True, recursive=True))
expected_output = [
f('{}/{}'.format(self.test_folder_1, self.test_file_1), deleted=True, latest=True),
f('{}/{}'.format(self.test_folder_1, self.test_file_1), 10, added=True)
]
compare_listing(actual_output, expected_output, 2)
pipe_storage_restore('cp://{}/{}'.format(self.bucket, self.test_folder_1), expected_status=0,
recursive=True)
actual_output = get_pipe_listing(self.path_to_bucket)
assert len(actual_output) == 1 and self.test_folder_1 in actual_output[0].name
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing('cp://{}/{}'.format(self.bucket, self.test_folder_1), versioning=True, recursive=True))
expected_output = [
f('{}/{}'.format(self.test_folder_1, self.test_file_1), 10, added=True, latest=True),
f('{}/{}'.format(self.test_folder_1, self.test_file_1), 10, added=True)
]
compare_listing(actual_output, expected_output, 2, sort=False)
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-885-886:" + "\n" + e.message)
def test_hard_deletion_non_empty_folder(self):
destination_1 = 'cp://{}/{}/{}/{}'.format(self.bucket, self.test_folder_1, self.test_folder_2, self.test_file_1)
destination_2 = 'cp://{}/{}/{}'.format(self.bucket, self.test_folder_1, self.test_file_1)
try:
pipe_storage_cp(os.path.abspath(self.test_file_1), destination_1)
pipe_storage_cp(os.path.abspath(self.test_file_1), destination_2)
pipe_storage_rm('cp://{}/{}'.format(self.bucket, self.test_folder_1), args=['--hard-delete'],
recursive=True)
actual_output = get_pipe_listing('cp://{}/{}'.format(self.bucket, self.test_folder_1))
assert len(actual_output) == 0
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing('cp://{}/{}'.format(self.bucket, self.test_folder_1), versioning=True),
result_not_empty=False)
expected_output = []
compare_listing(actual_output, expected_output, 0)
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-887:" + "\n" + e.message)
def test_hard_deletion_marked_non_empty_folder(self):
destination_1 = 'cp://{}/{}/{}/{}'.format(self.bucket, self.test_folder_1, self.test_folder_2, self.test_file_1)
destination_2 = 'cp://{}/{}/{}'.format(self.bucket, self.test_folder_1, self.test_file_1)
try:
pipe_storage_cp(os.path.abspath(self.test_file_1), destination_1)
pipe_storage_cp(os.path.abspath(self.test_file_1), destination_2)
pipe_storage_rm('cp://{}/{}'.format(self.bucket, self.test_folder_1), recursive=True)
actual_output = get_pipe_listing(self.path_to_bucket)
assert len(actual_output) == 0
actual_output = get_pipe_listing(self.path_to_bucket, versioning=True)
assert len(actual_output) == 1 and self.test_folder_1 in actual_output[0].name
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing('cp://{}/{}'.format(self.bucket, self.test_folder_1), versioning=True, recursive=True))
expected_output = [
f('{}/{}'.format(self.test_folder_1, self.test_file_1), deleted=True, latest=True),
f('{}/{}'.format(self.test_folder_1, self.test_file_1), 10, added=True),
f('{}/{}/{}'.format(self.test_folder_1, self.test_folder_2, self.test_file_1),
deleted=True, latest=True),
f('{}/{}/{}'.format(self.test_folder_1, self.test_folder_2, self.test_file_1), 10, added=True)
]
compare_listing(actual_output, expected_output, 4)
pipe_storage_rm('cp://{}/{}'.format(self.bucket, self.test_folder_1), args=['--hard-delete'],
recursive=True)
actual_output = get_pipe_listing('cp://{}/{}'.format(self.bucket, self.test_folder_1))
assert len(actual_output) == 0
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing('cp://{}/{}'.format(self.bucket, self.test_folder_1), versioning=True),
result_not_empty=False)
expected_output = []
compare_listing(actual_output, expected_output, 0)
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-998:" + "\n" + e.message)
def test_mark_for_delete_non_existing_file(self):
destination = 'cp://{}/{}'.format(self.bucket, TestFiles.NOT_EXISTS_FILE)
try:
error_message = pipe_storage_rm(destination, recursive=True, expected_status=1)[1]
assert 'Storage path "{}" was not found'.format(destination) in error_message[0]
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-945:" + "\n" + e.message)
def test_hard_delete_non_existing_file(self):
destination = 'cp://{}/{}'.format(self.bucket, TestFiles.NOT_EXISTS_FILE)
try:
error_message = pipe_storage_rm(destination, recursive=True, expected_status=1, args=['--hard-delete'])[1]
assert 'Storage path "{}" was not found'.format(destination) in error_message[0]
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-946:" + "\n" + e.message)
def test_restore_non_existing_version(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
not_existing_version = 'does-not-exist'
try:
pipe_storage_cp(self.test_file_1, destination)
pipe_storage_cp(self.test_file_2, destination, force=True) # another file with same name
error_message = pipe_storage_restore(destination, expected_status=1, version=not_existing_version)[1]
assert 'Error: Version "{}" doesn\'t exist.'.format(not_existing_version) in error_message[0]
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-947:" + "\n" + e.message)
def test_restore_not_removed_object(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
try:
pipe_storage_cp(self.test_file_1, destination)
error_message = pipe_storage_restore(destination, expected_status=1)[1]
assert 'Error: Latest file version is not deleted. Please specify "--version" parameter.'\
in error_message[0]
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-948:" + "\n" + e.message)
def test_restore_latest_version(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
try:
pipe_storage_cp(self.test_file_1, destination)
pipe_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing(destination, versioning=True))
version_id = get_latest_version(pipe_output)
error_message = pipe_storage_restore(destination, version=version_id, expected_status=1)[1]
assert 'Version "{}" is already the latest version'.format(version_id)\
in error_message[0]
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-949:" + "\n" + e.message)
def test_role_model_marked_object_deletion(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
try:
set_storage_permission(self.user, self.bucket, allow='r')
set_storage_permission(self.user, self.bucket, allow='w')
pipe_storage_cp(os.path.abspath(self.test_file_1), destination, token=self.token)
pipe_storage_rm(destination, token=self.token)
pipe_output = get_pipe_listing(self.path_to_bucket)
assert len(pipe_output) == 0
pipe_output = pipe_storage_ls(self.path_to_bucket, expected_status=1, token=self.token, versioning=True)[1]
assert "Access is denied" in pipe_output[0]
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-889:" + "\n" + e.message)
def test_role_model_object_versions(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
try:
set_storage_permission(self.user, self.bucket, allow='r')
set_storage_permission(self.user, self.bucket, allow='w')
pipe_storage_cp(self.test_file_1, destination, token=self.token, expected_status=0)
pipe_storage_cp(self.test_file_2, destination, force=True, token=self.token, expected_status=0)
actual_output = get_pipe_listing(self.path_to_bucket, token=self.token)
expected_output = [
f(self.test_file_1, 14)
]
compare_listing(actual_output, expected_output, 1)
actual_output = pipe_storage_ls(self.path_to_bucket, expected_status=1, token=self.token, versioning=True)[1]
assert "Access is denied" in actual_output[0]
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-891:" + "\n" + e.message)
def test_role_model_restore_latest_version(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
try:
set_storage_permission(self.user, self.bucket, allow='r')
set_storage_permission(self.user, self.bucket, allow='w')
pipe_storage_cp(self.test_file_1, destination, token=self.token)
pipe_storage_rm(destination, token=self.token)
pipe_output = get_pipe_listing(self.path_to_bucket)
assert len(pipe_output) == 0
pipe_output = pipe_storage_restore(self.path_to_bucket, expected_status=1, token=self.token)[1]
assert "Access is denied" in pipe_output[0]
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-894:" + "\n" + e.message)
def test_role_model_object_hard_deletion(self):
destination = 'cp://{}/{}'.format(self.bucket, self.test_file_1)
try:
set_storage_permission(self.user, self.bucket, allow='r')
set_storage_permission(self.user, self.bucket, allow='w')
pipe_storage_cp(os.path.abspath(self.test_file_1), destination, token=self.token)
pipe_output = pipe_storage_rm(destination, args=['--hard-delete'], token=self.token, expected_status=1)[1]
assert "Access is denied" in pipe_output[0]
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-892:" + "\n" + e.message)
def test_role_model_restore_marked_for_deletion_non_empty_folder(self):
destination_1 = 'cp://{}/{}/{}/{}'.format(self.bucket, self.test_folder_1, self.test_folder_2, self.test_file_1)
destination_2 = 'cp://{}/{}/{}'.format(self.bucket, self.test_folder_1, self.test_file_1)
try:
set_storage_permission(self.user, self.bucket, allow='r')
set_storage_permission(self.user, self.bucket, allow='w')
pipe_storage_cp(os.path.abspath(self.test_file_1), destination_1, expected_status=0)
pipe_storage_cp(os.path.abspath(self.test_file_1), destination_2, expected_status=0)
pipe_storage_rm('cp://{}/{}'.format(self.bucket, self.test_folder_1), recursive=True, token=self.token,
expected_status=0)
pipe_output = get_pipe_listing(self.path_to_bucket)
assert len(pipe_output) == 0
pipe_output = pipe_storage_restore(self.path_to_bucket, expected_status=1, token=self.token)[1]
assert "Access is denied" in pipe_output[0]
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-893:" + "\n" + e.message)
def test_role_model_hard_deletion_marked_non_empty_folder(self):
destination_1 = 'cp://{}/{}/{}/{}'.format(self.bucket, self.test_folder_1, self.test_folder_2, self.test_file_1)
destination_2 = 'cp://{}/{}/{}'.format(self.bucket, self.test_folder_1, self.test_file_1)
try:
set_storage_permission(self.user, self.bucket, allow='r')
set_storage_permission(self.user, self.bucket, allow='w')
pipe_storage_cp(os.path.abspath(self.test_file_1), destination_1, expected_status=0)
pipe_storage_cp(os.path.abspath(self.test_file_1), destination_2, expected_status=0)
pipe_output = pipe_storage_rm('cp://{}/{}'.format(self.bucket, self.test_folder_1), recursive=True,
token=self.token, expected_status=1, args=['--hard-delete'])[1]
assert "Access is denied" in pipe_output[0]
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-895:" + "\n" + e.message)
def test_ls_with_paging(self):
try:
pipe_storage_cp(os.path.abspath(self.test_file_1), "{}/{}".format(self.path_to_bucket, self.test_file_1))
pipe_storage_cp(os.path.abspath(self.test_file_1), "{}/{}/{}".format(self.path_to_bucket,
self.test_folder_1, self.test_file_1))
pipe_storage_cp(os.path.abspath(self.test_file_1), "{}/{}".format(self.path_to_bucket, self.test_file_2))
pipe_storage_cp(os.path.abspath(self.test_file_1), "{}/{}/{}".format(self.path_to_bucket,
self.test_folder_2, self.test_file_1))
pipe_storage_cp(os.path.abspath(self.test_file_1), "{}/{}".format(self.path_to_bucket, self.test_file_3))
pipe_storage_cp(os.path.abspath(self.test_file_1), "{}/{}/{}".format(self.path_to_bucket,
self.test_folder_3, self.test_file_1))
pipe_output = get_pipe_listing(self.path_to_bucket, show_details=False, paging=str(3))
assert len(pipe_output) == 3
pipe_output = get_pipe_listing(self.path_to_bucket, show_details=False, recursive=True, paging=str(3))
assert len(pipe_output) == 3
pipe_output = get_pipe_listing(self.path_to_bucket, paging=str(3))
assert len(pipe_output) == 3
pipe_output = filter_versioned_lines(get_pipe_listing(self.path_to_bucket, show_details=False,
versioning=True, paging=str(3)))
assert len(pipe_output) == 3
pipe_output = filter_versioned_lines(get_pipe_listing(self.path_to_bucket, versioning=True, paging=str(3)))
assert len(pipe_output) == 3
pipe_output = filter_versioned_lines(get_pipe_listing(self.path_to_bucket, versioning=True, recursive=True,
paging=str(3)))
assert len(pipe_output) == 3
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-1024:" + "\n" + e.message)
def test_copy_with_similar_keys(self):
try:
source = os.path.abspath(self.test_file_1)
destination = "cp://{}/{}".format(self.bucket, self.test_file_1)
destination_without_extension = "cp://{}/{}".format(self.bucket, self.test_file_1_without_extension)
pipe_storage_cp(source, destination)
assert object_exists(self.bucket, self.test_file_1)
pipe_storage_cp(source, destination_without_extension)
assert object_exists(self.bucket, self.test_file_1_without_extension)
pipe_storage_rm(destination_without_extension)
assert not object_exists(self.bucket, self.test_file_1_without_extension)
assert object_exists(self.bucket, self.test_file_1)
pipe_storage_rm(destination)
assert not object_exists(self.bucket, self.test_file_1)
except AssertionError as e:
pytest.fail("Test case {} failed. {}".format("EPMCMBIBPC-1337", e.message))
def test_rm_files_with_common_keys(self):
try:
pipe_storage_cp(os.path.abspath(self.test_file_1), "{}/{}".format(self.path_to_bucket,
self.test_file_1_without_extension))
pipe_storage_cp(os.path.abspath(self.test_file_1), "{}/{}".format(self.path_to_bucket, self.test_file_1))
pipe_storage_rm('cp://{}/{}'.format(self.bucket, self.test_file_1_without_extension),
args=['--hard-delete'], recursive=False, expected_status=None)
pipe_output = get_pipe_listing(self.path_to_bucket)
assert len(pipe_output) == 1
except BaseException as e:
pytest.fail(ERROR_MESSAGE + "epmcmbibpc-1283:" + "\n" + e.message)
def test_list_version(self):
destination = "cp://{}/{}".format(self.bucket, self.test_file_1)
try:
pipe_storage_cp(os.path.abspath(self.test_file_1), destination)
pipe_storage_cp(os.path.abspath(self.test_file_1), destination, force=True)
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing(destination, show_details=True, versioning=True))
expected_files = [
f(self.test_file_1, 10, added=True, latest=True),
f(self.test_file_1, 10, added=True)
]
expected_versions = get_versions(self.bucket, self.test_file_1)
for index, expected_file in enumerate(expected_files):
expected_file.version_id = expected_versions[index]
compare_listing(actual_output, expected_files, 2, show_details=True, check_version=True, sort=False)
except AssertionError as e:
pytest.fail(ERROR_MESSAGE + ":\n" + e.message)
def test_list_deleted_version(self):
destination = "cp://{}/{}".format(self.bucket, self.test_file_1)
try:
pipe_storage_cp(os.path.abspath(self.test_file_1), destination)
pipe_storage_rm(destination)
actual_output = assert_and_filter_first_versioned_listing_line(
get_pipe_listing(destination, show_details=True, versioning=True))
expected_files = [
f(self.test_file_1, deleted=True, latest=True),
f(self.test_file_1, 10, added=True)
]
expected_versions = get_versions(self.bucket, self.test_file_1)
for index, expected_file in enumerate(expected_files):
expected_file.version_id = expected_versions[index]
compare_listing(actual_output, expected_files, 2, show_details=True, check_version=True)
except AssertionError as e:
pytest.fail(ERROR_MESSAGE + ":\n" + e.message)
| 58.054767 | 123 | 0.644003 | 3,628 | 28,621 | 4.749449 | 0.066979 | 0.07057 | 0.075213 | 0.076954 | 0.877198 | 0.867912 | 0.845975 | 0.830248 | 0.816087 | 0.784168 | 0 | 0.018554 | 0.241117 | 28,621 | 492 | 124 | 58.172764 | 0.77477 | 0.022326 | 0 | 0.614865 | 0 | 0.02027 | 0.062648 | 0.00093 | 0 | 0 | 0 | 0 | 0.123874 | 1 | 0.063063 | false | 0 | 0.013514 | 0 | 0.103604 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
8126eeec6fb839efb3a31bd0cd507e8a6a0642b9 | 10,120 | py | Python | parlai/tasks/light_dialog/agents.py | twstewart42/ParlAI | db8dc7b684a089427ab5338a67fe50220d2fa622 | [
"MIT"
] | 9,228 | 2017-05-03T03:40:34.000Z | 2022-03-31T14:03:29.000Z | parlai/tasks/light_dialog/agents.py | twstewart42/ParlAI | db8dc7b684a089427ab5338a67fe50220d2fa622 | [
"MIT"
] | 2,660 | 2017-05-03T23:06:02.000Z | 2022-03-31T21:24:29.000Z | parlai/tasks/light_dialog/agents.py | twstewart42/ParlAI | db8dc7b684a089427ab5338a67fe50220d2fa622 | [
"MIT"
] | 2,058 | 2017-05-04T12:19:48.000Z | 2022-03-31T10:28:11.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import Optional
from parlai.core.params import ParlaiParser
from parlai.core.opt import Opt
from parlai.core.teachers import ParlAIDialogTeacher
from .build import build
import copy
import os
import random
def _path(opt):
# Build the data if it doesn't exist.
build(opt)
# for now train, valid and test will be identical, will change with more data.
dt = opt['datatype'].split(':')[0]
if (
opt.get('light_unseen_test', False) is True
or opt.get('light_unseen_test', False) == 'True'
):
if dt == 'test':
dt = 'test_unseen'
else:
raise ValueError('No unseen train or valid.')
fields = [
'taskname',
'setting',
'objects',
'person_names',
'persona',
'emote',
'speech',
'action',
'affordances',
'repeat',
'cands',
'current_self_output',
'clip_cands',
'speech_prefix',
]
fpath = ''
for f in fields:
fpath += f + str(opt['light_use_' + f]) + "_"
return os.path.join(
opt['datapath'],
'light_dialogue',
fpath[:-1],
opt['light_label_type'] + '_' + dt + '.txt',
)
class DefaultTeacher(ParlAIDialogTeacher):
@classmethod
def add_cmdline_args(
cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
) -> ParlaiParser:
super().add_cmdline_args(parser, partial_opt)
agent = parser.add_argument_group('LIGHT Dialogue options')
agent.add_argument(
'--light_use_repeat',
type=str,
default='none',
choices=['self_last', 'partner_last', 'none', 'both_last'],
)
agent.add_argument('--light_use_taskname', type='bool', default=True)
agent.add_argument('--light_use_setting', type='bool', default=True)
agent.add_argument('--light_unseen_test', type='bool', default=False)
agent.add_argument('--light_use_person_names', type='bool', default=True)
agent.add_argument(
'--light_use_persona',
type=str,
default='self',
choices=['partner', 'self', 'all', 'none'],
)
agent.add_argument('--light_use_objects', type='bool', default=True)
agent.add_argument(
'--light_use_emote',
type=str,
default='all',
choices=['partner', 'self', 'all', 'none'],
)
agent.add_argument(
'--light_use_speech',
type=str,
default='all',
choices=['partner', 'self', 'all', 'none'],
)
agent.add_argument(
'--light_use_action',
type=str,
default='all',
choices=['partner', 'self', 'all', 'none'],
)
agent.add_argument('--light_use_affordances', type='bool', default=True)
agent.add_argument(
'--light_use_current_self_output',
type=str,
default="all",
choices=['none', 'all', 'all_filtered', 'all_filtered_remove'],
)
agent.add_argument(
'--light_label_type',
type=str,
default='speech',
choices=['speech', 'action', 'emote'],
help='type of target in light dialogues',
)
agent.add_argument('--light_use_cands', type=int, default=20)
agent.add_argument('--light_use_clip_cands', type=int, default=10000)
agent.add_argument('--light_speech_prefix', type='bool', default=True)
agent.add_argument(
'--light_percent_train_exs',
type=float,
default=1.0,
help='Float in range [0, 1] indicating proportion of train set to use',
)
return parser
def __init__(self, opt, shared=None):
opt = copy.deepcopy(opt)
self.pct_train_exs = opt['light_percent_train_exs']
assert 0.0 <= self.pct_train_exs <= 1.0
opt['parlaidialogteacher_datafile'] = _path(opt)
if 'light_use_speech_prefix' not in opt:
opt['light_use_speech_prefix'] = True
super().__init__(opt, shared)
def _setup_data(self, path):
"""
Overriding to limit num train exs.
"""
super()._setup_data(path)
if self.training and self.pct_train_exs <= 1.0:
random.seed(42)
self.episodes = random.sample(
self.episodes, int(self.num_episodes() * self.pct_train_exs)
)
self.num_exs = sum(len(e) for e in self.episodes)
class SimpleTeacher(DefaultTeacher):
@classmethod
def add_cmdline_args(
cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
) -> ParlaiParser:
super().add_cmdline_args(parser, partial_opt)
agent = parser.add_argument_group('LIGHT Dialogue options')
agent.add_argument(
'--light_use_repeat',
type=str,
default='none',
choices=['self_last', 'partner_last', 'none', 'both_last'],
)
agent.add_argument('--light_use_taskname', type='bool', default=True)
agent.add_argument('--light_use_setting', type='bool', default=True)
agent.add_argument('--light_unseen_test', type='bool', default=False)
agent.add_argument('--light_use_person_names', type='bool', default=True)
agent.add_argument(
'--light_use_persona',
type=str,
default='self',
choices=['partner', 'self', 'all', 'none'],
)
agent.add_argument('--light_use_objects', type='bool', default=False)
agent.add_argument(
'--light_use_emote',
type=str,
default='none',
choices=['partner', 'self', 'all', 'none'],
)
agent.add_argument(
'--light_use_speech',
type=str,
default='partner',
choices=['partner', 'self', 'all', 'none'],
)
agent.add_argument(
'--light_use_action',
type=str,
default='none',
choices=['partner', 'self', 'all', 'none'],
)
agent.add_argument('--light_use_affordances', type='bool', default=False)
agent.add_argument(
'--light_use_current_self_output',
type=str,
default="none",
choices=['none', 'all', 'all_filtered', 'all_filtered_remove'],
)
agent.add_argument(
'--light_label_type',
type=str,
default='speech',
choices=['speech', 'action', 'emote'],
help='type of target in light dialogues',
)
agent.add_argument('--light_use_cands', type=int, default=20)
agent.add_argument('--light_use_clip_cands', type=int, default=10000)
agent.add_argument('--light_use_speech_prefix', type='bool', default=False)
agent.add_argument('--light_percent_train_exs', type=float, default=1.0)
return parser
def __init__(self, opt, shared=None):
super().__init__(opt, shared)
self.id += '_' + self.opt['light_label_type']
class SimpleMultiTeacher(DefaultTeacher):
@classmethod
def add_cmdline_args(
cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
) -> ParlaiParser:
super().add_cmdline_args(parser, partial_opt)
agent = parser.add_argument_group('LIGHT Dialogue options')
agent.add_argument(
'--light_use_repeat',
type=str,
default='none',
choices=['self_last', 'partner_last', 'none', 'both_last'],
)
agent.add_argument('--light_use_setting', type='bool', default=True)
agent.add_argument('--light_unseen_test', type='bool', default=False)
agent.add_argument('--light_use_person_names', type='bool', default=True)
agent.add_argument(
'--light_use_persona',
type=str,
default='self',
choices=['partner', 'self', 'all', 'none'],
)
agent.add_argument('--light_use_taskname', type='bool', default=False)
agent.add_argument('--light_use_objects', type='bool', default=False)
agent.add_argument(
'--light_use_emote',
type=str,
default='none',
choices=['partner', 'self', 'all', 'none'],
)
agent.add_argument(
'--light_use_speech',
type=str,
default='partner',
choices=['partner', 'self', 'all', 'none'],
)
agent.add_argument(
'--light_use_action',
type=str,
default='none',
choices=['partner', 'self', 'all', 'none'],
)
agent.add_argument('--light_use_affordances', type='bool', default=False)
agent.add_argument(
'--light_use_current_self_output',
type=str,
default="all",
choices=['none', 'all', 'all_filtered', 'all_filtered_remove'],
)
agent.add_argument(
'--light_label_type',
type=str,
default='speech',
choices=['speech', 'action', 'emote', 'which'],
help='type of target in light dialogues',
)
agent.add_argument('--light_use_cands', type=int, default=20)
agent.add_argument('--light_use_clip_cands', type=int, default=10000)
agent.add_argument('--light_use_speech_prefix', type='bool', default=False)
agent.add_argument('--light_percent_train_exs', type=float, default=1.0)
return parser
def __init__(self, opt, shared=None):
super().__init__(opt, shared)
self.id += '_' + self.opt['light_label_type']
class SelfchatTeacher(SimpleTeacher):
"""
Teacher used to create candidates for selfchats, if needed.
"""
pass
| 35.261324 | 83 | 0.56996 | 1,114 | 10,120 | 4.921903 | 0.156194 | 0.108335 | 0.148824 | 0.195331 | 0.753967 | 0.751049 | 0.735364 | 0.735364 | 0.725333 | 0.713478 | 0 | 0.00558 | 0.2917 | 10,120 | 286 | 84 | 35.384615 | 0.759347 | 0.039328 | 0 | 0.628906 | 0 | 0 | 0.241476 | 0.056107 | 0 | 0 | 0 | 0 | 0.003906 | 1 | 0.03125 | false | 0.003906 | 0.03125 | 0 | 0.09375 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
d4b76fd22e67f09ed3b53119f8f2bf3333ca83f4 | 2,251 | py | Python | estimator/migrations/0003_impact_output_severeimpact.py | abahernest/buildforsdg-estimator-api | 7f9f8b0de64a927da99a76e37a98037d40eefa8f | [
"Apache-2.0"
] | 1 | 2020-04-23T15:43:58.000Z | 2020-04-23T15:43:58.000Z | estimator/migrations/0003_impact_output_severeimpact.py | abahernest/buildforsdg-estimator-api | 7f9f8b0de64a927da99a76e37a98037d40eefa8f | [
"Apache-2.0"
] | 5 | 2020-06-06T01:45:08.000Z | 2022-02-10T10:23:31.000Z | estimator/migrations/0003_impact_output_severeimpact.py | abahernest/buildforsdg-estimator-api | 7f9f8b0de64a927da99a76e37a98037d40eefa8f | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.6 on 2020-04-14 01:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('estimator', '0002_auto_20200413_2215'),
]
operations = [
migrations.CreateModel(
name='Impact',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('currentlyInfected', models.IntegerField()),
('infectionsByRequestedTime', models.IntegerField()),
('severeCasesByRequestedTime', models.FloatField()),
('hospitalBedsByRequestedTime', models.FloatField()),
('casesForICUByRequestedTime', models.FloatField()),
('casesForVentilatorsByRequestedTime', models.FloatField()),
('dollarsInFlight', models.FloatField()),
],
),
migrations.CreateModel(
name='SevereImpact',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('currentlyInfected', models.IntegerField()),
('infectionsByRequestedTime', models.IntegerField()),
('severeCasesByRequestedTime', models.FloatField()),
('hospitalBedsByRequestedTime', models.FloatField()),
('casesForICUByRequestedTime', models.FloatField()),
('casesForVentilatorsByRequestedTime', models.FloatField()),
('dollarsInFlight', models.FloatField()),
],
),
migrations.CreateModel(
name='Output',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('impact', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='estimator.Impact')),
('input_data', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='estimator.Estimator')),
('severeImpact', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='estimator.SevereImpact')),
],
),
]
| 45.02 | 126 | 0.599733 | 173 | 2,251 | 7.710983 | 0.323699 | 0.11994 | 0.041979 | 0.065967 | 0.787856 | 0.787856 | 0.787856 | 0.787856 | 0.787856 | 0.787856 | 0 | 0.018765 | 0.266104 | 2,251 | 49 | 127 | 45.938776 | 0.788741 | 0.019991 | 0 | 0.674419 | 1 | 0 | 0.223684 | 0.145644 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.046512 | 0 | 0.116279 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
be14e423570899672c1099b28365eb3c06b47044 | 104 | py | Python | apps/crm/models.py | picsldev/pyerp | e998e3e99a4e45033d54a6b1df50697f7288f67f | [
"MIT"
] | null | null | null | apps/crm/models.py | picsldev/pyerp | e998e3e99a4e45033d54a6b1df50697f7288f67f | [
"MIT"
] | 11 | 2020-06-05T22:50:37.000Z | 2022-02-10T09:05:56.000Z | apps/crm/models.py | gvizquel/pyerp | c859f7293cabd1003f79112463cee93ac89fccba | [
"MIT"
] | null | null | null | # Librerias en carpetas locales
from .submodels.lead import PyLead
from .submodels.stage import PyStage
| 26 | 36 | 0.826923 | 14 | 104 | 6.142857 | 0.785714 | 0.302326 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 104 | 3 | 37 | 34.666667 | 0.945055 | 0.278846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
be1d016914a7acf74461b9176a70f9bc46280532 | 40 | py | Python | src/lobbyist/models/__init__.py | chpatton013/lobbyist | 3029ee630cbf94dddcf1b6bf14e358fdb2e4ce0d | [
"Apache-2.0",
"MIT"
] | null | null | null | src/lobbyist/models/__init__.py | chpatton013/lobbyist | 3029ee630cbf94dddcf1b6bf14e358fdb2e4ce0d | [
"Apache-2.0",
"MIT"
] | 7 | 2020-06-05T19:52:41.000Z | 2022-03-11T23:45:17.000Z | src/lobbyist/models/__init__.py | chpatton013/lobbyist | 3029ee630cbf94dddcf1b6bf14e358fdb2e4ce0d | [
"Apache-2.0",
"MIT"
] | null | null | null | from .auth import *
from .user import *
| 13.333333 | 19 | 0.7 | 6 | 40 | 4.666667 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 40 | 2 | 20 | 20 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
078075121cd63f72ca9aa5f89d899c1f036e0a7a | 22,031 | py | Python | pyhmy/blockchain.py | difengJ/pyhmy | c0bdb7f53b56bf8e9f53d60da6fec61415cebf3f | [
"MIT"
] | null | null | null | pyhmy/blockchain.py | difengJ/pyhmy | c0bdb7f53b56bf8e9f53d60da6fec61415cebf3f | [
"MIT"
] | null | null | null | pyhmy/blockchain.py | difengJ/pyhmy | c0bdb7f53b56bf8e9f53d60da6fec61415cebf3f | [
"MIT"
] | null | null | null | from .rpc.request import (
rpc_request
)
from .exceptions import (
InvalidRPCReplyError
)
_default_endpoint = 'http://localhost:9500'
_default_timeout = 30
################
# Network RPCs #
################
def get_shard(endpoint=_default_endpoint, timeout=_default_timeout) -> int:
"""
Get config for the node
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
int
Shard ID of node
Raises
------
InvalidRPCReplyError
If received unknown result from endpoint
"""
method = 'hmy_getNodeMetadata'
try:
return rpc_request(method, endpoint=endpoint, timeout=timeout)['result']['shard-id']
except KeyError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_staking_epoch(endpoint=_default_endpoint, timeout=_default_timeout) -> int:
"""
Get epoch number when blockchain switches to EPoS election
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
int
Epoch at which blockchain switches to EPoS election
Raises
------
InvalidRPCReplyError
If received unknown result from endpoint
"""
method = 'hmy_getNodeMetadata'
data = rpc_request(method, endpoint=endpoint, timeout=timeout)['result']
try:
return int(data['chain-config']['staking-epoch'])
except (KeyError, TypeError) as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_prestaking_epoch(endpoint=_default_endpoint, timeout=_default_timeout) -> int:
"""
Get epoch number when blockchain switches to allow staking features without election
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
int
Epoch at which blockchain switches to allow staking features without election
Raises
------
InvalidRPCReplyError
If received unknown result from endpoint
"""
method = 'hmy_getNodeMetadata'
data = rpc_request(method, endpoint=endpoint, timeout=timeout)['result']
try:
return int(data['chain-config']['prestaking-epoch'])
except (KeyError, TypeError) as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_sharding_structure(endpoint=_default_endpoint, timeout=_default_timeout) -> list:
"""
Get network sharding structure
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
list
https://api.hmny.io/#9669d49e-43c1-47d9-a3fd-e7786e5879df
"""
return rpc_request('hmyv2_getShardingStructure', endpoint=endpoint, timeout=timeout)['result']
def get_leader_address(endpoint=_default_endpoint, timeout=_default_timeout) -> str:
"""
Get current leader one address
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
str
One address of current leader
"""
return rpc_request('hmyv2_getLeader', endpoint=endpoint, timeout=timeout)['result']
def get_block_number(endpoint=_default_endpoint, timeout=_default_timeout) -> int:
"""
Get current block number
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
int
Current block number
Raises
------
InvalidRPCReplyError
If received unknown result from endpoint
"""
#update to v2
method = 'hmyv2_blockNumber'
try:
return rpc_request(method, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_current_epoch(endpoint=_default_endpoint, timeout=_default_timeout) -> int:
"""
Get current epoch number
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
int
Current epoch number
Raises
------
InvalidRPCReplyError
If received unknown result from endpoint
"""
#update to v2
method = 'hmyv2_getEpoch'
try:
return rpc_request(method, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_gas_price(endpoint=_default_endpoint, timeout=_default_timeout) -> int:
"""
Get network gas price
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
int
Network gas price
Raises
------
InvalidRPCReplyError
If received unknown result from endpoint
"""
#update to v2
method = 'hmyv2_gasPrice'
try:
return int(rpc_request(method, endpoint=endpoint, timeout=timeout)['result'], 16)
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_num_peers(endpoint=_default_endpoint, timeout=_default_timeout) -> int:
"""
Get number of peers connected to the node
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
int
Number of connected peers
Raises
------
InvalidRPCReplyError
If received unknown result from endpoint
"""
method = 'net_peerCount'
try:
return int(rpc_request(method, endpoint=endpoint, timeout=timeout)['result'], 16)
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_circulate_supply(endpoint=_default_endpoint, timeout=_default_timeout) -> int:
"""
Get current block number
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
int
Circulation supply of tokens in ONE
Raises
------
InvalidRPCReplyError
If received unknown result from endpoint
"""
#update to v2
method = 'hmyv2_getCirculatingSupply'
try:
return rpc_request(method, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_last_cross_links(endpoint=_default_endpoint, timeout=_default_timeout) -> dict:
"""
Get last cross links
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returnss
-------
dict
https://api.hmny.io/#4994cdf9-38c4-4b1d-90a8-290ddaa3040e
Raises
------
InvalidRPCReplyError
If received unknown result from endpoint
"""
#update to v2
method = 'hmyv2_getLastCrossLinks'
try:
return rpc_request(method, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_total_supply(endpoint=_default_endpoint, timeout=_default_timeout) -> int:
"""
Get total number of pre-mined tokens
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returnss
-------
int
number of pre-mined tokens
Raises
------
InvalidRPCReplyError
If received unknown result from endpoint
"""
#update to v2
method = 'hmyv2_getTotalSupply'
try:
return int(rpc_request(method, endpoint=endpoint, timeout=timeout)['result'],16)
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_validators(epoch, endpoint=_default_endpoint, timeout=_default_timeout) -> dict:
"""
Get list of validators for specific epoch number
Parameters
----------
epoch: int
Epoch to get list of validators for
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
dict
https://api.hmny.io/#4dfe91ad-71fa-4c7d-83f3-d1c86a804da5
"""
params = [
epoch
]
#update to v2 and move from block subcategory to network subcategory
method = 'hmyv2_getValidators'
try:
return rpc_request(method, params=params, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_validator_keys(epoch, endpoint=_default_endpoint, timeout=_default_timeout) -> list:
"""
Get list of validator public bls keys for specific epoch number
Parameters
----------
epoch: int
Epoch to get list of validator keys for
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
list
List of bls public keys in the validator committee
"""
params = [
epoch
]
method = 'hmyv2_getValidatorKeys'
try:
return rpc_request(method, params=params, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
##############
# Node RPCs #
##############
def get_current_bad_blocks(endpoint=_default_endpoint, timeout=_default_timeout) -> list:
"""
Known issues with RPC not returning correctly
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
list
List of bad blocks in node memory
"""
method = "hmyv2_getCurrentBadBlocks"
try:
return rpc_request(method,endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_node_metadata(endpoint=_default_endpoint, timeout=_default_timeout) -> dict:
"""
Get config for the node
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
------
dict
https://api.hmny.io/#03c39b56-8dfc-48ce-bdad-f85776dd8aec
"""
method = "hmyv2_getNodeMetadata"
try:
return rpc_request(method,endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_protocol_version(endpoint=_default_endpoint, timeout=_default_timeout) -> int:
"""
Get current protocol version
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
------
int
"""
method = "hmyv2_protocolVersion"
try:
return rpc_request(method,endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_net_peer_count(endpoint=_default_endpoint, timeout=_default_timeout) -> str:
"""
Get peer number in the net
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
------
str
Number of peers represented as a Hex string
"""
method = "net_peerCount"
try:
return rpc_request(method,endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
##############
# Block RPCs #
##############
def get_latest_header(endpoint=_default_endpoint, timeout=_default_timeout) -> dict:
"""
Get block header of latest block
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
dict
# TODO: Add link to reference RPC documentation
"""
method = "hmyv2_latestHeader"
try:
return rpc_request(method, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_latest_headers(endpoint=_default_endpoint, timeout=_default_timeout) -> dict:
"""
Get block header of latest block for beacon chain & shard chain
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
dict
https://api.hmny.io/#7625493d-16bf-4611-8009-9635d063b4c0
"""
method = "hmyv2_getLatestChainHeaders"
try:
return rpc_request(method, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_header_by_number(endpoint=_default_endpoint, timeout=_default_timeout) -> dict:
"""
Get block headers by block number
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
dict
https://api.hmny.io/#01148e4f-72bb-426d-a123-718a161eaec0
"""
method = "hmyv2_getHeaderByNumber"
try:
return rpc_request(method, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_block_by_number(block_num, include_full_tx= True, inclTx = True, inclStaking= True, endpoint=_default_endpoint, timeout=_default_timeout) -> dict:
"""
Get block by number
Parameters
----------
block_num: int
Block number to fetch
fullTx: bool
Include full transaction data
inclTx: bool
Include regular transactions
inclStaking: bool
Include staking transactions
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
dict
https://api.hmny.io/#52f8a4ce-d357-46f1-83fd-d100989a8243
"""
params = [
block_num,
{
"fullTx": include_full_tx,
"inclTx": inclTx,
"inclStaking": inclStaking
}
]
method = "hmyv2_getBlockByNumber"
try:
return rpc_request(method, params= params, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_block_by_hash(block_hash, include_full_tx= True, inclTx = True, inclStaking= True, endpoint=_default_endpoint, timeout=_default_timeout) -> dict:
"""
Get block by hash
Parameters
----------
block_hash: str
Block hash to fetch
fullTx: bool
Include full transaction data
inclTx: bool
Include regular transactions
inclStaking: bool
Include staking transactions
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
dict
https://api.hmny.io/#52f8a4ce-d357-46f1-83fd-d100989a8243
None if block hash is not found
"""
params = [
block_hash,
{
"fullTx": include_full_tx,
"inclTx": inclTx,
"inclStaking": inclStaking
}
]
method = "hmyv2_getBlockByHash"
try:
return rpc_request(method, params= params, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_block_transaction_count_by_number(block_num, endpoint=_default_endpoint, timeout=_default_timeout) -> int:
"""
Get transaction count for specific block number
Parameters
----------
block_num: int
Block number to get transaction count for
endpoint: :obj:`str`, optional
Endpoint to send request to
include_full_tx: :obj:`bool`, optional
Include list of full transactions data for each block
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
int
Number of transactions in the block
"""
params = [
block_num
]
method = "hmyv2_getBlockTransactionCountByNumber"
try:
return int(rpc_request('hmy_getBlockTransactionCountByNumber', params=params,
endpoint=endpoint, timeout=timeout)['result'], 16)
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_block_transaction_count_by_hash(block_hash, endpoint=_default_endpoint, timeout=_default_timeout) -> int:
"""
Get transaction count for specific block hash for
Parameters
----------
block_hash: str
Block hash to get transaction count
endpoint: :obj:`str`, optional
Endpoint to send request to
include_full_tx: :obj:`bool`, optional
Include list of full transactions data for each block
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
int
Number of transactions in the block
"""
params = [
block_hash
]
method = "hmyv2_getBlockTransactionCountByHash"
try:
return rpc_request(method, params=params,endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_blocks(start_block, end_block, endpoint=_default_endpoint, include_full_tx=False,
include_signers=False, timeout=_default_timeout
) -> list:
"""
Get list of blocks from a range
Parameters
----------
start_block: int
First block to fetch (inclusive)
end_block: int
Last block to fetch (inclusive)
endpoint: :obj:`str`, optional
Endpoint to send request to
include_full_tx: :obj:`bool`, optional
Include list of full transactions data for each block
include_signers: :obj:`bool`, optional
Include list of signers for each block
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
list
# TODO: Add link to reference RPC documentation
"""
params = [
start_block,
end_block,
{
'withSigners': include_signers,
'fullTx': include_full_tx,
},
]
method = "hmy_getBlocks"
try:
return rpc_request(method, params=params,endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_block_signers(start_block_num, end_block_num, withSigners = True, fullTx = True, inclStaking = True, endpoint=_default_endpoint, timeout=_default_timeout) -> list:
"""
Get list of block signers wallet for a series of blocks
Parameters
----------
start_block_num: int
start block number to get signers for
end_block_num: int
end block number to get signers for
withSigners: bool
Include block signer wallet addresses
fullTx: bool
Include full transaction data
inclStaking: bool
Include full staking transactions
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
list
List of one addresses that signed the block
"""
params = [
start_block_num,
end_block_num,
{
"fullTx": True,
"inclTx": True,
"inclStaking": True
}
]
method = "hmyv2_getBlockSigners"
try:
return rpc_request(method, params= params, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_block_signer_keys(block_num, endpoint=_default_endpoint, timeout=_default_timeout) -> list:
"""
Get list of block signer public bls keys for specific block number
Parameters
----------
block_num: int
Block number to get signer keys for
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
list
List of bls public keys that signed the block
"""
params = [
block_num
]
method = "hmyv2_getBlockSignersKeys"
try:
return rpc_request(method, params= params, endpoint=endpoint, timeout=timeout)['result']
except TypeError as e:
raise InvalidRPCReplyError(method, endpoint) from e
def get_bad_blocks(endpoint=_default_endpoint, timeout=_default_timeout) -> list:
"""
Get list of bad blocks in memory of specific node
Parameters
----------
endpoint: :obj:`str`, optional
Endpoint to send request to
timeout: :obj:`int`, optional
Timeout in seconds
Returns
-------
list
# TODO: Add link to reference RPC documentation
"""
return rpc_request('hmy_getCurrentBadBlocks', endpoint=endpoint, timeout=timeout)['result']
| 26.258641 | 171 | 0.636966 | 2,407 | 22,031 | 5.704612 | 0.094724 | 0.062268 | 0.048576 | 0.046464 | 0.828199 | 0.806715 | 0.794771 | 0.77285 | 0.732357 | 0.704027 | 0 | 0.01271 | 0.260724 | 22,031 | 838 | 172 | 26.289976 | 0.830356 | 0.433979 | 0 | 0.55157 | 0 | 0 | 0.095284 | 0.039942 | 0 | 0 | 0 | 0.00358 | 0 | 1 | 0.130045 | false | 0 | 0.008969 | 0 | 0.269058 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
0787cb53e18dcb8c39db9bb86639e382dbb09fff | 121 | py | Python | breadcrumbs/context_processors.py | lesspointless/Shakal-NG | eee491af94527228735c2bca7644605effd74b37 | [
"MIT"
] | null | null | null | breadcrumbs/context_processors.py | lesspointless/Shakal-NG | eee491af94527228735c2bca7644605effd74b37 | [
"MIT"
] | null | null | null | breadcrumbs/context_processors.py | lesspointless/Shakal-NG | eee491af94527228735c2bca7644605effd74b37 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
def breadcrumbs(_request):
return {'breadcrumbs': []}
| 17.285714 | 39 | 0.702479 | 13 | 121 | 6.076923 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009615 | 0.140496 | 121 | 6 | 40 | 20.166667 | 0.75 | 0.173554 | 0 | 0 | 0 | 0 | 0.112245 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 6 |
07c53f68e89f1c57291f89c5de85c3aec175fb18 | 13,704 | py | Python | tests/test_collector.py | AirWalk-Digital/prometheus-aws-configservice-exporter | e7fdcd6f8d0c38399eb317b9df4fe041955a65aa | [
"MIT"
] | null | null | null | tests/test_collector.py | AirWalk-Digital/prometheus-aws-configservice-exporter | e7fdcd6f8d0c38399eb317b9df4fe041955a65aa | [
"MIT"
] | null | null | null | tests/test_collector.py | AirWalk-Digital/prometheus-aws-configservice-exporter | e7fdcd6f8d0c38399eb317b9df4fe041955a65aa | [
"MIT"
] | null | null | null | import boto3
import unittest
from botocore.stub import Stubber
from unittest.mock import MagicMock, patch
from prometheus_aws_configservice_exporter.collector import ConfigServiceMetricsCollector
class TestConfigServiceMetricsCollector(unittest.TestCase):
def setUp(self):
self.gdClient = boto3.client("config")
self.gdStubber = Stubber(self.gdClient)
self.gdStubber.activate()
self.botoSessionMock = MagicMock()
self.botoSessionMock.client.return_value = self.gdClient
def testCollectShouldReturnCurrentFindingsMetricFromSingleRegionWithSingleDetectorOnSuccess(self):
# Mock Config Service
self.gdStubber.add_response(
"get_discovered_resource_counts",
{"totalDiscoveredResources": 0, "resourceCounts": []},
{})
self.gdStubber.add_response(
"get_compliance_summary_by_resource_type",
{
"ComplianceSummariesByResourceType": [
{
"ComplianceSummary": {
"CompliantResourceCount": {
"CappedCount": 2,
"CapExceeded": False
},
"NonCompliantResourceCount": {
"CappedCount": 11,
"CapExceeded": False
},
"ComplianceSummaryTimestamp": 1565880614.85
}
}
]
},
{})
# Collect metrics
with patch("boto3.session.Session", return_value=self.botoSessionMock):
collector = ConfigServiceMetricsCollector(regions=["eu-west-1"])
metrics = collector.collect()
currentResourcesMetric = metrics[0]
self.assertEqual(currentResourcesMetric.name, "aws_config_current_resources")
self.assertEqual(currentResourcesMetric.type, "gauge")
self.assertEqual(len(currentResourcesMetric.samples), 3)
self.assertEqual(currentResourcesMetric.samples[0].value, 1)
self.assertEqual(currentResourcesMetric.samples[0].labels, {"region": "eu-west-1", "severity": "low"})
self.assertEqual(currentResourcesMetric.samples[1].value, 2)
self.assertEqual(currentResourcesMetric.samples[1].labels, {"region": "eu-west-1", "severity": "medium"})
self.assertEqual(currentResourcesMetric.samples[2].value, 3)
self.assertEqual(currentResourcesMetric.samples[2].labels, {"region": "eu-west-1", "severity": "high"})
scrapeErrorsMetric = metrics[1]
self.assertEqual(scrapeErrorsMetric.name, "aws_configservice_scrape_errors")
self.assertEqual(scrapeErrorsMetric.type, "counter")
self.assertEqual(len(scrapeErrorsMetric.samples), 1)
self.assertEqual(scrapeErrorsMetric.samples[0].value, 0)
self.assertEqual(scrapeErrorsMetric.samples[0].labels, {"region": "eu-west-1"})
self.gdStubber.assert_no_pending_responses()
# def testCollectShouldReturnCurrentFindingsMetricFromSingleRegionWithMultipleDetectorsOnSuccess(self):
# # Mock Config Service
# self.gdStubber.add_response(
# "list_detectors",
# {"DetectorIds": ["eu-detector-1", "eu-detector-2"]},
# {})
#
# self.gdStubber.add_response(
# "get_findings_statistics",
# {"FindingStatistics": {
# "CountBySeverity": {
# "2.0": 1,
# "4.0": 2,
# "7.0": 3,
# }
# }},
# {"DetectorId": "eu-detector-1", "FindingCriteria": {"Criterion": {"service.archived": {"Eq": ["false"]}}}, "FindingStatisticTypes": ["COUNT_BY_SEVERITY"]})
#
# self.gdStubber.add_response(
# "get_findings_statistics",
# {"FindingStatistics": {
# "CountBySeverity": {
# "2.5": 4,
# "5.2": 5,
# "8.1": 6,
# }
# }},
# {"DetectorId": "eu-detector-2", "FindingCriteria": {"Criterion": {"service.archived": {"Eq": ["false"]}}}, "FindingStatisticTypes": ["COUNT_BY_SEVERITY"]})
#
# # Collect metrics
# with patch("boto3.session.Session", return_value=self.botoSessionMock):
# collector = ConfigServiceMetricsCollector(regions=["eu-west-1"])
# metrics = collector.collect()
#
# findingsMetric = metrics[0]
# self.assertEqual(findingsMetric.name, "aws_configservice_current_findings")
# self.assertEqual(findingsMetric.type, "gauge")
# self.assertEqual(len(findingsMetric.samples), 3)
#
# self.assertEqual(findingsMetric.samples[0].value, 5)
# self.assertEqual(findingsMetric.samples[0].labels, {"region": "eu-west-1", "severity": "low"})
# self.assertEqual(findingsMetric.samples[1].value, 7)
# self.assertEqual(findingsMetric.samples[1].labels, {"region": "eu-west-1", "severity": "medium"})
# self.assertEqual(findingsMetric.samples[2].value, 9)
# self.assertEqual(findingsMetric.samples[2].labels, {"region": "eu-west-1", "severity": "high"})
#
# scrapeErrorsMetric = metrics[1]
# self.assertEqual(scrapeErrorsMetric.name, "aws_configservice_scrape_errors")
# self.assertEqual(scrapeErrorsMetric.type, "counter")
# self.assertEqual(len(scrapeErrorsMetric.samples), 1)
#
# self.assertEqual(scrapeErrorsMetric.samples[0].value, 0)
# self.assertEqual(scrapeErrorsMetric.samples[0].labels, {"region": "eu-west-1"})
#
# self.gdStubber.assert_no_pending_responses()
#
# def testCollectShouldReturnCurrentFindingsMetricFromMultipleRegionsOnSuccess(self):
# # Mock ConfigService
# self.gdStubber.add_response(
# "list_detectors",
# {"DetectorIds": ["eu-detector-1"]},
# {})
#
# self.gdStubber.add_response(
# "get_findings_statistics",
# {"FindingStatistics": {
# "CountBySeverity": {
# "2.0": 1,
# "4.0": 2,
# "7.0": 3,
# }
# }},
# {"DetectorId": "eu-detector-1", "FindingCriteria": {"Criterion": {"service.archived": {"Eq": ["false"]}}}, "FindingStatisticTypes": ["COUNT_BY_SEVERITY"]})
#
# self.gdStubber.add_response(
# "list_detectors",
# {"DetectorIds": ["us-detector-1"]},
# {})
#
# self.gdStubber.add_response(
# "get_findings_statistics",
# {"FindingStatistics": {
# "CountBySeverity": {
# "2.5": 4,
# "5.2": 5,
# "8.1": 6,
# }
# }},
# {"DetectorId": "us-detector-1", "FindingCriteria": {"Criterion": {"service.archived": {"Eq": ["false"]}}}, "FindingStatisticTypes": ["COUNT_BY_SEVERITY"]})
#
# # Collect metrics
# with patch("boto3.session.Session", return_value=self.botoSessionMock):
# collector = ConfigServiceMetricsCollector(regions=["eu-west-1", "us-east-1"])
# metrics = collector.collect()
#
# findingsMetric = metrics[0]
# self.assertEqual(findingsMetric.name, "aws_configservice_current_findings")
# self.assertEqual(findingsMetric.type, "gauge")
# self.assertEqual(len(findingsMetric.samples), 6)
#
# self.assertEqual(findingsMetric.samples[0].value, 1)
# self.assertEqual(findingsMetric.samples[0].labels, {"region": "eu-west-1", "severity": "low"})
# self.assertEqual(findingsMetric.samples[1].value, 2)
# self.assertEqual(findingsMetric.samples[1].labels, {"region": "eu-west-1", "severity": "medium"})
# self.assertEqual(findingsMetric.samples[2].value, 3)
# self.assertEqual(findingsMetric.samples[2].labels, {"region": "eu-west-1", "severity": "high"})
# self.assertEqual(findingsMetric.samples[3].value, 4)
# self.assertEqual(findingsMetric.samples[3].labels, {"region": "us-east-1", "severity": "low"})
# self.assertEqual(findingsMetric.samples[4].value, 5)
# self.assertEqual(findingsMetric.samples[4].labels, {"region": "us-east-1", "severity": "medium"})
# self.assertEqual(findingsMetric.samples[5].value, 6)
# self.assertEqual(findingsMetric.samples[5].labels, {"region": "us-east-1", "severity": "high"})
#
# scrapeErrorsMetric = metrics[1]
# self.assertEqual(scrapeErrorsMetric.name, "aws_configservice_scrape_errors")
# self.assertEqual(scrapeErrorsMetric.type, "counter")
# self.assertEqual(len(scrapeErrorsMetric.samples), 2)
#
# self.assertEqual(scrapeErrorsMetric.samples[0].value, 0)
# self.assertEqual(scrapeErrorsMetric.samples[0].labels, {"region": "eu-west-1"})
# self.assertEqual(scrapeErrorsMetric.samples[1].value, 0)
# self.assertEqual(scrapeErrorsMetric.samples[1].labels, {"region": "us-east-1"})
#
# self.gdStubber.assert_no_pending_responses()
#
# def testCollectShouldSkipCurrentFindingsMetricOnFailingFetchingStatisticsFromARegionOutOfMultipleRegions(self):
# # Mock ConfigService
# self.gdStubber.add_response(
# "list_detectors",
# {"DetectorIds": ["eu-detector-1"]},
# {})
#
# self.gdStubber.add_client_error("get_findings_statistics")
#
# self.gdStubber.add_response(
# "list_detectors",
# {"DetectorIds": ["us-detector-1"]},
# {})
#
# self.gdStubber.add_response(
# "get_findings_statistics",
# {"FindingStatistics": {
# "CountBySeverity": {
# "2.5": 4,
# "5.2": 5,
# "8.1": 6,
# }
# }},
# {"DetectorId": "us-detector-1", "FindingCriteria": {"Criterion": {"service.archived": {"Eq": ["false"]}}}, "FindingStatisticTypes": ["COUNT_BY_SEVERITY"]})
#
# # Collect metrics
# with patch("boto3.session.Session", return_value=self.botoSessionMock):
# collector = ConfigServiceMetricsCollector(regions=["eu-west-1", "us-east-1"])
# metrics = collector.collect()
#
# findingsMetric = metrics[0]
# self.assertEqual(findingsMetric.name, "aws_configservice_current_findings")
# self.assertEqual(findingsMetric.type, "gauge")
# self.assertEqual(len(findingsMetric.samples), 3)
#
# self.assertEqual(findingsMetric.samples[0].value, 4)
# self.assertEqual(findingsMetric.samples[0].labels, {"region": "us-east-1", "severity": "low"})
# self.assertEqual(findingsMetric.samples[1].value, 5)
# self.assertEqual(findingsMetric.samples[1].labels, {"region": "us-east-1", "severity": "medium"})
# self.assertEqual(findingsMetric.samples[2].value, 6)
# self.assertEqual(findingsMetric.samples[2].labels, {"region": "us-east-1", "severity": "high"})
#
# scrapeErrorsMetric = metrics[1]
# self.assertEqual(scrapeErrorsMetric.name, "aws_configservice_scrape_errors")
# self.assertEqual(scrapeErrorsMetric.type, "counter")
# self.assertEqual(len(scrapeErrorsMetric.samples), 2)
#
# self.assertEqual(scrapeErrorsMetric.samples[0].value, 1)
# self.assertEqual(scrapeErrorsMetric.samples[0].labels, {"region": "eu-west-1"})
# self.assertEqual(scrapeErrorsMetric.samples[1].value, 0)
# self.assertEqual(scrapeErrorsMetric.samples[1].labels, {"region": "us-east-1"})
#
# self.gdStubber.assert_no_pending_responses()
#
# def testCollectShouldNeverDecreaseScrapeErrorsOnSubsequentCalls(self):
# # Mock ConfigService
# self.gdStubber.add_response(
# "list_detectors",
# {"DetectorIds": ["us-detector-1"]},
# {})
#
# self.gdStubber.add_client_error("get_findings_statistics")
#
# # Collect metrics
# with patch("boto3.session.Session", return_value=self.botoSessionMock):
# collector = ConfigServiceMetricsCollector(regions=["us-east-1"])
# metrics = collector.collect()
#
# findingsMetric = metrics[0]
# self.assertEqual(findingsMetric.name, "aws_configservice_current_findings")
# self.assertEqual(findingsMetric.type, "gauge")
# self.assertEqual(len(findingsMetric.samples), 0)
#
# scrapeErrorsMetric = metrics[1]
# self.assertEqual(scrapeErrorsMetric.name, "aws_configservice_scrape_errors")
# self.assertEqual(scrapeErrorsMetric.type, "counter")
# self.assertEqual(len(scrapeErrorsMetric.samples), 1)
#
# self.assertEqual(scrapeErrorsMetric.samples[0].value, 1)
# self.assertEqual(scrapeErrorsMetric.samples[0].labels, {"region": "us-east-1"})
#
# with patch("boto3.session.Session", return_value=self.botoSessionMock):
# metrics = collector.collect()
#
# findingsMetric = metrics[0]
# self.assertEqual(findingsMetric.name, "aws_configservice_current_findings")
# self.assertEqual(findingsMetric.type, "gauge")
# self.assertEqual(len(findingsMetric.samples), 0)
#
# scrapeErrorsMetric = metrics[1]
# self.assertEqual(scrapeErrorsMetric.name, "aws_configservice_scrape_errors")
# self.assertEqual(scrapeErrorsMetric.type, "counter")
# self.assertEqual(len(scrapeErrorsMetric.samples), 1)
#
# self.assertEqual(scrapeErrorsMetric.samples[0].value, 2)
# self.assertEqual(scrapeErrorsMetric.samples[0].labels, {"region": "us-east-1"})
#
# self.gdStubber.assert_no_pending_responses()
| 46.454237 | 168 | 0.617265 | 1,188 | 13,704 | 7.022727 | 0.098485 | 0.147429 | 0.118183 | 0.10356 | 0.846698 | 0.816972 | 0.785449 | 0.772144 | 0.764233 | 0.755843 | 0 | 0.019507 | 0.236865 | 13,704 | 294 | 169 | 46.612245 | 0.778256 | 0.744089 | 0 | 0.105263 | 0 | 0 | 0.146043 | 0.085243 | 0 | 0 | 0 | 0 | 0.263158 | 1 | 0.035088 | false | 0 | 0.087719 | 0 | 0.140351 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
07cbeb5c669686cf4197d63369c8e8d00e67d4f2 | 219 | py | Python | telium/__init__.py | Ousret/pyTeliumManager | 10029878696cd4b429482a194ed3c99b253e4aa7 | [
"MIT"
] | 70 | 2017-05-08T07:15:45.000Z | 2021-11-30T21:17:23.000Z | telium/__init__.py | Ousret/pyTeliumManager | 10029878696cd4b429482a194ed3c99b253e4aa7 | [
"MIT"
] | 23 | 2017-07-20T15:03:05.000Z | 2022-01-17T08:29:16.000Z | telium/__init__.py | Ousret/pyTeliumManager | 10029878696cd4b429482a194ed3c99b253e4aa7 | [
"MIT"
] | 18 | 2017-08-03T14:51:10.000Z | 2021-12-31T09:49:22.000Z | from telium.constant import *
from telium.payment import TeliumAsk, TeliumResponse, LrcChecksumException, SequenceDoesNotMatchLengthException
from telium.manager import *
from telium.version import __version__, VERSION
| 43.8 | 111 | 0.863014 | 22 | 219 | 8.409091 | 0.5 | 0.216216 | 0.172973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.091324 | 219 | 4 | 112 | 54.75 | 0.929648 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
07d987c253ea6f8828104b17dba9d8efe8fff82e | 93 | py | Python | info/modules/index/__init__.py | RuanJylf/Information | aaa6866feced968db0b214943f26cb7bb25952e3 | [
"MIT"
] | 1 | 2020-03-30T13:56:22.000Z | 2020-03-30T13:56:22.000Z | info/modules/index/__init__.py | RuanJylf/Information | aaa6866feced968db0b214943f26cb7bb25952e3 | [
"MIT"
] | 2 | 2021-06-08T22:23:06.000Z | 2021-09-08T02:29:35.000Z | info/modules/index/__init__.py | RuanJylf/Information | aaa6866feced968db0b214943f26cb7bb25952e3 | [
"MIT"
] | null | null | null | from flask import Blueprint
index_blu = Blueprint("index", __name__)
from .views import * | 13.285714 | 40 | 0.752688 | 12 | 93 | 5.416667 | 0.666667 | 0.430769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16129 | 93 | 7 | 41 | 13.285714 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0.053191 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0.666667 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 6 |
ed084b2fbb0cde9f8f58e7f4ccc0b871cdbe73f5 | 6,109 | py | Python | tests/cli/config/test_config_context.py | EddLabs/eddington-static | cdd1d9514c4eea1bd06c24894b3922e6cc3fb1f5 | [
"Apache-2.0"
] | null | null | null | tests/cli/config/test_config_context.py | EddLabs/eddington-static | cdd1d9514c4eea1bd06c24894b3922e6cc3fb1f5 | [
"Apache-2.0"
] | null | null | null | tests/cli/config/test_config_context.py | EddLabs/eddington-static | cdd1d9514c4eea1bd06c24894b3922e6cc3fb1f5 | [
"Apache-2.0"
] | null | null | null | import mock
import pytest
from statue.cli import statue_cli
from statue.cli.config.interactive_adders.interactive_context_adder import (
InteractiveContextAdder,
)
from statue.exceptions import UnknownContext
from tests.constants import CONTEXT1
def test_config_add_context_with_default_path(
cli_runner, mock_build_configuration_from_file, mock_configuration_path
):
configuration = mock_build_configuration_from_file.return_value
with mock.patch.object(InteractiveContextAdder, "add_context") as mock_add_context:
result = cli_runner.invoke(statue_cli, ["config", "add-context"])
mock_add_context.assert_called_once_with(configuration.contexts_repository)
mock_build_configuration_from_file.assert_called_once_with(
mock_configuration_path.return_value
)
assert result.exit_code == 0
def test_config_add_context_with_path(
cli_runner, mock_build_configuration_from_file, mock_configuration_path, tmp_path
):
config_path = tmp_path / "statue.toml"
config_path.touch()
configuration = mock_build_configuration_from_file.return_value
with mock.patch.object(InteractiveContextAdder, "add_context") as mock_add_context:
result = cli_runner.invoke(
statue_cli, ["config", "add-context", "--config", str(config_path)]
)
mock_add_context.assert_called_once_with(configuration.contexts_repository)
mock_build_configuration_from_file.assert_called_once_with(config_path)
mock_configuration_path.assert_not_called()
assert result.exit_code == 0
def test_config_edit_context_with_default_path(
cli_runner, mock_build_configuration_from_file, mock_configuration_path
):
configuration = mock_build_configuration_from_file.return_value
with mock.patch.object(
InteractiveContextAdder, "edit_context"
) as mock_edit_context:
result = cli_runner.invoke(statue_cli, ["config", "edit-context", CONTEXT1])
mock_edit_context.assert_called_once_with(
name=CONTEXT1, contexts_repository=configuration.contexts_repository
)
mock_build_configuration_from_file.assert_called_once_with(
mock_configuration_path.return_value
)
assert result.exit_code == 0
def test_config_edit_context_with_path(
cli_runner, mock_build_configuration_from_file, mock_configuration_path, tmp_path
):
config_path = tmp_path / "statue.toml"
config_path.touch()
configuration = mock_build_configuration_from_file.return_value
with mock.patch.object(
InteractiveContextAdder, "edit_context"
) as mock_edit_context:
result = cli_runner.invoke(
statue_cli,
["config", "edit-context", CONTEXT1, "--config", str(config_path)],
)
mock_edit_context.assert_called_once_with(
name=CONTEXT1, contexts_repository=configuration.contexts_repository
)
mock_build_configuration_from_file.assert_called_once_with(config_path)
mock_configuration_path.assert_not_called()
assert result.exit_code == 0
def test_config_remove_context_with_default_path(
cli_runner, mock_build_configuration_from_file, mock_configuration_path
):
mock_build_configuration_from_file.return_value = configuration = mock.MagicMock()
context = configuration.contexts_repository.__getitem__.return_value
result = cli_runner.invoke(
statue_cli, ["config", "remove-context", CONTEXT1], input="y\n"
)
configuration.contexts_repository.__getitem__.assert_called_once_with(CONTEXT1)
configuration.remove_context.assert_called_once_with(context)
mock_build_configuration_from_file.assert_called_once_with(
mock_configuration_path.return_value
)
assert result.exit_code == 0
def test_config_remove_context_with_path(
cli_runner, mock_build_configuration_from_file, mock_configuration_path, tmp_path
):
config_path = tmp_path / "statue.toml"
config_path.touch()
mock_build_configuration_from_file.return_value = configuration = mock.MagicMock()
context = configuration.contexts_repository.__getitem__.return_value
result = cli_runner.invoke(
statue_cli,
["config", "remove-context", CONTEXT1, "--config", str(config_path)],
input="y\n",
)
configuration.contexts_repository.__getitem__.assert_called_once_with(CONTEXT1)
configuration.remove_context.assert_called_once_with(context)
mock_build_configuration_from_file.assert_called_once_with(config_path)
mock_configuration_path.assert_not_called()
assert result.exit_code == 0
def test_config_remove_unknown_context_fails(
cli_runner, mock_build_configuration_from_file, mock_configuration_path, tmp_path
):
config_path = tmp_path / "statue.toml"
config_path.touch()
mock_build_configuration_from_file.return_value = configuration = mock.MagicMock()
configuration.contexts_repository.__getitem__.side_effect = UnknownContext(CONTEXT1)
result = cli_runner.invoke(
statue_cli,
["config", "remove-context", CONTEXT1, "--config", str(config_path)],
)
assert result.exit_code == 1
assert result.output == f'Could not find context named "{CONTEXT1}"\n'
@pytest.mark.parametrize(argnames="abort_flag", argvalues=["", "n"])
def test_config_remove_context_abort(
abort_flag, cli_runner, mock_build_configuration_from_file, mock_configuration_path
):
mock_build_configuration_from_file.return_value = configuration = mock.MagicMock()
result = cli_runner.invoke(
statue_cli, ["config", "remove-context", CONTEXT1], input=f"{abort_flag}\n"
)
configuration.contexts_repository.__getitem__.assert_called_once_with(CONTEXT1)
configuration.remove_context.assert_not_called()
mock_build_configuration_from_file.assert_called_once_with(
mock_configuration_path.return_value
)
assert result.exit_code == 0
assert result.output == (
"Are you sure you would like to remove the context context1 and all of its "
f"references from configuration? [y/N]: {abort_flag}\n"
"Abort!\n"
)
| 39.160256 | 88 | 0.767392 | 750 | 6,109 | 5.774667 | 0.110667 | 0.047795 | 0.116832 | 0.138074 | 0.867005 | 0.856615 | 0.847841 | 0.847841 | 0.847841 | 0.847841 | 0 | 0.004449 | 0.153708 | 6,109 | 155 | 89 | 39.412903 | 0.833269 | 0 | 0 | 0.646154 | 0 | 0 | 0.078573 | 0 | 0 | 0 | 0 | 0 | 0.230769 | 1 | 0.061538 | false | 0 | 0.046154 | 0 | 0.107692 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
ed11a8557a8fba5c386ea09aa2bad9ed0b0aa7d5 | 9,837 | py | Python | kornia/color/rgb.py | jbohnslav/kornia | 74cc0cfd6406179570b06ca4ef8423142e7eaa0b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/color/rgb.py | jbohnslav/kornia | 74cc0cfd6406179570b06ca4ef8423142e7eaa0b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/color/rgb.py | jbohnslav/kornia | 74cc0cfd6406179570b06ca4ef8423142e7eaa0b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from typing import Union, cast
import torch
import torch.nn as nn
def rgb_to_bgr(image: torch.Tensor) -> torch.Tensor:
r"""Convert a RGB image to BGR.
Args:
image (torch.Tensor): RGB Image to be converted to BGRof of shape :math:`(*,3,H,W)`.
Returns:
torch.Tensor: BGR version of the image with shape of shape :math:`(*,3,H,W)`.
Example:
>>> input = torch.rand(2, 3, 4, 5)
>>> output = rgb_to_bgr(input) # 2x3x4x5
"""
return bgr_to_rgb(image)
def bgr_to_rgb(image: torch.Tensor) -> torch.Tensor:
r"""Convert a BGR image to RGB.
Args:
image (torch.Tensor): BGR Image to be converted to BGR of shape :math:`(*,3,H,W)`.
Returns:
torch.Tensor: RGB version of the image with shape of shape :math:`(*,3,H,W)`.
Example:
>>> input = torch.rand(2, 3, 4, 5)
>>> output = bgr_to_rgb(input) # 2x3x4x5
"""
if not isinstance(image, torch.Tensor):
raise TypeError("Input type is not a torch.Tensor. Got {}".format(
type(image)))
if len(image.shape) < 3 or image.shape[-3] != 3:
raise ValueError("Input size must have a shape of (*, 3, H, W).Got {}"
.format(image.shape))
# flip image channels
out: torch.Tensor = image.flip(-3)
return out
def rgb_to_rgba(image: torch.Tensor, alpha_val: Union[float, torch.Tensor]) -> torch.Tensor:
r"""Convert an image from RGB to RGBA.
Args:
image (torch.Tensor): RGB Image to be converted to RGBA of shape :math:`(*,3,H,W)`.
alpha_val (float, torch.Tensor): A float number for the alpha value or a tensor
of shape :math:`(*,1,H,W)`.
Returns:
torch.Tensor: RGBA version of the image with shape :math:`(*,4,H,W)`.
.. note:: The current functionality is NOT supported by Torchscript.
Example:
>>> input = torch.rand(2, 3, 4, 5)
>>> output = rgb_to_rgba(input, 1.) # 2x4x4x5
"""
if not isinstance(image, torch.Tensor):
raise TypeError(f"Input type is not a torch.Tensor. Got {type(image)}")
if len(image.shape) < 3 or image.shape[-3] != 3:
raise ValueError(f"Input size must have a shape of (*, 3, H, W).Got {image.shape}")
if not isinstance(alpha_val, (float, torch.Tensor)):
raise TypeError(f"alpha_val type is not a float or torch.Tensor. Got {type(alpha_val)}")
# add one channel
r, g, b = torch.chunk(image, image.shape[-3], dim=-3)
a: torch.Tensor = cast(torch.Tensor, alpha_val)
if isinstance(alpha_val, float):
a = torch.full_like(r, fill_value=float(alpha_val))
return torch.cat([r, g, b, a], dim=-3)
def bgr_to_rgba(image: torch.Tensor, alpha_val: Union[float, torch.Tensor]) -> torch.Tensor:
r"""Convert an image from BGR to RGBA.
Args:
image (torch.Tensor): BGR Image to be converted to RGBA of shape :math:`(*,3,H,W)`.
alpha_val (float, torch.Tensor): A float number for the alpha value or a tensor
of shape :math:`(*,1,H,W)`.
Returns:
torch.Tensor: RGBA version of the image with shape :math:`(*,4,H,W)`.
.. note:: The current functionality is NOT supported by Torchscript.
Example:
>>> input = torch.rand(2, 3, 4, 5)
>>> output = bgr_to_rgba(input, 1.) # 2x4x4x5
"""
if not isinstance(image, torch.Tensor):
raise TypeError(f"Input type is not a torch.Tensor. Got {type(image)}")
if len(image.shape) < 3 or image.shape[-3] != 3:
raise ValueError(f"Input size must have a shape of (*, 3, H, W).Got {image.shape}")
if not isinstance(alpha_val, (float, torch.Tensor)):
raise TypeError(f"alpha_val type is not a float or torch.Tensor. Got {type(alpha_val)}")
# convert first to RGB, then add alpha channel
x_rgb: torch.Tensor = bgr_to_rgb(image)
return rgb_to_rgba(x_rgb, alpha_val)
def rgba_to_rgb(image: torch.Tensor) -> torch.Tensor:
r"""Convert an image from RGBA to RGB.
Args:
image (torch.Tensor): RGBA Image to be converted to RGB of shape :math:`(*,4,H,W)`.
Returns:
torch.Tensor: RGB version of the image with shape :math:`(*,3,H,W)`.
Example:
>>> input = torch.rand(2, 4, 4, 5)
>>> output = rgba_to_rgb(input) # 2x3x4x5
"""
if not isinstance(image, torch.Tensor):
raise TypeError(f"Input type is not a torch.Tensor. Got {type(image)}")
if len(image.shape) < 3 or image.shape[-3] != 4:
raise ValueError(f"Input size must have a shape of (*, 4, H, W).Got {image.shape}")
# unpack channels
r, g, b, a = torch.chunk(image, image.shape[-3], dim=-3)
# compute new channels
a_one = torch.tensor(1.) - a
r_new: torch.Tensor = a_one * r + a * r
g_new: torch.Tensor = a_one * g + a * g
b_new: torch.Tensor = a_one * b + a * b
return torch.cat([r, g, b], dim=-3)
def rgba_to_bgr(image: torch.Tensor) -> torch.Tensor:
r"""Convert an image from RGBA to BGR.
Args:
image (torch.Tensor): RGBA Image to be converted to BGR of shape :math:`(*,4,H,W)`.
Returns:
torch.Tensor: RGB version of the image with shape :math:`(*,3,H,W)`.
Example:
>>> input = torch.rand(2, 4, 4, 5)
>>> output = rgba_to_bgr(input) # 2x3x4x5
"""
if not isinstance(image, torch.Tensor):
raise TypeError(f"Input type is not a torch.Tensor. Got {type(image)}")
if len(image.shape) < 3 or image.shape[-3] != 4:
raise ValueError(f"Input size must have a shape of (*, 4, H, W).Got {image.shape}")
# convert to RGB first, then to BGR
x_rgb: torch.Tensor = rgba_to_rgb(image)
return rgb_to_bgr(x_rgb)
class BgrToRgb(nn.Module):
r"""Convert image from BGR to RGB.
The image data is assumed to be in the range of (0, 1).
Returns:
torch.Tensor: RGB version of the image.
Shape:
- image: :math:`(*, 3, H, W)`
- output: :math:`(*, 3, H, W)`
Example:
>>> input = torch.rand(2, 3, 4, 5)
>>> rgb = BgrToRgb()
>>> output = rgb(input) # 2x3x4x5
"""
def __init__(self) -> None:
super(BgrToRgb, self).__init__()
def forward(self, image: torch.Tensor) -> torch.Tensor:
return bgr_to_rgb(image)
class RgbToBgr(nn.Module):
r"""Convert an image from RGB to BGR.
The image data is assumed to be in the range of (0, 1).
Returns:
torch.Tensor: BGR version of the image.
Shape:
- image: :math:`(*, 3, H, W)`
- output: :math:`(*, 3, H, W)`
Example:
>>> input = torch.rand(2, 3, 4, 5)
>>> bgr = RgbToBgr()
>>> output = bgr(input) # 2x3x4x5
"""
def __init__(self) -> None:
super(RgbToBgr, self).__init__()
def forward(self, image: torch.Tensor) -> torch.Tensor:
return rgb_to_bgr(image)
class RgbToRgba(nn.Module):
r"""Convert an image from RGB to RGBA.
Add an alpha channel to existing RGB image.
Args:
alpha_val (float, torch.Tensor): A float number for the alpha value or a tensor
of shape :math:`(*,1,H,W)`.
Returns:
torch.Tensor: RGBA version of the image with shape :math:`(*,4,H,W)`.
Shape:
- image: :math:`(*, 3, H, W)`
- output: :math:`(*, 4, H, W)`
.. note:: The current functionality is NOT supported by Torchscript.
Example:
>>> input = torch.rand(2, 3, 4, 5)
>>> rgba = RgbToRgba(1.)
>>> output = rgba(input) # 2x4x4x5
"""
def __init__(self, alpha_val: Union[float, torch.Tensor]) -> None:
super(RgbToRgba, self).__init__()
self.alpha_val = alpha_val
def forward(self, image: torch.Tensor) -> torch.Tensor:
return rgb_to_rgba(image, self.alpha_val)
class BgrToRgba(nn.Module):
r"""Convert an image from BGR to RGBA.
Add an alpha channel to existing RGB image.
Args:
alpha_val (float, torch.Tensor): A float number for the alpha value or a tensor
of shape :math:`(*,1,H,W)`.
Returns:
torch.Tensor: RGBA version of the image with shape :math:`(*,4,H,W)`.
Shape:
- image: :math:`(*, 3, H, W)`
- output: :math:`(*, 4, H, W)`
.. note:: The current functionality is NOT supported by Torchscript.
Example:
>>> input = torch.rand(2, 3, 4, 5)
>>> rgba = BgrToRgba(1.)
>>> output = rgba(input) # 2x4x4x5
"""
def __init__(self, alpha_val: Union[float, torch.Tensor]) -> None:
super(BgrToRgba, self).__init__()
self.alpha_val = alpha_val
def forward(self, image: torch.Tensor) -> torch.Tensor:
return rgb_to_rgba(image, self.alpha_val)
class RgbaToRgb(nn.Module):
r"""Convert an image from RGBA to RGB.
Remove an alpha channel from RGB image.
Returns:
torch.Tensor: RGB version of the image.
Shape:
- image: :math:`(*, 4, H, W)`
- output: :math:`(*, 3, H, W)`
Example:
>>> input = torch.rand(2, 4, 4, 5)
>>> rgba = RgbaToRgb()
>>> output = rgba(input) # 2x3x4x5
"""
def __init__(self) -> None:
super(RgbaToRgb, self).__init__()
def forward(self, image: torch.Tensor) -> torch.Tensor:
return rgba_to_rgb(image)
class RgbaToBgr(nn.Module):
r"""Convert an image from RGBA to BGR.
Remove an alpha channel from BGR image.
Returns:
torch.Tensor: BGR version of the image.
Shape:
- image: :math:`(*, 4, H, W)`
- output: :math:`(*, 3, H, W)`
Example:
>>> input = torch.rand(2, 4, 4, 5)
>>> rgba = RgbaToBgr()
>>> output = rgba(input) # 2x3x4x5
"""
def __init__(self) -> None:
super(RgbaToBgr, self).__init__()
def forward(self, image: torch.Tensor) -> torch.Tensor:
return rgba_to_bgr(image)
| 29.452096 | 96 | 0.592152 | 1,455 | 9,837 | 3.913402 | 0.076976 | 0.141026 | 0.064629 | 0.01967 | 0.861257 | 0.837724 | 0.82262 | 0.809975 | 0.784334 | 0.722515 | 0 | 0.022363 | 0.263597 | 9,837 | 333 | 97 | 29.540541 | 0.763666 | 0.488869 | 0 | 0.412371 | 0 | 0 | 0.152997 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.185567 | false | 0 | 0.030928 | 0.061856 | 0.402062 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
ed2014c1dbeb431d219e00ebaa1c41343c3703a8 | 37,724 | py | Python | instances/passenger_demand/pas-20210421-2109-int12e/22.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int12e/22.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int12e/22.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 2736
passenger_arriving = (
(7, 6, 5, 6, 2, 0, 11, 5, 4, 7, 0, 0), # 0
(3, 7, 6, 1, 1, 0, 6, 8, 0, 3, 1, 0), # 1
(5, 6, 5, 3, 0, 0, 4, 10, 4, 2, 2, 0), # 2
(3, 4, 2, 3, 1, 0, 1, 6, 5, 5, 2, 0), # 3
(2, 5, 3, 2, 3, 0, 7, 12, 7, 4, 2, 0), # 4
(2, 11, 2, 2, 1, 0, 7, 10, 7, 2, 1, 0), # 5
(6, 8, 7, 5, 1, 0, 4, 8, 4, 1, 1, 0), # 6
(1, 5, 7, 0, 3, 0, 2, 3, 5, 6, 2, 0), # 7
(3, 11, 2, 2, 5, 0, 4, 10, 4, 3, 3, 0), # 8
(4, 8, 6, 4, 2, 0, 5, 5, 9, 7, 1, 0), # 9
(5, 3, 5, 1, 3, 0, 3, 7, 5, 1, 0, 0), # 10
(1, 8, 5, 4, 1, 0, 3, 6, 9, 7, 0, 0), # 11
(5, 10, 6, 3, 4, 0, 9, 6, 4, 5, 1, 0), # 12
(5, 12, 4, 6, 1, 0, 4, 7, 6, 4, 2, 0), # 13
(2, 3, 9, 1, 2, 0, 1, 8, 7, 2, 3, 0), # 14
(3, 5, 8, 1, 3, 0, 2, 6, 6, 1, 1, 0), # 15
(4, 2, 7, 3, 3, 0, 3, 5, 11, 5, 3, 0), # 16
(2, 6, 5, 3, 2, 0, 3, 9, 7, 2, 4, 0), # 17
(2, 9, 8, 1, 0, 0, 10, 10, 8, 7, 0, 0), # 18
(5, 6, 6, 3, 1, 0, 2, 8, 5, 5, 1, 0), # 19
(4, 6, 5, 2, 0, 0, 5, 12, 3, 4, 1, 0), # 20
(2, 6, 9, 1, 0, 0, 12, 4, 4, 7, 0, 0), # 21
(1, 3, 7, 2, 3, 0, 12, 10, 7, 4, 1, 0), # 22
(3, 7, 9, 3, 1, 0, 10, 5, 4, 2, 3, 0), # 23
(2, 11, 8, 6, 1, 0, 4, 8, 8, 1, 3, 0), # 24
(1, 10, 6, 2, 2, 0, 5, 11, 7, 4, 3, 0), # 25
(6, 10, 10, 3, 0, 0, 8, 5, 5, 2, 2, 0), # 26
(8, 7, 6, 4, 3, 0, 5, 4, 4, 1, 2, 0), # 27
(2, 10, 8, 5, 4, 0, 5, 10, 4, 2, 6, 0), # 28
(3, 11, 8, 3, 1, 0, 8, 7, 5, 2, 1, 0), # 29
(3, 8, 10, 3, 4, 0, 12, 3, 2, 5, 5, 0), # 30
(2, 8, 9, 8, 0, 0, 6, 7, 7, 3, 2, 0), # 31
(0, 8, 4, 1, 0, 0, 8, 7, 6, 3, 3, 0), # 32
(7, 4, 8, 4, 3, 0, 11, 8, 7, 4, 2, 0), # 33
(7, 5, 3, 5, 2, 0, 6, 7, 5, 3, 1, 0), # 34
(2, 4, 9, 4, 0, 0, 8, 5, 3, 5, 3, 0), # 35
(3, 10, 6, 3, 0, 0, 7, 13, 2, 1, 2, 0), # 36
(2, 4, 8, 2, 2, 0, 0, 10, 4, 6, 2, 0), # 37
(2, 10, 7, 3, 0, 0, 5, 4, 7, 4, 1, 0), # 38
(3, 11, 8, 4, 1, 0, 4, 4, 4, 6, 5, 0), # 39
(2, 3, 9, 3, 2, 0, 6, 6, 5, 5, 3, 0), # 40
(8, 9, 7, 0, 1, 0, 5, 7, 8, 7, 4, 0), # 41
(6, 4, 5, 4, 1, 0, 4, 6, 7, 3, 3, 0), # 42
(1, 12, 7, 3, 4, 0, 5, 9, 7, 8, 5, 0), # 43
(5, 9, 8, 1, 3, 0, 5, 6, 9, 2, 1, 0), # 44
(7, 6, 11, 1, 2, 0, 5, 6, 4, 5, 3, 0), # 45
(5, 8, 7, 5, 3, 0, 4, 7, 3, 2, 0, 0), # 46
(3, 6, 6, 6, 0, 0, 4, 5, 4, 3, 1, 0), # 47
(2, 6, 7, 3, 2, 0, 7, 14, 8, 0, 0, 0), # 48
(4, 7, 4, 2, 1, 0, 6, 11, 3, 1, 2, 0), # 49
(2, 7, 3, 2, 5, 0, 2, 10, 8, 4, 4, 0), # 50
(3, 9, 8, 4, 2, 0, 9, 10, 5, 3, 3, 0), # 51
(4, 10, 6, 1, 1, 0, 5, 8, 6, 2, 2, 0), # 52
(5, 10, 9, 2, 0, 0, 3, 3, 7, 6, 2, 0), # 53
(7, 9, 6, 4, 1, 0, 6, 7, 7, 3, 1, 0), # 54
(1, 6, 7, 2, 1, 0, 3, 4, 7, 7, 2, 0), # 55
(6, 6, 8, 3, 0, 0, 8, 9, 4, 4, 6, 0), # 56
(1, 4, 9, 6, 2, 0, 1, 9, 5, 10, 2, 0), # 57
(1, 6, 5, 3, 1, 0, 5, 8, 5, 6, 1, 0), # 58
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 59
)
station_arriving_intensity = (
(3.1795818700614573, 8.15575284090909, 9.59308322622108, 7.603532608695652, 8.571634615384614, 5.708152173913044), # 0
(3.20942641205736, 8.246449918455387, 9.644898645029993, 7.6458772644927535, 8.635879807692307, 5.706206567028985), # 1
(3.238930172666081, 8.335801683501682, 9.695484147386459, 7.687289855072463, 8.69876923076923, 5.704201449275362), # 2
(3.268068107989464, 8.42371171875, 9.744802779562981, 7.727735054347824, 8.760245192307693, 5.702137092391305), # 3
(3.296815174129353, 8.510083606902358, 9.792817587832047, 7.767177536231884, 8.82025, 5.700013768115941), # 4
(3.3251463271875914, 8.594820930660775, 9.839491618466152, 7.805581974637681, 8.87872596153846, 5.697831748188405), # 5
(3.353036523266023, 8.677827272727273, 9.88478791773779, 7.842913043478261, 8.935615384615383, 5.695591304347826), # 6
(3.380460718466491, 8.75900621580387, 9.92866953191945, 7.879135416666666, 8.990860576923078, 5.693292708333334), # 7
(3.40739386889084, 8.83826134259259, 9.971099507283634, 7.914213768115941, 9.044403846153847, 5.6909362318840575), # 8
(3.4338109306409126, 8.915496235795453, 10.012040890102828, 7.9481127717391304, 9.0961875, 5.68852214673913), # 9
(3.459686859818554, 8.990614478114479, 10.051456726649528, 7.980797101449276, 9.146153846153846, 5.68605072463768), # 10
(3.4849966125256073, 9.063519652251683, 10.089310063196228, 8.012231431159421, 9.194245192307692, 5.683522237318841), # 11
(3.509715144863916, 9.134115340909089, 10.125563946015424, 8.042380434782608, 9.240403846153844, 5.680936956521738), # 12
(3.5338174129353224, 9.20230512678872, 10.160181421379605, 8.071208786231884, 9.284572115384616, 5.678295153985506), # 13
(3.5572783728416737, 9.267992592592593, 10.193125535561265, 8.098681159420288, 9.326692307692307, 5.6755971014492745), # 14
(3.5800729806848106, 9.331081321022726, 10.224359334832902, 8.124762228260868, 9.36670673076923, 5.672843070652174), # 15
(3.6021761925665783, 9.391474894781144, 10.25384586546701, 8.149416666666665, 9.404557692307693, 5.6700333333333335), # 16
(3.6235629645888205, 9.449076896569863, 10.281548173736075, 8.172609148550725, 9.4401875, 5.667168161231884), # 17
(3.64420825285338, 9.503790909090908, 10.307429305912597, 8.194304347826087, 9.473538461538464, 5.664247826086956), # 18
(3.664087013462101, 9.555520515046295, 10.331452308269066, 8.214466938405796, 9.504552884615384, 5.661272599637681), # 19
(3.683174202516827, 9.604169297138045, 10.353580227077975, 8.2330615942029, 9.533173076923077, 5.658242753623187), # 20
(3.7014447761194034, 9.649640838068178, 10.373776108611827, 8.250052989130435, 9.559341346153845, 5.655158559782609), # 21
(3.7188736903716704, 9.69183872053872, 10.3920029991431, 8.26540579710145, 9.582999999999998, 5.652020289855073), # 22
(3.7354359013754754, 9.730666527251683, 10.408223944944302, 8.279084692028986, 9.604091346153846, 5.6488282155797105), # 23
(3.75110636523266, 9.76602784090909, 10.422401992287917, 8.291054347826087, 9.62255769230769, 5.645582608695652), # 24
(3.7658600380450684, 9.797826244212962, 10.434500187446444, 8.301279438405798, 9.638341346153844, 5.642283740942029), # 25
(3.779671875914545, 9.825965319865318, 10.444481576692374, 8.309724637681159, 9.651384615384615, 5.63893188405797), # 26
(3.792516834942932, 9.85034865056818, 10.452309206298198, 8.316354619565217, 9.661629807692309, 5.635527309782609), # 27
(3.804369871232075, 9.870879819023568, 10.457946122536418, 8.321134057971014, 9.66901923076923, 5.632070289855072), # 28
(3.815205940883816, 9.887462407933501, 10.461355371679518, 8.324027626811594, 9.673495192307692, 5.628561096014493), # 29
(3.8249999999999997, 9.9, 10.4625, 8.325, 9.674999999999999, 5.625), # 30
(3.834164434143222, 9.910414559659088, 10.461641938405796, 8.324824387254901, 9.674452393617022, 5.620051511744128), # 31
(3.843131010230179, 9.920691477272728, 10.459092028985506, 8.324300980392156, 9.672821276595744, 5.612429710144928), # 32
(3.8519037563938614, 9.930829474431818, 10.45488668478261, 8.323434926470588, 9.670124202127658, 5.6022092203898035), # 33
(3.860486700767263, 9.940827272727272, 10.449062318840578, 8.32223137254902, 9.666378723404256, 5.589464667666167), # 34
(3.8688838714833755, 9.950683593749998, 10.441655344202898, 8.320695465686274, 9.661602393617022, 5.574270677161419), # 35
(3.8770992966751923, 9.96039715909091, 10.432702173913043, 8.318832352941177, 9.655812765957448, 5.556701874062968), # 36
(3.885137004475703, 9.96996669034091, 10.422239221014491, 8.316647181372549, 9.64902739361702, 5.536832883558221), # 37
(3.893001023017902, 9.979390909090908, 10.410302898550723, 8.314145098039214, 9.641263829787233, 5.514738330834581), # 38
(3.900695380434782, 9.988668536931817, 10.396929619565215, 8.31133125, 9.632539627659574, 5.490492841079459), # 39
(3.908224104859335, 9.997798295454546, 10.382155797101449, 8.308210784313726, 9.62287234042553, 5.464171039480259), # 40
(3.915591224424552, 10.006778906249998, 10.366017844202899, 8.304788848039216, 9.612279521276594, 5.435847551224389), # 41
(3.9228007672634266, 10.015609090909093, 10.348552173913044, 8.301070588235293, 9.600778723404256, 5.40559700149925), # 42
(3.929856761508952, 10.024287571022725, 10.329795199275361, 8.297061151960785, 9.5883875, 5.373494015492254), # 43
(3.936763235294117, 10.032813068181818, 10.309783333333334, 8.292765686274508, 9.575123404255319, 5.339613218390804), # 44
(3.9435242167519178, 10.041184303977271, 10.288552989130435, 8.288189338235293, 9.561003989361701, 5.304029235382309), # 45
(3.9501437340153456, 10.0494, 10.266140579710147, 8.28333725490196, 9.546046808510638, 5.266816691654173), # 46
(3.956625815217391, 10.05745887784091, 10.24258251811594, 8.278214583333332, 9.530269414893617, 5.228050212393803), # 47
(3.962974488491049, 10.065359659090909, 10.217915217391303, 8.272826470588234, 9.513689361702127, 5.187804422788607), # 48
(3.9691937819693086, 10.073101065340907, 10.19217509057971, 8.26717806372549, 9.49632420212766, 5.146153948025987), # 49
(3.9752877237851663, 10.080681818181816, 10.165398550724637, 8.261274509803922, 9.478191489361702, 5.103173413293353), # 50
(3.9812603420716113, 10.088100639204544, 10.137622010869565, 8.255120955882353, 9.459308776595744, 5.0589374437781105), # 51
(3.987115664961637, 10.09535625, 10.10888188405797, 8.248722549019607, 9.439693617021277, 5.013520664667666), # 52
(3.992857720588235, 10.10244737215909, 10.079214583333332, 8.24208443627451, 9.419363563829787, 4.966997701149425), # 53
(3.9984905370843995, 10.109372727272726, 10.04865652173913, 8.235211764705882, 9.398336170212765, 4.919443178410794), # 54
(4.00401814258312, 10.116131036931817, 10.017244112318838, 8.22810968137255, 9.376628989361702, 4.87093172163918), # 55
(4.0094445652173905, 10.122721022727271, 9.985013768115941, 8.220783333333333, 9.354259574468085, 4.821537956021989), # 56
(4.014773833120205, 10.129141406250001, 9.952001902173912, 8.213237867647058, 9.331245478723403, 4.771336506746626), # 57
(4.0200099744245525, 10.135390909090907, 9.91824492753623, 8.20547843137255, 9.307604255319148, 4.7204019990005), # 58
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59
)
passenger_arriving_acc = (
(7, 6, 5, 6, 2, 0, 11, 5, 4, 7, 0, 0), # 0
(10, 13, 11, 7, 3, 0, 17, 13, 4, 10, 1, 0), # 1
(15, 19, 16, 10, 3, 0, 21, 23, 8, 12, 3, 0), # 2
(18, 23, 18, 13, 4, 0, 22, 29, 13, 17, 5, 0), # 3
(20, 28, 21, 15, 7, 0, 29, 41, 20, 21, 7, 0), # 4
(22, 39, 23, 17, 8, 0, 36, 51, 27, 23, 8, 0), # 5
(28, 47, 30, 22, 9, 0, 40, 59, 31, 24, 9, 0), # 6
(29, 52, 37, 22, 12, 0, 42, 62, 36, 30, 11, 0), # 7
(32, 63, 39, 24, 17, 0, 46, 72, 40, 33, 14, 0), # 8
(36, 71, 45, 28, 19, 0, 51, 77, 49, 40, 15, 0), # 9
(41, 74, 50, 29, 22, 0, 54, 84, 54, 41, 15, 0), # 10
(42, 82, 55, 33, 23, 0, 57, 90, 63, 48, 15, 0), # 11
(47, 92, 61, 36, 27, 0, 66, 96, 67, 53, 16, 0), # 12
(52, 104, 65, 42, 28, 0, 70, 103, 73, 57, 18, 0), # 13
(54, 107, 74, 43, 30, 0, 71, 111, 80, 59, 21, 0), # 14
(57, 112, 82, 44, 33, 0, 73, 117, 86, 60, 22, 0), # 15
(61, 114, 89, 47, 36, 0, 76, 122, 97, 65, 25, 0), # 16
(63, 120, 94, 50, 38, 0, 79, 131, 104, 67, 29, 0), # 17
(65, 129, 102, 51, 38, 0, 89, 141, 112, 74, 29, 0), # 18
(70, 135, 108, 54, 39, 0, 91, 149, 117, 79, 30, 0), # 19
(74, 141, 113, 56, 39, 0, 96, 161, 120, 83, 31, 0), # 20
(76, 147, 122, 57, 39, 0, 108, 165, 124, 90, 31, 0), # 21
(77, 150, 129, 59, 42, 0, 120, 175, 131, 94, 32, 0), # 22
(80, 157, 138, 62, 43, 0, 130, 180, 135, 96, 35, 0), # 23
(82, 168, 146, 68, 44, 0, 134, 188, 143, 97, 38, 0), # 24
(83, 178, 152, 70, 46, 0, 139, 199, 150, 101, 41, 0), # 25
(89, 188, 162, 73, 46, 0, 147, 204, 155, 103, 43, 0), # 26
(97, 195, 168, 77, 49, 0, 152, 208, 159, 104, 45, 0), # 27
(99, 205, 176, 82, 53, 0, 157, 218, 163, 106, 51, 0), # 28
(102, 216, 184, 85, 54, 0, 165, 225, 168, 108, 52, 0), # 29
(105, 224, 194, 88, 58, 0, 177, 228, 170, 113, 57, 0), # 30
(107, 232, 203, 96, 58, 0, 183, 235, 177, 116, 59, 0), # 31
(107, 240, 207, 97, 58, 0, 191, 242, 183, 119, 62, 0), # 32
(114, 244, 215, 101, 61, 0, 202, 250, 190, 123, 64, 0), # 33
(121, 249, 218, 106, 63, 0, 208, 257, 195, 126, 65, 0), # 34
(123, 253, 227, 110, 63, 0, 216, 262, 198, 131, 68, 0), # 35
(126, 263, 233, 113, 63, 0, 223, 275, 200, 132, 70, 0), # 36
(128, 267, 241, 115, 65, 0, 223, 285, 204, 138, 72, 0), # 37
(130, 277, 248, 118, 65, 0, 228, 289, 211, 142, 73, 0), # 38
(133, 288, 256, 122, 66, 0, 232, 293, 215, 148, 78, 0), # 39
(135, 291, 265, 125, 68, 0, 238, 299, 220, 153, 81, 0), # 40
(143, 300, 272, 125, 69, 0, 243, 306, 228, 160, 85, 0), # 41
(149, 304, 277, 129, 70, 0, 247, 312, 235, 163, 88, 0), # 42
(150, 316, 284, 132, 74, 0, 252, 321, 242, 171, 93, 0), # 43
(155, 325, 292, 133, 77, 0, 257, 327, 251, 173, 94, 0), # 44
(162, 331, 303, 134, 79, 0, 262, 333, 255, 178, 97, 0), # 45
(167, 339, 310, 139, 82, 0, 266, 340, 258, 180, 97, 0), # 46
(170, 345, 316, 145, 82, 0, 270, 345, 262, 183, 98, 0), # 47
(172, 351, 323, 148, 84, 0, 277, 359, 270, 183, 98, 0), # 48
(176, 358, 327, 150, 85, 0, 283, 370, 273, 184, 100, 0), # 49
(178, 365, 330, 152, 90, 0, 285, 380, 281, 188, 104, 0), # 50
(181, 374, 338, 156, 92, 0, 294, 390, 286, 191, 107, 0), # 51
(185, 384, 344, 157, 93, 0, 299, 398, 292, 193, 109, 0), # 52
(190, 394, 353, 159, 93, 0, 302, 401, 299, 199, 111, 0), # 53
(197, 403, 359, 163, 94, 0, 308, 408, 306, 202, 112, 0), # 54
(198, 409, 366, 165, 95, 0, 311, 412, 313, 209, 114, 0), # 55
(204, 415, 374, 168, 95, 0, 319, 421, 317, 213, 120, 0), # 56
(205, 419, 383, 174, 97, 0, 320, 430, 322, 223, 122, 0), # 57
(206, 425, 388, 177, 98, 0, 325, 438, 327, 229, 123, 0), # 58
(206, 425, 388, 177, 98, 0, 325, 438, 327, 229, 123, 0), # 59
)
passenger_arriving_rate = (
(3.1795818700614573, 6.524602272727271, 5.755849935732647, 3.0414130434782605, 1.7143269230769227, 0.0, 5.708152173913044, 6.857307692307691, 4.562119565217391, 3.8372332904884314, 1.6311505681818177, 0.0), # 0
(3.20942641205736, 6.597159934764309, 5.786939187017996, 3.0583509057971012, 1.7271759615384612, 0.0, 5.706206567028985, 6.908703846153845, 4.587526358695652, 3.857959458011997, 1.6492899836910773, 0.0), # 1
(3.238930172666081, 6.668641346801345, 5.817290488431875, 3.074915942028985, 1.7397538461538458, 0.0, 5.704201449275362, 6.959015384615383, 4.612373913043478, 3.8781936589545833, 1.6671603367003363, 0.0), # 2
(3.268068107989464, 6.738969375, 5.846881667737788, 3.091094021739129, 1.7520490384615384, 0.0, 5.702137092391305, 7.0081961538461535, 4.636641032608694, 3.897921111825192, 1.68474234375, 0.0), # 3
(3.296815174129353, 6.808066885521885, 5.875690552699228, 3.106871014492753, 1.76405, 0.0, 5.700013768115941, 7.0562, 4.66030652173913, 3.9171270351328187, 1.7020167213804713, 0.0), # 4
(3.3251463271875914, 6.87585674452862, 5.903694971079691, 3.122232789855072, 1.775745192307692, 0.0, 5.697831748188405, 7.102980769230768, 4.6833491847826085, 3.9357966473864603, 1.718964186132155, 0.0), # 5
(3.353036523266023, 6.942261818181818, 5.930872750642674, 3.137165217391304, 1.7871230769230766, 0.0, 5.695591304347826, 7.148492307692306, 4.705747826086957, 3.953915167095116, 1.7355654545454544, 0.0), # 6
(3.380460718466491, 7.007204972643096, 5.95720171915167, 3.1516541666666664, 1.7981721153846155, 0.0, 5.693292708333334, 7.192688461538462, 4.727481249999999, 3.97146781276778, 1.751801243160774, 0.0), # 7
(3.40739386889084, 7.0706090740740715, 5.982659704370181, 3.165685507246376, 1.8088807692307691, 0.0, 5.6909362318840575, 7.2355230769230765, 4.7485282608695645, 3.9884398029134536, 1.7676522685185179, 0.0), # 8
(3.4338109306409126, 7.132396988636362, 6.007224534061696, 3.179245108695652, 1.8192374999999996, 0.0, 5.68852214673913, 7.2769499999999985, 4.768867663043478, 4.004816356041131, 1.7830992471590905, 0.0), # 9
(3.459686859818554, 7.1924915824915825, 6.030874035989717, 3.19231884057971, 1.829230769230769, 0.0, 5.68605072463768, 7.316923076923076, 4.7884782608695655, 4.020582690659811, 1.7981228956228956, 0.0), # 10
(3.4849966125256073, 7.250815721801346, 6.053586037917737, 3.204892572463768, 1.8388490384615384, 0.0, 5.683522237318841, 7.355396153846153, 4.807338858695652, 4.0357240252784905, 1.8127039304503365, 0.0), # 11
(3.509715144863916, 7.30729227272727, 6.0753383676092545, 3.2169521739130427, 1.8480807692307688, 0.0, 5.680936956521738, 7.392323076923075, 4.825428260869565, 4.050225578406169, 1.8268230681818176, 0.0), # 12
(3.5338174129353224, 7.361844101430976, 6.096108852827762, 3.228483514492753, 1.8569144230769232, 0.0, 5.678295153985506, 7.427657692307693, 4.84272527173913, 4.0640725685518415, 1.840461025357744, 0.0), # 13
(3.5572783728416737, 7.414394074074074, 6.115875321336759, 3.2394724637681147, 1.8653384615384612, 0.0, 5.6755971014492745, 7.461353846153845, 4.859208695652172, 4.077250214224506, 1.8535985185185184, 0.0), # 14
(3.5800729806848106, 7.46486505681818, 6.134615600899742, 3.249904891304347, 1.873341346153846, 0.0, 5.672843070652174, 7.493365384615384, 4.874857336956521, 4.089743733933161, 1.866216264204545, 0.0), # 15
(3.6021761925665783, 7.513179915824915, 6.152307519280206, 3.259766666666666, 1.8809115384615382, 0.0, 5.6700333333333335, 7.523646153846153, 4.889649999999999, 4.101538346186803, 1.8782949789562287, 0.0), # 16
(3.6235629645888205, 7.55926151725589, 6.168928904241645, 3.26904365942029, 1.8880374999999998, 0.0, 5.667168161231884, 7.552149999999999, 4.903565489130435, 4.11261926949443, 1.8898153793139725, 0.0), # 17
(3.64420825285338, 7.603032727272725, 6.184457583547558, 3.2777217391304343, 1.8947076923076926, 0.0, 5.664247826086956, 7.578830769230771, 4.916582608695652, 4.122971722365039, 1.9007581818181813, 0.0), # 18
(3.664087013462101, 7.644416412037035, 6.198871384961439, 3.285786775362318, 1.9009105769230765, 0.0, 5.661272599637681, 7.603642307692306, 4.928680163043477, 4.132580923307626, 1.9111041030092588, 0.0), # 19
(3.683174202516827, 7.683335437710435, 6.2121481362467845, 3.2932246376811594, 1.9066346153846152, 0.0, 5.658242753623187, 7.626538461538461, 4.93983695652174, 4.14143209083119, 1.9208338594276086, 0.0), # 20
(3.7014447761194034, 7.719712670454542, 6.224265665167096, 3.3000211956521737, 1.911868269230769, 0.0, 5.655158559782609, 7.647473076923076, 4.950031793478261, 4.14951044344473, 1.9299281676136355, 0.0), # 21
(3.7188736903716704, 7.753470976430976, 6.23520179948586, 3.3061623188405793, 1.9165999999999994, 0.0, 5.652020289855073, 7.666399999999998, 4.959243478260869, 4.15680119965724, 1.938367744107744, 0.0), # 22
(3.7354359013754754, 7.784533221801346, 6.244934366966581, 3.311633876811594, 1.920818269230769, 0.0, 5.6488282155797105, 7.683273076923076, 4.967450815217392, 4.163289577977721, 1.9461333054503365, 0.0), # 23
(3.75110636523266, 7.812822272727271, 6.25344119537275, 3.3164217391304347, 1.9245115384615379, 0.0, 5.645582608695652, 7.6980461538461515, 4.974632608695652, 4.168960796915166, 1.9532055681818177, 0.0), # 24
(3.7658600380450684, 7.838260995370368, 6.260700112467866, 3.320511775362319, 1.9276682692307685, 0.0, 5.642283740942029, 7.710673076923074, 4.980767663043479, 4.173800074978577, 1.959565248842592, 0.0), # 25
(3.779671875914545, 7.860772255892254, 6.266688946015424, 3.3238898550724634, 1.9302769230769228, 0.0, 5.63893188405797, 7.721107692307691, 4.985834782608695, 4.177792630676949, 1.9651930639730635, 0.0), # 26
(3.792516834942932, 7.8802789204545425, 6.2713855237789184, 3.326541847826087, 1.9323259615384616, 0.0, 5.635527309782609, 7.729303846153846, 4.98981277173913, 4.180923682519278, 1.9700697301136356, 0.0), # 27
(3.804369871232075, 7.8967038552188535, 6.2747676735218505, 3.328453623188405, 1.9338038461538458, 0.0, 5.632070289855072, 7.735215384615383, 4.992680434782608, 4.183178449014567, 1.9741759638047134, 0.0), # 28
(3.815205940883816, 7.9099699263468, 6.276813223007711, 3.3296110507246373, 1.9346990384615383, 0.0, 5.628561096014493, 7.738796153846153, 4.994416576086956, 4.184542148671807, 1.9774924815867, 0.0), # 29
(3.8249999999999997, 7.92, 6.2775, 3.3299999999999996, 1.9349999999999996, 0.0, 5.625, 7.739999999999998, 4.994999999999999, 4.185, 1.98, 0.0), # 30
(3.834164434143222, 7.92833164772727, 6.276985163043477, 3.3299297549019604, 1.9348904787234043, 0.0, 5.620051511744128, 7.739561914893617, 4.994894632352941, 4.184656775362318, 1.9820829119318175, 0.0), # 31
(3.843131010230179, 7.936553181818182, 6.275455217391303, 3.329720392156862, 1.9345642553191487, 0.0, 5.612429710144928, 7.738257021276595, 4.994580588235293, 4.1836368115942015, 1.9841382954545455, 0.0), # 32
(3.8519037563938614, 7.944663579545454, 6.272932010869566, 3.329373970588235, 1.9340248404255314, 0.0, 5.6022092203898035, 7.736099361702125, 4.994060955882353, 4.181954673913044, 1.9861658948863634, 0.0), # 33
(3.860486700767263, 7.952661818181817, 6.269437391304347, 3.3288925490196077, 1.9332757446808508, 0.0, 5.589464667666167, 7.733102978723403, 4.993338823529411, 4.179624927536231, 1.9881654545454543, 0.0), # 34
(3.8688838714833755, 7.960546874999998, 6.264993206521739, 3.328278186274509, 1.9323204787234043, 0.0, 5.574270677161419, 7.729281914893617, 4.9924172794117645, 4.176662137681159, 1.9901367187499994, 0.0), # 35
(3.8770992966751923, 7.968317727272727, 6.259621304347825, 3.3275329411764707, 1.9311625531914893, 0.0, 5.556701874062968, 7.724650212765957, 4.9912994117647065, 4.173080869565217, 1.9920794318181818, 0.0), # 36
(3.885137004475703, 7.975973352272726, 6.253343532608695, 3.3266588725490194, 1.9298054787234038, 0.0, 5.536832883558221, 7.719221914893615, 4.989988308823529, 4.168895688405796, 1.9939933380681816, 0.0), # 37
(3.893001023017902, 7.983512727272726, 6.246181739130434, 3.325658039215685, 1.9282527659574464, 0.0, 5.514738330834581, 7.713011063829786, 4.988487058823528, 4.164121159420289, 1.9958781818181814, 0.0), # 38
(3.900695380434782, 7.990934829545453, 6.238157771739129, 3.3245324999999997, 1.9265079255319146, 0.0, 5.490492841079459, 7.7060317021276585, 4.98679875, 4.1587718478260856, 1.9977337073863632, 0.0), # 39
(3.908224104859335, 7.998238636363636, 6.229293478260869, 3.32328431372549, 1.924574468085106, 0.0, 5.464171039480259, 7.698297872340424, 4.984926470588236, 4.1528623188405795, 1.999559659090909, 0.0), # 40
(3.915591224424552, 8.005423124999998, 6.219610706521739, 3.321915539215686, 1.9224559042553186, 0.0, 5.435847551224389, 7.689823617021275, 4.982873308823529, 4.146407137681159, 2.0013557812499996, 0.0), # 41
(3.9228007672634266, 8.012487272727274, 6.209131304347826, 3.320428235294117, 1.920155744680851, 0.0, 5.40559700149925, 7.680622978723404, 4.980642352941175, 4.1394208695652175, 2.0031218181818184, 0.0), # 42
(3.929856761508952, 8.01943005681818, 6.1978771195652165, 3.3188244607843136, 1.9176774999999997, 0.0, 5.373494015492254, 7.670709999999999, 4.978236691176471, 4.131918079710144, 2.004857514204545, 0.0), # 43
(3.936763235294117, 8.026250454545455, 6.18587, 3.317106274509803, 1.9150246808510636, 0.0, 5.339613218390804, 7.660098723404254, 4.975659411764705, 4.123913333333333, 2.0065626136363637, 0.0), # 44
(3.9435242167519178, 8.032947443181817, 6.1731317934782615, 3.315275735294117, 1.91220079787234, 0.0, 5.304029235382309, 7.64880319148936, 4.972913602941175, 4.115421195652174, 2.008236860795454, 0.0), # 45
(3.9501437340153456, 8.03952, 6.159684347826087, 3.313334901960784, 1.9092093617021275, 0.0, 5.266816691654173, 7.63683744680851, 4.970002352941176, 4.106456231884058, 2.00988, 0.0), # 46
(3.956625815217391, 8.045967102272726, 6.1455495108695635, 3.3112858333333324, 1.9060538829787232, 0.0, 5.228050212393803, 7.624215531914893, 4.966928749999999, 4.097033007246376, 2.0114917755681816, 0.0), # 47
(3.962974488491049, 8.052287727272727, 6.130749130434782, 3.309130588235293, 1.9027378723404254, 0.0, 5.187804422788607, 7.610951489361701, 4.96369588235294, 4.087166086956521, 2.013071931818182, 0.0), # 48
(3.9691937819693086, 8.058480852272725, 6.115305054347826, 3.306871225490196, 1.899264840425532, 0.0, 5.146153948025987, 7.597059361702128, 4.960306838235294, 4.076870036231884, 2.014620213068181, 0.0), # 49
(3.9752877237851663, 8.064545454545453, 6.099239130434782, 3.3045098039215683, 1.8956382978723403, 0.0, 5.103173413293353, 7.582553191489361, 4.956764705882353, 4.066159420289854, 2.016136363636363, 0.0), # 50
(3.9812603420716113, 8.070480511363634, 6.082573206521739, 3.302048382352941, 1.8918617553191486, 0.0, 5.0589374437781105, 7.567447021276594, 4.953072573529411, 4.055048804347826, 2.0176201278409085, 0.0), # 51
(3.987115664961637, 8.076284999999999, 6.065329130434782, 3.299489019607843, 1.8879387234042553, 0.0, 5.013520664667666, 7.551754893617021, 4.949233529411765, 4.043552753623188, 2.0190712499999997, 0.0), # 52
(3.992857720588235, 8.081957897727271, 6.047528749999999, 3.2968337745098037, 1.8838727127659571, 0.0, 4.966997701149425, 7.5354908510638285, 4.945250661764706, 4.0316858333333325, 2.020489474431818, 0.0), # 53
(3.9984905370843995, 8.08749818181818, 6.0291939130434775, 3.294084705882353, 1.8796672340425529, 0.0, 4.919443178410794, 7.5186689361702115, 4.941127058823529, 4.019462608695651, 2.021874545454545, 0.0), # 54
(4.00401814258312, 8.092904829545454, 6.010346467391303, 3.2912438725490194, 1.8753257978723403, 0.0, 4.87093172163918, 7.501303191489361, 4.936865808823529, 4.006897644927535, 2.0232262073863634, 0.0), # 55
(4.0094445652173905, 8.098176818181816, 5.991008260869564, 3.288313333333333, 1.8708519148936167, 0.0, 4.821537956021989, 7.483407659574467, 4.9324699999999995, 3.994005507246376, 2.024544204545454, 0.0), # 56
(4.014773833120205, 8.103313125, 5.971201141304347, 3.285295147058823, 1.8662490957446805, 0.0, 4.771336506746626, 7.464996382978722, 4.927942720588234, 3.980800760869564, 2.02582828125, 0.0), # 57
(4.0200099744245525, 8.108312727272725, 5.950946956521738, 3.2821913725490197, 1.8615208510638295, 0.0, 4.7204019990005, 7.446083404255318, 4.923287058823529, 3.9672979710144918, 2.0270781818181813, 0.0), # 58
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59
)
passenger_allighting_rate = (
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 0
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 1
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 2
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 3
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 4
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 5
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 6
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 7
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 8
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 9
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 10
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 11
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 12
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 13
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 14
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 15
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 16
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 17
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 18
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 19
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 20
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 21
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 22
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 23
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 24
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 25
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 26
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 27
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 28
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 29
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 30
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 31
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 32
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 33
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 34
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 35
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 36
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 37
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 38
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 39
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 40
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 41
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 42
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 43
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 44
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 45
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 46
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 47
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 48
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 49
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 50
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 51
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 52
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 53
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 54
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 55
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 56
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 57
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 58
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 59
)
"""
parameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html
"""
#initial entropy
entropy = 258194110137029475889902652135037600173
#index for seed sequence child
child_seed_index = (
1, # 0
21, # 1
)
| 112.608955 | 213 | 0.727919 | 5,147 | 37,724 | 5.33301 | 0.223237 | 0.314766 | 0.249189 | 0.472148 | 0.33014 | 0.329775 | 0.329775 | 0.329775 | 0.329775 | 0.329775 | 0 | 0.818127 | 0.119659 | 37,724 | 334 | 214 | 112.946108 | 0.008401 | 0.032102 | 0 | 0.202532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.015823 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
ed24b23df64ea2499dc6f3395f0553b70ff57350 | 932 | py | Python | octopus_ml/__init__.py | gershonc/octopus-ml | 6a65124e8852de3f6d6bcfa6fd49e1f35639640c | [
"MIT"
] | 14 | 2021-02-07T22:19:10.000Z | 2022-03-25T07:32:29.000Z | octopus_ml/__init__.py | gershonc/octopus-ml | 6a65124e8852de3f6d6bcfa6fd49e1f35639640c | [
"MIT"
] | 2 | 2021-04-29T06:44:11.000Z | 2021-11-20T17:02:33.000Z | octopus_ml/__init__.py | gershonc/octopus-ml | 6a65124e8852de3f6d6bcfa6fd49e1f35639640c | [
"MIT"
] | 4 | 2021-02-10T05:19:22.000Z | 2021-05-05T12:01:36.000Z | from .octopus_ml import plot_imp
from .octopus_ml import adjusted_classes
from .octopus_ml import cv
from .octopus_ml import cv_adv
from .octopus_ml import cv_plot
from .octopus_ml import roc_curve_plot
from .octopus_ml import confusion_matrix_plot
from .octopus_ml import hist_target
from .octopus_ml import target_pie
from .octopus_ml import preds_distribution
from .octopus_ml import target_corr
from .octopus_ml import label_dist
from .octopus_data import sampling_within_group
from .octopus_data import anomalies
from .octopus_data import correlations
from .octopus_data import recieve_fps
from .octopus_data import recieve_fns
from .octopus_data import sampling_by_group
from .octopus_data import sampling
from .octopus_data import data_leakage
from .octopus_data import cat_features_proccessing
from .octopus_data import convert_to_categorical
from .octopus_data import detect_categorical
from .octopus_data import diff_list
| 37.28 | 50 | 0.871245 | 146 | 932 | 5.219178 | 0.287671 | 0.346457 | 0.204724 | 0.299213 | 0.551181 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.103004 | 932 | 24 | 51 | 38.833333 | 0.911483 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
71fb548a11196636dd2f86124cb8b3a610c690a8 | 122 | py | Python | Python/Tests/TestData/FormattingTests/document.py | techkey/PTVS | 8355e67eedd8e915ca49bd38a2f36172696fd903 | [
"Apache-2.0"
] | 404 | 2019-05-07T02:21:57.000Z | 2022-03-31T17:03:04.000Z | Python/Tests/TestData/FormattingTests/document.py | techkey/PTVS | 8355e67eedd8e915ca49bd38a2f36172696fd903 | [
"Apache-2.0"
] | 1,672 | 2019-05-06T21:09:38.000Z | 2022-03-31T23:16:04.000Z | Python/Tests/TestData/FormattingTests/document.py | techkey/PTVS | 8355e67eedd8e915ca49bd38a2f36172696fd903 | [
"Apache-2.0"
] | 186 | 2019-05-13T03:17:37.000Z | 2022-03-31T16:24:05.000Z | def f ( one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve ) :
pass
def g (): return 5 ** 2
| 30.5 | 85 | 0.581967 | 20 | 122 | 3.55 | 0.95 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.022222 | 0.262295 | 122 | 3 | 86 | 40.666667 | 0.766667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.666667 | false | 0.333333 | 0 | 0.333333 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.