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
668a69950d894c5be476b21543db749add8b52d5
180
py
Python
allauth/socialaccount/providers/pivotaltracker/urls.py
rawjam/django-allauth
2daa33178aa1ab749581c494f4c39e1c72ad5c7b
[ "MIT" ]
null
null
null
allauth/socialaccount/providers/pivotaltracker/urls.py
rawjam/django-allauth
2daa33178aa1ab749581c494f4c39e1c72ad5c7b
[ "MIT" ]
null
null
null
allauth/socialaccount/providers/pivotaltracker/urls.py
rawjam/django-allauth
2daa33178aa1ab749581c494f4c39e1c72ad5c7b
[ "MIT" ]
null
null
null
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns from provider import PivotalTrackerProvider urlpatterns = default_urlpatterns(PivotalTrackerProvider)
30
75
0.888889
17
180
9.294118
0.647059
0.227848
0
0
0
0
0
0
0
0
0
0.005988
0.072222
180
5
76
36
0.94012
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
669c0767b2a56157d94adbe410e078a0a3045bd9
13,297
py
Python
tests/test_photokit.py
oPromessa/osxphotos
0d7e324f0262093727147b9f22ed275e962e8725
[ "MIT" ]
656
2019-08-14T14:10:44.000Z
2022-03-28T15:25:42.000Z
tests/test_photokit.py
oPromessa/osxphotos
0d7e324f0262093727147b9f22ed275e962e8725
[ "MIT" ]
557
2019-10-14T19:00:02.000Z
2022-03-28T00:48:30.000Z
tests/test_photokit.py
oPromessa/osxphotos
0d7e324f0262093727147b9f22ed275e962e8725
[ "MIT" ]
58
2019-12-27T01:39:33.000Z
2022-02-26T22:18:49.000Z
""" test photokit.py methods """ import os import pathlib import tempfile import pytest from osxphotos.photokit import ( LivePhotoAsset, PhotoAsset, PhotoLibrary, VideoAsset, PHOTOS_VERSION_CURRENT, PHOTOS_VERSION_ORIGINAL, PHOTOS_VERSION_UNADJUSTED, ) skip_test = "OSXPHOTOS_TEST_EXPORT" not in os.environ pytestmark = pytest.mark.skipif( skip_test, reason="Skip if not running with author's personal library." ) UUID_DICT = { "plain_photo": { "uuid": "C6C712C5-9316-408D-A3C3-125661422DA9", "filename": "IMG_8844.JPG", }, "hdr": {"uuid": "DD641004-4E37-4233-AF31-CAA0896490B2", "filename": "IMG_6162.JPG"}, "selfie": { "uuid": "C925CFDC-FF2B-4E71-AC9D-C669B6453A8B", "filename": "IMG_1929.JPG", }, "video": { "uuid": "F4430659-7B17-487E-8029-8C1ABEBE23DF", "filename": "IMG_9411.TRIM.MOV", }, "hasadjustments": { "uuid": "2F252D2C-C9DE-4BE1-8610-9F968C634D3D", "filename": "IMG_2860.JPG", "adjusted_size": 3012634, "unadjusted_size": 2580058, }, "slow_mo": { "uuid": "160447F8-4EB0-4FAE-A26A-3D32EA698F75", "filename": "IMG_4055.MOV", }, "live_photo": { "uuid": "8EC216A2-0032-4934-BD3F-04C6259B3304", "filename": "IMG_3259.HEIC", "filename_video": "IMG_3259.mov", }, "burst": { "uuid": "CDE4E5D9-1428-41E6-8569-EC0C45FD8E5A", "filename": "IMG_8196.JPG", "burst_selected": 4, "burst_all": 5, }, "raw+jpeg": { "uuid": "E3DD04AF-CB65-4D9B-BB79-FF4C955533DB", "filename": "IMG_1994.JPG", "raw_filename": "IMG_1994.CR2", "unadjusted_size": 16128420, "uti_raw": "com.canon.cr2-raw-image", "uti": "public.jpeg", }, } def test_fetch_uuid(): """test fetch_uuid""" uuid = UUID_DICT["plain_photo"]["uuid"] filename = UUID_DICT["plain_photo"]["filename"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) assert isinstance(photo, PhotoAsset) def test_plain_photo(): """test plain_photo""" uuid = UUID_DICT["plain_photo"]["uuid"] filename = UUID_DICT["plain_photo"]["filename"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) assert photo.original_filename == filename assert photo.raw_filename is None assert photo.isphoto assert not photo.ismovie def test_raw_plus_jpeg(): """test RAW+JPEG""" uuid = UUID_DICT["raw+jpeg"]["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) assert photo.original_filename == UUID_DICT["raw+jpeg"]["filename"] assert photo.raw_filename == UUID_DICT["raw+jpeg"]["raw_filename"] assert photo.uti_raw() == UUID_DICT["raw+jpeg"]["uti_raw"] assert photo.uti() == UUID_DICT["raw+jpeg"]["uti"] def test_hdr(): """test hdr""" uuid = UUID_DICT["hdr"]["uuid"] filename = UUID_DICT["hdr"]["filename"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) assert photo.original_filename == filename assert photo.hdr def test_burst(): """test burst and burstid""" test_dict = UUID_DICT["burst"] uuid = test_dict["uuid"] filename = test_dict["filename"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) assert photo.original_filename == filename assert photo.burst assert photo.burstid # def test_selfie(): # """ test selfie """ # uuid = UUID_DICT["selfie"]["uuid"] # filename = UUID_DICT["selfie"]["filename"] # lib = PhotoLibrary() # photo = lib.fetch_uuid(uuid) # assert photo.original_filename == filename # assert photo.selfie def test_video(): """test ismovie""" uuid = UUID_DICT["video"]["uuid"] filename = UUID_DICT["video"]["filename"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) assert isinstance(photo, VideoAsset) assert photo.original_filename == filename assert photo.ismovie assert not photo.isphoto def test_slow_mo(): """test slow_mo""" test_dict = UUID_DICT["slow_mo"] uuid = test_dict["uuid"] filename = test_dict["filename"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) assert isinstance(photo, VideoAsset) assert photo.original_filename == filename assert photo.ismovie assert photo.slow_mo assert not photo.isphoto ### PhotoAsset def test_export_photo_original(): """test PhotoAsset.export""" test_dict = UUID_DICT["hasadjustments"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, version=PHOTOS_VERSION_ORIGINAL) export_path = pathlib.Path(export_path[0]) assert export_path.is_file() filename = test_dict["filename"] assert export_path.stem == pathlib.Path(filename).stem assert export_path.stat().st_size == test_dict["unadjusted_size"] def test_export_photo_unadjusted(): """test PhotoAsset.export""" test_dict = UUID_DICT["hasadjustments"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, version=PHOTOS_VERSION_UNADJUSTED) export_path = pathlib.Path(export_path[0]) assert export_path.is_file() filename = test_dict["filename"] assert export_path.stem == pathlib.Path(filename).stem assert export_path.stat().st_size == test_dict["unadjusted_size"] def test_export_photo_current(): """test PhotoAsset.export""" test_dict = UUID_DICT["hasadjustments"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir) export_path = pathlib.Path(export_path[0]) assert export_path.is_file() filename = test_dict["filename"] assert export_path.stem == pathlib.Path(filename).stem assert export_path.stat().st_size == test_dict["adjusted_size"] def test_export_photo_raw(): """test PhotoAsset.export for raw component""" test_dict = UUID_DICT["raw+jpeg"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, raw=True) export_path = pathlib.Path(export_path[0]) assert export_path.is_file() filename = test_dict["raw_filename"] assert export_path.stem == pathlib.Path(filename).stem assert export_path.stat().st_size == test_dict["unadjusted_size"] ### VideoAsset def test_export_video_original(): """test VideoAsset.export""" test_dict = UUID_DICT["video"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, version=PHOTOS_VERSION_ORIGINAL) export_path = pathlib.Path(export_path[0]) assert export_path.is_file() filename = test_dict["filename"] assert export_path.stem == pathlib.Path(filename).stem def test_export_video_unadjusted(): """test VideoAsset.export""" test_dict = UUID_DICT["video"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, version=PHOTOS_VERSION_UNADJUSTED) export_path = pathlib.Path(export_path[0]) assert export_path.is_file() filename = test_dict["filename"] assert export_path.stem == pathlib.Path(filename).stem def test_export_video_current(): """test VideoAsset.export""" test_dict = UUID_DICT["video"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, version=PHOTOS_VERSION_CURRENT) export_path = pathlib.Path(export_path[0]) assert export_path.is_file() filename = test_dict["filename"] assert export_path.stem == pathlib.Path(filename).stem ### Slow-Mo VideoAsset def test_export_slow_mo_original(): """test VideoAsset.export for slow mo video""" test_dict = UUID_DICT["slow_mo"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, version=PHOTOS_VERSION_ORIGINAL) export_path = pathlib.Path(export_path[0]) assert export_path.is_file() filename = test_dict["filename"] assert export_path.stem == pathlib.Path(filename).stem def test_export_slow_mo_unadjusted(): """test VideoAsset.export for slow mo video""" test_dict = UUID_DICT["slow_mo"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, version=PHOTOS_VERSION_UNADJUSTED) export_path = pathlib.Path(export_path[0]) assert export_path.is_file() filename = test_dict["filename"] assert export_path.stem == pathlib.Path(filename).stem def test_export_slow_mo_current(): """test VideoAsset.export for slow mo video""" test_dict = UUID_DICT["slow_mo"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, version=PHOTOS_VERSION_CURRENT) export_path = pathlib.Path(export_path[0]) assert export_path.is_file() filename = test_dict["filename"] assert export_path.stem == pathlib.Path(filename).stem ### LivePhotoAsset def test_export_live_original(): """test LivePhotoAsset.export""" test_dict = UUID_DICT["live_photo"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, version=PHOTOS_VERSION_ORIGINAL) for f in export_path: filepath = pathlib.Path(f) assert filepath.is_file() filename = test_dict["filename"] assert filepath.stem == pathlib.Path(filename).stem def test_export_live_unadjusted(): """test LivePhotoAsset.export""" test_dict = UUID_DICT["live_photo"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, version=PHOTOS_VERSION_UNADJUSTED) for file in export_path: filepath = pathlib.Path(file) assert filepath.is_file() filename = test_dict["filename"] assert filepath.stem == pathlib.Path(filename).stem def test_export_live_current(): """test LivePhotAsset.export""" test_dict = UUID_DICT["live_photo"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, version=PHOTOS_VERSION_CURRENT) for file in export_path: filepath = pathlib.Path(file) assert filepath.is_file() filename = test_dict["filename"] assert filepath.stem == pathlib.Path(filename).stem def test_export_live_current_just_photo(): """test LivePhotAsset.export""" test_dict = UUID_DICT["live_photo"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, photo=True, video=False) assert len(export_path) == 1 assert export_path[0].lower().endswith(".heic") def test_export_live_current_just_video(): """test LivePhotAsset.export""" test_dict = UUID_DICT["live_photo"] uuid = test_dict["uuid"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) with tempfile.TemporaryDirectory(prefix="photokit_test") as tempdir: export_path = photo.export(tempdir, photo=False, video=True) assert len(export_path) == 1 assert export_path[0].lower().endswith(".mov") def test_fetch_burst_uuid(): """test fetch_burst_uuid""" test_dict = UUID_DICT["burst"] uuid = test_dict["uuid"] filename = test_dict["filename"] lib = PhotoLibrary() photo = lib.fetch_uuid(uuid) bursts_selected = lib.fetch_burst_uuid(photo.burstid) assert len(bursts_selected) == test_dict["burst_selected"] assert isinstance(bursts_selected[0], PhotoAsset) bursts_all = lib.fetch_burst_uuid(photo.burstid, all=True) assert len(bursts_all) == test_dict["burst_all"] assert isinstance(bursts_all[0], PhotoAsset)
31.360849
88
0.670828
1,609
13,297
5.305158
0.099441
0.07732
0.050609
0.064667
0.760075
0.732427
0.718252
0.718252
0.717784
0.717784
0
0.025385
0.203053
13,297
423
89
31.434988
0.780126
0.06776
0
0.606667
0
0
0.136353
0.030029
0
0
0
0
0.203333
1
0.076667
false
0
0.016667
0
0.093333
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
66a0075c55665ddddee62ce3c5592465d9e8004b
200
py
Python
knowit/providers/__init__.py
labrys/knowit
eea9ac18e38c930230cf81b5dca4a9af9fb10d4e
[ "MIT" ]
null
null
null
knowit/providers/__init__.py
labrys/knowit
eea9ac18e38c930230cf81b5dca4a9af9fb10d4e
[ "MIT" ]
null
null
null
knowit/providers/__init__.py
labrys/knowit
eea9ac18e38c930230cf81b5dca4a9af9fb10d4e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Provider package.""" from __future__ import unicode_literals from .enzyme import EnzymeProvider from .ffmpeg import FFmpegProvider from .mediainfo import MediaInfoProvider
25
40
0.785
22
200
6.909091
0.727273
0
0
0
0
0
0
0
0
0
0
0.005682
0.12
200
7
41
28.571429
0.857955
0.2
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
66b3e370acc80eb4f8fc537add6850404fc19250
148
py
Python
problems/incorrect_division_method.py
stereoabuse/codewars
d6437afaef38c3601903891b8b9cb0f84c108c54
[ "MIT" ]
null
null
null
problems/incorrect_division_method.py
stereoabuse/codewars
d6437afaef38c3601903891b8b9cb0f84c108c54
[ "MIT" ]
null
null
null
problems/incorrect_division_method.py
stereoabuse/codewars
d6437afaef38c3601903891b8b9cb0f84c108c54
[ "MIT" ]
null
null
null
## Incorrect division method ## 8 kyu ## https://www.codewars.com/kata/54d1c59aba326343c80000e7 def divide_numbers(x,y): return x / y
21.142857
59
0.682432
19
148
5.263158
0.894737
0.04
0
0
0
0
0
0
0
0
0
0.151261
0.195946
148
7
60
21.142857
0.689076
0.594595
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
66b7938b4ce230cf1fa2893cf38e7f737bacfde6
49
py
Python
hello.py
Lifereborn/cs3240-labdemo
20db420273e78b4a905ec7e3a21fc717d71dc301
[ "MIT" ]
null
null
null
hello.py
Lifereborn/cs3240-labdemo
20db420273e78b4a905ec7e3a21fc717d71dc301
[ "MIT" ]
null
null
null
hello.py
Lifereborn/cs3240-labdemo
20db420273e78b4a905ec7e3a21fc717d71dc301
[ "MIT" ]
null
null
null
from helper import greetings greetings("hi!")
8.166667
28
0.734694
6
49
6
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.163265
49
5
29
9.8
0.878049
0
0
0
0
0
0.06383
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
66d1a62152bf00302159e841b40dff724b8f0c6c
420
py
Python
shopping_cart/exc.py
godfrey-leung/shopping
e57c8246961fc3bd5dbffd05e7ffd2ed43a8867a
[ "MIT" ]
null
null
null
shopping_cart/exc.py
godfrey-leung/shopping
e57c8246961fc3bd5dbffd05e7ffd2ed43a8867a
[ "MIT" ]
null
null
null
shopping_cart/exc.py
godfrey-leung/shopping
e57c8246961fc3bd5dbffd05e7ffd2ed43a8867a
[ "MIT" ]
null
null
null
class InstanceNotFound(Exception): """ Raise if an instance is not found in the database """ class InvalidValue(Exception): """ Raise if an invalid value is given """ class OverDemand(Exception): """ Raise if excess demand is requested """ class InvalidAmount(Exception): """ Raise if an invalid total/tax/discount amount is assigned to a shopping cart """
16.153846
49
0.638095
49
420
5.469388
0.632653
0.208955
0.238806
0.201493
0.186567
0
0
0
0
0
0
0
0.271429
420
26
50
16.153846
0.875817
0.469048
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
5
dd6c3adf785e5f57e8767ea1f8f416eff17606e6
208
py
Python
gavia/__init__.py
brett-hosking/gavia
d771235902b9a949efa92a1954d47dac8b1b527f
[ "MIT" ]
null
null
null
gavia/__init__.py
brett-hosking/gavia
d771235902b9a949efa92a1954d47dac8b1b527f
[ "MIT" ]
null
null
null
gavia/__init__.py
brett-hosking/gavia
d771235902b9a949efa92a1954d47dac8b1b527f
[ "MIT" ]
null
null
null
# Package modules from gavia import camera from gavia import vizualise from gavia import nav from gavia import gps from gavia import log from gavia import time # For nested packages from gavia import image
20.8
27
0.8125
33
208
5.121212
0.454545
0.372781
0.621302
0
0
0
0
0
0
0
0
0
0.177885
208
10
28
20.8
0.988304
0.168269
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
dd80e90be1c610d2c46bc8b8b02fd6070d94ee6d
2,900
py
Python
detection/pixel_link/util/dec.py
HLIG/HUAWEI_OCR2019
1070d6291072e0223c2624f686766d0f3065e9c6
[ "MIT" ]
211
2020-04-13T02:56:57.000Z
2022-03-30T11:22:46.000Z
detection/pixel_link/util/dec.py
HLIG/HUAWEI_OCR2019
1070d6291072e0223c2624f686766d0f3065e9c6
[ "MIT" ]
41
2020-04-14T20:08:58.000Z
2022-03-28T15:08:30.000Z
detection/pixel_link/util/dec.py
HLIG/HUAWEI_OCR2019
1070d6291072e0223c2624f686766d0f3065e9c6
[ "MIT" ]
47
2020-04-13T10:17:11.000Z
2022-02-21T02:06:16.000Z
#encoding=utf-8 import logging import time def print_calling(fn): def wrapper(*args1, ** args2): s = "calling function %s"%(fn.__name__) logging.info(s) start = time.time() ret = fn(*args1, **args2) end = time.time() # s = "%s. time used = %f seconds"%(s, (end - start)) s = "function [%s] has been called, taking %f seconds"%(fn.__name__, (end - start)) logging.debug(s) return ret return wrapper def print_test(fn): def wrapper(*args1, ** args2): s = "running test: %s..."%(fn.__name__) logging.info(s) ret = fn(*args1, **args2) s = "running test: %s...succeed"%(fn.__name__) logging.debug(s) return ret return wrapper def print_calling_in_short(fn): def wrapper(*args1, ** args2): start = time.time() ret = fn(*args1, **args2) end = time.time() s = "function [%s] has been called, taking %f seconds"%(fn.__name__, (end - start)) logging.debug(s) return ret return wrapper import collections counter = collections.defaultdict(int) count_times =collections.defaultdict(int) def print_calling_in_short_for_tf(fn): import tensorflow as tf import util def wrapper(*args1, ** args2): start = time.time() thread_name = util.thread.get_current_thread_name() ret = fn(*args1, **args2) end = time.time() counter[fn.__name__] = counter[fn.__name__] + (end - start) count_times[fn.__name__] += 1 all_time = sum([counter[name] for name in counter]) * 1.0 for name in counter: # tf.logging.info('\t %s: %f, %f seconds'%(name, counter[name] / all_time, counter[name])) tf.logging.info('\t %s: %d callings, %fsper calling'%(name, count_times[name], counter[name] * 1.0 / count_times[name])) s = "Thread [%s]:function [%s] has been called, taking %f seconds"%(thread_name, fn.__name__, (end - start)) tf.logging.info(s) return ret return wrapper def timeit(fn): import util def wrapper(*args1, ** args2): start = time.time() thread_name = util.thread.get_current_thread_name() ret = fn(*args1, **args2) end = time.time() counter[fn.__name__] = counter[fn.__name__] + (end - start) count_times[fn.__name__] += 1 all_time = sum([counter[name] for name in counter]) * 1.0 for name in counter: logging.info('\t %s: %f, %f seconds'%(name, counter[name] / all_time, counter[name])) logging.info('\t %s: %d callings, %f seconds per calling'%(name, count_times[name], counter[name] * 1.0 / count_times[name])) s = "Thread [%s]:function [%s] has been called, taking %f seconds"%(thread_name, fn.__name__, (end - start)) # logging.info(s) return ret return wrapper
36.708861
137
0.589655
387
2,900
4.204134
0.149871
0.047941
0.03319
0.051629
0.846343
0.820529
0.719115
0.665028
0.665028
0.633682
0
0.014493
0.262414
2,900
78
138
37.179487
0.746143
0.068621
0
0.731343
0
0
0.139837
0
0
0
0
0
0
1
0.149254
false
0
0.089552
0
0.38806
0.059701
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
06c9a2b8530162b36b57399f64b942d4d2384eb7
164
py
Python
apps/presupuesto/admin.py
edilio/cubanoshaciamiami.com
541a22998b7c7ad3acda784c5657bfdf79cc7f07
[ "MIT" ]
null
null
null
apps/presupuesto/admin.py
edilio/cubanoshaciamiami.com
541a22998b7c7ad3acda784c5657bfdf79cc7f07
[ "MIT" ]
null
null
null
apps/presupuesto/admin.py
edilio/cubanoshaciamiami.com
541a22998b7c7ad3acda784c5657bfdf79cc7f07
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import TipoDeGasto, PresupuestoDeGasto admin.site.register(TipoDeGasto) admin.site.register(PresupuestoDeGasto)
27.333333
52
0.829268
18
164
7.555556
0.555556
0.132353
0.25
0
0
0
0
0
0
0
0
0
0.103659
164
6
53
27.333333
0.92517
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
6609a45086c57a15190dcecf91e35dfc73259aed
78
py
Python
answers/001/answer1.py
PyLadiesTokyo/pyladies-tokyo-homework
3727451d073eb6e9b48f3cd0561c3b64b109f3a5
[ "Apache-2.0" ]
null
null
null
answers/001/answer1.py
PyLadiesTokyo/pyladies-tokyo-homework
3727451d073eb6e9b48f3cd0561c3b64b109f3a5
[ "Apache-2.0" ]
null
null
null
answers/001/answer1.py
PyLadiesTokyo/pyladies-tokyo-homework
3727451d073eb6e9b48f3cd0561c3b64b109f3a5
[ "Apache-2.0" ]
1
2020-12-27T13:05:44.000Z
2020-12-27T13:05:44.000Z
# 1から10までの整数を表示する for num in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]: print(num)
26
44
0.538462
16
78
2.625
0.9375
0
0
0
0
0
0
0
0
0
0
0.245614
0.269231
78
3
45
26
0.491228
0.192308
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
6638916f5159760226a21213fab0fff099a144f2
158
py
Python
segments/segmentsCommon.py
pinfort/jpeg-analyzer
5e68a1125d8626f34fdac2cf094cef5a2a8a1b58
[ "MIT" ]
5
2018-12-09T01:32:24.000Z
2019-10-23T17:38:50.000Z
segments/segmentsCommon.py
pinfort/jpeg-analyzer
5e68a1125d8626f34fdac2cf094cef5a2a8a1b58
[ "MIT" ]
null
null
null
segments/segmentsCommon.py
pinfort/jpeg-analyzer
5e68a1125d8626f34fdac2cf094cef5a2a8a1b58
[ "MIT" ]
2
2018-12-09T01:41:56.000Z
2019-09-28T03:10:04.000Z
from abc import ABCMeta, abstractmethod class SegmentsCommon(metaclass=ABCMeta): @abstractmethod def analyze(self, marker, body): pass
22.571429
41
0.702532
16
158
6.9375
0.875
0.378378
0
0
0
0
0
0
0
0
0
0
0.227848
158
6
42
26.333333
0.909836
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.2
0.2
0
0.6
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
1
0
0
1
0
0
5
663b03b22a0af9984081680da2ed3fb151315440
86
py
Python
autofront/tests/simple_test.py
JimmyLamothe/autofront
d179e54411f5d53046a5fa52b4430e09b01ebaca
[ "BSD-3-Clause" ]
1
2020-11-16T22:18:03.000Z
2020-11-16T22:18:03.000Z
autofront/tests/simple_test.py
JimmyLamothe/autofront
d179e54411f5d53046a5fa52b4430e09b01ebaca
[ "BSD-3-Clause" ]
null
null
null
autofront/tests/simple_test.py
JimmyLamothe/autofront
d179e54411f5d53046a5fa52b4430e09b01ebaca
[ "BSD-3-Clause" ]
null
null
null
import autofront from simple_functions import foo autofront.add(foo) autofront.run()
14.333333
32
0.825581
12
86
5.833333
0.666667
0.342857
0
0
0
0
0
0
0
0
0
0
0.104651
86
5
33
17.2
0.909091
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
663b6588c78c4b2d7f4f5cddb71f7f5b145f3ce6
54
py
Python
prototype/data/datasets/__init__.py
ModelTC/mqbench-paper
8d25a3b63c0cde4d904f77439fc435b49b0b33d4
[ "Apache-2.0" ]
6
2021-09-26T03:24:26.000Z
2022-03-17T09:19:18.000Z
prototype/data/datasets/__init__.py
TheGreatCold/mqbench-paper
8d25a3b63c0cde4d904f77439fc435b49b0b33d4
[ "Apache-2.0" ]
null
null
null
prototype/data/datasets/__init__.py
TheGreatCold/mqbench-paper
8d25a3b63c0cde4d904f77439fc435b49b0b33d4
[ "Apache-2.0" ]
2
2021-09-01T03:22:06.000Z
2021-09-19T06:16:38.000Z
from .imagenet_dataset import ImageNetDataset # noqa
27
53
0.833333
6
54
7.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.12963
54
1
54
54
0.93617
0.074074
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
b0a2caf9d2447dd1aa1058366507843de22c310d
143
py
Python
coding/learn_celery/config.py
yatao91/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
3
2021-05-25T16:58:52.000Z
2022-02-05T09:37:17.000Z
coding/learn_celery/config.py
yataosu/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
null
null
null
coding/learn_celery/config.py
yataosu/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- broker_url = 'redis://192.168.33.10/0' result_backend = 'redis://192.168.33.10/1' imports = ('learn_celery.tasks',)
17.875
42
0.629371
23
143
3.782609
0.782609
0.183908
0.252874
0.298851
0.344828
0
0
0
0
0
0
0.18254
0.118881
143
7
43
20.428571
0.507937
0.146853
0
0
0
0
0.533333
0.383333
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
b0a772eb4ccf5983bb0eef911f8bafb1f815a766
161
py
Python
scenarios/settlement_show/executable.py
timgates42/balanced-python
1df86b45c36a97ec2e214480c6806c4df3c79860
[ "MIT" ]
12
2015-04-12T06:18:33.000Z
2021-03-03T23:54:19.000Z
scenarios/settlement_show/executable.py
timgates42/balanced-python
1df86b45c36a97ec2e214480c6806c4df3c79860
[ "MIT" ]
1
2021-11-24T20:10:19.000Z
2021-11-24T20:10:19.000Z
scenarios/settlement_show/executable.py
timgates42/balanced-python
1df86b45c36a97ec2e214480c6806c4df3c79860
[ "MIT" ]
14
2015-03-23T17:52:06.000Z
2021-11-24T11:04:15.000Z
import balanced balanced.configure('ak-test-2eKlj1ZDfAcZSARMf3NMhBHywDej0avSY') settlement = balanced.Settlement.fetch('/settlements/ST6HmBuLJSEa82oUwId1AShW')
32.2
79
0.857143
13
161
10.615385
0.769231
0
0
0
0
0
0
0
0
0
0
0.051948
0.043478
161
5
79
32.2
0.844156
0
0
0
0
0
0.481481
0.481481
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
b0c414717803420c137b57f5097d0149ee8b7ac9
2,285
py
Python
Coursera/Google_IT_Automation_with_Python/01_Crash_Course_on_Python/Week_5/wk5_mod3_ex2.py
ssolomon2020/Self_Study_Python_Training
b253093b185f4a0d98cb8565f5fcf2b0e4a99556
[ "MIT" ]
null
null
null
Coursera/Google_IT_Automation_with_Python/01_Crash_Course_on_Python/Week_5/wk5_mod3_ex2.py
ssolomon2020/Self_Study_Python_Training
b253093b185f4a0d98cb8565f5fcf2b0e4a99556
[ "MIT" ]
null
null
null
Coursera/Google_IT_Automation_with_Python/01_Crash_Course_on_Python/Week_5/wk5_mod3_ex2.py
ssolomon2020/Self_Study_Python_Training
b253093b185f4a0d98cb8565f5fcf2b0e4a99556
[ "MIT" ]
null
null
null
# Specialization: Google IT Automation with Python # Course 01: Crash Course with Python # Week 5 Module Part 3 Exercise 02 # Student: Shawn Solomon # Learning Platform: Coursera.org # Let’s expand a bit on our Clothing classes from the previous in-video question. Your mission: # Finish the "Stock_by_Material" method and iterate over the amount of each item of a given # material that is in stock. When you’re finished, the script should add up to 10 cotton Polo shirts. # class Clothing: # stock={ 'name': [],'material' :[], 'amount':[]} # def __init__(self,name): # material = "" # self.name = name # def add_item(self, name, material, amount): # Clothing.stock['name'].append(self.name) # Clothing.stock['material'].append(self.material) # Clothing.stock['amount'].append(amount) # def Stock_by_Material(self, material): # count=0 # n=0 # for item in Clothing.stock['___']: # if item == material: # count += Clothing.___['amount'][n] # n+=1 # return count # # class shirt(Clothing): # material="Cotton" # class pants(Clothing): # material="Cotton" # # polo = shirt("Polo") # sweatpants = pants("Sweatpants") # polo.add_item(polo.name, polo.material, 4) # sweatpants.add_item(sweatpants.name, sweatpants.material, 6) # current_stock = polo.Stock_by_Material("Cotton") # print(current_stock) class Clothing: stock={ 'name': [],'material': [], 'amount': []} def __init__(self,name): material = "" self.name = name def add_item(self, name, material, amount): Clothing.stock['name'].append(self.name) Clothing.stock['material'].append(self.material) Clothing.stock['amount'].append(amount) def Stock_by_Material(self, material): count=0 n=0 for item in Clothing.stock['material']: if item == material: count += Clothing.stock['amount'][n] n+=1 return count class shirt(Clothing): material="Cotton" class pants(Clothing): material="Cotton" polo = shirt("Polo") sweatpants = pants("Sweatpants") polo.add_item(polo.name, polo.material, 4) sweatpants.add_item(sweatpants.name, sweatpants.material, 6) current_stock = polo.Stock_by_Material("Cotton") print(current_stock)
33.115942
102
0.661707
293
2,285
5.044369
0.300341
0.096752
0.050744
0.02977
0.742896
0.70636
0.70636
0.70636
0.70636
0.70636
0
0.009847
0.2
2,285
69
103
33.115942
0.798687
0.566302
0
0.074074
0
0
0.092551
0
0
0
0
0
0
1
0.111111
false
0
0
0
0.37037
0.037037
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
b0d95d877dbc18f3a49976b9ba5deae89d43a171
350
py
Python
finished/python_principles/05_type_check.py
UltiRequiem/daily-python-practice
31f72c45378be90b8fcadd30d7042819ee551a17
[ "MIT" ]
8
2021-05-29T23:30:12.000Z
2021-09-24T03:25:44.000Z
finished/python_principles/05_type_check.py
UltiRequiem/daily-python-practice
31f72c45378be90b8fcadd30d7042819ee551a17
[ "MIT" ]
null
null
null
finished/python_principles/05_type_check.py
UltiRequiem/daily-python-practice
31f72c45378be90b8fcadd30d7042819ee551a17
[ "MIT" ]
6
2021-06-02T14:20:24.000Z
2021-08-19T00:49:26.000Z
""" Your function should return True if both parameters are integers, and False otherwise. """ def only_ints(a, b) -> bool: return type(a) == int and type(b) == int def tests() -> None: print(only_ints(4, 8)) print(only_ints(4, "u")) print(only_ints("a", 4)) print(only_ints(4, True)) if __name__ == "__main__": tests()
18.421053
86
0.62
54
350
3.777778
0.537037
0.196078
0.254902
0.205882
0
0
0
0
0
0
0
0.018182
0.214286
350
18
87
19.444444
0.723636
0.245714
0
0
0
0
0.039063
0
0
0
0
0
0
1
0.222222
false
0
0
0.111111
0.333333
0.444444
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
0
1
0
5
b0ed5b6a6f6876d6d3b9b9b973debc09d4041302
136
py
Python
bot/permissions.py
Yakov-Varnaev/Epicker_bot
da077e0bcfbd41a2efaed74d71e7c4c818b842c0
[ "MIT" ]
null
null
null
bot/permissions.py
Yakov-Varnaev/Epicker_bot
da077e0bcfbd41a2efaed74d71e7c4c818b842c0
[ "MIT" ]
null
null
null
bot/permissions.py
Yakov-Varnaev/Epicker_bot
da077e0bcfbd41a2efaed74d71e7c4c818b842c0
[ "MIT" ]
null
null
null
from aiogram import types import config async def is_admin(message: types.Message): return message.from_user.id in config.ADMINS
17
48
0.786765
21
136
5
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.154412
136
7
49
19.428571
0.913043
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
9fe326bc9f4e12d04244fe6f4b5e92ea0f66a315
88
py
Python
Algorithm/__init__.py
DSC-Bennett-University/AI-ML-Starter
5dc411c686a703c37eaf7e88db184cb8972ad2d1
[ "MIT" ]
1
2021-10-01T05:54:02.000Z
2021-10-01T05:54:02.000Z
Algorithm/__init__.py
DSC-Bennett-University/AI-ML-Starter
5dc411c686a703c37eaf7e88db184cb8972ad2d1
[ "MIT" ]
7
2021-09-21T11:38:50.000Z
2021-10-06T10:28:11.000Z
Algorithm/__init__.py
DSC-Bennett-University/AI-ML-Starter
5dc411c686a703c37eaf7e88db184cb8972ad2d1
[ "MIT" ]
4
2021-09-21T12:08:05.000Z
2021-10-01T05:54:08.000Z
from .template import template from .tools import tools from .LinearReg import LinearReg
29.333333
32
0.840909
12
88
6.166667
0.416667
0
0
0
0
0
0
0
0
0
0
0
0.125
88
3
32
29.333333
0.961039
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
b00943e9be2f2f8a05e1b1e0bcce1f1c5bb49902
68
py
Python
exquiro/parsers/openponk/__init__.py
xhusar2/conceptual_model_parser
63eea4ab8b967a6d2ee612ffb4a06b93e97d0043
[ "MIT" ]
null
null
null
exquiro/parsers/openponk/__init__.py
xhusar2/conceptual_model_parser
63eea4ab8b967a6d2ee612ffb4a06b93e97d0043
[ "MIT" ]
null
null
null
exquiro/parsers/openponk/__init__.py
xhusar2/conceptual_model_parser
63eea4ab8b967a6d2ee612ffb4a06b93e97d0043
[ "MIT" ]
null
null
null
from .openpondk_class_diagram_parser import OpenponkClsDiagramParser
68
68
0.941176
7
68
8.714286
1
0
0
0
0
0
0
0
0
0
0
0
0.044118
68
1
68
68
0.938462
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
b04e83f0c6c5bd946cc75a63519557d702719e38
2,142
py
Python
pythingspeak/test_pythingspeak.py
mdauphin/pythingspeak
d5971e9347b17a14221564a368fe032ca6acaa03
[ "MIT" ]
null
null
null
pythingspeak/test_pythingspeak.py
mdauphin/pythingspeak
d5971e9347b17a14221564a368fe032ca6acaa03
[ "MIT" ]
null
null
null
pythingspeak/test_pythingspeak.py
mdauphin/pythingspeak
d5971e9347b17a14221564a368fe032ca6acaa03
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- import pythingspeak import unittest class TestPyThingSpeak(unittest.TestCase): def test_update(self): ts = pythingspeak.ThingSpeak( channel_id=59596, api_key='ISXCEH1JHRQR85O4' ) results = ts.update( [ 1, 2 ] ) self.assertTrue(results) def test_feeds(self): ts = pythingspeak.ThingSpeak( channel_id=59596, api_key='ISXCEH1JHRQR85O4' ) results = ts.feeds() self.assertTrue(results) def test_last(self): ts = pythingspeak.ThingSpeak( channel_id=59596, api_key='ISXCEH1JHRQR85O4' ) results = ts.last() self.assertTrue(results) def test_entry(self): ts = pythingspeak.ThingSpeak( channel_id=59596, api_key='ISXCEH1JHRQR85O4' ) results = ts.entry(1) self.assertTrue(results) def test_fields(self): ts = pythingspeak.ThingSpeak( channel_id=59596, api_key='ISXCEH1JHRQR85O4' ) results = ts.fields(1) self.assertTrue(results) def test_fields(self): ts = pythingspeak.ThingSpeak( channel_id=59596, api_key='ISXCEH1JHRQR85O4' ) results = ts.fields(1) self.assertTrue(results) def test_last_field(self): ts = pythingspeak.ThingSpeak( channel_id=59596, api_key='ISXCEH1JHRQR85O4' ) results = ts.last_field(1) self.assertTrue(results) def test_status_update(self): ts = pythingspeak.ThingSpeak( channel_id=59596, api_key='ISXCEH1JHRQR85O4' ) results = ts.status_update() self.assertTrue(results) def test_list_public_channels(self): ts = pythingspeak.ThingSpeak( channel_id=59596, api_key='ISXCEH1JHRQR85O4' ) results = ts.list_public_channels() self.assertTrue(results) def test_list_my_channels(self): ts = pythingspeak.ThingSpeak( channel_id=59596, api_key='ISXCEH1JHRQR85O4' ) results = ts.list_my_channels() self.assertTrue(results) def test_view_channel(self): ts = pythingspeak.ThingSpeak( channel_id=59596, api_key='ISXCEH1JHRQR85O4' ) results = ts.view_channel() self.assertTrue(results) def test_create_channel(self): ts = pythingspeak.ThingSpeak( channel_id=59596, api_key='ISXCEH1JHRQR85O4' ) results = ts.create_channel() self.assertTrue(results) if __name__ == '__main__': unittest.main()
31.5
78
0.745565
266
2,142
5.778195
0.150376
0.054652
0.140534
0.218608
0.847105
0.792453
0.679896
0.679896
0.679896
0.679896
0
0.062196
0.136788
2,142
68
79
31.5
0.769064
0.009804
0
0.528302
0
0
0.094295
0
0
0
0
0
0.226415
1
0.226415
false
0
0.037736
0
0.283019
0
0
0
0
null
0
0
1
1
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
c680e030b9ebdb230ac43be3ba2a8e742227cf78
113
py
Python
tests/test_spliceai_wrapper.py
RipollJ/spliceai-wrapper
29adcc7c93fa45bec953e9df078151653f419a73
[ "MIT" ]
2
2020-05-27T12:55:22.000Z
2020-05-30T12:59:49.000Z
tests/test_spliceai_wrapper.py
RipollJ/spliceai-wrapper
29adcc7c93fa45bec953e9df078151653f419a73
[ "MIT" ]
3
2019-10-08T03:38:55.000Z
2021-11-15T17:51:09.000Z
tests/test_spliceai_wrapper.py
RipollJ/spliceai-wrapper
29adcc7c93fa45bec953e9df078151653f419a73
[ "MIT" ]
2
2020-05-19T12:48:57.000Z
2020-05-20T05:44:21.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `spliceai_wrapper` package.""" import pytest # noqa
18.833333
43
0.637168
15
113
4.733333
1
0
0
0
0
0
0
0
0
0
0
0.010417
0.150442
113
5
44
22.6
0.729167
0.752212
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
c687f6be8dfca9ca6885acd96b6da1567a4b50ba
270
py
Python
slbo/policies/uniform_policy.py
LinZichuan/AdMRL
50a22d4d480e99125cc91cc65dfcc0df4a883ac6
[ "MIT" ]
27
2020-06-17T11:40:17.000Z
2021-11-16T07:39:33.000Z
slbo/policies/uniform_policy.py
LinZichuan/AdMRL
50a22d4d480e99125cc91cc65dfcc0df4a883ac6
[ "MIT" ]
3
2020-06-19T07:01:48.000Z
2020-06-19T07:14:57.000Z
slbo/policies/uniform_policy.py
LinZichuan/AdMRL
50a22d4d480e99125cc91cc65dfcc0df4a883ac6
[ "MIT" ]
5
2020-11-19T01:11:24.000Z
2021-12-24T09:03:56.000Z
import numpy as np from . import BasePolicy class UniformPolicy(BasePolicy): def __init__(self, dim_action): self.dim_action = dim_action def get_actions(self, states): return np.random.uniform(-1., 1., states.shape[:-1] + (self.dim_action,))
24.545455
81
0.685185
37
270
4.756757
0.567568
0.204545
0.221591
0
0
0
0
0
0
0
0
0.013761
0.192593
270
10
82
27
0.793578
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.285714
0.142857
0.857143
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
c6ac1de06c12088cfd7b5e0c3570e7c36efacf0e
68
py
Python
libMap/__init__.py
ChrisSJard/PythonGUI-WinApplication1
54f658e7d345a63d09bff683a635d01d57856e6e
[ "Apache-2.0" ]
null
null
null
libMap/__init__.py
ChrisSJard/PythonGUI-WinApplication1
54f658e7d345a63d09bff683a635d01d57856e6e
[ "Apache-2.0" ]
null
null
null
libMap/__init__.py
ChrisSJard/PythonGUI-WinApplication1
54f658e7d345a63d09bff683a635d01d57856e6e
[ "Apache-2.0" ]
null
null
null
''' MAP v-SCREEN gargle test - Shimadzu 8020 H Date: 30/11/2020 '''
17
43
0.661765
12
68
3.75
1
0
0
0
0
0
0
0
0
0
0
0.214286
0.176471
68
4
44
17
0.589286
0.882353
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
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
c6b8d428a66aa6d3e2e0df39f78679dd2657686d
105
py
Python
Programs/functions/returnFunction.py
LuciKritZ/python
ed5500f5aad3cb15354ca5ebf71748029fc6ae77
[ "MIT" ]
null
null
null
Programs/functions/returnFunction.py
LuciKritZ/python
ed5500f5aad3cb15354ca5ebf71748029fc6ae77
[ "MIT" ]
null
null
null
Programs/functions/returnFunction.py
LuciKritZ/python
ed5500f5aad3cb15354ca5ebf71748029fc6ae77
[ "MIT" ]
null
null
null
def display(): def message(): return "Hello" return message fun = display() print(fun())
15
22
0.590476
12
105
5.166667
0.583333
0
0
0
0
0
0
0
0
0
0
0
0.266667
105
7
23
15
0.805195
0
0
0
0
0
0.04717
0
0
0
0
0
0
1
0.333333
false
0
0
0.166667
0.666667
0.166667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
c6e3e9d0abc03b1874ad93609b620dcead66d6e3
4,874
py
Python
repairfiles.py
MrForg3t/sourcecodetrm
de9ce6eb1714d28998ef1f4a2ebc05cd7bf7d78f
[ "MIT" ]
null
null
null
repairfiles.py
MrForg3t/sourcecodetrm
de9ce6eb1714d28998ef1f4a2ebc05cd7bf7d78f
[ "MIT" ]
null
null
null
repairfiles.py
MrForg3t/sourcecodetrm
de9ce6eb1714d28998ef1f4a2ebc05cd7bf7d78f
[ "MIT" ]
null
null
null
from urllib import request from os import path, system from platform import system as osInfo from time import sleep from urllib import request def repairFileMain(): print("\n") repairAppData() sleep(.2) print("\n") repairEssential() sleep(.2) print("\n") def repairAppData(): try: if osInfo() == "Windows": if not path.exists("data"): system("mkdir data") else: print("No needed to repair data directory.") if not path.exists("data/appData.json"): response = request.urlretrieve("https://raw.githubusercontent.com/MrForg3t/tfxdwn/main/data/appData.json", "data/appData.json") sleep(0.1) print("data/appData.json successfully repaired.") else: print("No needed to repair data/appData.json.") sleep(.2) if not path.exists("data/uuidData.json"): system("type nul > data/uuidData.json") print("data/uuidData.json successfully repaired.") else: print("No needed to repair data/uuidData.json.") if osInfo() == "Darwin": if not path.exists("data"): system("mkdir data") else: print("No needed to repair data directory.") if not path.exists("data/appData.json"): response = request.urlretrieve("https://raw.githubusercontent.com/MrForg3t/tfxdwn/main/data/appData.json", "data/appData.json") sleep(0.1) print("data/appData.json successfully repaired.") else: print("No needed to repair data/appData.json.") sleep(.2) if not path.exists("data/uuidData.json"): system("touch data/uuidData.json") print("data/uuidData.json successfully repaired.") else: print("No needed to repair data/uuidData.json.") if osInfo() == "Linux": if not path.exists("data"): system("mkdir data") else: print("No needed to repair data directory.") if not path.exists("data/appData.json"): response = request.urlretrieve("https://raw.githubusercontent.com/MrForg3t/tfxdwn/main/data/appData.json", "data/appData.json") sleep(0.1) print("data/appData.json successfully repaired.") else: print("No needed to repair data/appData.json.") sleep(.2) if not path.exists("data/uuidData.json"): system("touch data/uuidData.json") print("data/uuidData.json successfully repaired.") else: print("No needed to repair data/uuidData.json.") except Exception as error: print(f"Error: {error}") def repairEssential(): try: if osInfo() == "Windows": if not path.exists("main.exe"): response = request.urlretrieve("https://github.com/MrForg3t/tfxdwn/blob/main/main.exe?raw=true", "main.exe") print("main.exe successfully repaired") sleep(.1) else: print("No needed to repair main.exe.") if not path.exists("launcher.exe"): response = request.urlretrieve("https://github.com/MrForg3t/tfxdwn/blob/main/launcher.exe?raw=true", "launcher.exe") print("launcher.exe successfully repaired") sleep(.1) else: print("No needed to repair launcher.exe.") if not path.exists("uuid_gen.exe"): response = request.urlretrieve("https://github.com/MrForg3t/tfxdwn/blob/main/uuid_gen.exe?raw=true", "uuid_gen.exe") print("uuidgen.exe successfully repaired") sleep(.1) else: print("No needed to repair uuid_gen.exe.") if not path.exists("checkfileint.exe"): response = request.urlretrieve("https://github.com/MrForg3t/tfxdwn/blob/main/checkfileint.exe?raw=true", "checkfileint.exe") print("checkfileint.exe successfully repaired") sleep(.1) else: print("No needed to repair checkfileint.exe.") if osInfo() == "Darwin": print("Not supported for now on that platform.") if osInfo() == "Linux": print("Not supported for now on that platform.") except Exception as error: print(f"Error: {error}") if __name__ == '__main__': repairFileMain() sleep(7)
33.156463
144
0.533032
510
4,874
5.070588
0.143137
0.063805
0.087007
0.075406
0.79389
0.773009
0.773009
0.773009
0.695282
0.695282
0
0.00724
0.348174
4,874
147
145
33.156463
0.806736
0
0
0.737864
0
0.038835
0.391838
0
0
0
0
0
0
1
0.029126
false
0
0.048544
0
0.07767
0.291262
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c6f5b57e9157f7c17bb6f3082af0b5d89d425e82
298
py
Python
main.py
pesikj/DataAnalysisUsingPython
00269a7a7b5388fbbdcf3ddadd951a80a07f9c3a
[ "MIT" ]
null
null
null
main.py
pesikj/DataAnalysisUsingPython
00269a7a7b5388fbbdcf3ddadd951a80a07f9c3a
[ "MIT" ]
null
null
null
main.py
pesikj/DataAnalysisUsingPython
00269a7a7b5388fbbdcf3ddadd951a80a07f9c3a
[ "MIT" ]
null
null
null
from statistical_hypothesis_testing.plots import plots_z_test from statistical_hypothesis_testing.tails import Tail #plots_z_test.create_critical_region_plot(alphas=[0.1, 0.05, 0.01], tails=Tail.RIGHT_TAILED) plots_z_test.create_p_value_plot(0.5109,alpha=0.05,lang='cs', tails=Tail.RIGHT_TAILED)
42.571429
92
0.842282
52
298
4.480769
0.519231
0.077253
0.128755
0.274678
0
0
0
0
0
0
0
0.056738
0.053691
298
6
93
49.666667
0.769504
0.305369
0
0
0
0
0.009709
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
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
05b273137ad8f8c40be4550bda786ffd468b9e75
362
py
Python
src/ef/external_field_uniform.py
tnakaicode/ChargedPaticle-LowEnergy
47b751bcada2af7fc50cef587a48b1a3c12bcbba
[ "MIT" ]
6
2019-04-14T06:19:40.000Z
2021-09-14T13:46:26.000Z
src/ef/external_field_uniform.py
tnakaicode/ChargedPaticle-LowEnergy
47b751bcada2af7fc50cef587a48b1a3c12bcbba
[ "MIT" ]
31
2018-03-02T12:05:20.000Z
2019-02-20T09:29:08.000Z
src/ef/external_field_uniform.py
tnakaicode/ChargedPaticle-LowEnergy
47b751bcada2af7fc50cef587a48b1a3c12bcbba
[ "MIT" ]
10
2017-12-21T15:16:55.000Z
2020-10-31T23:59:50.000Z
from ef.external_field import ExternalField class ExternalFieldUniform(ExternalField): def __init__(self, name, electric_or_magnetic, uniform_field_vector): super().__init__(name, electric_or_magnetic) self.uniform_field_vector = uniform_field_vector def get_at_points(self, positions, time): return self.uniform_field_vector
30.166667
73
0.773481
44
362
5.840909
0.545455
0.18677
0.280156
0.171206
0
0
0
0
0
0
0
0
0.160221
362
11
74
32.909091
0.845395
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.714286
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
05b8e002f7910268a9002f66a3d07f197f31db7a
1,778
py
Python
utils/cloud/cloud_client/__init__.py
alexfdo/asr_eval
d1573cc3113ce9df1ae64c3b91b5f495e2cff9a3
[ "MIT" ]
3
2020-03-06T17:20:34.000Z
2021-09-09T09:18:48.000Z
utils/cloud/cloud_client/__init__.py
alexfdo/asr_eval
d1573cc3113ce9df1ae64c3b91b5f495e2cff9a3
[ "MIT" ]
1
2020-02-03T18:25:08.000Z
2020-02-03T18:25:08.000Z
utils/cloud/cloud_client/__init__.py
alexfdo/asr_eval
d1573cc3113ce9df1ae64c3b91b5f495e2cff9a3
[ "MIT" ]
1
2020-01-29T19:47:54.000Z
2020-01-29T19:47:54.000Z
# coding: utf-8 # flake8: noqa """ ASR documentation No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 1.0.dev Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import # import apis into sdk package from cloud_client.api.packages_api import PackagesApi from cloud_client.api.recognize_api import RecognizeApi from cloud_client.api.session_api import SessionApi # import ApiClient from cloud_client.cloud_api_client import CloudApiClient from cloud_client.configuration import Configuration # import models into sdk package from cloud_client.models.advanced_recognition_request_dto import AdvancedRecognitionRequestDto from cloud_client.models.asr_advanced_result_dto import ASRAdvancedResultDto from cloud_client.models.asr_result_dto import ASRResultDto from cloud_client.models.audio_file_dto import AudioFileDto from cloud_client.models.auth_request_dto import AuthRequestDto from cloud_client.models.auth_response_dto import AuthResponseDto from cloud_client.models.auth_status_dto import AuthStatusDto from cloud_client.models.message_dto import MessageDto from cloud_client.models.package_dto import PackageDto from cloud_client.models.recognition_request_dto import RecognitionRequestDto from cloud_client.models.sessionless_recognition_request_dto import SessionlessRecognitionRequestDto from cloud_client.models.start_session_request import StartSessionRequest from cloud_client.models.status_dto import StatusDto from cloud_client.models.stream_request_dto import StreamRequestDto from cloud_client.models.stream_response_dto import StreamResponseDto from cloud_client.models.word_dto import WordDto
41.348837
119
0.865017
237
1,778
6.227848
0.324895
0.128049
0.213415
0.227642
0.210705
0.090786
0.051491
0
0
0
0
0.004329
0.090551
1,778
42
120
42.333333
0.908472
0.188976
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
05e108ee92867afb8794b956bcf9b413dc00ac01
206
py
Python
webSys/dbweb/util/__init__.py
Qiumy/FIF
8c9c58504ecab510dc0a96944f0031a3fd513d74
[ "Apache-2.0" ]
2
2018-12-21T02:01:03.000Z
2019-10-17T08:07:04.000Z
webSys/dbweb/util/__init__.py
Qiumy/FIF
8c9c58504ecab510dc0a96944f0031a3fd513d74
[ "Apache-2.0" ]
null
null
null
webSys/dbweb/util/__init__.py
Qiumy/FIF
8c9c58504ecab510dc0a96944f0031a3fd513d74
[ "Apache-2.0" ]
1
2018-06-01T07:56:09.000Z
2018-06-01T07:56:09.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- from flask import Blueprint filter_blueprint = Blueprint('filters', __name__) # Register all the filter. from . import time_process, text_process, user_manage
29.428571
53
0.747573
28
206
5.214286
0.785714
0
0
0
0
0
0
0
0
0
0
0.005587
0.131068
206
7
53
29.428571
0.810056
0.330097
0
0
0
0
0.051471
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
af2638ff33d3fba5e4671ad6ba6d98342710dd02
91
py
Python
models/retinanet/__init__.py
lihaojia24/pytorch-dt
0a8bda73d2055e960ac4840c651b5dff61bc4f5f
[ "MIT" ]
null
null
null
models/retinanet/__init__.py
lihaojia24/pytorch-dt
0a8bda73d2055e960ac4840c651b5dff61bc4f5f
[ "MIT" ]
null
null
null
models/retinanet/__init__.py
lihaojia24/pytorch-dt
0a8bda73d2055e960ac4840c651b5dff61bc4f5f
[ "MIT" ]
null
null
null
from .fpn import FPN50 from .net import RetinaNet from .box_coder import RetinaBoxCoder
22.75
38
0.802198
13
91
5.538462
0.692308
0
0
0
0
0
0
0
0
0
0
0.026316
0.164835
91
3
39
30.333333
0.921053
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
af747dc207dec3cbffc1da1f8850f8e0ae2ec7ff
110
py
Python
lianapy/graphics.py
mlincett/lianapy
e38c58ffd11a886b5c025621d6ed60516ceb5b2a
[ "MIT" ]
null
null
null
lianapy/graphics.py
mlincett/lianapy
e38c58ffd11a886b5c025621d6ed60516ceb5b2a
[ "MIT" ]
null
null
null
lianapy/graphics.py
mlincett/lianapy
e38c58ffd11a886b5c025621d6ed60516ceb5b2a
[ "MIT" ]
null
null
null
def figure(nrows=1, ncols=1, figsize=(6,6), dpi=150): return plt.subplots(nrows, nclos, figsize, dpi=dpi)
36.666667
55
0.690909
19
110
4
0.684211
0
0
0
0
0
0
0
0
0
0
0.072917
0.127273
110
2
56
55
0.71875
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
af9f58fe0e660b08a353e17203614fe5d6b9e0d5
46
py
Python
chatbot/__init__.py
rdorado79/chatbotlib
bfe44593fe218d13a8c55f80f0c13db67605a5b2
[ "MIT" ]
null
null
null
chatbot/__init__.py
rdorado79/chatbotlib
bfe44593fe218d13a8c55f80f0c13db67605a5b2
[ "MIT" ]
null
null
null
chatbot/__init__.py
rdorado79/chatbotlib
bfe44593fe218d13a8c55f80f0c13db67605a5b2
[ "MIT" ]
null
null
null
# Example package with a console entry point
15.333333
44
0.782609
7
46
5.142857
1
0
0
0
0
0
0
0
0
0
0
0
0.195652
46
2
45
23
0.972973
0.913043
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
bb6dc22e8ea52200d58eae5889b340543ca4b618
51
py
Python
spacy_thai/__init__.py
KoichiYasuoka/spaCy-Thai
e70aedbd3c8c88e317a4c254d91b3d4151655d1d
[ "MIT" ]
15
2020-09-26T20:59:12.000Z
2022-03-10T05:14:53.000Z
spacy_thai/__init__.py
KoichiYasuoka/spaCy-Thai
e70aedbd3c8c88e317a4c254d91b3d4151655d1d
[ "MIT" ]
4
2020-12-13T18:58:08.000Z
2022-02-21T01:07:37.000Z
spacy_thai/__init__.py
KoichiYasuoka/spaCy-Thai
e70aedbd3c8c88e317a4c254d91b3d4151655d1d
[ "MIT" ]
3
2020-09-27T11:25:42.000Z
2021-05-13T08:48:03.000Z
from .spacy_thai import ThaiTagger,ThaiParser,load
25.5
50
0.862745
7
51
6.142857
1
0
0
0
0
0
0
0
0
0
0
0
0.078431
51
1
51
51
0.914894
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
bb809b94005596a2a1d4a23ab288a44cc7045e25
141
py
Python
program5.py
kashifrepo/Python-Saylani
1ac9fe05012ad716d4ef30d771d9828f91221ac6
[ "Apache-2.0" ]
null
null
null
program5.py
kashifrepo/Python-Saylani
1ac9fe05012ad716d4ef30d771d9828f91221ac6
[ "Apache-2.0" ]
null
null
null
program5.py
kashifrepo/Python-Saylani
1ac9fe05012ad716d4ef30d771d9828f91221ac6
[ "Apache-2.0" ]
null
null
null
# Program no 5 1stname = input(" Enter 1st name ") lastname = input(" Enter last name ") print 1stname[::-1] print lastname[::-1]
20.142857
38
0.617021
19
141
4.578947
0.631579
0.229885
0
0
0
0
0
0
0
0
0
0.055556
0.234043
141
7
39
20.142857
0.75
0.085106
0
0
0
0
0.270492
0
0
0
0
0
0
0
null
null
0
0
null
null
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
bb94c39fa96235061eee688defe888eb7cca4d44
238
py
Python
utils/schedulers.py
Shawn-Guo-CN/EmergentNumerals
ef9786e5bd6c8c456143ad305742340e510f5edb
[ "MIT" ]
2
2019-08-16T21:37:55.000Z
2019-08-18T18:11:28.000Z
utils/schedulers.py
Shawn-Guo-CN/EmergentNumerals
ef9786e5bd6c8c456143ad305742340e510f5edb
[ "MIT" ]
null
null
null
utils/schedulers.py
Shawn-Guo-CN/EmergentNumerals
ef9786e5bd6c8c456143ad305742340e510f5edb
[ "MIT" ]
null
null
null
from utils.conf import args def tau_scheduler(acc): return args.tau # if acc > 0.95: # return 0.1 # elif acc > 0.9: # return 0.5 # elif acc > 0.8: # return 1.0 # else: # return args.tau
19.833333
27
0.512605
37
238
3.27027
0.513514
0.099174
0.214876
0
0
0
0
0
0
0
0
0.087248
0.37395
238
12
28
19.833333
0.724832
0.491597
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
5
bbd438523d7877e78c030d4778fb9485bdd7f4ad
478
py
Python
cymon_v2/komand_cymon_v2/actions/__init__.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
1
2020-03-18T09:14:55.000Z
2020-03-18T09:14:55.000Z
cymon_v2/komand_cymon_v2/actions/__init__.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
1
2021-02-23T23:57:37.000Z
2021-02-23T23:57:37.000Z
cymon_v2/komand_cymon_v2/actions/__init__.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
null
null
null
# GENERATED BY KOMAND SDK - DO NOT EDIT from .create_feed.action import CreateFeed from .get_feed_details.action import GetFeedDetails from .get_report_document.action import GetReportDocument from .list_all_feeds.action import ListAllFeeds from .list_user_feeds.action import ListUserFeeds from .search.action import Search from .submit_report.action import SubmitReport from .submit_reports_in_bulk.action import SubmitReportsInBulk from .update_feed.action import UpdateFeed
43.454545
62
0.864017
66
478
6.045455
0.515152
0.270677
0.080201
0
0
0
0
0
0
0
0
0
0.094142
478
10
63
47.8
0.921478
0.077406
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
bbdf983b5082ed39dd9de59fc5860b7d988b933b
290
py
Python
align/cli.py
kba/cis-ocrd-py
4b6d2a29ac82cf1ec734a87314a6c774271d09bc
[ "MIT" ]
null
null
null
align/cli.py
kba/cis-ocrd-py
4b6d2a29ac82cf1ec734a87314a6c774271d09bc
[ "MIT" ]
null
null
null
align/cli.py
kba/cis-ocrd-py
4b6d2a29ac82cf1ec734a87314a6c774271d09bc
[ "MIT" ]
null
null
null
import click from ocrd.decorators import ocrd_cli_options, ocrd_cli_wrap_processor from align.aligner import Aligner @click.command() @ocrd_cli_options def cis_ocrd_align(*args, **kwargs): # kwargs['cache_enabled'] = False return ocrd_cli_wrap_processor(Aligner, *args, **kwargs)
26.363636
69
0.786207
41
290
5.243902
0.487805
0.130233
0.130233
0.186047
0
0
0
0
0
0
0
0
0.117241
290
10
70
29
0.839844
0.106897
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
true
0
0.428571
0.142857
0.714286
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
1
1
0
0
5
a52e756102241b8ea4824f9de3490cd248e22558
14,034
py
Python
graphGenerator.py
carlklier/flappai-bird
ea640005494eaf70abc22c41e502593a8aff436f
[ "Apache-2.0" ]
null
null
null
graphGenerator.py
carlklier/flappai-bird
ea640005494eaf70abc22c41e502593a8aff436f
[ "Apache-2.0" ]
null
null
null
graphGenerator.py
carlklier/flappai-bird
ea640005494eaf70abc22c41e502593a8aff436f
[ "Apache-2.0" ]
null
null
null
#%% import base64 import matplotlib.pyplot as plt import numpy as np import json from ast import literal_eval data1encoded = 'eyJkZGFFbmFibGVkIjpmYWxzZSwiZGF0YSI6W3sic3RhcnRUaW1lIjoxNjE5MTM3MjUxMzg1LCJkdXJhdGlvbiI6NjQ1Miwic2NvcmUiOjAsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMX0seyJzdGFydFRpbWUiOjE2MTkxMzcyNjMwMDYsImR1cmF0aW9uIjo3NTYwLCJzY29yZSI6MCwiZ3Jhdml0eSI6MC4yNSwicGlwZUludGVydmFsIjoxNDAwLCJwaXBlaGVpZ2h0Ijo5MCwiY29sbGlzaW9uUG9zaXRpb24iOjExfSx7InN0YXJ0VGltZSI6MTYxOTEzNzI3NTI0NywiZHVyYXRpb24iOjEyNzQ4LCJzY29yZSI6NCwiZ3Jhdml0eSI6MC4yNSwicGlwZUludGVydmFsIjoxNDAwLCJwaXBlaGVpZ2h0Ijo5MCwiY29sbGlzaW9uUG9zaXRpb24iOjExfSx7InN0YXJ0VGltZSI6MTYxOTEzNzI5ODc5OSwiZHVyYXRpb24iOjczOTcsInNjb3JlIjowLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTM3MzEwNzQxLCJkdXJhdGlvbiI6MTUyNTAsInNjb3JlIjo1LCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTF9LHsic3RhcnRUaW1lIjoxNjE5MTM3MzMxMDg0LCJkdXJhdGlvbiI6MjYyNjgsInNjb3JlIjoxMiwiZ3Jhdml0eSI6MC4yNSwicGlwZUludGVydmFsIjoxNDAwLCJwaXBlaGVpZ2h0Ijo5MCwiY29sbGlzaW9uUG9zaXRpb24iOjEyfSx7InN0YXJ0VGltZSI6MTYxOTEzNzM2MTc0NiwiZHVyYXRpb24iOjkxNzAsInNjb3JlIjoxLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTM3Mzc1Mjg1LCJkdXJhdGlvbiI6MTI2MzEsInNjb3JlIjozLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTM3MzkyMzM1LCJkdXJhdGlvbiI6MjA0MjcsInNjb3JlIjo3LCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTF9LHsic3RhcnRUaW1lIjoxNjE5MTM3NDE3MTMyLCJkdXJhdGlvbiI6OTQwNSwic2NvcmUiOjEsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMn0seyJzdGFydFRpbWUiOjE2MTkxMzc0MzA3MjgsImR1cmF0aW9uIjoxNjAxNiwic2NvcmUiOjUsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMX0seyJzdGFydFRpbWUiOjE2MTkxMzc0NjEwNDUsImR1cmF0aW9uIjo4MTU2LCJzY29yZSI6MCwiZ3Jhdml0eSI6MC4yNSwicGlwZUludGVydmFsIjoxNDAwLCJwaXBlaGVpZ2h0Ijo5MCwiY29sbGlzaW9uUG9zaXRpb24iOjExfSx7InN0YXJ0VGltZSI6MTYxOTEzNzU1Njk1NCwiZHVyYXRpb24iOjg2NzIsInNjb3JlIjoxLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTM3NTY5NzA4LCJkdXJhdGlvbiI6MTIwNDAsInNjb3JlIjozLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTF9LHsic3RhcnRUaW1lIjoxNjE5MTM3NTg2MjU1LCJkdXJhdGlvbiI6MTI3NTIsInNjb3JlIjozLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTF9LHsic3RhcnRUaW1lIjoxNjE5MTM3NjAzNzE5LCJkdXJhdGlvbiI6OTM1MCwic2NvcmUiOjEsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMn0seyJzdGFydFRpbWUiOjE2MTkxMzc2MTY5OTcsImR1cmF0aW9uIjoxNzczMSwic2NvcmUiOjcsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMn0seyJzdGFydFRpbWUiOjE2MTkxMzc2MzkwODMsImR1cmF0aW9uIjo4Nzk3LCJzY29yZSI6MSwiZ3Jhdml0eSI6MC4yNSwicGlwZUludGVydmFsIjoxNDAwLCJwaXBlaGVpZ2h0Ijo5MCwiY29sbGlzaW9uUG9zaXRpb24iOjExfSx7InN0YXJ0VGltZSI6MTYxOTEzNzY1MjMyNywiZHVyYXRpb24iOjc4OTMsInNjb3JlIjoxLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTM3NjY1MTMxLCJkdXJhdGlvbiI6Njg1Miwic2NvcmUiOjAsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMn0seyJzdGFydFRpbWUiOjE2MTkxMzc2NzYzODcsImR1cmF0aW9uIjo4ODg5LCJzY29yZSI6MSwiZ3Jhdml0eSI6MC4yNSwicGlwZUludGVydmFsIjoxNDAwLCJwaXBlaGVpZ2h0Ijo5MCwiY29sbGlzaW9uUG9zaXRpb24iOjEyfSx7InN0YXJ0VGltZSI6MTYxOTEzNzY4OTEwMiwiZHVyYXRpb24iOjcwMjAsInNjb3JlIjowLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTM3Njk5Nzk3LCJkdXJhdGlvbiI6ODcxNSwic2NvcmUiOjEsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMn1dfQ==' data1bytes = base64.b64decode(data1encoded) data1 = json.loads(data1bytes.decode('utf8')) data2encoded = 'eyJkZGFFbmFibGVkIjpmYWxzZSwiZGF0YSI6W3sic3RhcnRUaW1lIjoxNjE5MTg0NTQ1Nzk0LCJkdXJhdGlvbiI6NjMyMiwic2NvcmUiOjAsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMn0seyJzdGFydFRpbWUiOjE2MTkxODQ1NzMyMDgsImR1cmF0aW9uIjo2NTQ1LCJzY29yZSI6MCwiZ3Jhdml0eSI6MC4yNSwicGlwZUludGVydmFsIjoxNDAwLCJwaXBlaGVpZ2h0Ijo5MCwiY29sbGlzaW9uUG9zaXRpb24iOjExfSx7InN0YXJ0VGltZSI6MTYxOTE4NDU4NzE3NSwiZHVyYXRpb24iOjY5NjEsInNjb3JlIjowLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTF9LHsic3RhcnRUaW1lIjoxNjE5MTg0NjI2ODk3LCJkdXJhdGlvbiI6MTIzODYsInNjb3JlIjo0LCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTg0NjY5OTE3LCJkdXJhdGlvbiI6MzA4NjUsInNjb3JlIjoxOCwiZ3Jhdml0eSI6MC4yNSwicGlwZUludGVydmFsIjoxNDAwLCJwaXBlaGVpZ2h0Ijo5MCwiY29sbGlzaW9uUG9zaXRpb24iOjExfSx7InN0YXJ0VGltZSI6MTYxOTE4NDk5NTc0NSwiZHVyYXRpb24iOjc1MjAsInNjb3JlIjoxLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTg1MDA4MTAzLCJkdXJhdGlvbiI6MTc0NTYsInNjb3JlIjo4LCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTg1Mzg2ODE4LCJkdXJhdGlvbiI6MTA4ODIsInNjb3JlIjozLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTg1NDk1NTE3LCJkdXJhdGlvbiI6MjA1NzcsInNjb3JlIjoxMCwiZ3Jhdml0eSI6MC4yNSwicGlwZUludGVydmFsIjoxNDAwLCJwaXBlaGVpZ2h0Ijo5MCwiY29sbGlzaW9uUG9zaXRpb24iOjExfSx7InN0YXJ0VGltZSI6MTYxOTE4NTUyMzk3MCwiZHVyYXRpb24iOjE0MjczLCJzY29yZSI6NiwiZ3Jhdml0eSI6MC4yNSwicGlwZUludGVydmFsIjoxNDAwLCJwaXBlaGVpZ2h0Ijo5MCwiY29sbGlzaW9uUG9zaXRpb24iOjEyfSx7InN0YXJ0VGltZSI6MTYxOTE4NTU0NTAwOSwiZHVyYXRpb24iOjY2MDksInNjb3JlIjowLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTF9LHsic3RhcnRUaW1lIjoxNjE5MTg1NTU2OTg2LCJkdXJhdGlvbiI6MTAwMTgsInNjb3JlIjoyLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTg1NTcxMDg4LCJkdXJhdGlvbiI6MTA3MzcsInNjb3JlIjozLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTF9LHsic3RhcnRUaW1lIjoxNjE5MTg1NTg5MTEyLCJkdXJhdGlvbiI6NjIxMCwic2NvcmUiOjAsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMX0seyJzdGFydFRpbWUiOjE2MTkxODU1OTk4MjQsImR1cmF0aW9uIjo3MjAxLCJzY29yZSI6MCwiZ3Jhdml0eSI6MC4yNSwicGlwZUludGVydmFsIjoxNDAwLCJwaXBlaGVpZ2h0Ijo5MCwiY29sbGlzaW9uUG9zaXRpb24iOjExfSx7InN0YXJ0VGltZSI6MTYxOTE4NTYxMTY3MywiZHVyYXRpb24iOjgxMTMsInNjb3JlIjoxLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTg1NjI0MDAxLCJkdXJhdGlvbiI6ODc4NSwic2NvcmUiOjIsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMX0seyJzdGFydFRpbWUiOjE2MTkxODU2MzY4MjMsImR1cmF0aW9uIjoxNTI2NSwic2NvcmUiOjYsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMX0seyJzdGFydFRpbWUiOjE2MTkxODU2NTYzNjgsImR1cmF0aW9uIjoyMjg4MSwic2NvcmUiOjEyLCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTF9LHsic3RhcnRUaW1lIjoxNjE5MTg1NjgzNjM3LCJkdXJhdGlvbiI6MTIxNDQsInNjb3JlIjo0LCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTJ9LHsic3RhcnRUaW1lIjoxNjE5MTg1Njk5NTgyLCJkdXJhdGlvbiI6MTQyNzMsInNjb3JlIjo2LCJncmF2aXR5IjowLjI1LCJwaXBlSW50ZXJ2YWwiOjE0MDAsInBpcGVoZWlnaHQiOjkwLCJjb2xsaXNpb25Qb3NpdGlvbiI6MTF9LHsic3RhcnRUaW1lIjoxNjE5MTg1NzIwOTkwLCJkdXJhdGlvbiI6ODgzMywic2NvcmUiOjIsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMn0seyJzdGFydFRpbWUiOjE2MTkxODU3MzY1MzAsImR1cmF0aW9uIjoxMDczNywic2NvcmUiOjMsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc2l0aW9uIjoxMX1dfQ==' data2bytes = base64.b64decode(data2encoded) data2 = json.loads(data2bytes.decode('utf8')) scores1 = [] gravity1 = [] pipeInterval1 = [] pipeHeight1 = [] for data in data1["data"]: scores1.append(data['score']) gravity1.append(data['gravity']) pipeInterval1.append(data['pipeInterval']) pipeHeight1.append(data['pipeheight']) scores2 = [] gravity2 = [] pipeInterval2 = [] pipeHeight2 = [] for data in data2["data"]: scores2.append(data['score']) gravity2.append(data['gravity']) pipeInterval2.append(data['pipeInterval']) pipeHeight2.append(data['pipeheight']) x = np.arange(1, 24, 1) fig, ax = plt.subplots() # Create a figure containing a single axes. ax.plot(x, scores1, label='JOE') ax.plot(x, scores2, label='DALTON') plt.xticks(x) ax.set_xlabel('Playthrough') ax.set_ylabel('Score') ax.set_title('Scores over the playthroughs') ax.legend() fig2, ax2 = plt.subplots() # Create a figure containing a single axes. ax2.plot(x, gravity1, label='player1') ax2.plot(x, gravity2, label='player2') plt.xticks(x) ax2.set_xlabel('Playthrough') ax2.set_ylabel('Gravity') ax2.set_title('Gravity strength over 10 playthroughs') ax2.legend() fig3, ax3 = plt.subplots() # Create a figure containing a single axes. ax3.plot(x, pipeInterval1, label='player1') ax3.plot(x, pipeInterval2, label='player2') plt.xticks(x) ax3.set_xlabel('Playthrough') ax3.set_ylabel('Pipe Interval Distance') ax3.set_title('Pipe interval distance over 10 playthroughs') ax3.legend() fig4, ax4 = plt.subplots() # Create a figure containing a single axes. ax4.plot(x, pipeHeight1, label='player1') ax4.plot(x, pipeHeight2, label='player2') plt.xticks(x) ax4.set_xlabel('Playthrough') ax4.set_ylabel('Pipe Height') ax4.set_title('Pipe height over 10 playthroughs') ax4.legend() # %% import csv import base64 import matplotlib.pyplot as plt import numpy as np import json data = [] with open('notddaEnabledData.csv') as csvfile: reader = csv.reader(csvfile) for row in reader: data.append(row[0]) allData = [] for testerData in data: dataBytes = base64.b64decode(testerData) jsonData = json.loads(dataBytes.decode('utf8')) scores = [] pipeInterval = [] pipeHeight = [] i = 0 for run in jsonData["data"]: if(i != 0 and run['pipeInterval'] == 1410.5): break scores.append(run['score']) pipeInterval.append(run['pipeInterval']) pipeHeight.append(run['pipeheight']) i = i + 1 xvals = np.arange(1, len(scores) + 1, 1) playerData = {"xvals":xvals, "scores":scores, "pipeInterval":pipeInterval, "pipeHeight":pipeHeight} allData.append(playerData) fig, ax = plt.subplots() ax.set_xlabel('Playthrough') ax.set_ylabel('Score') ax.set_title('DDA Enabled Scores') for i in range(len(allData)): ax.plot(allData[i]["xvals"], allData[i]["scores"], label='player' + str(i)) ax.legend() fig, ax = plt.subplots() ax.set_xlabel('Playthrough') ax.set_ylabel('pipeInterval') ax.set_title('Baseline pipeInterval Distances') for i in range(len(allData)): ax.plot(allData[i]["xvals"], allData[i]["pipeInterval"], label='player' + str(i)) ax.legend() fig, ax = plt.subplots() ax.set_xlabel('Playthrough') ax.set_ylabel('pipeHeight') ax.set_title('Baseline pipeHeight Distances') for i in range(len(allData)): ax.plot(allData[i]["xvals"], allData[i]["pipeHeight"], label='player' + str(i)) ax.legend() # %% import csv import base64 import matplotlib.pyplot as plt import numpy as np import json dataEnabled = [] with open('ddaEnabledData.csv') as csvfile: reader = csv.reader(csvfile) for row in reader: dataEnabled.append(row[0]) dataNotEnabled = [] with open('notddaEnabledData.csv') as csvfile: reader = csv.reader(csvfile) for row in reader: dataNotEnabled.append(row[0]) allDataEnabled = [] for testerData in dataEnabled: dataBytes = base64.b64decode(testerData) jsonData = json.loads(dataBytes.decode('utf8')) scores = [] pipeInterval = [] pipeHeight = [] i = 0 for run in jsonData["data"]: if(i != 0 and run['pipeInterval'] == 1410.5): break scores.append(run['score']) pipeInterval.append(run['pipeInterval']) pipeHeight.append(run['pipeheight']) i = i + 1 xvals = np.arange(1, len(scores) + 1, 1) playerData = {"xvals":xvals, "scores":scores, "pipeInterval":pipeInterval, "pipeHeight":pipeHeight} allDataEnabled.append(playerData) allDataNotEnabled = [] for testerData in dataNotEnabled: dataBytes = base64.b64decode(testerData) jsonData = json.loads(dataBytes.decode('utf8')) scores = [] pipeInterval = [] pipeHeight = [] i = 0 for run in jsonData["data"]: if(i != 0 and run['pipeInterval'] == 1410.5): break scores.append(run['score']) pipeInterval.append(run['pipeInterval']) pipeHeight.append(run['pipeheight']) i = i + 1 xvals = np.arange(1, len(scores) + 1, 1) playerData = {"xvals":xvals, "scores":scores, "pipeInterval":pipeInterval, "pipeHeight":pipeHeight} allDataNotEnabled.append(playerData) fig, ax = plt.subplots() #plt.legend(bbox_to_anchor=(1.04,1), loc="upper left") ax.set_xlabel('Playthrough') ax.set_ylabel('Score') ax.set_title('DDA vs. Baseline Scores') for i in range(len(allDataEnabled)): ax.plot(allDataEnabled[i]["xvals"], allDataEnabled[i]["scores"], label='DDA_Enabled', color='green') for i in range(len(allDataNotEnabled)): ax.plot(allDataNotEnabled[i]["xvals"], allDataNotEnabled[i]["scores"], label='Baseline', color='red') handles, labels = plt.gca().get_legend_handles_labels() labels, ids = np.unique(labels, return_index=True) handles = [handles[i] for i in ids] plt.legend(handles, labels, loc='best') #ax.legend() # %%
64.972222
4,005
0.862619
783
14,034
15.420179
0.176245
0.006212
0.013252
0.006626
0.186599
0.179974
0.172437
0.172437
0.172437
0.157529
0
0.082044
0.06983
14,034
215
4,006
65.274419
0.842883
0.017315
0
0.522989
0
0
0.647486
0.581235
0
1
0
0
0
1
0
false
0
0.086207
0
0.086207
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
5
a544d907f7886fe6cd4c85cf8051e8844cf738ac
54
py
Python
flask_api/app/common/__init__.py
brennanhfredericks/network-monitor-server
7c811d7851aee5d069569306c46dff39d8d52400
[ "MIT" ]
null
null
null
flask_api/app/common/__init__.py
brennanhfredericks/network-monitor-server
7c811d7851aee5d069569306c46dff39d8d52400
[ "MIT" ]
null
null
null
flask_api/app/common/__init__.py
brennanhfredericks/network-monitor-server
7c811d7851aee5d069569306c46dff39d8d52400
[ "MIT" ]
null
null
null
from .appifaceprog import api from .database import db
27
29
0.833333
8
54
5.625
0.75
0
0
0
0
0
0
0
0
0
0
0
0.12963
54
2
30
27
0.957447
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
3c212a108eea23aed5b72646850bf521126d934b
251
py
Python
krb5ticket/errors.py
degagne/python-krb5ticket
1113e0b51e8eac36f6c85cce10e86e2c82ca4828
[ "MIT" ]
2
2021-12-09T05:41:34.000Z
2022-03-18T18:23:24.000Z
krb5ticket/errors.py
degagne/python-krb5ticket
1113e0b51e8eac36f6c85cce10e86e2c82ca4828
[ "MIT" ]
null
null
null
krb5ticket/errors.py
degagne/python-krb5ticket
1113e0b51e8eac36f6c85cce10e86e2c82ca4828
[ "MIT" ]
null
null
null
class KeytabFileNotExists(RuntimeError): """ Raised when a Kerberos keytab file doesn't exist. """ pass class KtutilCommandNotFound(RuntimeError): """ Raised when ``ktutil`` command-line interface not found. """ pass
19.307692
60
0.661355
25
251
6.64
0.8
0.216867
0.26506
0
0
0
0
0
0
0
0
0
0.23506
251
12
61
20.916667
0.864583
0.422311
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
3c7be908e5d846fc839b0269f1d2587bd74e3afb
409
py
Python
identities.py
Nandan-18/Algebraic-Identites
7ba979fbddbf1d487e728ed41aafd1eed5e3e100
[ "MIT" ]
null
null
null
identities.py
Nandan-18/Algebraic-Identites
7ba979fbddbf1d487e728ed41aafd1eed5e3e100
[ "MIT" ]
null
null
null
identities.py
Nandan-18/Algebraic-Identites
7ba979fbddbf1d487e728ed41aafd1eed5e3e100
[ "MIT" ]
null
null
null
# Supporting Module # identities.py def exp1(a, b): return a ** 2 + 2 * a * b + b ** 2 def exp2(a, b): return a ** 2 - 2 * a * b + b ** 2 def exp3(a, b): return (a + b) * (a - b) def exp4(a, b): return (a + b) ** 2 - 2 * a * b def exp5(a, b): return a ** 3 + 3 * a ** 2 * b + 3 * a * b ** 2 + b ** 3 def exp6(a, b): return a ** 3 - 3 * a ** 2 * b + 3 * a * b ** 2 - b ** 3
15.148148
60
0.405868
82
409
2.02439
0.195122
0.168675
0.289157
0.325301
0.578313
0.457831
0.457831
0.457831
0.457831
0.457831
0
0.102362
0.378973
409
26
61
15.730769
0.551181
0.075795
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
b1f0550c1843ad31adf65e89fa5211ad4acfccfc
1,328
py
Python
tests/iterators/pull_test.py
SSouik/pyutil
d2250fb585679e49eb9056a3051bf239a58c2e8b
[ "MIT" ]
null
null
null
tests/iterators/pull_test.py
SSouik/pyutil
d2250fb585679e49eb9056a3051bf239a58c2e8b
[ "MIT" ]
21
2022-01-05T04:51:33.000Z
2022-01-28T05:45:57.000Z
tests/iterators/pull_test.py
SSouik/pyutil
d2250fb585679e49eb9056a3051bf239a58c2e8b
[ "MIT" ]
null
null
null
import pytest from pyutil import pull def test_pull_with_empty_list(): lst = [] pull(lst, 1) expected = [] assert lst == expected def test_pull_when_list_has_values(): lst = [1, 2, 3, 4, 5] pull(lst, 2) expected = [1, 3, 4, 5] assert lst == expected def test_pull_when_list_has_values_2(): lst = [1, 2, 3, 4, 5] pull(lst, 2, 3, 4) expected = [1, 5] assert lst == expected def test_pull_when_list_has_values_3(): lst = [1, 2, 3, 4, 5] pull(lst, 1, 4) expected = [2, 3, 5] assert lst == expected def test_pull_when_list_has_values_4(): lst = [{"foo": 1, "bar": 2}, {"abc": 1, "def": 2}] pull(lst, {"foo": 1, "bar": 2}) expected = [{"abc": 1, "def": 2}] assert lst == expected def test_pull_when_list_has_duplicate_values(): lst = [1, 2, 2, 3, 4, 4, 5] pull(lst, 2) expected = [1, 3, 4, 4, 5] assert lst == expected def test_pull_when_list_has_duplicate_values_2(): lst = [1, 2, 2, 3, 4, 4, 5] pull(lst, 2, 3, 4) expected = [1, 5] assert lst == expected def test_pull_when_list_has_duplicate_values_3(): lst = [1, 2, 2, 3, 4, 4, 5] pull(lst, 2, 4) expected = [1, 3, 5] assert lst == expected def test_pull_seq_is_not_a_list(): with pytest.raises(TypeError): pull("foo", 1)
20.75
54
0.582831
224
1,328
3.21875
0.138393
0.027739
0.137309
0.221914
0.762829
0.726768
0.726768
0.726768
0.662968
0.603329
0
0.083333
0.259036
1,328
63
55
21.079365
0.64939
0
0
0.444444
0
0
0.020331
0
0
0
0
0
0.177778
1
0.2
false
0
0.044444
0
0.244444
0
0
0
0
null
0
0
1
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3cc9c9c6db3e02d74038abeb59341c1138d3a879
70
py
Python
saleor/plugins/category/notify_event.py
hoangtuananh97/saleor
94ad493ef61302fb458822868fc2b4a884ec2065
[ "CC-BY-4.0" ]
null
null
null
saleor/plugins/category/notify_event.py
hoangtuananh97/saleor
94ad493ef61302fb458822868fc2b4a884ec2065
[ "CC-BY-4.0" ]
4
2021-09-06T03:55:32.000Z
2021-10-15T08:47:58.000Z
saleor/plugins/category/notify_event.py
hoangtuananh97/saleor
94ad493ef61302fb458822868fc2b4a884ec2065
[ "CC-BY-4.0" ]
null
null
null
def send_category_notify(): print("Plugin Category when created")
23.333333
41
0.757143
9
70
5.666667
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.142857
70
2
42
35
0.85
0
0
0
0
0
0.4
0
0
0
0
0
0
1
0.5
true
0
0
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
1
0
5
a72b62dfb661d28b942c1bbe2cd44f6d11909efd
10,504
py
Python
tests/test_word_distance.py
hasibaasma/alfpy
c8c0c1300108015746320cede2207ac57e630d3e
[ "MIT" ]
19
2017-02-20T17:42:02.000Z
2021-12-16T19:07:17.000Z
tests/test_word_distance.py
eggleader/alfpy
e0782e9551458ef17ab29df8af13fc0f8925e894
[ "MIT" ]
3
2018-03-12T23:54:27.000Z
2020-12-09T21:53:19.000Z
tests/test_word_distance.py
eggleader/alfpy
e0782e9551458ef17ab29df8af13fc0f8925e894
[ "MIT" ]
6
2016-12-06T09:12:04.000Z
2021-09-24T14:40:47.000Z
import unittest from alfpy import word_pattern from alfpy import word_vector from alfpy import word_distance from alfpy.utils import distmatrix from . import utils class DistanceTest(unittest.TestCase, utils.ModulesCommonTest): def __init__(self, *args, **kwargs): super(DistanceTest, self).__init__(*args, **kwargs) utils.ModulesCommonTest.set_test_data() self.pattern = word_pattern.create(self.dna_records.seq_list, 2) self.counts = word_vector.Counts(self.dna_records.length_list, self.pattern) self.freqs = word_vector.Freqs(self.dna_records.length_list, self.pattern) def test_angle_cos_diss_freqs(self): # The result of this method is identical to that from decaf+py. dist = word_distance.Distance(self.freqs, 'angle_cos_diss') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [' 3', 'seq1 0.0000000 0.2797355 0.1500672', 'seq2 0.2797355 0.0000000 0.1261027', 'seq3 0.1500672 0.1261027 0.0000000'] self.assertEqual(matrix.format(), "\n".join(data)) def test_angle_cos_evol_freqs(self): # The result of this method is identical to that from decaf+py. dist = word_distance.Distance(self.freqs, 'angle_cos_evol') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [' 3', 'seq1 0.0000000 0.3281368 0.1625980', 'seq2 0.3281368 0.0000000 0.1347925', 'seq3 0.1625980 0.1347925 0.0000000'] self.assertEqual(matrix.format(), "\n".join(data)) def test_diff_abs_add_freqs(self): # The result of this method is identical to that from decaf+py. dist = word_distance.Distance(self.freqs, 'diff_abs_add') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [' 3', 'seq1 0.0000000 0.0810458 0.0507937', 'seq2 0.0810458 0.0000000 0.0526611', 'seq3 0.0507937 0.0526611 0.0000000'] self.assertEqual(matrix.format(), "\n".join(data)) def test_diff_abs_mult1_freqs(self): # The result of this method is identical to that from decaf+py. dist = word_distance.Distance(self.freqs, 'diff_abs_mult1') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [' 3', 'seq1 0.0000000 0.0621975 0.0501075', 'seq2 0.0621975 0.0000000 0.0955847', 'seq3 0.0501075 0.0955847 0.0000000'] self.assertEqual(matrix.format(), "\n".join(data)) def test_diff_abs_mult2_freqs(self): # The result of this method is identical to that from decaf+py. dist = word_distance.Distance(self.freqs, 'diff_abs_mult2') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [' 3', 'seq1 0.0000000 0.0621975 0.0404611', 'seq2 0.0621975 0.0000000 0.0531478', 'seq3 0.0404611 0.0531478 0.0000000'] self.assertEqual(matrix.format(), "\n".join(data)) def test_euclid_seqlen1_freqs(self): # The result of this method is identical to that from decaf+py. dist = word_distance.Distance(self.freqs, 'euclid_seqlen1') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [' 3', 'seq1 0.0000000 0.0065879 0.0032065', 'seq2 0.0065879 0.0000000 0.0041065', 'seq3 0.0032065 0.0041065 0.0000000'] self.assertEqual(matrix.format(), "\n".join(data)) def test_euclid_seqlen2_freqs(self): # The result of this method is identical to that from decaf+py. dist = word_distance.Distance(self.freqs, 'euclid_seqlen2') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [' 3', 'seq1 0.0000000 0.0072101 0.0038263', 'seq2 0.0072101 0.0000000 0.0039866', 'seq3 0.0038263 0.0039866 0.0000000'] self.assertEqual(matrix.format(), "\n".join(data)) def test_manhattan_freqs(self): dist = word_distance.Distance(self.freqs, 'manhattan') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [ " 3", "seq1 0.0000000 1.2156863 0.7619048", "seq2 1.2156863 0.0000000 0.7899160", "seq3 0.7619048 0.7899160 0.0000000" ] self.assertEqual(matrix.format(), "\n".join(data)) def test_chebyshev_freqs(self): dist = word_distance.Distance(self.freqs, 'chebyshev') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [ " 3", "seq1 0.0000000 0.1936275 0.1250000", "seq2 0.1936275 0.0000000 0.1428571", "seq3 0.1250000 0.1428571 0.0000000" ] self.assertEqual(matrix.format(), "\n".join(data)) def test_braycurtis_freqs(self): dist = word_distance.Distance(self.freqs, 'braycurtis') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [ " 3", "seq1 0.0000000 0.6078431 0.3809524", "seq2 0.6078431 0.0000000 0.3949580", "seq3 0.3809524 0.3949580 0.0000000" ] self.assertEqual(matrix.format(), "\n".join(data)) def test_diff_abs_mult_freqs(self): dist = word_distance.Distance(self.freqs, 'diff_abs_mult') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [ " 3", "seq1 0.0000000 0.0621975 0.0404611", "seq2 0.0621975 0.0000000 0.0531478", "seq3 0.0404611 0.0531478 0.0000000" ] self.assertEqual(matrix.format(), "\n".join(data)) def test_kld_freqs(self): dist = word_distance.Distance(self.freqs, 'kld') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [ " 3", "seq1 0.0000000 0.0932800 0.0435210", "seq2 0.0932800 0.0000000 0.0447391", "seq3 0.0435210 0.0447391 0.0000000" ] self.assertEqual(matrix.format(), "\n".join(data)) def test_lcc_freqs(self): dist = word_distance.Distance(self.freqs, 'lcc') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [ " 3", "seq1 0.0000000 0.6205496 0.4017554", "seq2 0.6205496 0.0000000 0.2550506", "seq3 0.4017554 0.2550506 0.0000000" ] self.assertEqual(matrix.format(), "\n".join(data)) def test_canberra_freqs(self): dist = word_distance.Distance(self.freqs, 'canberra') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [ " 3", "seq1 0.0000000 10.3372258 7.1836838", "seq2 10.3372258 0.0000000 6.6280959", "seq3 7.1836838 6.6280959 0.0000000" ] self.assertEqual(matrix.format(), "\n".join(data)) def test_minkowski_freqs(self): dist = word_distance.Distance(self.freqs, 'minkowski') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [ " 3", "seq1 0.0000000 0.3763512 0.2532387", "seq2 0.3763512 0.0000000 0.2603008", "seq3 0.2532387 0.2603008 0.0000000" ] self.assertEqual(matrix.format(), "\n".join(data)) def test_minkowski_throws_exception(self): dist = word_distance.Distance(self.freqs, 'minkowski') with self.assertRaises(Exception) as context: dist.pwdist_minkowski(0, 1, 0.2) self.assertIn('p must be at least 1', str(context.exception)) def test_jsd_freqs(self): dist = word_distance.Distance(self.freqs, 'jsd') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [ " 3", "seq1 0.0000000 0.4608882 0.2550278", "seq2 0.4608882 0.0000000 0.2457790", "seq3 0.2550278 0.2457790 0.0000000" ] self.assertEqual(matrix.format(), "\n".join(data)) def test_euclid_squared_freqs(self): # The result of this method is identical to that from decaf+py. dist = word_distance.Distance(self.freqs, 'euclid_squared') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [' 3', 'seq1 0.0000000 0.1416402 0.0641298', 'seq2 0.1416402 0.0000000 0.0677565', 'seq3 0.0641298 0.0677565 0.0000000'] self.assertEqual(matrix.format(), "\n".join(data)) def test_euclid_norm_counts(self): # The result of this method is identical to that from decaf+py. dist = word_distance.Distance(self.counts, 'euclid_norm') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [' 3', 'seq1 0.0000000 7.5498344 5.4772256', 'seq2 7.5498344 0.0000000 4.3588989', 'seq3 5.4772256 4.3588989 0.0000000'] self.assertEqual(matrix.format(), "\n".join(data)) def test_euclid_norm_freqs(self): # The result of this method is identical to that from decaf+py. dist = word_distance.Distance(self.freqs, 'euclid_norm') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [' 3', 'seq1 0.0000000 0.3763512 0.2532387', 'seq2 0.3763512 0.0000000 0.2603008', 'seq3 0.2532387 0.2603008 0.0000000'] self.assertEqual(matrix.format(), "\n".join(data)) def test_google_freqs(self): dist = word_distance.Distance(self.freqs, 'google') matrix = distmatrix.create(self.dna_records.id_list, dist) data = [' 3', 'seq1 0.0000000 0.6078431 0.3809524', 'seq2 0.6078431 0.0000000 0.3949580', 'seq3 0.3809524 0.3949580 0.0000000'] self.assertEqual(matrix.format(), "\n".join(data)) if __name__ == '__main__': unittest.main()
43.949791
77
0.58035
1,298
10,504
4.566256
0.117874
0.080985
0.053147
0.070862
0.726843
0.726843
0.7233
0.71149
0.630167
0.630167
0
0.210411
0.305027
10,504
238
78
44.134454
0.601507
0.05893
0
0.365
0
0
0.279927
0
0
0
0
0
0.11
1
0.11
false
0
0.03
0
0.145
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
1
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
59945bb43aee8c097a1605b49beb38bfd751d29b
25
py
Python
1795.py
heltonricardo/URI
160cca22d94aa667177c9ebf2a1c9864c5e55b41
[ "MIT" ]
6
2021-04-13T00:33:43.000Z
2022-02-10T10:23:59.000Z
1795.py
heltonricardo/URI
160cca22d94aa667177c9ebf2a1c9864c5e55b41
[ "MIT" ]
null
null
null
1795.py
heltonricardo/URI
160cca22d94aa667177c9ebf2a1c9864c5e55b41
[ "MIT" ]
3
2021-03-23T18:42:24.000Z
2022-02-10T10:24:07.000Z
print(3 ** int(input()))
12.5
24
0.56
4
25
3.5
1
0
0
0
0
0
0
0
0
0
0
0.045455
0.12
25
1
25
25
0.590909
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
59d013d73876feaa26a2738bca986d2343c60672
38
py
Python
cours/texte-et-binaire/tmp/main.py
boisgera/python-fr
583f7eae7baa949461464e9b53a415be16c1dd3e
[ "CC-BY-4.0" ]
null
null
null
cours/texte-et-binaire/tmp/main.py
boisgera/python-fr
583f7eae7baa949461464e9b53a415be16c1dd3e
[ "CC-BY-4.0" ]
null
null
null
cours/texte-et-binaire/tmp/main.py
boisgera/python-fr
583f7eae7baa949461464e9b53a415be16c1dd3e
[ "CC-BY-4.0" ]
null
null
null
print("Hello") 1 / 0 print("world!")
7.6
15
0.578947
6
38
3.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0.0625
0.157895
38
4
16
9.5
0.625
0
0
0
0
0
0.297297
0
0
0
0
0
0
1
0
true
0
0
0
0
0.666667
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
ab7c6369edf868cf9d86121ac9188f5575e5dd08
50
py
Python
fltk/datasets/data_distribution/__init__.py
tudelft-eemcs-dml/fltk-testbed-gr-4
3472d80903a0d0993af9cf2e6347aeb81d1a0515
[ "BSD-2-Clause" ]
1
2022-03-24T10:14:31.000Z
2022-03-24T10:14:31.000Z
fltk/datasets/data_distribution/__init__.py
tudelft-eemcs-dml/fltk-testbed-gr-4
3472d80903a0d0993af9cf2e6347aeb81d1a0515
[ "BSD-2-Clause" ]
2
2021-05-11T12:48:14.000Z
2021-05-11T12:49:24.000Z
fltk/datasets/data_distribution/__init__.py
tudelft-eemcs-dml/fltk-testbed-gr-4
3472d80903a0d0993af9cf2e6347aeb81d1a0515
[ "BSD-2-Clause" ]
2
2021-05-03T17:40:18.000Z
2021-05-11T09:34:30.000Z
from .iid_equal import distribute_batches_equally
25
49
0.9
7
50
6
1
0
0
0
0
0
0
0
0
0
0
0
0.08
50
1
50
50
0.913043
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
ab8d450cb3702c82bd719fcd4bb6236e74377687
244
py
Python
src/core/exc.py
arnulfojr/nginx-proxy-yml
afa090f11034076f00e4bf49ffef65a7f157c923
[ "MIT" ]
1
2021-11-16T04:18:43.000Z
2021-11-16T04:18:43.000Z
src/core/exc.py
arnulfojr/nginx-proxy-yml
afa090f11034076f00e4bf49ffef65a7f157c923
[ "MIT" ]
1
2021-06-01T22:01:31.000Z
2021-06-01T22:01:31.000Z
src/core/exc.py
arnulfojr/nginx-proxy-yml
afa090f11034076f00e4bf49ffef65a7f157c923
[ "MIT" ]
null
null
null
class CoreException(Exception): def __init__(self, message): self.message = message class ValidationError(CoreException): def __init__(self, message, errors=[]): super().__init__(message) self.errors = errors
22.181818
43
0.672131
24
244
6.333333
0.416667
0.217105
0.144737
0.236842
0
0
0
0
0
0
0
0
0.217213
244
10
44
24.4
0.795812
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0
0
0.571429
0
1
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
abedb7b5e1c8f300b4bf64a7a429b96267ce296d
210
py
Python
coding/learn_python/function_object/reduce_mul_demo.py
yatao91/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
3
2021-05-25T16:58:52.000Z
2022-02-05T09:37:17.000Z
coding/learn_python/function_object/reduce_mul_demo.py
yataosu/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
null
null
null
coding/learn_python/function_object/reduce_mul_demo.py
yataosu/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- from functools import reduce from operator import mul def fact_lambda(n): return reduce(lambda a, b: a * b, range(1, n+1)) def fact_mul(n): return reduce(mul, range(1, n+1))
17.5
52
0.647619
37
210
3.621622
0.486486
0.104478
0.19403
0.119403
0
0
0
0
0
0
0
0.029762
0.2
210
11
53
19.090909
0.767857
0.1
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
5
abf8894b09295d75fbe3b3b420d30f7d1212e4ff
257
py
Python
authentication/models.py
mzazakeith/Therapy101
be00dd988c6b636f52b57638e70c89da3acbf1a3
[ "MIT" ]
null
null
null
authentication/models.py
mzazakeith/Therapy101
be00dd988c6b636f52b57638e70c89da3acbf1a3
[ "MIT" ]
15
2020-06-05T18:55:18.000Z
2022-03-08T22:20:14.000Z
authentication/models.py
mzazakeith/Therapy101
be00dd988c6b636f52b57638e70c89da3acbf1a3
[ "MIT" ]
null
null
null
from django.contrib.auth.models import AbstractUser from django.db import models class User(AbstractUser): is_slta = models.BooleanField(default=False) is_slt = models.BooleanField(default=False) is_parent = models.BooleanField(default=False)
28.555556
51
0.785992
33
257
6.030303
0.515152
0.271357
0.376884
0.452261
0.321608
0
0
0
0
0
0
0
0.128405
257
8
52
32.125
0.888393
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
2806153fe5679750056acfcdb852bf9fdff951e3
374
py
Python
src/python_pachyderm/experimental/mixin/__init__.py
sjezewski/pypachy
4bc022d0c73140475f9bd0acd5c0e7204609de26
[ "Apache-2.0" ]
2
2017-02-01T14:22:34.000Z
2017-02-01T19:58:54.000Z
src/python_pachyderm/experimental/mixin/__init__.py
sjezewski/pypachy
4bc022d0c73140475f9bd0acd5c0e7204609de26
[ "Apache-2.0" ]
3
2018-02-13T20:40:59.000Z
2018-02-13T22:23:41.000Z
src/python_pachyderm/experimental/mixin/__init__.py
sjezewski/pypachy
4bc022d0c73140475f9bd0acd5c0e7204609de26
[ "Apache-2.0" ]
null
null
null
""" Exposes an experimental mixin for each pachyderm service. These mixins should not be used directly; instead, you should use ``python_pachyderm.experimental.Client()``. The mixins exist exclusively in order to provide better code organization, because we have several mixins, rather than one giant :class:`Client <python_pachyderm.experimental.client.Client>` class. """
41.555556
77
0.799465
51
374
5.823529
0.764706
0.10101
0.181818
0.222222
0
0
0
0
0
0
0
0
0.120321
374
8
78
46.75
0.902736
0.975936
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
1
1
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
f9f39e941eb9fa32c988e9be54fb0bea84a7c4e4
45
py
Python
nautobot_plugin_nornir/tests/__init__.py
FragmentedPacket/nautobot-plugin-nornir
ef3ce9e1eb1d8e04002f0f5c3f5e34389ada20cb
[ "Apache-2.0" ]
13
2021-02-28T00:21:31.000Z
2022-03-10T13:04:50.000Z
nautobot_plugin_nornir/tests/__init__.py
rileyL6122428/nautobot-plugin-nornir
67773960aebe4df5e6cda11f1c7e0bfd93c24fee
[ "Apache-2.0" ]
18
2021-03-13T03:24:09.000Z
2022-02-28T15:24:51.000Z
nautobot_plugin_nornir/tests/__init__.py
rileyL6122428/nautobot-plugin-nornir
67773960aebe4df5e6cda11f1c7e0bfd93c24fee
[ "Apache-2.0" ]
14
2021-03-04T03:21:16.000Z
2021-12-20T10:20:55.000Z
"""Unit tests for nautobot_plugin_nornir."""
22.5
44
0.755556
6
45
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.088889
45
1
45
45
0.780488
0.844444
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
e66279995933e8ecb67f6f34946455046a6bef43
96
py
Python
protonn/vis/__init__.py
protoNN-ai/protoNN
812fd524a8c2de49612bbb1fc991c503fe3f1202
[ "Apache-2.0" ]
3
2018-06-20T08:37:13.000Z
2019-02-21T00:14:47.000Z
protonn/vis/__init__.py
protoNN-ai/protoNN
812fd524a8c2de49612bbb1fc991c503fe3f1202
[ "Apache-2.0" ]
null
null
null
protonn/vis/__init__.py
protoNN-ai/protoNN
812fd524a8c2de49612bbb1fc991c503fe3f1202
[ "Apache-2.0" ]
null
null
null
from .vis import df_from_file, df_from_dir, filter_by, PivotTable from .lines import plot_lines
32
65
0.833333
17
96
4.352941
0.647059
0.162162
0
0
0
0
0
0
0
0
0
0
0.114583
96
2
66
48
0.870588
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
05311a2863ffbf10e5b4872464958a44b018f474
2,929
py
Python
src/benchmark/probe_training_wrapper.py
dumpmemory/PEARL_v1
df46be5ed86ba7850486b578a8926aa151e7bf87
[ "MIT" ]
24
2021-06-10T04:09:00.000Z
2021-11-02T11:23:35.000Z
src/benchmark/probe_training_wrapper.py
dumpmemory/PEARL_v1
df46be5ed86ba7850486b578a8926aa151e7bf87
[ "MIT" ]
1
2021-06-08T15:27:38.000Z
2021-06-08T15:41:05.000Z
src/benchmark/probe_training_wrapper.py
dumpmemory/PEARL_v1
df46be5ed86ba7850486b578a8926aa151e7bf87
[ "MIT" ]
4
2021-06-10T02:28:12.000Z
2021-08-24T13:00:14.000Z
from .probe import ProbeTrainer # train using embeddings def train_embeddings(encoder, probe_type, num_epochs, lr, patience, wandb, save_dir, batch_size, tr_episodes, val_episodes, tr_labels, val_labels, test_episodes, test_labels, use_encoder=False, save_interval=100): if use_encoder: enc = encoder else: enc = None probe_trainer = ProbeTrainer(encoder=enc, epochs=num_epochs, lr=lr, batch_size=batch_size, patience=patience, wandb=wandb, fully_supervised=False, save_dir=save_dir, representation_len=encoder.feature_size) probe_trainer.train(tr_episodes, val_episodes, tr_labels, val_labels, save_interval=save_interval) final_accuracies, final_f1_scores = probe_trainer.test(test_episodes, test_labels) wandb.log(final_accuracies) wandb.log(final_f1_scores) # train using images def train_images(encoder, probe_type, num_epochs, lr, patience, wandb, save_dir, batch_size, tr_episodes, val_episodes, tr_labels, val_labels, test_episodes, test_labels, save_interval=100): probe_trainer = ProbeTrainer(encoder=encoder, epochs=num_epochs, lr=lr, batch_size=batch_size, patience=patience, wandb=wandb, fully_supervised=False, save_dir=save_dir, representation_len=encoder.feature_size) probe_trainer.train(tr_episodes, val_episodes, tr_labels, val_labels, save_interval=save_interval) final_accuracies, final_f1_scores = probe_trainer.test(test_episodes, test_labels) wandb.log(final_accuracies) wandb.log(final_f1_scores) # main training method def run_probe_training(training_input, encoder, probe_type, num_epochs, lr, patience, wandb, save_dir, batch_size, tr_episodes, val_episodes, tr_labels, val_labels, test_episodes, test_labels, use_encoder=False, save_interval=100): if training_input == 'embeddings': train_embeddings(encoder, probe_type, num_epochs, lr, patience, wandb, save_dir, batch_size, tr_episodes, val_episodes, tr_labels, val_labels, test_episodes, test_labels, use_encoder=use_encoder, save_interval=save_interval) elif training_input == 'images': train_images(encoder, probe_type, num_epochs, lr, patience, wandb, save_dir, batch_size, tr_episodes, val_episodes, tr_labels, val_labels, test_episodes, test_labels, save_interval=save_interval) else: print("Invalid input...choose either 'embeddings' and 'images'")
46.492063
148
0.635712
333
2,929
5.228228
0.165165
0.075819
0.044227
0.084434
0.794945
0.788053
0.788053
0.788053
0.788053
0.788053
0
0.006283
0.293616
2,929
63
149
46.492063
0.835186
0.021168
0
0.653061
0
0
0.024791
0
0
0
0
0
0
1
0.061224
false
0
0.020408
0
0.081633
0.020408
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
053b82076a707b4cf23d2d9a676fce87856d471c
17,136
py
Python
tests/test_crawler.py
jacopoabbate/datavault-api-python-client
70c3113b56db77de3835b4210dd7bffb22b34c9f
[ "MIT" ]
null
null
null
tests/test_crawler.py
jacopoabbate/datavault-api-python-client
70c3113b56db77de3835b4210dd7bffb22b34c9f
[ "MIT" ]
null
null
null
tests/test_crawler.py
jacopoabbate/datavault-api-python-client
70c3113b56db77de3835b4210dd7bffb22b34c9f
[ "MIT" ]
null
null
null
import datetime import pytest import requests from datavault_api_client import crawler from datavault_api_client.data_structures import DiscoveredFileInfo class TestCleanRawFilename: @pytest.mark.parametrize( "datavault_assigned_name, expected_cleaned_filename", [ ("WATCHLIST_username_676_20200610.txt.bz2", "WATCHLIST_676_20200610.txt.bz2"), ("CROSSREF_903_20200610.txt.bz2", "CROSSREF_903_20200610.txt.bz2"), ("COREREF_945_20200610.txt.bz2", "COREREF_945_20200610.txt.bz2"), ("REPLAY_794_20200316.txt.bz2", "REPLAY_794_20200316.txt.bz2"), ("SEDOL_794_20200316.txt.bz2", "SEDOL_794_20200316.txt.bz2"), ("CUSIP_794_20200316.txt.bz2", "CUSIP_794_20200316.txt.bz2"), ("PREMREF_794_20200316.txt.bz2", "PREMREF_794_20200316.txt.bz2"), ], ) def test_name_cleaning(self, datavault_assigned_name, expected_cleaned_filename): # Setup - none # Exercise cleaned_filename = crawler.clean_raw_filename(datavault_assigned_name) # Verify assert cleaned_filename == expected_cleaned_filename # Cleanup - none class TestParseSourceFromName: def test_source_id_parser(self): # Setup filename_to_parse = "WATCHLIST_945_20201201.txt.bz2" # Exercise parsed_source_id = crawler.parse_source_from_name(filename_to_parse) # Verify expected_source_id = "945" assert parsed_source_id == expected_source_id # Cleanup - none class TestParseReferenceDate: def test_reference_date_parser(self): # Setup filename_to_parse = "WATCHLIST_945_20201201.txt.bz2" # Exercise parsed_reference_date = crawler.parse_reference_date(filename_to_parse) # Verify expected_reference_date = datetime.datetime(year=2020, month=12, day=1) assert parsed_reference_date == expected_reference_date # Cleanup - none class TestCreateDiscoveredFileObject: def test_discovered_file_object_creation(self): # Setup file_node = { 'name': 'WATCHLIST_accountname_945_20201130.txt.bz2', 'fid': '20201130-S945_WATCHLIST_accountname_0_0', 'parent': '/v2/list/2020/11/30/S945/WATCHLIST', 'url': '/v2/data/2020/11/30/S945/WATCHLIST/20201130-S945_WATCHLIST_accountname_0_0', 'size': 78994869, 'md5sum': 'bf703f867cad0b414d84fac0c9bfe0e5', 'createdAt': '2020-11-30T23:22:36', 'updatedAt': '2020-11-30T23:22:36', 'writable': False, 'directory': False } # Exercise created_discovered_file_object = crawler.create_discovered_file_object(file_node) # Verify expected_discovered_file_object = DiscoveredFileInfo( file_name='WATCHLIST_945_20201130.txt.bz2', download_url=( "https://api.icedatavault.icedataservices.com/v2/data/2020/11/30/S945/WATCHLIST/" "20201130-S945_WATCHLIST_accountname_0_0" ), source_id=945, reference_date=datetime.datetime(year=2020, month=11, day=30), size=78994869, md5sum="bf703f867cad0b414d84fac0c9bfe0e5", ) assert created_discovered_file_object == expected_discovered_file_object # Cleanup - none class TestInitializeSearch: def test_initialization_of_search_from_instrument_url( self, mocked_datavault_api_instrument_level, ): # Setup session = requests.Session() url = "https://api.icedatavault.icedataservices.com/v2/list/2020/07/16/S367/WATCHLIST" credentials = ("username", "password") # Exercise stack, leaf_nodes = crawler.initialise_search(url, credentials, session) # Verify expected_stack = [] expected_leaf_nodes = [ DiscoveredFileInfo( file_name="WATCHLIST_367_20200716.txt.bz2", download_url=( "https://api.icedatavault.icedataservices.com/v2/data/2020/07/16/S367/" "WATCHLIST/20200716-S367_WATCHLIST_username_0_0" ), source_id=367, reference_date=datetime.datetime(year=2020, month=7, day=16), size=100145874, md5sum="fb34325ec9262adc74c945a9e7c9b465", ) ] assert stack == expected_stack assert leaf_nodes == expected_leaf_nodes # Cleanup - none def test_initialisation_of_search_from_instrument_url_and_not_matching_source_id( self, mocked_datavault_api_instrument_level, ): # Setup session = requests.Session() url = "https://api.icedatavault.icedataservices.com/v2/list/2020/07/16/S367/WATCHLIST" credentials = ("username", "password") source_id = 945 # Exercise stack, leaf_nodes = crawler.initialise_search(url, credentials, session, source_id) # Verify assert stack == [] assert leaf_nodes == [] # Cleanup - none def test_initialisation_of_search_from_instrument_url_and_matching_source_id( self, mocked_datavault_api_instrument_level, ): # Setup session = requests.Session() url = "https://api.icedatavault.icedataservices.com/v2/list/2020/07/16/S367/WATCHLIST" credentials = ("username", "password") source_id = 367 # Exercise stack, leaf_nodes = crawler.initialise_search(url, credentials, session, source_id) # Verify assert stack == [] assert leaf_nodes == [ DiscoveredFileInfo( file_name="WATCHLIST_367_20200716.txt.bz2", download_url=( "https://api.icedatavault.icedataservices.com/v2/data/2020/07/16/S367/" "WATCHLIST/20200716-S367_WATCHLIST_username_0_0" ), source_id=367, reference_date=datetime.datetime(year=2020, month=7, day=16), size=100145874, md5sum="fb34325ec9262adc74c945a9e7c9b465", ) ] # Cleanup - none def test_initialisation_of_search_from_top_level( self, mocked_top_level_datavault_api, ): # Setup session = requests.Session() url = "https://api.icedatavault.icedataservices.com/v2/list" credentials = ("username", "password") # Exercise stack, leaf_nodes = crawler.initialise_search(url, credentials, session) # Verify expected_stack = [ { 'name': '2020', 'parent': '/v2/list', 'url': '/v2/list/2020', 'size': 0, 'createdAt': '2020-01-01T00:00:00', 'updatedAt': '2020-12-01T00:00:00', 'writable': False, 'directory': True }, ] expected_leaf_nodes = [] assert stack == expected_stack assert leaf_nodes == expected_leaf_nodes def test_initialisation_behaviour_with_error_code( self, mocked_top_level_datavault_api_failed_request, ): # Setup session = requests.Session() url = "https://api.icedatavault.icedataservices.com/v2/list" credentials = ("username", "password") # Exercise with pytest.raises(requests.exceptions.HTTPError): crawler.initialise_search(url, credentials, session) class TestCreateNodeUrl: def test_creation_of_node_url(self): # Setup url_path = "v2/list/2020/11/30/S945" # Exercise node_url = crawler.create_node_url(url_path) # Verify expected_url = "https://api.icedatavault.icedataservices.com/v2/list/2020/11/30/S945" assert node_url == expected_url # Cleanup - none class TestTraverseApiDirectoryTree: def test_traversal_of_api_directory_tree( self, mocked_datavault_api_single_source_single_day, mocked_files_available_to_download_single_source_single_day, ): # Setup session = requests.Session() url = "https://api.icedatavault.icedataservices.com/v2/list" credentials = ("username", "password") leaf_nodes = [] # Exercise discovered_files = crawler.traverse_api_directory_tree( session, credentials, session.get(url).json(), leaf_nodes ) # Verify expected_files = mocked_files_available_to_download_single_source_single_day assert ( discovered_files.sort(key=lambda x: x.file_name) == expected_files.sort(key=lambda x: x.file_name) ) # Cleanup - none def test_traversal_of_api_directory_tree_with_not_matching_source_id( self, mocked_datavault_api_single_source_single_day, ): # Setup session = requests.Session() url = "https://api.icedatavault.icedataservices.com/v2/list" credentials = ("username", "password") leaf_nodes = [] source_id = 673 # Exercise discovered_files = crawler.traverse_api_directory_tree( session, credentials, session.get(url).json(), leaf_nodes, source_id ) # Verify assert discovered_files == [] # Cleanup - none def test_traversal_of_api_directory_tree_with_matching_source_id( self, mocked_datavault_api_multiple_sources_single_day, mocked_files_available_to_download_multiple_sources_single_day, ): # Setup session = requests.Session() url = "https://api.icedatavault.icedataservices.com/v2/list" credentials = ("username", "password") leaf_nodes = [] source_id = 367 # Exercise discovered_files = crawler.traverse_api_directory_tree( session, credentials, session.get(url).json(), leaf_nodes, source_id ) discovered_files.sort(key=lambda x: x.file_name) # Verify expected_files = [ file for file in mocked_files_available_to_download_multiple_sources_single_day if file.source_id == int(source_id) ] expected_files.sort(key=lambda x: x.file_name) assert discovered_files == expected_files # Cleanup - none def test_traversal_of_api_directory_tree_with_empty_stack( self ): # Setup session = requests.Session() credentials = ("username", "password") stack = [] leaf_nodes = [] # Exercise discovered_files = crawler.traverse_api_directory_tree( session, credentials, stack, leaf_nodes ) # Verify # expected_files = [ # file for file in mocked_set_of_files_available_to_download_multiple_sources_single_day # if file.source == source_id # ] assert discovered_files == [] # Cleanup - none def test_traversal_of_api_directory_tree_with_failed_request_down_the_line( self, mocked_datavault_api_with_down_the_line_failed_request, ): # Setup session = requests.Session() credentials = ("username", "password") stack = [ { 'name': '2020', 'parent': '/v2/list', 'url': '/v2/list/2020', 'size': 0, 'createdAt': '2020-01-01T00:00:00', 'updatedAt': '2020-12-02T00:00:00', 'writable': False, 'directory': True, }, ] leaf_nodes = [] # Exercise # Verify with pytest.raises(requests.exceptions.HTTPError): crawler.traverse_api_directory_tree(session, credentials, stack, leaf_nodes) # Cleanup - none def test_traversal_of_api_directory_with_repeated_node_in_stack( self, mocked_datavault_api_with_repeated_node ): # Setup session = requests.Session() credentials = ("username", "password") stack = [ { 'name': '2020', 'parent': '/v2/list', 'url': '/v2/list/2020', 'size': 0, 'createdAt': '2020-01-01T00:00:00', 'updatedAt': '2020-12-02T00:00:00', 'writable': False, 'directory': True, }, ] leaf_nodes = [] # Exercise discovered_instruments = crawler.traverse_api_directory_tree( session, credentials, stack, leaf_nodes ) # Verify assert discovered_instruments == [ DiscoveredFileInfo( file_name='COREREF_945_20201201.txt.bz2', download_url=( "https://api.icedatavault.icedataservices.com/v2/data/2020/12/01/S945/CORE/" "20201201-S945_CORE_ALL_0_0" ), source_id=945, reference_date=datetime.datetime(year=2020, month=12, day=1), size=15680, md5sum='c9cc20020def775933be0be9690a9b5a', ) ] # Cleanup - none class TestDatavaultCrawl: def test_crawler_with_instrument_level_url( self, mocked_datavault_api_instrument_level, mocked_files_available_to_download_single_instrument, ): # Setup url_to_crawl = ( "https://api.icedatavault.icedataservices.com/v2/list/2020/07/16/S367/WATCHLIST" ) credentials = ("username", "password") # Exercise discovered_files = crawler.datavault_crawler(url_to_crawl, credentials) # Verify assert discovered_files == mocked_files_available_to_download_single_instrument # Cleanup - none def test_crawler_with_single_source_and_single_day_setup( self, mocked_datavault_api_single_source_single_day, mocked_files_available_to_download_single_source_single_day, ): # Setup url_to_crawl = "https://api.icedatavault.icedataservices.com/v2/list" credentials = ("username", "password") # Exercise discovered_files = crawler.datavault_crawler(url_to_crawl, credentials) # Verify expected_files = mocked_files_available_to_download_single_source_single_day expected_files.sort(key=lambda x: x.file_name, reverse=True) assert discovered_files == expected_files # Cleanup - none def test_crawler_with_single_source_and_multiple_days_setup( self, mocked_datavault_api_single_source_multiple_days, mocked_files_available_to_download_single_source_multiple_days, ): # Setup url_to_crawl = "https://api.icedatavault.icedataservices.com/v2/list" credentials = ("username", "password") # Exercise discovered_files = crawler.datavault_crawler(url_to_crawl, credentials) discovered_files.sort(key=lambda x: x.file_name) # Verify expected_files = mocked_files_available_to_download_single_source_multiple_days expected_files.sort(key=lambda x: x.file_name) assert discovered_files == expected_files # Cleanup - none def test_crawler_under_multiple_sources_and_single_day_scenario( self, mocked_datavault_api_multiple_sources_single_day, mocked_files_available_to_download_multiple_sources_single_day ): # Setup url_to_crawl = "https://api.icedatavault.icedataservices.com/v2/list" credentials = ("username", "password") # Exercise discovered_files = crawler.datavault_crawler(url_to_crawl, credentials) discovered_files.sort(key=lambda x: x.file_name) # Verify expected_files = mocked_files_available_to_download_multiple_sources_single_day expected_files.sort(key=lambda x: x.file_name) assert discovered_files == expected_files # Cleanup - none def test_crawler_under_select_source_scenario( self, mocked_datavault_api_multiple_sources_single_day, mocked_files_available_to_download_multiple_sources_single_day, ): # Setup url_to_crawl = "https://api.icedatavault.icedataservices.com/v2/list" credentials = ("username", "password") # Exercise discovered_files = crawler.datavault_crawler(url_to_crawl, credentials, source_id=207) discovered_files.sort(key=lambda x: x.file_name) # Verify expected_files = [ file for file in mocked_files_available_to_download_multiple_sources_single_day if file.source_id == 207 ] expected_files.sort(key=lambda x: x.file_name) assert discovered_files == expected_files # Cleanup - none
36.69379
100
0.623424
1,766
17,136
5.684598
0.10419
0.020719
0.03586
0.062755
0.802271
0.785238
0.753462
0.718
0.684929
0.642893
0
0.068309
0.289216
17,136
466
101
36.772532
0.755911
0.051937
0
0.585714
0
0.025714
0.185396
0.071349
0
0
0
0
0.065714
1
0.06
false
0.045714
0.014286
0
0.097143
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
057bdb050500b53da7e385ff2282c3ebb232fe64
121
py
Python
hcaptcha/__init__.py
yunusbyrak/py-hcaptcha
f429bfaba7619c2ac255ae101423d72c2866aa09
[ "MIT" ]
1
2022-01-09T23:49:03.000Z
2022-01-09T23:49:03.000Z
hcaptcha/__init__.py
bryonpokemon/py-hcaptcha
92f723c8f5180d921731d7d04deb637099514a2e
[ "MIT" ]
null
null
null
hcaptcha/__init__.py
bryonpokemon/py-hcaptcha
92f723c8f5180d921731d7d04deb637099514a2e
[ "MIT" ]
1
2022-01-09T23:49:03.000Z
2022-01-09T23:49:03.000Z
from .challenges import Challenge from .solvers import Solver from .agents import random_agent from .exceptions import *
24.2
33
0.826446
16
121
6.1875
0.625
0
0
0
0
0
0
0
0
0
0
0
0.132231
121
4
34
30.25
0.942857
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
5567063c93ec8ddf93486996ed882ce5ca8b8b9d
206
py
Python
fauxblog/admin.py
nickobrad/faux
cecb03e97a176149606dc88373d1844fc1f6b23c
[ "MIT" ]
null
null
null
fauxblog/admin.py
nickobrad/faux
cecb03e97a176149606dc88373d1844fc1f6b23c
[ "MIT" ]
null
null
null
fauxblog/admin.py
nickobrad/faux
cecb03e97a176149606dc88373d1844fc1f6b23c
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Category, ImagePost, Location # Register your models here. admin.site.register(ImagePost) admin.site.register(Category) admin.site.register(Location)
20.6
49
0.81068
27
206
6.185185
0.481481
0.161677
0.305389
0
0
0
0
0
0
0
0
0
0.101942
206
9
50
22.888889
0.902703
0.126214
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
55a6a32920fa2fc82181f6e01d6935314fa6f974
137
py
Python
transiter_ny_mta/transiter_ny_mta/__init__.py
Pizza-Ratz/transiter-ny
40091d3ff0c1b9e046b0d3ca708acb81df5019c6
[ "MIT" ]
1
2021-01-25T16:02:14.000Z
2021-01-25T16:02:14.000Z
transiter_ny_mta/transiter_ny_mta/__init__.py
Pizza-Ratz/transiter-ny
40091d3ff0c1b9e046b0d3ca708acb81df5019c6
[ "MIT" ]
null
null
null
transiter_ny_mta/transiter_ny_mta/__init__.py
Pizza-Ratz/transiter-ny
40091d3ff0c1b9e046b0d3ca708acb81df5019c6
[ "MIT" ]
1
2021-07-02T14:34:04.000Z
2021-07-02T14:34:04.000Z
from .alertsparser import AlertsParser from .subwaytripsparser import SubwayTripsParser from .stationscsvparser import StationsCsvParser
34.25
48
0.890511
12
137
10.166667
0.416667
0
0
0
0
0
0
0
0
0
0
0
0.087591
137
3
49
45.666667
0.976
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
e9576153377cb8542e00446bc31a32f660d4a2a6
99
py
Python
examples/port_demo.py
smilelight/lightUtils
e9b7ed35ed50cf6b7c6284fe60918ce4dc71beac
[ "MIT" ]
2
2020-01-23T02:03:19.000Z
2020-12-13T09:05:45.000Z
examples/port_demo.py
smilelight/lightUtils
e9b7ed35ed50cf6b7c6284fe60918ce4dc71beac
[ "MIT" ]
null
null
null
examples/port_demo.py
smilelight/lightUtils
e9b7ed35ed50cf6b7c6284fe60918ce4dc71beac
[ "MIT" ]
null
null
null
from lightutils import get_free_tcp_port port = get_free_tcp_port() print(port) print(type(port))
16.5
40
0.808081
17
99
4.352941
0.529412
0.189189
0.27027
0.378378
0
0
0
0
0
0
0
0
0.10101
99
5
41
19.8
0.831461
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.5
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
e96d84302227c0aff1faeef0969afac44cd9a679
228
py
Python
sitator/visualization/__init__.py
lekah/sitator
0f9c84989758eb7b76be8104a94a8d6decd27b55
[ "MIT" ]
8
2018-10-05T18:02:24.000Z
2021-02-22T20:24:58.000Z
sitator/visualization/__init__.py
lekah/sitator
0f9c84989758eb7b76be8104a94a8d6decd27b55
[ "MIT" ]
6
2019-02-21T04:33:01.000Z
2021-01-06T20:05:25.000Z
sitator/visualization/__init__.py
lekah/sitator
0f9c84989758eb7b76be8104a94a8d6decd27b55
[ "MIT" ]
6
2018-08-11T21:43:59.000Z
2021-12-21T06:32:12.000Z
from .common import layers, grid, plotter, DEFAULT_COLORS, set_axes_equal from .atoms import plot_atoms, plot_points from .SiteNetworkPlotter import SiteNetworkPlotter from .SiteTrajectoryPlotter import SiteTrajectoryPlotter
28.5
73
0.855263
26
228
7.307692
0.615385
0
0
0
0
0
0
0
0
0
0
0
0.105263
228
7
74
32.571429
0.931373
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
759014d40b4767cde83fe06211c68c1440c3f6c4
14
py
Python
noop.py
OpenIotNetwork/echo-firmware
007ead22704231f320abdc1ce32430a6d69a57f7
[ "Apache-2.0" ]
1
2021-03-08T18:34:06.000Z
2021-03-08T18:34:06.000Z
noop.py
OpenIotNetwork/echo-firmware
007ead22704231f320abdc1ce32430a6d69a57f7
[ "Apache-2.0" ]
null
null
null
noop.py
OpenIotNetwork/echo-firmware
007ead22704231f320abdc1ce32430a6d69a57f7
[ "Apache-2.0" ]
null
null
null
print("NOOP")
7
13
0.642857
2
14
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.071429
14
1
14
14
0.692308
0
0
0
0
0
0.285714
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
75903cb74255d9a040c92dad9af5ac01cf28b1cb
54
py
Python
srichand_cloudmesh_ex2.py
futuresystems/465-srijchand
f52127dfd2cefa7836e25b3ca8a4d81f8ec041ab
[ "Apache-2.0" ]
null
null
null
srichand_cloudmesh_ex2.py
futuresystems/465-srijchand
f52127dfd2cefa7836e25b3ca8a4d81f8ec041ab
[ "Apache-2.0" ]
null
null
null
srichand_cloudmesh_ex2.py
futuresystems/465-srijchand
f52127dfd2cefa7836e25b3ca8a4d81f8ec041ab
[ "Apache-2.0" ]
null
null
null
import cloudmesh print cloudmesh.shell("cloud list")
13.5
35
0.796296
7
54
6.142857
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.111111
54
3
36
18
0.895833
0
0
0
0
0
0.188679
0
0
0
0
0
0
0
null
null
0
0.5
null
null
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
1
0
0
0
1
0
0
1
0
5
75b72dca2e43b5612d13506d6b92693bca1eea41
192
py
Python
1_Python/Aulas/Aula13a.py
guilhermebaos/Curso-em-Video-Python
0e67f6f59fa3216889bd2dde4a26b532c7c545fd
[ "MIT" ]
null
null
null
1_Python/Aulas/Aula13a.py
guilhermebaos/Curso-em-Video-Python
0e67f6f59fa3216889bd2dde4a26b532c7c545fd
[ "MIT" ]
null
null
null
1_Python/Aulas/Aula13a.py
guilhermebaos/Curso-em-Video-Python
0e67f6f59fa3216889bd2dde4a26b532c7c545fd
[ "MIT" ]
null
null
null
for a in range(0,6): print('Olá!', a) print('Parei. \n') for b in range(6, 0, -1): print('Olá1', b) print('Parei. \n') for c in range(0, 6, 2): print('Olá!', c) print('Parei. \n')
19.2
25
0.53125
38
192
2.684211
0.394737
0.205882
0.323529
0.176471
0
0
0
0
0
0
0
0.059211
0.208333
192
9
26
21.333333
0.611842
0
0
0.333333
0
0
0.203125
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
75eea75e6047e89d14c6be50606878240e707caf
41
py
Python
tests/components/mqtt_json/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/mqtt_json/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
tests/components/mqtt_json/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for the mqtt_json component."""
20.5
40
0.707317
6
41
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.121951
41
1
41
41
0.777778
0.829268
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
75efc068bea2e00c99851509afc17f84c017599e
123
py
Python
src/compiler/handler.py
neolang/neopy
92f328ed6c2f3c40ec04b889477aa8fe916711f1
[ "MIT" ]
1
2018-11-18T08:01:28.000Z
2018-11-18T08:01:28.000Z
src/compiler/handler.py
neolang/neopy
92f328ed6c2f3c40ec04b889477aa8fe916711f1
[ "MIT" ]
2
2018-11-18T08:02:07.000Z
2018-11-19T06:20:35.000Z
src/compiler/handler.py
neolang/neopy
92f328ed6c2f3c40ec04b889477aa8fe916711f1
[ "MIT" ]
null
null
null
def compile_files(fp_list): for fp in fp_list: __compile_file(fp) def __compile_file(file_pointer): pass
15.375
33
0.699187
19
123
4
0.526316
0.263158
0
0
0
0
0
0
0
0
0
0
0.227642
123
7
34
17.571429
0.8
0
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0.2
0
0
0.4
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
75f7e09f370f1d9746b214f2177f7c3fe2f5c339
81
py
Python
coreapi/models/__init__.py
recentfahim/smartbusinessbd
61a74ae629f2c6e2317c41da23476c8780446e84
[ "Apache-2.0" ]
null
null
null
coreapi/models/__init__.py
recentfahim/smartbusinessbd
61a74ae629f2c6e2317c41da23476c8780446e84
[ "Apache-2.0" ]
null
null
null
coreapi/models/__init__.py
recentfahim/smartbusinessbd
61a74ae629f2c6e2317c41da23476c8780446e84
[ "Apache-2.0" ]
null
null
null
from .city import City from .company import Company from .country import Country
20.25
28
0.814815
12
81
5.5
0.416667
0
0
0
0
0
0
0
0
0
0
0
0.148148
81
3
29
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
f9466d3c2d2932494116e2cb70d044cef50ea795
266
py
Python
pollbot/helper/display/management.py
3wille/ultimate-poll-bot
7a99659df463a891b20a1ab424665cd84d4242b4
[ "MIT" ]
null
null
null
pollbot/helper/display/management.py
3wille/ultimate-poll-bot
7a99659df463a891b20a1ab424665cd84d4242b4
[ "MIT" ]
null
null
null
pollbot/helper/display/management.py
3wille/ultimate-poll-bot
7a99659df463a891b20a1ab424665cd84d4242b4
[ "MIT" ]
null
null
null
"""The poll management text.""" from .poll import get_poll_text def get_poll_management_text(session, poll, show_warning=False): """Create the management interface for a poll.""" poll_text = get_poll_text(session, poll, show_warning) return poll_text
26.6
64
0.74812
39
266
4.820513
0.435897
0.170213
0.191489
0.202128
0.276596
0
0
0
0
0
0
0
0.154135
266
9
65
29.555556
0.835556
0.259399
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
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
1
0
0
0
0
1
0
0
5
f9773a9cbbac8043bcf3bf565130d13c371454b2
96
py
Python
src/wavestate/iirrational/external/tabulate/__init__.py
wavestate/wavestate-iirrational
01d6dba8b2131fa2a099a74f17e6540f30cee606
[ "Apache-2.0" ]
null
null
null
src/wavestate/iirrational/external/tabulate/__init__.py
wavestate/wavestate-iirrational
01d6dba8b2131fa2a099a74f17e6540f30cee606
[ "Apache-2.0" ]
null
null
null
src/wavestate/iirrational/external/tabulate/__init__.py
wavestate/wavestate-iirrational
01d6dba8b2131fa2a099a74f17e6540f30cee606
[ "Apache-2.0" ]
null
null
null
""" External libraries packaged with for version stability """ from .tabulate import tabulate
13.714286
54
0.770833
11
96
6.727273
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.15625
96
6
55
16
0.91358
0.5625
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
f9850dd79a394638d5a5c2e62aadd31fb4c2407b
96
py
Python
venv/lib/python3.8/site-packages/poetry/core/_vendor/packaging/tags.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/poetry/core/_vendor/packaging/tags.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/poetry/core/_vendor/packaging/tags.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/68/e2/05/188e3a14bbe42690f0cbce7c7c576b1dbc9d3d1bb571a2d3908f144cea
96
96
0.895833
9
96
9.555556
1
0
0
0
0
0
0
0
0
0
0
0.385417
0
96
1
96
96
0.510417
0
0
0
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
5
f9ae44085aad4c16f6592f43de3a099254f05d59
47
py
Python
conjur/util/__init__.py
mbjahnoon/conjur-api-python3
ec1f62bb1baf2bdcd34d2fb92c97db724f761020
[ "Apache-2.0" ]
16
2019-05-17T15:34:59.000Z
2021-11-08T10:30:21.000Z
conjur/util/__init__.py
mbjahnoon/conjur-api-python3
ec1f62bb1baf2bdcd34d2fb92c97db724f761020
[ "Apache-2.0" ]
301
2019-05-07T18:27:10.000Z
2022-01-26T13:03:49.000Z
conjur/util/__init__.py
cyberark/cyberark-conjur-cli
2507e8769808643d89efa7e2496cfc14f505bd7e
[ "Apache-2.0" ]
10
2019-07-30T17:00:13.000Z
2022-01-20T17:00:34.000Z
""" util This package is for util modules """
7.833333
32
0.659574
7
47
4.428571
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.212766
47
5
33
9.4
0.837838
0.808511
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
f9ba31abc310c48d834cebff8aeef25ad2407242
138
py
Python
project_data_app/urls.py
chrisba11/kickstarter_projects
08a341d01428d20c384546773a853fc7d99a6140
[ "MIT" ]
null
null
null
project_data_app/urls.py
chrisba11/kickstarter_projects
08a341d01428d20c384546773a853fc7d99a6140
[ "MIT" ]
null
null
null
project_data_app/urls.py
chrisba11/kickstarter_projects
08a341d01428d20c384546773a853fc7d99a6140
[ "MIT" ]
null
null
null
from django.urls import path from .views import project_list_view urlpatterns = [ path('', project_list_view, name='project_list'), ]
23
53
0.753623
19
138
5.210526
0.578947
0.333333
0.30303
0
0
0
0
0
0
0
0
0
0.137681
138
6
54
23
0.831933
0
0
0
0
0
0.086331
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
f9dab830b35494d6660350f19bc8089f5510126e
116
py
Python
test/__init__.py
elagheb/at_commands
51f1fa553b651b639aa3d1e1b3ac4ff07322f7a0
[ "BSD-2-Clause" ]
null
null
null
test/__init__.py
elagheb/at_commands
51f1fa553b651b639aa3d1e1b3ac4ff07322f7a0
[ "BSD-2-Clause" ]
null
null
null
test/__init__.py
elagheb/at_commands
51f1fa553b651b639aa3d1e1b3ac4ff07322f7a0
[ "BSD-2-Clause" ]
null
null
null
import unittest import unittest.mock as mock from unittest.mock import patch __all__ = ['unittest','mock','patch']
19.333333
37
0.767241
16
116
5.3125
0.4375
0.423529
0
0
0
0
0
0
0
0
0
0
0.12069
116
5
38
23.2
0.833333
0
0
0
0
0
0.146552
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
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
ddc806857072eff9c83a07e28e06781742f5341f
1,304
py
Python
leds/rgbLed.py
JDRyder/stardust
a1b1de99e7d10c18f7243217a72aa5e7a3566e74
[ "MIT" ]
null
null
null
leds/rgbLed.py
JDRyder/stardust
a1b1de99e7d10c18f7243217a72aa5e7a3566e74
[ "MIT" ]
null
null
null
leds/rgbLed.py
JDRyder/stardust
a1b1de99e7d10c18f7243217a72aa5e7a3566e74
[ "MIT" ]
null
null
null
import board import neopixel import time pixels = neopixel.NeoPixel(board.D21, 1) GREEN = (255, 0, 0) # RED = (0,255,0) # BLUE = (0,0,255) # YELLOW = (255,255,0) # CYAN = (255,0,255) # VIOLET = (0,127,255) # WHITE = (255,255,255) # OFF = (0,0,0) # def off(): pixels[0] = OFF def startup(): pixels[0] = GREEN time.sleep(1) pixels[0] = RED time.sleep(1) pixels[0] = BLUE time.sleep(1) pixels[0] = YELLOW time.sleep(1) pixels[0] = CYAN time.sleep(1) pixels[0] = VIOLET time.sleep(1) pixels[0] = WHITE time.sleep(1) pixels[0] = OFF def statusOk(): pixels[0] = GREEN time.sleep(0.5) pixels[0] = OFF time.sleep(0.5) pixels[0] = GREEN time.sleep(0.5) pixels[0] = OFF time.sleep(0.5) def bmpError(): pixels[0] = BLUE time.sleep(1) pixels[0] = OFF time.sleep(1) pixels[0] = BLUE time.sleep(1) pixels[0] = OFF time.sleep(1) def vemlError(): pixels[0] = YELLOW time.sleep(1) pixels[0] = OFF time.sleep(1) pixels[0] = YELLOW time.sleep(1) pixels[0] = OFF time.sleep(1) def samError(): pixels[0] = RED time.sleep(1) pixels[0] = OFF time.sleep(1) pixels[0] = RED time.sleep(1) pixels[0] = OFF time.sleep(1) def scd30Error(): pixels[0] = CYAN time.sleep(1) pixels[0] = OFF time.sleep(1) pixels[0] = CYAN time.sleep(1) pixels[0] = OFF time.sleep(1)
15.162791
40
0.624233
230
1,304
3.53913
0.117391
0.249386
0.282555
0.373464
0.710074
0.674447
0.649877
0.649877
0.649877
0.649877
0
0.106503
0.18635
1,304
85
41
15.341176
0.660697
0
0
0.72
0
0
0
0
0
0
0
0
0
1
0.093333
false
0
0.04
0
0.133333
0
0
0
0
null
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
ddd0c824e4d2d1eee0fd05d787911e01b80ce07a
53
py
Python
Week1/sumofdigits_teacher.py
CrazyDi/Python1
016dd77ace04fccfec61edf37ec5a990ead6c4ef
[ "Unlicense" ]
null
null
null
Week1/sumofdigits_teacher.py
CrazyDi/Python1
016dd77ace04fccfec61edf37ec5a990ead6c4ef
[ "Unlicense" ]
null
null
null
Week1/sumofdigits_teacher.py
CrazyDi/Python1
016dd77ace04fccfec61edf37ec5a990ead6c4ef
[ "Unlicense" ]
null
null
null
import sys print(sum([int(x) for x in sys.argv[1]]))
17.666667
41
0.660377
12
53
2.916667
0.833333
0
0
0
0
0
0
0
0
0
0
0.021739
0.132075
53
3
41
17.666667
0.73913
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
5
fb07a1b009f2ec4dd007b6d28b15a16a4abfeb17
29
py
Python
python/callback/func/func.py
qingkaikong/useful_script
2547931dd11dbff7438e323ff4cd168427ff92ce
[ "BSD-3-Clause" ]
4
2016-03-16T17:06:42.000Z
2021-07-26T15:43:42.000Z
python/callback/func/func.py
qingkaikong/useful_script
2547931dd11dbff7438e323ff4cd168427ff92ce
[ "BSD-3-Clause" ]
null
null
null
python/callback/func/func.py
qingkaikong/useful_script
2547931dd11dbff7438e323ff4cd168427ff92ce
[ "BSD-3-Clause" ]
3
2015-12-01T20:38:19.000Z
2020-12-15T20:10:34.000Z
def test(a, b): print b()
14.5
15
0.517241
6
29
2.5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.275862
29
2
16
14.5
0.714286
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
fb1c201f8580630fba487344ba7ea5b8003a9260
111
py
Python
projectdjangoportfolio/jobs/admin.py
DevLuDaley/Portfolio
c7215a3b1e5337f9bbb2863bba598b3064ef69e5
[ "MIT" ]
null
null
null
projectdjangoportfolio/jobs/admin.py
DevLuDaley/Portfolio
c7215a3b1e5337f9bbb2863bba598b3064ef69e5
[ "MIT" ]
null
null
null
projectdjangoportfolio/jobs/admin.py
DevLuDaley/Portfolio
c7215a3b1e5337f9bbb2863bba598b3064ef69e5
[ "MIT" ]
null
null
null
from django.contrib import admin from.models import Job admin.site.register(Job) # Register your models here.
18.5
32
0.801802
17
111
5.235294
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.126126
111
5
33
22.2
0.917526
0.234234
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
34a3b4a7e1966e32d27cb46659df093776257437
69
py
Python
omnia_timeseries/__init__.py
equinor/omnia-timeseries-python
02cb4fe5eef3703725cb16f1a3d2c7094b3d623d
[ "MIT" ]
5
2021-06-18T10:09:09.000Z
2022-03-04T13:14:57.000Z
omnia_timeseries/__init__.py
equinor/omnia-timeseries-python
02cb4fe5eef3703725cb16f1a3d2c7094b3d623d
[ "MIT" ]
3
2021-05-27T08:49:10.000Z
2021-11-12T11:17:21.000Z
omnia_timeseries/__init__.py
equinor/omnia-timeseries-python
02cb4fe5eef3703725cb16f1a3d2c7094b3d623d
[ "MIT" ]
1
2021-10-06T09:39:08.000Z
2021-10-06T09:39:08.000Z
from omnia_timeseries.api import TimeseriesAPI, TimeseriesEnvironment
69
69
0.913043
7
69
8.857143
1
0
0
0
0
0
0
0
0
0
0
0
0.057971
69
1
69
69
0.953846
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
34aad533350d28ac32ca85f8601235b5751af580
283
py
Python
Mundo 3/Aula 16 - Tuplas/Ex074 - Maior e menor valor com tupla.py
Ruben-974/Exercicios-Python
11fc5c7c64c1b5e5f54f59821847987d4878764c
[ "MIT" ]
null
null
null
Mundo 3/Aula 16 - Tuplas/Ex074 - Maior e menor valor com tupla.py
Ruben-974/Exercicios-Python
11fc5c7c64c1b5e5f54f59821847987d4878764c
[ "MIT" ]
null
null
null
Mundo 3/Aula 16 - Tuplas/Ex074 - Maior e menor valor com tupla.py
Ruben-974/Exercicios-Python
11fc5c7c64c1b5e5f54f59821847987d4878764c
[ "MIT" ]
null
null
null
from random import randint n = (randint(1, 9), randint(1, 9), randint(1, 9), randint(1, 9), randint(1, 9)) print('Os números sorteados foram: ', end='') for c in n: print(c, end=' ') print(f'\nO maior valor sorteado foi: {max(n)}') print(f'O menor valor sorteado foi: {min(n)}')
35.375
79
0.639576
51
283
3.54902
0.509804
0.220994
0.248619
0.353591
0.248619
0.248619
0.248619
0.248619
0.248619
0.248619
0
0.042017
0.159011
283
7
80
40.428571
0.718487
0
0
0
0
0
0.363958
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0.571429
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
34b0627ddf54dc4030ea1fef447d1fe5ea946c8c
297
py
Python
moviepy/video/fx/all/__init__.py
odidev/moviepy
b19a690fe81b17fa582622d1c0ebe73e4e6380e7
[ "MIT" ]
8,558
2015-01-03T05:14:12.000Z
2022-03-31T21:45:38.000Z
moviepy/video/fx/all/__init__.py
odidev/moviepy
b19a690fe81b17fa582622d1c0ebe73e4e6380e7
[ "MIT" ]
1,592
2015-01-02T22:12:54.000Z
2022-03-30T13:10:40.000Z
moviepy/video/fx/all/__init__.py
odidev/moviepy
b19a690fe81b17fa582622d1c0ebe73e4e6380e7
[ "MIT" ]
1,332
2015-01-02T18:01:53.000Z
2022-03-31T22:47:28.000Z
""" moviepy.video.fx.all is deprecated. Use the fx method directly from the clip instance (e.g. ``clip.resize(...)``) or import the function from moviepy.video.fx instead. """ import warnings from moviepy.video.fx import * # noqa F401,F403 warnings.warn(f"\nMoviePy: {__doc__}", UserWarning)
22.846154
77
0.723906
44
297
4.795455
0.659091
0.170616
0.199052
0.170616
0
0
0
0
0
0
0
0.023346
0.13468
297
12
78
24.75
0.797665
0.619529
0
0
0
0
0.190476
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
34b2720c17b7d23f1bc3687785eec5b224b79560
109
py
Python
hello_world.py
TruthLacksLyricism/learning-python
7a279ad0698860b612fc6b76ff99c81acd29d31b
[ "MIT" ]
null
null
null
hello_world.py
TruthLacksLyricism/learning-python
7a279ad0698860b612fc6b76ff99c81acd29d31b
[ "MIT" ]
null
null
null
hello_world.py
TruthLacksLyricism/learning-python
7a279ad0698860b612fc6b76ff99c81acd29d31b
[ "MIT" ]
null
null
null
print "This line will be printed." x = "rachel" if x == "rachel": print "Rachel" print "Hello, World!"
13.625
34
0.623853
16
109
4.25
0.6875
0.205882
0
0
0
0
0
0
0
0
0
0
0.220183
109
7
35
15.571429
0.8
0
0
0
0
0
0.522936
0
0
0
0
0
0
0
null
null
0
0
null
null
0.6
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
1
0
0
0
0
0
0
1
0
5
34c5294b5c38bdcb5b04e56497ca943887aae731
53
py
Python
gramex/apps/nlg/__init__.py
joshuamosesb/gramex
e416cb609698b5941a18b06743c853dee50e0500
[ "MIT" ]
1
2020-05-17T18:03:44.000Z
2020-05-17T18:03:44.000Z
gramex/apps/nlg/__init__.py
joshuamosesb/gramex
e416cb609698b5941a18b06743c853dee50e0500
[ "MIT" ]
null
null
null
gramex/apps/nlg/__init__.py
joshuamosesb/gramex
e416cb609698b5941a18b06743c853dee50e0500
[ "MIT" ]
null
null
null
from .nlgsearch import templatize # NOQA: F401
26.5
52
0.698113
6
53
6.166667
1
0
0
0
0
0
0
0
0
0
0
0.075
0.245283
53
1
53
53
0.85
0.188679
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
34fa480bc9c2232054eb51335128e85dbc56e507
169
py
Python
mskit/metric/__init__.py
gureann/MSKit
8b360d38288100476740ad808e11b6c1b454dc2c
[ "MIT" ]
null
null
null
mskit/metric/__init__.py
gureann/MSKit
8b360d38288100476740ad808e11b6c1b454dc2c
[ "MIT" ]
null
null
null
mskit/metric/__init__.py
gureann/MSKit
8b360d38288100476740ad808e11b6c1b454dc2c
[ "MIT" ]
null
null
null
from . import similarity from .distance import frechet_dist from .similarity import pcc, sa from . import robust from .robust import iqr, cv, fwhm, count_missing_values
28.166667
55
0.804734
25
169
5.32
0.6
0.150376
0
0
0
0
0
0
0
0
0
0
0.142012
169
5
56
33.8
0.917241
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
34ff02f32b21e2a010eed7ca24f81bd53b637b63
73
py
Python
syft_tensorflow/serde/__init__.py
shubham3121/PySyft-TensorFlow
a8a6e47f206e324469dbeb995dc7117c09438ba0
[ "Apache-2.0" ]
39
2019-10-02T13:48:03.000Z
2022-01-22T21:18:43.000Z
syft_tensorflow/serde/__init__.py
shubham3121/PySyft-TensorFlow
a8a6e47f206e324469dbeb995dc7117c09438ba0
[ "Apache-2.0" ]
19
2019-10-10T22:04:47.000Z
2020-12-15T18:00:34.000Z
syft_tensorflow/serde/__init__.py
shubham3121/PySyft-TensorFlow
a8a6e47f206e324469dbeb995dc7117c09438ba0
[ "Apache-2.0" ]
12
2019-10-24T15:11:27.000Z
2022-03-25T09:03:52.000Z
from syft_tensorflow.serde.serde import MAP_TF_SIMPLIFIERS_AND_DETAILERS
36.5
72
0.917808
11
73
5.636364
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.054795
73
1
73
73
0.898551
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
550d81bb5bc1c79a79d6bdfe74dcdeb0caf47b8e
6,269
py
Python
webui/forms/dag.py
blawson/dataforj
2b666f303b628ceced425e2bdb7f93ae2ccc2a73
[ "Apache-2.0" ]
1
2021-04-30T02:15:33.000Z
2021-04-30T02:15:33.000Z
webui/forms/dag.py
blawson/dataforj
2b666f303b628ceced425e2bdb7f93ae2ccc2a73
[ "Apache-2.0" ]
null
null
null
webui/forms/dag.py
blawson/dataforj
2b666f303b628ceced425e2bdb7f93ae2ccc2a73
[ "Apache-2.0" ]
1
2021-04-30T03:27:20.000Z
2021-04-30T03:27:20.000Z
from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field from crispy_forms.bootstrap import AppendedText, PrependedText, FormActions from webui.dataforj import get_flow class SelectedStepForm(forms.Form): step_name = forms.CharField(label='Step name', max_length=100) class AddSourceForm(forms.Form): step_name = forms.CharField(label='Step name', max_length=100) step_description = forms.CharField(label='Step description') uri = forms.CharField(label='URI, i.e. location of the source data') format_type = forms.CharField(label='Format of the data (e.g. CSV, Parquet, etc)') options_text = forms.CharField(widget=forms.Textarea, required=False, label='Options seperated by newlines in the form k=v, e.g. delimiter=True') helper = FormHelper() helper.form_class = 'form-horizontal' helper.layout = Layout( Field('step_name', css_class='input-xlarge'), Field('step_description', css_class='input-xlarge'), Field('uri', css_class='input-xlarge'), Field('format_type', css_class='input-xlarge'), Field('options_text', css_class='input-xlarge'), FormActions( Submit('new', 'Add Sournce', css_class="btn-primary") ) ) class AddChildForm(forms.Form): CHOICES=[ ('sql', 'SQL'), ('pyspark', 'PySpark'), ('union', 'Union'), ('sink', 'Sink') ] step_type = forms.ChoiceField(label='Choose the type of step you wish to create', choices=CHOICES, widget=forms.RadioSelect) helper = FormHelper() helper.form_class = 'form-horizontal' helper.layout = Layout( Field('step_type', css_class='input-xlarge') ) def create_dependson_tuple(flow): depends_on_list=[step.name for step in flow._steps.values() if step.dagre_type != 'Sink'] return tuple((name, name) for name in depends_on_list) class AddSinkForm(forms.Form): step_name = forms.CharField(label='Step name', max_length=100) step_description = forms.CharField(label='Step description') depends_ons = forms.ChoiceField(label='Which step should become input for this one', choices=[]) uri = forms.CharField(label='URI, i.e. location of the source data') format_type = forms.CharField(label='Format of the data (e.g. CSV, Parquet, etc)') mode = forms.CharField(label='Mode (e.g. overwrite)') options_text = forms.CharField(widget=forms.Textarea, label='Options seperated by newlines in the form k=v, e.g. delimiter=True', required=False) helper = FormHelper() helper.form_class = 'form-horizontal' helper.layout = Layout( Field('step_type', css_class='input-xlarge'), Field('step_name', css_class='input-xlarge'), Field('step_description', css_class='input-xlarge'), Field('depends_ons', rows="3", css_class='input-xlarge'), Field('uri', css_class='input-xlarge'), Field('format_type', css_class='input-xlarge'), Field('mode', css_class='input-xlarge'), Field('options_text', css_class='input-xlarge') ) def __init__(self, *args, **kwargs): flow = kwargs.pop('flow') super(AddSinkForm, self).__init__(*args, **kwargs) self.fields['depends_ons'].choices = create_dependson_tuple(flow) class AddUnionForm(forms.Form): step_name = forms.CharField(label='Step name', max_length=100) step_description = forms.CharField(label='Step description') depends_ons = forms.MultipleChoiceField(label='Which steps should become input for this one', choices=[]) helper = FormHelper() helper.form_class = 'form-horizontal' helper.layout = Layout( Field('step_type', css_class='input-xlarge'), Field('step_name', css_class='input-xlarge'), Field('step_description', css_class='input-xlarge'), Field('depends_ons', rows="3", css_class='input-xlarge') ) def __init__(self, *args, **kwargs): flow = kwargs.pop('flow') super(AddUnionForm, self).__init__(*args, **kwargs) self.fields['depends_ons'].choices = create_dependson_tuple(flow) class AddSqlForm(forms.Form): step_name = forms.CharField(label='Step name', max_length=100) step_description = forms.CharField(label='Step description') depends_ons = forms.MultipleChoiceField(label='Which steps should become input for this one', choices=[]) sql_file_path = forms.CharField(label='Location where the SQL code will be stored') helper = FormHelper() helper.form_class = 'form-horizontal' helper.layout = Layout( Field('step_type', css_class='input-xlarge'), Field('step_name', css_class='input-xlarge'), Field('step_description', css_class='input-xlarge'), Field('depends_ons', rows="3", css_class='input-xlarge'), Field('sql_file_path', css_class='input-xlarge') ) def __init__(self, *args, **kwargs): flow = kwargs.pop('flow') super(AddSqlForm, self).__init__(*args, **kwargs) self.fields['depends_ons'].choices = create_dependson_tuple(flow) class AddPySparkForm(forms.Form): step_name = forms.CharField(label='Step name', max_length=100) step_description = forms.CharField(label='Step description') depends_ons = forms.MultipleChoiceField(label='Which steps should become input for this one', choices=[]) pyspark_file_path = forms.CharField(label='Location where the PySpark code will be stored') helper = FormHelper() helper.form_class = 'form-horizontal' helper.layout = Layout( Field('step_type', css_class='input-xlarge'), Field('step_name', css_class='input-xlarge'), Field('step_description', css_class='input-xlarge'), Field('depends_ons', rows="3", css_class='input-xlarge'), Field('pyspark_file_path', css_class='input-xlarge') ) def __init__(self, *args, **kwargs): flow = kwargs.pop('flow') super(AddPySparkForm, self).__init__(*args, **kwargs) self.fields['depends_ons'].choices = create_dependson_tuple(flow)
40.445161
128
0.667092
776
6,269
5.198454
0.161082
0.057511
0.090233
0.131879
0.796232
0.795488
0.795488
0.765245
0.743927
0.743927
0
0.004369
0.196682
6,269
154
129
40.707792
0.796664
0
0
0.586777
0
0
0.25666
0
0
0
0
0
0
1
0.041322
false
0
0.041322
0
0.413223
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
9b37f557e5299f598ed6cf66a7877c41c10b6ac2
3,212
py
Python
src/endtype_controller/__init__.py
CadworkMontreal/CwAPI3D
5a2c15ad9f334d6dbfa55d59b6a855ac5667f289
[ "MIT" ]
null
null
null
src/endtype_controller/__init__.py
CadworkMontreal/CwAPI3D
5a2c15ad9f334d6dbfa55d59b6a855ac5667f289
[ "MIT" ]
null
null
null
src/endtype_controller/__init__.py
CadworkMontreal/CwAPI3D
5a2c15ad9f334d6dbfa55d59b6a855ac5667f289
[ "MIT" ]
null
null
null
from typing import List def create_new_endtype(endtype_name: str, endtype_id: int, folder_name: str) -> int: """Create a new endtype Args: endtype_name (str): name endtype_id (int): endtype id folder_name (str): folder name Returns: int: endtype id """ def get_endtype_id(name: str) -> int: """Gets the endtypeID by endtypename Args: name (str): endtype name Returns: int: endtype id """ def get_endtype_id_end(element_id: int) -> int: """Gets the endtypeID of the end face Args: arg0 (int): elmement ID Returns: int: endtype id """ def get_endtype_id_facet(element: int, face_number: int) -> int: """Gets the endtypeID of the face with a number Args: element (int): element ID face_number (int): face number Returns: int: endtype id """ def get_endtype_id_start(element: int) -> int: """Gets the endtypeID of the start face Args: element (int): element ID Returns: int: endtype id """ def get_endtype_name(endtype_id: int) -> str: """Get endtype name Args: endtype_id (int): endtype ID Returns: str: endtype name """ def get_endtype_name_end(element: int) -> str: """Get endtype name end Args: endtype_id (int): endtype ID Returns: str: endtype name """ def get_endtype_name_facet(element: int, face_number: int) -> str: """Gets the endtypename of the face with a number Args: element (int): element ID face_number (int): face number Returns: str: endtype name facet """ def get_endtype_name_start(element: int) -> str: """Gets the endtypename of the start face Args: element (int): element ID Returns: str: endtype name start """ def set_endtype_id_end(element: int, endtype_id: int) -> None: """Sets the endtype to end face by endtypeID Args: element (int): element ID endtype_id (int): endtype ID """ def set_endtype_id_facet(element: int, endtype_id: int, face_number: int) -> None: """Sets the endtype to a face by endtypeID Args: element (int): element ID endtype_id (int): endtype ID face_number (int): face number """ def set_endtype_id_start(element: int, endtype_id: int) -> None: """Sets the endtype to start face by endtypeID Args: element (int): element ID endtype_id (int): endtype ID """ def set_endtype_name_end(element: int, face_number: str) -> None: """Sets the endtype to end face by endtypename Args: element (int): element ID face_number (str): face number """ def set_endtype_name_facet(element: int, name: str, face_number: int) -> None: """Sets the endtype to a face by endtypename Args: element (int): element ID name (str): name face_number (int): face number """ def set_endtype_name_start(element: int, face_number: str) -> None: """Sets the endtype to start face by endtypename Args: element (int): element ID face_number (str): face number """
23.970149
84
0.615816
435
3,212
4.386207
0.082759
0.136792
0.08805
0.110063
0.834382
0.73847
0.701258
0.638889
0.528826
0.488994
0
0.000436
0.285181
3,212
134
85
23.970149
0.830575
0.560087
0
0
0
0
0
0
0
0
0
0
0
1
0.9375
false
0
0.0625
0
1
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
9b6a583e7f9d54f4d8150fa8893fc6c891b5dbd8
172
py
Python
falcon/core/events/handling/base_handler.py
jopereira/horus-tracer
03671206f02c5ebea18f5682b346f59884e0a538
[ "MIT" ]
21
2018-04-18T19:01:09.000Z
2021-11-24T19:22:33.000Z
falcon/core/events/handling/base_handler.py
jopereira/horus-tracer
03671206f02c5ebea18f5682b346f59884e0a538
[ "MIT" ]
29
2018-04-30T16:39:27.000Z
2021-04-03T16:04:19.000Z
falcon/core/events/handling/base_handler.py
jopereira/horus-tracer
03671206f02c5ebea18f5682b346f59884e0a538
[ "MIT" ]
7
2018-04-21T13:04:03.000Z
2021-03-07T08:24:26.000Z
class BaseHandler(object): def boot(self): pass def handle(self, cpu, data, size): raise NotImplementedError def shutdown(self): pass
17.2
38
0.604651
19
172
5.473684
0.736842
0.153846
0
0
0
0
0
0
0
0
0
0
0.30814
172
9
39
19.111111
0.87395
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.428571
false
0.285714
0
0
0.571429
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
9b6ff38b27b5eaa149ea68c6674af0e96146a1de
28
py
Python
trump/extensions/source/tx-worldbankst/__init__.py
Equitable/trump
a2802692bc642fa32096374159eea7ceca2947b4
[ "BSD-3-Clause" ]
8
2015-03-14T13:09:46.000Z
2020-08-29T17:49:52.000Z
trump/extensions/source/tx-worldbankst/__init__.py
Equitable/trump
a2802692bc642fa32096374159eea7ceca2947b4
[ "BSD-3-Clause" ]
64
2015-03-14T12:14:17.000Z
2015-08-15T12:31:42.000Z
trump/extensions/source/tx-worldbankst/__init__.py
Equitable/trump
a2802692bc642fa32096374159eea7ceca2947b4
[ "BSD-3-Clause" ]
10
2015-03-14T12:18:02.000Z
2022-01-18T21:44:27.000Z
from worldbankstext import *
28
28
0.857143
3
28
8
1
0
0
0
0
0
0
0
0
0
0
0
0.107143
28
1
28
28
0.96
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
9b71684b4558f4e73ca309d8159aa55dc5c42ada
51
py
Python
storage/models/__init__.py
parveenchahal/python-common
4e5488615db3e0f8ba7f0bfeee87304a98fee2d5
[ "MIT" ]
null
null
null
storage/models/__init__.py
parveenchahal/python-common
4e5488615db3e0f8ba7f0bfeee87304a98fee2d5
[ "MIT" ]
null
null
null
storage/models/__init__.py
parveenchahal/python-common
4e5488615db3e0f8ba7f0bfeee87304a98fee2d5
[ "MIT" ]
null
null
null
from ._storage_entry_model import StorageEntryModel
51
51
0.921569
6
51
7.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.058824
51
1
51
51
0.916667
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
9b79f3b170c6f1c8996ced8d0a625ff3c7e18cd9
4,856
py
Python
epytope/Data/pssms/arb/mat/B_5801_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
7
2021-02-01T18:11:28.000Z
2022-01-31T19:14:07.000Z
epytope/Data/pssms/arb/mat/B_5801_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
22
2021-01-02T15:25:23.000Z
2022-03-14T11:32:53.000Z
epytope/Data/pssms/arb/mat/B_5801_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
4
2021-05-28T08:50:38.000Z
2022-03-14T11:45:32.000Z
B_5801_9 = {0: {'A': -0.3411047643185575, 'C': 0.003633483019123024, 'E': -0.4818751780000427, 'D': -0.48635888961606405, 'G': -0.2552323225624609, 'F': -0.18023397304713804, 'I': 0.3607439895775445, 'H': 0.020686177466924322, 'K': 0.8273437122618179, 'M': 0.47430136579724197, 'L': 0.17966127012728303, 'N': -0.3291966962696378, 'Q': -0.21345233956382428, 'P': -0.5325369892850287, 'S': -0.16301393166900496, 'R': 0.027601955371264083, 'T': -0.18363093014019005, 'W': 0.10578368712358037, 'V': 0.052805213226038004, 'Y': -0.02429605455631148}, 1: {'A': 1.174860463273255, 'C': -0.2457666452096607, 'E': -0.5906915606703014, 'D': -0.548169630828652, 'G': 0.19969510117868258, 'F': -0.36554838520842226, 'I': -0.3276255291469775, 'H': -0.5376109875970715, 'K': -0.45690036967999276, 'M': -0.041595243905379574, 'L': -0.3505575547489804, 'N': -0.31767465208943557, 'Q': -0.3475029432425459, 'P': -0.5979633564295069, 'S': 1.2852802397755638, 'R': -0.534535428563245, 'T': 0.6447770595158945, 'W': -0.441133012859596, 'V': -0.1520364358887288, 'Y': -0.50951053028935}, 2: {'A': 0.2684471724541413, 'C': -0.22902610856967154, 'E': -0.43278624501578816, 'D': -0.06934855994261531, 'G': -0.06716035432846008, 'F': 0.10455873668111254, 'I': 0.1925134837370194, 'H': -0.23149990350621824, 'K': -0.46548913891902827, 'M': 0.3464088618155669, 'L': 0.18626735624915097, 'N': 0.38542411767568263, 'Q': -0.22383835157789417, 'P': -0.48532126156662114, 'S': 0.4532418271352197, 'R': -0.4544277107989695, 'T': 0.3260679087260621, 'W': 0.15010475497333664, 'V': 0.07161428162621108, 'Y': 0.017730490237516758}, 3: {'A': 0.37784956251501206, 'C': -0.4793875343459822, 'E': -0.08902382036802833, 'D': -0.20050905903977564, 'G': -0.06495306821998638, 'F': -0.0593473711437512, 'I': 0.09933541588624818, 'H': 0.03514885697831995, 'K': -0.06116699534123581, 'M': -0.040991791908567006, 'L': -0.0835037295409453, 'N': 0.004148481569409193, 'Q': 0.1711363775698798, 'P': 0.24374294428136922, 'S': 0.2637317211760683, 'R': -0.07428765491674041, 'T': -0.20527317097312292, 'W': -0.30252432168185744, 'V': 0.011206871127331007, 'Y': -0.12549661307016982}, 4: {'A': -0.0037956386025211923, 'C': 0.3425836755273221, 'E': 0.10837411544244627, 'D': -0.10977722569677738, 'G': -0.07429577634177878, 'F': -0.05545998502340835, 'I': 0.03806137859551105, 'H': -0.14042662908810716, 'K': -0.20302056052250367, 'M': 0.1420266411631764, 'L': -0.1064722376037199, 'N': -0.17401409416144922, 'Q': 0.11997316956010566, 'P': -0.04128125080580932, 'S': 0.19196080156121637, 'R': -0.3491766626926857, 'T': 0.48839925104094956, 'W': -0.1944017253597289, 'V': 0.3636334120779938, 'Y': 0.005288600613324553}, 5: {'A': 0.024240456081329534, 'C': -0.05403424525777517, 'E': -0.1372571018612249, 'D': 0.1998462489077772, 'G': 0.03626418238439089, 'F': -0.22385026969299843, 'I': -0.007118698099601649, 'H': 0.18750955312048573, 'K': -0.25639938785996624, 'M': -0.10761999816284834, 'L': -0.07945610243767709, 'N': -0.01336954634949329, 'Q': 0.03388141345430495, 'P': 0.3792426447667947, 'S': 0.14003490093027127, 'R': -0.35413455397288635, 'T': -0.040374278317003756, 'W': 0.17171048536053823, 'V': 0.0144078763897194, 'Y': 0.3456580758311246}, 6: {'A': -0.048764474656820316, 'C': 0.12527155006022642, 'E': 0.018375613094484246, 'D': -0.14355729462432953, 'G': -0.24198435176223246, 'F': 0.5050091762270842, 'I': -0.23409484528144958, 'H': 0.26461313711055967, 'K': -0.29103757239392125, 'M': 0.10614249980976018, 'L': 0.2980575675511649, 'N': -0.12749768289935284, 'Q': -0.05399490523715788, 'P': -0.04337669219017715, 'S': -0.14150596935678242, 'R': -0.3052744786829771, 'T': -0.016085631730931502, 'W': 0.40021875630643317, 'V': -0.12139104413894072, 'Y': 0.04764866712879748}, 7: {'A': -0.2887306170747365, 'C': -0.05546020707654955, 'E': 0.19614530507925096, 'D': -0.11508919814164928, 'G': -0.12096740474241689, 'F': 0.008661990458820913, 'I': 0.06185055066826462, 'H': 0.40470050115085127, 'K': -0.13793373991315833, 'M': -0.19958425618472464, 'L': 0.171498045363748, 'N': 0.09101485071050694, 'Q': 0.31543446904424916, 'P': -0.2442195336322221, 'S': 0.137140741872122, 'R': 0.10414695150169023, 'T': 0.1017840080220198, 'W': -0.10367157482864542, 'V': -0.04055738088903421, 'Y': 0.14643767030214036}, 8: {'A': -0.5774250143899277, 'C': -0.5489099143796122, 'E': -0.5419428470896012, 'D': -0.5395040580297729, 'G': -0.5145904975923917, 'F': 0.4800720103518297, 'I': -0.1826648609200773, 'H': -0.16754627174560963, 'K': -0.594895104992003, 'M': 0.019272566780701248, 'L': -0.43483232548876344, 'N': -0.44121647814689663, 'Q': -0.43432236841340954, 'P': -0.5419428470896012, 'S': -0.5417201571462467, 'R': -0.5221447856642065, 'T': -0.5509579040144501, 'W': 1.9927421718393323, 'V': -0.5507750466260991, 'Y': 0.1924242909646485}, -1: {'slope': 0.11072004198674867, 'intercept': -0.4166818572835276}}
4,856
4,856
0.706549
559
4,856
6.134168
0.384615
0.005249
0
0
0
0
0
0
0
0
0
0.721714
0.077224
4,856
1
4,856
4,856
0.043517
0
0
0
0
0
0.039942
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
9b822cf2e09599ac604bde44effce84c6a2e3f54
54
py
Python
gr_module.py
GunarakulanGunaretnam/python-basic-fundamentals
c62bf939fbaef8895d28f85af9ef6ced70801f96
[ "Apache-2.0" ]
null
null
null
gr_module.py
GunarakulanGunaretnam/python-basic-fundamentals
c62bf939fbaef8895d28f85af9ef6ced70801f96
[ "Apache-2.0" ]
null
null
null
gr_module.py
GunarakulanGunaretnam/python-basic-fundamentals
c62bf939fbaef8895d28f85af9ef6ced70801f96
[ "Apache-2.0" ]
null
null
null
def print_name(): print("My name is Gunarakulan")
10.8
32
0.685185
8
54
4.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.185185
54
5
33
10.8
0.818182
0
0
0
0
0
0.4
0
0
0
0
0
0
1
0.5
true
0
0
0
0.5
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
1
0
5
9ba95d022de0cbe77839799064d678253b042077
204
py
Python
tests/test_gluupostgres.py
danilosoarescardoso/cloud-native-edition
b8aa66119dc4440b1ca3741a4065c9ae7feb42fb
[ "Apache-2.0" ]
1
2021-04-04T04:25:49.000Z
2021-04-04T04:25:49.000Z
tests/test_gluupostgres.py
danilosoarescardoso/cloud-native-edition
b8aa66119dc4440b1ca3741a4065c9ae7feb42fb
[ "Apache-2.0" ]
null
null
null
tests/test_gluupostgres.py
danilosoarescardoso/cloud-native-edition
b8aa66119dc4440b1ca3741a4065c9ae7feb42fb
[ "Apache-2.0" ]
null
null
null
import pygluu.kubernetes.postgres as module0 from pygluu.kubernetes.postgres import Postgres def test_base_exception(): try: var0 = module0.Postgres() except BaseException: pass
20.4
47
0.72549
23
204
6.347826
0.695652
0.219178
0.328767
0
0
0
0
0
0
0
0
0.018634
0.210784
204
9
48
22.666667
0.888199
0
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0.142857
0.285714
0
0.428571
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
9bbde6aa054a0343fb01e156fb53162fe6c254c5
96
py
Python
python/tests/test_linked_list.py
Leenhazaimeh/data-structures-and-algorithms
d55d55bf8c98e768cb929326b5ec8c18fb5c8384
[ "MIT" ]
null
null
null
python/tests/test_linked_list.py
Leenhazaimeh/data-structures-and-algorithms
d55d55bf8c98e768cb929326b5ec8c18fb5c8384
[ "MIT" ]
10
2021-07-29T18:56:48.000Z
2021-09-11T19:11:00.000Z
python/tests/test_linked_list.py
Leenhazaimeh/data-structures-and-algorithms
d55d55bf8c98e768cb929326b5ec8c18fb5c8384
[ "MIT" ]
3
2021-08-16T06:16:37.000Z
2021-12-05T14:29:51.000Z
# from linked_list.linked_list import LinkedList # def test_import(): # assert LinkedList
16
48
0.75
12
96
5.75
0.666667
0.289855
0
0
0
0
0
0
0
0
0
0
0.177083
96
5
49
19.2
0.873418
0.90625
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
1
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
32f125ad1d76b4e0fde9ddfeb972aeb7353e40c7
42
py
Python
downloads.py
Jamal135/fine-grained-sentiment-app
4754cefd77ccfa99b15a7721c3471aeacec650c9
[ "MIT" ]
null
null
null
downloads.py
Jamal135/fine-grained-sentiment-app
4754cefd77ccfa99b15a7721c3471aeacec650c9
[ "MIT" ]
null
null
null
downloads.py
Jamal135/fine-grained-sentiment-app
4754cefd77ccfa99b15a7721c3471aeacec650c9
[ "MIT" ]
null
null
null
import nltk nltk.download('vader_lexicon')
21
30
0.833333
6
42
5.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.047619
42
2
30
21
0.85
0
0
0
0
0
0.302326
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
fd00768ed39187f9b978abbf6c4d123c662329a9
121
py
Python
fuzzer/fuzzing_strategies/base_strategy/base_strategy.py
Dyfox100/Libstemmer_Fuzzer
263d6e64e007116a348d994851aa05e4c0c35358
[ "MIT" ]
null
null
null
fuzzer/fuzzing_strategies/base_strategy/base_strategy.py
Dyfox100/Libstemmer_Fuzzer
263d6e64e007116a348d994851aa05e4c0c35358
[ "MIT" ]
null
null
null
fuzzer/fuzzing_strategies/base_strategy/base_strategy.py
Dyfox100/Libstemmer_Fuzzer
263d6e64e007116a348d994851aa05e4c0c35358
[ "MIT" ]
null
null
null
import abc class Abstract_Strategy(metaclass=abc.ABCMeta): @abc.abstractmethod def generate(self): pass
17.285714
47
0.710744
14
121
6.071429
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.206612
121
6
48
20.166667
0.885417
0
0
0
1
0
0
0
0
0
0
0
0
1
0.2
false
0.2
0.2
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
5
fd0f8e0645346f82a2ff9bdf244ca7d9bf72405b
186
py
Python
xauto/common/futils.py
sababa11/xauto
107e59344b4624941387a4dff0d439719075ebf4
[ "Apache-2.0" ]
null
null
null
xauto/common/futils.py
sababa11/xauto
107e59344b4624941387a4dff0d439719075ebf4
[ "Apache-2.0" ]
null
null
null
xauto/common/futils.py
sababa11/xauto
107e59344b4624941387a4dff0d439719075ebf4
[ "Apache-2.0" ]
null
null
null
import os import sys def get_workdir(): """ get_workdir() -> workdir: [str] Returns the current workdir. """ return os.path.realpath(os.path.dirname(sys.argv[0]))
15.5
57
0.629032
25
186
4.6
0.64
0.173913
0
0
0
0
0
0
0
0
0
0.006897
0.22043
186
11
58
16.909091
0.786207
0.327957
0
0
0
0
0
0
0
0
0
0
0
1
0.25
true
0
0.5
0
1
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
1
1
0
1
0
1
0
0
5
fd57c568a71d49ca653bf0ce40af26241330267b
190
py
Python
geosolver/text/generate_rules.py
mhrmm/geosolver
13ae2972c58d5ba4c4878576f9fba8569cc99629
[ "Apache-2.0" ]
83
2015-09-14T13:50:42.000Z
2022-03-12T10:24:38.000Z
geosolver/text/generate_rules.py
nehamjadhav/geosolver
13ae2972c58d5ba4c4878576f9fba8569cc99629
[ "Apache-2.0" ]
8
2021-07-21T09:55:42.000Z
2022-02-15T02:31:47.000Z
geosolver/text/generate_rules.py
nehamjadhav/geosolver
13ae2972c58d5ba4c4878576f9fba8569cc99629
[ "Apache-2.0" ]
33
2015-06-16T18:52:43.000Z
2021-12-16T08:58:27.000Z
from geosolver.ontology.ontology_definitions import FunctionSignature, signatures from geosolver.text.rule import TagRule from geosolver.utils.num import is_number __author__ = 'minjoon'
23.75
81
0.847368
23
190
6.73913
0.695652
0.251613
0
0
0
0
0
0
0
0
0
0
0.1
190
7
82
27.142857
0.906433
0
0
0
0
0
0.037234
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
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
b5e65e7ea71fdd5c4688f420edd49d985bd3eb75
89
py
Python
coding/calculate-5-6/code.py
mowshon/python-quiz
215fb23dbb0fa42b438f988e49172b87b48bade3
[ "MIT" ]
2
2020-07-17T21:08:26.000Z
2020-08-16T03:12:07.000Z
coding/calculate-5-6/code.py
mowshon/python-quiz
215fb23dbb0fa42b438f988e49172b87b48bade3
[ "MIT" ]
2
2021-06-08T22:04:35.000Z
2022-01-13T03:03:32.000Z
coding/calculate-5-6/code.py
mowshon/python-quiz
215fb23dbb0fa42b438f988e49172b87b48bade3
[ "MIT" ]
null
null
null
def calculate(num1, num2=4): res = num1 * num2 print(res) print(calculate(5, 6))
17.8
28
0.629213
14
89
4
0.642857
0.285714
0
0
0
0
0
0
0
0
0
0.1
0.213483
89
5
29
17.8
0.7
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.25
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
1
0
5
b5ea159a84e98d9a3984e6fe5b31678efa676891
143
py
Python
References/Geovana Neves/TCC_Geovana_Neves_GitHub/SUAVE_modifications/SUAVE-feature-constant_throttle_EAS/trunk/SUAVE/Analyses/Results.py
Vinicius-Tanigawa/Undergraduate-Research-Project
e92372f07882484b127d7affe305eeec2238b8a9
[ "MIT" ]
null
null
null
References/Geovana Neves/TCC_Geovana_Neves_GitHub/SUAVE_modifications/SUAVE-feature-constant_throttle_EAS/trunk/SUAVE/Analyses/Results.py
Vinicius-Tanigawa/Undergraduate-Research-Project
e92372f07882484b127d7affe305eeec2238b8a9
[ "MIT" ]
null
null
null
References/Geovana Neves/TCC_Geovana_Neves_GitHub/SUAVE_modifications/SUAVE-feature-constant_throttle_EAS/trunk/SUAVE/Analyses/Results.py
Vinicius-Tanigawa/Undergraduate-Research-Project
e92372f07882484b127d7affe305eeec2238b8a9
[ "MIT" ]
null
null
null
# Results.py # # Created: Jan 2015, T. Lukacyzk # Modified: Feb 2016, T. MacDonald from SUAVE.Core import Data class Results(Data): pass
15.888889
34
0.699301
21
143
4.761905
0.857143
0
0
0
0
0
0
0
0
0
0
0.069565
0.195804
143
9
35
15.888889
0.8
0.524476
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
b5fe08cd114c3ed382e1d1703c6401c43f46dc9b
17,970
py
Python
Testing/test_StableMotifs.py
jcrozum/StableMotifs
8a9d640d3e8b074e0f05e9b45b8ef8bef8d8b5c7
[ "MIT" ]
9
2020-04-03T14:18:06.000Z
2021-05-18T12:08:20.000Z
Testing/test_StableMotifs.py
jcrozum/StableMotifs
8a9d640d3e8b074e0f05e9b45b8ef8bef8d8b5c7
[ "MIT" ]
30
2020-04-06T16:08:45.000Z
2021-06-14T15:15:41.000Z
Testing/test_StableMotifs.py
jcrozum/StableMotifs
8a9d640d3e8b074e0f05e9b45b8ef8bef8d8b5c7
[ "MIT" ]
2
2021-01-14T15:21:51.000Z
2021-05-18T12:04:17.000Z
import sys sys.path.append('../') import unittest import sys sys.path.insert(0,"C:/Users/jcroz/github/StableMotifs") import pystablemotifs as sm import pyboolnet.file_exchange class test_StableMotifs(unittest.TestCase): rules='''A*=B B*=A C*=A or not D D*=C E*=B and F F*=E ''' rules_pbn = sm.format.booleannet2bnet(rules) primes = pyboolnet.file_exchange.bnet2primes(rules_pbn) ar = sm.AttractorRepertoire.from_primes(primes) diag = ar.succession_diagram def test_nr_of_attractors(self): self.assertEqual(len(self.ar.attractors),3) def test_booleannet2bnet(self): self.assertEqual(self.rules_pbn, 'A,\tB\nB,\tA\nC,\tA | !D\nD,\tC\nE,\tB & F\nF,\tE\n') def test_attractor_fixed_nodes_list(self): self.assertDictEqual(self.ar.attractors[0].logically_fixed_nodes, {'A': 0, 'B': 0, 'E': 0, 'F': 0}) self.assertDictEqual(self.ar.attractors[1].logically_fixed_nodes, {'A': 1, 'B': 1, 'C': 1, 'D': 1, 'E': 1, 'F': 1}) self.assertDictEqual(self.ar.attractors[2].logically_fixed_nodes, {'A': 1, 'B': 1, 'C': 1, 'D': 1, 'E': 0, 'F': 0}) def test_motif_reduction_dict(self): motif_history_list=[i.motif_history for i in self.diag.motif_reduction_dict.values()] validation_motif_history_list=[[],[{'A': 0, 'B': 0}], [{'A': 1, 'B': 1}], [{'A': 1, 'B': 1}, {'E': 1, 'F': 1}], [{'A': 1, 'B': 1}, {'E': 0, 'F': 0}], [{'E': 0, 'F': 0}], [{'E': 0, 'F': 0}, {'A': 0, 'B': 0}]] self.assertListEqual(motif_history_list,validation_motif_history_list) def test_AttractorRepertoire_attractor_states(self): max_simulate_size=20 ar = sm.AttractorRepertoire.from_primes(self.primes, max_simulate_size=max_simulate_size) attractors_dict_list=[] for a in ar.attractors: attractors_dict_list.append(a.attractor_dict) self.assertListEqual(attractors_dict_list, [{'A': 0, 'B': 0, 'C': 'X', 'D': 'X', 'E': 0, 'F': 0}, {'A': 1, 'B': 1, 'C': 1, 'D': 1, 'E': 1, 'F': 1}, {'A': 1, 'B': 1, 'C': 1, 'D': 1, 'E': 0, 'F': 0}]) #"pathological" example with a complex attractor on a "ghost" branch rules_pathological='''xA*= not xA and not xB or xC xB*= not xA and not xB or xC xC*= xA and xB''' rules_pbn_pathological = sm.format.booleannet2bnet(rules_pathological) primes_pathological = pyboolnet.file_exchange.bnet2primes(rules_pbn_pathological) ar_pathological = sm.AttractorRepertoire.from_primes(primes_pathological) diag_pathological = ar_pathological.succession_diagram def test_ghost_branch(self): ''' High level test of the correct identification of attractors that are not preceded by stable motif lockins. (ghost_branch is not a function in the module) ''' self.assertSetEqual(set(self.ar_pathological.attractors[0].stg.nodes()),set(['000', '010', '100'])) self.assertDictEqual(self.ar_pathological.attractors[1].logically_fixed_nodes,{'xA': 1, 'xB': 1, 'xC': 1}) # self.assertListEqual(self.diag_pathological.reduced_complex_attractor_list,[[{'000', '010', '100'}], None]) # self.assertListEqual(self.diag_pathological.attractor_fixed_nodes_list,[{}, {'xA': 1, 'xB': 1, 'xC': 1}]) def test_ghost_branch_with_max_simulate_size_0(self): ''' If we don't simulate the STG with brute force at all (max_simulate_size=0) the output should give a warning on the form of a "!" for nodes that potentially oscillate. ''' max_simulate_size=0 ar = sm.AttractorRepertoire.from_primes(self.primes_pathological, max_simulate_size=max_simulate_size) attractors_dict_list=[] for a in ar.attractors: attractors_dict_list.append(a.attractor_dict) self.assertListEqual(attractors_dict_list, [{'xA': '!', 'xB': '!', 'xC': 0}, {'xA': 1, 'xB': 1, 'xC': 1}]) def test_two_complex_attractors_on_the_same_branch(self): rules='''a* = !b | Z b* = c | Z c* = a & ~Z A* = ~B | Y B* = C | Y C* = A & ~Y Z* = ~(A & B & ~C) Y* = ~(a & b & ~c) ''' rules_pbn = sm.format.booleannet2bnet(rules) primes = pyboolnet.file_exchange.bnet2primes(rules_pbn) max_simulate_size=20 ar = sm.AttractorRepertoire.from_primes(primes, max_simulate_size=max_simulate_size) attractors_dict_list=[] for a in ar.attractors: attractors_dict_list.append(a.attractor_dict) self.assertListEqual(attractors_dict_list, [{'A': '1', 'B': '1', 'C': '0', 'Y': '1', 'Z': '0', 'a': 'X', 'b': 'X', 'c': 'X'}, {'A': 'X', 'B': 'X', 'C': 'X', 'Y': '0', 'Z': '1', 'a': '1', 'b': '1', 'c': '0'}]) max_simulate_size=0 ar = sm.AttractorRepertoire.from_primes(primes, max_simulate_size=max_simulate_size) attractors_dict_list=[] for a in ar.attractors: attractors_dict_list.append(a.attractor_dict) self.assertListEqual(attractors_dict_list, [{'A': '?', 'B': '?', 'C': '?', 'Y': '?', 'Z': '?', 'a': '?', 'b': '?', 'c': '?'}]) #Testing functions of export.py def test_networkx_succession_diagram_reduced_network_based(self): import pystablemotifs.export as ex rules='''A*=B B*=A C*=A or not D D*=C E*=B and F F*=E''' rules_pbn = sm.format.booleannet2bnet(rules) primes = pyboolnet.file_exchange.bnet2primes(rules_pbn) max_simulate_size=20 include_attractors_in_diagram=False ar = sm.AttractorRepertoire.from_primes(primes, max_simulate_size=max_simulate_size) GR=ex.networkx_succession_diagram_reduced_network_based(ar,include_attractors_in_diagram=include_attractors_in_diagram) self.assertDictEqual(dict(GR.nodes(data=True)),{0: {'label': '', 'virtual_nodes': []}, 1: {'label': '{A: 0, B: 0}', 'virtual_nodes': [{'A': 0, 'B': 0}]}, 2: {'label': '{A: 1, B: 1}', 'virtual_nodes': [{'A': 1, 'B': 1}]}, 3: {'label': '{A: 1, B: 1}, {E: 1, F: 1}', 'virtual_nodes': [{'A': 1, 'B': 1}, {'E': 1, 'F': 1}]}, 4: {'label': '{A: 1, B: 1}, {E: 0, F: 0}', 'virtual_nodes': [{'A': 1, 'B': 1}, {'E': 0, 'F': 0}]}, 5: {'label': '{E: 0, F: 0}', 'virtual_nodes': [{'E': 0, 'F': 0}]}, 6: {'label': '{E: 0, F: 0}, {A: 0, B: 0}', 'virtual_nodes': [{'E': 0, 'F': 0}, {'A': 0, 'B': 0}]}}) self.assertListEqual(list(GR.edges()), [(0, 1), (0, 2), (0, 5), (2, 3), (2, 4), (5, 6)]) def test_networkx_succession_diagram_reduced_network_based(self): import pystablemotifs.export as ex rules='''A*=B B*=A C*=A or not D D*=C E*=B and F F*=E''' rules_pbn = sm.format.booleannet2bnet(rules) primes = pyboolnet.file_exchange.bnet2primes(rules_pbn) max_simulate_size=20 include_attractors_in_diagram=False ar = sm.AttractorRepertoire.from_primes(primes, max_simulate_size=max_simulate_size) GR=ex.networkx_succession_diagram_reduced_network_based(ar,include_attractors_in_diagram=include_attractors_in_diagram) self.assertDictEqual(dict(GR.nodes(data=True)),{0: {'label': '', 'virtual_nodes': []}, 1: {'label': '{A: 0, B: 0}', 'virtual_nodes': [{'A': 0, 'B': 0}]}, 2: {'label': '{A: 1, B: 1}', 'virtual_nodes': [{'A': 1, 'B': 1}]}, 3: {'label': '{A: 1, B: 1}, {E: 1, F: 1}', 'virtual_nodes': [{'A': 1, 'B': 1}, {'E': 1, 'F': 1}]}, 4: {'label': '{A: 1, B: 1}, {E: 0, F: 0}', 'virtual_nodes': [{'A': 1, 'B': 1}, {'E': 0, 'F': 0}]}, 5: {'label': '{E: 0, F: 0}', 'virtual_nodes': [{'E': 0, 'F': 0}]}, 6: {'label': '{E: 0, F: 0}, {A: 0, B: 0}', 'virtual_nodes': [{'E': 0, 'F': 0}, {'A': 0, 'B': 0}]}}) self.assertListEqual(list(GR.edges()), [(0, 1), (0, 2), (0, 5), (2, 3), (2, 4), (5, 4), (5, 6) include_attractors_in_diagram=True GR=ex.networkx_succession_diagram_reduced_network_based(ar,include_attractors_in_diagram=include_attractors_in_diagram) self.assertDictEqual(dict(GR.nodes(data=True)),{0: {'label': '', 'virtual_nodes': []}, 1: {'label': '{A: 0, B: 0}', 'virtual_nodes': [{'A': 0, 'B': 0}]}, 2: {'label': '{A: 1, B: 1}', 'virtual_nodes': [{'A': 1, 'B': 1}]}, 3: {'label': '{A: 1, B: 1}, {E: 1, F: 1}', 'virtual_nodes': [{'A': 1, 'B': 1}, {'E': 1, 'F': 1}]}, 4: {'label': '{A: 1, B: 1}, {E: 0, F: 0}', 'virtual_nodes': [{'A': 1, 'B': 1}, {'E': 0, 'F': 0}]}, 5: {'label': '{E: 0, F: 0}', 'virtual_nodes': [{'E': 0, 'F': 0}]}, 6: {'label': '{E: 0, F: 0}, {A: 0, B: 0}', 'virtual_nodes': [{'E': 0, 'F': 0}, {'A': 0, 'B': 0}]}, 'A0': {'label': '{A: 0, B: 0, C: X, D: X, E: 0, F: 0}', 'virtual_nodes': {'A': 0, 'B': 0, 'C': 'X', 'D': 'X', 'E': 0, 'F': 0}}, 'A1': {'label': '{A: 1, B: 1, C: 1, D: 1, E: 1, F: 1}', 'virtual_nodes': {'A': 1, 'B': 1, 'C': 1, 'D': 1, 'E': 1, 'F': 1}}, 'A2': {'label': '{A: 1, B: 1, C: 1, D: 1, E: 0, F: 0}', 'virtual_nodes': {'A': 1, 'B': 1, 'C': 1, 'D': 1, 'E': 0, 'F': 0}}}) self.assertListEqual(list(GR.edges()), [(0, 1), (0, 2), (0, 5), (1, 'A0'), (2, 3), (2, 4), (3, 'A1'), (4, 'A2'), (5, 4), (5, 6), (6, 'A0')]) def test_networkx_succession_diagram_motif_based(self): import pystablemotifs.export as ex rules='''A*=B B*=A C*=A or not D D*=C E*=B and F F*=E''' rules_pbn = sm.format.booleannet2bnet(rules) primes = pyboolnet.file_exchange.bnet2primes(rules_pbn) max_simulate_size=20 include_attractors_in_diagram=False ar = sm.AttractorRepertoire.from_primes(primes, max_simulate_size=max_simulate_size) GM=ex.networkx_succession_diagram_motif_based(ar,include_attractors_in_diagram=include_attractors_in_diagram) self.assertDictEqual(dict(GM.nodes(data=True)),{(0, 1): {'label': '{A: 0, B: 0}', 'virtual_nodes': {'A': 0, 'B': 0}}, (0, 2): {'label': '{B: 1, A: 1}', 'virtual_nodes': {'B': 1, 'A': 1}}, (2, 3): {'label': '{E: 1, F: 1}', 'virtual_nodes': {'E': 1, 'F': 1}}, (2, 4): {'label': '{E: 0, F: 0}', 'virtual_nodes': {'E': 0, 'F': 0}}, (0, 5): {'label': '{E: 0, F: 0}', 'virtual_nodes': {'E': 0, 'F': 0}}, (5, 4): {'label': '{B: 1, A: 1}', 'virtual_nodes': {'B': 1, 'A': 1}}, (5, 6): {'label': '{A: 0, B: 0}', 'virtual_nodes': {'A': 0, 'B': 0}}}) self.assertListEqual(list(GM.edges()), [((0, 2), (2, 3)), ((0, 2), (2, 4)), ((0, 5), (5, 4)), ((0, 5), (5, 6))]) include_attractors_in_diagram=True ar = sm.AttractorRepertoire.from_primes(primes, max_simulate_size=max_simulate_size) GM=ex.networkx_succession_diagram_motif_based(ar,include_attractors_in_diagram=include_attractors_in_diagram) self.assertDictEqual(dict(GM.nodes(data=True)),{(0, 1): {'label': '{A: 0, B: 0}', 'virtual_nodes': {'A': 0, 'B': 0}}, (0, 2): {'label': '{B: 1, A: 1}', 'virtual_nodes': {'B': 1, 'A': 1}}, (2, 3): {'label': '{E: 1, F: 1}', 'virtual_nodes': {'E': 1, 'F': 1}}, (2, 4): {'label': '{E: 0, F: 0}', 'virtual_nodes': {'E': 0, 'F': 0}}, (0, 5): {'label': '{E: 0, F: 0}', 'virtual_nodes': {'E': 0, 'F': 0}}, (5, 4): {'label': '{B: 1, A: 1}', 'virtual_nodes': {'B': 1, 'A': 1}}, (5, 6): {'label': '{A: 0, B: 0}', 'virtual_nodes': {'A': 0, 'B': 0}}, 'A0': {'label': '{A: 0, B: 0, C: X, D: X, E: 0, F: 0}', 'virtual_nodes': {'A': 0, 'B': 0, 'C': 'X', 'D': 'X', 'E': 0, 'F': 0}}, 'A1': {'label': '{A: 1, B: 1, C: 1, D: 1, E: 1, F: 1}', 'virtual_nodes': {'A': 1, 'B': 1, 'C': 1, 'D': 1, 'E': 1, 'F': 1}}, 'A2': {'label': '{A: 1, B: 1, C: 1, D: 1, E: 0, F: 0}', 'virtual_nodes': {'A': 1, 'B': 1, 'C': 1, 'D': 1, 'E': 0, 'F': 0}}}) self.assertListEqual(list(GM.edges()), [((0, 1), 'A0'), ((0, 2), (2, 3)), ((0, 2), (2, 4)), ((2, 3), 'A1'), ((2, 4), 'A2'), ((0, 5), (5, 4)), ((0, 5), (5, 6)), ((5, 4), 'A2'), ((5, 6), 'A0')]) def test_networkx_succession_diagram_reduced_network_based_pathological_example(self): import pystablemotifs.export as ex rules=''' xA*= not xA and not xB or xC xB*= not xA and not xB or xC xC*= xA and xB ''' rules_pbn = sm.format.booleannet2bnet(rules) primes = pyboolnet.file_exchange.bnet2primes(rules_pbn) max_simulate_size=20 include_attractors_in_diagram=False ar = sm.AttractorRepertoire.from_primes(primes, max_simulate_size=max_simulate_size) GR=ex.networkx_succession_diagram_reduced_network_based(ar,include_attractors_in_diagram=include_attractors_in_diagram) self.assertDictEqual(dict(GR.nodes(data=True)),{0: {'label': '', 'virtual_nodes': []}, 1: {'label': '{xA: 1, xB: 1, xC: 1}', 'virtual_nodes': [{'xA': 1, 'xB': 1, 'xC': 1}]}}) self.assertListEqual(list(GR.edges()), [(0, 1)]) include_attractors_in_diagram=True GR=ex.networkx_succession_diagram_reduced_network_based(ar,include_attractors_in_diagram=include_attractors_in_diagram) self.assertDictEqual(dict(GR.nodes(data=True)),{0: {'label': '', 'virtual_nodes': []}, 1: {'label': '{xA: 1, xB: 1, xC: 1}', 'virtual_nodes': [{'xA': 1, 'xB': 1, 'xC': 1}]}, 'A0': {'label': '{xA: X, xB: X, xC: 0}', 'virtual_nodes': {'xA': 'X', 'xB': 'X', 'xC': 0}}, 'A1': {'label': '{xA: 1, xB: 1, xC: 1}', 'virtual_nodes': {'xA': 1, 'xB': 1, 'xC': 1}}}) self.assertListEqual(list(GR.edges()), [(0, 1), (0, 'A0'), (1, 'A1')]) if __name__ == '__main__': unittest.main()
63.723404
134
0.420701
2,059
17,970
3.493443
0.077222
0.07841
0.0171
0.0228
0.788683
0.751703
0.734742
0.712359
0.694703
0.672876
0
0.050201
0.403617
17,970
281
135
63.950178
0.620976
0
0
0.603306
0
0.028926
0.169291
0.001969
0
0
0
0
0.107438
0
null
null
0
0.03719
null
null
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
1
0
0
0
0
0
0
0
0
5