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
736997579c6c03bb5473f9480cae7d5434895ecd
225
py
Python
language_invariant_properties/abstractions/classifiers.py
MilaNLProc/language-invariant-properties
805b206976dd4645966ca76e554c3929fd681e68
[ "MIT" ]
14
2021-09-21T07:31:32.000Z
2022-03-10T06:04:17.000Z
language_invariant_properties/abstractions/classifiers.py
MilaNLProc/language-invariant-properties
805b206976dd4645966ca76e554c3929fd681e68
[ "MIT" ]
null
null
null
language_invariant_properties/abstractions/classifiers.py
MilaNLProc/language-invariant-properties
805b206976dd4645966ca76e554c3929fd681e68
[ "MIT" ]
null
null
null
import abc class AbstractClassifier(abc.ABC): def __init__(self): pass @abc.abstractmethod def train(self, text, labels): pass @abc.abstractmethod def predict(self, text): pass
15
34
0.617778
25
225
5.4
0.52
0.103704
0.311111
0.355556
0
0
0
0
0
0
0
0
0.293333
225
14
35
16.071429
0.849057
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0.3
false
0.3
0.1
0
0.5
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
73ce5b80f731b7e7485abce4592d17ecef765310
92
py
Python
portfolio/admin.py
sujithrex/django-p-portfolio
c8e998ef6e78c1b0e4c383e6579e6b849557044c
[ "MIT" ]
null
null
null
portfolio/admin.py
sujithrex/django-p-portfolio
c8e998ef6e78c1b0e4c383e6579e6b849557044c
[ "MIT" ]
null
null
null
portfolio/admin.py
sujithrex/django-p-portfolio
c8e998ef6e78c1b0e4c383e6579e6b849557044c
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import project admin.site.register(project)
15.333333
32
0.815217
13
92
5.769231
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.119565
92
5
33
18.4
0.925926
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
73e104568155b7ab74953232d0da49fd289a50e6
1,094
py
Python
src/clients/python/test/test_scrub_result.py
cityofcapetown/cape-good-of-place-names
0b73a67e9019c910663d3d502a947e9564d04b70
[ "MIT" ]
null
null
null
src/clients/python/test/test_scrub_result.py
cityofcapetown/cape-good-of-place-names
0b73a67e9019c910663d3d502a947e9564d04b70
[ "MIT" ]
16
2020-07-31T08:45:04.000Z
2021-12-23T23:54:19.000Z
src/clients/python/test/test_scrub_result.py
cityofcapetown/cape-good-of-place-names
0b73a67e9019c910663d3d502a947e9564d04b70
[ "MIT" ]
1
2020-07-31T10:09:59.000Z
2020-07-31T10:09:59.000Z
# coding: utf-8 """ Cape of Good Place Names Service This is a stateless service for performing various geotranslation operations, moving between how people describe places and codified coordinate systems. # noqa: E501 OpenAPI spec version: 0.1.0 Contact: opmdata+cogpn-support@capetown.gov.za Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import cape_of_good_place_names_client from cape_of_good_place_names_client.models.scrub_result import ScrubResult # noqa: E501 from cape_of_good_place_names_client.rest import ApiException class TestScrubResult(unittest.TestCase): """ScrubResult unit test stubs""" def setUp(self): pass def tearDown(self): pass def testScrubResult(self): """Test ScrubResult""" # FIXME: construct object with mandatory attributes with example values # model = cape_of_good_place_names_client.models.scrub_result.ScrubResult() # noqa: E501 pass if __name__ == '__main__': unittest.main()
27.35
170
0.738574
141
1,094
5.48227
0.609929
0.03881
0.064683
0.097025
0.214748
0.188875
0.155239
0.111255
0.111255
0
0
0.014623
0.187386
1,094
39
171
28.051282
0.854893
0.52011
0
0.214286
0
0
0.016563
0
0
0
0
0.025641
0
1
0.214286
false
0.214286
0.357143
0
0.642857
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
1
1
0
1
0
0
5
73e616179714721fa08e3320defbe2be075f7dbd
23,688
py
Python
tests/test_image_sequence_reference.py
eric-with-a-c/OpenTimelineIO
9f55adfc78293b4f508c4a27a34e110ccd92fca6
[ "Apache-2.0" ]
1
2022-03-26T12:59:59.000Z
2022-03-26T12:59:59.000Z
tests/test_image_sequence_reference.py
eric-with-a-c/OpenTimelineIO
9f55adfc78293b4f508c4a27a34e110ccd92fca6
[ "Apache-2.0" ]
40
2021-09-13T03:09:21.000Z
2022-03-28T03:11:10.000Z
tests/test_image_sequence_reference.py
eric-with-a-c/OpenTimelineIO
9f55adfc78293b4f508c4a27a34e110ccd92fca6
[ "Apache-2.0" ]
1
2022-03-09T03:37:24.000Z
2022-03-09T03:37:24.000Z
"""Test harness for Image Sequence References.""" import unittest import sys import opentimelineio as otio import opentimelineio.test_utils as otio_test_utils IS_PYTHON_2 = (sys.version_info < (3, 0)) class ImageSequenceReferenceTests( unittest.TestCase, otio_test_utils.OTIOAssertions ): def test_create(self): frame_policy = otio.schema.ImageSequenceReference.MissingFramePolicy.hold ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=5, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(0, 30), otio.opentime.RationalTime(60, 30), ), frame_step=3, missing_frame_policy=frame_policy, rate=30, metadata={"custom": {"foo": "bar"}}, ) # Check Values self.assertEqual(ref.target_url_base, "file:///show/seq/shot/rndr/") self.assertEqual(ref.name_prefix, "show_shot.") self.assertEqual(ref.name_suffix, ".exr") self.assertEqual(ref.frame_zero_padding, 5) self.assertEqual( ref.available_range, otio.opentime.TimeRange( otio.opentime.RationalTime(0, 30), otio.opentime.RationalTime(60, 30), ) ) self.assertEqual(ref.frame_step, 3) self.assertEqual(ref.rate, 30) self.assertEqual(ref.metadata, {"custom": {"foo": "bar"}}) self.assertEqual( ref.missing_frame_policy, otio.schema.ImageSequenceReference.MissingFramePolicy.hold, ) @unittest.skipIf(IS_PYTHON_2, "unicode strings do funny things in python2") def test_str(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", start_frame=1, frame_step=3, rate=30, frame_zero_padding=5, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(0, 30), otio.opentime.RationalTime(60, 30), ), metadata={"custom": {"foo": "bar"}}, available_image_bounds=otio.schema.Box2d( otio.schema.V2d(0.0, 0.0), otio.schema.V2d(16.0, 9.0) ), ) self.assertEqual( str(ref), 'ImageSequenceReference(' '"file:///show/seq/shot/rndr/", ' '"show_shot.", ' '".exr", ' '1, ' '3, ' '30.0, ' '5, ' 'MissingFramePolicy.error, ' 'TimeRange(RationalTime(0, 30), RationalTime(60, 30)), ' 'Box2d(V2d(0.0, 0.0), V2d(16.0, 9.0)), ' "{'custom': {'foo': 'bar'}}" ')' ) @unittest.skipIf(IS_PYTHON_2, "unicode strings do funny things in python2") def test_repr(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", start_frame=1, frame_step=3, rate=30, frame_zero_padding=5, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(0, 30), otio.opentime.RationalTime(60, 30), ), available_image_bounds=otio.schema.Box2d( otio.schema.V2d(0.0, 0.0), otio.schema.V2d(16.0, 9.0) ), metadata={"custom": {"foo": "bar"}}, ) ref_value = ( 'ImageSequenceReference(' "target_url_base='file:///show/seq/shot/rndr/', " "name_prefix='show_shot.', " "name_suffix='.exr', " 'start_frame=1, ' 'frame_step=3, ' 'rate=30.0, ' 'frame_zero_padding=5, ' 'missing_frame_policy=<MissingFramePolicy.error: 0>, ' 'available_range={}, ' 'available_image_bounds=otio.schema.Box2d(' 'min=otio.schema.V2d(x=0.0, y=0.0), ' 'max=otio.schema.V2d(x=16.0, y=9.0)), ' "metadata={{'custom': {{'foo': 'bar'}}}}" ')'.format(repr(ref.available_range)) ) self.assertEqual(repr(ref), ref_value) def test_serialize_roundtrip(self): frame_policy = otio.schema.ImageSequenceReference.MissingFramePolicy.hold ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=5, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(0, 30), otio.opentime.RationalTime(60, 30), ), frame_step=3, rate=30, missing_frame_policy=frame_policy, metadata={"custom": {"foo": "bar"}}, ) encoded = otio.adapters.otio_json.write_to_string(ref) decoded = otio.adapters.otio_json.read_from_string(encoded) self.assertIsOTIOEquivalentTo(ref, decoded) encoded2 = otio.adapters.otio_json.write_to_string(decoded) self.assertEqual(encoded, encoded2) # Check Values self.assertEqual( decoded.target_url_base, "file:///show/seq/shot/rndr/" ) self.assertEqual(decoded.name_prefix, "show_shot.") self.assertEqual(decoded.name_suffix, ".exr") self.assertEqual(decoded.frame_zero_padding, 5) self.assertEqual( decoded.available_range, otio.opentime.TimeRange( otio.opentime.RationalTime(0, 30), otio.opentime.RationalTime(60, 30), ) ) self.assertEqual(decoded.frame_step, 3) self.assertEqual(decoded.rate, 30) self.assertEqual( decoded.missing_frame_policy, otio.schema.ImageSequenceReference.MissingFramePolicy.hold ) self.assertEqual(decoded.metadata, {"custom": {"foo": "bar"}}) def test_deserialize_invalid_enum_value(self): encoded = """{ "OTIO_SCHEMA": "ImageSequenceReference.1", "metadata": { "custom": { "foo": "bar" } }, "name": "", "available_range": { "OTIO_SCHEMA": "TimeRange.1", "duration": { "OTIO_SCHEMA": "RationalTime.1", "rate": 30.0, "value": 60.0 }, "start_time": { "OTIO_SCHEMA": "RationalTime.1", "rate": 30.0, "value": 0.0 } }, "target_url_base": "file:///show/seq/shot/rndr/", "name_prefix": "show_shot.", "name_suffix": ".exr", "start_frame": 1, "frame_step": 3, "rate": 30.0, "frame_zero_padding": 5, "missing_frame_policy": "BOGUS" }""" with self.assertRaises(ValueError): otio.adapters.otio_json.read_from_string(encoded) def test_number_of_images_in_sequence(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(0, 24), otio.opentime.RationalTime(48, 24), ), rate=24, ) self.assertEqual(ref.number_of_images_in_sequence(), 48) def test_number_of_images_in_sequence_with_skip(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(0, 24), otio.opentime.RationalTime(48, 24), ), frame_step=2, rate=24, ) self.assertEqual(ref.number_of_images_in_sequence(), 24) ref.frame_step = 3 self.assertEqual(ref.number_of_images_in_sequence(), 16) def test_target_url_for_image_number(self): all_images_urls = [ "file:///show/seq/shot/rndr/show_shot.{:04}.exr".format(i) for i in range(1, 49) ] ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(0, 24), otio.opentime.RationalTime(48, 24), ), start_frame=1, frame_step=1, rate=24, ) generated_urls = [ ref.target_url_for_image_number(i) for i in range(ref.number_of_images_in_sequence()) ] self.assertEqual(all_images_urls, generated_urls) def test_target_url_for_image_number_steps(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(0, 24), otio.opentime.RationalTime(48, 24), ), start_frame=1, frame_step=2, rate=24, ) all_images_urls = [ "file:///show/seq/shot/rndr/show_shot.{:04}.exr".format(i) for i in range(1, 49, 2) ] generated_urls = [ ref.target_url_for_image_number(i) for i in range(ref.number_of_images_in_sequence()) ] self.assertEqual(all_images_urls, generated_urls) ref.frame_step = 3 all_images_urls_threes = [ "file:///show/seq/shot/rndr/show_shot.{:04}.exr".format(i) for i in range(1, 49, 3) ] generated_urls_threes = [ ref.target_url_for_image_number(i) for i in range(ref.number_of_images_in_sequence()) ] self.assertEqual(all_images_urls_threes, generated_urls_threes) ref.frame_step = 2 ref.start_frame = 0 all_images_urls_zero_first = [ "file:///show/seq/shot/rndr/show_shot.{:04}.exr".format(i) for i in range(0, 48, 2) ] generated_urls_zero_first = [ ref.target_url_for_image_number(i) for i in range(ref.number_of_images_in_sequence()) ] self.assertEqual(all_images_urls_zero_first, generated_urls_zero_first) def test_target_url_for_image_number_with_missing_slash(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(0, 24), otio.opentime.RationalTime(48, 24), ), start_frame=1, frame_step=1, rate=24, ) self.assertEqual( ref.target_url_for_image_number(0), "file:///show/seq/shot/rndr/show_shot.0001.exr" ) def test_abstract_target_url(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(0, 24), otio.opentime.RationalTime(48, 24), ), start_frame=1, frame_step=1, rate=24, ) self.assertEqual( ref.abstract_target_url("@@@@"), "file:///show/seq/shot/rndr/show_shot.@@@@.exr" ) def test_abstract_target_url_with_missing_slash(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(0, 24), otio.opentime.RationalTime(48, 24), ), start_frame=1, frame_step=1, rate=24, ) self.assertEqual( ref.abstract_target_url("@@@@"), "file:///show/seq/shot/rndr/show_shot.@@@@.exr" ) def test_presentation_time_for_image_number(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(0, 24), otio.opentime.RationalTime(48, 24), ), start_frame=1, frame_step=2, rate=24, ) reference_values = [ otio.opentime.RationalTime(i * 2, 24) for i in range(24) ] generated_values = [ ref.presentation_time_for_image_number(i) for i in range(ref.number_of_images_in_sequence()) ] self.assertEqual(generated_values, reference_values) def test_presentation_time_for_image_number_with_offset(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(12, 24), otio.opentime.RationalTime(48, 24), ), start_frame=1, frame_step=2, rate=24, ) first_frame_time = otio.opentime.RationalTime(12, 24) reference_values = [ first_frame_time + otio.opentime.RationalTime(i * 2, 24) for i in range(24) ] generated_values = [ ref.presentation_time_for_image_number(i) for i in range(ref.number_of_images_in_sequence()) ] self.assertEqual(generated_values, reference_values) def test_end_frame(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(12, 24), otio.opentime.RationalTime(48, 24), ), start_frame=1, frame_step=1, rate=24, ) self.assertEqual(ref.end_frame(), 48) # Frame step should not affect this ref.frame_step = 2 self.assertEqual(ref.end_frame(), 48) def test_end_frame_with_offset(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(12, 24), otio.opentime.RationalTime(48, 24), ), start_frame=101, frame_step=1, rate=24, ) self.assertEqual(ref.end_frame(), 148) # Frame step should not affect this ref.frame_step = 2 self.assertEqual(ref.end_frame(), 148) def test_frame_for_time(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(12, 24), otio.opentime.RationalTime(48, 24), ), start_frame=1, frame_step=1, rate=24, ) # The start time should be frame 1 self.assertEqual( ref.frame_for_time(ref.available_range.start_time), 1 ) # Test a sample in the middle self.assertEqual( ref.frame_for_time(otio.opentime.RationalTime(15, 24)), 4 ) # The end time (inclusive) should map to the last frame number self.assertEqual( ref.frame_for_time(ref.available_range.end_time_inclusive()), 48 ) # make sure frame step and RationalTime rate have no effect ref.frame_step = 2 self.assertEqual( ref.frame_for_time(otio.opentime.RationalTime(118, 48)), 48 ) def test_frame_for_time_out_of_range(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(12, 30), otio.opentime.RationalTime(60, 30), ), start_frame=1, frame_step=1, rate=30, ) with self.assertRaises(ValueError): ref.frame_for_time(otio.opentime.RationalTime(73, 30)) def test_frame_range_for_time_range(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(12, 24), otio.opentime.RationalTime(60, 24), ), start_frame=1, frame_step=1, rate=24, ) time_range = otio.opentime.TimeRange( otio.opentime.RationalTime(24, 24), otio.opentime.RationalTime(17, 24), ) self.assertEqual(ref.frame_range_for_time_range(time_range), (13, 29)) def test_frame_range_for_time_range_out_of_available_image_bounds(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(12, 24), otio.opentime.RationalTime(60, 24), ), start_frame=1, frame_step=1, rate=24, ) time_range = otio.opentime.TimeRange( otio.opentime.RationalTime(24, 24), otio.opentime.RationalTime(60, 24), ) with self.assertRaises(ValueError): ref.frame_range_for_time_range(time_range) def test_negative_frame_numbers(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.RationalTime(12, 24), otio.opentime.RationalTime(48, 24), ), start_frame=-1, frame_step=2, rate=24, ) self.assertEqual(ref.number_of_images_in_sequence(), 24) self.assertEqual( ref.presentation_time_for_image_number(0), otio.opentime.RationalTime(12, 24), ) self.assertEqual( ref.presentation_time_for_image_number(1), otio.opentime.RationalTime(14, 24), ) self.assertEqual( ref.presentation_time_for_image_number(2), otio.opentime.RationalTime(16, 24), ) self.assertEqual( ref.presentation_time_for_image_number(23), otio.opentime.RationalTime(58, 24), ) self.assertEqual( ref.target_url_for_image_number(0), "file:///show/seq/shot/rndr/show_shot.-0001.exr", ) self.assertEqual( ref.target_url_for_image_number(1), "file:///show/seq/shot/rndr/show_shot.0001.exr", ) self.assertEqual( ref.target_url_for_image_number(2), "file:///show/seq/shot/rndr/show_shot.0003.exr", ) self.assertEqual( ref.target_url_for_image_number(17), "file:///show/seq/shot/rndr/show_shot.0033.exr", ) self.assertEqual( ref.target_url_for_image_number(23), "file:///show/seq/shot/rndr/show_shot.0045.exr", ) # Check values by ones ref.frame_step = 1 for i in range(1, ref.number_of_images_in_sequence()): self.assertEqual( ref.target_url_for_image_number(i), "file:///show/seq/shot/rndr/show_shot.{:04}.exr".format(i - 1), ) def test_target_url_for_image_number_with_missing_timing_info(self): ref = otio.schema.ImageSequenceReference( "file:///show/seq/shot/rndr/", "show_shot.", ".exr", frame_zero_padding=4, start_frame=1, frame_step=1, rate=24, ) # Make sure the right error and a useful message raised when # source_range is either un-set or zero duration. with self.assertRaises(IndexError) as exception_manager: ref.target_url_for_image_number(0) self.assertEqual( str(exception_manager.exception), "Zero duration sequences has no frames.", ) ref.available_range = otio.opentime.TimeRange( otio.opentime.RationalTime(12, 24), otio.opentime.RationalTime(0, 1), ) with self.assertRaises(IndexError) as exception_manager: ref.target_url_for_image_number(0) self.assertEqual( str(exception_manager.exception), "Zero duration sequences has no frames.", ) # Set the duration and make sure a similarly useful message comes # when rate is un-set. ref.available_range = otio.opentime.TimeRange( otio.opentime.RationalTime(12, 24), otio.opentime.RationalTime(48, 24), ) ref.rate = 0 with self.assertRaises(IndexError) as exception_manager: ref.target_url_for_image_number(0) self.assertEqual( str(exception_manager.exception), "Zero rate sequence has no frames.", ) def test_clone(self): """ ensure that deeopcopy/clone function """ isr = otio.schema.ImageSequenceReference() try: import copy cln = copy.deepcopy(isr) cln = isr.clone() except ValueError as exc: self.fail("Cloning raised an exception: {}".format(exc)) self.assertJsonEqual(isr, cln) def test_target_url_for_image_number_with_blank_target_url_base(self): ref = otio.schema.ImageSequenceReference( name_prefix="myfilename.", name_suffix=".exr", start_frame=101, rate=24, frame_zero_padding=4, available_range=otio.opentime.TimeRange( otio.opentime.from_timecode("01:25:30:04", rate=24), duration=otio.opentime.from_frames(48, 24) ), ) self.assertEqual( ref.target_url_for_image_number(0), "myfilename.0101.exr" ) if __name__ == "__main__": unittest.main()
33.36338
81
0.548252
2,517
23,688
4.929281
0.085816
0.088015
0.119932
0.047151
0.816072
0.784396
0.751834
0.711211
0.668091
0.618602
0
0.0364
0.337766
23,688
709
82
33.410437
0.75451
0.024021
0
0.602585
0
0.001616
0.150336
0.07231
0
0
0
0
0.106624
1
0.038772
false
0
0.008078
0
0.048465
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
73e8418b29f9bf717dddce431130681be6def75e
556
py
Python
tests/trees/test_bst.py
velimir0xff/hackerrank-py
dd18155f0d5a8cffdd7ee663bb0bee6ddf5e80af
[ "MIT" ]
null
null
null
tests/trees/test_bst.py
velimir0xff/hackerrank-py
dd18155f0d5a8cffdd7ee663bb0bee6ddf5e80af
[ "MIT" ]
null
null
null
tests/trees/test_bst.py
velimir0xff/hackerrank-py
dd18155f0d5a8cffdd7ee663bb0bee6ddf5e80af
[ "MIT" ]
null
null
null
from hr.graphs.trees import Node, checkBST def test_single_node_bst(): assert checkBST(Node(0)) def test_check_bst_1(): assert checkBST(Node(4, Node(2), Node(6))) def test_check_bst_2(): assert checkBST(Node(4, Node(2, Node(1)), Node(6))) def test_check_bst_3(): assert checkBST(Node(4, Node(2, Node(1)), Node(6, None, Node(7)))) def test_check_bst_4(): assert not checkBST(Node(4, Node(2, Node(1)), Node(6, None, Node(5)))) def test_check_bst_5(): assert not checkBST(Node(4, Node(9, Node(1)), Node(6, None, Node(7))))
21.384615
74
0.665468
100
556
3.52
0.24
0.119318
0.170455
0.213068
0.642045
0.642045
0.454545
0.318182
0.318182
0.318182
0
0.059701
0.156475
556
25
75
22.24
0.690832
0
0
0
0
0
0
0
0
0
0
0
0.461538
1
0.461538
true
0
0.076923
0
0.538462
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
1
0
0
5
73ea20537162ee80abb307f3e642be3d3b5b073a
241
py
Python
toontown/rpc/AwardManagerUD.py
TheFamiliarScoot/open-toontown
678313033174ea7d08e5c2823bd7b473701ff547
[ "BSD-3-Clause" ]
99
2019-11-02T22:25:00.000Z
2022-02-03T03:48:00.000Z
toontown/rpc/AwardManagerUD.py
TheFamiliarScoot/open-toontown
678313033174ea7d08e5c2823bd7b473701ff547
[ "BSD-3-Clause" ]
42
2019-11-03T05:31:08.000Z
2022-03-16T22:50:32.000Z
toontown/rpc/AwardManagerUD.py
TheFamiliarScoot/open-toontown
678313033174ea7d08e5c2823bd7b473701ff547
[ "BSD-3-Clause" ]
57
2019-11-03T07:47:37.000Z
2022-03-22T00:41:49.000Z
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD class AwardManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory('AwardManagerUD')
40.166667
74
0.871369
19
241
11.052632
0.578947
0.095238
0
0
0
0
0
0
0
0
0
0
0.074689
241
5
75
48.2
0.941704
0
0
0
0
0
0.058091
0
0
0
0
0
0
1
0
false
0
0.5
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
0
0
1
0
1
0
0
5
73f0347fb30dcd10c91187690e22612bc6f64ee8
1,044
py
Python
challenges/multi-bracket-validation/test_multi_bracket_validation.py
tyler-fishbone/data-structures-and-algorithms
29790f2672d3ddb0aadf62725f28180b092f4568
[ "MIT" ]
null
null
null
challenges/multi-bracket-validation/test_multi_bracket_validation.py
tyler-fishbone/data-structures-and-algorithms
29790f2672d3ddb0aadf62725f28180b092f4568
[ "MIT" ]
4
2018-03-22T19:19:11.000Z
2018-04-11T00:35:26.000Z
challenges/multi-bracket-validation/test_multi_bracket_validation.py
tyler-fishbone/data-structures-and-algorithms
29790f2672d3ddb0aadf62725f28180b092f4568
[ "MIT" ]
null
null
null
import pytest from multi_bracket_validation import multi_bracket_validation def test_mbv_true_case_simple(): """test function on balanced str""" assert multi_bracket_validation('[{()}]') == True def test_mbv_true_case_empty_str(): """test function with empty string""" assert multi_bracket_validation('') == True def test_mbv_true_complex(): """ tests function with complex but balanced string""" assert multi_bracket_validation('{{[[asdf]]}a}()') == True def test_mbv_false_simple(): """ tests function returns false on unbalanced case""" assert multi_bracket_validation('(') == False def test_mbv_false_complex(): """ tests function returns false on complex unbalanced str""" assert multi_bracket_validation('{asd{[asdf[]aasdf]}}())') == False # str1 = '{[}]' # str2 = '{{[[asdf]]}a}()' # str3 = '{asd{[asdf[]aasdf]}}())' # str4 = 'a' # print(multi_bracket_validation(str1)) # print(multi_bracket_validation(str2)) # print(multi_bracket_validation(str3)) # print(multi_bracket_validation(str4))
32.625
71
0.706897
130
1,044
5.369231
0.269231
0.189112
0.346705
0.200573
0.346705
0.131805
0.131805
0.131805
0.131805
0
0
0.008869
0.136015
1,044
32
72
32.625
0.764967
0.429119
0
0
0
0
0.080214
0.040998
0
0
0
0
0.416667
1
0.416667
true
0
0.166667
0
0.583333
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
0
0
0
5
fb5b53f28cc76bcfc7e420b7d235dd5d190f7fae
145
py
Python
start.py
Achintya-Borah/steganography
5c1822266f61bd9dd88c7b311cedfd7e4c39cbde
[ "MIT" ]
1
2020-08-05T02:00:12.000Z
2020-08-05T02:00:12.000Z
start.py
Achintya-Borah/steganography
5c1822266f61bd9dd88c7b311cedfd7e4c39cbde
[ "MIT" ]
null
null
null
start.py
Achintya-Borah/steganography
5c1822266f61bd9dd88c7b311cedfd7e4c39cbde
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os os.system("clear") print("Have a nice day...") os.system("sleep 1") os.system("clear") os.system("bash work.sh")
18.125
27
0.675862
26
145
3.769231
0.692308
0.326531
0.265306
0
0
0
0
0
0
0
0
0.007634
0.096552
145
7
28
20.714286
0.740458
0.137931
0
0.333333
0
0
0.379032
0
0
0
0
0
0
1
0
true
0
0.166667
0
0.166667
0.166667
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
fbd352cb8eaa9472fa4ac8908f9914a37ef59d4e
59
py
Python
subrepos/wtsi-hgi.python-common/hgicommon/threading/__init__.py
wtsi-hgi/openstack-tenant-cleanup
d998016f44c54666f76f90d8d3efa90e12730fff
[ "MIT" ]
null
null
null
subrepos/wtsi-hgi.python-common/hgicommon/threading/__init__.py
wtsi-hgi/openstack-tenant-cleanup
d998016f44c54666f76f90d8d3efa90e12730fff
[ "MIT" ]
5
2017-05-10T11:27:42.000Z
2017-07-08T14:36:19.000Z
subrepos/wtsi-hgi.python-common/hgicommon/threading/__init__.py
wtsi-hgi/openstack-tenant-cleanup
d998016f44c54666f76f90d8d3efa90e12730fff
[ "MIT" ]
null
null
null
from hgicommon.threading.counting_lock import CountingLock
29.5
58
0.898305
7
59
7.428571
1
0
0
0
0
0
0
0
0
0
0
0
0.067797
59
1
59
59
0.945455
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
fbd700d193fe326c6a96d14d96e36b5f44a01cb5
212
py
Python
tests/classes/simple_wordbook.py
Jesse-Yung/jsonclasses
d40c52aec42bcb978a80ceb98b93ab38134dc790
[ "MIT" ]
50
2021-08-18T08:08:04.000Z
2022-03-20T07:23:26.000Z
tests/classes/simple_wordbook.py
Jesse-Yung/jsonclasses
d40c52aec42bcb978a80ceb98b93ab38134dc790
[ "MIT" ]
1
2021-11-23T02:12:29.000Z
2021-11-23T13:35:26.000Z
tests/classes/simple_wordbook.py
Jesse-Yung/jsonclasses
d40c52aec42bcb978a80ceb98b93ab38134dc790
[ "MIT" ]
8
2021-07-01T02:39:15.000Z
2021-12-10T02:20:18.000Z
from __future__ import annotations from typing import Optional from jsonclasses import jsonclass, types @jsonclass class SimpleWordbook: name: Optional[str] words: list[str] = types.nonnull.listof(str)
21.2
48
0.783019
26
212
6.230769
0.653846
0
0
0
0
0
0
0
0
0
0
0
0.150943
212
9
49
23.555556
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.428571
0
0.857143
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
83734fac33a8a7389f3459a2b7340d59b579455c
196
py
Python
qtt/live.py
dpfranke/qtt
f60e812fe8b329e67f7b38d02eef552daf08d7c9
[ "MIT" ]
null
null
null
qtt/live.py
dpfranke/qtt
f60e812fe8b329e67f7b38d02eef552daf08d7c9
[ "MIT" ]
null
null
null
qtt/live.py
dpfranke/qtt
f60e812fe8b329e67f7b38d02eef552daf08d7c9
[ "MIT" ]
null
null
null
# %% Static variables import warnings warnings.warn('use qtt.gui.live_plotting.getLivePlotWindow instead of qtt.live.livePlot') from qtt.gui.live_plotting import getLivePlotWindow as livePlot
21.777778
89
0.816327
26
196
6.076923
0.615385
0.075949
0.126582
0.227848
0
0
0
0
0
0
0
0
0.107143
196
8
90
24.5
0.902857
0.096939
0
0
0
0
0.413793
0.224138
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
83c8e468d0f07a63dd18c9f1b015a539fd7f45f1
131
py
Python
detection/maskrcnn_benchmark/modeling/backbone/__init__.py
microsoft/SNR
f3d51b5e3525fe5e1ea364fafdf0e4cc60b1362b
[ "MIT" ]
44
2021-01-12T03:05:12.000Z
2022-03-28T09:05:47.000Z
detection/maskrcnn_benchmark/modeling/backbone/__init__.py
microsoft/SNR
f3d51b5e3525fe5e1ea364fafdf0e4cc60b1362b
[ "MIT" ]
7
2021-03-16T07:13:16.000Z
2022-02-02T14:52:55.000Z
detection/maskrcnn_benchmark/modeling/backbone/__init__.py
microsoft/SNR
f3d51b5e3525fe5e1ea364fafdf0e4cc60b1362b
[ "MIT" ]
8
2021-01-15T15:09:25.000Z
2021-12-21T13:34:51.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from .backbone import build_backbone
32.75
59
0.801527
17
131
6.117647
0.941176
0
0
0
0
0
0
0
0
0
0
0
0.137405
131
3
60
43.666667
0.920354
0.679389
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
83d9d3a94c90a88459a143848f321fc621cf43d6
294
py
Python
declarative/utilities/unique.py
jrollins/python-declarative
ac3ba9bf56611adefb4b2673e50bd8067c024e6b
[ "Apache-2.0" ]
6
2018-02-28T18:32:06.000Z
2022-03-20T13:04:05.000Z
declarative/utilities/unique.py
jrollins/python-declarative
ac3ba9bf56611adefb4b2673e50bd8067c024e6b
[ "Apache-2.0" ]
2
2021-02-22T17:18:59.000Z
2021-03-03T16:39:22.000Z
declarative/utilities/unique.py
jrollins/python-declarative
ac3ba9bf56611adefb4b2673e50bd8067c024e6b
[ "Apache-2.0" ]
1
2021-02-09T18:58:53.000Z
2021-02-09T18:58:53.000Z
# -*- coding: utf-8 -*- """ """ #make noarg a VERY unique value. Was using empty tuple, but python caches it, this should be quite unique def unique_generator(): def UNIQUE_CLOSURE(): return UNIQUE_CLOSURE return ("<UNIQUE VALUE>", UNIQUE_CLOSURE,) NOARG = unique_generator()
24.5
105
0.683673
39
294
5.025641
0.641026
0.19898
0.193878
0.255102
0
0
0
0
0
0
0
0.004219
0.193878
294
11
106
26.727273
0.822785
0.42517
0
0
0
0
0.08805
0
0
0
0
0
0
1
0.4
false
0
0
0.2
0.8
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
83f2332e25ea8f9d7f11c9477167426d813003b0
189
py
Python
network/admin.py
tomwhross/cs50-web-network
e0d02d6b85a13bdb146698789b4f5821605e28bb
[ "MIT" ]
null
null
null
network/admin.py
tomwhross/cs50-web-network
e0d02d6b85a13bdb146698789b4f5821605e28bb
[ "MIT" ]
null
null
null
network/admin.py
tomwhross/cs50-web-network
e0d02d6b85a13bdb146698789b4f5821605e28bb
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Following, Post, User # Register your models here. admin.site.register(Following) admin.site.register(Post) admin.site.register(User)
21
41
0.798942
27
189
5.592593
0.481481
0.178808
0.337748
0
0
0
0
0
0
0
0
0
0.10582
189
8
42
23.625
0.893491
0.137566
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
f7add62c47f409609c81a10806b02241cf06e141
345
py
Python
destiny/errors.py
glryanon/Trusty-cogs
1d5056ad166a7e7ee5039baa31748b1995ae81f6
[ "MIT" ]
148
2017-04-23T19:57:50.000Z
2022-03-12T06:59:58.000Z
destiny/errors.py
glryanon/Trusty-cogs
1d5056ad166a7e7ee5039baa31748b1995ae81f6
[ "MIT" ]
155
2018-01-01T13:27:45.000Z
2022-03-12T05:17:51.000Z
destiny/errors.py
glryanon/Trusty-cogs
1d5056ad166a7e7ee5039baa31748b1995ae81f6
[ "MIT" ]
221
2017-04-02T00:26:08.000Z
2022-03-26T15:06:54.000Z
class Destiny2APIError(Exception): pass class Destiny2InvalidParameters(Destiny2APIError): pass class Destiny2APICooldown(Destiny2APIError): pass class Destiny2RefreshTokenError(Destiny2APIError): pass class Destiny2MissingAPITokens(Destiny2APIError): pass class Destiny2MissingManifest(Destiny2APIError): pass
15
50
0.797101
24
345
11.458333
0.375
0.163636
0.363636
0
0
0
0
0
0
0
0
0.037543
0.150725
345
22
51
15.681818
0.901024
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
1
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
f7c87f61a0e35072afdec2667bb46bae63349573
468
py
Python
gym-rbdl/gym_rbdl/envs/__init__.py
michaelyeah7/magics_mbrl
7f1503986fd50c8336b8b9e7bb1d2f4be4e84b08
[ "MIT" ]
2
2021-10-02T21:58:02.000Z
2022-03-23T15:34:46.000Z
gym-rbdl/gym_rbdl/envs/__init__.py
michaelyeah7/roblax
7f1503986fd50c8336b8b9e7bb1d2f4be4e84b08
[ "MIT" ]
null
null
null
gym-rbdl/gym_rbdl/envs/__init__.py
michaelyeah7/roblax
7f1503986fd50c8336b8b9e7bb1d2f4be4e84b08
[ "MIT" ]
null
null
null
# from gym_soccer.envs.soccer_env import SoccerEnv # from gym_soccer.envs.soccer_empty_goal import SoccerEmptyGoalEnv # from gym_soccer.envs.soccer_against_keeper import SoccerAgainstKeeperEnv from gym_rbdl.envs.half_cheetah_rbdl import HalfCheetahRBDLEnv # from gym_rbdl.envs.cartpole_rbdl import CartpoleRBDLEnv from gym_rbdl.envs.cartpole_jbdl import CartPoleJBDLEnv from gym_rbdl.envs.real_pendulum import PendulumEnv from gym_rbdl.envs.arm_jbdl import ArmJBDLEnv
52
74
0.880342
67
468
5.865672
0.38806
0.142494
0.139949
0.19084
0.292621
0
0
0
0
0
0
0
0.076923
468
8
75
58.5
0.909722
0.517094
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
79238f5471c7c45320221c95118dc183acf8ed77
146
py
Python
Python3/Exercises/AnyAll/is_all_strings.py
norbertosanchezdichi/TIL
2e9719ddd288022f53b094a42679e849bdbcc625
[ "MIT" ]
null
null
null
Python3/Exercises/AnyAll/is_all_strings.py
norbertosanchezdichi/TIL
2e9719ddd288022f53b094a42679e849bdbcc625
[ "MIT" ]
null
null
null
Python3/Exercises/AnyAll/is_all_strings.py
norbertosanchezdichi/TIL
2e9719ddd288022f53b094a42679e849bdbcc625
[ "MIT" ]
null
null
null
def is_all_strings(iterable): return all(isinstance(string, str) for string in iterable) print(['a', 'b', 'c']) print([2, 'a', 'b', 'c'])
29.2
62
0.609589
23
146
3.782609
0.695652
0.045977
0.068966
0
0
0
0
0
0
0
0
0.008197
0.164384
146
5
63
29.2
0.704918
0
0
0
0
0
0.040816
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
1
0
5
f70295f364c9fa7735e9cab7413024d68698092b
64
py
Python
enthought/traits/ui/editors/check_list_editor.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/traits/ui/editors/check_list_editor.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/traits/ui/editors/check_list_editor.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from traitsui.editors.check_list_editor import *
21.333333
48
0.828125
9
64
5.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.109375
64
2
49
32
0.894737
0.1875
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
f70b6484fd5c367040bd21c68df6b4ceaf51dcfa
42
py
Python
libpysal/io/geotable/__init__.py
Kanahiro/dbf-df-translator
6603ca1ac306203bf8c95e6545685c509324a438
[ "MIT" ]
null
null
null
libpysal/io/geotable/__init__.py
Kanahiro/dbf-df-translator
6603ca1ac306203bf8c95e6545685c509324a438
[ "MIT" ]
null
null
null
libpysal/io/geotable/__init__.py
Kanahiro/dbf-df-translator
6603ca1ac306203bf8c95e6545685c509324a438
[ "MIT" ]
null
null
null
from .file import read_files, write_files
21
41
0.833333
7
42
4.714286
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.119048
42
1
42
42
0.891892
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
f72c53192b9962222a935bcba714f77187770d13
186
py
Python
Reliability_Tests/ex78.py
dieterch/dReliaCalc
1e0a06e904f3a60527c3a6ae0f45c666a9b48128
[ "MIT" ]
null
null
null
Reliability_Tests/ex78.py
dieterch/dReliaCalc
1e0a06e904f3a60527c3a6ae0f45c666a9b48128
[ "MIT" ]
null
null
null
Reliability_Tests/ex78.py
dieterch/dReliaCalc
1e0a06e904f3a60527c3a6ae0f45c666a9b48128
[ "MIT" ]
null
null
null
from reliability.Reliability_testing import one_sample_proportion result = one_sample_proportion(trials=30, successes=29) print(result) ''' (0.8278305443665873, 0.9991564290733695) '''
23.25
65
0.817204
22
186
6.681818
0.727273
0.122449
0.258503
0
0
0
0
0
0
0
0
0.22093
0.075269
186
7
66
26.571429
0.633721
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
1
0
0
null
0
1
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
f72e93a0f4fd80901bd47d30bfa9f5cea0f21a98
663
py
Python
schematic/utils/__init__.py
nf-osi/schematic
b59856f40c613a43d117fe3fafa2ca5ba5bbf8d6
[ "MIT" ]
null
null
null
schematic/utils/__init__.py
nf-osi/schematic
b59856f40c613a43d117fe3fafa2ca5ba5bbf8d6
[ "MIT" ]
6
2020-10-08T19:53:47.000Z
2021-05-07T14:50:39.000Z
schematic/utils/__init__.py
nf-osi/schematic
b59856f40c613a43d117fe3fafa2ca5ba5bbf8d6
[ "MIT" ]
null
null
null
from schematic.utils.curie_utils import expand_curie_to_uri, expand_curies_in_schema, extract_name_from_uri_or_curie, uri2label from schematic.utils.df_utils import update_df from schematic.utils.general import dict2list, find_duplicates, str2list, unlist from schematic.utils.google_api_utils import download_creds_file, execute_google_api_requests from schematic.utils.io_utils import export_json, load_default, load_json, load_schemaorg from schematic.utils.schema_utils import load_schema_into_networkx from schematic.utils.validate_utils import validate_class_schema, validate_property_schema, validate_schema from schematic.utils.viz_utils import visualize
73.666667
127
0.891403
98
663
5.642857
0.438776
0.188065
0.260398
0
0
0
0
0
0
0
0
0.004847
0.066365
663
8
128
82.875
0.88853
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
f73ac8992dda1543526d61357ec581788457a368
1,499
py
Python
blog/bills/forms.py
sivatoms/Blog_Posts
28944c66efb7a296a662d3b81bdaf65b153c995c
[ "bzip2-1.0.6" ]
null
null
null
blog/bills/forms.py
sivatoms/Blog_Posts
28944c66efb7a296a662d3b81bdaf65b153c995c
[ "bzip2-1.0.6" ]
4
2020-04-09T18:28:58.000Z
2021-06-10T18:51:22.000Z
blog/bills/forms.py
sivatoms/Blog_posts
28944c66efb7a296a662d3b81bdaf65b153c995c
[ "bzip2-1.0.6" ]
null
null
null
from django import forms from .models import Transactions, GroupMembers,Group class Bill_CreateForm(forms.ModelForm): def __init__(self, user_list, *args, **kwargs): super(Bill_CreateForm, self).__init__(*args, **kwargs) self.fields['share_with'] = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple,choices=tuple([(name, name.members) for name in user_list])) #self.fields['added_by'] = forms.ChoiceField(choices=tuple([(name, name.members) for name in user_list])) class Meta: model = Transactions fields = ( 'bill_type', 'amount', 'added_by', 'added_to', 'share_with', ) class Bill_EditForm(forms.ModelForm): def __init__(self, user_list, *args, **kwargs): super(Bill_EditForm, self).__init__(*args, **kwargs) self.fields['share_with'] = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple,choices=tuple([(name, name.members) for name in user_list])) #self.fields['added_by'] = forms.ChoiceField(choices=tuple([(name, name.members) for name in user_list])) class Meta: model = Transactions fields = ( 'bill_type', 'amount', 'added_by', 'added_to', 'share_with', ) class Group_CreateForm(forms.ModelForm): class Meta: model = Group fields=[ 'group_name', ]
32.586957
158
0.6004
158
1,499
5.443038
0.259494
0.055814
0.074419
0.093023
0.793023
0.793023
0.793023
0.793023
0.793023
0.793023
0
0
0.278853
1,499
46
159
32.586957
0.79556
0.138759
0
0.617647
0
0
0.086822
0
0
0
0
0
0
1
0.058824
false
0
0.058824
0
0.294118
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
f74c764fe71bef2147f00a9ea1ac6568815a83e4
484
py
Python
pavo_cristatus/tests/doubles/module_fakes/non_annotated/module_fake_class_with_nested_annotated_callables.py
MATTHEWFRAZER/pavo_cristatus
a4b96c0eb6c454fbe38d2092e29f63457a4ee955
[ "MIT" ]
null
null
null
pavo_cristatus/tests/doubles/module_fakes/non_annotated/module_fake_class_with_nested_annotated_callables.py
MATTHEWFRAZER/pavo_cristatus
a4b96c0eb6c454fbe38d2092e29f63457a4ee955
[ "MIT" ]
null
null
null
pavo_cristatus/tests/doubles/module_fakes/non_annotated/module_fake_class_with_nested_annotated_callables.py
MATTHEWFRAZER/pavo_cristatus
a4b96c0eb6c454fbe38d2092e29f63457a4ee955
[ "MIT" ]
null
null
null
from pavo_cristatus.tests.doubles.module_fakes.module_fake_class import ModuleFakeClass from trochilidae.interoperable_with_metaclass import interoperable_with_metaclass_future __all__ = ["ModuleFakeClassWithNestedAnnotatedCallables"] class ModuleFakeClassWithNestedAnnotatedCallables(interoperable_with_metaclass_future(ModuleFakeClass)): def symbol_of_interest(self, a, b): pass def non_symbol_of_interest(self, a : int, b : str) -> bool: def nested(a, b): pass
40.333333
104
0.82438
55
484
6.872727
0.563636
0.134921
0.206349
0.169312
0.111111
0
0
0
0
0
0
0
0.107438
484
11
105
44
0.875
0
0
0
0
0
0.088843
0.088843
0
0
0
0
0
1
0.428571
false
0.285714
0.285714
0
0.857143
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
f7558b1b360903fc34464b87e16f87bdac1551e8
63
py
Python
python/testData/refactoring/inlineFunction/star.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/star.py
tgodzik/intellij-community
f5ef4191fc30b69db945633951fb160c1cfb7b6f
[ "Apache-2.0" ]
2
2022-02-19T09:45:05.000Z
2022-02-27T20:32:55.000Z
python/testData/refactoring/inlineFunction/star.py
tgodzik/intellij-community
f5ef4191fc30b69db945633951fb160c1cfb7b6f
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def foo(*args, **kwargs): pass fo<caret>o(1, 2, 3, x = 4)
12.6
26
0.52381
13
63
2.538462
1
0
0
0
0
0
0
0
0
0
0
0.083333
0.238095
63
4
27
15.75
0.604167
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0.333333
0
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
1
0
0
0
0
0
5
f76ee439ef57264cc54c0845e196812f131a1afc
11,625
py
Python
mistral/mistral/tests/unit/engine/test_reverse_workflow_rerun.py
Toure/openstack_mistral_wip
1c3d028cb7c918de74a3cb018c84d6c5ee42e3f1
[ "Apache-2.0" ]
null
null
null
mistral/mistral/tests/unit/engine/test_reverse_workflow_rerun.py
Toure/openstack_mistral_wip
1c3d028cb7c918de74a3cb018c84d6c5ee42e3f1
[ "Apache-2.0" ]
null
null
null
mistral/mistral/tests/unit/engine/test_reverse_workflow_rerun.py
Toure/openstack_mistral_wip
1c3d028cb7c918de74a3cb018c84d6c5ee42e3f1
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 - StackStorm, Inc. # # 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 mock from oslo_config import cfg from mistral.actions import std_actions from mistral.db.v2 import api as db_api from mistral import exceptions as exc from mistral.services import workbooks as wb_service from mistral.tests.unit.engine import base from mistral.workflow import states # Use the set_default method to set value otherwise in certain test cases # the change in value is not permanent. cfg.CONF.set_default('auth_enable', False, group='pecan') SIMPLE_WORKBOOK = """ --- version: '2.0' name: wb1 workflows: wf1: type: reverse tasks: t1: action: std.echo output="Task 1" t2: action: std.echo output="Task 2" requires: - t1 t3: action: std.echo output="Task 3" requires: - t2 """ SIMPLE_WORKBOOK_DIFF_ENV_VAR = """ --- version: '2.0' name: wb1 workflows: wf1: type: reverse tasks: t1: action: std.echo output="Task 1" t2: action: std.echo output=<% env().var1 %> requires: - t1 t3: action: std.echo output=<% env().var2 %> requires: - t2 """ class ReverseWorkflowRerunTest(base.EngineTestCase): @mock.patch.object( std_actions.EchoAction, 'run', mock.MagicMock( side_effect=[ 'Task 1', # Mock task1 success for initial run. exc.ActionException(), # Mock task2 exception for initial run. 'Task 2', # Mock task2 success for rerun. 'Task 3' # Mock task3 success. ] ) ) def test_rerun(self): wb_service.create_workbook_v2(SIMPLE_WORKBOOK) # Run workflow and fail task. wf_ex = self.engine.start_workflow('wb1.wf1', {}, task_name='t3') self.await_workflow_error(wf_ex.id) with db_api.transaction(): wf_ex = db_api.get_workflow_execution(wf_ex.id) task_execs = wf_ex.task_executions self.assertEqual(states.ERROR, wf_ex.state) self.assertIsNotNone(wf_ex.state_info) self.assertEqual(2, len(task_execs)) task_1_ex = self._assert_single_item(task_execs, name='t1') task_2_ex = self._assert_single_item(task_execs, name='t2') self.assertEqual(states.SUCCESS, task_1_ex.state) self.assertEqual(states.ERROR, task_2_ex.state) self.assertIsNotNone(task_2_ex.state_info) # Resume workflow and re-run failed task. self.engine.rerun_workflow(task_2_ex.id) wf_ex = db_api.get_workflow_execution(wf_ex.id) self.assertEqual(states.RUNNING, wf_ex.state) self.assertIsNone(wf_ex.state_info) # Wait for the workflow to succeed. self.await_workflow_success(wf_ex.id) with db_api.transaction(): wf_ex = db_api.get_workflow_execution(wf_ex.id) task_execs = wf_ex.task_executions self.assertEqual(states.SUCCESS, wf_ex.state) self.assertIsNone(wf_ex.state_info) self.assertEqual(3, len(task_execs)) task_1_ex = self._assert_single_item(task_execs, name='t1') task_2_ex = self._assert_single_item(task_execs, name='t2') task_3_ex = self._assert_single_item(task_execs, name='t3') # Check action executions of task 1. self.assertEqual(states.SUCCESS, task_1_ex.state) task_1_action_exs = db_api.get_action_executions( task_execution_id=task_1_ex.id ) self.assertEqual(1, len(task_1_action_exs)) self.assertEqual(states.SUCCESS, task_1_action_exs[0].state) # Check action executions of task 2. self.assertEqual(states.SUCCESS, task_2_ex.state) self.assertIsNone(task_2_ex.state_info) task_2_action_exs = db_api.get_action_executions( task_execution_id=task_2_ex.id ) self.assertEqual(2, len(task_2_action_exs)) # Check there is exactly 1 action in Success and 1 in Error state. # Order doesn't matter. self.assertEqual( 1, len([act_ex for act_ex in task_2_action_exs if act_ex.state == states.SUCCESS]) ) self.assertEqual( 1, len([act_ex for act_ex in task_2_action_exs if act_ex.state == states.ERROR]) ) # Check action executions of task 3. self.assertEqual(states.SUCCESS, task_3_ex.state) task_3_action_exs = db_api.get_action_executions( task_execution_id=task_3_ex.id ) self.assertEqual(1, len(task_3_action_exs)) self.assertEqual(states.SUCCESS, task_3_action_exs[0].state) @mock.patch.object( std_actions.EchoAction, 'run', mock.MagicMock( side_effect=[ 'Task 1', # Mock task1 success for initial run. exc.ActionException(), # Mock task2 exception for initial run. 'Task 2', # Mock task2 success for rerun. 'Task 3' # Mock task3 success. ] ) ) def test_rerun_diff_env_vars(self): wb_service.create_workbook_v2(SIMPLE_WORKBOOK_DIFF_ENV_VAR) # Initial environment variables for the workflow execution. env = { 'var1': 'fee fi fo fum', 'var2': 'foobar' } # Run workflow and fail task. wf_ex = self.engine.start_workflow( 'wb1.wf1', {}, task_name='t3', env=env ) self.await_workflow_error(wf_ex.id) with db_api.transaction(): wf_ex = db_api.get_workflow_execution(wf_ex.id) task_execs = wf_ex.task_executions self.assertEqual(states.ERROR, wf_ex.state) self.assertIsNotNone(wf_ex.state_info) self.assertEqual(2, len(task_execs)) self.assertDictEqual(env, wf_ex.params['env']) self.assertDictEqual(env, wf_ex.context['__env']) task_1_ex = self._assert_single_item(task_execs, name='t1') task_2_ex = self._assert_single_item(task_execs, name='t2') self.assertEqual(states.SUCCESS, task_1_ex.state) self.assertEqual(states.ERROR, task_2_ex.state) self.assertIsNotNone(task_2_ex.state_info) # Update env in workflow execution with the following. updated_env = { 'var1': 'Task 2', 'var2': 'Task 3' } # Resume workflow and re-run failed task. self.engine.rerun_workflow(task_2_ex.id, env=updated_env) wf_ex = db_api.get_workflow_execution(wf_ex.id) self.assertEqual(states.RUNNING, wf_ex.state) self.assertIsNone(wf_ex.state_info) self.assertDictEqual(updated_env, wf_ex.params['env']) self.assertDictEqual(updated_env, wf_ex.context['__env']) # Wait for the workflow to succeed. self.await_workflow_success(wf_ex.id) with db_api.transaction(): wf_ex = db_api.get_workflow_execution(wf_ex.id) task_execs = wf_ex.task_executions self.assertEqual(states.SUCCESS, wf_ex.state) self.assertIsNone(wf_ex.state_info) self.assertEqual(3, len(task_execs)) task_1_ex = self._assert_single_item(task_execs, name='t1') task_2_ex = self._assert_single_item(task_execs, name='t2') task_3_ex = self._assert_single_item(task_execs, name='t3') # Check action executions of task 1. self.assertEqual(states.SUCCESS, task_1_ex.state) task_1_action_exs = db_api.get_action_executions( task_execution_id=task_1_ex.id ) self.assertEqual(1, len(task_1_action_exs)) self.assertEqual(states.SUCCESS, task_1_action_exs[0].state) self.assertDictEqual( {'output': 'Task 1'}, task_1_action_exs[0].input ) # Check action executions of task 2. self.assertEqual(states.SUCCESS, task_2_ex.state) self.assertIsNone(task_2_ex.state_info) task_2_action_exs = db_api.get_action_executions( task_execution_id=task_2_ex.id ) self.assertEqual(2, len(task_2_action_exs)) # Assert that one action ex is in error and one in success states. self.assertIn( task_2_action_exs[0].state, [states.ERROR, states.SUCCESS] ) self.assertIn( task_2_action_exs[1].state, [states.ERROR, states.SUCCESS] ) self.assertNotEqual( task_2_action_exs[0].state, task_2_action_exs[1].state ) # Assert that one action ex got first env and one got second env self.assertIn( task_2_action_exs[0].input['output'], [env['var1'], updated_env['var1']] ) self.assertIn( task_2_action_exs[1].input['output'], [env['var1'], updated_env['var1']] ) self.assertNotEqual( task_2_action_exs[0].input, task_2_action_exs[1].input ) # Check action executions of task 3. self.assertEqual(states.SUCCESS, task_3_ex.state) task_3_action_exs = db_api.get_action_executions( task_execution_id=task_3_ex.id ) self.assertEqual(1, len(task_3_action_exs)) self.assertEqual(states.SUCCESS, task_3_action_exs[0].state) self.assertDictEqual( {'output': updated_env['var2']}, task_3_action_exs[0].input ) @mock.patch.object( std_actions.EchoAction, 'run', mock.MagicMock( side_effect=[ 'Task 1', # Mock task1 success for initial run. exc.ActionException() # Mock task2 exception for initial run. ] ) ) def test_rerun_from_prev_step(self): wb_service.create_workbook_v2(SIMPLE_WORKBOOK) # Run workflow and fail task. wf_ex = self.engine.start_workflow('wb1.wf1', {}, task_name='t3') self.await_workflow_error(wf_ex.id) with db_api.transaction(): wf_ex = db_api.get_workflow_execution(wf_ex.id) task_execs = wf_ex.task_executions self.assertEqual(states.ERROR, wf_ex.state) self.assertIsNotNone(wf_ex.state_info) self.assertEqual(2, len(task_execs)) task_1_ex = self._assert_single_item(task_execs, name='t1') task_2_ex = self._assert_single_item(task_execs, name='t2') self.assertEqual(states.SUCCESS, task_1_ex.state) self.assertEqual(states.ERROR, task_2_ex.state) self.assertIsNotNone(task_2_ex.state_info) # Resume workflow and re-run failed task. e = self.assertRaises( exc.MistralError, self.engine.rerun_workflow, task_1_ex.id ) self.assertIn('not supported', str(e))
31.334232
79
0.622022
1,522
11,625
4.478975
0.140604
0.026405
0.070852
0.061611
0.805193
0.775561
0.753704
0.702655
0.685786
0.685786
0
0.022508
0.285333
11,625
370
80
31.418919
0.798026
0.156473
0
0.671875
0
0
0.087295
0
0
0
0
0
0.289063
1
0.011719
false
0
0.03125
0
0.046875
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
f776f538bbc0be167f51ef1460b4b9f41515c52f
164
py
Python
shadowsocks_manager/dynamicmethod/tests.py
alexzhangs/shadowsocks-manager
211be82a796ee124075687b99c3af5018d6cca2c
[ "MIT" ]
5
2019-09-26T10:47:12.000Z
2022-03-31T10:33:27.000Z
shadowsocks_manager/dynamicmethod/tests.py
alexzhangs/shadowsocks-manager
211be82a796ee124075687b99c3af5018d6cca2c
[ "MIT" ]
4
2019-09-26T10:53:53.000Z
2021-04-03T18:14:19.000Z
shadowsocks_manager/singleton/tests.py
alexzhangs/shadowsocks-manager
211be82a796ee124075687b99c3af5018d6cca2c
[ "MIT" ]
1
2021-03-30T07:25:27.000Z
2021-03-30T07:25:27.000Z
# -*- coding: utf-8 -*- # py2.7 and py3 compatibility imports from __future__ import unicode_literals from django.test import TestCase # Create your tests here.
18.222222
39
0.75
23
164
5.130435
0.913043
0
0
0
0
0
0
0
0
0
0
0.029197
0.164634
164
8
40
20.5
0.832117
0.493902
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
f7874cb54485f98c12ab461db2ed216e1562e8a6
96
py
Python
apprentice/working_memory/representation/__init__.py
pearlfranz20/AL_Core
6592079330c7ec3ca264b86f8414970ddab06c0e
[ "MIT" ]
10
2019-11-01T01:09:57.000Z
2022-02-17T09:15:12.000Z
apprentice/working_memory/representation/__init__.py
pearlfranz20/AL_Core
6592079330c7ec3ca264b86f8414970ddab06c0e
[ "MIT" ]
40
2019-08-06T18:01:31.000Z
2021-07-15T12:38:56.000Z
apprentice/working_memory/representation/__init__.py
pearlfranz20/AL_Core
6592079330c7ec3ca264b86f8414970ddab06c0e
[ "MIT" ]
6
2019-08-15T01:45:19.000Z
2021-06-01T19:54:29.000Z
from .representation import Skill, Activation, Sai, RHS, StateMultiView, Explanation, numbalizer
96
96
0.833333
10
96
8
1
0
0
0
0
0
0
0
0
0
0
0
0.09375
96
1
96
96
0.91954
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e38bc4e6f74709a3bc5423f389c586056c1920f5
115
py
Python
src/jyquickhelper/js/c3/__init__.py
sdpython/jyquickhelper
b8b106ada7f8b606d4f152e186a3343b6c4ab2bb
[ "MIT" ]
3
2020-03-06T23:17:14.000Z
2021-10-16T05:51:21.000Z
src/jyquickhelper/js/c3/__init__.py
sdpython/jyquickhelper
b8b106ada7f8b606d4f152e186a3343b6c4ab2bb
[ "MIT" ]
9
2016-12-07T10:28:01.000Z
2021-10-16T10:45:43.000Z
src/jyquickhelper/js/c3/__init__.py
sdpython/jyquickhelper
b8b106ada7f8b606d4f152e186a3343b6c4ab2bb
[ "MIT" ]
null
null
null
""" @file @brief `c3 <http://c3js.org/gettingstarted.html>`_ """ def version(): "version" return "0.4.2"
11.5
50
0.582609
15
115
4.4
0.933333
0
0
0
0
0
0
0
0
0
0
0.053191
0.182609
115
9
51
12.777778
0.648936
0.556522
0
0
0
0
0.235294
0
0
0
0
0
0
1
0.333333
true
0
0
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
1
0
0
5
e3a125c56197c8225887008f3ac60562b451f7fc
7,079
py
Python
graphene_federation/tests/test_requires.py
Koldar/graphene-federation
355c6b2c4cee6c1a9c8c00a4ab066c41f6976766
[ "MIT" ]
null
null
null
graphene_federation/tests/test_requires.py
Koldar/graphene-federation
355c6b2c4cee6c1a9c8c00a4ab066c41f6976766
[ "MIT" ]
null
null
null
graphene_federation/tests/test_requires.py
Koldar/graphene-federation
355c6b2c4cee6c1a9c8c00a4ab066c41f6976766
[ "MIT" ]
null
null
null
import pytest from graphene import Field, ID, Int, ObjectType, String from .. import graphql_compatibility from ..extend import extend, external, requires from ..main import build_schema PRODUCT_SCHEMA_2 = """schema { query: Query } type Product { sku: ID size: Int weight: Int shippingEstimate: String } type Query { product: Product _entities(representations: [_Any]): [_Entity] _service: _Service } scalar _Any union _Entity = Product type _Service { sdl: String } """ PRODUCT_SCHEMA_3 = """schema { query: Query } type Query { product: Product _entities(representations: [_Any] = null): [_Entity] _service: _Service } type Product { sku: ID size: Int weight: Int shippingEstimate: String } union _Entity = Product \"\"\"Anything\"\"\" scalar _Any type _Service { sdl: String } """ PRODUCTION_RESPONSE_2 = """ extend type Product @key(fields: "sku") { sku: ID @external size: Int @external weight: Int @external shippingEstimate: String @requires(fields: "size weight") } type Query { product: Product } """ PRODUCTION_RESPONSE_3 = """type Query { product: Product } extend type Product @key(fields: "sku") { sku: ID @external size: Int @external weight: Int @external shippingEstimate: String @requires(fields: "size weight") } """ MULTIPLE_FIELDS_SCHEMA_2 = """schema { query: Query } type Product { sku: ID size: Int weight: Int shippingEstimate: String } type Query { product: Product _entities(representations: [_Any]): [_Entity] _service: _Service } scalar _Any union _Entity = Product type _Service { sdl: String } """ MULTIPLE_FIELDS_SCHEMA_3 = """schema { query: Query } type Query { product: Product _entities(representations: [_Any] = null): [_Entity] _service: _Service } type Product { sku: ID size: Int weight: Int shippingEstimate: String } union _Entity = Product \"\"\"Anything\"\"\" scalar _Any type _Service { sdl: String } """ MULTIPLE_FIELDS_RESPONSE_2 = """ extend type Product @key(fields: "sku") { sku: ID @external size: Int @external weight: Int @external shippingEstimate: String @requires(fields: "size weight") } type Query { product: Product } """ MULTIPLE_FIELDS_RESPONSE_3 = """type Query { product: Product } extend type Product @key(fields: "sku") { sku: ID @external size: Int @external weight: Int @external shippingEstimate: String @requires(fields: "size weight") } """ INPUT_SCHEMA_2 = """schema { query: Query } type Acme { id: ID! age: Int foo(someInput: String): String } type Query { acme: Acme _entities(representations: [_Any] = null): [_Entity] _service: _Service } scalar _Any union _Entity = Acme type _Service { sdl: String } """ INPUT_SCHEMA_3 = """schema { query: Query } type Query { acme: Acme _entities(representations: [_Any] = null): [_Entity] _service: _Service } type Acme { id: ID! age: Int foo(someInput: String = null): String } union _Entity = Acme \"\"\"Anything\"\"\" scalar _Any type _Service { sdl: String } """ INPUT_RESPONSE_2 = """ extend type Acme @key(fields: "id") { id: ID! @external age: Int @external foo(someInput: String): String @requires(fields: "age") } type Query { acme: Acme } """ INPUT_RESPONSE_3 = """type Query { acme: Acme } extend type Acme @key(fields: "id") { id: ID! @external age: Int @external foo(someInput: String = null): String @requires(fields: "age") } """ def test_chain_requires_failure(): """ Check that we can't nest call the requires method on a field. """ with pytest.raises(AssertionError) as err: @extend("id") class A(ObjectType): id = external(ID()) something = requires(requires(String(), fields="id"), fields="id") assert "Can't chain `requires()` method calls on one field." == str(err.value) def test_requires_multiple_fields(): """ Check that requires can take more than one field as input. """ @extend("sku") class Product(ObjectType): sku = external(ID()) size = external(Int()) weight = external(Int()) shipping_estimate = requires(String(), fields="size weight") class Query(ObjectType): product = Field(Product) schema = build_schema(query=Query) graphql_compatibility.assert_schema_is( actual=schema, expected_2=PRODUCT_SCHEMA_2, expected_3=PRODUCT_SCHEMA_3, ) # Check the federation service schema definition language query = """ query { _service { sdl } } """ result = graphql_compatibility.perform_graphql_query(schema, query) assert not result.errors graphql_compatibility.assert_graphql_response_data( schema=schema, actual=result.data["_service"]["sdl"].strip(), expected_2=PRODUCTION_RESPONSE_2, expected_3=PRODUCTION_RESPONSE_3, ) def test_requires_multiple_fields_as_list(): """ Check that requires can take more than one field as input. """ @extend("sku") class Product(ObjectType): sku = external(ID()) size = external(Int()) weight = external(Int()) shipping_estimate = requires(String(), fields=["size", "weight"]) class Query(ObjectType): product = Field(Product) schema = build_schema(query=Query) graphql_compatibility.assert_schema_is( actual=schema, expected_2=MULTIPLE_FIELDS_SCHEMA_2, expected_3=MULTIPLE_FIELDS_SCHEMA_3, ) # Check the federation service schema definition language query = """ query { _service { sdl } } """ result = graphql_compatibility.perform_graphql_query(schema, query) assert not result.errors graphql_compatibility.assert_graphql_response_data( schema=schema, actual=result.data["_service"]["sdl"].strip(), expected_2=MULTIPLE_FIELDS_RESPONSE_2, expected_3=MULTIPLE_FIELDS_RESPONSE_3, ) def test_requires_with_input(): """ Test checking that the issue https://github.com/preply/graphene-federation/pull/47 is resolved. """ @extend("id") class Acme(ObjectType): id = external(ID(required=True)) age = external(Int()) foo = requires(Field(String, someInput=String()), fields="age") class Query(ObjectType): acme = Field(Acme) schema = build_schema(query=Query) graphql_compatibility.assert_schema_is( actual=schema, expected_2=INPUT_SCHEMA_2, expected_3=INPUT_SCHEMA_3, ) # Check the federation service schema definition language query = """ query { _service { sdl } } """ result = graphql_compatibility.perform_graphql_query(schema, query) assert not result.errors graphql_compatibility.assert_graphql_response_data( schema=schema, actual=result.data["_service"]["sdl"].strip(), expected_2=INPUT_RESPONSE_2, expected_3=INPUT_RESPONSE_3, )
19.34153
99
0.656731
811
7,079
5.519112
0.125771
0.029491
0.032172
0.041108
0.77748
0.735255
0.723861
0.705987
0.705987
0.689902
0
0.006951
0.227716
7,079
365
100
19.394521
0.81178
0.062721
0
0.657244
0
0
0.493914
0.023737
0
0
0
0
0.038869
1
0.014134
false
0
0.017668
0
0.113074
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
e3a8422d9d626161ff41ae9880edfe5cc8726c9f
238
py
Python
service/models/common/answer.py
CyberArkForTheCommunity/jobli-backend
2309c9ac33993cb89a8e1581630d99b46f8d55aa
[ "MIT" ]
null
null
null
service/models/common/answer.py
CyberArkForTheCommunity/jobli-backend
2309c9ac33993cb89a8e1581630d99b46f8d55aa
[ "MIT" ]
1
2021-12-23T13:36:43.000Z
2021-12-23T13:36:43.000Z
service/models/common/answer.py
CyberArkForTheCommunity/jobli-backend
2309c9ac33993cb89a8e1581630d99b46f8d55aa
[ "MIT" ]
null
null
null
from pydantic import BaseModel, Field class Answer(BaseModel): key: str = Field(description="Name of the question") question: str = Field(description="The actual question") answer: bool = Field(description="Boolean answer")
29.75
60
0.731092
29
238
6
0.586207
0.275862
0.218391
0
0
0
0
0
0
0
0
0
0.163866
238
7
61
34
0.874372
0
0
0
0
0
0.222689
0
0
0
0
0
0
1
0
true
0
0.2
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
e3fadf68fe2239214f621d845edff36779cabc59
81
py
Python
tests/test_example_pkg/__init__.py
Janidai/nested_package_template
fd97ed17499769aa71953493e4e6ee8b4b8037b2
[ "CNRI-Python" ]
null
null
null
tests/test_example_pkg/__init__.py
Janidai/nested_package_template
fd97ed17499769aa71953493e4e6ee8b4b8037b2
[ "CNRI-Python" ]
null
null
null
tests/test_example_pkg/__init__.py
Janidai/nested_package_template
fd97ed17499769aa71953493e4e6ee8b4b8037b2
[ "CNRI-Python" ]
1
2021-05-27T11:25:38.000Z
2021-05-27T11:25:38.000Z
# Title : TODO # Objective : TODO # Created by: noonwave # Created on: 4/8/20
20.25
22
0.641975
12
81
4.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0.064516
0.234568
81
4
23
20.25
0.774194
0.901235
0
null
0
null
0
0
null
0
0
0.25
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
0
0
0
0
0
5
54050d8fec11406151e4954aa9e957014180c555
25
py
Python
AtCoder/ACL_Beginner_Contest/A/A_Repeat_ACL.py
sungmen/Acmicpc_Solve
0298a6aec84993a4d8767bd2c00490b7201e06a4
[ "MIT" ]
1
2020-07-08T23:16:19.000Z
2020-07-08T23:16:19.000Z
AtCoder/ACL_Beginner_Contest/A/A_Repeat_ACL.py
sungmen/Acmicpc_Solve
0298a6aec84993a4d8767bd2c00490b7201e06a4
[ "MIT" ]
1
2020-05-16T03:12:24.000Z
2020-05-16T03:14:42.000Z
AtCoder/ACL_Beginner_Contest/A/A_Repeat_ACL.py
sungmen/Acmicpc_Solve
0298a6aec84993a4d8767bd2c00490b7201e06a4
[ "MIT" ]
2
2020-05-16T03:25:16.000Z
2021-02-10T16:51:25.000Z
print("ACL"*int(input()))
25
25
0.64
4
25
4
1
0
0
0
0
0
0
0
0
0
0
0
0
25
1
25
25
0.64
0
0
0
0
0
0.115385
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
540aa962b584f9a90604724790af66c6c42b4a1d
54
py
Python
deepforest/_version.py
Treeconomy/DeepForest
9fcb82e78cbb467ae810d64402b25e41e3c56913
[ "MIT" ]
null
null
null
deepforest/_version.py
Treeconomy/DeepForest
9fcb82e78cbb467ae810d64402b25e41e3c56913
[ "MIT" ]
null
null
null
deepforest/_version.py
Treeconomy/DeepForest
9fcb82e78cbb467ae810d64402b25e41e3c56913
[ "MIT" ]
null
null
null
__version__ = '__version__ = '__version__ = '0.2.4'''
27
53
0.666667
6
54
4
0.666667
1.166667
0
0
0
0
0
0
0
0
0
0.06383
0.12963
54
1
54
54
0.446809
0
0
0
0
0
0.351852
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
582067cc67bf48aee6f02914e89ddf2ee5275d17
333
py
Python
Desafios/Mundo 1/ex007.py
ZaikoXander/Python
7e7243edb02dd33991c5f63f02c983ad060fc3ca
[ "Unlicense" ]
null
null
null
Desafios/Mundo 1/ex007.py
ZaikoXander/Python
7e7243edb02dd33991c5f63f02c983ad060fc3ca
[ "Unlicense" ]
null
null
null
Desafios/Mundo 1/ex007.py
ZaikoXander/Python
7e7243edb02dd33991c5f63f02c983ad060fc3ca
[ "Unlicense" ]
null
null
null
print('\033[31m-=-' * 9) print('\033[35mCalculador de Média') print('\033[31m-=-' * 9) n1 = float(input('\033[94mPrimeira nota do aluno: ')) n2 = float(input('Segunda nota do aluno: ')) print('\033[94mA média entre \033[1m{:.1f}\033[22m e \033[1m{:.1f}\033[22m é igual a \033[1m{:.1f}\033[22m.' .format(n1, n2, (n1 + n2) / 2))
41.625
108
0.60961
58
333
3.5
0.465517
0.157635
0.103448
0.147783
0.192118
0
0
0
0
0
0
0.222997
0.138138
333
7
109
47.571429
0.484321
0
0
0.285714
0
0.142857
0.612613
0.192192
0
0
0
0
0
1
0
false
0
0
0
0
0.571429
0
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
582bf842802fe99fd2edc62da16ca2c6105adc75
33
py
Python
tests/inputs/if-branching/28-join-to-top-mut.py
helq/pytropos
497ed5902e6e4912249ca0a46b477f9bfa6ae80a
[ "MIT" ]
4
2019-10-06T18:01:24.000Z
2020-07-03T05:27:35.000Z
tests/inputs/if-branching/28-join-to-top-mut.py
helq/pytropos
497ed5902e6e4912249ca0a46b477f9bfa6ae80a
[ "MIT" ]
5
2021-06-07T15:50:04.000Z
2021-06-07T15:50:06.000Z
tests/inputs/if-branching/28-join-to-top-mut.py
helq/pytropos
497ed5902e6e4912249ca0a46b477f9bfa6ae80a
[ "MIT" ]
null
null
null
if _: l = 2 else: l = []
6.6
10
0.30303
5
33
1.8
0.8
0
0
0
0
0
0
0
0
0
0
0.0625
0.515152
33
4
11
8.25
0.5
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
5837f0ceb080586040d471f66d42da43946e600e
233
py
Python
PhantomCaptcher_backend/pcserver_test/models/__init__.py
svwriting/PhantomCaptcher
7b90d92766a7b0380f6f628304091b8b3aaa37f8
[ "MIT" ]
null
null
null
PhantomCaptcher_backend/pcserver_test/models/__init__.py
svwriting/PhantomCaptcher
7b90d92766a7b0380f6f628304091b8b3aaa37f8
[ "MIT" ]
null
null
null
PhantomCaptcher_backend/pcserver_test/models/__init__.py
svwriting/PhantomCaptcher
7b90d92766a7b0380f6f628304091b8b3aaa37f8
[ "MIT" ]
null
null
null
from .BASNet import BASNet from .U2Net import U2NET as U2Net from .U2Net import U2NETP as U2NetP from .U2Net_refactor import U2NET_full as U2Net_full from .U2Net_refactor import U2NET_lite as U2Net_lite from .DoveNet import DoveNetG
33.285714
52
0.83691
38
233
4.973684
0.289474
0.190476
0.15873
0.243386
0.296296
0
0
0
0
0
0
0.059701
0.137339
233
6
53
38.833333
0.880597
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
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
1
0
0
5
588ba5c4a0fc6d0bfe6d2af9795c76e0297976bf
71
py
Python
api/api_initializer.py
lit26/Personal_Market_Watch
f06d9c04cdccd2d768df69213bbb3d15ce64ce16
[ "MIT" ]
1
2021-06-18T05:12:19.000Z
2021-06-18T05:12:19.000Z
api/api_initializer.py
lit26/Personal_Market_Watch
f06d9c04cdccd2d768df69213bbb3d15ce64ce16
[ "MIT" ]
null
null
null
api/api_initializer.py
lit26/Personal_Market_Watch
f06d9c04cdccd2d768df69213bbb3d15ce64ce16
[ "MIT" ]
1
2021-05-09T15:55:05.000Z
2021-05-09T15:55:05.000Z
import stockChart stockChart.fetchChart() stockChart.downSignalChart()
17.75
28
0.859155
6
71
10.166667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.056338
71
4
28
17.75
0.910448
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
5443390da3009eb5d171b8f7ac521e3fe85ae651
5,325
py
Python
imcsdk/mometa/adaptor/AdaptorConnectorInfo.py
ragupta-git/ImcSdk
2e41f2ffe5282d38de85bc4739fa53dd2f0c9bb4
[ "Apache-2.0" ]
null
null
null
imcsdk/mometa/adaptor/AdaptorConnectorInfo.py
ragupta-git/ImcSdk
2e41f2ffe5282d38de85bc4739fa53dd2f0c9bb4
[ "Apache-2.0" ]
null
null
null
imcsdk/mometa/adaptor/AdaptorConnectorInfo.py
ragupta-git/ImcSdk
2e41f2ffe5282d38de85bc4739fa53dd2f0c9bb4
[ "Apache-2.0" ]
3
2018-11-14T13:02:40.000Z
2018-11-14T13:49:38.000Z
"""This module contains the general information for AdaptorConnectorInfo ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class AdaptorConnectorInfoConsts: pass class AdaptorConnectorInfo(ManagedObject): """This is AdaptorConnectorInfo class.""" consts = AdaptorConnectorInfoConsts() naming_props = set([]) mo_meta = { "classic": MoMeta("AdaptorConnectorInfo", "adaptorConnectorInfo", "connector-info", VersionMeta.Version204c, "OutputOnly", 0xf, [], ["admin", "read-only", "user"], [u'adaptorExtEthIf'], [], ["Get"]), "modular": MoMeta("AdaptorConnectorInfo", "adaptorConnectorInfo", "connector-info", VersionMeta.Version303a, "OutputOnly", 0xf, [], ["admin", "read-only", "user"], [u'adaptorExtEthIf'], [], ["Get"]) } prop_meta = { "classic": { "child_action": MoPropertyMeta("child_action", "childAction", "string", VersionMeta.Version204c, MoPropertyMeta.INTERNAL, None, None, None, None, [], []), "dn": MoPropertyMeta("dn", "dn", "string", VersionMeta.Version204c, MoPropertyMeta.READ_ONLY, 0x2, 0, 255, None, [], []), "part_number": MoPropertyMeta("part_number", "partNumber", "string", VersionMeta.Version204c, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), "part_revision": MoPropertyMeta("part_revision", "partRevision", "string", VersionMeta.Version204c, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), "present": MoPropertyMeta("present", "present", "string", VersionMeta.Version204c, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), "rn": MoPropertyMeta("rn", "rn", "string", VersionMeta.Version204c, MoPropertyMeta.READ_ONLY, 0x4, 0, 255, None, [], []), "status": MoPropertyMeta("status", "status", "string", VersionMeta.Version204c, MoPropertyMeta.READ_ONLY, 0x8, None, None, None, ["", "created", "deleted", "modified", "removed"], []), "supported": MoPropertyMeta("supported", "supported", "string", VersionMeta.Version204c, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), "type": MoPropertyMeta("type", "type", "string", VersionMeta.Version204c, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), "vendor": MoPropertyMeta("vendor", "vendor", "string", VersionMeta.Version204c, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), }, "modular": { "child_action": MoPropertyMeta("child_action", "childAction", "string", VersionMeta.Version303a, MoPropertyMeta.INTERNAL, None, None, None, None, [], []), "dn": MoPropertyMeta("dn", "dn", "string", VersionMeta.Version303a, MoPropertyMeta.READ_ONLY, 0x2, 0, 255, None, [], []), "part_number": MoPropertyMeta("part_number", "partNumber", "string", VersionMeta.Version303a, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), "part_revision": MoPropertyMeta("part_revision", "partRevision", "string", VersionMeta.Version303a, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), "present": MoPropertyMeta("present", "present", "string", VersionMeta.Version303a, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), "rn": MoPropertyMeta("rn", "rn", "string", VersionMeta.Version303a, MoPropertyMeta.READ_ONLY, 0x4, 0, 255, None, [], []), "status": MoPropertyMeta("status", "status", "string", VersionMeta.Version303a, MoPropertyMeta.READ_ONLY, 0x8, None, None, None, ["", "created", "deleted", "modified", "removed"], []), "supported": MoPropertyMeta("supported", "supported", "string", VersionMeta.Version303a, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), "type": MoPropertyMeta("type", "type", "string", VersionMeta.Version303a, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), "vendor": MoPropertyMeta("vendor", "vendor", "string", VersionMeta.Version303a, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), }, } prop_map = { "classic": { "childAction": "child_action", "dn": "dn", "partNumber": "part_number", "partRevision": "part_revision", "present": "present", "rn": "rn", "status": "status", "supported": "supported", "type": "type", "vendor": "vendor", }, "modular": { "childAction": "child_action", "dn": "dn", "partNumber": "part_number", "partRevision": "part_revision", "present": "present", "rn": "rn", "status": "status", "supported": "supported", "type": "type", "vendor": "vendor", }, } def __init__(self, parent_mo_or_dn, **kwargs): self._dirty_mask = 0 self.child_action = None self.part_number = None self.part_revision = None self.present = None self.status = None self.supported = None self.type = None self.vendor = None ManagedObject.__init__(self, "AdaptorConnectorInfo", parent_mo_or_dn, **kwargs)
54.896907
207
0.612394
473
5,325
6.769556
0.167019
0.114928
0.11243
0.069956
0.805122
0.793879
0.729544
0.729544
0.689569
0.658963
0
0.023261
0.216901
5,325
96
208
55.46875
0.744604
0.022535
0
0.32
0
0
0.221067
0
0
0
0.004622
0
0
1
0.013333
false
0.013333
0.04
0
0.146667
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
548e632f4c4ed91c17629c832729018d3d6c3203
5,534
py
Python
experiments/examples/hilbert_synthetic_vectors/plot.py
DominicBroadbentCompass/bayesian-coresets-optimization
3657f2ebfc4f0e6b36f5c651b0651f06d7e3d6b1
[ "MIT" ]
5
2021-05-21T02:34:17.000Z
2022-03-29T15:17:26.000Z
experiments/examples/hilbert_synthetic_vectors/plot.py
DominicBroadbentCompass/bayesian-coresets-optimization
3657f2ebfc4f0e6b36f5c651b0651f06d7e3d6b1
[ "MIT" ]
2
2021-03-12T04:07:52.000Z
2021-03-15T12:56:05.000Z
experiments/examples/hilbert_synthetic_vectors/plot.py
DominicBroadbentCompass/bayesian-coresets-optimization
3657f2ebfc4f0e6b36f5c651b0651f06d7e3d6b1
[ "MIT" ]
4
2020-06-23T04:51:43.000Z
2021-02-04T15:07:41.000Z
import os import sys import bokeh.layouts as bkl import bokeh.palettes import bokeh.plotting as bkp import numpy as np # make it so we can import models/etc from parent folder sys.path.insert(1, os.path.join(sys.path[0], '../common')) from plotting import * fig_err_g = bkp.figure(y_axis_type='log', x_axis_type='log', y_axis_label='Error', x_axis_label='Coreset Construction Iterations', plot_width=1250, plot_height=1250) fig_csz_g = bkp.figure(x_axis_type='log', y_axis_type='log', y_axis_label='Coreset Size', x_axis_label='Coreset Construction Iterations', plot_width=1250, plot_height=1250) fig_t_g = bkp.figure(x_axis_type='log', y_axis_type='log', y_axis_label='CPU Time (s)', x_axis_label='Coreset Construction Iterations', plot_width=1250, plot_height=1250) fig_errc_g = bkp.figure(x_axis_type='log', y_axis_type='log', y_axis_label='Error', x_axis_label='Coreset Size', plot_width=1250, plot_height=1250) fig_errt_g = bkp.figure(x_axis_type='log', y_axis_type='log', y_axis_label='Error', x_axis_label='CPU Time (s)', plot_width=1250, plot_height=1250) fig_err_a = bkp.figure(y_axis_type='log', x_axis_type='log', y_axis_label='Error', x_axis_label='Coreset Construction Iterations', plot_width=1250, plot_height=1250) fig_csz_a = bkp.figure(x_axis_type='log', y_axis_type='log', y_axis_label='Coreset Size', x_axis_label='Coreset Construction Iterations', plot_width=1250, plot_height=1250) fig_t_a = bkp.figure(x_axis_type='log', y_axis_type='log', y_axis_label='CPU Time (s)', x_axis_label='Coreset Construction Iterations', plot_width=1250, plot_height=1250) fig_errc_a = bkp.figure(y_axis_type='log', x_axis_type='log', y_axis_label='Error', x_axis_label='Coreset Size', plot_width=1250, plot_height=1250) fig_errt_a = bkp.figure(y_axis_type='log', x_axis_type='log', y_axis_label='Error', x_axis_label='CPU Time (s)', plot_width=1250, plot_height=1250) axis_font_size = '36pt' legend_font_size = '36pt' for f in [fig_err_g, fig_err_a, fig_csz_a, fig_csz_g, fig_t_a, fig_t_g, fig_errc_g, fig_errc_a, fig_errt_g, fig_errt_a]: # f.xaxis.ticker = bkm.tickers.FixedTicker(ticks=[.1, 1]) f.xaxis.axis_label_text_font_size = axis_font_size f.xaxis.major_label_text_font_size = axis_font_size f.xaxis.formatter = logFmtr f.yaxis.axis_label_text_font_size = axis_font_size f.yaxis.major_label_text_font_size = axis_font_size f.yaxis.formatter = logFmtr f.toolbar.logo = None f.toolbar_location = None gr = np.load('gauss_results.npz') anms = gr['anms'] Ms = gr['Ms'] err = gr['err'] cput = gr['cput'] csize = gr['csize'] pal = bokeh.palettes.colorblind['Colorblind'][8] pal = [pal[0], pal[1], '#d62728', pal[4], pal[6], pal[3], pal[7], pal[2]] for aidx, anm in enumerate(anms): fig_err_g.line(Ms, np.percentile(err[aidx, :, :], 50, axis=0), line_color=pal[aidx], line_width=8, legend=anm) fig_csz_g.line(Ms, np.percentile(csize[aidx, :, :], 50, axis=0), line_color=pal[aidx], line_width=8, legend=anm) fig_t_g.line(Ms, np.percentile(cput[aidx, :, :], 50, axis=0), line_color=pal[aidx], line_width=8, legend=anm) fig_errc_g.line(np.percentile(csize[aidx, :, :], 50, axis=0), np.percentile(err[aidx, :, :], 50, axis=0), line_color=pal[aidx], line_width=8, legend=anm) fig_errt_g.line(np.percentile(cput[aidx, :, :], 50, axis=0), np.percentile(err[aidx, :, :], 50, axis=0), line_color=pal[aidx], line_width=8, legend=anm) aa = np.load('axis_results.npz') anms = aa['anms'] Ms = aa['Ms'] err = aa['err'] cput = aa['cput'] csize = aa['csize'] for aidx, anm in enumerate(anms): fig_err_a.line(Ms, np.percentile(err[aidx, :, :], 50, axis=0), line_color=pal[aidx], line_width=8, legend=anm, line_dash=[20, 30], line_dash_offset=np.random.randint(50)) fig_csz_a.line(Ms, np.percentile(csize[aidx, :, :], 50, axis=0), line_color=pal[aidx], line_width=8, legend=anm, line_dash=[20, 30], line_dash_offset=np.random.randint(50)) fig_t_a.line(Ms, np.percentile(cput[aidx, :, :], 50, axis=0), line_color=pal[aidx], line_width=8, legend=anm) fig_errc_a.line(np.percentile(csize[aidx, :, :], 50, axis=0), np.percentile(err[aidx, :, :], 50, axis=0), line_color=pal[aidx], line_width=8, legend=anm, line_dash=[20, 30], line_dash_offset=np.random.randint(50)) fig_errt_a.line(np.percentile(cput[aidx, :, :], 50, axis=0), np.percentile(err[aidx, :, :], 50, axis=0), line_color=pal[aidx], line_width=8, legend=anm, line_dash=[20, 30], line_dash_offset=np.random.randint(50)) for f in [fig_err_g, fig_err_a, fig_csz_a, fig_csz_g, fig_t_a, fig_t_g, fig_errc_g, fig_errc_a, fig_errt_g, fig_errt_a]: f.legend.label_text_font_size = legend_font_size f.legend.glyph_width = 100 f.legend.glyph_height = 40 f.legend.spacing = 20 fig_err_a.legend.location = 'bottom_left' fig_csz_a.legend.location = 'bottom_right' bkp.show(bkl.gridplot([[fig_err_g, fig_csz_g], [fig_t_g], [fig_errc_g, fig_errt_g], [fig_err_a, fig_csz_a], [fig_t_a], [fig_errc_a, fig_errt_a]])) # bkp.output_file('results.html') # bkp.save(bkl.gridplot([[fig_err_g, fig_csz_g], [fig_t_g], [fig_errc_g, fig_errt_g], [fig_err_a, fig_csz_a], [fig_t_a], [fig_errc_a, fig_errt_a]]))
57.645833
148
0.677087
943
5,534
3.658537
0.128314
0.057391
0.063768
0.055652
0.772174
0.770435
0.770435
0.769565
0.751594
0.705797
0
0.039974
0.168233
5,534
95
149
58.252632
0.709537
0.052223
0
0.268293
0
0
0.095038
0
0
0
0
0
0
1
0
false
0
0.085366
0
0.085366
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
54a5978ddd5d9a96c219991e126c474af876c076
168
py
Python
material_mechanics/materials/__init__.py
kemeen/material_mechanics
00442df2c41a43285708bfdb288348eb3aa50775
[ "MIT" ]
4
2019-03-06T02:02:21.000Z
2021-04-18T09:18:50.000Z
material_mechanics/materials/__init__.py
kemeen/material_mechanics
00442df2c41a43285708bfdb288348eb3aa50775
[ "MIT" ]
1
2019-01-10T12:00:19.000Z
2019-01-10T12:00:19.000Z
material_mechanics/materials/__init__.py
kemeen/material_mechanics
00442df2c41a43285708bfdb288348eb3aa50775
[ "MIT" ]
2
2020-01-25T01:59:36.000Z
2022-03-12T03:21:41.000Z
from .composites import FiberReinforcedPlastic, Laminate, Layer from .material_factories import isotropic_material, transverse_isotropic_material, orthotropic_material
56
103
0.892857
17
168
8.529412
0.647059
0.234483
0
0
0
0
0
0
0
0
0
0
0.071429
168
2
104
84
0.929487
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
54b7f1f4439a3962ce615a9316864cc0d616c153
25
py
Python
src/test/data/pa3/sample/literal_bool.py
Leo-Enrique-Wu/chocopy_compiler_code_generation
4606be0531b3de77411572aae98f73169f46b3b9
[ "BSD-2-Clause" ]
7
2021-08-28T18:20:45.000Z
2022-02-01T07:35:59.000Z
src/test/data/pa3/sample/literal_bool.py
Leo-Enrique-Wu/chocopy_compiler_code_generation
4606be0531b3de77411572aae98f73169f46b3b9
[ "BSD-2-Clause" ]
4
2020-05-18T01:06:15.000Z
2020-06-12T19:33:14.000Z
src/test/data/pa3/sample/literal_bool.py
Leo-Enrique-Wu/chocopy_compiler_code_generation
4606be0531b3de77411572aae98f73169f46b3b9
[ "BSD-2-Clause" ]
5
2019-11-27T05:11:05.000Z
2021-06-29T14:31:14.000Z
print(True) print(False)
8.333333
12
0.76
4
25
4.75
0.75
0
0
0
0
0
0
0
0
0
0
0
0.08
25
2
13
12.5
0.826087
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
54c3c7ac03a56e6c5f893667e4f5427d0dd7de0d
52
py
Python
extra01/todo_project/page_objects/__init__.py
WesGtoX/python-selenium
52f4fdca84a6f4139c8a8478435f4f1b12048258
[ "MIT" ]
null
null
null
extra01/todo_project/page_objects/__init__.py
WesGtoX/python-selenium
52f4fdca84a6f4139c8a8478435f4f1b12048258
[ "MIT" ]
1
2021-06-02T21:51:27.000Z
2021-06-02T21:51:27.000Z
extra01/todo_project/page_objects/__init__.py
WesGtoX/python-selenium
52f4fdca84a6f4139c8a8478435f4f1b12048258
[ "MIT" ]
null
null
null
from .page_objects import Page, PageElement # noqa
26
51
0.788462
7
52
5.714286
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.153846
52
1
52
52
0.909091
0.076923
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
49d8fab00997b3bccd9235bf1e68afd418e36734
60
py
Python
reopy/__init__.py
kzielins/reopy
e20e52f088837c1b01ae25eeb0f4992025178030
[ "MIT" ]
1
2020-03-09T00:27:04.000Z
2020-03-09T00:27:04.000Z
reopy/__init__.py
kzielins/reopy
e20e52f088837c1b01ae25eeb0f4992025178030
[ "MIT" ]
null
null
null
reopy/__init__.py
kzielins/reopy
e20e52f088837c1b01ae25eeb0f4992025178030
[ "MIT" ]
null
null
null
from .device import Device from .api import BasicAPIHandler
20
32
0.833333
8
60
6.25
0.625
0
0
0
0
0
0
0
0
0
0
0
0.133333
60
2
33
30
0.961538
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
b71c9a8810eeef0d726a90b64af96b1e7bbba32d
1,247
py
Python
day/two/test_main.py
stupoid/aoc-2020
dc72f81c7e0150baeb208bf5470a4cb9d79864d9
[ "MIT" ]
null
null
null
day/two/test_main.py
stupoid/aoc-2020
dc72f81c7e0150baeb208bf5470a4cb9d79864d9
[ "MIT" ]
null
null
null
day/two/test_main.py
stupoid/aoc-2020
dc72f81c7e0150baeb208bf5470a4cb9d79864d9
[ "MIT" ]
null
null
null
from day.two.main import Policy, is_valid_password, rule, rule_2, process_line def test_process_line(): input_file = open("day/two/test_input.txt", "r") po_pw_list = [process_line(l) for l in input_file] assert po_pw_list == [ (Policy(1, 3, "a"), "abcde"), (Policy(1, 3, "b"), "cdefg"), (Policy(2, 9, "c"), "ccccccccc"), ] def test_valid_password(): input_file = open("day/two/test_input.txt", "r") po_pw_list = [process_line(l) for l in input_file] assert is_valid_password(*po_pw_list[0], rule) assert is_valid_password(*po_pw_list[2], rule) def test_invalid_password(): input_file = open("day/two/test_input.txt", "r") po_pw_list = [process_line(l) for l in input_file] assert not is_valid_password(*po_pw_list[1], rule) def test_valid_password2(): input_file = open("day/two/test_input.txt", "r") po_pw_list = [process_line(l) for l in input_file] assert is_valid_password(*po_pw_list[0], rule_2) def test_invalid_password(): input_file = open("day/two/test_input.txt", "r") po_pw_list = [process_line(l) for l in input_file] assert not is_valid_password(*po_pw_list[1], rule_2) assert not is_valid_password(*po_pw_list[2], rule_2)
29
78
0.680032
213
1,247
3.638498
0.187793
0.061935
0.123871
0.131613
0.781935
0.781935
0.781935
0.774194
0.690323
0.690323
0
0.016585
0.178027
1,247
42
79
29.690476
0.739512
0
0
0.444444
0
0
0.109864
0.088212
0
0
0
0
0.259259
1
0.185185
false
0.407407
0.037037
0
0.222222
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
b71decb5df3d61403495caad269919a1d059d571
37
py
Python
ppy_terminal/imports/colors.py
TechnologyClassroom/generative_art
eb1730d90e438327edaa53375765a9690b968d2b
[ "MIT" ]
1
2022-03-03T19:41:02.000Z
2022-03-03T19:41:02.000Z
ppy_terminal/imports/colors.py
TechnologyClassroom/generative_art
eb1730d90e438327edaa53375765a9690b968d2b
[ "MIT" ]
null
null
null
ppy_terminal/imports/colors.py
TechnologyClassroom/generative_art
eb1730d90e438327edaa53375765a9690b968d2b
[ "MIT" ]
null
null
null
# dicts? lists? what's a good way...
18.5
36
0.621622
7
37
3.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.189189
37
1
37
37
0.766667
0.918919
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
b72404d00c3db9c78321b273864d060a86f4b80a
80
py
Python
protgraph/__init__.py
Luxxii/ProtGraph
68c3b362e2b487403fa02cfc25d456a272004a1f
[ "BSD-2-Clause" ]
4
2021-01-29T14:06:00.000Z
2022-03-11T07:31:35.000Z
protgraph/__init__.py
Luxxii/ProtGraph
68c3b362e2b487403fa02cfc25d456a272004a1f
[ "BSD-2-Clause" ]
30
2021-01-29T14:55:42.000Z
2022-01-18T10:55:24.000Z
protgraph/__init__.py
Luxxii/ProtGraph
68c3b362e2b487403fa02cfc25d456a272004a1f
[ "BSD-2-Clause" ]
1
2021-02-01T08:49:27.000Z
2021-02-01T08:49:27.000Z
from protgraph.protgraph import main, parse_args, prot_graph # pyflakes.ignore
40
79
0.825
11
80
5.818182
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.1125
80
1
80
80
0.901408
0.1875
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
3f827f026f6c6f6a282b9afb285ddfcce62cd924
17,612
py
Python
tests/create_model_input.py
seekrcentral/seekr2_systems
938e36ea61a3f106c0fb8d81b9bd02f664327ac7
[ "MIT" ]
null
null
null
tests/create_model_input.py
seekrcentral/seekr2_systems
938e36ea61a3f106c0fb8d81b9bd02f664327ac7
[ "MIT" ]
null
null
null
tests/create_model_input.py
seekrcentral/seekr2_systems
938e36ea61a3f106c0fb8d81b9bd02f664327ac7
[ "MIT" ]
null
null
null
""" create_model_input.py Create Model input objects for use in tests. """ import os import seekr2.modules.common_base as base import seekr2.modules.common_prepare as common_prepare import seekr2.modules.common_cv as common_cv import seekr2.modules.filetree as filetree import seekr2.modules.check as check # Don't remove the following library imports - needed by deserializer import seekr2.prepare as prepare TEST_DIRECTORY = os.path.dirname(__file__) SEEKR_DIRECTORY = os.path.dirname(prepare.__file__) def assign_amber_params(input_anchor, prmtop_filename, pdb_filename): input_anchor.starting_amber_params = base.Amber_params() input_anchor.starting_amber_params.prmtop_filename = prmtop_filename input_anchor.starting_amber_params.pdb_coordinates_filename = pdb_filename return def create_tryp_ben_mmvt_model_input(root_dir, bd=False): """ Create a trypsin-benzamidine model input object. """ os.chdir(TEST_DIRECTORY) model_input = common_prepare.Model_input() model_input.calculation_type = "mmvt" model_input.calculation_settings = common_prepare.MMVT_input_settings() model_input.calculation_settings.md_output_interval = 2500000 model_input.calculation_settings.md_steps_per_anchor = 250000000 model_input.temperature = 298.0 model_input.pressure = 1.0 model_input.ensemble = "nvt" model_input.root_directory = root_dir model_input.md_program = "openmm" model_input.constraints = "HBonds" model_input.rigidWater = True model_input.hydrogenMass = None model_input.timestep = 0.002 model_input.nonbonded_cutoff = 0.9 cv_input1 = common_cv.Spherical_cv_input() cv_input1.group1 = [2478, 2489, 2499, 2535, 2718, 2745, 2769, 2787, 2794, 2867, 2926] cv_input1.group2 = [3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229] cv_input1.input_anchors = [] radius_list = [0.05, 0.15, 0.25, 0.35, 0.45, 0.7, 0.9, 1.1, 1.3, 1.5, 1.7, 1.9] lower_milestone_radius_list = [None, 0.1, 0.2, 0.3, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8] upper_milestone_radius_list = [0.1, 0.2, 0.3, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, None] pdb_filename_list = [ "../systems/trypsin_benzamidine_files/mmvt/tryp_ben_at0.pdb", "../systems/trypsin_benzamidine_files/mmvt/tryp_ben_at1.58.pdb", "../systems/trypsin_benzamidine_files/mmvt/tryp_ben_at2.76.pdb", "../systems/trypsin_benzamidine_files/mmvt/tryp_ben_at3.69.pdb", "../systems/trypsin_benzamidine_files/mmvt/tryp_ben_at4.61.pdb", "../systems/trypsin_benzamidine_files/mmvt/tryp_ben_at7.20.pdb", "../systems/trypsin_benzamidine_files/mmvt/tryp_ben_at9.33.pdb", "../systems/trypsin_benzamidine_files/mmvt/tryp_ben_at11.06.pdb", "../systems/trypsin_benzamidine_files/mmvt/tryp_ben_at12.70.pdb", "../systems/trypsin_benzamidine_files/mmvt/tryp_ben_at14.04.pdb", "../systems/trypsin_benzamidine_files/mmvt/tryp_ben_at17.00.pdb", "" ] for i, (radius, lower_milestone_radius, upper_milestone_radius, \ pdb_filename) in enumerate(zip(radius_list, \ lower_milestone_radius_list, upper_milestone_radius_list, \ pdb_filename_list)): input_anchor = common_cv.Spherical_cv_anchor() input_anchor.radius = radius input_anchor.lower_milestone_radius = lower_milestone_radius input_anchor.upper_milestone_radius = upper_milestone_radius input_anchor.starting_amber_params = base.Amber_params() input_anchor.starting_amber_params.prmtop_filename \ = os.path.abspath( "../systems/trypsin_benzamidine_files/tryp_ben.prmtop") input_anchor.starting_amber_params.pdb_coordinates_filename = \ os.path.abspath(pdb_filename) if i == 0: input_anchor.bound_state = True else: input_anchor.bound_state = False if i == len(radius_list)-1: input_anchor.bulk_anchor = True else: input_anchor.bulk_anchor = False cv_input1.input_anchors.append(input_anchor) model_input.cv_inputs = [cv_input1] if bd: model_input.browndye_settings_input \ = common_prepare.Browndye_settings_input() model_input.browndye_settings_input.binary_directory = "" model_input.browndye_settings_input.receptor_pqr_filename \ = os.path.abspath("../systems/trypsin_benzamidine_files/trypsin.pqr") model_input.browndye_settings_input.ligand_pqr_filename \ = os.path.abspath( "../systems/trypsin_benzamidine_files/benzamidine.pqr") model_input.browndye_settings_input.apbs_grid_spacing = 0.5 model_input.browndye_settings_input.receptor_indices = [ 2478, 2489, 2499, 2535, 2718, 2745, 2769, 2787, 2794, 2867, 2926] model_input.browndye_settings_input.ligand_indices = [ 0, 1, 2, 3, 4, 5, 6, 7, 8] ion1 = base.Ion() ion1.radius = 1.14 ion1.charge = 2.0 ion1.conc = 0.02 ion2 = base.Ion() ion2.radius = 1.67 ion2.charge = -1.0 ion2.conc = 0.1 ion3 = base.Ion() ion3.radius = 4.0 ion3.charge = 1.0 ion3.conc = 0.06 model_input.browndye_settings_input.ions = [ion1, ion2, ion3] model_input.browndye_settings_input.num_bd_milestone_trajectories = 1000 model_input.browndye_settings_input.num_b_surface_trajectories = 10000 model_input.browndye_settings_input.max_b_surface_trajs_to_extract = 100 model_input.browndye_settings_input.n_threads = 1 else: model_input.browndye_settings_input = None return model_input def create_tryp_ben_elber_model_input(root_dir, bd=False): """ Create a trypsin-benzamidine model input object. """ os.chdir(TEST_DIRECTORY) model_input = common_prepare.Model_input() model_input.calculation_type = "elber" model_input.calculation_settings = common_prepare.Elber_input_settings() model_input.calculation_settings.temperature_equil_progression = [ 300., 310., 320., 330., 340., 350., 340., 330., 320., 310., 300.] model_input.calculation_settings.num_temperature_equil_steps = 1000 model_input.calculation_settings.num_umbrella_stage_steps = 500000000 model_input.calculation_settings.umbrella_force_constant = 5000.0 model_input.calculation_settings.fwd_rev_interval = 100000 model_input.temperature = 298.0 model_input.pressure = 1.0 model_input.ensemble = "nvt" model_input.root_directory = root_dir model_input.md_program = "openmm" model_input.constraints = "HBonds" model_input.rigidWater = True model_input.hydrogenMass = None model_input.timestep = 0.002 model_input.nonbonded_cutoff = 0.9 cv_input1 = common_cv.Spherical_cv_input() cv_input1.group1 = [2478, 2489, 2499, 2535, 2718, 2745, 2769, 2787, 2794, 2867, 2926] cv_input1.group2 = [3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229] cv_input1.input_anchors = [] radius_list = [0.1, 0.15, 0.2, 0.3, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6] pdb_filename_list = [ "../systems/trypsin_benzamidine_files/elber/tryp_ben_at1.pdb", "../systems/trypsin_benzamidine_files/elber/tryp_ben_at1.5.pdb", "../systems/trypsin_benzamidine_files/elber/tryp_ben_at2.pdb", "../systems/trypsin_benzamidine_files/elber/tryp_ben_at3.pdb", "../systems/trypsin_benzamidine_files/elber/tryp_ben_at4.pdb", "../systems/trypsin_benzamidine_files/elber/tryp_ben_at6.pdb", "../systems/trypsin_benzamidine_files/elber/tryp_ben_at8.pdb", "../systems/trypsin_benzamidine_files/elber/tryp_ben_at10.pdb", "../systems/trypsin_benzamidine_files/elber/tryp_ben_at12.pdb", "../systems/trypsin_benzamidine_files/elber/tryp_ben_at14.pdb", "" ] for i, (radius, pdb_filename) in enumerate( zip(radius_list, pdb_filename_list)): input_anchor = common_cv.Spherical_cv_anchor() input_anchor.radius = radius input_anchor.starting_amber_params = base.Amber_params() input_anchor.starting_amber_params.prmtop_filename \ = os.path.abspath( "../systems/trypsin_benzamidine_files/elber/tryp_ben.prmtop") input_anchor.starting_amber_params.pdb_coordinates_filename = \ os.path.abspath(pdb_filename) if i == 0: input_anchor.bound_state = True else: input_anchor.bound_state = False if i == len(radius_list)-1: input_anchor.bulk_anchor = True else: input_anchor.bulk_anchor = False cv_input1.input_anchors.append(input_anchor) model_input.cv_inputs = [cv_input1] if bd: model_input.browndye_settings_input \ = common_prepare.Browndye_settings_input() model_input.browndye_settings_input.binary_directory = "" model_input.browndye_settings_input.receptor_pqr_filename \ = os.path.abspath("../systems/trypsin_benzamidine_files/trypsin.pqr") model_input.browndye_settings_input.ligand_pqr_filename \ = os.path.abspath( "../systems/trypsin_benzamidine_files/benzamidine.pqr") model_input.browndye_settings_input.apbs_grid_spacing = 0.5 model_input.browndye_settings_input.receptor_indices = [ 2478, 2489, 2499, 2535, 2718, 2745, 2769, 2787, 2794, 2867, 2926] model_input.browndye_settings_input.ligand_indices = [ 0, 1, 2, 3, 4, 5, 6, 7, 8] ion1 = base.Ion() ion1.radius = 1.14 ion1.charge = 2.0 ion1.conc = 0.02 ion2 = base.Ion() ion2.radius = 1.67 ion2.charge = -1.0 ion2.conc = 0.1 ion3 = base.Ion() ion3.radius = 4.0 ion3.charge = 1.0 ion3.conc = 0.06 model_input.browndye_settings_input.ions = [ion1, ion2, ion3] model_input.browndye_settings_input.num_bd_milestone_trajectories = 1000 model_input.browndye_settings_input.num_b_surface_trajectories = 10000 model_input.browndye_settings_input.max_b_surface_trajs_to_extract = 100 model_input.browndye_settings_input.n_threads = 1 else: model_input.browndye_settings_input = None return model_input def create_sod_mmvt_model_input(root_dir): """ Create a generic host-guest model input object. """ os.chdir(TEST_DIRECTORY) input_xml_filename = os.path.abspath( "../systems/superoxide_dismutase_files/input_sod.xml") model_input = common_prepare.Model_input() model_input.deserialize(input_xml_filename, user_input=True) model_input.root_directory = root_dir os.chdir(os.path.dirname(input_xml_filename)) return model_input def create_rmsd_mmvt_model_input(root_dir): """ Create a RMSD TRP cage model input. """ os.chdir(TEST_DIRECTORY) model_input = common_prepare.Model_input() model_input.calculation_type = "mmvt" model_input.calculation_settings = common_prepare.MMVT_input_settings() model_input.calculation_settings.md_output_interval = 10000 model_input.calculation_settings.md_steps_per_anchor = 100000 #1000000 model_input.temperature = 298.15 model_input.pressure = 1.0 model_input.ensemble = "nvt" model_input.root_directory = root_dir model_input.md_program = "openmm" model_input.constraints = "HBonds" model_input.rigidWater = True model_input.hydrogenMass = None model_input.timestep = 0.002 model_input.nonbonded_cutoff = None cv_input1 = common_cv.RMSD_cv_input() cv_input1.group = [4, 16, 26, 47, 57, 74, 98, 117, 139, 151, 158, 173, 179, 190, 201, 208, 240, 254, 268, 274] cv_input1.ref_structure = os.path.abspath( "../systems/trp_cage_files/trp_cage.pdb") cv_input1.input_anchors = [] values_list = [0.2, 0.4, 0.6, 0.8, 1.0, 1.2] amber_prmtop_filename = os.path.abspath( "../systems/trp_cage_files/trp_cage.prmtop") forcefield_built_in_ff_list = ["amber14/tip3pfb.xml"] forcefield_custom_ff_list = ["../systems/hostguest_files/hostguest.xml"] pdb_filenames = [os.path.abspath( "../systems//trp_cage_files/trp_cage.pdb"), os.path.abspath( "../systems//trp_cage_files/trp_cage_0.40.pdb"), os.path.abspath( "../systems/trp_cage_files/trp_cage_0.60.pdb"), os.path.abspath( "../systems/trp_cage_files/trp_cage_0.80.pdb"), os.path.abspath( "../systems/trp_cage_files/trp_cage_1.00.pdb"), ""] for i, (value, pdb_filename) in enumerate(zip(values_list, pdb_filenames)): input_anchor = common_cv.RMSD_cv_anchor() input_anchor.value = value assign_amber_params(input_anchor, amber_prmtop_filename, pdb_filename) if i == 0: input_anchor.bound_state = True else: input_anchor.bound_state = False if i == len(values_list)-1: input_anchor.bulk_anchor = True else: input_anchor.bulk_anchor = False #input_anchor.bulk_anchor = False cv_input1.input_anchors.append(input_anchor) model_input.cv_inputs = [cv_input1] model_input.browndye_settings_input = None return model_input def create_smoluchowski_mmvt_model_input(root_dir, num_input_anchors=5): """ Create a Smoluchowski MMVT model input object. """ os.chdir(TEST_DIRECTORY) model_input = common_prepare.Model_input() model_input.calculation_type = "mmvt" model_input.calculation_settings = common_prepare.MMVT_input_settings() model_input.calculation_settings.md_output_interval = 0 model_input.calculation_settings.md_steps_per_anchor = 0 model_input.temperature = 300.0 model_input.pressure = 1.0 model_input.ensemble = "nvt" model_input.root_directory = root_dir model_input.md_program = "smoluchowski" model_input.constraints = "none" model_input.rigidWater = False model_input.hydrogenMass = None model_input.timestep = 0.002 model_input.nonbonded_cutoff = 0.0 cv_input1 = common_cv.Spherical_cv_input() cv_input1.group1 = [0] cv_input1.group2 = [1] cv_input1.input_anchors = [] for i in range(num_input_anchors): input_anchor = common_cv.Spherical_cv_anchor() input_anchor.radius = i + 0.5 input_anchor.starting_amber_params = None if i == 0: input_anchor.bound_state = True else: input_anchor.bound_state = False if i == num_input_anchors-1: input_anchor.bulk_anchor = True else: input_anchor.bulk_anchor = False cv_input1.input_anchors.append(input_anchor) model_input.cv_inputs = [cv_input1] model_input.browndye_settings_input = None return model_input def create_smoluchowski_elber_model_input(root_dir, num_input_anchors=5): """ Create a Smoluchowski Elber model input object. """ os.chdir(TEST_DIRECTORY) model_input = create_smoluchowski_mmvt_model_input(root_dir) model_input.calculation_type = "elber" model_input.calculation_settings = common_prepare.Elber_input_settings() model_input.calculation_settings.num_umbrella_stage_steps = 100000 model_input.calculation_settings.umbrella_force_constant = 9000.0 model_input.calculation_settings.fwd_rev_interval = 500 model_input.calculation_settings.rev_output_interval = None model_input.calculation_settings.fwd_output_interval = None cv_input1 = common_cv.Spherical_cv_input() cv_input1.group1 = [0] cv_input1.group2 = [1] cv_input1.input_anchors = [] cv_input1.input_anchors = [] for i in range(num_input_anchors): input_anchor = common_cv.Spherical_cv_anchor() input_anchor.radius = i + 1.0 input_anchor.starting_amber_params = None if i == 0: input_anchor.bound_state = True else: input_anchor.bound_state = False if i == num_input_anchors-1: input_anchor.bulk_anchor = True else: input_anchor.bulk_anchor = False cv_input1.input_anchors.append(input_anchor) model_input.cv_inputs = [cv_input1] model_input.browndye_settings_input = None return model_input def prepare_model(model_input_filename, tmp_path, in_directory): force_overwrite = True skip_checks = False model_input = common_prepare.Model_input() model_input.deserialize(model_input_filename, user_input = True) basename = os.path.split(model_input.root_directory.strip("/"))[-1] model_input.root_directory = os.path.join(tmp_path, basename) os.chdir(in_directory) model, xml_path = prepare.prepare(model_input, force_overwrite) if model.anchor_rootdir == ".": model_dir = os.path.dirname(xml_path) model.anchor_rootdir = os.path.abspath(model_dir) if not skip_checks: check.check_pre_simulation_all(model) assert os.path.exists(model.anchor_rootdir) return model
41.149533
81
0.681581
2,304
17,612
4.855035
0.124132
0.126944
0.058198
0.067406
0.815573
0.788128
0.782764
0.754962
0.637761
0.620508
0
0.059551
0.223881
17,612
428
82
41.149533
0.758797
0.025664
0
0.641457
0
0
0.121095
0.114823
0
0
0
0
0.002801
1
0.022409
false
0
0.019608
0
0.064426
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3f98bdffae7afcde6d3f2a87bbae1f89e0a7f67d
5,350
py
Python
tests/unit/array/mixins/test_text.py
MarkusSagen/docarray
2b535b2f3e361ec48d50877615b535f6dc361b45
[ "Apache-2.0" ]
1
2022-03-16T14:05:32.000Z
2022-03-16T14:05:32.000Z
tests/unit/array/mixins/test_text.py
MarkusSagen/docarray
2b535b2f3e361ec48d50877615b535f6dc361b45
[ "Apache-2.0" ]
null
null
null
tests/unit/array/mixins/test_text.py
MarkusSagen/docarray
2b535b2f3e361ec48d50877615b535f6dc361b45
[ "Apache-2.0" ]
null
null
null
import numpy as np import pytest from docarray import DocumentArray, Document from docarray.array.qdrant import DocumentArrayQdrant from docarray.array.sqlite import DocumentArraySqlite from docarray.array.annlite import DocumentArrayAnnlite, AnnliteConfig from docarray.array.storage.qdrant import QdrantConfig from docarray.array.storage.weaviate import WeaviateConfig from docarray.array.weaviate import DocumentArrayWeaviate @pytest.fixture(scope='function') def docs(): return [ Document(text='hello'), Document(text='hello world'), Document(text='goodbye world!'), ] @pytest.mark.parametrize('min_freq', [1, 2, 3]) @pytest.mark.parametrize( 'da_cls,config', [ (DocumentArray, None), (DocumentArraySqlite, None), (DocumentArrayAnnlite, AnnliteConfig(n_dim=128)), (DocumentArrayWeaviate, WeaviateConfig(n_dim=128)), (DocumentArrayQdrant, QdrantConfig(n_dim=128)), ], ) def test_da_vocabulary(da_cls, config, docs, min_freq, start_storage): if config: da = da_cls(docs, config=config) else: da = da_cls(docs) vocab = da.get_vocabulary(min_freq) if min_freq <= 1: assert set(vocab.values()) == {2, 3, 4} # 0,1 are reserved assert set(vocab.keys()) == {'hello', 'world', 'goodbye'} elif min_freq == 2: assert set(vocab.values()) == {2, 3} # 0,1 are reserved assert set(vocab.keys()) == {'hello', 'world'} elif min_freq == 3: assert not vocab.values() assert not vocab.keys() @pytest.mark.parametrize( 'da_cls,config', [ (DocumentArray, None), (DocumentArraySqlite, None), (DocumentArrayAnnlite, AnnliteConfig(n_dim=128)), (DocumentArrayWeaviate, WeaviateConfig(n_dim=128)), (DocumentArrayQdrant, QdrantConfig(n_dim=128)), ], ) def test_da_text_to_tensor_non_max_len(docs, da_cls, config, start_storage): if config: test_docs = da_cls(docs, config=config) else: test_docs = da_cls(docs) vocab = test_docs.get_vocabulary() test_docs.apply(lambda d: d.convert_text_to_tensor(vocab)) np.testing.assert_array_equal(test_docs[0].tensor, [2]) np.testing.assert_array_equal(test_docs[1].tensor, [2, 3]) np.testing.assert_array_equal(test_docs[2].tensor, [4, 3]) test_docs.apply(lambda d: d.convert_tensor_to_text(vocab)) assert test_docs[0].text == 'hello' assert test_docs[1].text == 'hello world' assert test_docs[2].text == 'goodbye world' @pytest.mark.parametrize( 'da_cls,config', [ (DocumentArray, None), (DocumentArraySqlite, None), (DocumentArrayAnnlite, AnnliteConfig(n_dim=128)), (DocumentArrayWeaviate, WeaviateConfig(n_dim=128)), (DocumentArrayQdrant, QdrantConfig(n_dim=128)), ], ) def test_da_text_to_tensor_max_len_3(docs, da_cls, config, start_storage): if config: test_docs = da_cls(docs, config=config) else: test_docs = da_cls(docs) vocab = test_docs.get_vocabulary() test_docs.apply(lambda d: d.convert_text_to_tensor(vocab, max_length=3)) np.testing.assert_array_equal(test_docs[0].tensor, [0, 0, 2]) np.testing.assert_array_equal(test_docs[1].tensor, [0, 2, 3]) np.testing.assert_array_equal(test_docs[2].tensor, [0, 4, 3]) test_docs.apply(lambda d: d.convert_tensor_to_text(vocab)) assert test_docs[0].text == 'hello' assert test_docs[1].text == 'hello world' assert test_docs[2].text == 'goodbye world' @pytest.mark.parametrize( 'da_cls,config', [ (DocumentArray, None), (DocumentArraySqlite, None), (DocumentArrayAnnlite, AnnliteConfig(n_dim=128)), (DocumentArrayWeaviate, WeaviateConfig(n_dim=128)), (DocumentArrayQdrant, QdrantConfig(n_dim=128)), ], ) def test_da_text_to_tensor_max_len_1(docs, da_cls, config, start_storage): if config: test_docs = da_cls(docs, config=config) else: test_docs = da_cls(docs) vocab = test_docs.get_vocabulary() test_docs.apply(lambda d: d.convert_text_to_tensor(vocab, max_length=1)) np.testing.assert_array_equal(test_docs[0].tensor, [2]) np.testing.assert_array_equal(test_docs[1].tensor, [3]) np.testing.assert_array_equal(test_docs[2].tensor, [3]) test_docs.apply(lambda d: d.convert_tensor_to_text(vocab)) assert test_docs[0].text == 'hello' assert test_docs[1].text == 'world' assert test_docs[2].text == 'world' @pytest.mark.parametrize( 'da_cls,config', [ (DocumentArray, None), (DocumentArraySqlite, None), (DocumentArrayAnnlite, AnnliteConfig(n_dim=128)), (DocumentArrayWeaviate, WeaviateConfig(n_dim=128)), (DocumentArrayQdrant, QdrantConfig(n_dim=128)), ], ) def test_convert_text_tensor_random_text(da_cls, docs, config, start_storage): if config: da = da_cls(docs, config=config) else: da = da_cls(docs) texts = ['a short phrase', 'word', 'this is a much longer sentence'] da.clear() da.extend(Document(text=t) for t in texts) vocab = da.get_vocabulary() # encoding da.apply(lambda d: d.convert_text_to_tensor(vocab, max_length=10)) # decoding da.apply(lambda d: d.convert_tensor_to_text(vocab)) assert texts assert da.texts == texts
32.822086
78
0.678692
702
5,350
4.948718
0.133903
0.075993
0.030225
0.051813
0.766839
0.765112
0.733736
0.733736
0.733448
0.721934
0
0.023407
0.193458
5,350
162
79
33.024691
0.781692
0.009533
0
0.547445
0
0
0.048923
0
0
0
0
0
0.189781
1
0.043796
false
0
0.065693
0.007299
0.116788
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3fb899e76f972229fd193ad915bca9c585232a48
83
py
Python
petfinder/admin.py
noedlm/neo-pets
5220cf1bbba1d78405c7b2bf86caf93e83594432
[ "MIT" ]
null
null
null
petfinder/admin.py
noedlm/neo-pets
5220cf1bbba1d78405c7b2bf86caf93e83594432
[ "MIT" ]
null
null
null
petfinder/admin.py
noedlm/neo-pets
5220cf1bbba1d78405c7b2bf86caf93e83594432
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Pet admin.site.register(Pet)
16.6
32
0.807229
13
83
5.153846
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.120482
83
5
33
16.6
0.917808
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
3fc5ec919084199a24114be431ae0bbbf67b8367
207
py
Python
helm/dagster/schema/schema/charts/dagster/subschema/service_account.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
helm/dagster/schema/schema/charts/dagster/subschema/service_account.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
helm/dagster/schema/schema/charts/dagster/subschema/service_account.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
from pydantic import BaseModel # pylint: disable=no-name-in-module from ...utils import kubernetes class ServiceAccount(BaseModel): create: bool name: str annotations: kubernetes.Annotations
20.7
67
0.753623
24
207
6.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.169082
207
9
68
23
0.906977
0.15942
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
3fc9ab8acbcf90587ab164f8969ad3b63fde164a
208
py
Python
revrand/__init__.py
basaks/revrand
4c1881b6c1772d2b988518e49dde954f165acfb6
[ "Apache-2.0" ]
62
2015-11-06T00:45:21.000Z
2022-03-21T08:08:29.000Z
revrand/__init__.py
basaks/revrand
4c1881b6c1772d2b988518e49dde954f165acfb6
[ "Apache-2.0" ]
112
2015-11-05T06:47:16.000Z
2021-06-28T20:07:26.000Z
revrand/__init__.py
basaks/revrand
4c1881b6c1772d2b988518e49dde954f165acfb6
[ "Apache-2.0" ]
16
2016-04-10T08:54:07.000Z
2021-04-27T11:43:53.000Z
from .slm import StandardLinearModel from .glm import GeneralizedLinearModel, GeneralisedLinearModel from .btypes import Bound, Positive, Parameter from . import likelihoods, basis_functions, metrics, btypes
41.6
63
0.846154
22
208
7.954545
0.681818
0
0
0
0
0
0
0
0
0
0
0
0.105769
208
4
64
52
0.94086
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
3fd28dde594c6d76b16a3fcecd8e98f2c4d754b5
180
py
Python
vega/report/__init__.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
724
2020-06-22T12:05:30.000Z
2022-03-31T07:10:54.000Z
vega/report/__init__.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
147
2020-06-30T13:34:46.000Z
2022-03-29T11:30:17.000Z
vega/report/__init__.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
160
2020-06-29T18:27:58.000Z
2022-03-23T08:42:21.000Z
from .report_server import ReportServer from .report_client import ReportClient from .record import ReportRecord from .nsga_iii import NonDominatedSorting, SortAndSelectPopulation
36
66
0.877778
20
180
7.75
0.65
0.129032
0
0
0
0
0
0
0
0
0
0
0.094444
180
4
67
45
0.95092
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
3fdc0bc1e6aa2c90f4e7b2709448e44f5d21bdf7
82
py
Python
Phones/Phone.py
HuuHoangNguyen/Python_learning
c33940ca95866cefa6381cdef901062be755052d
[ "MIT" ]
null
null
null
Phones/Phone.py
HuuHoangNguyen/Python_learning
c33940ca95866cefa6381cdef901062be755052d
[ "MIT" ]
null
null
null
Phones/Phone.py
HuuHoangNguyen/Python_learning
c33940ca95866cefa6381cdef901062be755052d
[ "MIT" ]
null
null
null
#!/usr/bin/python from Pots import Pots from Isdn import Isdn from G3 import G3
11.714286
21
0.756098
15
82
4.133333
0.533333
0
0
0
0
0
0
0
0
0
0
0.029851
0.182927
82
6
22
13.666667
0.895522
0.195122
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
3fe8ad91c5926374f4c48d9b2435aa01e397b04b
71
py
Python
data_sets/synthetic_review_prediction/classes/style.py
Octavian-ai/synthetic-graph-data
b327cfb06d420d216a5377f2ce953355089e0e6b
[ "MIT" ]
16
2018-09-06T09:27:03.000Z
2021-05-28T01:35:44.000Z
data_sets/synthetic_review_prediction/classes/style.py
Octavian-ai/generate-data
b327cfb06d420d216a5377f2ce953355089e0e6b
[ "MIT" ]
1
2021-02-10T00:02:43.000Z
2021-02-10T00:02:43.000Z
data_sets/synthetic_review_prediction/classes/style.py
Octavian-ai/generate-data
b327cfb06d420d216a5377f2ce953355089e0e6b
[ "MIT" ]
7
2018-07-23T08:39:54.000Z
2021-02-08T16:24:54.000Z
from basic_types import NanoType class Style(NanoType[str]): pass
14.2
32
0.760563
10
71
5.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.169014
71
5
33
14.2
0.898305
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
0
0
0
5
b202197f7957f42384c09083a3e412774119bef1
88
py
Python
src/pygination/errors.py
elpablete/pygination
c5a18199ab799a22460aae37a5ae745646fd315a
[ "MIT" ]
1
2022-02-01T20:51:56.000Z
2022-02-01T20:51:56.000Z
src/pygination/errors.py
elpablete/pygination
c5a18199ab799a22460aae37a5ae745646fd315a
[ "MIT" ]
1
2022-03-28T20:36:03.000Z
2022-03-28T20:36:03.000Z
src/pygination/errors.py
elpablete/pygination
c5a18199ab799a22460aae37a5ae745646fd315a
[ "MIT" ]
1
2022-03-28T20:36:58.000Z
2022-03-28T20:36:58.000Z
class PyginationError(Exception): pass class PaginationError(Exception): pass
12.571429
33
0.75
8
88
8.25
0.625
0.393939
0
0
0
0
0
0
0
0
0
0
0.181818
88
6
34
14.666667
0.916667
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
b7461c4d9f41552ca37ff9f7f3f8af482d5521a0
5,069
py
Python
tests/test_filtration.py
bbhunter/pyWhat
5c36850447f3346d7e84b31067dfe866dc3cc3bc
[ "MIT" ]
5,049
2021-05-20T09:17:41.000Z
2022-03-31T20:39:40.000Z
tests/test_filtration.py
bbhunter/pyWhat
5c36850447f3346d7e84b31067dfe866dc3cc3bc
[ "MIT" ]
155
2021-05-20T09:37:16.000Z
2022-03-04T14:38:26.000Z
tests/test_filtration.py
bbhunter/pyWhat
5c36850447f3346d7e84b31067dfe866dc3cc3bc
[ "MIT" ]
262
2021-05-22T15:00:37.000Z
2022-03-30T05:32:01.000Z
import pytest from pywhat import Distribution, Filter, pywhat_tags from pywhat.helper import CaseInsensitiveSet, InvalidTag, load_regexes regexes = load_regexes() @pytest.mark.skip( "Dist.get_regexes() returns the regex list with the default filter of 0.1:1. \ load_regexes() returns all regex without that filter. \ This fails because one of them is filtered and the other is not." ) def test_distribution(): dist = Distribution() assert regexes == dist.get_regexes() def test_distribution2(): filter = { "MinRarity": 0.3, "MaxRarity": 0.8, "Tags": ["Networking"], "ExcludeTags": ["Identifiers"], } dist = Distribution(filter) for regex in regexes: if ( 0.3 <= regex["Rarity"] <= 0.8 and "Networking" in regex["Tags"] and "Identifiers" not in regex["Tags"] ): assert regex in dist.get_regexes() def test_distribution3(): filter1 = {"MinRarity": 0.3, "Tags": ["Networking"], "ExcludeTags": ["Identifiers"]} filter2 = {"MinRarity": 0.4, "MaxRarity": 0.8, "ExcludeTags": ["Media"]} dist = Distribution(filter1) & Distribution(filter2) assert dist._dict["MinRarity"] == 0.4 assert dist._dict["MaxRarity"] == 0.8 assert dist._dict["Tags"] == CaseInsensitiveSet(["Networking"]) assert dist._dict["ExcludeTags"] == CaseInsensitiveSet() for regex in regexes: if 0.4 <= regex["Rarity"] <= 0.8 and "Networking" in regex["Tags"]: assert regex in dist.get_regexes() def test_distribution4(): filter1 = {"MinRarity": 0.3, "Tags": ["Networking"], "ExcludeTags": ["Identifiers"]} filter2 = {"MinRarity": 0.4, "MaxRarity": 0.8, "ExcludeTags": ["Media"]} dist = Distribution(filter2) dist &= Distribution(filter1) assert dist._dict["MinRarity"] == 0.4 assert dist._dict["MaxRarity"] == 0.8 assert dist._dict["Tags"] == CaseInsensitiveSet(["Networking"]) assert dist._dict["ExcludeTags"] == CaseInsensitiveSet() for regex in regexes: if 0.4 <= regex["Rarity"] <= 0.8 and "Networking" in regex["Tags"]: assert regex in dist.get_regexes() def test_distribution5(): filter1 = {"MinRarity": 0.3, "Tags": ["Networking"], "ExcludeTags": ["Identifiers"]} filter2 = {"MinRarity": 0.4, "MaxRarity": 0.8, "ExcludeTags": ["Media"]} dist = Distribution(filter1) | Distribution(filter2) assert dist._dict["MinRarity"] == 0.3 assert dist._dict["MaxRarity"] == 1 assert dist._dict["Tags"] == CaseInsensitiveSet(pywhat_tags) assert dist._dict["ExcludeTags"] == CaseInsensitiveSet(["Identifiers", "Media"]) for regex in regexes: if ( 0.3 <= regex["Rarity"] <= 1 and "Identifiers" not in regex["Tags"] and "Media" not in regex["Tags"] ): assert regex in dist.get_regexes() def test_distribution6(): filter1 = {"MinRarity": 0.3, "Tags": ["Networking"], "ExcludeTags": ["Identifiers"]} filter2 = {"MinRarity": 0.4, "MaxRarity": 0.8, "ExcludeTags": ["Media"]} dist = Distribution(filter2) dist |= Distribution(filter1) assert dist._dict["MinRarity"] == 0.3 assert dist._dict["MaxRarity"] == 1 assert dist._dict["Tags"] == CaseInsensitiveSet(pywhat_tags) assert dist._dict["ExcludeTags"] == CaseInsensitiveSet(["Identifiers", "Media"]) for regex in regexes: if ( 0.3 <= regex["Rarity"] <= 1 and "Identifiers" not in regex["Tags"] and "Media" not in regex["Tags"] ): assert regex in dist.get_regexes() def test_distribution7(): with pytest.raises(InvalidTag): Distribution({"Tags": "Media", "MinRarity": 0.7}) def test_filter(): filter = { "MinRarity": 0.3, "MaxRarity": 0.8, "Tags": ["Networking"], "ExcludeTags": ["Identifiers"], } filt = Filter(filter) assert filt["MinRarity"] == 0.3 assert filt["MaxRarity"] == 0.8 assert filt["Tags"] == CaseInsensitiveSet(["networking"]) assert filt["ExcludeTags"] == CaseInsensitiveSet(["identifiers"]) def test_filter2(): filter1 = { "MinRarity": 0.3, "MaxRarity": 0.8, "Tags": ["Networking"], "ExcludeTags": ["Identifiers"], } filter2 = {"MinRarity": 0.5, "Tags": ["Networking", "Identifiers"]} filt = Filter(filter1) & Filter(filter2) assert filt["MinRarity"] == 0.5 assert filt["MaxRarity"] == 0.8 assert filt["Tags"] == CaseInsensitiveSet(["networking"]) assert filt["ExcludeTags"] == CaseInsensitiveSet([]) def test_filter3(): filter = { "MinRarity": 0.3, "MaxRarity": 0.8, "Tags": ["Networking"], "ExcludeTags": ["Identifiers"], } filt = Filter(filter) dist = Distribution(filt) for regex in regexes: if ( 0.3 <= regex["Rarity"] <= 0.8 and "Networking" in regex["Tags"] and "Identifiers" not in regex["Tags"] ): assert regex in dist.get_regexes()
33.348684
88
0.603078
555
5,069
5.436036
0.122523
0.066291
0.074246
0.095459
0.773285
0.766324
0.766324
0.760689
0.760689
0.760689
0
0.030702
0.235352
5,069
151
89
33.569536
0.747678
0
0
0.68
0
0
0.204182
0
0
0
0
0
0.248
1
0.08
false
0
0.024
0
0.104
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
b75da8f5287f950191324197acdf684779a46849
4,663
py
Python
Utils/py/ActionSelection/tools/tools.py
BerlinUnited/NaoTH
02848ac10c16a5349f1735da8122a64d601a5c75
[ "ECL-2.0", "Apache-2.0" ]
15
2015-01-12T10:46:29.000Z
2022-03-28T05:13:14.000Z
Utils/py/ActionSelection/tools/tools.py
BerlinUnited/NaoTH
02848ac10c16a5349f1735da8122a64d601a5c75
[ "ECL-2.0", "Apache-2.0" ]
2
2019-01-20T21:07:50.000Z
2020-01-22T14:00:28.000Z
Utils/py/ActionSelection/tools/tools.py
BerlinUnited/NaoTH
02848ac10c16a5349f1735da8122a64d601a5c75
[ "ECL-2.0", "Apache-2.0" ]
5
2018-02-07T18:18:10.000Z
2019-10-15T17:01:41.000Z
import matplotlib as mpl from matplotlib import pyplot as plt from matplotlib.patches import Circle import matplotlib.patches as patches from . import field_info as f def draw_field(axis=plt.gca()): mpl.rcParams['lines.linewidth'] = 2.33513514 # was 2 before ax = axis # draw field background ax.add_patch( patches.Rectangle( (-f.x_field_length / 2, -f.y_field_length / 2), f.x_field_length, f.y_field_length, facecolor="green", zorder=0 ) ) ax.plot([0, 0], [-f.y_length * 0.5, f.y_length * 0.5], 'white') # Middle line ax.plot([f.x_opponent_groundline, f.x_opponent_groundline], [f.y_left_sideline, f.y_right_sideline], 'white') # opponent ground line ax.plot([f.x_own_groundline, f.x_own_groundline], [f.y_right_sideline, f.y_left_sideline], 'white') # own ground line ax.plot([f.x_own_groundline, f.x_opponent_groundline], [f.y_left_sideline, f.y_left_sideline], 'white') ax.plot([f.x_own_groundline, f.x_opponent_groundline], [f.y_right_sideline, f.y_right_sideline], 'white') ax.plot([f.x_opponent_groundline - f.x_penalty_area_length, f.x_opponent_groundline - f.x_penalty_area_length], [-f.y_penalty_area_length * 0.5, f.y_penalty_area_length * 0.5], 'white') # opp penalty ax.plot([f.x_opponent_groundline, f.x_opponent_groundline - f.x_penalty_area_length], [f.y_penalty_area_length * 0.5, f.y_penalty_area_length * 0.5], 'white') # opp penalty ax.plot([f.x_opponent_groundline, f.x_opponent_groundline - f.x_penalty_area_length], [-f.y_penalty_area_length * 0.5, -f.y_penalty_area_length * 0.5], 'white') # opp penalty ax.plot([f.x_own_groundline + f.x_penalty_area_length, f.x_own_groundline + f.x_penalty_area_length], [-f.y_penalty_area_length * 0.5, f.y_penalty_area_length * 0.5], 'white') # own penalty ax.plot([f.x_own_groundline, f.x_own_groundline + f.x_penalty_area_length], [f.y_penalty_area_length * 0.5, f.y_penalty_area_length * 0.5], 'white') # own penalty ax.plot([f.x_own_groundline, f.x_own_groundline + f.x_penalty_area_length], [-f.y_penalty_area_length * 0.5, -f.y_penalty_area_length * 0.5], 'white') # own penalty # Middle Circle ax.add_artist(Circle(xy=(0, 0), radius=f.center_circle_radius, fill=False, edgecolor='white')) # Penalty Marks ax.add_artist(Circle(xy=(f.x_opponent_groundline - f.x_penalty_mark_distance, 0), radius=f.penalty_cross_radius, color='white')) ax.add_artist(Circle(xy=(f.x_own_groundline + f.x_penalty_mark_distance, 0), radius=f.penalty_cross_radius, color='white')) # Own goal box ax.add_artist( Circle(xy=(f.own_goalpost_right.x, f.own_goalpost_right.y), radius=f.goalpost_radius, color='white')) # GoalPostRight ax.add_artist( Circle(xy=(f.own_goalpost_left.x, f.own_goalpost_left.y), radius=f.goalpost_radius, color='white')) # GoalPostLeft ax.plot([f.x_own_groundline, f.x_own_groundline - f.goal_depth], [-f.goal_width * 0.5, -f.goal_width * 0.5], 'white') # own goal box ax.plot([f.x_own_groundline, f.x_own_groundline - f.goal_depth], [f.goal_width * 0.5, f.goal_width * 0.5], 'white') # own goal box ax.plot([f.x_own_groundline - f.goal_depth, f.x_own_groundline - f.goal_depth], [-f.goal_width * 0.5, f.goal_width * 0.5], 'white') # own goal box # Opp GoalBox ax.add_artist(Circle(xy=(f.opponent_goalpost_right.x, f.opponent_goalpost_right.y), radius=f.goalpost_radius, color='white')) # GoalPostRight ax.add_artist(Circle(xy=(f.opponent_goalpost_left.x, f.opponent_goalpost_left.y), radius=f.goalpost_radius, color='white')) # GoalPostLeft ax.plot([f.x_opponent_groundline, f.x_opponent_groundline + f.goal_depth], [-f.goal_width * 0.5, -f.goal_width * 0.5], 'white') # Opp goal box ax.plot([f.x_opponent_groundline, f.x_opponent_groundline + f.goal_depth], [f.goal_width * 0.5, f.goal_width * 0.5], 'white') # Opp goal box ax.plot([f.x_opponent_groundline + f.goal_depth, f.x_opponent_groundline + f.goal_depth], [-f.goal_width * 0.5, f.goal_width * 0.5], 'white') # Opp goal box ax.set_xlim([-f.x_field_length * 0.5, f.x_field_length * 0.5]) ax.set_ylim([-f.y_field_length * 0.5, f.y_field_length * 0.5]) # ax.set_facecolor('green') ax.set_aspect("equal")
50.684783
99
0.655372
737
4,663
3.837178
0.101764
0.033946
0.093352
0.120226
0.811174
0.792433
0.742928
0.713225
0.671499
0.671499
0
0.021456
0.21038
4,663
91
100
51.241758
0.746605
0.07849
0
0.478873
0
0
0.033958
0
0
0
0
0
0
1
0.014085
false
0
0.070423
0
0.084507
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
b7867094fd300eb27bf0e3fc733f4b13b2bfd212
49
py
Python
tests/test_project/test_project/middlewares.py
zanachka/scrapydd
ba7854a69e756e5d0e6b5f835d8f36fe57f7f7c2
[ "Apache-2.0" ]
5
2017-06-13T05:07:57.000Z
2021-02-26T16:16:49.000Z
tests/test_project/test_project/middlewares.py
zanachka/scrapydd
ba7854a69e756e5d0e6b5f835d8f36fe57f7f7c2
[ "Apache-2.0" ]
7
2019-04-15T01:34:30.000Z
2020-09-16T02:41:00.000Z
tests/test_project/test_project/middlewares.py
zanachka/scrapydd
ba7854a69e756e5d0e6b5f835d8f36fe57f7f7c2
[ "Apache-2.0" ]
3
2017-06-28T09:58:28.000Z
2020-07-09T08:57:57.000Z
class MyCustomSpiderMiddleware(object): pass
24.5
40
0.795918
4
49
9.75
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
49
2
41
24.5
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
b7be9aaf2636d33d3d7249ea8d9feb8809cc7a2b
93
py
Python
sanic/__init__.py
awesome-archive/sanic
b74d312c57a8c4b4a2440fa52f835aeb09f87c0d
[ "MIT" ]
null
null
null
sanic/__init__.py
awesome-archive/sanic
b74d312c57a8c4b4a2440fa52f835aeb09f87c0d
[ "MIT" ]
null
null
null
sanic/__init__.py
awesome-archive/sanic
b74d312c57a8c4b4a2440fa52f835aeb09f87c0d
[ "MIT" ]
null
null
null
from .sanic import Sanic from .blueprints import Blueprint __all__ = ['Sanic', 'Blueprint']
18.6
33
0.752688
11
93
6
0.545455
0
0
0
0
0
0
0
0
0
0
0
0.139785
93
4
34
23.25
0.825
0
0
0
0
0
0.150538
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0.666667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
1
0
5
b7c1638a82545a34b3d7751d5d8b35aea930eabc
26,186
py
Python
src/keri/app/directing.py
KodexData/keripy
2a6b7883fcb04c29b4ce8f55ebb5d2eb36e24689
[ "Apache-2.0" ]
26
2020-05-18T19:52:33.000Z
2022-03-02T13:58:45.000Z
src/keri/app/directing.py
KodexData/keripy
2a6b7883fcb04c29b4ce8f55ebb5d2eb36e24689
[ "Apache-2.0" ]
16
2020-08-26T12:53:37.000Z
2021-05-26T15:29:19.000Z
src/keri/app/directing.py
m00sey/keripy
7bdaf57972d44c2435726bd2300b01a1a90a83b2
[ "Apache-2.0" ]
13
2020-05-05T20:21:26.000Z
2022-03-31T14:11:30.000Z
# -*- encoding: utf-8 -*- """ KERI keri.app.directing module simple direct mode demo support classes """ import os from hio.base import doing from hio.core import wiring from hio.core.tcp import clienting, serving from .. import kering from ..db import dbing, basing from ..core import coring, eventing, parsing from ..vdr.eventing import Tevery from . import keeping from . import habbing from . import keeping from .. import help from ..core import eventing from ..db import dbing logger = help.ogler.getLogger() def setupController(name="who", sith=None, count=1, temp=False, remotePort=5621, localPort=5620): """ Setup and return doers list to run controller """ # setup habitat hab = habbing.Habitat(name=name, isith=sith, icount=count, temp=temp) logger.info("\nDirect Mode controller %s:\nNamed %s on TCP port %s to port %s.\n\n", hab.pre, hab.name, localPort, remotePort) # setup doers ksDoer = keeping.KeeperDoer(keeper=hab.ks) # doer do reopens if not opened and closes dbDoer = basing.BaserDoer(baser=hab.db) # doer do reopens if not opened and closes # setup wirelog to create test vectors path = os.path.dirname(__file__) path = os.path.join(path, 'logs') wl = wiring.WireLog(samed=True, filed=True, name=name, prefix='keri', reopen=True, headDirPath=path) wireDoer = wiring.WireLogDoer(wl=wl) client = clienting.Client(host='127.0.0.1', port=remotePort, wl=wl) clientDoer = doing.ClientDoer(client=client) director = Director(hab=hab, client=client, tock=0.125) reactor = Reactor(hab=hab, client=client) server = serving.Server(host="", port=localPort, wl=wl) serverDoer = doing.ServerDoer(server=server) directant = Directant(hab=hab, server=server) # Reactants created on demand by directant return [ksDoer, dbDoer, wireDoer, clientDoer, director, reactor, serverDoer, directant] class Director(doing.Doer): """ Base class for Direct Mode KERI Controller Doer with habitat and TCP Client Attributes: hab (Habitat: local controller's context client (serving.Client): hio TCP client instance. Assumes operated by another doer. Inherited Properties: tyme (float): relative cycle time of associated Tymist, obtained via injected .tymth function wrapper closure. tymth (function): function wrapper closure returned by Tymist .tymeth() method. When .tymth is called it returns associated Tymist .tyme. .tymth provides injected dependency on Tymist tyme base. tock (float): desired time in seconds between runs or until next run, non negative, zero means run asap Properties: Inherited Methods: .__call__ makes instance callable return generator .do is generator function returns generator Methods: Hidden: ._tymth is injected function wrapper closure returned by .tymen() of associated Tymist instance that returns Tymist .tyme. when called. ._tock is hidden attribute for .tock property """ def __init__(self, hab, client, **kwa): """ Initialize instance. Inherited Parameters: tymist is Tymist instance tock is float seconds initial value of .tock Parameters: hab is Habitat instance client is TCP Client instance. Assumes opened/closed elsewhere """ super(Director, self).__init__(**kwa) self.hab = hab self.client = client # use client to initiate comms if self.tymth: self.client.wind(self.tymth) def wind(self, tymth): """ Inject new tymist.tymth as new ._tymth. Changes tymist.tyme base. Updates winds .tymer .tymth """ super(Director, self).wind(tymth) self.client.wind(tymth) def sendOwnEvent(self, sn): """ Utility to send own event at sequence number sn """ msg = self.hab.makeOwnEvent(sn=sn) # send to connected remote self.client.tx(msg) logger.info("%s: %s sent event:\n%s\n\n", self.hab.name, self.hab.pre, bytes(msg)) def sendOwnInception(self): """ Utility to send own inception on client """ self.sendOwnEvent(sn=0) class Reactor(doing.DoDoer): """ Reactor Subclass of DoDoer with doers list from do generator methods: .msgDo, .cueDo, and .escrowDo. Enables continuous scheduling of doers (do generator instances or functions) Implements Doist like functionality to allow nested scheduling of doers. Each DoDoer runs a list of doers like a Doist but using the tyme from its injected tymist as injected by its parent DoDoer or Doist. Scheduling hierarchy: Doist->DoDoer...->DoDoer->Doers Inherited Attributes: .done is Boolean completion state: True means completed Otherwise incomplete. Incompletion maybe due to close or abort. .opts is dict of injected options for its generator .do .doers is list of Doers or Doer like generator functions Attributes: .hab is Habitat instance of local controller's context .client is TCP Client instance. .kevery is Kevery instance Inherited Properties: .tyme is float relative cycle time of associated Tymist .tyme obtained via injected .tymth function wrapper closure. .tymth is function wrapper closure returned by Tymist .tymeth() method. When .tymth is called it returns associated Tymist .tyme. .tymth provides injected dependency on Tymist tyme base. .tock is float, desired time in seconds between runs or until next run, non negative, zero means run asap Properties: Inherited Methods: .wind injects ._tymth dependency from associated Tymist to get its .tyme .__call__ makes instance callable Appears as generator function that returns generator .do is generator method that returns generator .enter is enter context action method .recur is recur context action method or generator method .clean is clean context action method .exit is exit context method .close is close context method .abort is abort context method Overidden Methods: Hidden: ._tymth is injected function wrapper closure returned by .tymen() of associated Tymist instance that returns Tymist .tyme. when called. ._tock is hidden attribute for .tock property """ def __init__(self, hab, client, verifier=None, direct=True, doers=None, **kwa): """ Initialize instance. Inherited Parameters: tymist is Tymist instance tock is float seconds initial value of .tock doers is list of doers (do generator instances, functions or methods) Parameters: hab is Habitat instance of local controller's context client is TCP Client instance verifier is Verifier instance of local controller's TEL context direct is Boolean, True means direct mode so process cue'd receipts False means indirect mode so don't process cue'ed receipts """ self.hab = hab self.client = client # use client for both rx and tx self.verifier = verifier self.direct = True if direct else False self.kevery = eventing.Kevery(db=self.hab.db, lax=False, local=False, direct=self.direct) if self.verifier is not None: self.tvy = Tevery(tevers=self.verifier.tevers, reger=self.verifier.reger, db=self.hab.db, regk=None, local=False) else: self.tvy = None self.parser = parsing.Parser(ims=self.client.rxbs, framed=True, kvy=self.kevery, tvy=self.tvy) doers = doers if doers is not None else [] doers.extend([self.msgDo, self.escrowDo, self.cueDo]) super(Reactor, self).__init__(doers=doers, **kwa) if self.tymth: self.client.wind(self.tymth) def wind(self, tymth): """ Inject new tymist.tymth as new ._tymth. Changes tymist.tyme base. Updates winds .tymer .tymth """ super(Reactor, self).wind(tymth) self.client.wind(tymth) @doing.doize() def msgDo(self, tymth=None, tock=0.0, **opts): """ Returns Doist compatibile generator method (doer dog) to process incoming message stream of .kevery Doist Injected Attributes: g.tock = tock # default tock attributes g.done = None # default done state g.opts Parameters: tymth is injected function wrapper closure returned by .tymen() of Tymist instance. Calling tymth() returns associated Tymist .tyme. tock is injected initial tock value opts is dict of injected optional additional parameters Usage: add to doers list """ if self.parser.ims: logger.info("Client %s received:\n%s\n...\n", self.hab.pre, self.parser.ims[:1024]) done = yield from self.parser.parsator() # process messages continuously return done # should nover get here except forced close @doing.doize() def cueDo(self, tymth=None, tock=0.0, **opts): """ Returns Doist compatibile generator method (doer dog) to process .kevery.cues deque Doist Injected Attributes: g.tock = tock # default tock attributes g.done = None # default done state g.opts Parameters: tymth is injected function wrapper closure returned by .tymen() of Tymist instance. Calling tymth() returns associated Tymist .tyme. tock is injected initial tock value opts is dict of injected optional additional parameters Usage: add to doers list """ while True: for msg in self.hab.processCuesIter(self.kevery.cues): self.sendMessage(msg, label="chit or receipt") yield # throttle just do one cue at a time yield return False # should never get here except forced close @doing.doize() def escrowDo(self, tymth=None, tock=0.0, **opts): """ Returns Doist compatibile generator method (doer dog) to process .kevery escrows. Doist Injected Attributes: g.tock = tock # default tock attributes g.done = None # default done state g.opts Parameters: tymth is injected function wrapper closure returned by .tymen() of Tymist instance. Calling tymth() returns associated Tymist .tyme. tock is injected initial tock value opts is dict of injected optional additional parameters Usage: add to doers list """ while True: self.kevery.processEscrows() yield return False # should never get here except forced close def sendMessage(self, msg, label=""): """ Sends message msg and loggers label if any """ self.client.tx(msg) # send to remote logger.info("%s sent %s:\n%s\n\n", self.hab.pre, label, bytes(msg)) class Directant(doing.DoDoer): """ Directant class with TCP Server. Responds to initiated connections from a remote Director by creating and running a Reactant per connection. Each Reactant has TCP remoter. Directant Subclass of DoDoer with doers list from do generator methods: .serviceDo Enables continuous scheduling of doers (do generator instances or functions) Implements Doist like functionality to allow nested scheduling of doers. Each DoDoer runs a list of doers like a Doist but using the tyme from its injected tymist as injected by its parent DoDoer or Doist. Scheduling hierarchy: Doist->DoDoer...->DoDoer->Doers Inherited Attributes: .done is Boolean completion state: True means completed Otherwise incomplete. Incompletion maybe due to close or abort. .opts is dict of injected options for its generator .do .doers is list of Doers or Doer like generator functions Attributes: .hab is Habitat instance of local controller's context .server is TCP client instance. Assumes operated by another doer. .rants is dict of Reactants indexed by connection address Inherited Properties: .tyme is float relative cycle time of associated Tymist .tyme obtained via injected .tymth function wrapper closure. .tymth is function wrapper closure returned by Tymist .tymeth() method. When .tymth is called it returns associated Tymist .tyme. .tymth provides injected dependency on Tymist tyme base. .tock is desired time in seconds between runs or until next run, non negative, zero means run asap Properties: Inherited Methods: .wind injects ._tymth dependency from associated Tymist to get its .tyme .__call__ makes instance callable Appears as generator function that returns generator .do is generator method that returns generator .enter is enter context action method .recur is recur context action method or generator method .clean is clean context action method .exit is exit context method .close is close context method .abort is abort context method Methods: Hidden: ._tymth is injected function wrapper closure returned by .tymen() of associated Tymist instance that returns Tymist .tyme. when called. ._tock is hidden attribute for .tock property """ def __init__(self, hab, server, verifier=None, doers=None, **kwa): """ Initialize instance. Inherited Parameters: tymist is Tymist instance tock is float seconds initial value of .tock Parameters: hab is Habitat instance of local controller's context verifier (optional) is Verifier instance of local controller's TEL context server is TCP Server instance """ self.hab = hab self.verifier = verifier self.server = server # use server for cx self.rants = dict() doers = doers if doers is not None else [] doers.extend([self.serviceDo]) super(Directant, self).__init__(doers=doers, **kwa) if self.tymth: self.server.wind(self.tymth) def wind(self, tymth): """ Inject new tymist.tymth as new ._tymth. Changes tymist.tyme base. Updates winds .tymer .tymth """ super(Directant, self).wind(tymth) self.server.wind(tymth) @doing.doize() def serviceDo(self, tymth=None, tock=0.0, **opts): """ Returns Doist compatibile generator method (doer dog) to service connections on .server. Creates remoter and rant (Reactant) for each open connection and adds rant to running doers. Doist Injected Attributes: g.tock = tock # default tock attributes g.done = None # default done state g.opts Parameters: tymth is injected function wrapper closure returned by .tymen() of Tymist instance. Calling tymth() returns associated Tymist .tyme. tock is injected initial tock value opts is dict of injected optional additional parameters Usage: add to doers list """ while True: for ca, ix in list(self.server.ixes.items()): if ix.cutoff: self.closeConnection(ca) continue if ca not in self.rants: # create Reactant and extend doers with it rant = Reactant(tymth=self.tymth, hab=self.hab, verifier=self.verifier, remoter=ix) self.rants[ca] = rant # add Reactant (rant) doer to running doers self.extend(doers=[rant]) # open and run rant as doer if ix.timeout > 0.0 and ix.tymer.expired: self.closeConnection(ca) # also removes rant yield return False # should never get here def closeConnection(self, ca): """ Close and remove connection given by ca and remove associated rant at ca. """ if ca in self.server.ixes: # remoter still there self.server.ixes[ca].serviceSends() # send final bytes to socket self.server.removeIx(ca) if ca in self.rants: # remove rant (Reactant) if any self.remove([self.rants[ca]]) # close and remove rant from doers list del self.rants[ca] class Reactant(doing.DoDoer): """ Reactant Subclass of DoDoer with doers list from do generator methods: .msgDo, .cueDo, and .escrowDo. Enables continuous scheduling of doers (do generator instances or functions) Implements Doist like functionality to allow nested scheduling of doers. Each DoDoer runs a list of doers like a Doist but using the tyme from its injected tymist as injected by its parent DoDoer or Doist. Scheduling hierarchy: Doist->DoDoer...->DoDoer->Doers Attributes: .hab is Habitat instance of local controller's context .kevery is Kevery instance .remoter is TCP Remoter instance for connection from remote TCP client. Inherited Attributes: .done is Boolean completion state: True means completed Otherwise incomplete. Incompletion maybe due to close or abort. .opts is dict of injected options for its generator .do .doers is list of Doers or Doer like generator functions Inherited Properties: .tyme is float relative cycle time of associated Tymist .tyme obtained via injected .tymth function wrapper closure. .tymth is function wrapper closure returned by Tymist .tymeth() method. When .tymth is called it returns associated Tymist .tyme. .tymth provides injected dependency on Tymist tyme base. .tock is float, desired time in seconds between runs or until next run, non negative, zero means run asap Properties: Inherited Methods: .wind injects ._tymth dependency from associated Tymist to get its .tyme .__call__ makes instance callable Appears as generator function that returns generator .do is generator method that returns generator .enter is enter context action method .recur is recur context action method or generator method .clean is clean context action method .exit is exit context method .close is close context method .abort is abort context method Overidden Methods: Hidden: ._tymth is injected function wrapper closure returned by .tymen() of associated Tymist instance that returns Tymist .tyme. when called. ._tock is hidden attribute for .tock property """ def __init__(self, hab, remoter, verifier=None, doers=None, **kwa): """ Initialize instance. Inherited Parameters: tymist is Tymist instance tock is float seconds initial value of .tock doers is list of doers (do generator instancs or functions) Parameters: hab is Habitat instance of local controller's context verifier is Verifier instance of local controller's TEL context remoter is TCP Remoter instance doers is list of doers (do generator instances, functions or methods) """ self.hab = hab self.verifier = verifier self.remoter = remoter # use remoter for both rx and tx doers = doers if doers is not None else [] doers.extend([self.msgDo, self.cueDo, self.escrowDo]) # neeeds unique kevery with ims per remoter connnection self.kevery = eventing.Kevery(db=self.hab.db, lax=False, local=False) if self.verifier is not None: self.tevery = Tevery(tevers=self.verifier.tevers, reger=self.verifier.reger, db=self.hab.db, regk=None, local=False) doers.extend([self.verifierDo]) else: self.tevery = None self.parser = parsing.Parser(ims=self.remoter.rxbs, framed=True, kvy=self.kevery, tvy=self.tevery) super(Reactant, self).__init__(doers=doers, **kwa) if self.tymth: self.remoter.wind(self.tymth) def wind(self, tymth): """ Inject new tymist.tymth as new ._tymth. Changes tymist.tyme base. Updates winds .tymer .tymth """ super(Reactant, self).wind(tymth) self.remoter.wind(tymth) @doing.doize() def msgDo(self, tymth=None, tock=0.0, **opts): """ Returns Doist compatibile generator method (doer dog) to process incoming message stream of .kevery Doist Injected Attributes: g.tock = tock # default tock attributes g.done = None # default done state g.opts Parameters: tymth is injected function wrapper closure returned by .tymen() of Tymist instance. Calling tymth() returns associated Tymist .tyme. tock is injected initial tock value opts is dict of injected optional additional parameters Usage: add to doers list """ if self.parser.ims: logger.info("Server %s: %s received:\n%s\n...\n", self.hab.name, self.hab.pre, self.parser.ims[:1024]) done = yield from self.parser.parsator() # process messages continuously return done # should nover get here except forced close @doing.doize() def cueDo(self, tymth=None, tock=0.0, **opts): """ Returns Doist compatibile generator method (doer dog) to process .kevery.cues deque Doist Injected Attributes: g.tock = tock # default tock attributes g.done = None # default done state g.opts Parameters: tymth is injected function wrapper closure returned by .tymen() of Tymist instance. Calling tymth() returns associated Tymist .tyme. tock is injected initial tock value opts is dict of injected optional additional parameters Usage: add to doers list """ while True: for msg in self.hab.processCuesIter(self.kevery.cues): self.sendMessage(msg, label="chit or receipt or replay") yield # throttle just do one cue at a time yield return False # should never get here except forced close @doing.doize() def verifierDo(self, tymth=None, tock=0.0, **opts): """ Returns Doist compatibile generator method (doer dog) to process .tevery.cues deque Doist Injected Attributes: g.tock = tock # default tock attributes g.done = None # default done state g.opts Parameters: tymth is injected function wrapper closure returned by .tymen() of Tymist instance. Calling tymth() returns associated Tymist .tyme. tock is injected initial tock value opts is dict of injected optional additional parameters Usage: add to doers list """ while True: for msg in self.verifier.processCuesIter(self.tevery.cues): self.sendMessage(msg, label="replay") yield # throttle just do one cue at a time yield return False # should never get here except forced close @doing.doize() def escrowDo(self, tymth=None, tock=0.0, **opts): """ Returns Doist compatibile generator method (doer dog) to process .kevery escrows. Doist Injected Attributes: g.tock = tock # default tock attributes g.done = None # default done state g.opts Parameters: tymth is injected function wrapper closure returned by .tymen() of Tymist instance. Calling tymth() returns associated Tymist .tyme. tock is injected initial tock value opts is dict of injected optional additional parameters Usage: add to doers list """ while True: self.kevery.processEscrows() yield return False # should never get here except forced close def sendMessage(self, msg, label=""): """ Sends message msg and loggers label if any """ self.remoter.tx(msg) # send to remote logger.info("Server %s: %s sent %s:\n%s\n\n", self.hab.name, self.hab.pre, label, bytes(msg)) def runController(doers, expire=0.0): """ Utiitity Function to create doist to run doers """ tock = 0.03125 doist = doing.Doist(limit=expire, tock=tock, real=True) doist.do(doers=doers)
36.829817
103
0.616284
3,153
26,186
5.09705
0.12274
0.0168
0.027379
0.029867
0.771265
0.753469
0.751851
0.728455
0.705619
0.695539
0
0.003075
0.317001
26,186
710
104
36.88169
0.895499
0.578057
0
0.465686
0
0.004902
0.031222
0
0
0
0
0
0
1
0.112745
false
0
0.068627
0
0.245098
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
b7e4ef3c04ca6a9fd00d67f9323d1274a8102082
66,799
py
Python
etl/parsers/etw/Microsoft_Windows_MediaFoundation_Performance_Core.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
104
2020-03-04T14:31:31.000Z
2022-03-28T02:59:36.000Z
etl/parsers/etw/Microsoft_Windows_MediaFoundation_Performance_Core.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
7
2020-04-20T09:18:39.000Z
2022-03-19T17:06:19.000Z
etl/parsers/etw/Microsoft_Windows_MediaFoundation_Performance_Core.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
16
2020-03-05T18:55:59.000Z
2022-03-01T10:19:28.000Z
# -*- coding: utf-8 -*- """ Microsoft-Windows-MediaFoundation-Performance-Core GUID : b20e65ac-c905-4014-8f78-1b6a508142eb """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WString, CString, SystemTime, Guid from etl.dtyp import Sid from etl.parsers.etw.core import Etw, declare, guid @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=1, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_1_0(Etw): pattern = Struct( "object" / Int64ul, "WorkQueueId" / Int64ul, "IsMultithread" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=2, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_2_0(Etw): pattern = Struct( "object" / Int64ul, "m_u32StreamingPeriodMS" / Int32ul, "m_u32RenderBufferSizeInFrames" / Int32ul, "m_ui64ClockTicksPerSecond" / Int64ul, "m_u32AudioClientType" / Int32ul, "IsEventDriven" / Int8ul, "FillSilenceWhenStarving" / Int8ul, "FillCompressedSilenceWhenStarving" / Int8ul, "DropLateData" / Int8ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=3, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_3_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=4, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_4_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=5, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_5_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=6, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_6_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=7, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_7_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=8, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_8_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=9, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_9_0(Etw): pattern = Struct( "object" / Int64ul, "SystemTime" / Int64sl, "mfsState" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=10, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_10_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=11, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_11_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=12, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_12_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul, "pullPlayPosition" / Int64sl, "pullRawPlayPosition" / Int64sl, "pullRawWritePosition" / Int64sl, "pullDevicePosition" / Int64sl, "phnsCorrelatedTime" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=13, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_13_0(Etw): pattern = Struct( "object" / Int64ul, "dwBytesWanted" / Int32ul, "u32FramesToRender" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=14, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_14_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=15, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_15_0(Etw): pattern = Struct( "object" / Int64ul, "dwBytesWanted" / Int32ul, "m_bEOSReceived" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=16, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_16_0(Etw): pattern = Struct( "object" / Int64ul, "dwBytesWanted" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=17, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_17_0(Etw): pattern = Struct( "object" / Int64ul, "ullEOSPosition" / Int64sl, "m_bIsEventDriven" / Int8ul, "IsOffloadedStream" / Int8ul, "IsOffloadedCompressedStream" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=18, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_18_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=19, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_19_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=20, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_20_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=21, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_21_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=22, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_22_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=23, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_23_0(Etw): pattern = Struct( "object" / Int64ul, "bFirstFill" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=24, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_24_0(Etw): pattern = Struct( "object" / Int64ul, "u32CurrentPadding" / Int32ul, "u32FramesToRender" / Int32ul, "u32TimeLeft" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=25, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_25_0(Etw): pattern = Struct( "object" / Int64ul, "FrameCount" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=26, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_26_0(Etw): pattern = Struct( "object" / Int64ul, "BytesInUse" / Int32ul, "dwBytesWanted" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=27, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_27_0(Etw): pattern = Struct( "object" / Int64ul, "dwBytesStillWanted" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=28, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_28_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=29, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_29_0(Etw): pattern = Struct( "object" / Int64ul, "bEOS" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=30, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_30_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=31, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_31_0(Etw): pattern = Struct( "object" / Int64ul, "hr" / Int32sl, "fInserted" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=32, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_32_0(Etw): pattern = Struct( "object" / Int64ul, "fFlushed" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=33, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_33_0(Etw): pattern = Struct( "object" / Int64ul, "bEngineStarted" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=34, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_34_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=35, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_35_0(Etw): pattern = Struct( "object" / Int64ul, "bReset" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=36, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_36_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=37, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_37_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=38, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_38_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=39, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_39_0(Etw): pattern = Struct( "object" / Int64ul, "bEngineStarted" / Int8ul, "bIsEventDriven" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=40, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_40_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=41, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_41_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=42, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_42_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=43, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_43_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=44, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_44_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=45, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_45_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=46, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_46_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=47, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_47_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=48, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_48_0(Etw): pattern = Struct( "object" / Int64ul, "fFillBuffer" / Int8ul, "bIsEventDriven" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=49, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_49_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=50, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_50_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=51, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_51_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=52, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_52_0(Etw): pattern = Struct( "object" / Int64ul, "DisconnectReason" / Int32ul, "bReacquire" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=53, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_53_0(Etw): pattern = Struct( "object" / Int64ul, "dwFlags" / Int32ul, "ui32EndpointRole" / Int32ul, "eCategory" / Int32ul, "bIsLowLatency" / Int8ul, "bBufferDurationSpecified" / Int8ul, "hnsBufferDuration" / Int64sl, "bOnlyAudio" / Int8ul, "bDisableOffload" / Int8ul, "bNonSeekableStream" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=54, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_54_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=55, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_55_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=56, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_56_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=57, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_57_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=58, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_58_0(Etw): pattern = Struct( "object" / Int64ul, "hnsSampleTime" / Int64sl, "hnsSampleDuration" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=59, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_59_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=60, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_60_0(Etw): pattern = Struct( "object" / Int64ul, "mfRenderTime" / Int64sl, "fDiscontinuity" / Int8ul, "mfAudioState" / Int32ul, "IsRateZero" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=61, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_61_0(Etw): pattern = Struct( "object" / Int64ul, "hnsSampleTime" / Int64sl, "hnsSampleDuration" / Int64sl, "bPrerollSample" / Int8ul, "bDelayedSample" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=62, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_62_0(Etw): pattern = Struct( "object" / Int64ul, "scenario" / Int32ul, "fSignalPrerolled" / Int8ul, "m_cSamplesPrerolled" / Int32ul, "m_hnsPrerollDuration" / Int64sl, "m_u32CurrentPrerolledBytes" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=63, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_63_0(Etw): pattern = Struct( "object" / Int64ul, "hnsSampleDuration" / Int64sl, "m_hnsShortSampleTolerance" / Int64sl, "m_cMaxPendingRequestSample" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=64, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_64_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=65, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_65_0(Etw): pattern = Struct( "object" / Int64ul, "MarkerType" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=66, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_66_0(Etw): pattern = Struct( "object" / Int64ul, "ControlPoint" / Int32sl, "Type" / Int32sl, "Value" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=67, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_67_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=68, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_68_0(Etw): pattern = Struct( "object" / Int64ul, "bFlushPreroll" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=69, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_69_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32sl, "fDiscontinuity" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=70, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_70_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=71, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_71_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=72, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_72_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=73, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_73_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=74, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_74_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=75, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_75_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=76, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_76_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=77, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_77_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=78, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_78_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=79, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_79_0(Etw): pattern = Struct( "object" / Int64ul, "IsUninitialized" / Int8ul, "bInvalidatingStream" / Int8ul, "mfaOriginalState" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=80, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_80_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=81, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_81_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=82, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_82_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32sl, "phnsTimeNow" / Int64sl, "phnsCorrelatedTime" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=83, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_83_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=84, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_84_0(Etw): pattern = Struct( "object" / Int64ul, "phnsTimeNow" / Int64sl, "m_mftMaxTimePriorToStreamSwitch" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=85, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_85_0(Etw): pattern = Struct( "object" / Int64ul, "phnsTimeNow" / Int64sl, "phnsCorrelatedTime" / Int64sl, "m_bInvalidatingStream" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=86, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_86_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=87, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_87_0(Etw): pattern = Struct( "object" / Int64ul, "hnsSystemTime" / Int64sl, "llClockStartOffset" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=88, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_88_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=89, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_89_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=90, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_90_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=91, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_91_0(Etw): pattern = Struct( "object" / Int64ul, "StartOffset" / Int64sl, "mftStartOffset" / Int64sl, "bResetGapAndStallHandling" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=92, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_92_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32sl, "StartOffset" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=93, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_93_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=94, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_94_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=95, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_95_0(Etw): pattern = Struct( "object" / Int64ul, "hnsSystemTime" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=96, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_96_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=97, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_97_0(Etw): pattern = Struct( "object" / Int64ul, "hnsSystemTime" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=98, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_98_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=99, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_99_0(Etw): pattern = Struct( "object" / Int64ul, "hnsSystemTime" / Int64sl, "IsRateZero" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=100, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_100_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=101, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_101_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=102, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_102_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=103, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_103_0(Etw): pattern = Struct( "object" / Int64ul, "dwFlags" / Int32sl, "bUseResampler" / Int8ul, "bClockRateMatchEnabled" / Int8ul, "bUseLightWeightConverters" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=104, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_104_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32sl, "m_bIsOffloadStream" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=105, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_105_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=106, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_106_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32sl, "pullBytePosition" / Int64sl, "phnsCorrelatedTime" / Int64sl, "m_bIsCompressedStream" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=107, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_107_0(Etw): pattern = Struct( "object" / Int64ul, "dwSamples" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=108, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_108_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=109, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_109_0(Etw): pattern = Struct( "object" / Int64ul, "MarkerType" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=110, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_110_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=111, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_111_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=112, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_112_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=113, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_113_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=114, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_114_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=115, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_115_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=116, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_116_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=117, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_117_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=118, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_118_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=119, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_119_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=120, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_120_0(Etw): pattern = Struct( "object" / Int64ul, "mfRenderTime" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=121, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_121_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32sl, "pfDiscontinuity" / Int8ul, "pullRenderBytePosition" / Int64sl, "pdwBytesToStall" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=122, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_122_0(Etw): pattern = Struct( "object" / Int64ul, "pfDiscontinuity" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=123, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_123_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32sl, "pullRenderBytePosition" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=124, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_124_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=125, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_125_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=126, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_126_0(Etw): pattern = Struct( "object" / Int64ul, "bConvertToMFPos" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=127, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_127_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32sl, "pullPlayPosition" / Int64sl, "pullWritePosition" / Int64sl, "pullDevicePlayPosition" / Int64sl, "phnsCorrelatedTime" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=128, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_128_0(Etw): pattern = Struct( "object" / Int64ul, "mftTrimAmount" / Int64sl, "mftCutoff" / Int64sl, "bTrimFromFront" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=129, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_129_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=130, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_130_0(Etw): pattern = Struct( "object" / Int64ul, "bEnable" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=131, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_131_0(Etw): pattern = Struct( "object" / Int64ul, "cPendingRequestSample" / Int32sl, "cMaxPendingRequestSample" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=132, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_132_0(Etw): pattern = Struct( "object" / Int64ul, "cPendingRequestSample" / Int32sl, "cMaxPendingRequestSample" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=133, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_133_0(Etw): pattern = Struct( "object" / Int64ul, "cPendingRequestSample" / Int32sl, "cMaxPendingRequestSample" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=134, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_134_0(Etw): pattern = Struct( "object" / Int64ul, "cPendingRequestSample" / Int32sl, "cMaxPendingRequestSample" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=135, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_135_0(Etw): pattern = Struct( "object" / Int64ul, "cMaxPendingRequestSample" / Int32sl, "NumContainers" / Int32sl, "BytesInUse" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=136, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_136_0(Etw): pattern = Struct( "object" / Int64ul, "MaxPendingRequestSample" / Int32sl, "NumContainers" / Int32sl, "DurationInUse" / Int64sl, "hnsMinAllocation" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=137, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_137_0(Etw): pattern = Struct( "object" / Int64ul, "cMaxPendingRequestSample" / Int32sl, "NumContainers" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=138, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_138_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=139, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_139_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=140, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_140_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=141, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_141_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=142, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_142_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=143, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_143_0(Etw): pattern = Struct( "object" / Int64ul, "TimeOutinMm" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=144, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_144_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=145, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_145_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=146, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_146_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=147, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_147_0(Etw): pattern = Struct( "object" / Int64ul, "bNeedFormatNegotiation" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=148, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_148_0(Etw): pattern = Struct( "object" / Int64ul, "mfaOriginalStreamState" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=149, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_149_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=150, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_150_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=151, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_151_0(Etw): pattern = Struct( "object" / Int64ul, "hnsStreamInvalidationEventTime" / Int64sl, "hnsLastCorrelatedTime" / Int64sl, "hnsTimeElapsed" / Int64sl, "hnsLastTime" / Int64sl, "hnsNewLastTime" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=152, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_152_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=153, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_153_0(Etw): pattern = Struct( "object" / Int64ul, "bNeedFormatNegotiation" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=154, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_154_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=155, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_155_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=156, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_156_0(Etw): pattern = Struct( "object" / Int64ul, "bDeviceChange" / Int8ul, "hnsNewStreamStartTime" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=157, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_157_0(Etw): pattern = Struct( "object" / Int64ul, "bStopped" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=158, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_158_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=159, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_159_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=160, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_160_0(Etw): pattern = Struct( "object" / Int64ul, "eventType" / Int32sl, "bReacquireDevice" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=161, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_161_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=162, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_162_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=163, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_163_0(Etw): pattern = Struct( "object" / Int64ul, "eventType" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=164, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_164_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=165, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_165_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=166, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_166_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=167, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_167_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=168, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_168_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=169, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_169_0(Etw): pattern = Struct( "object" / Int64ul, "dwNewState" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=170, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_170_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=171, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_171_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=172, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_172_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=173, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_173_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=174, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_174_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=175, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_175_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=176, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_176_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=177, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_177_0(Etw): pattern = Struct( "object" / Int64ul, "MFTimeOfLastRenderSample" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=178, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_178_0(Etw): pattern = Struct( "object" / Int64ul, "u32FramesToRender" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=179, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_179_0(Etw): pattern = Struct( "object" / Int64ul, "ClockTime" / Int64sl, "CorrelatedTime" / Int64sl, "IsStreamInvalidating" / Int8ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=180, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_180_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=181, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_181_0(Etw): pattern = Struct( "object" / Int64ul, "m_pCurrentMediaType" / Int64sl, "IsStreamInvalidating" / Int8ul, "hrAEFormatQuery" / Int32ul, "hFormatResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=182, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_182_0(Etw): pattern = Struct( "object" / Int64ul, "wFormatTag" / Int32ul, "nChannels" / Int16ul, "nSamplesPerSec" / Int32ul, "nAvgBytesPerSec" / Int32ul, "nBlockAlign" / Int16ul, "wBitsPerSample" / Int16ul, "cbSize" / Int16ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=183, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_183_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=184, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_184_0(Etw): pattern = Struct( "object" / Int64ul, "clientType" / Int32ul, "hFormatResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=185, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_185_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=186, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_186_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=187, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_187_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=188, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_188_0(Etw): pattern = Struct( "object" / Int64ul, "clientType" / Int32ul, "hFormatResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=189, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_189_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=190, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_190_0(Etw): pattern = Struct( "object" / Int64ul, "bufferDuration" / Int64sl, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=191, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_191_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=192, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_192_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=193, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_193_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=194, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_194_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=195, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_195_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=196, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_196_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=197, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_197_0(Etw): pattern = Struct( "object" / Int64ul, "Key" / Int64ul, "Delay" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=198, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_198_0(Etw): pattern = Struct( "object" / Int64ul, "Key" / Int64ul, "Delay" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=199, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_199_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=200, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_200_0(Etw): pattern = Struct( "object" / Int64ul, "ClockTime0_us" / Int64sl, "QPC0_us" / Int64sl, "SmoothedQPC0_us" / Int64sl, "QPCDelta_us" / Int64sl, "WindowCount" / Int32sl, "WindowWidth_us" / Int64sl, "Accepted" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=500, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_500_0(Etw): pattern = Struct( "object" / Int64ul, "u32FramesRead" / Int32ul, "m_u64LastSampleTime" / Int64ul, "u64Duration" / Int64ul, "dwFlagsForSample" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=501, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_501_0(Etw): pattern = Struct( "object" / Int64ul, "m_pParent" / Int64ul, "eventType" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=502, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_502_0(Etw): pattern = Struct( "object" / Int64ul, "m_bAudioProcessingRaw" / Int8ul, "m_bIsEventDriven" / Int8ul, "m_bIsLowLatency" / Int8ul, "m_hnsBufferDuration" / Int64sl, "m_uiAudioCategory" / Int32ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=503, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_503_0(Etw): pattern = Struct( "object" / Int64ul, "m_spAudioSessionControl" / Int64ul, "m_spAudioSessionEvents" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=504, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_504_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=505, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_505_0(Etw): pattern = Struct( "object" / Int64ul, "wstrEndpointId" / WString, "role" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=506, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_506_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=507, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_507_0(Etw): pattern = Struct( "object" / Int64ul, "wstrEndpointId" / WString, "role" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=508, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_508_0(Etw): pattern = Struct( "object" / Int64ul, "uFailedLineNumber" / Int32ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=509, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_509_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=510, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_510_0(Etw): pattern = Struct( "object" / Int64ul, "AudioClientProperties_bIsOffload" / Int8ul, "AudioClientProperties_eCategory" / Int32ul, "AudioClientProperties_Options" / Int32ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=511, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_511_0(Etw): pattern = Struct( "object" / Int64ul, "m_spAudioClientForStreaming" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=512, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_512_0(Etw): pattern = Struct( "object" / Int64ul, "m_u32BytesPerFrame" / Int32ul, "m_u32FramesPerSecond" / Int32ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=513, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_513_0(Etw): pattern = Struct( "object" / Int64ul, "bFirstRead" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=514, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_514_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=515, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_515_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=516, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_516_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=517, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_517_0(Etw): pattern = Struct( "object" / Int64ul, "m_bEngineStarted" / Int8ul, "m_bIsEventDriven" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=518, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_518_0(Etw): pattern = Struct( "object" / Int64ul, "m_bEngineStarted" / Int8ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=519, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_519_0(Etw): pattern = Struct( "object" / Int64ul, "bReset" / Int8ul, "m_bEngineStarted" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=520, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_520_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=521, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_521_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=522, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_522_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=523, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_523_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=524, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_524_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=525, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_525_0(Etw): pattern = Struct( "object" / Int64ul, "m_bEngineStarted" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=526, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_526_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=527, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_527_0(Etw): pattern = Struct( "object" / Int64ul, "DisconnectReason" / Int32sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=528, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_528_0(Etw): pattern = Struct( "object" / Int64ul, "u32FramesRead" / Int32ul, "u32ActualFramesInCurrentPacket" / Int32ul, "dwFlags" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=529, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_529_0(Etw): pattern = Struct( "object" / Int64ul, "fLevel" / Float32l ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=530, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_530_0(Etw): pattern = Struct( "object" / Int64ul, "bMute" / Int8ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=531, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_531_0(Etw): pattern = Struct( "object" / Int64ul, "pParentObj" / Int64ul, "dwWorkQueueId" / Int32ul, "lWorkQueuePriority" / Int32sl, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=532, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_532_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=533, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_533_0(Etw): pattern = Struct( "object" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=534, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_534_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=535, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_535_0(Etw): pattern = Struct( "object" / Int64ul, "m_u32BufferFrameCount" / Int32ul, "m_u32BytesPerFrame" / Int32ul, "m_u32FramesPerSecond" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=536, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_536_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=537, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_537_0(Etw): pattern = Struct( "object" / Int64ul, "wFormatTag" / Int32ul, "nChannels" / Int16ul, "nSamplesPerSec" / Int32ul, "nAvgBytesPerSec" / Int32ul, "nBlockAlign" / Int16ul, "wBitsPerSample" / Int16ul, "cbSize" / Int16ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=538, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_538_0(Etw): pattern = Struct( "object" / Int64ul, "wFormatTag" / Int32ul, "nChannels" / Int16ul, "nSamplesPerSec" / Int32ul, "nAvgBytesPerSec" / Int32ul, "nBlockAlign" / Int16ul, "wBitsPerSample" / Int16ul, "cbSize" / Int16ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=539, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_539_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=540, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_540_0(Etw): pattern = Struct( "object" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=541, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_541_0(Etw): pattern = Struct( "object" / Int64ul, "m_ReadySampleCount" / Int32ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=542, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_542_0(Etw): pattern = Struct( "object" / Int64ul, "m_ReadySampleCount" / Int32ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=543, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_543_0(Etw): pattern = Struct( "object" / Int64ul, "pMediaType" / Int64ul, "m_spCurrentMediaType" / Int64ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=544, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_544_0(Etw): pattern = Struct( "object" / Int64ul, "m_spCurrentMediaType" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=545, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_545_0(Etw): pattern = Struct( "object" / Int64ul, "wFormatTag" / Int32ul, "nChannels" / Int16ul, "nSamplesPerSec" / Int32ul, "nAvgBytesPerSec" / Int32ul, "nBlockAlign" / Int16ul, "wBitsPerSample" / Int16ul, "cbSize" / Int16ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=546, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_546_0(Etw): pattern = Struct( "object" / Int64ul, "guidService" / Guid, "riid" / Guid, "pvObject" / Int64ul, "hResult" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=547, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_547_0(Etw): pattern = Struct( "object" / Int64ul, "u32CurrentPadding" / Int32ul, "ulSamples" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=600, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_600_0(Etw): pattern = Struct( "object" / Int64ul, "State" / Int32sl, "ClockOffset" / Int64sl, "QPC" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=650, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_650_0(Etw): pattern = Struct( "object" / Int64ul, "SrcObject" / Int64ul, "SamplesReceived" / Int32sl, "LateSamples" / Int64sl, "TotalLateTime_ms" / Int64sl, "SampleLatency_hns" / Int64sl, "SampleTime_hns" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=651, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_651_0(Etw): pattern = Struct( "object" / Int64ul, "Node" / Int64ul, "OutputIndex" / Int32sl, "WorkQueueID" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=652, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_652_0(Etw): pattern = Struct( "object" / Int64ul, "Node" / Int64ul, "OutputIndex" / Int32sl, "WorkQueueID" / Int32ul ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=700, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_700_0(Etw): pattern = Struct( "object" / Int64ul, "Stream" / Int32sl, "SamplePtr" / Int64ul, "TimeStamp" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=701, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_701_0(Etw): pattern = Struct( "object" / Int64ul, "Stream" / Int32sl, "ES_Stream" / Int32sl, "TimeStamp" / Int64sl, "PackSize" / Int32sl, "LastPCR" / Int64sl ) @declare(guid=guid("b20e65ac-c905-4014-8f78-1b6a508142eb"), event_id=702, version=0) class Microsoft_Windows_MediaFoundation_Performance_Core_702_0(Etw): pattern = Struct( "object" / Int64ul, "PCR" / Int64sl )
30.811347
123
0.705175
7,477
66,799
6.0543
0.066069
0.090483
0.175311
0.237519
0.893876
0.89286
0.860365
0.850535
0.488844
0.486061
0
0.158144
0.17644
66,799
2,167
124
30.825565
0.664716
0.001752
0
0.425803
0
0
0.231293
0.154485
0
0
0
0
0
1
0
false
0
0.002423
0
0.311326
0
0
0
0
null
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
b7ffe72a2cd6c38d1f7db82fb92485ebe498280f
35,233
py
Python
tests/test_field.py
jfthuong/pydpf-core
bf2895ebc546e0004f759289bfc9a23196559ac3
[ "MIT" ]
18
2021-10-16T10:38:29.000Z
2022-03-29T11:26:42.000Z
tests/test_field.py
jfthuong/pydpf-core
bf2895ebc546e0004f759289bfc9a23196559ac3
[ "MIT" ]
79
2021-10-11T23:18:54.000Z
2022-03-29T14:53:14.000Z
tests/test_field.py
jfthuong/pydpf-core
bf2895ebc546e0004f759289bfc9a23196559ac3
[ "MIT" ]
5
2021-11-29T18:35:37.000Z
2022-03-16T16:49:21.000Z
import numpy as np import pytest from ansys import dpf from ansys.dpf import core from ansys.dpf.core import FieldDefinition from ansys.dpf.core import operators as ops from ansys.dpf.core.common import locations, shell_layers @pytest.fixture() def stress_field(allkindofcomplexity): model = dpf.core.Model(allkindofcomplexity) stress = model.results.stress() return stress.outputs.fields_container()[0] def test_create_field(): field = dpf.core.Field() assert field._message.id != 0 def test_create_field_from_helper_scalar(): data = np.random.random(10) field_a = dpf.core.field_from_array(data) assert np.allclose(field_a.data, data) def test_create_field_from_helper_vector(): data = np.random.random((10, 3)) field_a = dpf.core.field_from_array(data) assert np.allclose(field_a.data, data) def test_createbycopy_field(): field = dpf.core.Field() field2 = dpf.core.Field(field=field._message) assert field._message.id == field2._message.id def test_set_get_scoping(): field = dpf.core.Field() scoping = dpf.core.Scoping() ids = [1, 2, 3, 5, 8, 9, 10] scoping.ids = ids field.scoping = scoping assert field.scoping.ids == ids def test_set_get_data_field(): field = dpf.core.Field(nentities=20, nature=dpf.core.natures.scalar) scoping = dpf.core.Scoping() ids = [] data = [] for i in range(0, 20): ids.append(i + 1) data.append(i + 0.001) scoping.ids = ids field.scoping = scoping field.data = data assert np.allclose(field.data, data) def test_set_get_data_array_field(): field = dpf.core.Field(nentities=20, nature=dpf.core.natures.vector) scoping = dpf.core.Scoping() ids = [] data = [] for i in range(0, 20): ids.append(i + 1) data.append(i + 0.001) data.append(i + 0.001) data.append(i + 0.001) data = np.array(data) data = data.reshape((20, 3)) scoping.ids = ids field.scoping = scoping field.data = data assert np.allclose(field.data, data) def test_append_data_field(): field = dpf.core.Field(nentities=20, nature=dpf.core.natures.vector) for i in range(0, 20): scopingid = i + 1 scopingindex = i data = [0.01 + i, 0.02 + i, 0.03 + i] field.append(data, scopingid) scopingOut = field.scoping assert scopingOut.ids == list(range(1, 21)) for i in range(0, 20): scopingid = i + 1 scopingindex = i datain = [0.01 + i, 0.02 + i, 0.03 + i] dataout = field.get_entity_data(scopingindex) assert np.allclose(dataout, datain) def test_set_get_entity_data_array_field(): field = dpf.core.Field(nentities=20, nature=dpf.core.natures.vector) for i in range(0, 20): scopingid = i + 1 scopingindex = i data = [0.01 + i, 0.02 + i, 0.03 + i] data = np.array(data) data = data.reshape((1, 3)) field.append(data, scopingid) scopingOut = field.scoping assert scopingOut.ids == list(range(1, 21)) for i in range(0, 20): scopingid = i + 1 scopingindex = i datain = [0.01 + i, 0.02 + i, 0.03 + i] dataout = field.get_entity_data(scopingindex) assert np.allclose(dataout, datain) dataout = field.get_entity_data_by_id(scopingid) assert np.allclose(dataout, datain) # def test_get_data_ptr_field(): # field= dpf.core.Field(nentities=3, nature=dpf.core.natures.scalar, # location=dpf.core.locations.elemental_nodal) # data = [0.01,0.02,0.03] # field.set_entity_data(data,0,1) # data = [0.01,0.02,0.03,0.01,0.02,0.03] # field.set_entity_data(data,1,2) # data = [0.01,0.02,0.03,0.01] # field.set_entity_data(data,2,3) # scopingOut = field.scoping # assert scopingOut.ids == [1,2,3] # dataptr = field.data_ptr # assert dataptr == [0,3,9] def test_set_get_data_property_field(): field = core.Field(nentities=20, nature=dpf.core.natures.scalar) scoping = core.Scoping() ids = [] data = [] for i in range(0, 20): ids.append(i + 1) data.append(i + 0.001) scoping.ids = ids field.scoping = scoping field.data = data assert np.allclose(field.data, data) def test_count_field(): field = dpf.core.Field(nentities=20, nature=dpf.core.natures.scalar) scoping = dpf.core.Scoping() ids = [] data = [] for i in range(0, 20): ids.append(i + 1) data.append(i + 0.001) scoping.ids = ids field.scoping = scoping field.data = data assert field.component_count == 1 assert field.elementary_data_count == 20 assert field.size == 20 def test_resize_field(): field = dpf.core.Field(nentities=1, nature=dpf.core.natures.scalar) scoping = dpf.core.Scoping() ids = [] data = [] for i in range(0, 20): ids.append(i + 1) data.append(i + 0.001) field.resize(20, 20) scoping.ids = ids field.scoping = scoping field.data = data assert field.component_count == 1 assert field.elementary_data_count == 20 assert field.size == 20 def test_fromarray_field(): data = np.empty((100, 6)) f = dpf.core.field_from_array(data) assert f.shape == (100, 6) def test_field_definition_field(allkindofcomplexity): dataSource = dpf.core.DataSources() dataSource.set_result_file_path(allkindofcomplexity) op = dpf.core.Operator("U") op.connect(4, dataSource) fcOut = op.get_output(0, dpf.core.types.fields_container) f = fcOut[0] assert f.unit == "m" assert f.location == dpf.core.locations.nodal def test_field_definition_modif_field(allkindofcomplexity): dataSource = dpf.core.DataSources() dataSource.set_result_file_path(allkindofcomplexity) op = dpf.core.Operator("U") op.connect(4, dataSource) fcOut = op.get_output(0, dpf.core.types.fields_container) f = fcOut[0] fielddef = f.field_definition assert fielddef.unit == "m" assert fielddef.location == dpf.core.locations.nodal assert fielddef.dimensionality.nature == dpf.core.natures.vector assert fielddef.dimensionality.dim == [3] assert fielddef.shell_layers == dpf.core.shell_layers.layerindependent fielddef.unit = "mm" assert fielddef.unit == "mm" fielddef.location = dpf.core.locations.elemental assert fielddef.location == dpf.core.locations.elemental fielddef.dimensionality = dpf.core.Dimensionality.scalar_dim() assert fielddef.dimensionality.nature == dpf.core.natures.scalar assert fielddef.dimensionality.dim == [1] fielddef.dimensionality = dpf.core.Dimensionality.tensor_dim() assert fielddef.dimensionality.nature == dpf.core.natures.symmatrix assert fielddef.dimensionality.dim == [3, 3] fielddef.dimensionality = dpf.core.Dimensionality.vector_3d_dim() assert fielddef.dimensionality.nature == dpf.core.natures.vector assert fielddef.dimensionality.dim == [3] fielddef.dimensionality = dpf.core.Dimensionality.vector_dim(4) assert fielddef.dimensionality.nature == dpf.core.natures.vector assert fielddef.dimensionality.dim == [4] fielddef.shell_layers = dpf.core.shell_layers.bottom assert fielddef.shell_layers == dpf.core.shell_layers.bottom def test_field_definition_set_in_field(allkindofcomplexity): dataSource = dpf.core.DataSources() dataSource.set_result_file_path(allkindofcomplexity) op = dpf.core.Operator("U") op.connect(4, dataSource) fcOut = op.get_output(0, dpf.core.types.fields_container) f = fcOut[0] fielddef = f.field_definition fielddef.unit = "mm" fielddef.location = dpf.core.locations.elemental fielddef.dimensionality = dpf.core.Dimensionality.scalar_dim() fielddef.shell_layers = dpf.core.shell_layers.bottom f.field_definition = fielddef fielddef = f.field_definition assert fielddef.unit == "mm" assert fielddef.location == dpf.core.locations.elemental assert fielddef.dimensionality.nature == dpf.core.natures.scalar assert fielddef.dimensionality.dim == [1] assert fielddef.shell_layers == dpf.core.shell_layers.bottom assert f.unit == "mm" assert f.location == dpf.core.locations.elemental assert f.dimensionality.nature == dpf.core.natures.scalar assert f.dimensionality.dim == [1] assert f.shell_layers == dpf.core.shell_layers.bottom def test_change_field_definition_in_field(allkindofcomplexity): dataSource = dpf.core.DataSources() dataSource.set_result_file_path(allkindofcomplexity) op = dpf.core.Operator("U") op.connect(4, dataSource) fcOut = op.get_output(0, dpf.core.types.fields_container) f = fcOut[0] f.unit = "mm" f.location = dpf.core.locations.elemental f.dimensionality = dpf.core.Dimensionality.scalar_dim() f.shell_layers = dpf.core.shell_layers.bottom fielddef = f.field_definition assert fielddef.unit == "mm" assert fielddef.location == dpf.core.locations.elemental assert fielddef.dimensionality.nature == dpf.core.natures.scalar assert fielddef.dimensionality.dim == [1] assert fielddef.shell_layers == dpf.core.shell_layers.bottom assert f.unit == "mm" assert f.location == dpf.core.locations.elemental assert f.dimensionality.nature == dpf.core.natures.scalar assert f.dimensionality.dim == [1] assert f.shell_layers == dpf.core.shell_layers.bottom def test_create_overall_field(): field_overall = dpf.core.Field(nentities=1, location="overall", nature="vector") field_overall.scoping.location = "overall" field_overall.scoping.ids = [0] field_overall.data = [1.0, 2.0, 3.0] field = dpf.core.Field(nentities=5, location="nodal") field.scoping.location = "nodal" field.scoping.ids = list(range(1, 6)) data = [float(i) for i in range(0, 15)] field.data = data add = dpf.core.Operator("add") add.inputs.fieldA(field) add.inputs.fieldB(field_overall) field_added = add.outputs.field() data_added = field_added.data for i in range(0, 5): assert np.allclose(data_added[i], [i * 3.0 + 1.0, i * 3.0 + 3.0, i * 3.0 + 5.0]) def test_data_pointer_field(allkindofcomplexity): dataSource = dpf.core.DataSources() dataSource.set_result_file_path(allkindofcomplexity) op = dpf.core.Operator("S") op.connect(4, dataSource) fcOut = op.get_output(0, dpf.core.types.fields_container) data_pointer = fcOut[0]._data_pointer assert len(data_pointer) == len(fcOut[0].scoping) assert data_pointer[0] == 0 assert data_pointer[1] == 72 f = fcOut[0] data_pointer[1] = 40 f._data_pointer = data_pointer data_pointer = fcOut[0]._data_pointer assert len(data_pointer) == len(fcOut[0].scoping) assert data_pointer[0] == 0 assert data_pointer[1] == 40 def test_data_pointer_prop_field(): pfield = dpf.core.PropertyField() pfield.append([1, 2, 3], 1) pfield.append([1, 2, 3, 4], 2) pfield.append([1, 2, 3], 3) data_pointer = pfield._data_pointer assert len(data_pointer) == 3 assert data_pointer[0] == 0 assert data_pointer[1] == 3 assert data_pointer[2] == 7 data_pointer[1] = 4 pfield._data_pointer = data_pointer data_pointer = pfield._data_pointer assert len(data_pointer) == 3 assert data_pointer[0] == 0 assert data_pointer[1] == 4 assert data_pointer[2] == 7 def test_append_data_elemental_nodal_field(allkindofcomplexity): model = dpf.core.Model(allkindofcomplexity) stress = model.results.stress() f = stress.outputs.fields_container()[0] assert f.location == "ElementalNodal" f_new = dpf.core.Field( f.scoping.size, nature=dpf.core.natures.symmatrix, location=dpf.core.locations.elemental_nodal, ) size = int(f.scoping.size / 100) for i in range(0, size): f_new.append(f.get_entity_data(i), f.scoping.id(i)) for i in range(0, size): assert np.allclose(f_new.get_entity_data(i), f.get_entity_data(i)) def test_str_field(stress_field): assert "Location" in str(stress_field) assert "ElementalNodal" in str(stress_field) assert "Unit" in str(stress_field) assert "Pa" in str(stress_field) assert "9255" in str(stress_field) assert "40016" in str(stress_field) assert "6" in str(stress_field) def test_to_nodal(stress_field): assert stress_field.location == "ElementalNodal" field_out = stress_field.to_nodal() assert field_out.location == "Nodal" def test_mesh_support_field(stress_field): mesh = stress_field.meshed_region assert len(mesh.nodes.scoping) == 15129 assert len(mesh.elements.scoping) == 10292 def test_shell_layers_1(allkindofcomplexity): model = dpf.core.Model(allkindofcomplexity) stress = model.results.stress() f = stress.outputs.fields_container()[0] assert f.shell_layers == shell_layers.topbottommid model = dpf.core.Model(allkindofcomplexity) disp = model.results.displacement() f = disp.outputs.fields_container()[0] assert f.shell_layers == shell_layers.layerindependent def test_shell_layers_2(velocity_acceleration): model = dpf.core.Model(velocity_acceleration) stress = model.results.stress() f = stress.outputs.fields_container()[0] assert f.shell_layers == shell_layers.nonelayer def test_mesh_support_field_model(allkindofcomplexity): model = dpf.core.Model(allkindofcomplexity) stress = model.results.stress() f = stress.outputs.fields_container()[0] mesh = f.meshed_region assert len(mesh.nodes.scoping) == 15129 assert len(mesh.elements.scoping) == 10292 def test_delete_auto_field(): field = dpf.core.Field() field2 = dpf.core.Field(field=field) del field with pytest.raises(Exception): field2.get_ids() def test_create_and_update_field_definition(): fieldDef = FieldDefinition() assert fieldDef is not None with pytest.raises(Exception): assert fieldDef.location is None fieldDef.location = locations.nodal assert fieldDef.location == locations.nodal def test_set_support_timefreq(simple_bar): tfq = dpf.core.TimeFreqSupport() time_frequencies = dpf.core.Field( nature=dpf.core.natures.scalar, location=dpf.core.locations.time_freq ) time_frequencies.scoping.location = dpf.core.locations.time_freq_step time_frequencies.append([0.1, 0.32, 0.4], 1) tfq.time_frequencies = time_frequencies model = dpf.core.Model(simple_bar) disp = model.results.displacement() fc = disp.outputs.fields_container() field = fc[0] # initial_support = field.time_freq_support # assert initial_support is None field.time_freq_support = tfq tfq_to_check = field.time_freq_support assert np.allclose(tfq.time_frequencies.data, tfq_to_check.time_frequencies.data) def test_set_support_mesh(simple_bar): mesh = dpf.core.MeshedRegion() mesh.nodes.add_node(1, [0.0, 0.0, 0.0]) model = dpf.core.Model(simple_bar) disp = model.results.displacement() fc = disp.outputs.fields_container() field = fc[0] field.meshed_region = mesh mesh_to_check = field.meshed_region assert mesh_to_check.nodes.n_nodes == 1 assert mesh_to_check.elements.n_elements == 0 mesh.nodes.add_node(2, [1.0, 0.0, 0.0]) mesh.nodes.add_node(3, [1.0, 1.0, 0.0]) mesh.nodes.add_node(4, [0.0, 1.0, 0.0]) field.meshed_region = mesh mesh_to_check_2 = field.meshed_region assert mesh_to_check_2.nodes.n_nodes == 4 assert mesh_to_check_2.elements.n_elements == 0 def test_local_field_append(): num_entities = 400 field_to_local = dpf.core.fields_factory.create_3d_vector_field(num_entities) with field_to_local.as_local_field() as f: for i in range(1, num_entities + 1): f.append([0.1 * i, 0.2 * i, 0.3 * i], i) assert f._is_set == True field = dpf.core.fields_factory.create_3d_vector_field(num_entities) for i in range(1, num_entities + 1): field.append([0.1 * i, 0.2 * i, 0.3 * i], i) assert np.allclose(field.data, field_to_local.data) assert np.allclose(field.scoping.ids, field_to_local.scoping.ids) assert len(field_to_local._data_pointer) == 0 def test_local_elemental_nodal_field_append(): num_entities = 100 field_to_local = dpf.core.fields_factory.create_3d_vector_field( num_entities, location=dpf.core.locations.elemental_nodal ) with field_to_local.as_local_field() as f: for i in range(1, num_entities + 1): f.append([[0.1 * i, 0.2 * i, 0.3 * i], [0.1 * i, 0.2 * i, 0.3 * i]], i) field = dpf.core.fields_factory.create_3d_vector_field(num_entities) for i in range(1, num_entities + 1): field.append([[0.1 * i, 0.2 * i, 0.3 * i], [0.1 * i, 0.2 * i, 0.3 * i]], i) assert np.allclose(field.data, field_to_local.data) assert np.allclose(field.scoping.ids, field_to_local.scoping.ids) assert len(field_to_local._data_pointer) == num_entities # flat data field_to_local = dpf.core.fields_factory.create_3d_vector_field( num_entities, location=dpf.core.locations.elemental_nodal ) with field_to_local.as_local_field() as f: for i in range(1, num_entities + 1): f.append([0.1 * i, 0.2 * i, 0.3 * i, 0.1 * i, 0.2 * i, 0.3 * i], i) assert f._is_set == True assert np.allclose(field.data, field_to_local.data) assert np.allclose(field.scoping.ids, field_to_local.scoping.ids) assert len(field_to_local._data_pointer) == num_entities def test_local_array_field_append(): num_entities = 400 field_to_local = dpf.core.fields_factory.create_3d_vector_field(num_entities) with field_to_local.as_local_field() as f: for i in range(1, num_entities + 1): f.append(np.array([0.1 * i, 0.2 * i, 0.3 * i]), i) assert f._is_set is True field = dpf.core.fields_factory.create_3d_vector_field(num_entities) for i in range(1, num_entities + 1): field.append(np.array([0.1 * i, 0.2 * i, 0.3 * i]), i) assert np.allclose(field.data, field_to_local.data) assert np.allclose(field.scoping.ids, field_to_local.scoping.ids) assert len(field_to_local._data_pointer) == 0 def test_local_elemental_nodal_array_field_append(): num_entities = 100 field_to_local = dpf.core.fields_factory.create_3d_vector_field( num_entities, location=dpf.core.locations.elemental_nodal ) with field_to_local.as_local_field() as f: for i in range(1, num_entities + 1): f.append( np.array([[0.1 * i, 0.2 * i, 0.3 * i], [0.1 * i, 0.2 * i, 0.3 * i]]), i ) field = dpf.core.fields_factory.create_3d_vector_field(num_entities) for i in range(1, num_entities + 1): field.append( np.array([[0.1 * i, 0.2 * i, 0.3 * i], [0.1 * i, 0.2 * i, 0.3 * i]]), i ) assert np.allclose(field.data, field_to_local.data) assert np.allclose(field.scoping.ids, field_to_local.scoping.ids) assert len(field_to_local._data_pointer) == num_entities # flat data field_to_local = dpf.core.fields_factory.create_3d_vector_field( num_entities, location=dpf.core.locations.elemental_nodal ) with field_to_local.as_local_field() as f: for i in range(1, num_entities + 1): f.append( np.array([0.1 * i, 0.2 * i, 0.3 * i, 0.1 * i, 0.2 * i, 0.3 * i]), i ) assert np.allclose(field.data, field_to_local.data) assert np.allclose(field.scoping.ids, field_to_local.scoping.ids) assert len(field_to_local._data_pointer) == num_entities def test_local_get_entity_data(): num_entities = 100 field_to_local = dpf.core.fields_factory.create_3d_vector_field( num_entities, location=dpf.core.locations.elemental_nodal ) with field_to_local.as_local_field() as f: for i in range(1, num_entities + 1): f.append(np.array([[0.1 * i, 0.2 * i, 0.3 * i]]), i) assert np.allclose(f.get_entity_data(i - 1), [[0.1 * i, 0.2 * i, 0.3 * i]]) assert np.allclose( f.get_entity_data_by_id(i), [[0.1 * i, 0.2 * i, 0.3 * i]] ) assert hasattr(f, "_is_set") is True with field_to_local.as_local_field() as f: for i in range(1, num_entities + 1): assert np.allclose(f.get_entity_data(i - 1), [[0.1 * i, 0.2 * i, 0.3 * i]]) assert np.allclose( f.get_entity_data_by_id(i), [[0.1 * i, 0.2 * i, 0.3 * i]] ) assert hasattr(f, "_is_set") is False def test_local_elemental_nodal_get_entity_data(): num_entities = 100 field_to_local = dpf.core.fields_factory.create_3d_vector_field( num_entities, location=dpf.core.locations.elemental_nodal ) with field_to_local.as_local_field() as f: for i in range(1, num_entities + 1): f.append( np.array([[0.1 * i, 0.2 * i, 0.3 * i], [0.1 * i, 0.2 * i, 0.3 * i]]), i ) assert np.allclose( f.get_entity_data(i - 1), [[0.1 * i, 0.2 * i, 0.3 * i], [0.1 * i, 0.2 * i, 0.3 * i]], ) assert np.allclose( f.get_entity_data_by_id(i), [[0.1 * i, 0.2 * i, 0.3 * i], [0.1 * i, 0.2 * i, 0.3 * i]], ) assert hasattr(f, "_is_set") is True assert f._is_set is True with field_to_local.as_local_field() as f: for i in range(1, num_entities + 1): assert np.allclose( f.get_entity_data(i - 1), [[0.1 * i, 0.2 * i, 0.3 * i], [0.1 * i, 0.2 * i, 0.3 * i]], ) assert np.allclose( f.get_entity_data_by_id(i), [[0.1 * i, 0.2 * i, 0.3 * i], [0.1 * i, 0.2 * i, 0.3 * i]], ) assert hasattr(f, "_is_set") is False def test_auto_delete_field_local(): num_entities = 1 field_to_local = dpf.core.fields_factory.create_3d_vector_field( num_entities, location=dpf.core.locations.elemental_nodal ) field_to_local.append([3.0, 4.0, 5.0], 1) fc = dpf.core.fields_container_factory.over_time_freq_fields_container( [field_to_local] ) field_to_local = None with fc[0].as_local_field() as f: assert np.allclose(f.get_entity_data(0), [3.0, 4.0, 5.0]) def test_auto_delete_field_local2(): num_entities = 1 field_to_local = dpf.core.fields_factory.create_3d_vector_field( num_entities, location=dpf.core.locations.elemental_nodal ) f = field_to_local.as_local_field() f.append([3.0, 4.0, 5.0], 1) del f with field_to_local.as_local_field() as f: assert np.allclose(f.get_entity_data(0), [3.0, 4.0, 5.0]) def test_get_set_data_local_field(): field_to_local = dpf.core.fields_factory.create_3d_vector_field( 2, location=dpf.core.locations.elemental_nodal ) with field_to_local.as_local_field() as f: f.data = [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]] assert np.allclose(f.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) assert np.allclose(field_to_local.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) with field_to_local.as_local_field() as f: f.data = [0.1, 0.2, 0.3, 0.1, 0.2, 0.3] assert np.allclose(f.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) assert np.allclose(field_to_local.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) with field_to_local.as_local_field() as f: f.data = np.array([[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) assert np.allclose(f.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) assert np.allclose(field_to_local.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) def test_get_set_data_elemental_nodal_local_field(): field_to_local = dpf.core.fields_factory.create_3d_vector_field( 2, location=dpf.core.locations.elemental_nodal ) with field_to_local.as_local_field() as f: f.data = [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.4]] f._data_pointer = [0, 6] f.scoping_ids = [1, 2] assert np.allclose( f.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.4]] ) assert np.allclose(f._data_pointer, [0, 6]) assert np.allclose(f.get_entity_data(0), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) assert np.allclose(f.get_entity_data(1), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.4]]) assert hasattr(f, "_is_set") is True assert f._is_set is True assert np.allclose( field_to_local.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.4]], ) assert np.allclose(field_to_local._data_pointer, [0, 6]) assert np.allclose( field_to_local.get_entity_data(0), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]] ) assert np.allclose( field_to_local.get_entity_data(1), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.4]] ) with field_to_local.as_local_field() as f: f.data = [0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1, 0.2, 0.4] f._data_pointer = [0, 6] f.scoping_ids = [1, 2] assert np.allclose( f.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.4]] ) assert np.allclose(f._data_pointer, [0, 6]) assert np.allclose(f.get_entity_data(0), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) assert np.allclose(f.get_entity_data(1), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.4]]) assert hasattr(f, "_is_set") is True assert f._is_set is True assert np.allclose( field_to_local.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.4]], ) assert np.allclose(field_to_local._data_pointer, [0, 6]) assert np.allclose( field_to_local.get_entity_data(0), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]] ) assert np.allclose( field_to_local.get_entity_data(1), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.4]] ) with field_to_local.as_local_field() as f: f.data = np.array( [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.4]] ) f._data_pointer = [0, 6] f.scoping_ids = [1, 2] assert np.allclose( f.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.4]] ) assert np.allclose(f._data_pointer, [0, 6]) assert np.allclose(f.get_entity_data(0), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) assert np.allclose(f.get_entity_data(1), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.4]]) assert hasattr(f, "_is_set") is True assert f._is_set is True assert np.allclose( field_to_local.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.4]], ) assert np.allclose(field_to_local._data_pointer, [0, 6]) assert np.allclose( field_to_local.get_entity_data(0), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]] ) assert np.allclose( field_to_local.get_entity_data(1), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.4]] ) def test_get_set_scoping_local_field(): field_to_local = dpf.core.fields_factory.create_3d_vector_field( 2, location=dpf.core.locations.elemental_nodal ) with field_to_local.as_local_field() as f: f.data = [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]] f.scoping = dpf.core.Scoping(ids=[3, 4]) assert np.allclose(f.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) assert np.allclose(f.scoping_ids, [3, 4]) assert np.allclose(f.scoping.ids, [3, 4]) assert np.allclose(field_to_local.data, [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) assert np.allclose(field_to_local.scoping.ids, [3, 4]) def test_empty_data_field(): field_to_local = dpf.core.fields_factory.create_3d_vector_field(100) data = [1.0, 2.0, 3.0] field_to_local.data = data assert np.allclose(field_to_local.data, data) field_to_local.data = [] assert len(field_to_local.data) == 0 def test_set_data_numpy_array_field(): field_to_local = dpf.core.fields_factory.create_3d_vector_field(100) arr = np.arange(300).reshape(100, 3) field_to_local.data = arr assert np.allclose(field_to_local.data, arr) def test_field_huge_amount_of_data(allkindofcomplexity): # set data with a field created from a model model = dpf.core.Model(allkindofcomplexity) field = model.results.displacement().outputs.fields_container()[0] data = field.data assert len(data) == 15113 field.data = data new_data = field.data assert np.allclose(data, new_data) modif_data = data modif_data[245] = 45 modif_data[1129] = 69 modif_data[7209] = 2086 modif_data[9046] = 12 modif_data[12897] = 7894 modif_data[15112] = 2789 field.data = modif_data new_modif_data = field.data assert np.allclose(new_modif_data, modif_data) # set data with a field created from scratch field = dpf.core.Field(nature=dpf.core.natures.scalar) data = range(1, 1000000) field.data = data data_check = field.data assert np.allclose(data_check, data) modif_data = data_check modif_data[245] = 45 modif_data[10046] = 69 modif_data[1999] = 2086 modif_data[50067] = 12 modif_data[999345] = 7894 modif_data[506734] = 2789 modif_data = modif_data.tolist() field.data = modif_data new_modif_data = field.data assert np.allclose(new_modif_data, modif_data) def test_deep_copy_field(): field = dpf.core.fields_factory.create_3d_vector_field(100) arr = np.arange(300).reshape(100, 3) field.data = arr copy = field.deep_copy() iden = dpf.core.operators.logic.identical_fields(field, copy) assert iden.outputs.boolean() assert field.unit == copy.unit def test_deep_copy_elemental_nodal_field(allkindofcomplexity): model = dpf.core.Model(allkindofcomplexity) stress = model.results.stress() field = stress.outputs.fields_container()[0] copy = field.deep_copy() iden = dpf.core.operators.logic.identical_fields(field, copy) try: assert iden.outputs.boolean() except AssertionError as e: print(iden.outputs.message()) raise e mesh = field.meshed_region copy = copy.meshed_region assert copy.nodes.scoping.ids == mesh.nodes.scoping.ids assert copy.elements.scoping.ids == mesh.elements.scoping.ids assert copy.unit == mesh.unit assert np.allclose( copy.nodes.coordinates_field.data, mesh.nodes.coordinates_field.data ) assert np.allclose( copy.elements.element_types_field.data, mesh.elements.element_types_field.data ) assert np.allclose( copy.elements.connectivities_field.data, mesh.elements.connectivities_field.data ) assert np.allclose( copy.nodes.coordinates_field.scoping.ids, mesh.nodes.coordinates_field.scoping.ids, ) assert np.allclose( copy.elements.element_types_field.scoping.ids, mesh.elements.element_types_field.scoping.ids, ) assert np.allclose( copy.elements.connectivities_field.scoping.ids, mesh.elements.connectivities_field.scoping.ids, ) def test_deep_copy_over_time_field(velocity_acceleration): model = dpf.core.Model(velocity_acceleration) stress = model.results.stress(time_scoping=[1, 2, 3]) min_max = dpf.core.operators.min_max.min_max_fc(stress) field = min_max.outputs.field_max() copy = field.deep_copy() iden = dpf.core.operators.logic.identical_fields(field, copy) assert iden.outputs.boolean() tf = field.time_freq_support copy = copy.time_freq_support assert np.allclose(tf.time_frequencies.data, copy.time_frequencies.data) assert tf.time_frequencies.scoping.ids == copy.time_frequencies.scoping.ids def test_deep_copy_spec_ncomp_field(): field = dpf.core.fields_factory.create_vector_field(100, 6, dpf.core.locations.elemental) arr = np.arange(600).reshape(100, 6) field.data = arr copy = field.deep_copy() assert copy.component_count == 6 assert copy.location == dpf.core.locations.elemental def test_add_operator_field(): field = dpf.core.fields_factory.create_3d_vector_field(2) field.data = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0] field.scoping.ids = [1, 2] # field+op forward = ops.utility.forward_field(field) add = field + forward assert isinstance(add, ops.math.add) out = add.outputs.field() assert out.scoping.ids == [1, 2] assert np.allclose(out.data, np.array(field.data) * 2.0) # field + list add = field + [0.0, 1.0, 2.0] assert isinstance(add, ops.math.add) out = add.outputs.field() assert len(out) == 6 assert out.scoping.ids == [1, 2] assert np.allclose( out.data, field.data + np.array([[0.0, 1.0, 2.0], [0.0, 1.0, 2.0]]) ) # field + float add = field + 1.0 assert isinstance(add, ops.math.add) out = add.outputs.field() assert out.scoping.ids == [1, 2] assert np.allclose(out.data, np.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]])) def test_minus_operator_field(): field = dpf.core.fields_factory.create_3d_vector_field(2) field.data = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0] field.scoping.ids = [1, 2] # field-op forward = ops.utility.forward_field(field) add = field - forward assert type(add) == ops.math.minus out = add.outputs.field() assert len(out) == 6 assert out.scoping.ids == [1, 2] assert np.allclose(out.data, np.zeros((2, 3))) # fc - list add = field - [0.0, 1.0, 2.0] assert type(add) == ops.math.minus out = add.outputs.field() assert out.scoping.ids == [1, 2] assert np.allclose(out.data, np.array([[0.0, 0.0, 0.0], [3.0, 3.0, 3.0]])) # operator - float add = field - 1.0 assert type(add) == ops.math.minus out = add.outputs.field() assert out.scoping.ids == [1, 2] assert np.allclose(out.data, np.array([[-1.0, 0.0, 1.0], [2.0, 3.0, 4.0]])) def test_dot_operator_field(): field = dpf.core.fields_factory.create_3d_vector_field(2) field.data = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0] field.scoping.ids = [1, 2] # field * op forward = ops.utility.forward_field(field) add = field * forward assert type(add) == ops.math.generalized_inner_product out = add.outputs.field() assert out.scoping.ids == [1, 2] assert np.allclose(out.data, np.array([5.0, 50.0])) # field * field add = field * field assert type(add) == ops.math.generalized_inner_product out = add.outputs.field() assert out.scoping.ids == [1, 2] assert np.allclose(out.data, np.array([5.0, 50.0])) # field * list add = field * [0.0, 1.0, 2.0] assert type(add) == ops.math.generalized_inner_product out = add.outputs.field() assert out.scoping.ids == [1, 2] assert np.allclose(out.data, np.array([5.0, 14.0])) # field * float add = field * -1.0 assert type(add) == ops.math.generalized_inner_product out = add.outputs.field() assert out.scoping.ids == [1, 2] assert np.allclose(out.data, -field.data) if __name__ == "__main__": test_get_set_data_local_field()
34.918731
93
0.649079
5,563
35,233
3.930433
0.047456
0.048342
0.013309
0.017562
0.830368
0.775166
0.732998
0.700023
0.675372
0.661056
0
0.056086
0.212074
35,233
1,008
94
34.953373
0.73153
0.022621
0
0.596059
0
0
0.005348
0
0
0
0
0
0.288177
1
0.065271
false
0
0.008621
0
0.075123
0.001232
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
4d236b27ffcc9ebc18b45fd00fe02ccc06e14f9e
1,365
py
Python
tests/test_request.py
supermomonga/pybotters
8b6759844deeb1f116b317609c558e13bd35825f
[ "MIT" ]
null
null
null
tests/test_request.py
supermomonga/pybotters
8b6759844deeb1f116b317609c558e13bd35825f
[ "MIT" ]
null
null
null
tests/test_request.py
supermomonga/pybotters
8b6759844deeb1f116b317609c558e13bd35825f
[ "MIT" ]
null
null
null
import pytest_mock from yarl import URL import pybotters.auth import pybotters.request async def test_request_without_auth(mocker: pytest_mock.MockerFixture): m_auth = mocker.MagicMock(side_effect=lambda args, kwargs: args) items = { 'example.com': pybotters.auth.Item('example', m_auth), } mocker.patch.object(pybotters.auth.Hosts, 'items', items) m_sesison = mocker.MagicMock() m_sesison.__dict__['_apis'] = {} req = pybotters.request.ClientRequest( 'GET', URL('http://example.com'), params={'foo': 'bar'}, session=m_sesison, ) assert req.url == URL('http://example.com?foo=bar') assert not m_auth.called async def test_request_with_auth(mocker: pytest_mock.MockerFixture): m_auth = mocker.MagicMock(side_effect=lambda args, kwargs: args) items = { 'example.com': pybotters.auth.Item('example', m_auth), } mocker.patch.object(pybotters.auth.Hosts, 'items', items) m_sesison = mocker.MagicMock() m_sesison.__dict__['_apis'] = {'example': ('key', 'secret'.encode())} req = pybotters.request.ClientRequest( 'GET', URL('http://example.com'), params={'foo': 'bar'}, session=m_sesison, ) assert req.url == URL('http://example.com?foo=bar') assert m_auth.called
31.744186
74
0.6337
164
1,365
5.073171
0.286585
0.072115
0.052885
0.081731
0.795673
0.795673
0.795673
0.795673
0.795673
0.795673
0
0
0.221978
1,365
43
75
31.744186
0.783428
0
0
0.611111
0
0
0.134441
0
0
0
0
0
0.111111
1
0
false
0
0.111111
0
0.111111
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
4d29d4d4fa445262e5cd531b1f414d2acc79b2b8
17
py
Python
newfile.py
ndorilas2014/sfi-git-intro
8391b6ca86b46b67c7b0bb3b8d1b7f56e56d1d70
[ "MIT" ]
null
null
null
newfile.py
ndorilas2014/sfi-git-intro
8391b6ca86b46b67c7b0bb3b8d1b7f56e56d1d70
[ "MIT" ]
null
null
null
newfile.py
ndorilas2014/sfi-git-intro
8391b6ca86b46b67c7b0bb3b8d1b7f56e56d1d70
[ "MIT" ]
null
null
null
print("Heeeey")
5.666667
15
0.647059
2
17
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.117647
17
2
16
8.5
0.733333
0
0
0
0
0
0.375
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
4d5a13ca0b7daf7bc5ae5cb65670170b47ac14dc
54
py
Python
mlperf_logging/package_checker/__main__.py
mwawrzos/logging
b2609c698c28a82751d68648b0bf7b6fe8c210ea
[ "Apache-2.0" ]
48
2020-07-29T18:09:23.000Z
2021-10-09T01:53:33.000Z
mlperf_logging/package_checker/__main__.py
mwawrzos/logging
b2609c698c28a82751d68648b0bf7b6fe8c210ea
[ "Apache-2.0" ]
137
2020-12-07T19:38:47.000Z
2022-03-31T18:59:19.000Z
SIAT/benchmarks/resnet/implementations/tensorflow_open_src/mlperf_logging/package_checker/__main__.py
lablup/training_results_v0.7
f5bb59aa0f8b18b602763abe47d1d24d0d54b197
[ "Apache-2.0" ]
42
2020-08-01T06:41:24.000Z
2022-01-20T10:33:08.000Z
from . import package_checker package_checker.main()
13.5
29
0.814815
7
54
6
0.714286
0.666667
0
0
0
0
0
0
0
0
0
0
0.111111
54
3
30
18
0.875
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
4daea6f0d4d095dd6ded1cf9bb5ebd1be2ac3c28
70
py
Python
abel/tests/__init__.py
Derollez/PyAbel
c8be4ed7e8e08ee026634b9e856fb473e58d7330
[ "MIT" ]
null
null
null
abel/tests/__init__.py
Derollez/PyAbel
c8be4ed7e8e08ee026634b9e856fb473e58d7330
[ "MIT" ]
null
null
null
abel/tests/__init__.py
Derollez/PyAbel
c8be4ed7e8e08ee026634b9e856fb473e58d7330
[ "MIT" ]
1
2021-06-07T19:48:40.000Z
2021-06-07T19:48:40.000Z
from __future__ import absolute_import from .run import run, run_cli
17.5
38
0.828571
11
70
4.727273
0.545455
0
0
0
0
0
0
0
0
0
0
0
0.142857
70
3
39
23.333333
0.866667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
4df9a5cf3571eb5d6b63432e03dcbd1c3d28d7e9
150
py
Python
corehq/motech/repeaters/exceptions.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/motech/repeaters/exceptions.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/motech/repeaters/exceptions.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
class RequestConnectionError(Exception): pass class ReferralError(Exception): pass class DataRegistryCaseUpdateError(Exception): pass
13.636364
45
0.773333
12
150
9.666667
0.5
0.336207
0.310345
0
0
0
0
0
0
0
0
0
0.166667
150
10
46
15
0.928
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
1500789ebd3839f5537904b957935f2ad10010ce
216
py
Python
neet/__init__.py
dglmoore/Neet
3486ce890ff296c6dc20f1fa04a8512786faff5e
[ "MIT" ]
4
2020-04-07T14:20:02.000Z
2021-01-17T01:56:28.000Z
neet/__init__.py
akiaei/Neet
a7988575e011927cf61bf2eec7e390ae21c56cb1
[ "MIT" ]
165
2017-02-24T21:09:19.000Z
2021-12-14T04:17:01.000Z
neet/__init__.py
akiaei/Neet
a7988575e011927cf61bf2eec7e390ae21c56cb1
[ "MIT" ]
19
2017-02-15T22:01:14.000Z
2020-01-28T17:10:54.000Z
from .information import Information # noqa from .landscape import LandscapeData, LandscapeMixin # noqa from .network import Network, UniformNetwork # noqa from .statespace import StateSpace, UniformSpace # noqa
43.2
60
0.805556
23
216
7.565217
0.478261
0.137931
0
0
0
0
0
0
0
0
0
0
0.143519
216
4
61
54
0.940541
0.087963
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
150a417d087658a6d017e4b69d2fb79b2371c89a
55
py
Python
repokid/exceptions/__init__.py
nasehim7/repokid
f46767dcf88f3728701b1ff3371a97f063fb3d3b
[ "Apache-2.0" ]
null
null
null
repokid/exceptions/__init__.py
nasehim7/repokid
f46767dcf88f3728701b1ff3371a97f063fb3d3b
[ "Apache-2.0" ]
21
2019-07-01T08:51:18.000Z
2019-11-11T16:47:05.000Z
repokid/exceptions/__init__.py
isabella232/repokid_DEPRECATED
a9f4a705d5ad160c53e537638253cb0c8372d4a8
[ "Apache-2.0" ]
2
2018-10-12T18:17:43.000Z
2020-10-12T13:26:39.000Z
class UnexpectedDynamoUpdateValue(Exception): pass
18.333333
45
0.818182
4
55
11.25
1
0
0
0
0
0
0
0
0
0
0
0
0.127273
55
2
46
27.5
0.9375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
12bdb63709e9f735c2b6a1dd75d1e1a5b5e988c2
37
py
Python
Documentation/mock/lxu/command.py
9bstudios/mecco_replay
43edadd059bb2db8453b8065f2ae1cbe888923ec
[ "MIT" ]
null
null
null
Documentation/mock/lxu/command.py
9bstudios/mecco_replay
43edadd059bb2db8453b8065f2ae1cbe888923ec
[ "MIT" ]
null
null
null
Documentation/mock/lxu/command.py
9bstudios/mecco_replay
43edadd059bb2db8453b8065f2ae1cbe888923ec
[ "MIT" ]
null
null
null
class BasicCommand(object): pass
12.333333
27
0.72973
4
37
6.75
1
0
0
0
0
0
0
0
0
0
0
0
0.189189
37
2
28
18.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
12da91a4a4b6e0c99b423fbb067e542ad9729dee
233
py
Python
get_data/__init__.py
flyingjam/faces
e2bb4c66f7ef8c453911ac572ac49c68e0bb0267
[ "BSD-3-Clause" ]
null
null
null
get_data/__init__.py
flyingjam/faces
e2bb4c66f7ef8c453911ac572ac49c68e0bb0267
[ "BSD-3-Clause" ]
null
null
null
get_data/__init__.py
flyingjam/faces
e2bb4c66f7ef8c453911ac572ac49c68e0bb0267
[ "BSD-3-Clause" ]
null
null
null
from get_data.dataset_util import download_raw_dataset, convert_to_faces from get_data.get_faces import detect_face, crop_image __all__ = ('download_raw_dataset', 'convert_to_faces', 'convert_to_faces', 'detect_face', 'crop_image')
46.6
103
0.832618
36
233
4.777778
0.444444
0.156977
0.244186
0.290698
0.372093
0.372093
0
0
0
0
0
0
0.077253
233
4
104
58.25
0.8
0
0
0
0
0
0.313305
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
12ead5be5d60d3085bbdae98e45f3d71df960137
15,674
py
Python
tests/unit/test_handler_lists_2.py
MickyHCorbett/MorfLess
9761197d7767c250cc27262e1ab41adf21c59333
[ "MIT" ]
null
null
null
tests/unit/test_handler_lists_2.py
MickyHCorbett/MorfLess
9761197d7767c250cc27262e1ab41adf21c59333
[ "MIT" ]
null
null
null
tests/unit/test_handler_lists_2.py
MickyHCorbett/MorfLess
9761197d7767c250cc27262e1ab41adf21c59333
[ "MIT" ]
null
null
null
import unittest import libraries.morflessLibs as libs # import test values and expected outputs # main includes sidebar data from unit.lists_test_io.lists_supplemental import POSTLIST_1, CONTACT_PAGE_POST from unit.lists_test_io.lists_supplemental import TEMPLATE_SEARCH_CONTENT from unit.lists_test_io.lists_supplemental import TEMPLATE_POSTS, TEMPLATE_INDEX from unit.lists_test_io.lists_supplemental import AUTHORS_1, ARCHIVE_1 from fixtures.decorators import testCall class ListsHandler2Case(unittest.TestCase): # set up and tear down reset to default settings def setUp(self): self.maxDiff= None self.settings = libs.string_processes.pcom_build_dictionary(libs.globals.DEFAULT_SETTINGS) def tearDown(self): self.settings = dict() @testCall def test_pcom_order_postlist_posts(self): print('\nTest 1: pcom_order_postlist_posts - highest first\n') posts = POSTLIST_1['posts'] result = libs.lists.pcom_order_postlist_posts(posts,up_down=True) print(result) # check index for ind,post in enumerate(result): with self.subTest(msg='Highest first = '+str(ind+1)): post_index = len(result) - ind self.assertEqual(post['index'],post_index) print(f"Post {post['postname']} index {post['index']}") print('\nTest 2: pcom_order_postlist_posts - lowest first\n') posts = POSTLIST_1['posts'] result = libs.lists.pcom_order_postlist_posts(posts,up_down=False) print(result) # check index for ind,post in enumerate(result): with self.subTest(msg='Lowest first = '+str(ind+1)): post_index = ind + 1 self.assertEqual(post['index'],post_index) print(f"Post {post['postname']} index {post['index']}") @testCall def test_pcom_find_post(self): print('\nTest 1: pcom_find_post - contact.page\n') result = libs.lists.pcom_find_post(POSTLIST_1,'contact.page') print(result) # check description self.assertEqual(result['description'],'Morfless Contact page') self.assertNotEqual(result['description'],'A new post about something again') self.assertEqual(result,CONTACT_PAGE_POST) print('\nTest 2: pcom_find_post - test3.post\n') result = libs.lists.pcom_find_post(POSTLIST_1,'test3.post') print(result) # check description self.assertEqual(result['description'],'A new post about something again') self.assertNotEqual(result['description'],'Morfless Contact page') @testCall def test_pcom_find_template_search_content(self): print('\nTest 1: pcom_find_template_search_content - posts.page\n') test_settings = self.settings test_settings['template_search_content'] = TEMPLATE_SEARCH_CONTENT result = libs.lists.pcom_find_template_search_content(test_settings,'posts.page') print(result) # check content self.assertEqual(result,TEMPLATE_POSTS) print('\nTest 2: pcom_find_template_search_content - index.page\n') test_settings = self.settings test_settings['template_search_content'] = TEMPLATE_SEARCH_CONTENT result = libs.lists.pcom_find_template_search_content(test_settings,'index.page') print(result) # check content self.assertEqual(result,TEMPLATE_INDEX) print('\nTest 3: pcom_find_template_search_content - template.page - not in list\n') test_settings = self.settings test_settings['template_search_content'] = TEMPLATE_SEARCH_CONTENT result = libs.lists.pcom_find_template_search_content(test_settings,'template.page') print(result) # check content self.assertEqual(result,{'name': libs.constants.PCOM_NO_ENTRY }) @testCall def test_pcom_find_sub_list(self): print('\nTest 1: test_pcom_find_sub_list - no posts\n') result = libs.lists.pcom_find_sub_list([],[],'categories','something',type='post',get_all=False) print(f"Sub list: {result}") # check content self.assertEqual(result,[]) print('\nTest 2: test_pcom_find_sub_list - all posts for "things to write about"\n') sub_type = "things to write about" result = libs.lists.pcom_find_sub_list(POSTLIST_1['posts'],AUTHORS_1,'categories',sub_type,'post',False) # check content check_list = ['test1.post'] for ind,post in enumerate(result): with self.subTest(msg='Post in list: '+str(ind+1)): self.assertEqual(post['postname'],check_list[ind]) print(f"Post {post['postname']}") print('\nTest 3: test_pcom_find_sub_list - all posts for "things to write about" but type = txt\n') sub_type = "things to write about" result = libs.lists.pcom_find_sub_list(POSTLIST_1['posts'],AUTHORS_1,'categories',sub_type,'txt',False) print(f"Sub list: {result}") # check content self.assertEqual(result,[]) print("\nTest 4: test_pcom_find_sub_list - all posts for author Jim O'Neill\n") sub_type = "Jim O'Neill" result = libs.lists.pcom_find_sub_list(POSTLIST_1['posts'],AUTHORS_1,'authors',sub_type,'post',False) # check content check_list = ['about-this.post'] for ind,post in enumerate(result): with self.subTest(msg='Post in list: '+str(ind+1)): self.assertEqual(post['postname'],check_list[ind]) print(f"Post {post['postname']}") print("\nTest 5: test_pcom_find_sub_list - all entries for author Jim O'Neill\n") sub_type = "Jim O'Neill" result = libs.lists.pcom_find_sub_list(POSTLIST_1['posts'],AUTHORS_1,'authors',sub_type,'post',True) # check content check_list = ['about.page','about-this.post'] for ind,post in enumerate(result): with self.subTest(msg='Post in list: '+str(ind+1)): self.assertEqual(post['postname'],check_list[ind]) print(f"Post {post['postname']}") print("\nTest 6: test_pcom_find_sub_list - all entries for author Jim O'Neill but using shortname\n") sub_type = "Jimbo" result = libs.lists.pcom_find_sub_list(POSTLIST_1['posts'],AUTHORS_1,'authors',sub_type,'post',True) # check content check_list = ['about.page','about-this.post'] for ind,post in enumerate(result): with self.subTest(msg='Post in list: '+str(ind+1)): self.assertEqual(post['postname'],check_list[ind]) print(f"Post {post['postname']}") print("\nTest 7: test_pcom_find_sub_list - all pages for author Micky H Corbett but using shortname\n") sub_type = "Micky" result = libs.lists.pcom_find_sub_list(POSTLIST_1['posts'],AUTHORS_1,'authors',sub_type,'page',False) # check content check_list = ['contact.page'] for ind,post in enumerate(result): with self.subTest(msg='Post in list: '+str(ind+1)): self.assertEqual(post['postname'],check_list[ind]) print(f"Post {post['postname']}") @testCall def test_pcom_find_sub_list_archive(self): print('\nTest 1: test_pcom_find_sub_list archive - no posts\n') no_archive = {'created': []} type = '' result = libs.lists.pcom_find_sub_list_archive(no_archive,POSTLIST_1,'10-2018',type) self.assertEqual(result,[]) print(f"Sub list: {result}") print('\nTest 2: test_pcom_find_sub_list archive - 10-2018\n') result = libs.lists.pcom_find_sub_list_archive(ARCHIVE_1,POSTLIST_1,'10-2018',type) # check content check_list = ['test3.post'] no_check_list = ['about.page'] for ind,post in enumerate(result): with self.subTest(msg='Post in list: '+str(ind+1)): self.assertEqual(post['postname'],check_list[ind]) print(f"Post {post['postname']}") for ind,post in enumerate(result): with self.subTest(msg='Post not in list: '+str(ind+1)): self.assertNotEqual(post['postname'],no_check_list[ind]) print(f"Entry {no_check_list[ind]} not in list") print(f"Sub list: {result}") print('\nTest 3: test_pcom_find_sub_list archive - no posts for entry name\n') type = 'page' result = libs.lists.pcom_find_sub_list_archive(ARCHIVE_1,POSTLIST_1,'67-000',type) self.assertEqual(result,[]) print(f"Sub list: {result}") @testCall def test_pcom_create_posts_pages_array(self): print('\nTest 1: pcom_create_posts_pages_array - no posts\n') posts = [] type = True result = libs.lists.pcom_create_posts_pages_array(posts,type) self.assertEqual(result,[]) print(f"Sub list: {result}") print('\nTest 2: pcom_create_posts_pages_array - posts array\n') type = True result = libs.lists.pcom_create_posts_pages_array(POSTLIST_1['posts'],type) print(f"Sub list: {result}") # check content check_list = ['test3.post', 'test2.post', 'test1.post', 'about-this.post'] no_check_list = ['contact.page','about.page'] for ind,post in enumerate(result): with self.subTest(msg='Post in list: '+str(ind+1)): self.assertEqual(post['postname'],check_list[ind]) print(f"Post {post['postname']}") for ind,post in enumerate(no_check_list): with self.subTest(msg='Post not in list: '+str(ind+1)): self.assertNotIn(no_check_list[ind],result) print(f"Entry {no_check_list[ind]} not in list") print('\nTest 3: pcom_create_posts_pages_array - pages array\n') type = False result = libs.lists.pcom_create_posts_pages_array(POSTLIST_1['posts'],type) print(f"Sub list: {result}") # check content no_check_list = ['test3.post', 'test2.post', 'test1.post', 'about-this.post'] check_list = ['contact.page','about.page'] for ind,post in enumerate(result): with self.subTest(msg='Post in list: '+str(ind+1)): self.assertEqual(post['postname'],check_list[ind]) print(f"Post {post['postname']}") for ind,post in enumerate(no_check_list): with self.subTest(msg='Post not in list: '+str(ind+1)): self.assertNotIn(no_check_list[ind],result) print(f"Entry {no_check_list[ind]} not in list") @testCall def test_pcom_calculate_posts_per_page(self): print('\nTest 1: pcom_calculate_posts_per_page - no_posts=9, posts_per_page=0, no_of_pages=1\n') no_posts = 0 posts_per_page = 0 no_of_pages = 1 result = libs.lists.pcom_calculate_posts_per_page(no_posts,posts_per_page) print(f"No of pages: {result}") self.assertEqual(result,no_of_pages) print('\nTest 2: pcom_calculate_posts_per_page - no_posts=7, posts_per_page=1, no_of_pages=7\n') no_posts = 7 posts_per_page = 1 no_of_pages = 7 result = libs.lists.pcom_calculate_posts_per_page(no_posts,posts_per_page) print(f"No of pages: {result}") self.assertEqual(result,no_of_pages) print('\nTest 3: pcom_calculate_posts_per_page - no_posts=9, posts_per_page=2, no_of_pages=5\n') no_posts = 9 posts_per_page = 2 no_of_pages = 5 result = libs.lists.pcom_calculate_posts_per_page(no_posts,posts_per_page) print(f"No of pages: {result}") self.assertEqual(result,no_of_pages) print('\nTest 4: pcom_calculate_posts_per_page - no_posts=4, posts_per_page=2, no_of_pages=2\n') no_posts = 4 posts_per_page = 2 no_of_pages = 2 result = libs.lists.pcom_calculate_posts_per_page(no_posts,posts_per_page) print(f"No of pages: {result}") self.assertEqual(result,no_of_pages) @testCall def test_pcom_find_sticky_posts(self): sticky_ind = libs.constants.PCOM_POST_LIST_STICKY_INDICATOR print('\nTest 1: pcom_find_sticky_posts - no sticky marker - no manual sticky\n') content_list = "test1.post, test2.post, test3.post" test_posts_out = ['test1.post', 'test2.post', 'test3.post'] test_sticky_out = [] posts_out,sticky_out = libs.lists.pcom_find_sticky_posts(content_list,manual_sticky=False) print(f"Posts list: {posts_out}") print(f"Sticky list: {sticky_out}") self.assertEqual(posts_out,test_posts_out) self.assertEqual(sticky_out,test_sticky_out) print('\nTest 2: pcom_find_sticky_posts - sticky marker - no manual sticky\n') content_list = f"{sticky_ind}test1.post, test2.post, test3.post" test_posts_out = [f"{sticky_ind}test1.post", 'test2.post', 'test3.post'] test_sticky_out = [] posts_out,sticky_out = libs.lists.pcom_find_sticky_posts(content_list,manual_sticky=False) print(f"Posts list: {posts_out}") print(f"Sticky list: {sticky_out}") self.assertEqual(posts_out,test_posts_out) self.assertEqual(sticky_out,test_sticky_out) print('\nTest 3: pcom_find_sticky_posts - sticky marker - manual sticky\n') content_list = f"{sticky_ind}test1.post, test2.post, test3.post" test_posts_out = ['test2.post', 'test3.post'] test_sticky_out = ["test1.post"] posts_out,sticky_out = libs.lists.pcom_find_sticky_posts(content_list,manual_sticky='True') print(f"Posts list: {posts_out}") print(f"Sticky list: {sticky_out}") self.assertEqual(posts_out,test_posts_out) self.assertEqual(sticky_out,test_sticky_out) print('\nTest 4: pcom_find_sticky_posts - no posts - manual sticky\n') content_list = '' test_posts_out = [''] test_sticky_out = [] posts_out,sticky_out = libs.lists.pcom_find_sticky_posts(content_list,manual_sticky='True') print(f"Posts list: {posts_out}") print(f"Sticky list: {sticky_out}") self.assertEqual(posts_out,test_posts_out) self.assertEqual(sticky_out,test_sticky_out) @testCall def test_pcom_find_sticky_posts_by_meta(self): print('\nTest 1: pcom_find_sticky_posts_by_meta - no posts\n') posts = [] test_posts_out = [] test_sticky_out = [] posts_out,sticky_out = libs.lists.pcom_find_sticky_posts_by_meta(posts) print(f"Posts list: {posts_out}") print(f"Sticky list: {sticky_out}") self.assertEqual(posts_out,test_posts_out) self.assertEqual(sticky_out,test_sticky_out) print('\nTest 2: pcom_find_sticky_posts_by_meta - posts\n') test_posts_out = ['contact.page','test3.post','about.page', 'test2.post'] test_sticky_out = ['test1.post', 'about-this.post'] posts_out,sticky_out = libs.lists.pcom_find_sticky_posts_by_meta(POSTLIST_1['posts']) for ind,post in enumerate(posts_out): with self.subTest(msg='Post in posts list: '+str(ind+1)): self.assertEqual(post['postname'],test_posts_out[ind]) print(f"Post in posts list: {post['postname']}") for ind,post in enumerate(sticky_out): with self.subTest(msg='Post in sticky list: '+str(ind+1)): self.assertEqual(post['postname'],test_sticky_out[ind]) print(f"Post in sticky list: {post['postname']}") if __name__ == '__main__': unittest.main()
42.134409
112
0.650632
2,137
15,674
4.508657
0.069724
0.039855
0.040477
0.047327
0.867047
0.811417
0.774572
0.73451
0.679502
0.613389
0
0.012575
0.22885
15,674
371
113
42.247978
0.784562
0.022649
0
0.527473
0
0.003663
0.282717
0.056674
0
0
0
0
0.153846
1
0.040293
false
0
0.025641
0
0.069597
0.271062
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
424b949c96320196c1adb5bfd50d75b6a790f3f8
3,552
py
Python
tests/test_06_math/test_640_bbox.py
luoyu-123/ezdxf
40963a2010028f87846241e08434f43ab421f3fb
[ "MIT" ]
1
2021-06-05T09:15:15.000Z
2021-06-05T09:15:15.000Z
tests/test_06_math/test_640_bbox.py
luoyu-123/ezdxf
40963a2010028f87846241e08434f43ab421f3fb
[ "MIT" ]
null
null
null
tests/test_06_math/test_640_bbox.py
luoyu-123/ezdxf
40963a2010028f87846241e08434f43ab421f3fb
[ "MIT" ]
null
null
null
# Copyright (c) 2019-2020, Manfred Moitzi # License: MIT License from ezdxf.math import BoundingBox, BoundingBox2d class TestBoundingBox: def test_init(self): bbox = BoundingBox([(0, 0, 0), (10, 10, 10)]) assert bbox.extmin == (0, 0, 0) assert bbox.extmax == (10, 10, 10) bbox = BoundingBox([(10, 10, 10), (0, 0, 0)]) assert bbox.extmin == (0, 0, 0) assert bbox.extmax == (10, 10, 10) bbox = BoundingBox([(7, -2, 9), (-1, 8, -3)]) assert bbox.extmin == (-1, -2, -3) assert bbox.extmax == (7, 8, 9) def test_init_none(self): bbox = BoundingBox() assert bbox.has_data is False bbox.extend([(0, 0, 0), (10, 10, 10)]) assert bbox.size == (10, 10, 10) assert bbox.has_data is True def test_inside(self): bbox = BoundingBox([(0, 0, 0), (10, 10, 10)]) assert bbox.inside((0, 0, 0)) is True assert bbox.inside((-1, 0, 0)) is False assert bbox.inside((0, -1, 0)) is False assert bbox.inside((0, 0, -1)) is False assert bbox.inside((5, 5, 5)) is True assert bbox.inside((10, 10, 10)) is True assert bbox.inside((11, 10, 10)) is False assert bbox.inside((10, 11, 10)) is False assert bbox.inside((10, 10, 11)) is False def test_extend(self): bbox = BoundingBox([(0, 0, 0), (10, 10, 10)]) bbox.extend([(5, 5, 5)]) assert bbox.extmin == (0, 0, 0) assert bbox.extmax == (10, 10, 10) bbox.extend([(15, 16, 17)]) assert bbox.extmin == (0, 0, 0) assert bbox.extmax == (15, 16, 17) bbox.extend([(-15, -16, -17)]) assert bbox.extmin == (-15, -16, -17) assert bbox.extmax == (15, 16, 17) def test_size(self): bbox = BoundingBox([(-2, -2, -2), (8, 8, 8)]) assert bbox.size == (10, 10, 10) def test_center(self): bbox = BoundingBox([(-1, -1, -1), (9, 9, 9)]) assert bbox.center == (4, 4, 4) class TestBoundingBox2d: def test_init(self): bbox = BoundingBox2d([(0, 0), (10, 10)]) assert bbox.extmin == (0, 0) assert bbox.extmax == (10, 10) bbox = BoundingBox2d([(7, -2), (-1, 8)]) assert bbox.extmin == (-1, -2) assert bbox.extmax == (7, 8) def test_init_none(self): bbox = BoundingBox2d() assert bbox.has_data is False bbox.extend([(0, 0), (10, 10)]) assert bbox.size == (10, 10) assert bbox.has_data is True def test_inside(self): bbox = BoundingBox2d([(0, 0), (10, 10)]) assert bbox.inside((0, 0)) is True assert bbox.inside((-1, 0)) is False assert bbox.inside((0, -1)) is False assert bbox.inside((5, 5)) is True assert bbox.inside((10, 10)) is True assert bbox.inside((11, 10)) is False assert bbox.inside((10, 11)) is False def test_extend(self): bbox = BoundingBox2d([(0, 0), (10, 10)]) bbox.extend([(5, 5)]) assert bbox.extmin == (0, 0) assert bbox.extmax == (10, 10) bbox.extend([(15, 16)]) assert bbox.extmin == (0, 0) assert bbox.extmax == (15, 16) bbox.extend([(-15, -16)]) assert bbox.extmin == (-15, -16) assert bbox.extmax == (15, 16) def test_size(self): bbox = BoundingBox2d([(-2, -2), (8, 8)]) assert bbox.size == (10, 10) def test_center(self): bbox = BoundingBox2d([(-1, -1), (9, 9)]) assert bbox.center == (4, 4)
31.157895
53
0.523086
506
3,552
3.636364
0.096838
0.26087
0.13913
0.026087
0.864674
0.775
0.725543
0.599457
0.464674
0.253804
0
0.124346
0.300394
3,552
113
54
31.433628
0.616097
0.016892
0
0.488372
0
0
0
0
0
0
0
0
0.55814
1
0.139535
false
0
0.011628
0
0.174419
0
0
0
0
null
1
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
5
424d056709e2240e252282aed11a8db1a1ccdfce
141
py
Python
boa3_test/test_sc/function_test/CallFunctionWrittenBefore.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
25
2020-07-22T19:37:43.000Z
2022-03-08T03:23:55.000Z
boa3_test/test_sc/function_test/CallFunctionWrittenBefore.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
419
2020-04-23T17:48:14.000Z
2022-03-31T13:17:45.000Z
boa3_test/test_sc/function_test/CallFunctionWrittenBefore.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
15
2020-05-21T21:54:24.000Z
2021-11-18T06:17:24.000Z
from boa3.builtin import public def TestAdd(a: int, b: int) -> int: return a + b @public def Main() -> int: return TestAdd(1, 2)
12.818182
35
0.617021
23
141
3.782609
0.608696
0.206897
0
0
0
0
0
0
0
0
0
0.028302
0.248227
141
10
36
14.1
0.792453
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.333333
0.833333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
424e21925da4ce704b73c57c587e88ba3b4c52c7
105
py
Python
backend/applications/models/__init__.py
simonfong6/applications
dea9e324f33b3647ab8e1fcf01f67b37e20e37a9
[ "MIT" ]
null
null
null
backend/applications/models/__init__.py
simonfong6/applications
dea9e324f33b3647ab8e1fcf01f67b37e20e37a9
[ "MIT" ]
null
null
null
backend/applications/models/__init__.py
simonfong6/applications
dea9e324f33b3647ab8e1fcf01f67b37e20e37a9
[ "MIT" ]
null
null
null
from .user import User from .users_jobs import UserJob from .company import Company from .job import Job
21
31
0.809524
17
105
4.941176
0.470588
0
0
0
0
0
0
0
0
0
0
0
0.152381
105
4
32
26.25
0.94382
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
427c8e5824acadb87bdcd65b39e0b82618638a3a
268
py
Python
src/pythae/samplers/vamp_sampler/vamp_sampler_config.py
clementchadebec/benchmark_VAE
943e231f9e5dfa40b4eec14d4536f1c229ad9be1
[ "Apache-2.0" ]
143
2021-10-17T08:43:33.000Z
2022-03-31T11:10:53.000Z
src/pythae/samplers/vamp_sampler/vamp_sampler_config.py
eknag/benchmark_VAE
8b727f29a68aff7771c4c97aff15f75f88320e1f
[ "Apache-2.0" ]
6
2022-01-21T17:40:09.000Z
2022-03-16T13:09:22.000Z
src/pythae/samplers/vamp_sampler/vamp_sampler_config.py
eknag/benchmark_VAE
8b727f29a68aff7771c4c97aff15f75f88320e1f
[ "Apache-2.0" ]
18
2021-12-16T15:17:08.000Z
2022-03-15T01:30:13.000Z
from pydantic.dataclasses import dataclass from ...samplers import BaseSamplerConfig @dataclass class VAMPSamplerConfig(BaseSamplerConfig): """This is the VAMP prior sampler configuration instance deriving from :class:`BaseSamplerConfig`. """ pass
20.615385
74
0.764925
26
268
7.884615
0.730769
0
0
0
0
0
0
0
0
0
0
0
0.164179
268
12
75
22.333333
0.915179
0.354478
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.2
0.4
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
5
35ecaa664e18f71dc3395d7f3d9a41a58509397b
241
py
Python
rltorch/action_selector/__init__.py
Brandon-Rozek/rltorch
cb87105305315c5df4cae91fee0ee54b981bc04b
[ "MIT" ]
null
null
null
rltorch/action_selector/__init__.py
Brandon-Rozek/rltorch
cb87105305315c5df4cae91fee0ee54b981bc04b
[ "MIT" ]
null
null
null
rltorch/action_selector/__init__.py
Brandon-Rozek/rltorch
cb87105305315c5df4cae91fee0ee54b981bc04b
[ "MIT" ]
null
null
null
from .ArgMaxSelector import ArgMaxSelector from .EpsilonGreedySelector import EpsilonGreedySelector from .IdentitySelector import IdentitySelector from .RandomSelector import RandomSelector from .StochasticSelector import StochasticSelector
40.166667
56
0.896266
20
241
10.8
0.35
0
0
0
0
0
0
0
0
0
0
0
0.082988
241
5
57
48.2
0.977376
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
0
0
0
5
c41efad892b4f2b3d7067a042a592ef7e04ede4c
188
py
Python
tests/common.py
thep0y/up2b
667874c642241483c92d59331badbb2aaa8b37da
[ "MIT" ]
7
2021-05-13T10:13:32.000Z
2021-12-17T11:45:19.000Z
tests/common.py
thep0y/timg
15b9472c2407f0af4d3d9eaaee431da566881a95
[ "MIT" ]
1
2021-03-16T01:25:28.000Z
2021-03-16T02:20:25.000Z
tests/common.py
thep0y/up2b
667874c642241483c92d59331badbb2aaa8b37da
[ "MIT" ]
1
2021-02-15T08:52:48.000Z
2021-02-15T08:52:48.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: thepoy # @Email: thepoy@163.com # @File Name: common.py (c) 2021 # @Created: 2021-06-18 11:08:33 # @Modified: 2021-06-18 11:08:45
23.5
32
0.62766
33
188
3.575758
0.787879
0.101695
0.135593
0.169492
0.20339
0
0
0
0
0
0
0.225
0.148936
188
7
33
26.857143
0.5125
0.925532
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
c4285d211c1ee37ca15a2d09aec994643a738d1f
118
py
Python
python_modules/libraries/dagster-aws/dagster_aws/s3/solids.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
python_modules/libraries/dagster-aws/dagster_aws/s3/solids.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
python_modules/libraries/dagster-aws/dagster_aws/s3/solids.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
# pylint: disable=unused-import # Keep module for legacy backcompat from .ops import S3Coordinate, file_handle_to_s3
23.6
48
0.813559
17
118
5.470588
0.941176
0
0
0
0
0
0
0
0
0
0
0.019417
0.127119
118
4
49
29.5
0.883495
0.533898
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c42be9607ec228cb619961c16762cf9d4194d1f6
19
py
Python
samples/LuceneInAction/lia/analysis/__init__.py
romanchyla/pylucene-trunk
990079ff0c76b972ce5ef2bac9b85334a0a1f27a
[ "Apache-2.0" ]
15
2015-05-21T09:28:01.000Z
2022-03-18T23:41:49.000Z
samples/LuceneInAction/lia/analysis/__init__.py
fnp/pylucene
fb16ac375de5479dec3919a5559cda02c899e387
[ "Apache-2.0" ]
1
2021-09-30T03:59:43.000Z
2021-09-30T03:59:43.000Z
samples/LuceneInAction/lia/analysis/__init__.py
romanchyla/pylucene-trunk
990079ff0c76b972ce5ef2bac9b85334a0a1f27a
[ "Apache-2.0" ]
13
2015-04-18T23:05:11.000Z
2021-11-29T21:23:26.000Z
# analysis package
9.5
18
0.789474
2
19
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.157895
19
1
19
19
0.9375
0.842105
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
c43db20a62e821d1331f0a38e6781418545dd772
160
py
Python
python/bisect_user.py
seckcoder/lang-learn
1e0d6f412bbd7f89b1af00293fd907ddb3c1b571
[ "Unlicense" ]
1
2017-10-14T04:23:45.000Z
2017-10-14T04:23:45.000Z
python/bisect_user.py
seckcoder/lang-learn
1e0d6f412bbd7f89b1af00293fd907ddb3c1b571
[ "Unlicense" ]
null
null
null
python/bisect_user.py
seckcoder/lang-learn
1e0d6f412bbd7f89b1af00293fd907ddb3c1b571
[ "Unlicense" ]
null
null
null
import bisect a = [10, 2, 8, 20, 25, 7, 3, 19, 10, 10, 2, 7, 6, 5, 82, 3, 49] a.sort() print a print bisect.bisect_left(a, 5) print bisect.bisect_right(a, 5)
17.777778
63
0.6125
36
160
2.666667
0.527778
0.0625
0.354167
0
0
0
0
0
0
0
0
0.210938
0.2
160
8
64
20
0.539063
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.166667
null
null
0.5
0
0
0
null
0
1
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
c4463b0d47c8a72769834355e17ff011e927b852
128
py
Python
uygulama/admin.py
onurbyrl/psikonline
6f2ba97797135e69585167b6db2b6ce7c3520714
[ "MIT" ]
3
2022-03-02T14:51:09.000Z
2022-03-12T20:58:17.000Z
uygulama/admin.py
onurbyrl/psikonline
6f2ba97797135e69585167b6db2b6ce7c3520714
[ "MIT" ]
null
null
null
uygulama/admin.py
onurbyrl/psikonline
6f2ba97797135e69585167b6db2b6ce7c3520714
[ "MIT" ]
null
null
null
from django.contrib import admin # from uygulama.models import Kayit # Register your models here. # admin.site.register(Kayit)
21.333333
35
0.789063
18
128
5.611111
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.132813
128
6
36
21.333333
0.90991
0.679688
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c4616e8ade179436344b4d1585613e2bdbd80f70
8,314
py
Python
tests/src/app_service_tests.py
ahuyuktepe/cmd-exec
835037a4b7784d4901bf35db5eaa88a0757c5ce9
[ "MIT" ]
null
null
null
tests/src/app_service_tests.py
ahuyuktepe/cmd-exec
835037a4b7784d4901bf35db5eaa88a0757c5ce9
[ "MIT" ]
1
2021-06-07T21:25:52.000Z
2021-06-07T21:25:52.000Z
tests/src/app_service_tests.py
ahuyuktepe/cmd-exec
835037a4b7784d4901bf35db5eaa88a0757c5ce9
[ "MIT" ]
null
null
null
import pytest from cmd_exec.builder.AppContextBuilder import AppContextBuilder from cmd_exec.context.AppContext import AppContext from cmd_exec.error.CmdExecError import CmdExecError from tests.src.utils.TestUtil import TestUtil class TestAppService: def setup_method(method): TestUtil.setupTestingEnvironment() def teardown_method(method): TestUtil.destroyTestingEnvironment() def test_invalid_service_props(self): TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': '-' }) with pytest.raises(CmdExecError) as errInfo: AppContextBuilder.buildBaseAppContext() error: CmdExecError = errInfo.value assert error.getCode() == 'ERR24' def test_invalid_service_props_1(self): TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [{'id': None}] }) with pytest.raises(CmdExecError) as errInfo: AppContextBuilder.buildBaseAppContext() error: CmdExecError = errInfo.value assert error.getCode() == 'ERR23' def test_invalid_service_props_2(self): TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [{'id': ''}] }) with pytest.raises(CmdExecError) as errInfo: AppContextBuilder.buildBaseAppContext() error: CmdExecError = errInfo.value assert error.getCode() == 'ERR23' def test_invalid_service_props_3(self): TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [{'id': 'test'}] }) with pytest.raises(CmdExecError) as errInfo: AppContextBuilder.buildBaseAppContext() error: CmdExecError = errInfo.value assert error.getCode() == 'ERR23' def test_invalid_service_props_4(self): TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [{'id': 'test'}] }) with pytest.raises(CmdExecError) as errInfo: AppContextBuilder.buildBaseAppContext() error: CmdExecError = errInfo.value assert error.getCode() == 'ERR23' def test_service_init(self): # Given TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [ {'id': 'testService', 'class': 'TestService'} ] }) TestUtil.useServicesInModule(['TestService'], 'test') # When appContext: AppContext = AppContextBuilder.buildBaseAppContext() # Then service = appContext.getService('testService') assert service is not None and service.getName() == 'TestService' def test_service_init_1(self): # Given TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [ {'id': 'testService', 'path': 'modules.test.src.service.TestService'} ] }) TestUtil.useServicesInModule(['TestService'], 'test') # When appContext: AppContext = AppContextBuilder.buildBaseAppContext() # Then service = appContext.getService('testService') assert service is not None and service.getName() == 'TestService' def test_service_init_2(self): # Given TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [ { 'id': 'testService', 'init': True, 'path': 'modules.test.src.service.TestService' } ] }) TestUtil.useServicesInModule(['TestService'], 'test') # When appContext: AppContext = AppContextBuilder.buildBaseAppContext() # Then service = appContext.getService('testService') assert service is not None and service.getName() == 'TestService' def test_service_init_3(self): # Given TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [ {'id': 'testService1', 'class': 'TestService1'} ] }) TestUtil.useServicesInModule(['TestService1'], 'test') TestUtil.useConfigFilesInConfigsDir(['main.config.yaml']) # When appContext: AppContext = AppContextBuilder.buildBaseAppContext() # Then service = appContext.getService('testService1') assert service is not None and service.getAppName() == 'Main Application' def test_appconfigs_injection_into_service(self): # Given TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [ {'id': 'testService4', 'class': 'TestService4', 'args': ['appConfigs']} ] }) TestUtil.useServicesInModule(['TestService4'], 'test') TestUtil.useConfigFilesInConfigsDir(['main.config.yaml']) # When appContext: AppContext = AppContextBuilder.buildBaseAppContext() # Then service = appContext.getService('testService4') assert service is not None and service.getAppName() == 'Main Application' def test_service_not_extending_from_app_service(self): # Given TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [ {'id': 'testService5', 'class': 'TestService5'} ] }) TestUtil.useServicesInModule(['TestService5'], 'test') with pytest.raises(CmdExecError) as err: appContext: AppContext = AppContextBuilder.buildBaseAppContext() appContext.getService('testService5') error: CmdExecError = err.value assert error.getCode() == 'ERR28' def test_service_not_extending_from_app_service_with_init_true(self): # Given TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [ {'id': 'testService5', 'class': 'TestService5', 'init': True} ] }) TestUtil.useServicesInModule(['TestService5'], 'test') with pytest.raises(CmdExecError) as err: AppContextBuilder.buildBaseAppContext() error: CmdExecError = err.value assert error.getCode() == 'ERR28' def test_service_injecting_nested_services(self): # Given TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [ {'id': 'testService', 'class': 'TestService'}, {'id': 'testService3', 'class': 'TestService3', 'args': ['@testService']}, {'id': 'testService6', 'class': 'TestService6', 'args': ['Testing', '@testService', '@testService3']} ] }) TestUtil.useServicesInModule(['TestService', 'TestService3', 'TestService6'], 'test') appContext: AppContext = AppContextBuilder.buildBaseAppContext() testService6 = appContext.getService('testService6') description = testService6.getDescription() assert description == 'name: Testing | testService: TestService | testService3: TestService' def test_invalid_init_value(self): # Given TestUtil.buildModuleFiles('test', { 'name': 'test', 'version': '0.0.1', 'services': [ {'id': 'testService', 'class': 'TestService', 'init': 'test'} ] }) TestUtil.useServicesInModule(['TestService'], 'test') with pytest.raises(CmdExecError) as err: AppContextBuilder.buildBaseAppContext() error: CmdExecError = err.value assert error.getCode() == 'ERR29'
37.96347
118
0.557493
661
8,314
6.919818
0.133132
0.021425
0.085702
0.097945
0.748798
0.737429
0.737429
0.737429
0.72606
0.72606
0
0.015982
0.315131
8,314
218
119
38.137615
0.78732
0.012389
0
0.657459
0
0
0.172457
0.00903
0
0
0
0
0.077348
1
0.088398
false
0
0.027624
0
0.121547
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c4743d2c9afb6649dc2853ab40eb301537444365
30
py
Python
1.py
HackerUSA-CE/10.5.3-activity-starter
97eeb96fb6743409ccd53d3adf4fea11be6d7058
[ "MIT" ]
null
null
null
1.py
HackerUSA-CE/10.5.3-activity-starter
97eeb96fb6743409ccd53d3adf4fea11be6d7058
[ "MIT" ]
null
null
null
1.py
HackerUSA-CE/10.5.3-activity-starter
97eeb96fb6743409ccd53d3adf4fea11be6d7058
[ "MIT" ]
null
null
null
# add code below for problem 1
30
30
0.766667
6
30
3.833333
1
0
0
0
0
0
0
0
0
0
0
0.041667
0.2
30
1
30
30
0.916667
0.933333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
6703a4562ee8cae19ea3bb3b4056c2b75c78e622
44
py
Python
mineid/main/errors.py
SomeHybrid/mineid
b05216541b9c29a15fa6bbbd95531fed7b43f184
[ "MIT" ]
null
null
null
mineid/main/errors.py
SomeHybrid/mineid
b05216541b9c29a15fa6bbbd95531fed7b43f184
[ "MIT" ]
null
null
null
mineid/main/errors.py
SomeHybrid/mineid
b05216541b9c29a15fa6bbbd95531fed7b43f184
[ "MIT" ]
null
null
null
class InvalidUserError(Exception): pass
14.666667
34
0.772727
4
44
8.5
1
0
0
0
0
0
0
0
0
0
0
0
0.159091
44
2
35
22
0.918919
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
6713850b7e06a0fa2a0c86d64725f5109aabb84b
81
py
Python
asylum/__init__.py
cieplak/asylum
12f95d6b42dc441f41aa7e7cc9791675b01d3682
[ "MIT" ]
null
null
null
asylum/__init__.py
cieplak/asylum
12f95d6b42dc441f41aa7e7cc9791675b01d3682
[ "MIT" ]
null
null
null
asylum/__init__.py
cieplak/asylum
12f95d6b42dc441f41aa7e7cc9791675b01d3682
[ "MIT" ]
null
null
null
from . import config from .container import Container from .system import System
20.25
32
0.814815
11
81
6
0.454545
0
0
0
0
0
0
0
0
0
0
0
0.148148
81
3
33
27
0.956522
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
671d06dfa6dd1c1ca003afbd5e0d80088953fc0f
4,485
py
Python
sdk/eventhub/azure-eventhub/tests/unittest/test_connection_string_parser.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
2
2019-08-23T21:14:00.000Z
2021-09-07T18:32:34.000Z
sdk/eventhub/azure-eventhub/tests/unittest/test_connection_string_parser.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
2
2021-11-03T06:10:36.000Z
2021-12-01T06:29:39.000Z
sdk/eventhub/azure-eventhub/tests/unittest/test_connection_string_parser.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
1
2021-12-18T20:01:22.000Z
2021-12-18T20:01:22.000Z
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import pytest from azure.eventhub import ( EventHubConnectionStringProperties, parse_connection_string, ) from devtools_testutils import AzureMgmtTestCase class EventHubConnectionStringParserTests(AzureMgmtTestCase): def test_eh_conn_str_parse_cs(self, **kwargs): conn_str = 'Endpoint=sb://eh-namespace.servicebus.windows.net/;SharedAccessKeyName=test-policy;SharedAccessKey=THISISATESTKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXX=' parse_result = parse_connection_string(conn_str) assert parse_result.endpoint == 'sb://eh-namespace.servicebus.windows.net/' assert parse_result.fully_qualified_namespace == 'eh-namespace.servicebus.windows.net' assert parse_result.shared_access_key_name == 'test-policy' assert parse_result.shared_access_key == 'THISISATESTKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXX=' def test_eh_conn_str_parse_with_entity_path(self, **kwargs): conn_str = 'Endpoint=sb://eh-namespace.servicebus.windows.net/;SharedAccessKeyName=test-policy;SharedAccessKey=THISISATESTKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXX=;EntityPath=eventhub-name' parse_result = parse_connection_string(conn_str) assert parse_result.endpoint == 'sb://eh-namespace.servicebus.windows.net/' assert parse_result.fully_qualified_namespace == 'eh-namespace.servicebus.windows.net' assert parse_result.shared_access_key_name == 'test-policy' assert parse_result.shared_access_key == 'THISISATESTKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXX=' assert parse_result.eventhub_name == 'eventhub-name' def test_eh_conn_str_parse_sas_and_shared_key(self, **kwargs): conn_str = 'Endpoint=sb://eh-namespace.servicebus.windows.net/;SharedAccessKeyName=test-policy;SharedAccessKey=THISISATESTKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXX=;SharedAccessSignature=THISISASASXXXXXXX=' with pytest.raises(ValueError) as e: parse_result = parse_connection_string(conn_str) assert str(e.value) == 'Only one of the SharedAccessKey or SharedAccessSignature must be present.' def test_eh_parse_malformed_conn_str_no_endpoint(self, **kwargs): conn_str = 'SharedAccessKeyName=test-policy;SharedAccessKey=THISISATESTKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXX=' with pytest.raises(ValueError) as e: parse_result = parse_connection_string(conn_str) assert str(e.value) == 'Connection string is either blank or malformed.' def test_eh_parse_malformed_conn_str_no_netloc(self, **kwargs): conn_str = 'Endpoint=MALFORMED;SharedAccessKeyName=test-policy;SharedAccessKey=THISISATESTKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXX=' with pytest.raises(ValueError) as e: parse_result = parse_connection_string(conn_str) assert str(e.value) == 'Invalid Endpoint on the Connection String.' def test_eh_parse_conn_str_sas(self, **kwargs): conn_str = 'Endpoint=sb://eh-namespace.servicebus.windows.net/;SharedAccessSignature=THISISATESTKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXX=' parse_result = parse_connection_string(conn_str) assert parse_result.endpoint == 'sb://eh-namespace.servicebus.windows.net/' assert parse_result.fully_qualified_namespace == 'eh-namespace.servicebus.windows.net' assert parse_result.shared_access_signature == 'THISISATESTKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXX=' assert parse_result.shared_access_key_name == None def test_eh_parse_conn_str_no_keyname(self, **kwargs): conn_str = 'Endpoint=sb://eh-namespace.servicebus.windows.net/;SharedAccessKey=THISISATESTKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXX=' with pytest.raises(ValueError) as e: parse_result = parse_connection_string(conn_str) assert str(e.value) == 'Connection string must have both SharedAccessKeyName and SharedAccessKey.' def test_eh_parse_conn_str_no_key(self, **kwargs): conn_str = 'Endpoint=sb://eh-namespace.servicebus.windows.net/;SharedAccessKeyName=test-policy' with pytest.raises(ValueError) as e: parse_result = parse_connection_string(conn_str) assert str(e.value) == 'Connection string must have both SharedAccessKeyName and SharedAccessKey.'
62.291667
204
0.742475
484
4,485
6.613636
0.192149
0.052484
0.069041
0.104967
0.781318
0.773508
0.747266
0.721649
0.701656
0.701656
0
0
0.140022
4,485
71
205
63.169014
0.82992
0.066444
0
0.454545
0
0.054545
0.406743
0.329747
0
0
0
0
0.327273
1
0.145455
false
0
0.072727
0
0.236364
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
6720b6aa93853e6c41bd11cbe0fdd62889238444
130
py
Python
api_demo/services/interfaces/PropertyServiceInterface.py
iafrohack/python_rest
4ce05163cf29e717171537451111d9f780126abb
[ "MIT" ]
null
null
null
api_demo/services/interfaces/PropertyServiceInterface.py
iafrohack/python_rest
4ce05163cf29e717171537451111d9f780126abb
[ "MIT" ]
null
null
null
api_demo/services/interfaces/PropertyServiceInterface.py
iafrohack/python_rest
4ce05163cf29e717171537451111d9f780126abb
[ "MIT" ]
null
null
null
from interface import Interface class PropertyServiceInterface(Interface): def get_property(self, property_id): pass
21.666667
42
0.769231
14
130
7
0.785714
0
0
0
0
0
0
0
0
0
0
0
0.176923
130
6
43
21.666667
0.915888
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
675a3fb07d1310061a29c460b7899f790e211da5
105,264
py
Python
release/stubs/System/Windows/Forms/VisualStyles.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
182
2017-06-27T02:26:15.000Z
2022-03-30T18:53:43.000Z
release/stubs/System/Windows/Forms/VisualStyles.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
28
2017-06-27T13:38:23.000Z
2022-03-15T11:19:44.000Z
release/stubs/System/Windows/Forms/VisualStyles.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
67
2017-06-28T09:43:59.000Z
2022-03-20T21:17:10.000Z
# encoding: utf-8 # module System.Windows.Forms.VisualStyles calls itself VisualStyles # from System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 # by generator 1.145 """ NamespaceTracker represent a CLS namespace. """ # no imports # no functions # classes class BackgroundType(Enum, IComparable, IFormattable, IConvertible): """ Specifies the source of a visual style element's background. enum BackgroundType, values: BorderFill (1), ImageFile (0), None (2) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass BorderFill = None ImageFile = None None = None value__ = None class BooleanProperty(Enum, IComparable, IFormattable, IConvertible): """ Identifies the Boolean properties of a visual style element. enum BooleanProperty, values: AlwaysShowSizingBar (2208), AutoSize (2202), BackgroundFill (2205), BorderOnly (2203), Composited (2204), GlyphOnly (2207), GlyphTransparent (2206), IntegralSizing (2211), MirrorImage (2209), SourceGrow (2212), SourceShrink (2213), Transparent (2201), UniformSizing (2210) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass AlwaysShowSizingBar = None AutoSize = None BackgroundFill = None BorderOnly = None Composited = None GlyphOnly = None GlyphTransparent = None IntegralSizing = None MirrorImage = None SourceGrow = None SourceShrink = None Transparent = None UniformSizing = None value__ = None class BorderType(Enum, IComparable, IFormattable, IConvertible): """ Specifies the border type of a visual style element with a filled-border background. enum BorderType, values: Ellipse (2), Rectangle (0), RoundedRectangle (1) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Ellipse = None Rectangle = None RoundedRectangle = None value__ = None class CheckBoxState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual state of a check box that is drawn with visual styles. enum CheckBoxState, values: CheckedDisabled (8), CheckedHot (6), CheckedNormal (5), CheckedPressed (7), MixedDisabled (12), MixedHot (10), MixedNormal (9), MixedPressed (11), UncheckedDisabled (4), UncheckedHot (2), UncheckedNormal (1), UncheckedPressed (3) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass CheckedDisabled = None CheckedHot = None CheckedNormal = None CheckedPressed = None MixedDisabled = None MixedHot = None MixedNormal = None MixedPressed = None UncheckedDisabled = None UncheckedHot = None UncheckedNormal = None UncheckedPressed = None value__ = None class ColorProperty(Enum, IComparable, IFormattable, IConvertible): """ Identifies the color properties of a visual style element. enum ColorProperty, values: AccentColorHint (3823), BorderColor (3801), BorderColorHint (3822), EdgeDarkShadowColor (3807), EdgeFillColor (3808), EdgeHighlightColor (3805), EdgeLightColor (3804), EdgeShadowColor (3806), FillColor (3802), FillColorHint (3821), GlowColor (3816), GlyphTextColor (3819), GlyphTransparentColor (3820), GradientColor1 (3810), GradientColor2 (3811), GradientColor3 (3812), GradientColor4 (3813), GradientColor5 (3814), ShadowColor (3815), TextBorderColor (3817), TextColor (3803), TextShadowColor (3818), TransparentColor (3809) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass AccentColorHint = None BorderColor = None BorderColorHint = None EdgeDarkShadowColor = None EdgeFillColor = None EdgeHighlightColor = None EdgeLightColor = None EdgeShadowColor = None FillColor = None FillColorHint = None GlowColor = None GlyphTextColor = None GlyphTransparentColor = None GradientColor1 = None GradientColor2 = None GradientColor3 = None GradientColor4 = None GradientColor5 = None ShadowColor = None TextBorderColor = None TextColor = None TextShadowColor = None TransparentColor = None value__ = None class ComboBoxState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual state of a combo box that is drawn with visual styles. enum ComboBoxState, values: Disabled (4), Hot (2), Normal (1), Pressed (3) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Disabled = None Hot = None Normal = None Pressed = None value__ = None class ContentAlignment(Enum, IComparable, IFormattable, IConvertible): """ Specifies how text is aligned in a window caption. enum ContentAlignment, values: Center (1), Left (0), Right (2) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Center = None Left = None Right = None value__ = None class EdgeEffects(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual effects that can be applied to the edges of a visual style element. enum (flags) EdgeEffects, values: FillInterior (2048), Flat (4096), Mono (32768), None (0), Soft (16384) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass FillInterior = None Flat = None Mono = None None = None Soft = None value__ = None class Edges(Enum, IComparable, IFormattable, IConvertible): """ Specifies which edges of a visual style element to draw. enum (flags) Edges, values: Bottom (8), Diagonal (16), Left (1), Right (4), Top (2) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Bottom = None Diagonal = None Left = None Right = None Top = None value__ = None class EdgeStyle(Enum, IComparable, IFormattable, IConvertible): """ Specifies the styles that can be applied to the edges of a visual style element. enum EdgeStyle, values: Bump (9), Etched (6), Raised (5), Sunken (10) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Bump = None Etched = None Raised = None Sunken = None value__ = None class EnumProperty(Enum, IComparable, IFormattable, IConvertible): """ Identifies the enumerated type properties of a visual style element. enum EnumProperty, values: BackgroundType (4001), BorderType (4002), ContentAlignment (4006), FillType (4003), GlyphFontSizingType (4014), GlyphType (4012), HorizontalAlignment (4005), IconEffect (4009), ImageLayout (4011), ImageSelectType (4013), OffsetType (4008), SizingType (4004), TextShadowType (4010), TrueSizeScalingType (4015), VerticalAlignment (4007) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass BackgroundType = None BorderType = None ContentAlignment = None FillType = None GlyphFontSizingType = None GlyphType = None HorizontalAlignment = None IconEffect = None ImageLayout = None ImageSelectType = None OffsetType = None SizingType = None TextShadowType = None TrueSizeScalingType = None value__ = None VerticalAlignment = None class FilenameProperty(Enum, IComparable, IFormattable, IConvertible): """ Identifies the names of the image files that are used to draw a visual style element. enum FilenameProperty, values: GlyphImageFile (3008), ImageFile (3001), ImageFile1 (3002), ImageFile2 (3003), ImageFile3 (3004), ImageFile4 (3005), ImageFile5 (3006), StockImageFile (3007) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass GlyphImageFile = None ImageFile = None ImageFile1 = None ImageFile2 = None ImageFile3 = None ImageFile4 = None ImageFile5 = None StockImageFile = None value__ = None class FillType(Enum, IComparable, IFormattable, IConvertible): """ Specifies the interior of visual style elements with a filled border background. enum FillType, values: HorizontalGradient (2), RadialGradient (3), Solid (0), TileImage (4), VerticalGradient (1) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass HorizontalGradient = None RadialGradient = None Solid = None TileImage = None value__ = None VerticalGradient = None class FontProperty(Enum, IComparable, IFormattable, IConvertible): """ Identifies the font properties of a visual style element. enum FontProperty, values: GlyphFont (2601) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass GlyphFont = None value__ = None class GlyphFontSizingType(Enum, IComparable, IFormattable, IConvertible): """ Specifies when the visual style selects a different glyph font size. enum GlyphFontSizingType, values: Dpi (2), None (0), Size (1) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Dpi = None None = None Size = None value__ = None class GlyphType(Enum, IComparable, IFormattable, IConvertible): """ Specifies the type of glyph for elements with a bitmap background. enum GlyphType, values: FontGlyph (2), ImageGlyph (1), None (0) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass FontGlyph = None ImageGlyph = None None = None value__ = None class GroupBoxState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual state of a group box that is drawn with visual styles. enum GroupBoxState, values: Disabled (2), Normal (1) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Disabled = None Normal = None value__ = None class HitTestCode(Enum, IComparable, IFormattable, IConvertible): """ Describes the location of a point in the background specified by a visual style. enum HitTestCode, values: Bottom (15), BottomLeft (16), BottomRight (17), Client (1), Left (10), Nowhere (0), Right (11), Top (12), TopLeft (13), TopRight (14) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Bottom = None BottomLeft = None BottomRight = None Client = None Left = None Nowhere = None Right = None Top = None TopLeft = None TopRight = None value__ = None class HitTestOptions(Enum, IComparable, IFormattable, IConvertible): """ Specifies the options that can be used when performing a hit test on the background specified by a visual style. enum (flags) HitTestOptions, values: BackgroundSegment (0), Caption (4), FixedBorder (2), ResizingBorder (240), ResizingBorderBottom (128), ResizingBorderLeft (16), ResizingBorderRight (64), ResizingBorderTop (32), SizingTemplate (256), SystemSizingMargins (512) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass BackgroundSegment = None Caption = None FixedBorder = None ResizingBorder = None ResizingBorderBottom = None ResizingBorderLeft = None ResizingBorderRight = None ResizingBorderTop = None SizingTemplate = None SystemSizingMargins = None value__ = None class HorizontalAlign(Enum, IComparable, IFormattable, IConvertible): """ Specifies the horizontal alignment for visual style elements with a fixed size. enum HorizontalAlign, values: Center (1), Left (0), Right (2) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Center = None Left = None Right = None value__ = None class IconEffect(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual effect that the visual style will apply to an icon. enum IconEffect, values: Alpha (4), Glow (1), None (0), Pulse (3), Shadow (2) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Alpha = None Glow = None None = None Pulse = None Shadow = None value__ = None class ImageOrientation(Enum, IComparable, IFormattable, IConvertible): """ Specifies how multiple images are arranged in a single image file. enum ImageOrientation, values: Horizontal (1), Vertical (0) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Horizontal = None value__ = None Vertical = None class ImageSelectType(Enum, IComparable, IFormattable, IConvertible): """ Specifies when the visual style selects a different multiple-image file to draw an element. enum ImageSelectType, values: Dpi (2), None (0), Size (1) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Dpi = None None = None Size = None value__ = None class IntegerProperty(Enum, IComparable, IFormattable, IConvertible): """ Identifies the integer properties of a visual style element. enum IntegerProperty, values: AlphaLevel (2402), AlphaThreshold (2415), BorderSize (2403), GlyphIndex (2418), GradientRatio1 (2406), GradientRatio2 (2407), GradientRatio3 (2408), GradientRatio4 (2409), GradientRatio5 (2410), Height (2417), ImageCount (2401), MinDpi1 (2420), MinDpi2 (2421), MinDpi3 (2422), MinDpi4 (2423), MinDpi5 (2424), ProgressChunkSize (2411), ProgressSpaceSize (2412), RoundCornerHeight (2405), RoundCornerWidth (2404), Saturation (2413), TextBorderSize (2414), TrueSizeStretchMark (2419), Width (2416) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass AlphaLevel = None AlphaThreshold = None BorderSize = None GlyphIndex = None GradientRatio1 = None GradientRatio2 = None GradientRatio3 = None GradientRatio4 = None GradientRatio5 = None Height = None ImageCount = None MinDpi1 = None MinDpi2 = None MinDpi3 = None MinDpi4 = None MinDpi5 = None ProgressChunkSize = None ProgressSpaceSize = None RoundCornerHeight = None RoundCornerWidth = None Saturation = None TextBorderSize = None TrueSizeStretchMark = None value__ = None Width = None class MarginProperty(Enum, IComparable, IFormattable, IConvertible): """ Identifies the margin properties of a visual style element. enum MarginProperty, values: CaptionMargins (3603), ContentMargins (3602), SizingMargins (3601) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass CaptionMargins = None ContentMargins = None SizingMargins = None value__ = None class OffsetType(Enum, IComparable, IFormattable, IConvertible): """ Specifies where an offset is applied to a window element. enum OffsetType, values: AboveLastButton (12), BelowLastButton (13), BottomLeft (3), BottomMiddle (5), BottomRight (4), LeftOfCaption (8), LeftOfLastButton (10), MiddleLeft (6), MiddleRight (7), RightOfCaption (9), RightOfLastButton (11), TopLeft (0), TopMiddle (2), TopRight (1) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass AboveLastButton = None BelowLastButton = None BottomLeft = None BottomMiddle = None BottomRight = None LeftOfCaption = None LeftOfLastButton = None MiddleLeft = None MiddleRight = None RightOfCaption = None RightOfLastButton = None TopLeft = None TopMiddle = None TopRight = None value__ = None class PointProperty(Enum, IComparable, IFormattable, IConvertible): """ Identifies the point properties of a visual style element. enum PointProperty, values: MinSize (3403), MinSize1 (3404), MinSize2 (3405), MinSize3 (3406), MinSize4 (3407), MinSize5 (3408), Offset (3401), TextShadowOffset (3402) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass MinSize = None MinSize1 = None MinSize2 = None MinSize3 = None MinSize4 = None MinSize5 = None Offset = None TextShadowOffset = None value__ = None class PushButtonState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual state of a button that is drawn with visual styles. enum PushButtonState, values: Default (5), Disabled (4), Hot (2), Normal (1), Pressed (3) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Default = None Disabled = None Hot = None Normal = None Pressed = None value__ = None class RadioButtonState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual state of an option button (also known as a radio button) that is drawn with visual styles. enum RadioButtonState, values: CheckedDisabled (8), CheckedHot (6), CheckedNormal (5), CheckedPressed (7), UncheckedDisabled (4), UncheckedHot (2), UncheckedNormal (1), UncheckedPressed (3) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass CheckedDisabled = None CheckedHot = None CheckedNormal = None CheckedPressed = None UncheckedDisabled = None UncheckedHot = None UncheckedNormal = None UncheckedPressed = None value__ = None class ScrollBarArrowButtonState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual state of a scroll arrow that is drawn with visual styles. enum ScrollBarArrowButtonState, values: DownDisabled (8), DownHot (6), DownNormal (5), DownPressed (7), LeftDisabled (12), LeftHot (10), LeftNormal (9), LeftPressed (11), RightDisabled (16), RightHot (14), RightNormal (13), RightPressed (15), UpDisabled (4), UpHot (2), UpNormal (1), UpPressed (3) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass DownDisabled = None DownHot = None DownNormal = None DownPressed = None LeftDisabled = None LeftHot = None LeftNormal = None LeftPressed = None RightDisabled = None RightHot = None RightNormal = None RightPressed = None UpDisabled = None UpHot = None UpNormal = None UpPressed = None value__ = None class ScrollBarSizeBoxState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual state of a scroll bar sizing handle that is drawn with visual styles. enum ScrollBarSizeBoxState, values: LeftAlign (2), RightAlign (1) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass LeftAlign = None RightAlign = None value__ = None class ScrollBarState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual state of a scroll bar that is drawn with visual styles. enum ScrollBarState, values: Disabled (4), Hot (2), Normal (1), Pressed (3) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Disabled = None Hot = None Normal = None Pressed = None value__ = None class SizingType(Enum, IComparable, IFormattable, IConvertible): """ Specifies how elements with a bitmap background will adjust to fill a bounds. enum SizingType, values: FixedSize (0), Stretch (1), Tile (2) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass FixedSize = None Stretch = None Tile = None value__ = None class StringProperty(Enum, IComparable, IFormattable, IConvertible): """ Identifies the string properties of a visual style element. enum StringProperty, values: Text (3201) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Text = None value__ = None class TabItemState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual state of a tab item that is drawn with visual styles. enum TabItemState, values: Disabled (4), Hot (2), Normal (1), Selected (3) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Disabled = None Hot = None Normal = None Selected = None value__ = None class TextBoxState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual state of a text box that is drawn with visual styles. enum TextBoxState, values: Assist (7), Disabled (4), Hot (2), Normal (1), Readonly (6), Selected (3) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Assist = None Disabled = None Hot = None Normal = None Readonly = None Selected = None value__ = None class TextMetrics(object): """ Provides basic information about the font specified by a visual style for a particular element. """ Ascent = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the ascent of characters in the font. Get: Ascent(self: TextMetrics) -> int Set: Ascent(self: TextMetrics) = value """ AverageCharWidth = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the average width of characters in the font. Get: AverageCharWidth(self: TextMetrics) -> int Set: AverageCharWidth(self: TextMetrics) = value """ BreakChar = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the character used to define word breaks for text justification. Get: BreakChar(self: TextMetrics) -> Char Set: BreakChar(self: TextMetrics) = value """ CharSet = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the character set of the font. Get: CharSet(self: TextMetrics) -> TextMetricsCharacterSet Set: CharSet(self: TextMetrics) = value """ DefaultChar = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the character to be substituted for characters not in the font. Get: DefaultChar(self: TextMetrics) -> Char Set: DefaultChar(self: TextMetrics) = value """ Descent = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the descent of characters in the font. Get: Descent(self: TextMetrics) -> int Set: Descent(self: TextMetrics) = value """ DigitizedAspectX = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the horizontal aspect of the device for which the font was designed. Get: DigitizedAspectX(self: TextMetrics) -> int Set: DigitizedAspectX(self: TextMetrics) = value """ DigitizedAspectY = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the vertical aspect of the device for which the font was designed. Get: DigitizedAspectY(self: TextMetrics) -> int Set: DigitizedAspectY(self: TextMetrics) = value """ ExternalLeading = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the amount of extra leading that the application adds between rows. Get: ExternalLeading(self: TextMetrics) -> int Set: ExternalLeading(self: TextMetrics) = value """ FirstChar = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the first character defined in the font. Get: FirstChar(self: TextMetrics) -> Char Set: FirstChar(self: TextMetrics) = value """ Height = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the height of characters in the font. Get: Height(self: TextMetrics) -> int Set: Height(self: TextMetrics) = value """ InternalLeading = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the amount of leading inside the bounds set by the System.Windows.Forms.VisualStyles.TextMetrics.Height property. Get: InternalLeading(self: TextMetrics) -> int Set: InternalLeading(self: TextMetrics) = value """ Italic = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets a value indicating whether the font is italic. Get: Italic(self: TextMetrics) -> bool Set: Italic(self: TextMetrics) = value """ LastChar = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the last character defined in the font. Get: LastChar(self: TextMetrics) -> Char Set: LastChar(self: TextMetrics) = value """ MaxCharWidth = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the width of the widest character in the font. Get: MaxCharWidth(self: TextMetrics) -> int Set: MaxCharWidth(self: TextMetrics) = value """ Overhang = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the extra width per string that may be added to some synthesized fonts. Get: Overhang(self: TextMetrics) -> int Set: Overhang(self: TextMetrics) = value """ PitchAndFamily = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets information about the pitch, technology, and family of a physical font. Get: PitchAndFamily(self: TextMetrics) -> TextMetricsPitchAndFamilyValues Set: PitchAndFamily(self: TextMetrics) = value """ StruckOut = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets a value indicating whether the font specifies a horizontal line through the characters. Get: StruckOut(self: TextMetrics) -> bool Set: StruckOut(self: TextMetrics) = value """ Underlined = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets a value indicating whether the font is underlined. Get: Underlined(self: TextMetrics) -> bool Set: Underlined(self: TextMetrics) = value """ Weight = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets or sets the weight of the font. Get: Weight(self: TextMetrics) -> int Set: Weight(self: TextMetrics) = value """ class TextMetricsCharacterSet(Enum, IComparable, IFormattable, IConvertible): """ Specifies the character set of the font specified by a visual style for a particular element. enum TextMetricsCharacterSet, values: Ansi (0), Arabic (178), Baltic (186), ChineseBig5 (136), Default (1), EastEurope (238), Gb2312 (134), Greek (161), Hangul (129), Hebrew (177), Johab (130), Mac (77), Oem (255), Russian (204), ShiftJis (128), Symbol (2), Thai (222), Turkish (162), Vietnamese (163) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Ansi = None Arabic = None Baltic = None ChineseBig5 = None Default = None EastEurope = None Gb2312 = None Greek = None Hangul = None Hebrew = None Johab = None Mac = None Oem = None Russian = None ShiftJis = None Symbol = None Thai = None Turkish = None value__ = None Vietnamese = None class TextMetricsPitchAndFamilyValues(Enum, IComparable, IFormattable, IConvertible): """ Specifies information about the pitch, technology, and family of the font specified by a visual style for a particular element. enum (flags) TextMetricsPitchAndFamilyValues, values: Device (8), FixedPitch (1), TrueType (4), Vector (2) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Device = None FixedPitch = None TrueType = None value__ = None Vector = None class TextShadowType(Enum, IComparable, IFormattable, IConvertible): """ Specifies the type of shadow to add to text. enum TextShadowType, values: Continuous (2), None (0), Single (1) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Continuous = None None = None Single = None value__ = None class ThemeSizeType(Enum, IComparable, IFormattable, IConvertible): """ Specifies the size of the visual style part to retrieve. enum ThemeSizeType, values: Draw (2), Minimum (0), True (1) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Draw = None Minimum = None True = None value__ = None class ToolBarState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual state of a toolbar item that is drawn with visual styles. enum ToolBarState, values: Checked (5), Disabled (4), Hot (2), HotChecked (6), Normal (1), Pressed (3) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Checked = None Disabled = None Hot = None HotChecked = None Normal = None Pressed = None value__ = None class TrackBarThumbState(Enum, IComparable, IFormattable, IConvertible): """ Specifies the visual state of a track bar slider (also known as a thumb) that is drawn with visual styles. enum TrackBarThumbState, values: Disabled (5), Hot (2), Normal (1), Pressed (3) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Disabled = None Hot = None Normal = None Pressed = None value__ = None class TrueSizeScalingType(Enum, IComparable, IFormattable, IConvertible): """ Specifies the scaling type of a visual style element with a fixed size. enum TrueSizeScalingType, values: Dpi (2), None (0), Size (1) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Dpi = None None = None Size = None value__ = None class VerticalAlignment(Enum, IComparable, IFormattable, IConvertible): """ Specifies the vertical alignment for visual style elements with a fixed size. enum VerticalAlignment, values: Bottom (2), Center (1), Top (0) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass Bottom = None Center = None Top = None value__ = None class VisualStyleElement(object): """ Identifies a control or user interface (UI) element that is drawn with visual styles. """ @staticmethod def CreateElement(className, part, state): """ CreateElement(className: str, part: int, state: int) -> VisualStyleElement Creates a new visual style element from the specified class, part, and state values. className: A string that represents the class name of the visual style element to be created. part: A value that represents the part of the visual style element to be created. state: A value that represents the state of the visual style element to be created. Returns: A System.Windows.Forms.VisualStyles.VisualStyleElement with the System.Windows.Forms.VisualStyles.VisualStyleElement.ClassName, System.Windows.Forms.VisualStyles.VisualStyleElement.Part, and System.Windows.Forms.VisualStyles.VisualStyleElement.State properties initialized to the className, part, and state parameters. """ pass ClassName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets the class name of the visual style element that this System.Windows.Forms.VisualStyles.VisualStyleElement represents. Get: ClassName(self: VisualStyleElement) -> str """ Part = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets a value indicating the part of the visual style element that this System.Windows.Forms.VisualStyles.VisualStyleElement represents. Get: Part(self: VisualStyleElement) -> int """ State = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets a value indicating the state of the visual style element that this System.Windows.Forms.VisualStyles.VisualStyleElement represents. Get: State(self: VisualStyleElement) -> int """ Button = None ComboBox = None ExplorerBar = None Header = None ListView = None Menu = None MenuBand = None Page = None ProgressBar = None Rebar = None ScrollBar = None Spin = None StartPanel = None Status = None Tab = None TaskBand = None Taskbar = None TaskbarClock = None TextBox = None ToolBar = None ToolTip = None TrackBar = None TrayNotify = None TreeView = None Window = None class VisualStyleInformation(object): """ Provides information about the current visual style of the operating system. """ Author = 'MSX' ColorScheme = 'NormalColor' Company = '' ControlHighlightHot = None Copyright = '' Description = '' DisplayName = 'Aero style' IsEnabledByUser = True IsSupportedByOS = True MinimumColorDepth = 0 Size = 'NormalSize' SupportsFlatMenus = False TextControlBorder = None Url = '' Version = '' __all__ = [] class VisualStyleRenderer(object): """ Provides methods for drawing and getting information about a System.Windows.Forms.VisualStyles.VisualStyleElement. This class cannot be inherited. VisualStyleRenderer(element: VisualStyleElement) VisualStyleRenderer(className: str, part: int, state: int) """ def DrawBackground(self, dc, bounds, clipRectangle=None): """ DrawBackground(self: VisualStyleRenderer, dc: IDeviceContext, bounds: Rectangle, clipRectangle: Rectangle) Draws the background image of the current visual style element within the specified bounding rectangle and clipped to the specified clipping rectangle. dc: The System.Drawing.IDeviceContext used to draw the background image. bounds: A System.Drawing.Rectangle in which the background image is drawn. clipRectangle: A System.Drawing.Rectangle that defines a clipping rectangle for the drawing operation. DrawBackground(self: VisualStyleRenderer, dc: IDeviceContext, bounds: Rectangle) Draws the background image of the current visual style element within the specified bounding rectangle. dc: The System.Drawing.IDeviceContext used to draw the background image. bounds: A System.Drawing.Rectangle in which the background image is drawn. """ pass def DrawEdge(self, dc, bounds, edges, style, effects): """ DrawEdge(self: VisualStyleRenderer, dc: IDeviceContext, bounds: Rectangle, edges: Edges, style: EdgeStyle, effects: EdgeEffects) -> Rectangle Draws one or more edges of the specified bounding rectangle. dc: The System.Drawing.IDeviceContext used to draw the edges. bounds: The System.Drawing.Rectangle whose bounds define the edges to draw. edges: A bitwise combination of the System.Windows.Forms.VisualStyles.Edges values. style: A bitwise combination of the System.Windows.Forms.VisualStyles.EdgeStyle values. effects: A bitwise combination of the System.Windows.Forms.VisualStyles.EdgeEffects values. Returns: A System.Drawing.Rectangle that represents the interior of the bounds parameter, minus the edges that were drawn. """ pass def DrawImage(self, g, bounds, *__args): """ DrawImage(self: VisualStyleRenderer, g: Graphics, bounds: Rectangle, imageList: ImageList, imageIndex: int) Draws the image from the specified System.Windows.Forms.ImageList within the specified bounds. g: The System.Drawing.Graphics used to draw the image. bounds: A System.Drawing.Rectangle in which the image is drawn. imageList: An System.Windows.Forms.ImageList that contains the System.Drawing.Image to draw. imageIndex: The index of the System.Drawing.Image within imageList to draw. DrawImage(self: VisualStyleRenderer, g: Graphics, bounds: Rectangle, image: Image) Draws the specified image within the specified bounds. g: The System.Drawing.Graphics used to draw the image. bounds: A System.Drawing.Rectangle in which the image is drawn. image: The System.Drawing.Image to draw. """ pass def DrawParentBackground(self, dc, bounds, childControl): """ DrawParentBackground(self: VisualStyleRenderer, dc: IDeviceContext, bounds: Rectangle, childControl: Control) Draws the background of a control's parent in the specified area. dc: The System.Drawing.IDeviceContext used to draw the background of the parent of childControl. This object typically belongs to the child control. bounds: A System.Drawing.Rectangle in which to draw the parent control's background. This rectangle childControl: The control whose parent's background will be drawn. """ pass def DrawText(self, dc, bounds, textToDraw, drawDisabled=None, flags=None): """ DrawText(self: VisualStyleRenderer, dc: IDeviceContext, bounds: Rectangle, textToDraw: str, drawDisabled: bool, flags: TextFormatFlags) Draws text in the specified bounding rectangle with the option of displaying disabled text and applying other text formatting. dc: The System.Drawing.IDeviceContext used to draw the text. bounds: A System.Drawing.Rectangle in which to draw the text. textToDraw: The text to draw. drawDisabled: true to draw grayed-out text; otherwise, false. flags: A bitwise combination of the System.Windows.Forms.TextFormatFlags values. DrawText(self: VisualStyleRenderer, dc: IDeviceContext, bounds: Rectangle, textToDraw: str, drawDisabled: bool) Draws text in the specified bounds with the option of displaying disabled text. dc: The System.Drawing.IDeviceContext used to draw the text. bounds: A System.Drawing.Rectangle in which to draw the text. textToDraw: The text to draw. drawDisabled: true to draw grayed-out text; otherwise, false. DrawText(self: VisualStyleRenderer, dc: IDeviceContext, bounds: Rectangle, textToDraw: str) Draws text in the specified bounds using default formatting. dc: The System.Drawing.IDeviceContext used to draw the text. bounds: A System.Drawing.Rectangle in which to draw the text. textToDraw: The text to draw. """ pass def GetBackgroundContentRectangle(self, dc, bounds): """ GetBackgroundContentRectangle(self: VisualStyleRenderer, dc: IDeviceContext, bounds: Rectangle) -> Rectangle Returns the content area for the background of the current visual style element. dc: The System.Drawing.IDeviceContext this operation will use. bounds: A System.Drawing.Rectangle that contains the entire background area of the current visual style element. Returns: A System.Drawing.Rectangle that contains the content area for the background of the current visual style element. """ pass def GetBackgroundExtent(self, dc, contentBounds): """ GetBackgroundExtent(self: VisualStyleRenderer, dc: IDeviceContext, contentBounds: Rectangle) -> Rectangle Returns the entire background area for the current visual style element. dc: The System.Drawing.IDeviceContext this operation will use. contentBounds: A System.Drawing.Rectangle that contains the content area of the current visual style element. Returns: A System.Drawing.Rectangle that contains the entire background area of the current visual style element. """ pass def GetBackgroundRegion(self, dc, bounds): """ GetBackgroundRegion(self: VisualStyleRenderer, dc: IDeviceContext, bounds: Rectangle) -> Region Returns the region for the background of the current visual style element. dc: The System.Drawing.IDeviceContext this operation will use. bounds: A System.Drawing.Rectangle that contains the entire background area of the current visual style element. Returns: The System.Drawing.Region that contains the background of the current visual style element. """ pass def GetBoolean(self, prop): """ GetBoolean(self: VisualStyleRenderer, prop: BooleanProperty) -> bool Returns the value of the specified Boolean property for the current visual style element. prop: One of the System.Windows.Forms.VisualStyles.BooleanProperty values that specifies which property value to retrieve for the current visual style element. Returns: true if the property specified by the prop parameter is true for the current visual style element; otherwise, false. """ pass def GetColor(self, prop): """ GetColor(self: VisualStyleRenderer, prop: ColorProperty) -> Color Returns the value of the specified color property for the current visual style element. prop: One of the System.Windows.Forms.VisualStyles.ColorProperty values that specifies which property value to retrieve for the current visual style element. Returns: A System.Drawing.Color that contains the value of the property specified by the prop parameter for the current visual style element. """ pass def GetEnumValue(self, prop): """ GetEnumValue(self: VisualStyleRenderer, prop: EnumProperty) -> int Returns the value of the specified enumerated type property for the current visual style element. prop: One of the System.Windows.Forms.VisualStyles.EnumProperty values that specifies which property value to retrieve for the current visual style element. Returns: The integer value of the property specified by the prop parameter for the current visual style element. """ pass def GetFilename(self, prop): """ GetFilename(self: VisualStyleRenderer, prop: FilenameProperty) -> str Returns the value of the specified file name property for the current visual style element. prop: One of the System.Windows.Forms.VisualStyles.FilenameProperty values that specifies which property value to retrieve for the current visual style element. Returns: A System.String that contains the value of the property specified by the prop parameter for the current visual style element. """ pass def GetFont(self, dc, prop): """ GetFont(self: VisualStyleRenderer, dc: IDeviceContext, prop: FontProperty) -> Font Returns the value of the specified font property for the current visual style element. dc: The System.Drawing.IDeviceContext this operation will use. prop: One of the System.Windows.Forms.VisualStyles.FontProperty values that specifies which property value to retrieve for the current visual style element. Returns: A System.Drawing.Font that contains the value of the property specified by the prop parameter for the current visual style element. """ pass def GetInteger(self, prop): """ GetInteger(self: VisualStyleRenderer, prop: IntegerProperty) -> int Returns the value of the specified integer property for the current visual style element. prop: One of the System.Windows.Forms.VisualStyles.IntegerProperty values that specifies which property value to retrieve for the current visual style element. Returns: The integer value of the property specified by the prop parameter for the current visual style element. """ pass def GetMargins(self, dc, prop): """ GetMargins(self: VisualStyleRenderer, dc: IDeviceContext, prop: MarginProperty) -> Padding Returns the value of the specified margins property for the current visual style element. dc: The System.Drawing.IDeviceContext this operation will use. prop: One of the System.Windows.Forms.VisualStyles.MarginProperty values that specifies which property value to retrieve for the current visual style element. Returns: A System.Windows.Forms.Padding that contains the value of the property specified by the prop parameter for the current visual style element. """ pass def GetPartSize(self, dc, *__args): """ GetPartSize(self: VisualStyleRenderer, dc: IDeviceContext, bounds: Rectangle, type: ThemeSizeType) -> Size Returns the value of the specified size property of the current visual style part using the specified drawing bounds. dc: The System.Drawing.IDeviceContext this operation will use. bounds: A System.Drawing.Rectangle that contains the area in which the part will be drawn. type: One of the System.Windows.Forms.VisualStyles.ThemeSizeType values that specifies which size value to retrieve for the part. Returns: A System.Drawing.Size that contains the size specified by the type parameter for the current visual style part. GetPartSize(self: VisualStyleRenderer, dc: IDeviceContext, type: ThemeSizeType) -> Size Returns the value of the specified size property of the current visual style part. dc: The System.Drawing.IDeviceContext this operation will use. type: One of the System.Windows.Forms.VisualStyles.ThemeSizeType values that specifies which size value to retrieve for the part. Returns: A System.Drawing.Size that contains the size specified by the type parameter for the current visual style part. """ pass def GetPoint(self, prop): """ GetPoint(self: VisualStyleRenderer, prop: PointProperty) -> Point Returns the value of the specified point property for the current visual style element. prop: One of the System.Windows.Forms.VisualStyles.PointProperty values that specifies which property value to retrieve for the current visual style element. Returns: A System.Drawing.Point that contains the value of the property specified by the prop parameter for the current visual style element. """ pass def GetString(self, prop): """ GetString(self: VisualStyleRenderer, prop: StringProperty) -> str Returns the value of the specified string property for the current visual style element. prop: One of the System.Windows.Forms.VisualStyles.StringProperty values that specifies which property value to retrieve for the current visual style element. Returns: A System.String that contains the value of the property specified by the prop parameter for the current visual style element. """ pass def GetTextExtent(self, dc, *__args): """ GetTextExtent(self: VisualStyleRenderer, dc: IDeviceContext, bounds: Rectangle, textToDraw: str, flags: TextFormatFlags) -> Rectangle Returns the size and location of the specified string when drawn with the font of the current visual style element within the specified initial bounding rectangle. dc: The System.Drawing.IDeviceContext this operation will use. bounds: A System.Drawing.Rectangle used to control the flow and wrapping of the text. textToDraw: The string to measure. flags: A bitwise combination of the System.Windows.Forms.TextFormatFlags values. Returns: A System.Drawing.Rectangle that contains the area required to fit the rendered text. GetTextExtent(self: VisualStyleRenderer, dc: IDeviceContext, textToDraw: str, flags: TextFormatFlags) -> Rectangle Returns the size and location of the specified string when drawn with the font of the current visual style element. dc: The System.Drawing.IDeviceContext this operation will use. textToDraw: The string to measure. flags: A bitwise combination of the System.Windows.Forms.TextFormatFlags values. Returns: A System.Drawing.Rectangle that contains the area required to fit the rendered text. """ pass def GetTextMetrics(self, dc): """ GetTextMetrics(self: VisualStyleRenderer, dc: IDeviceContext) -> TextMetrics Retrieves information about the font specified by the current visual style element. dc: The System.Drawing.IDeviceContext this operation will use. Returns: A System.Windows.Forms.VisualStyles.TextMetrics that provides information about the font specified by the current visual style element. """ pass def HitTestBackground(self, *__args): """ HitTestBackground(self: VisualStyleRenderer, dc: IDeviceContext, backgroundRectangle: Rectangle, hRgn: IntPtr, pt: Point, options: HitTestOptions) -> HitTestCode Returns a hit test code indicating whether the point is contained in the background of the current visual style element and within the specified region. dc: The System.Drawing.IDeviceContext this operation will use. backgroundRectangle: A System.Drawing.Rectangle that contains the background of the current visual style element. hRgn: A Windows handle to a System.Drawing.Region that specifies the bounds of the hit test area within the background. pt: The System.Drawing.Point to test. options: A bitwise combination of the System.Windows.Forms.VisualStyles.HitTestOptions values. Returns: A System.Windows.Forms.VisualStyles.HitTestCode that describes where pt is located in the background of the current visual style element. HitTestBackground(self: VisualStyleRenderer, g: Graphics, backgroundRectangle: Rectangle, region: Region, pt: Point, options: HitTestOptions) -> HitTestCode Returns a hit test code indicating whether the point is contained in the background of the current visual style element and within the specified bounds. g: The System.Drawing.Graphics this operation will use. backgroundRectangle: A System.Drawing.Rectangle that contains the background of the current visual style element. region: A System.Drawing.Region that specifies the bounds of the hit test area within the background. pt: The System.Drawing.Point to test. options: A bitwise combination of the System.Windows.Forms.VisualStyles.HitTestOptions values. Returns: A System.Windows.Forms.VisualStyles.HitTestCode that describes where pt is located in the background of the current visual style element, if at all. HitTestBackground(self: VisualStyleRenderer, dc: IDeviceContext, backgroundRectangle: Rectangle, pt: Point, options: HitTestOptions) -> HitTestCode Returns a hit test code indicating whether a point is contained in the background of the current visual style element. dc: The System.Drawing.IDeviceContext this operation will use. backgroundRectangle: A System.Drawing.Rectangle that contains the background of the current visual style element. pt: The System.Drawing.Point to test. options: A bitwise combination of the System.Windows.Forms.VisualStyles.HitTestOptions values. Returns: A System.Windows.Forms.VisualStyles.HitTestCode that describes where pt is located in the background of the current visual style element. """ pass def IsBackgroundPartiallyTransparent(self): """ IsBackgroundPartiallyTransparent(self: VisualStyleRenderer) -> bool Indicates whether the background of the current visual style element has any semitransparent or alpha-blended pieces. Returns: true if the background of the current visual style element has any semitransparent or alpha-blended pieces; otherwise, false. """ pass @staticmethod def IsElementDefined(element): """ IsElementDefined(element: VisualStyleElement) -> bool Determines whether the specified visual style element is defined by the current visual style. element: A System.Windows.Forms.VisualStyles.VisualStyleElement whose class and part combination will be verified. Returns: true if the combination of the System.Windows.Forms.VisualStyles.VisualStyleElement.ClassName and System.Windows.Forms.VisualStyles.VisualStyleElement.Part properties of element are defined; otherwise, false. """ pass def SetParameters(self, *__args): """ SetParameters(self: VisualStyleRenderer, className: str, part: int, state: int) Sets this System.Windows.Forms.VisualStyles.VisualStyleRenderer to the visual style element represented by the specified class, part, and state values. className: The new value of the System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class property. part: The new value of the System.Windows.Forms.VisualStyles.VisualStyleRenderer.Part property. state: The new value of the System.Windows.Forms.VisualStyles.VisualStyleRenderer.State property. SetParameters(self: VisualStyleRenderer, element: VisualStyleElement) Sets this System.Windows.Forms.VisualStyles.VisualStyleRenderer to the visual style element represented by the specified System.Windows.Forms.VisualStyles.VisualStyleElement. element: A System.Windows.Forms.VisualStyles.VisualStyleElement that specifies the new values of the System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class, System.Windows.Forms.VisualStyles.VisualStyleRenderer.Part, and System.Windows.Forms.VisualStyles.VisualStyleRenderer.State properties. """ pass @staticmethod # known case of __new__ def __new__(self, *__args): """ __new__(cls: type, element: VisualStyleElement) __new__(cls: type, className: str, part: int, state: int) """ pass Class = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets the class name of the current visual style element. Get: Class(self: VisualStyleRenderer) -> str """ Handle = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets a unique identifier for the current class of visual style elements. Get: Handle(self: VisualStyleRenderer) -> IntPtr """ LastHResult = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets the last error code returned by the native visual styles (UxTheme) API methods encapsulated by the System.Windows.Forms.VisualStyles.VisualStyleRenderer class. Get: LastHResult(self: VisualStyleRenderer) -> int """ Part = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets the part of the current visual style element. Get: Part(self: VisualStyleRenderer) -> int """ State = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """Gets the state of the current visual style element. Get: State(self: VisualStyleRenderer) -> int """ IsSupported = True class VisualStyleState(Enum, IComparable, IFormattable, IConvertible): """ Specifies how visual styles are applied to the current application. enum VisualStyleState, values: ClientAndNonClientAreasEnabled (3), ClientAreaEnabled (2), NonClientAreaEnabled (1), NoneEnabled (0) """ def __eq__(self, *args): #cannot find CLR method """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): #cannot find CLR method """ __format__(formattable: IFormattable, format: str) -> str """ pass def __ge__(self, *args): #cannot find CLR method pass def __gt__(self, *args): #cannot find CLR method pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): #cannot find CLR method pass def __lt__(self, *args): #cannot find CLR method pass def __ne__(self, *args): #cannot find CLR method pass def __reduce_ex__(self, *args): #cannot find CLR method pass def __str__(self, *args): #cannot find CLR method pass ClientAndNonClientAreasEnabled = None ClientAreaEnabled = None NonClientAreaEnabled = None NoneEnabled = None value__ = None
35.92628
560
0.625256
12,226
105,264
5.031081
0.066579
0.058917
0.102422
0.131686
0.742855
0.730385
0.684637
0.655259
0.639327
0.630044
0
0.009749
0.27697
105,264
2,929
561
35.938546
0.798434
0.098533
0
0.756201
0
0
0.000899
0
0
0
0
0
0
0
null
null
0.337349
0
null
null
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
5
67679dc477ae17a7e2355a254399b8128e3f78b9
10,108
py
Python
coflex_twopoint.py
evanjarena/F-SHARP
091d676bc27ee4f26fa03c782275d710f70449f4
[ "BSD-4-Clause-UC" ]
null
null
null
coflex_twopoint.py
evanjarena/F-SHARP
091d676bc27ee4f26fa03c782275d710f70449f4
[ "BSD-4-Clause-UC" ]
null
null
null
coflex_twopoint.py
evanjarena/F-SHARP
091d676bc27ee4f26fa03c782275d710f70449f4
[ "BSD-4-Clause-UC" ]
null
null
null
import numpy as np import pandas as pd from classy import Class import pickle import sys,os import astropy from astropy.cosmology import Planck15 from astropy import units as u import matplotlib.pyplot as plt from matplotlib import rc rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) rc('text', usetex=True) from scipy import interpolate from scipy import integrate from scipy import special from scipy.signal import argrelextrema class CoflexTwopoint: def __init__(self, coflex_power, survey, bin_combo): self.l_list = coflex_power['ell'] self.P_F_list = coflex_power['P_F'] self.P_kappa_F_list = coflex_power['P_kappa_F'] self.survey = str(survey) self.bin_combo = str(bin_combo) def getTwoPoint(self): # First, interpolate all arrays so that they can be turned into callable functions self.interpolateArrays() # .. Get two point correlation functions # .. .. F-F autocorrelation xi_FF_plus = self.two_point_corr_flexflex(theta_flexflex_list, 'FF_plus') xi_FF_minus = self.two_point_corr_flexflex(theta_flexflex_list, 'FF_minus') # .. .. F-G cross-correlation. Note: xi_FG_plus = -xi_FF_minus xi_FG_plus = [-xi_FF_minus[i] for i in range(len(xi_FF_minus))] xi_FG_minus = self.two_point_corr_flexflex(theta_flexflex_list, 'FG_minus') # .. .. G-G cross correlation. Note: xi_GG_plus = xi_FF_plus xi_GG_plus = xi_FF_plus xi_GG_minus = self.two_point_corr_flexflex(theta_flexflex_list, 'GG_minus') # .. Export flexion-flexion correlation functions to .pkl file col_list = ['theta', 'xi_FF_plus', 'xi_FF_minus', 'xi_FG_plus', 'xi_FG_minus', 'xi_GG_plus', 'xi_GG_minus'] arrs = [theta_flexflex_list, xi_FF_plus, xi_FF_minus, xi_FG_plus, xi_FG_minus, xi_GG_plus, xi_GG_minus] dat = {i:arrs[j] for i,j in zip(col_list, range(len(col_list)))} out_frame = pd.DataFrame(data = dat, columns = col_list) out_frame.to_pickle(self.survey+'/'+self.survey+'_Theory/flexion-flexion_two_point_'+self.survey+'_bin_combo_'+self.bin_combo+'.pkl') # Shear-flexion correlations: # .. Get theta_list theta_shearflex_list = self.theta_shearflex_list() # .. Get two point correlation functions # .. .. gam-F cross-correlation xi_gamF_plus = self.two_point_corr_shearflex(theta_shearflex_list, 'gamF_plus') xi_gamF_minus = self.two_point_corr_shearflex(theta_shearflex_list, 'gamF_minus') # .. .. G-gam cross-correlation. Note: xi_Ggam_plus = xi_gamF_minus xi_Ggam_plus = xi_gamF_plus xi_Ggam_minus = self.two_point_corr_shearflex(theta_shearflex_list, 'Ggam_minus') # .. Export flexion-flexion correlation functions to .pkl file col_list = ['theta', 'xi_gamF_plus', 'xi_gamF_minus', 'xi_Ggam_plus', 'xi_Ggam_minus'] arrs = [theta_shearflex_list, xi_gamF_plus, xi_gamF_minus, xi_Ggam_plus, xi_Ggam_minus] dat = {i:arrs[j] for i,j in zip(col_list, range(len(col_list)))} out_frame = pd.DataFrame(data = dat, columns = col_list) out_frame.to_pickle(self.survey+'/'+self.survey+'_Theory/shear-flexion_two_point_'+self.survey+'_bin_combo_'+self.bin_combo+'.pkl') def theta_flexflex_list(self, theta_min=1, theta_max=100, N_theta=100): """ List of theta values for real-space cosmic flexion correlation functions Input angle values are in untis of arcseconds self, theta_min=1, theta_max=120, N_theta=100 """ # Create logspace list of angular scale, in units of arcseconds theta_min = np.log10(theta_min) theta_max = np.log10(theta_max) theta_list = np.logspace(theta_min,theta_max,N_theta) dtheta = np.log10(theta_list[1])-np.log10(theta_list[0]) bin_low_list = 10**(np.log10(theta_list)-dtheta/2) bin_high_list = 10**(np.log10(theta_list)+dtheta/2) theta_max = np.log10(bin_high_list[-1]) theta_list = np.logspace(theta_min,theta_max,N_theta) theta_list *= u.arcsec return theta_list def theta_shearflex_list(self, theta_min=1/60, theta_max=10., N_theta=100): """ List of theta values for real-space cosmic shear-flexion correlation functions Input angle values are in untis of arcminutes self, theta_min=0.01, theta_max=15., N_theta=100 theta_min=1/60, theta_max=50., N_theta=100 """ # Create logspace list of angular scale, in units of arcseconds theta_min = np.log10(theta_min) theta_max = np.log10(theta_max) theta_list = np.logspace(theta_min,theta_max,N_theta) dtheta = np.log10(theta_list[1])-np.log10(theta_list[0]) bin_low_list = 10**(np.log10(theta_list)-dtheta/2) bin_high_list = 10**(np.log10(theta_list)+dtheta/2) theta_max = np.log10(bin_high_list[-1]) theta_list = np.logspace(theta_min,theta_max,N_theta) theta_list *= u.arcmin return theta_list def interpolateArrays(self): self.P_F_interpolate = interpolate.interp1d(self.l_list, self.P_F_list) self.P_kappa_F_interpolate = interpolate.interp1d(self.l_list, self.P_kappa_F_list) def P_F(self, ell): return self.P_F_interpolate(ell) def P_kappa_F(self, ell): return self.P_kappa_F_interpolate(ell) def two_point_corr_flexflex(self, theta_list, fields): # First, convert the list of angles to radians theta_list_rad = theta_list.to(u.rad).value # Get parameters specific to the particular two-point correlation function. # These include the order of the Bessel function for the Hankel transform, # as well as the algebraic sign of the two-point correlation function. if fields == 'FF_plus': order = 0 sign = (+1) elif fields == 'FF_minus': order = 2 sign = (-1) elif fields == 'FG_plus': order = 2 sign = (+1) elif fields == 'FG_minus': order = 4 sign = (-1) elif fields == 'GG_plus': order = 0 sign = (+1) elif fields == 'GG_minus': order = 6 sign = (-1) # Get two-point correlation function for each angular separation xi_list_norm = [] for theta in theta_list_rad: # Get down-sampled ell list l_list = np.logspace(np.log10(np.min(self.l_list)), np.log10(np.max(self.l_list)), int(1e7)) # Get integrand of two-point correlation function xi_integrand_unnorm = l_list * special.jv(order, l_list*theta)*self.P_F(l_list) # Perform integrand renormalization. ell_min_index = argrelextrema(xi_integrand_unnorm, np.less)[0] ell_min = l_list[ell_min_index] xi_integrand_min = xi_integrand_unnorm[ell_min_index] id_min = np.where(xi_integrand_min < 0) ell_min_1 = ell_min[id_min][0] ell_max_index = argrelextrema(xi_integrand_unnorm, np.greater)[0] ell_max = l_list[ell_max_index][0] ell_max_1 = l_list[ell_max_index][1] ell_max_2 = l_list[ell_max_index][2] xi_integrand_norm = xi_integrand_unnorm*np.e**(-((l_list*(l_list+1))/ell_max_2**2.)) # Now we can integrate. We use Simpson's rule for fast integration xi_integral_norm = integrate.simps(xi_integrand_norm, l_list, axis=-1) # xi = 1/2pi times the integral, with the appropriate algebraic sign xi_norm = sign*(1/(2*np.pi))*xi_integral_norm xi_list_norm.append(xi_norm) return xi_list_norm def two_point_corr_shearflex(self, theta_list, fields): # First, convert the list of angles to radians theta_list_rad = theta_list.to(u.rad).value # Get parameters specific to the particular two-point correlation function. # These include the order of the Bessel function for the Hankel transform, # as well as the algebraic sign of the two-point correlation function. if fields == 'gamF_plus': order = 1 sign = (-1) elif fields == 'gamF_minus': order = 3 sign = (+1) elif fields == 'Ggam_plus': order = 1 sign = (-1) elif fields == 'Ggam_minus': order = 5 sign = (-1) # Get two-point correlation function for each angular separation xi_list_norm = [] for theta in theta_list_rad: # Get down-sampled ell list l_list = np.logspace(np.log10(np.min(self.l_list)), np.log10(np.max(self.l_list)), int(1e7)) # Get integrand of two-point correlation function xi_integrand_unnorm = l_list * special.jv(order, l_list*theta)*self.P_kappa_F(l_list) # Perform integrand renormalization. ell_min_index = argrelextrema(xi_integrand_unnorm, np.less)[0] ell_min = l_list[ell_min_index] xi_integrand_min = xi_integrand_unnorm[ell_min_index] id_min = np.where(xi_integrand_min < 0) ell_min_1 = ell_min[id_min][0] ell_max_index = argrelextrema(xi_integrand_unnorm, np.greater)[0] ell_max = l_list[ell_max_index][0] ell_max_1 = l_list[ell_max_index][1] ell_max_2 = l_list[ell_max_index][2] xi_integrand_norm = xi_integrand_unnorm*np.e**(-((l_list*(l_list+1))/ell_max_2**2.)) # Now we can integrate. We use Simpson's rule for fast integration xi_integral_norm = integrate.simps(xi_integrand_norm, l_list, axis=-1) # xi = 1/2pi times the integral, with the appropriate algebraic sign xi_norm = sign*(1/(2*np.pi))*xi_integral_norm xi_list_norm.append(xi_norm) return xi_list_norm
40.270916
142
0.641967
1,460
10,108
4.142466
0.141096
0.023975
0.02381
0.021164
0.813492
0.758433
0.737103
0.712963
0.698743
0.629299
0
0.020858
0.260091
10,108
250
143
40.432
0.787806
0.219133
0
0.510345
0
0
0.05429
0.008491
0
0
0
0
0
1
0.062069
false
0
0.096552
0.013793
0.206897
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
676bbaddf56463994eb3a763d775d1f23df89d75
50
py
Python
tests/files/gt.py
docmarionum1/py65c
cd59ef25d2759b63efa5655f529fd31564cc31b0
[ "WTFPL" ]
12
2015-08-03T05:16:18.000Z
2020-09-12T12:38:16.000Z
tests/files/gt.py
docmarionum1/py65c
cd59ef25d2759b63efa5655f529fd31564cc31b0
[ "WTFPL" ]
null
null
null
tests/files/gt.py
docmarionum1/py65c
cd59ef25d2759b63efa5655f529fd31564cc31b0
[ "WTFPL" ]
null
null
null
a = 5 > 3 b = 5 > 4 c = 5 > 5 d = 5 > 6 e = 5 > 7
8.333333
9
0.3
15
50
1
0.666667
0
0
0
0
0
0
0
0
0
0
0.4
0.5
50
5
10
10
0.2
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
db29a307848bd90d183125e06d4f08bbaae9707e
542
py
Python
pepipost/models/timeperiod_enum.py
kanhaiya2012/Sample
6c3d549525b7883913a4677c3eb6f14c8da34b9b
[ "MIT" ]
null
null
null
pepipost/models/timeperiod_enum.py
kanhaiya2012/Sample
6c3d549525b7883913a4677c3eb6f14c8da34b9b
[ "MIT" ]
null
null
null
pepipost/models/timeperiod_enum.py
kanhaiya2012/Sample
6c3d549525b7883913a4677c3eb6f14c8da34b9b
[ "MIT" ]
1
2020-05-17T17:55:30.000Z
2020-05-17T17:55:30.000Z
# -*- coding: utf-8 -*- """ pepipost This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ class TimeperiodEnum(object): """Implementation of the 'Timeperiod' enum. The periodic \n\nAllowed values \"daily\", \"weekly\", \"monhtly\" Attributes: DAILY: TODO: type description here. WEEKLY: TODO: type description here. MONHTLY: TODO: type description here. """ DAILY = 'daily' WEEKLY = 'weekly' MONHTLY = 'monhtly'
19.357143
84
0.579336
54
542
5.814815
0.648148
0.076433
0.181529
0.219745
0
0
0
0
0
0
0
0.007813
0.291513
542
27
85
20.074074
0.809896
0.693727
0
0
1
0
0.165138
0
0
0
0
0.111111
0
1
0
false
0
0
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
1
0
0
0
0
0
0
0
1
0
0
5
e1e65f82f1ff6f1a428007dbdfb26b37a5141d8d
101
py
Python
sponsors/admin.py
igr-santos/conference
d229e70dcb2775201158579b6bf6b532aab2c6b7
[ "MIT" ]
1
2021-07-07T14:18:30.000Z
2021-07-07T14:18:30.000Z
sponsors/admin.py
igr-santos/conference
d229e70dcb2775201158579b6bf6b532aab2c6b7
[ "MIT" ]
null
null
null
sponsors/admin.py
igr-santos/conference
d229e70dcb2775201158579b6bf6b532aab2c6b7
[ "MIT" ]
null
null
null
from django.contrib import admin from sponsors.models import Sponsor admin.site.register(Sponsor)
14.428571
35
0.821782
14
101
5.928571
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.118812
101
6
36
16.833333
0.932584
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e1f2024ee043832a8d4d559da5d13808e53ee6a9
233
py
Python
pesto/backend/db/db.py
saromanov/pesto
b14e92ac8295400fb56d84d7d05d5450e7dc7d61
[ "MIT" ]
null
null
null
pesto/backend/db/db.py
saromanov/pesto
b14e92ac8295400fb56d84d7d05d5450e7dc7d61
[ "MIT" ]
15
2021-01-09T18:54:03.000Z
2022-03-12T00:21:09.000Z
pesto/backend/db/db.py
saromanov/pesto
b14e92ac8295400fb56d84d7d05d5450e7dc7d61
[ "MIT" ]
null
null
null
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() def query(cls, **kw): q = db.session.query(cls) if kw: q = q.filter_by(**kw) return q def get_by_id(cls, id): return db.session.query(cls).get(id)
16.642857
40
0.635193
38
233
3.789474
0.447368
0.166667
0.194444
0.236111
0
0
0
0
0
0
0
0
0.227468
233
14
40
16.642857
0.8
0
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.111111
0.111111
0.555556
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
c03a3768106a545ed4b29e8e6026a17d3484c1dd
146
py
Python
Kattis/jumbojavelin/anurag_solution.py
rawat9/dsa-prep
9d5fec1b4ec1268e2c526c62b989b2c136b4e7f5
[ "MIT" ]
1
2022-02-20T00:28:42.000Z
2022-02-20T00:28:42.000Z
Kattis/jumbojavelin/anurag_solution.py
rawat9/dsa-prep
9d5fec1b4ec1268e2c526c62b989b2c136b4e7f5
[ "MIT" ]
null
null
null
Kattis/jumbojavelin/anurag_solution.py
rawat9/dsa-prep
9d5fec1b4ec1268e2c526c62b989b2c136b4e7f5
[ "MIT" ]
null
null
null
N = int(input()) combined_length = 0 for _ in range(N): length = int(input()) combined_length += length print(combined_length - (N-1))
14.6
30
0.643836
21
146
4.285714
0.52381
0.466667
0.355556
0.488889
0
0
0
0
0
0
0
0.017241
0.205479
146
9
31
16.222222
0.758621
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.166667
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c05e90192f7fc8e24c922ed150fd81d33812885a
50
py
Python
fat_py/fat2/__init__.py
factomatic/fat-py
d65819892186284d6e0d905329b4fab3e5eb2dde
[ "MIT" ]
2
2020-01-10T18:27:52.000Z
2021-01-19T19:31:03.000Z
fat_py/fat2/__init__.py
factomatic/fat-py
d65819892186284d6e0d905329b4fab3e5eb2dde
[ "MIT" ]
2
2019-10-30T01:22:05.000Z
2019-12-02T14:58:54.000Z
fat_py/fat2/__init__.py
factomatic/fat-py
d65819892186284d6e0d905329b4fab3e5eb2dde
[ "MIT" ]
1
2019-12-02T13:49:05.000Z
2019-12-02T13:49:05.000Z
from .models import Transaction, TransactionBatch
25
49
0.86
5
50
8.6
1
0
0
0
0
0
0
0
0
0
0
0
0.1
50
1
50
50
0.955556
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c067b8b5c6ed98d350d16e74bdc1575d91378434
203
py
Python
democracy_bot/utils.py
TheDuckFIN/democracy-bot
76024b8b5757bd50ef141f0b35fa281e66a84778
[ "MIT" ]
null
null
null
democracy_bot/utils.py
TheDuckFIN/democracy-bot
76024b8b5757bd50ef141f0b35fa281e66a84778
[ "MIT" ]
null
null
null
democracy_bot/utils.py
TheDuckFIN/democracy-bot
76024b8b5757bd50ef141f0b35fa281e66a84778
[ "MIT" ]
null
null
null
"""Utility functions""" import discord def get_name(member: discord.Member): """Returns nick primarily and falls back to username""" return member.name if member.nick is None else member.nick
22.555556
62
0.73399
29
203
5.103448
0.724138
0.135135
0
0
0
0
0
0
0
0
0
0
0.167488
203
8
63
25.375
0.87574
0.330049
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
fbee07220477968a9d9f5f3da63858c1ca0aa985
105
py
Python
moto/elb/__init__.py
joekiller/moto
56c7b2116eab83e738dc6c351f109db26a77cdc2
[ "Apache-2.0" ]
null
null
null
moto/elb/__init__.py
joekiller/moto
56c7b2116eab83e738dc6c351f109db26a77cdc2
[ "Apache-2.0" ]
null
null
null
moto/elb/__init__.py
joekiller/moto
56c7b2116eab83e738dc6c351f109db26a77cdc2
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals from .models import elb_backend mock_elb = elb_backend.decorator
26.25
39
0.866667
15
105
5.533333
0.666667
0.240964
0
0
0
0
0
0
0
0
0
0
0.104762
105
3
40
35
0.882979
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
2201a7fd9dbbf9b307dcc58d1d3c951df8a8ffa0
150
py
Python
d2l/__init__.py
cingtiye/d2l-pytorch
9152fa5309fd48ac06b85e961ca13d44a425a647
[ "Apache-2.0" ]
2
2020-03-18T13:53:53.000Z
2020-05-27T15:22:00.000Z
d2l/__init__.py
cingtiye/d2l-pytorch
9152fa5309fd48ac06b85e961ca13d44a425a647
[ "Apache-2.0" ]
null
null
null
d2l/__init__.py
cingtiye/d2l-pytorch
9152fa5309fd48ac06b85e961ca13d44a425a647
[ "Apache-2.0" ]
null
null
null
from .base import * from .figure import * from .data import * from .train import * from .model import * from .ssd_utils import * __version__ = '1.1.0'
21.428571
24
0.713333
23
150
4.434783
0.521739
0.490196
0
0
0
0
0
0
0
0
0
0.024194
0.173333
150
7
25
21.428571
0.798387
0
0
0
0
0
0.033113
0
0
0
0
0
0
1
0
false
0
0.857143
0
0.857143
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
2253e14d30bffdbec0010ddcca2ea9b6f9f4e14c
136
py
Python
app/models/City/methods/__init__.py
msolorio/flask_world_api
a2d5394618b736aa7d5d5e75a422dbe9e5713533
[ "MIT" ]
1
2022-02-24T04:37:04.000Z
2022-02-24T04:37:04.000Z
app/models/City/methods/__init__.py
msolorio/flask_world_api
a2d5394618b736aa7d5d5e75a422dbe9e5713533
[ "MIT" ]
null
null
null
app/models/City/methods/__init__.py
msolorio/flask_world_api
a2d5394618b736aa7d5d5e75a422dbe9e5713533
[ "MIT" ]
null
null
null
from .delete import delete from .find import find from .update import update from .create import create from .find_many import find_many
27.2
32
0.823529
22
136
5
0.318182
0.145455
0
0
0
0
0
0
0
0
0
0
0.139706
136
5
32
27.2
0.940171
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5