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
9f0274a32c3c863008d6522032e0c6bec173f324
2,455
py
Python
tests/pid/test_iccs.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
1
2020-03-13T10:30:11.000Z
2020-03-13T10:30:11.000Z
tests/pid/test_iccs.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
null
null
null
tests/pid/test_iccs.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
null
null
null
""" Tests for dit.pid.iccs. """ import pytest from dit.pid.measures.iccs import PID_CCS from dit.pid.distributions import bivariates, trivariates def test_pid_ccs1(): """ Test iccs on a generic distribution. """ d = bivariates['gband'] pid = PID_CCS(d, ((0,), (1,)), (2,)) assert pid[((0,), (1,))] == pytest.approx(0.81127812445913283) assert pid[((0,),)] == pytest.approx(0.5) assert pid[((1,),)] == pytest.approx(0.5) assert pid[((0, 1),)] == pytest.approx(0.0) def test_pid_ccs2(): """ Test iccs on another generic distribution. """ d = trivariates['anddup'] pid = PID_CCS(d, [[0], [1], [2]], [3]) for atom in pid._lattice: if atom == ((0,), (1,), (2,)): assert pid[atom] == pytest.approx(0.10375937481971094) elif atom in [((0,), (2,)), ((1,),)]: assert pid[atom] == pytest.approx(0.20751874963942191) elif atom in [((2,), (0, 1)), ((0,), (1, 2)), ((0, 1), (0, 2)), ((0, 1), (1, 2)), ((0, 2), (1, 2)), ((0, 1, 2),)]: assert pid[atom] == pytest.approx(0.14624062518028902) elif atom in [((2,),), ((0,),), ((0, 1), (0, 2), (1, 2)), ((0, 2),)]: assert pid[atom] == pytest.approx(-0.14624062518028902) else: assert pid[atom] == pytest.approx(0.0) def test_pid_ccs3(): """ Test iccs on another generic distribution. """ d = trivariates['anddup'] pid = PID_CCS(d) for atom in pid._lattice: if atom == ((0,), (1,), (2,)): assert pid[atom] == pytest.approx(0.10375937481971094) elif atom in [((0,), (2,)), ((1,),)]: assert pid[atom] == pytest.approx(0.20751874963942191) elif atom in [((2,), (0, 1)), ((0,), (1, 2)), ((0, 1), (0, 2)), ((0, 1), (1, 2)), ((0, 2), (1, 2)), ((0, 1, 2),)]: assert pid[atom] == pytest.approx(0.14624062518028902) elif atom in [((2,),), ((0,),), ((0, 1), (0, 2), (1, 2)), ((0, 2),)]: assert pid[atom] == pytest.approx(-0.14624062518028902) else: assert pid[atom] == pytest.approx(0.0) def test_pid_ccs4(): d = bivariates['gband'] pid = PID_CCS(d) string = """\ +--------+--------+--------+ | I_ccs | I_r | pi | +--------+--------+--------+ | {0:1} | 1.8113 | 0.0000 | | {0} | 1.3113 | 0.5000 | | {1} | 1.3113 | 0.5000 | | {0}{1} | 0.8113 | 0.8113 | +--------+--------+--------+""" assert str(pid) == string
33.175676
122
0.483096
331
2,455
3.531722
0.160121
0.035928
0.155689
0.162532
0.763045
0.763045
0.731394
0.631309
0.631309
0.631309
0
0.167935
0.250509
2,455
73
123
33.630137
0.467391
0.05947
0
0.588235
0
0
0.113032
0.037234
0
0
0
0
0.294118
1
0.078431
false
0
0.058824
0
0.137255
0
0
0
0
null
0
0
1
0
1
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
9f07be9a6baf224e47a902b51d0c918ce001f64f
399
py
Python
2020/solutions/day18/day18.cheat.py
pfgithub/advent-of-code-2019
835c61db118999e76c46c12edfd0f65349ce8fb8
[ "MIT" ]
1
2020-12-05T05:46:16.000Z
2020-12-05T05:46:16.000Z
2020/solutions/day18/day18.cheat.py
pfgithub/advent-of-code-2019
835c61db118999e76c46c12edfd0f65349ce8fb8
[ "MIT" ]
1
2021-12-12T05:24:07.000Z
2021-12-12T05:24:07.000Z
2020/solutions/day18/day18.cheat.py
pfgithub/advent-of-code
835c61db118999e76c46c12edfd0f65349ce8fb8
[ "MIT" ]
1
2019-12-14T17:19:44.000Z
2019-12-14T17:19:44.000Z
class Cheat: def __init__(self, value): self.value = value def __str__(self): return "{0}".format(self.value) def __add__(self, other): return Cheat(self.value + other.value) def __sub__(self, other): return Cheat(self.value * other.value) def __mod__(self, other): return Cheat(self.value + other.value) import sys eval(sys.stdin.read())
28.5
46
0.631579
53
399
4.377358
0.358491
0.232759
0.193966
0.258621
0.530172
0.530172
0.530172
0.530172
0.362069
0
0
0.0033
0.240602
399
14
47
28.5
0.762376
0
0
0.153846
0
0
0.0075
0
0
0
0
0
0
1
0.384615
false
0
0.076923
0.307692
0.846154
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
9f343f38da4c9acff992c116a0d0cf746b137304
620
py
Python
stlearn/pl.py
duypham2108/dev_st
47adcfa5803eba7549b1185ec69d2317b386d9ff
[ "BSD-3-Clause" ]
null
null
null
stlearn/pl.py
duypham2108/dev_st
47adcfa5803eba7549b1185ec69d2317b386d9ff
[ "BSD-3-Clause" ]
null
null
null
stlearn/pl.py
duypham2108/dev_st
47adcfa5803eba7549b1185ec69d2317b386d9ff
[ "BSD-3-Clause" ]
null
null
null
from .plotting.gene_plot import gene_plot from .plotting.gene_plot import gene_plot_interactive from .plotting.cluster_plot import cluster_plot from .plotting.cluster_plot import cluster_plot_interactive from .plotting.subcluster_plot import subcluster_plot from .plotting.non_spatial_plot import non_spatial_plot from .plotting.deconvolution_plot import deconvolution_plot from .plotting import trajectory from .plotting.QC_plot import QC_plot from .plotting.cci_plot import het_plot from .plotting.cci_plot import het_plot_interactive from .plotting.cci_plot import grid_plot from .plotting.mask_plot import plot_mask
44.285714
59
0.875806
93
620
5.526882
0.182796
0.303502
0.249027
0.157588
0.468872
0.420233
0.420233
0.132296
0
0
0
0
0.083871
620
13
60
47.692308
0.90493
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
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
9f47ffe375e137e2cab7f9c4206d2dfe44635536
118
py
Python
lando_util/organize_project/__main__.py
Duke-GCB/lando-util
c3fc2e4e59da4200f171d86a3a20ae8428b85459
[ "MIT" ]
null
null
null
lando_util/organize_project/__main__.py
Duke-GCB/lando-util
c3fc2e4e59da4200f171d86a3a20ae8428b85459
[ "MIT" ]
21
2019-02-06T19:30:07.000Z
2020-02-19T19:58:36.000Z
lando_util/organize_project/__main__.py
Duke-GCB/lando-util
c3fc2e4e59da4200f171d86a3a20ae8428b85459
[ "MIT" ]
2
2019-02-22T16:51:08.000Z
2019-06-03T13:11:14.000Z
from lando_util.organize_project.organizer import organize_project if __name__ == '__main__': organize_project()
23.6
66
0.805085
14
118
5.928571
0.714286
0.542169
0
0
0
0
0
0
0
0
0
0
0.118644
118
4
67
29.5
0.798077
0
0
0
0
0
0.067797
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
9f7ee9fec8db20aa35e3988b8c8f8e3a292a7f37
76
py
Python
clarifai_grpc/channel/errors.py
amkudr/pro_bot
52f7ae9562da7d50b8b5f0e423799a1215ccd410
[ "Apache-2.0" ]
44
2020-01-30T16:14:06.000Z
2022-03-21T16:00:48.000Z
clarifai_grpc/channel/errors.py
amkudr/pro_bot
52f7ae9562da7d50b8b5f0e423799a1215ccd410
[ "Apache-2.0" ]
13
2020-04-21T05:42:26.000Z
2022-03-23T14:50:51.000Z
clarifai_grpc/channel/errors.py
amkudr/pro_bot
52f7ae9562da7d50b8b5f0e423799a1215ccd410
[ "Apache-2.0" ]
11
2020-01-30T16:14:10.000Z
2022-02-16T12:07:12.000Z
class ApiError(Exception): pass class UsageError(Exception): pass
10.857143
28
0.710526
8
76
6.75
0.625
0.481481
0
0
0
0
0
0
0
0
0
0
0.210526
76
6
29
12.666667
0.9
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
9f829f3c940f9cfe7641b727a66eba8ba7a941d6
39
py
Python
test/__init__.py
lrcfmd/ripser.py
de49167b6da035a7920d1cc6b1f4527b143091f1
[ "MIT" ]
172
2018-08-22T19:52:14.000Z
2022-03-07T18:01:40.000Z
test/__init__.py
ghilesmeddour/ripser.py
190f1ffe0abfb89cacf9f0b03e8507dddad73ff9
[ "MIT" ]
90
2018-08-01T04:42:39.000Z
2022-03-28T08:31:20.000Z
test/__init__.py
ghilesmeddour/ripser.py
190f1ffe0abfb89cacf9f0b03e8507dddad73ff9
[ "MIT" ]
50
2018-08-18T20:48:54.000Z
2022-03-20T23:46:45.000Z
import matplotlib matplotlib.use('agg')
19.5
21
0.820513
5
39
6.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.051282
39
2
21
19.5
0.864865
0
0
0
0
0
0.075
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
9f83f8106f27be8a517b437881ee75ca4bd040e1
1,021
py
Python
sdks/python/test/test_BasicReleaseDetailsResponse.py
Brantone/appcenter-sdks
eeb063ecf79908b6e341fb00196d2cd9dc8f3262
[ "MIT" ]
null
null
null
sdks/python/test/test_BasicReleaseDetailsResponse.py
Brantone/appcenter-sdks
eeb063ecf79908b6e341fb00196d2cd9dc8f3262
[ "MIT" ]
6
2019-10-23T06:38:53.000Z
2022-01-22T07:57:58.000Z
sdks/python/test/test_BasicReleaseDetailsResponse.py
Brantone/appcenter-sdks
eeb063ecf79908b6e341fb00196d2cd9dc8f3262
[ "MIT" ]
2
2019-10-23T06:31:05.000Z
2021-08-21T17:32:47.000Z
# coding: utf-8 """ App Center Client Microsoft Visual Studio App Center API # noqa: E501 OpenAPI spec version: preview Contact: benedetto.abbenanti@gmail.com Project Repository: https://github.com/b3nab/appcenter-sdks """ from __future__ import absolute_import import unittest import appcenter_sdk from BasicReleaseDetailsResponse.clsBasicReleaseDetailsResponse import BasicReleaseDetailsResponse # noqa: E501 from appcenter_sdk.rest import ApiException class TestBasicReleaseDetailsResponse(unittest.TestCase): """BasicReleaseDetailsResponse unit test stubs""" def setUp(self): pass def tearDown(self): pass def testBasicReleaseDetailsResponse(self): """Test BasicReleaseDetailsResponse""" # FIXME: construct object with mandatory attributes with example values # model = appcenter_sdk.models.clsBasicReleaseDetailsResponse.BasicReleaseDetailsResponse() # noqa: E501 pass if __name__ == '__main__': unittest.main()
25.525
113
0.745348
98
1,021
7.602041
0.632653
0.032215
0.09396
0
0
0
0
0
0
0
0
0.013205
0.184133
1,021
39
114
26.179487
0.881152
0.467189
0
0.214286
0
0
0.015936
0
0
0
0
0.025641
0
1
0.214286
false
0.214286
0.357143
0
0.642857
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
1
1
0
1
0
0
5
9fcd9e1e8dd588d8210cefa983e1bd1935da259c
11,993
py
Python
hw4/Question3/gen/MJLexer.py
mohammadhosseinkarimian/IUSTCompiler
af7a88eeda2df7ad880df0e0458b9e91a0da48fe
[ "MIT" ]
null
null
null
hw4/Question3/gen/MJLexer.py
mohammadhosseinkarimian/IUSTCompiler
af7a88eeda2df7ad880df0e0458b9e91a0da48fe
[ "MIT" ]
null
null
null
hw4/Question3/gen/MJLexer.py
mohammadhosseinkarimian/IUSTCompiler
af7a88eeda2df7ad880df0e0458b9e91a0da48fe
[ "MIT" ]
null
null
null
# Generated from E:/New folder/hw4/final/Question3\MJLexer.g4 by ANTLR 4.9.1 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2*") buf.write("\u012b\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7") buf.write("\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r") buf.write("\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23") buf.write("\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30") buf.write("\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36") buf.write("\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%") buf.write("\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\3\2\3\2\3\2\3\2") buf.write("\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3") buf.write("\4\3\4\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7") buf.write("\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3") buf.write("\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\n\3\n\3\13\3") buf.write("\13\3\f\3\f\3\r\3\r\3\16\3\16\3\16\3\17\3\17\3\17\3\17") buf.write("\3\17\3\17\3\17\3\20\3\20\3\21\3\21\3\21\3\21\3\22\3\22") buf.write("\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\24\3\24") buf.write("\3\25\3\25\3\26\3\26\3\27\3\27\3\30\3\30\3\31\3\31\3\32") buf.write("\3\32\3\33\3\33\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\36") buf.write("\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37\3\37\3\37") buf.write("\3\37\3 \3 \3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3\"\3\"\3\"") buf.write("\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3$\3$\3$") buf.write("\3%\3%\3&\3&\5&\u00f9\n&\3\'\3\'\7\'\u00fd\n\'\f\'\16") buf.write("\'\u0100\13\'\3(\3(\3(\7(\u0105\n(\f(\16(\u0108\13(\5") buf.write("(\u010a\n(\3)\6)\u010d\n)\r)\16)\u010e\3)\3)\3*\3*\3*") buf.write("\3*\7*\u0117\n*\f*\16*\u011a\13*\3*\3*\3*\3*\3*\3+\3+") buf.write("\3+\3+\7+\u0125\n+\f+\16+\u0128\13+\3+\3+\3\u0118\2,\3") buf.write("\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16") buf.write("\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61") buf.write("\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I\2K\2M&O\'") buf.write("Q(S)U*\3\2\7\3\2\62;\5\2C\\aac|\3\2\63;\5\2\13\f\16\17") buf.write("\"\"\4\2\f\f\17\17\2\u012f\2\3\3\2\2\2\2\5\3\2\2\2\2\7") buf.write("\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2") buf.write("\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2") buf.write("\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2") buf.write("\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2") buf.write("\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63") buf.write("\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2") buf.write("\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2") buf.write("\2\2\2G\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3") buf.write("\2\2\2\2U\3\2\2\2\3W\3\2\2\2\5^\3\2\2\2\7b\3\2\2\2\tj") buf.write("\3\2\2\2\13m\3\2\2\2\rr\3\2\2\2\17x\3\2\2\2\21\u008b\3") buf.write("\2\2\2\23\u008d\3\2\2\2\25\u008f\3\2\2\2\27\u0091\3\2") buf.write("\2\2\31\u0093\3\2\2\2\33\u0095\3\2\2\2\35\u0098\3\2\2") buf.write("\2\37\u009f\3\2\2\2!\u00a1\3\2\2\2#\u00a5\3\2\2\2%\u00aa") buf.write("\3\2\2\2\'\u00b0\3\2\2\2)\u00b2\3\2\2\2+\u00b4\3\2\2\2") buf.write("-\u00b6\3\2\2\2/\u00b8\3\2\2\2\61\u00ba\3\2\2\2\63\u00bc") buf.write("\3\2\2\2\65\u00be\3\2\2\2\67\u00c0\3\2\2\29\u00c2\3\2") buf.write("\2\2;\u00c7\3\2\2\2=\u00cd\3\2\2\2?\u00d4\3\2\2\2A\u00db") buf.write("\3\2\2\2C\u00e0\3\2\2\2E\u00e5\3\2\2\2G\u00ec\3\2\2\2") buf.write("I\u00f4\3\2\2\2K\u00f8\3\2\2\2M\u00fa\3\2\2\2O\u0109\3") buf.write("\2\2\2Q\u010c\3\2\2\2S\u0112\3\2\2\2U\u0120\3\2\2\2WX") buf.write("\7t\2\2XY\7g\2\2YZ\7v\2\2Z[\7w\2\2[\\\7t\2\2\\]\7p\2\2") buf.write("]\4\3\2\2\2^_\7k\2\2_`\7p\2\2`a\7v\2\2a\6\3\2\2\2bc\7") buf.write("d\2\2cd\7q\2\2de\7q\2\2ef\7n\2\2fg\7g\2\2gh\7c\2\2hi\7") buf.write("p\2\2i\b\3\2\2\2jk\7k\2\2kl\7h\2\2l\n\3\2\2\2mn\7g\2\2") buf.write("no\7n\2\2op\7u\2\2pq\7g\2\2q\f\3\2\2\2rs\7y\2\2st\7j\2") buf.write("\2tu\7k\2\2uv\7n\2\2vw\7g\2\2w\16\3\2\2\2xy\7U\2\2yz\7") buf.write("{\2\2z{\7u\2\2{|\7v\2\2|}\7g\2\2}~\7o\2\2~\177\7\60\2") buf.write("\2\177\u0080\7q\2\2\u0080\u0081\7w\2\2\u0081\u0082\7v") buf.write("\2\2\u0082\u0083\7\60\2\2\u0083\u0084\7r\2\2\u0084\u0085") buf.write("\7t\2\2\u0085\u0086\7k\2\2\u0086\u0087\7p\2\2\u0087\u0088") buf.write("\7v\2\2\u0088\u0089\7n\2\2\u0089\u008a\7p\2\2\u008a\20") buf.write("\3\2\2\2\u008b\u008c\7?\2\2\u008c\22\3\2\2\2\u008d\u008e") buf.write("\7-\2\2\u008e\24\3\2\2\2\u008f\u0090\7/\2\2\u0090\26\3") buf.write("\2\2\2\u0091\u0092\7,\2\2\u0092\30\3\2\2\2\u0093\u0094") buf.write("\7>\2\2\u0094\32\3\2\2\2\u0095\u0096\7(\2\2\u0096\u0097") buf.write("\7(\2\2\u0097\34\3\2\2\2\u0098\u0099\7n\2\2\u0099\u009a") buf.write("\7g\2\2\u009a\u009b\7p\2\2\u009b\u009c\7i\2\2\u009c\u009d") buf.write("\7v\2\2\u009d\u009e\7j\2\2\u009e\36\3\2\2\2\u009f\u00a0") buf.write("\7#\2\2\u00a0 \3\2\2\2\u00a1\u00a2\7p\2\2\u00a2\u00a3") buf.write("\7g\2\2\u00a3\u00a4\7y\2\2\u00a4\"\3\2\2\2\u00a5\u00a6") buf.write("\7v\2\2\u00a6\u00a7\7j\2\2\u00a7\u00a8\7k\2\2\u00a8\u00a9") buf.write("\7u\2\2\u00a9$\3\2\2\2\u00aa\u00ab\7e\2\2\u00ab\u00ac") buf.write("\7n\2\2\u00ac\u00ad\7c\2\2\u00ad\u00ae\7u\2\2\u00ae\u00af") buf.write("\7u\2\2\u00af&\3\2\2\2\u00b0\u00b1\7*\2\2\u00b1(\3\2\2") buf.write("\2\u00b2\u00b3\7+\2\2\u00b3*\3\2\2\2\u00b4\u00b5\7}\2") buf.write("\2\u00b5,\3\2\2\2\u00b6\u00b7\7\177\2\2\u00b7.\3\2\2\2") buf.write("\u00b8\u00b9\7]\2\2\u00b9\60\3\2\2\2\u00ba\u00bb\7_\2") buf.write("\2\u00bb\62\3\2\2\2\u00bc\u00bd\7=\2\2\u00bd\64\3\2\2") buf.write("\2\u00be\u00bf\7.\2\2\u00bf\66\3\2\2\2\u00c0\u00c1\7\60") buf.write("\2\2\u00c18\3\2\2\2\u00c2\u00c3\7v\2\2\u00c3\u00c4\7t") buf.write("\2\2\u00c4\u00c5\7w\2\2\u00c5\u00c6\7g\2\2\u00c6:\3\2") buf.write("\2\2\u00c7\u00c8\7h\2\2\u00c8\u00c9\7c\2\2\u00c9\u00ca") buf.write("\7n\2\2\u00ca\u00cb\7u\2\2\u00cb\u00cc\7g\2\2\u00cc<\3") buf.write("\2\2\2\u00cd\u00ce\7r\2\2\u00ce\u00cf\7w\2\2\u00cf\u00d0") buf.write("\7d\2\2\u00d0\u00d1\7n\2\2\u00d1\u00d2\7k\2\2\u00d2\u00d3") buf.write("\7e\2\2\u00d3>\3\2\2\2\u00d4\u00d5\7u\2\2\u00d5\u00d6") buf.write("\7v\2\2\u00d6\u00d7\7c\2\2\u00d7\u00d8\7v\2\2\u00d8\u00d9") buf.write("\7k\2\2\u00d9\u00da\7e\2\2\u00da@\3\2\2\2\u00db\u00dc") buf.write("\7x\2\2\u00dc\u00dd\7q\2\2\u00dd\u00de\7k\2\2\u00de\u00df") buf.write("\7f\2\2\u00dfB\3\2\2\2\u00e0\u00e1\7o\2\2\u00e1\u00e2") buf.write("\7c\2\2\u00e2\u00e3\7k\2\2\u00e3\u00e4\7p\2\2\u00e4D\3") buf.write("\2\2\2\u00e5\u00e6\7U\2\2\u00e6\u00e7\7v\2\2\u00e7\u00e8") buf.write("\7t\2\2\u00e8\u00e9\7k\2\2\u00e9\u00ea\7p\2\2\u00ea\u00eb") buf.write("\7i\2\2\u00ebF\3\2\2\2\u00ec\u00ed\7g\2\2\u00ed\u00ee") buf.write("\7z\2\2\u00ee\u00ef\7v\2\2\u00ef\u00f0\7g\2\2\u00f0\u00f1") buf.write("\7p\2\2\u00f1\u00f2\7f\2\2\u00f2\u00f3\7u\2\2\u00f3H\3") buf.write("\2\2\2\u00f4\u00f5\t\2\2\2\u00f5J\3\2\2\2\u00f6\u00f9") buf.write("\t\3\2\2\u00f7\u00f9\5I%\2\u00f8\u00f6\3\2\2\2\u00f8\u00f7") buf.write("\3\2\2\2\u00f9L\3\2\2\2\u00fa\u00fe\t\3\2\2\u00fb\u00fd") buf.write("\5K&\2\u00fc\u00fb\3\2\2\2\u00fd\u0100\3\2\2\2\u00fe\u00fc") buf.write("\3\2\2\2\u00fe\u00ff\3\2\2\2\u00ffN\3\2\2\2\u0100\u00fe") buf.write("\3\2\2\2\u0101\u010a\7\62\2\2\u0102\u0106\t\4\2\2\u0103") buf.write("\u0105\5I%\2\u0104\u0103\3\2\2\2\u0105\u0108\3\2\2\2\u0106") buf.write("\u0104\3\2\2\2\u0106\u0107\3\2\2\2\u0107\u010a\3\2\2\2") buf.write("\u0108\u0106\3\2\2\2\u0109\u0101\3\2\2\2\u0109\u0102\3") buf.write("\2\2\2\u010aP\3\2\2\2\u010b\u010d\t\5\2\2\u010c\u010b") buf.write("\3\2\2\2\u010d\u010e\3\2\2\2\u010e\u010c\3\2\2\2\u010e") buf.write("\u010f\3\2\2\2\u010f\u0110\3\2\2\2\u0110\u0111\b)\2\2") buf.write("\u0111R\3\2\2\2\u0112\u0113\7\61\2\2\u0113\u0114\7,\2") buf.write("\2\u0114\u0118\3\2\2\2\u0115\u0117\13\2\2\2\u0116\u0115") buf.write("\3\2\2\2\u0117\u011a\3\2\2\2\u0118\u0119\3\2\2\2\u0118") buf.write("\u0116\3\2\2\2\u0119\u011b\3\2\2\2\u011a\u0118\3\2\2\2") buf.write("\u011b\u011c\7,\2\2\u011c\u011d\7\61\2\2\u011d\u011e\3") buf.write("\2\2\2\u011e\u011f\b*\2\2\u011fT\3\2\2\2\u0120\u0121\7") buf.write("\61\2\2\u0121\u0122\7\61\2\2\u0122\u0126\3\2\2\2\u0123") buf.write("\u0125\n\6\2\2\u0124\u0123\3\2\2\2\u0125\u0128\3\2\2\2") buf.write("\u0126\u0124\3\2\2\2\u0126\u0127\3\2\2\2\u0127\u0129\3") buf.write("\2\2\2\u0128\u0126\3\2\2\2\u0129\u012a\b+\2\2\u012aV\3") buf.write("\2\2\2\n\2\u00f8\u00fe\u0106\u0109\u010e\u0118\u0126\3") buf.write("\2\3\2") return buf.getvalue() class MJLexer(Lexer): atn = ATNDeserializer().deserialize(serializedATN()) decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] RETURN = 1 INT = 2 BOOLEAN = 3 IF = 4 ELSE = 5 WHILE = 6 SOUT = 7 ASSIGN = 8 ADD = 9 SUB = 10 MUL = 11 LT = 12 ANDAND = 13 LEN = 14 NOT = 15 NEW = 16 THIS = 17 CLASS = 18 LPAREN = 19 RPAREN = 20 LBRACE = 21 RBRACE = 22 LBRACK = 23 RBRACK = 24 SEMI = 25 COMMA = 26 DOT = 27 TRUE = 28 FALSE = 29 PUBLIC = 30 STATIC = 31 VOID = 32 MAIN = 33 STRING = 34 EXTENDS = 35 IDENTIFIER = 36 INTEGER_LITERAL = 37 WS = 38 COMMENT = 39 LINE_COMMENT = 40 channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] modeNames = [ "DEFAULT_MODE" ] literalNames = [ "<INVALID>", "'return'", "'int'", "'boolean'", "'if'", "'else'", "'while'", "'System.out.println'", "'='", "'+'", "'-'", "'*'", "'<'", "'&&'", "'length'", "'!'", "'new'", "'this'", "'class'", "'('", "')'", "'{'", "'}'", "'['", "']'", "';'", "','", "'.'", "'true'", "'false'", "'public'", "'static'", "'void'", "'main'", "'String'", "'extends'" ] symbolicNames = [ "<INVALID>", "RETURN", "INT", "BOOLEAN", "IF", "ELSE", "WHILE", "SOUT", "ASSIGN", "ADD", "SUB", "MUL", "LT", "ANDAND", "LEN", "NOT", "NEW", "THIS", "CLASS", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA", "DOT", "TRUE", "FALSE", "PUBLIC", "STATIC", "VOID", "MAIN", "STRING", "EXTENDS", "IDENTIFIER", "INTEGER_LITERAL", "WS", "COMMENT", "LINE_COMMENT" ] ruleNames = [ "RETURN", "INT", "BOOLEAN", "IF", "ELSE", "WHILE", "SOUT", "ASSIGN", "ADD", "SUB", "MUL", "LT", "ANDAND", "LEN", "NOT", "NEW", "THIS", "CLASS", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA", "DOT", "TRUE", "FALSE", "PUBLIC", "STATIC", "VOID", "MAIN", "STRING", "EXTENDS", "Digit", "LetterOrDigit", "IDENTIFIER", "INTEGER_LITERAL", "WS", "COMMENT", "LINE_COMMENT" ] grammarFileName = "MJLexer.g4" def __init__(self, input=None, output:TextIO = sys.stdout): super().__init__(input, output) self.checkVersion("4.9.1") self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) self._actions = None self._predicates = None
55.013761
103
0.541983
2,677
11,993
2.419499
0.161001
0.133395
0.073182
0.074726
0.297206
0.20843
0.146982
0.108692
0.097576
0.089856
0
0.309851
0.162011
11,993
217
104
55.267281
0.334627
0.00617
0
0.01005
1
0.336683
0.596307
0.529081
0.005025
0
0
0
0
1
0.01005
false
0
0.020101
0
0.281407
0.005025
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
4c879e6c83b4141ee3edf11711950939ceacf644
41
py
Python
erp/imports/mapper/__init__.py
bzg/acceslibre
52c7c6990dc132da71a92e856d65f4a983c3b15a
[ "MIT" ]
8
2020-07-23T08:17:28.000Z
2022-03-09T22:31:36.000Z
erp/imports/mapper/__init__.py
bzg/acceslibre
52c7c6990dc132da71a92e856d65f4a983c3b15a
[ "MIT" ]
37
2020-07-01T08:47:33.000Z
2022-02-03T19:50:58.000Z
erp/imports/mapper/__init__.py
bzg/acceslibre
52c7c6990dc132da71a92e856d65f4a983c3b15a
[ "MIT" ]
4
2021-04-08T10:57:18.000Z
2022-01-31T13:16:31.000Z
class SkippedRecord(Exception): pass
13.666667
31
0.756098
4
41
7.75
1
0
0
0
0
0
0
0
0
0
0
0
0.170732
41
2
32
20.5
0.911765
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
4c9dc012890615314683cc31533773e20c57cc6a
113
py
Python
zxc/neoclassicaapp/admin.py
shadowsmain/zxc123
d37cf145b266a00d016f51292c5c8a7c7a61ea87
[ "MIT" ]
2
2020-10-18T16:59:22.000Z
2020-10-18T21:03:22.000Z
zxc/neoclassicaapp/admin.py
shadowsmain/zxc123
d37cf145b266a00d016f51292c5c8a7c7a61ea87
[ "MIT" ]
null
null
null
zxc/neoclassicaapp/admin.py
shadowsmain/zxc123
d37cf145b266a00d016f51292c5c8a7c7a61ea87
[ "MIT" ]
null
null
null
from django.contrib import admin from neoclassicaapp.models import Neoclassica admin.site.register(Neoclassica)
22.6
45
0.858407
14
113
6.928571
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.088496
113
5
46
22.6
0.941748
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
4c9ecb69b9e6beccf44080e199fa7c6b6ef9126c
177
py
Python
player.py
andrelrg/x-game
19230c177bf520950b6544359f28462aa581bb17
[ "MIT" ]
null
null
null
player.py
andrelrg/x-game
19230c177bf520950b6544359f28462aa581bb17
[ "MIT" ]
null
null
null
player.py
andrelrg/x-game
19230c177bf520950b6544359f28462aa581bb17
[ "MIT" ]
null
null
null
from pointer import up, down, left, right class Player(): def __init__(self, pointer): self.pointer = pointer def Walk(self): self.pointer.WaitToWalk()
22.125
41
0.649718
22
177
5.045455
0.636364
0.297297
0
0
0
0
0
0
0
0
0
0
0.242938
177
8
42
22.125
0.828358
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
4ccb7ee73e13d0a237085e70206526ae8ea43ac6
40
py
Python
readers/__init__.py
lmartak/amt-wavenet
9717eb35f317994372cfd1c76b1546d21272fb67
[ "MIT" ]
9
2018-10-07T01:36:35.000Z
2021-12-29T23:44:24.000Z
readers/__init__.py
lmartak/amt-wavenet
9717eb35f317994372cfd1c76b1546d21272fb67
[ "MIT" ]
null
null
null
readers/__init__.py
lmartak/amt-wavenet
9717eb35f317994372cfd1c76b1546d21272fb67
[ "MIT" ]
3
2018-11-15T13:32:08.000Z
2020-02-15T22:58:19.000Z
from .wavmid_reader import WavMidReader
20
39
0.875
5
40
6.8
1
0
0
0
0
0
0
0
0
0
0
0
0.1
40
1
40
40
0.944444
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
e2a6c757b20d2fe0c6b78f69950cd68717533303
4,393
py
Python
tests/keras_contrib/losses/dssim_test.py
floSa/keras-contrib
ffa82a241efcb731e51a6aea62d7712542d9d343
[ "MIT" ]
1,335
2017-12-21T12:04:22.000Z
2022-03-24T13:35:10.000Z
tests/keras_contrib/losses/dssim_test.py
xuhangxuhang/keras-contrib
3fc5ef709e061416f4bc8a92ca3750c824b5d2b0
[ "MIT" ]
283
2017-12-20T22:16:25.000Z
2022-03-10T14:33:55.000Z
tests/keras_contrib/losses/dssim_test.py
xuhangxuhang/keras-contrib
3fc5ef709e061416f4bc8a92ca3750c824b5d2b0
[ "MIT" ]
654
2017-12-22T02:33:52.000Z
2022-03-17T03:07:20.000Z
import pytest import numpy as np from keras_contrib.utils.test_utils import is_tf_keras from numpy.testing import assert_allclose from keras.layers import Conv2D from keras.models import Sequential from keras.optimizers import Adam from keras.losses import sparse_categorical_crossentropy from keras import backend as K from keras_contrib.losses import DSSIMObjective allobj = [] def test_objective_shapes_3d(): y_a = K.variable(np.random.random((5, 6, 7))) y_b = K.variable(np.random.random((5, 6, 7))) for obj in allobj: objective_output = obj(y_a, y_b) assert K.eval(objective_output).shape == (5, 6) def test_objective_shapes_2d(): y_a = K.variable(np.random.random((6, 7))) y_b = K.variable(np.random.random((6, 7))) for obj in allobj: objective_output = obj(y_a, y_b) assert K.eval(objective_output).shape == (6,) def test_cce_one_hot(): y_a = K.variable(np.random.randint(0, 7, (5, 6))) y_b = K.variable(np.random.random((5, 6, 7))) objective_output = sparse_categorical_crossentropy(y_a, y_b) assert K.eval(objective_output).shape == (5, 6) y_a = K.variable(np.random.randint(0, 7, (6,))) y_b = K.variable(np.random.random((6, 7))) assert K.eval(sparse_categorical_crossentropy(y_a, y_b)).shape == (6,) def test_DSSIM_channels_last(): prev_data = K.image_data_format() K.set_image_data_format('channels_last') for input_dim, kernel_size in zip([32, 33], [2, 3]): input_shape = [input_dim, input_dim, 3] X = np.random.random_sample(4 * input_dim * input_dim * 3) X = X.reshape([4] + input_shape) y = np.random.random_sample(4 * input_dim * input_dim * 3) y = y.reshape([4] + input_shape) model = Sequential() model.add(Conv2D(32, (3, 3), padding='same', input_shape=input_shape, activation='relu')) model.add(Conv2D(3, (3, 3), padding='same', input_shape=input_shape, activation='relu')) adam = Adam(lr=0.001, beta_1=0.9, beta_2=0.999, epsilon=1e-8) model.compile(loss=DSSIMObjective(kernel_size=kernel_size), metrics=['mse'], optimizer=adam) model.fit(X, y, batch_size=2, epochs=1, shuffle='batch') # Test same x1 = K.constant(X, 'float32') x2 = K.constant(X, 'float32') dssim = DSSIMObjective(kernel_size=kernel_size) assert_allclose(0.0, K.eval(dssim(x1, x2)), atol=1e-4) # Test opposite x1 = K.zeros([4] + input_shape) x2 = K.ones([4] + input_shape) dssim = DSSIMObjective(kernel_size=kernel_size) assert_allclose(0.5, K.eval(dssim(x1, x2)), atol=1e-4) K.set_image_data_format(prev_data) @pytest.mark.xfail(is_tf_keras, reason='TODO fix this.', strict=True) def test_DSSIM_channels_first(): prev_data = K.image_data_format() K.set_image_data_format('channels_first') for input_dim, kernel_size in zip([32, 33], [2, 3]): input_shape = [3, input_dim, input_dim] X = np.random.random_sample(4 * input_dim * input_dim * 3) X = X.reshape([4] + input_shape) y = np.random.random_sample(4 * input_dim * input_dim * 3) y = y.reshape([4] + input_shape) model = Sequential() model.add(Conv2D(32, (3, 3), padding='same', input_shape=input_shape, activation='relu')) model.add(Conv2D(3, (3, 3), padding='same', input_shape=input_shape, activation='relu')) adam = Adam(lr=0.001, beta_1=0.9, beta_2=0.999, epsilon=1e-8) model.compile(loss=DSSIMObjective(kernel_size=kernel_size), metrics=['mse'], optimizer=adam) model.fit(X, y, batch_size=2, epochs=1, shuffle='batch') # Test same x1 = K.constant(X, 'float32') x2 = K.constant(X, 'float32') dssim = DSSIMObjective(kernel_size=kernel_size) assert_allclose(0.0, K.eval(dssim(x1, x2)), atol=1e-4) # Test opposite x1 = K.zeros([4] + input_shape) x2 = K.ones([4] + input_shape) dssim = DSSIMObjective(kernel_size=kernel_size) assert_allclose(0.5, K.eval(dssim(x1, x2)), atol=1e-4) K.set_image_data_format(prev_data) if __name__ == '__main__': pytest.main([__file__])
36.915966
84
0.62372
650
4,393
3.992308
0.183077
0.069364
0.05395
0.052408
0.781888
0.781888
0.775337
0.74104
0.731021
0.687861
0
0.045156
0.238789
4,393
118
85
37.228814
0.730861
0.010699
0
0.615385
0
0
0.028795
0
0
0
0
0
0.098901
1
0.054945
false
0
0.10989
0
0.164835
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
e2b53b549f22e01e332946b13fabafca84a96544
1,469
py
Python
tests/test_pinger.py
clarke/pinger
32ef3fa4cbd95f70b30b93e7538391eb38a710bb
[ "MIT" ]
null
null
null
tests/test_pinger.py
clarke/pinger
32ef3fa4cbd95f70b30b93e7538391eb38a710bb
[ "MIT" ]
2
2020-06-11T03:29:47.000Z
2020-06-19T19:25:33.000Z
tests/test_pinger.py
clarke/pinger
32ef3fa4cbd95f70b30b93e7538391eb38a710bb
[ "MIT" ]
null
null
null
from pinger import pinger import responses from requests.exceptions import ConnectTimeout def test_check_site_not_found(): url = 'https://fake.url/' site = { 'url': url, 'timeout': 1, } with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: rsps.add(responses.GET, url, status=404) res = pinger.check_site(site) assert res is False def test_check_site_success(): url = 'https://fake.url/' site = { 'url': url, 'timeout': 1, } with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: rsps.add(responses.GET, url, status=200) res = pinger.check_site(site) assert res is True def test_check_site_exception(): url = 'https://exception.fake.url/' site = { 'url': url, 'timeout': 1, } with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: rsps.add(responses.GET, url, body=Exception('Failed test')) res = pinger.check_site(site) assert res is False def test_check_site_connect_exception(): url = 'https://connect-exception.fake.url/' site = { 'url': url, 'timeout': 1, } with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: rsps.add(responses.GET, url, body=ConnectTimeout('Failed to connect')) res = pinger.check_site(site) assert res is False
25.77193
78
0.633764
185
1,469
4.848649
0.221622
0.080268
0.053512
0.071349
0.74136
0.74136
0.74136
0.74136
0.704571
0.662207
0
0.009132
0.254595
1,469
56
79
26.232143
0.810046
0
0
0.581395
0
0
0.111641
0
0
0
0
0
0.186047
1
0.093023
false
0
0.069767
0
0.162791
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
2c4316abc4e5b73cec4d67b0a2ffc9a166347c58
55
py
Python
app/routers/operation/__init__.py
cdlaimin/pity
c718d4ec17bb5672fd6e671e6cee7e62d41a2743
[ "Apache-2.0" ]
135
2021-07-01T02:43:12.000Z
2022-03-28T06:14:53.000Z
app/routers/operation/__init__.py
cdlaimin/pity
c718d4ec17bb5672fd6e671e6cee7e62d41a2743
[ "Apache-2.0" ]
46
2021-08-11T03:53:10.000Z
2022-03-29T02:56:46.000Z
app/routers/operation/__init__.py
cdlaimin/pity
c718d4ec17bb5672fd6e671e6cee7e62d41a2743
[ "Apache-2.0" ]
38
2021-07-13T01:18:18.000Z
2022-03-20T11:11:28.000Z
from app.routers.operation.operation_log import router
27.5
54
0.872727
8
55
5.875
0.875
0
0
0
0
0
0
0
0
0
0
0
0.072727
55
1
55
55
0.921569
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
2c5b3423b9f6c216b39ccfd95c7926d924403ff2
88
py
Python
harmonica/synthetic/__init__.py
rowanc1/harmonica
ebfa7267ad744b33bdc4fe3f634749b311fdff0a
[ "BSD-3-Clause" ]
null
null
null
harmonica/synthetic/__init__.py
rowanc1/harmonica
ebfa7267ad744b33bdc4fe3f634749b311fdff0a
[ "BSD-3-Clause" ]
1
2022-01-19T03:02:22.000Z
2022-01-19T20:47:19.000Z
harmonica/synthetic/__init__.py
rowanc1/harmonica
ebfa7267ad744b33bdc4fe3f634749b311fdff0a
[ "BSD-3-Clause" ]
1
2022-01-17T23:15:18.000Z
2022-01-17T23:15:18.000Z
# pylint: disable=missing-docstring from .surveys import ground_survey, airborne_survey
29.333333
51
0.840909
11
88
6.545455
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.090909
88
2
52
44
0.9
0.375
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
2c67ba7b4378a9b426b0409541caba19311098a5
338
py
Python
event_store/exceptions.py
Magni77/django-event-store
cc52d4748fced42df0cc49f8a4f72368595809df
[ "MIT" ]
4
2021-11-24T20:51:11.000Z
2021-11-25T15:37:38.000Z
event_store/exceptions.py
mgodkowicz/django-event-store
cc52d4748fced42df0cc49f8a4f72368595809df
[ "MIT" ]
1
2021-11-25T08:15:37.000Z
2021-11-25T08:15:37.000Z
event_store/exceptions.py
mgodkowicz/django-event-store
cc52d4748fced42df0cc49f8a4f72368595809df
[ "MIT" ]
null
null
null
class IncorrectStreamData(Exception): pass class EventNotFound(Exception): pass class InvalidPageSize(Exception): pass class InvalidPageStart(Exception): pass class InvalidPageStop(Exception): pass class EventDuplicatedInStream(BaseException): pass class WrongExpectedEventVersion(Exception): pass
12.518519
45
0.757396
28
338
9.142857
0.392857
0.304688
0.351563
0
0
0
0
0
0
0
0
0
0.180473
338
26
46
13
0.924188
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
2c85a7fae81e16f6773bbb24147fe0e8a46c4912
5,501
py
Python
oldman/exception.py
oldm/OldMan
5661e5a4d412c2e9e7cf59ef00f60ce5aef2ab6b
[ "BSD-3-Clause" ]
6
2015-02-13T01:05:05.000Z
2021-01-16T00:07:08.000Z
oldman/exception.py
oldm/OldMan
5661e5a4d412c2e9e7cf59ef00f60ce5aef2ab6b
[ "BSD-3-Clause" ]
7
2015-02-14T18:00:35.000Z
2016-01-03T17:06:41.000Z
oldman/exception.py
oldm/OldMan
5661e5a4d412c2e9e7cf59ef00f60ce5aef2ab6b
[ "BSD-3-Clause" ]
3
2015-12-07T16:01:45.000Z
2017-11-08T12:13:35.000Z
#------------------- # Abstract types #------------------- class OMError(Exception): """Root of exceptions generated by the oldman package expected HTTP ones.""" pass class ModelGenerationError(OMError): """Error when generating a new model.""" pass class OMRuntimeError(OMError): """Error at runtime after the initialization. """ #---------------------- # Main exception types #---------------------- class OMSchemaError(ModelGenerationError): """Error in the schema graph and/or the JSON-LD context.""" pass class OMUserError(OMRuntimeError): """Error when accessing or editing objects.""" pass class OMDataStoreError(OMRuntimeError): """Error detected in the stored data.""" pass class OMInternalError(OMError): """ Do not expect it. """ pass #------------------------------ # Controller (HTTP) exceptions #------------------------------ class OMControllerException(Exception): """TODO: describe """ pass class OMBadRequestException(OMControllerException): """TODO: describe Error: 400 """ class OMForbiddenOperationException(OMControllerException): """ No chance TODO: improve """ pass class OMRequiredAuthenticationException(OMControllerException): """ Try again TODO: improve """ pass class OMResourceNotFoundException(OMControllerException): """ TODO: describe """ pass class OMMethodNotAllowedException(OMControllerException): """ 405 """ pass class OMNotAcceptableException(OMControllerException): """ 406 Not Acceptable TODO: indicate the content-type """ pass #--------------------------------------------------------------------- # Pedantic exceptions # For clarity # No need to except them in a programmatic manner, prefer generic exceptions #--------------------------------------------------------------------- class AlreadyAllocatedModelError(ModelGenerationError): """The class IRI or the short name of a new model is already allocated.""" pass class OMPropertyDefError(OMSchemaError): """Inconsistency in the definition of a supported property.""" pass class OMPropertyDefTypeError(OMPropertyDefError): """A RDF property cannot be both an ObjectProperty and a DatatypeProperty.""" pass class OMAttributeDefError(OMSchemaError): """Inconsistency in the definition of a model class attribute.""" pass class OMAlreadyDeclaredDatatypeError(OMAttributeDefError): """At least two different datatypes for the same attribute. You may check the possible datatype inherited from the property (rdfs:range) and the one specified in the JSON-LD context. """ pass class OMReservedAttributeNameError(OMAttributeDefError): """Some attribute names are reserved and should not be included in the JSON-LD context.""" pass class OMUndeclaredClassNameError(ModelGenerationError): """The name of the model class should be defined in the JSON-LD context.""" pass class OMExpiredMethodDeclarationTimeSlotError(ModelGenerationError): """All methods must be declared before creating a first model.""" pass class OMEditError(OMUserError): """Runtime errors, occuring when editing or creating an object.""" pass class OMAttributeTypeCheckError(OMEditError): """The value assigned to the attribute has wrong type.""" pass class OMRequiredPropertyError(OMEditError): """A required property has no value.""" pass class OMReadOnlyAttributeError(OMEditError): """End-users are not allowed to edit this attribute.""" pass class OMUniquenessError(OMEditError): """Attribute uniqueness violation. Example: IRI illegal reusing. """ pass class OMWrongResourceError(OMEditError): """Not updating the right object.""" pass class OMDifferentHashlessIRIError(OMEditError): """When creating or updating an object with a different hashless IRI is forbidden. Blank nodes are not concerned. """ pass class OMForbiddenSkolemizedIRIError(OMEditError): """When updating a skolemized IRI from the local domain is forbidden.""" pass class OMRequiredHashlessIRIError(OMEditError): """No hash-less IRI has been given.""" pass class OMUnauthorizedTypeChangeError(OMEditError): """When updating a resource with new types without explicit authorization.""" pass class OMAccessError(OMUserError): """Error when accessing objects.""" pass class OMAttributeAccessError(OMAccessError): """When such an attribute cannot be identified (is not supported or no model has been found). """ pass class OMClassInstanceError(OMAccessError): """The object is not an instance of the expected RDFS class.""" pass class OMObjectNotFoundError(OMAccessError): """When the object is not found.""" pass class OMHashIriError(OMAccessError): """A hash IRI has been given instead of a hash-less IRI.""" pass class OMSPARQLError(OMAccessError): """Invalid SPARQL query given.""" pass class OMSPARQLParseError(OMInternalError): """Invalid SPARQL request.""" pass class OMAlreadyGeneratedAttributeError(OMInternalError): """Attribute generation occurs only once per SupportedProperty. You should not try to add metadata or regenerate after that. """ pass class UnsupportedDataStorageFeatureException(OMDataStoreError): """Feature not supported by the data store."""
22.271255
86
0.681331
543
5,501
6.902394
0.401473
0.086446
0.009605
0.017076
0.051761
0.051761
0.045091
0
0
0
0
0.002011
0.186512
5,501
247
87
22.271255
0.835531
0.476822
0
0.481013
1
0
0
0
0
0
0
0.020243
0
1
0
true
0.481013
0
0
0.518987
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
1
0
0
0
1
1
0
0
1
0
0
5
2cb8c9c5b90349875c34e2220078d70ae2dff6ef
1,100
py
Python
bin/tellopro.py
hgu-sit22005/telloproject-Eunchong-Park
a7ec775cc9c226c97cfc046d2af6b3329aa49e81
[ "MIT" ]
null
null
null
bin/tellopro.py
hgu-sit22005/telloproject-Eunchong-Park
a7ec775cc9c226c97cfc046d2af6b3329aa49e81
[ "MIT" ]
null
null
null
bin/tellopro.py
hgu-sit22005/telloproject-Eunchong-Park
a7ec775cc9c226c97cfc046d2af6b3329aa49e81
[ "MIT" ]
null
null
null
from tello import Tello import sys from datetime import datetime import time import TelloPro tello = Tello() command_lst = [] command_lst.append(TelloPro.get_instance('takeoff',-1)) command_lst.append(TelloPro.get_instance('up',50)) command_lst.append(TelloPro.get_instance('forward',100)) command_lst.append(TelloPro.get_instance('down',50)) command_lst.append(TelloPro.get_instance('ccw',45)) command_lst.append(TelloPro.get_instance('forward',100)) command_lst.append(TelloPro.get_instance('cw',90)) command_lst.append(TelloPro.get_instance('forward',100)) command_lst.append(TelloPro.get_instance('cw',90)) command_lst.append(TelloPro.get_instance('forward',100)) command_lst.append(TelloPro.get_instance('cw',90)) command_lst.append(TelloPro.get_instance('forward',100)) command_lst.append(TelloPro.get_instance('ccw',45)) command_lst.append(TelloPro.get_instance('forward',100)) command_lst.append(TelloPro.get_instance('land',-1)) for command in command_lst: tello.send_command_instance(command) #파이썬을 사용해서 파일 가져오고 오픈해서 사용 하는것을 하는거다 #포문으로 자체적으로 문법 만들어서 실행 할 수 도있다. #휴보처럼 포문으로 잘 만들어서 해라
32.352941
56
0.800909
169
1,100
5.011834
0.272189
0.200708
0.283353
0.42503
0.72137
0.72137
0.638725
0.634002
0.634002
0.634002
0
0.032946
0.061818
1,100
33
57
33.333333
0.787791
0.076364
0
0.458333
0
0
0.070158
0
0
0
0
0
0
1
0
false
0
0.208333
0
0.208333
0
0
0
0
null
1
1
1
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2cb8f7dd92a574b5de8b8df93c334109cf5ebf1e
50
py
Python
docknv/scaffolder/__init__.py
sharingcloud/docknv
6eec6a576a32cb05278b7af045f90859066c9f1d
[ "MIT" ]
null
null
null
docknv/scaffolder/__init__.py
sharingcloud/docknv
6eec6a576a32cb05278b7af045f90859066c9f1d
[ "MIT" ]
null
null
null
docknv/scaffolder/__init__.py
sharingcloud/docknv
6eec6a576a32cb05278b7af045f90859066c9f1d
[ "MIT" ]
null
null
null
"""Scaffolder.""" from .methods import * # noqa
12.5
30
0.62
5
50
6.2
1
0
0
0
0
0
0
0
0
0
0
0
0.18
50
3
31
16.666667
0.756098
0.34
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
2cbfc44903adf937295da796350c84269bcd0e52
41
py
Python
appointment/__init__.py
PrynsTag/oneBarangay
6a8d56003d85b8385e91f5c5d81208619023c1ee
[ "Apache-2.0" ]
null
null
null
appointment/__init__.py
PrynsTag/oneBarangay
6a8d56003d85b8385e91f5c5d81208619023c1ee
[ "Apache-2.0" ]
96
2021-08-28T12:37:02.000Z
2022-03-23T04:25:12.000Z
appointment/__init__.py
PrynsTag/oneBarangay
6a8d56003d85b8385e91f5c5d81208619023c1ee
[ "Apache-2.0" ]
null
null
null
"""This is init file for appointment."""
20.5
40
0.682927
6
41
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.146341
41
1
41
41
0.8
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
e2f4a8b193617c57361f6f37a3068acc80a2549f
224
py
Python
syntax/string.py
sangumee/Opentutorials-Webn-Python
9f813f8f342ea99ffee6e31f363f175fa023c489
[ "MIT" ]
null
null
null
syntax/string.py
sangumee/Opentutorials-Webn-Python
9f813f8f342ea99ffee6e31f363f175fa023c489
[ "MIT" ]
null
null
null
syntax/string.py
sangumee/Opentutorials-Webn-Python
9f813f8f342ea99ffee6e31f363f175fa023c489
[ "MIT" ]
null
null
null
print('Hello World') print("Hello World") print("Hello'o' World") #escape print("Hello'o' \"w\"orld") #newLine print('H') print('E') print('L') print('L') print('O') print('H\ne\nl\nl\no') #docstring print(''' H E L L O ''')
11.2
27
0.616071
40
224
3.45
0.375
0.289855
0.217391
0.289855
0.289855
0
0
0
0
0
0
0
0.102679
224
20
28
11.2
0.686567
0.098214
0
0.117647
0
0
0.395
0
0
0
0
0
0
1
0
true
0
0
0
0
0.647059
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
0
1
0
5
393914d472446a06e74bce1d07c88117e7bb21ec
1,959
py
Python
cnm/responsive/browser/fullsite.py
cnm-web/cnm.responsive
2aaec1e116aec593a06f19ed6714ded312ddce1e
[ "Apache-2.0" ]
null
null
null
cnm/responsive/browser/fullsite.py
cnm-web/cnm.responsive
2aaec1e116aec593a06f19ed6714ded312ddce1e
[ "Apache-2.0" ]
null
null
null
cnm/responsive/browser/fullsite.py
cnm-web/cnm.responsive
2aaec1e116aec593a06f19ed6714ded312ddce1e
[ "Apache-2.0" ]
null
null
null
from Products.Five.browser import BrowserView from Products.CMFCore.utils import getToolByName import time class SetFullSite(BrowserView): """Set a full site cookie and redirect """ def __call__(self): REQUEST = self.request context = self.context response = REQUEST.response response.setCookie('plonefullsite', 'True') referer = REQUEST.get_header("HTTP_REFERER") # Page referer (the page from user came from) if referer == None: # referer will be none if it was missing, so let's just set it to the portal root referer = context.portal_url() time.sleep(2) # Adding 2 second pause since it looks like with no pause sometimes the cookie doesn't update fast enough and old value is still there after redirect response.redirect(referer) class ClearFullSite(BrowserView): """Clear the full site cookie and redirect """ def __call__(self): REQUEST = self.request context = self.context response = REQUEST.response response.expireCookie('plonefullsite') referer = REQUEST.get_header("HTTP_REFERER") # Page referer (the page from user came from) if referer == None: # referer will be none if it was missing, so let's just set it to the portal root referer = context.portal_url() time.sleep(2)# Adding 2 second pause since it looks like with no pause sometimes the cookie doesn't update fast enough and old value is still there after redirect response.redirect(referer) class AllowMobile(BrowserView): """Check full site cookie to see if mobile view is allowed """ def __call__(self): REQUEST = self.request context = self.context response = REQUEST.response if 'plonefullsite' in REQUEST: return False else: return True
38.411765
171
0.645738
244
1,959
5.110656
0.352459
0.052927
0.033681
0.043304
0.740978
0.740978
0.740978
0.740978
0.740978
0.740978
0
0.002869
0.288412
1,959
51
172
38.411765
0.891679
0.352731
0
0.647059
0
0
0.053686
0
0
0
0
0
0
1
0.088235
false
0
0.088235
0
0.323529
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
1a313475913ca2ebb1ad14d72612228b49fbce63
95
py
Python
backend/tests/test_dummy.py
darkshredder/DengueStop
af2bc4b0e056f6cf4d553640b727baf65e7c12ca
[ "Apache-2.0" ]
3
2020-06-14T05:17:07.000Z
2020-08-31T16:28:46.000Z
backend/tests/test_dummy.py
darkshredder/DengueStop
af2bc4b0e056f6cf4d553640b727baf65e7c12ca
[ "Apache-2.0" ]
44
2020-06-07T16:09:45.000Z
2021-03-02T14:24:49.000Z
backend/tests/test_dummy.py
darkshredder/DengueStop
af2bc4b0e056f6cf4d553640b727baf65e7c12ca
[ "Apache-2.0" ]
14
2020-06-03T14:35:40.000Z
2021-03-08T05:05:42.000Z
def test_dummy(): assert 1 == 1 # this is just a dummy test # add meaningful tests
23.75
31
0.621053
15
95
3.866667
0.8
0
0
0
0
0
0
0
0
0
0
0.030303
0.305263
95
4
32
23.75
0.848485
0.484211
0
0
0
0
0
0
0
0
0
0
0.5
1
0.5
true
0
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
0
0
0
5
1a45cd2bd911fec1e6fddceb17510cb2b434c3ce
54
py
Python
alphabets.py
bluseking/scence_jet_code_recognition
3902344dabb3fe3ffe36f92b2131245ee5bce6ef
[ "Apache-2.0" ]
null
null
null
alphabets.py
bluseking/scence_jet_code_recognition
3902344dabb3fe3ffe36f92b2131245ee5bce6ef
[ "Apache-2.0" ]
null
null
null
alphabets.py
bluseking/scence_jet_code_recognition
3902344dabb3fe3ffe36f92b2131245ee5bce6ef
[ "Apache-2.0" ]
null
null
null
alphabet = """0123456789ABCDEFGHJKLMNPQRSTUVWXYZ -"""
27
53
0.777778
2
54
21
1
0
0
0
0
0
0
0
0
0
0
0.2
0.074074
54
1
54
54
0.64
0
0
0
0
0
0.666667
0.62963
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
1a869703ac6a531e0cdcf1ad8fe6ebcef91564ca
201
py
Python
src/nn3v/shapes/__init__.py
Blayzeing/python-nn3v
9cb6c6882fea69648e807c0ab5f080eed0e18cbe
[ "MIT" ]
null
null
null
src/nn3v/shapes/__init__.py
Blayzeing/python-nn3v
9cb6c6882fea69648e807c0ab5f080eed0e18cbe
[ "MIT" ]
null
null
null
src/nn3v/shapes/__init__.py
Blayzeing/python-nn3v
9cb6c6882fea69648e807c0ab5f080eed0e18cbe
[ "MIT" ]
null
null
null
#__all__ = ["Line", "Loop", "Icosphere", "Cuboid"] #from nn3v.shapes.Shape import Shape # Import to allow for, say nn3v.shapes.Line() to actually be a line object: #from nn3v.shapes.Line import Line
33.5
75
0.716418
31
201
4.516129
0.580645
0.214286
0.2
0
0
0
0
0
0
0
0
0.017442
0.144279
201
5
76
40.2
0.796512
0.950249
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
1aabddcee4c190e4052fb984b3802b540e4fb570
36
py
Python
gui/__init__.py
Classic-Daniel/BilingualBookGenerator
9a455d7532fb34e6dbc9996e84f2c9e5e05067d4
[ "MIT" ]
2
2022-02-04T13:39:17.000Z
2022-02-04T20:44:16.000Z
gui/__init__.py
Classic-Daniel/BilingualBookGenerator
9a455d7532fb34e6dbc9996e84f2c9e5e05067d4
[ "MIT" ]
null
null
null
gui/__init__.py
Classic-Daniel/BilingualBookGenerator
9a455d7532fb34e6dbc9996e84f2c9e5e05067d4
[ "MIT" ]
null
null
null
from gui.main_gui import MainWindow
36
36
0.861111
6
36
5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.111111
36
1
36
36
0.9375
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
2019e4c572e49cc45139722a9940e6d39e528b13
34
py
Python
src/sprites/balls/__init__.py
LeonGeorgi/ballsurf
4ae5fdb21e67d84ff7a0168481720dcd10155705
[ "MIT" ]
null
null
null
src/sprites/balls/__init__.py
LeonGeorgi/ballsurf
4ae5fdb21e67d84ff7a0168481720dcd10155705
[ "MIT" ]
null
null
null
src/sprites/balls/__init__.py
LeonGeorgi/ballsurf
4ae5fdb21e67d84ff7a0168481720dcd10155705
[ "MIT" ]
null
null
null
from sprites.balls.balls import *
17
33
0.794118
5
34
5.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.117647
34
1
34
34
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
2040f2197f59f645dabe17cb445ea1d8b5ea3a38
110
py
Python
desafio/desafio035.py
henriquekirchheck/Curso-em-video-Python
1a29f68515313af85c8683f626ba35f8fcdd10e7
[ "MIT" ]
null
null
null
desafio/desafio035.py
henriquekirchheck/Curso-em-video-Python
1a29f68515313af85c8683f626ba35f8fcdd10e7
[ "MIT" ]
null
null
null
desafio/desafio035.py
henriquekirchheck/Curso-em-video-Python
1a29f68515313af85c8683f626ba35f8fcdd10e7
[ "MIT" ]
null
null
null
#Desenvolva um programa que leia tres numeros e diga se ele podem ou não formar um triangulo print('Não sei')
36.666667
92
0.781818
20
110
4.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.172727
110
3
93
36.666667
0.945055
0.827273
0
0
0
0
0.368421
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
20540c8244526dffa0cfafc867801d27b2b2a5b4
80
py
Python
tests/unit/create_encrypted_config/test_index.py
artilf/bookmarks-lambda
f1d0c9d94f5793240e844e4d99e30fa2e5a331cf
[ "MIT" ]
null
null
null
tests/unit/create_encrypted_config/test_index.py
artilf/bookmarks-lambda
f1d0c9d94f5793240e844e4d99e30fa2e5a331cf
[ "MIT" ]
null
null
null
tests/unit/create_encrypted_config/test_index.py
artilf/bookmarks-lambda
f1d0c9d94f5793240e844e4d99e30fa2e5a331cf
[ "MIT" ]
null
null
null
class TestHandler(object): def test_normal(self, monkeypatch): pass
20
39
0.6875
9
80
6
1
0
0
0
0
0
0
0
0
0
0
0
0.225
80
3
40
26.666667
0.870968
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.333333
0
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
2054954a729f966aea67e8ffc2ace794162cb279
84
py
Python
services/postgres/room/run_migrations.py
buckmaxwell/jukebox
3b04fd1e38e9d3f57d86cf6695bcc3d8e8126681
[ "MIT" ]
1
2020-08-11T16:19:49.000Z
2020-08-11T16:19:49.000Z
services/postgres/room/run_migrations.py
buckmaxwell/jukebox
3b04fd1e38e9d3f57d86cf6695bcc3d8e8126681
[ "MIT" ]
39
2020-05-06T05:27:19.000Z
2022-02-27T08:35:36.000Z
services/postgres/room/run_migrations.py
buckmaxwell/jukebox
3b04fd1e38e9d3f57d86cf6695bcc3d8e8126681
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from migrator import run_migrations run_migrations("room")
14
35
0.785714
12
84
5.333333
0.833333
0.40625
0
0
0
0
0
0
0
0
0
0.013333
0.107143
84
5
36
16.8
0.84
0.25
0
0
0
0
0.064516
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
6466e35b9ea97c5de643b8a7e432d114e77d864f
125
py
Python
server/scorebook/admin.py
louisliv/baseball
1148785a6f2c03ced6ebcfcd209e45b901da26a3
[ "MIT" ]
null
null
null
server/scorebook/admin.py
louisliv/baseball
1148785a6f2c03ced6ebcfcd209e45b901da26a3
[ "MIT" ]
null
null
null
server/scorebook/admin.py
louisliv/baseball
1148785a6f2c03ced6ebcfcd209e45b901da26a3
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Scorecard # Register your models here. admin.site.register(Scorecard)
20.833333
32
0.808
17
125
5.941176
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.128
125
5
33
25
0.926606
0.208
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
649f0a124f9b7d1e708b031740db554a6e8e7318
188
py
Python
queue.py
hashimas/learning_python
a6eba00031c79c5793e5bdc651374a41a7c3545f
[ "Apache-2.0" ]
null
null
null
queue.py
hashimas/learning_python
a6eba00031c79c5793e5bdc651374a41a7c3545f
[ "Apache-2.0" ]
null
null
null
queue.py
hashimas/learning_python
a6eba00031c79c5793e5bdc651374a41a7c3545f
[ "Apache-2.0" ]
null
null
null
from collections import deque queue = deque(['Hashim','Ashir','Yusuf']) queue.append('Aliyu') queue.append('Ibrahim') print(queue) queue.popleft() print(queue) queue.popleft() print(queue)
20.888889
41
0.744681
25
188
5.6
0.52
0.214286
0.214286
0.314286
0.385714
0.385714
0
0
0
0
0
0
0.069149
188
9
42
20.888889
0.8
0
0
0.555556
0
0
0.148148
0
0
0
0
0
0
1
0
false
0
0.111111
0
0.111111
0.333333
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
64b26e21ef81308019188aeaf6524a4aebc088ff
92
py
Python
sunday/weekapp/admin.py
H0oxy/zxc-djangoprjct
e5c56e16a876af1ece2a6727df89bb924ae8813b
[ "MIT" ]
2
2020-10-18T21:02:54.000Z
2020-10-18T21:03:46.000Z
sunday/weekapp/admin.py
H0oxy/zxc-djangoprjct
e5c56e16a876af1ece2a6727df89bb924ae8813b
[ "MIT" ]
null
null
null
sunday/weekapp/admin.py
H0oxy/zxc-djangoprjct
e5c56e16a876af1ece2a6727df89bb924ae8813b
[ "MIT" ]
null
null
null
from django.contrib import admin from weekapp.models import Week admin.site.register(Week)
18.4
32
0.826087
14
92
5.428571
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.108696
92
5
33
18.4
0.926829
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
64c91ac61b9629af5e43aaf775af678ad77fd342
103
py
Python
setup.py
BrianBrennglass/Deviency-Score
9e3223ea954114797cdd1bd834afdae700729a00
[ "MIT" ]
null
null
null
setup.py
BrianBrennglass/Deviency-Score
9e3223ea954114797cdd1bd834afdae700729a00
[ "MIT" ]
null
null
null
setup.py
BrianBrennglass/Deviency-Score
9e3223ea954114797cdd1bd834afdae700729a00
[ "MIT" ]
null
null
null
from setuptools import setup setup(name='Deviency_Score', version='0.1', packages=['Deviency_Score'])
25.75
72
0.76699
14
103
5.5
0.785714
0.337662
0
0
0
0
0
0
0
0
0
0.021053
0.07767
103
3
73
34.333333
0.789474
0
0
0
0
0
0.300971
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
b3a9e8afad40b3e9a76472a303a3eac9a5eae86d
115
py
Python
2021-05-09/城市地图带后端/城市地图后端/coffee/admin.py
ritaswc/wechat_app_template
d6ba56b70b09bc755f7d4d6b696b9e9b53511faa
[ "MIT" ]
395
2017-02-24T02:59:29.000Z
2022-03-31T15:48:19.000Z
2021-05-09/城市地图带后端/城市地图后端/coffee/admin.py
ritaswc/wechat_app_template
d6ba56b70b09bc755f7d4d6b696b9e9b53511faa
[ "MIT" ]
7
2020-03-17T08:33:00.000Z
2021-09-02T23:10:46.000Z
2021-05-09/城市地图带后端/城市地图后端/coffee/admin.py
ritaswc/wechat_app_template
d6ba56b70b09bc755f7d4d6b696b9e9b53511faa
[ "MIT" ]
235
2017-03-14T03:31:38.000Z
2022-03-29T16:14:51.000Z
from django.contrib import admin # Register your models here. from .models import Spot admin.site.register(Spot)
16.428571
32
0.791304
17
115
5.352941
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.13913
115
6
33
19.166667
0.919192
0.226087
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
37c681742eeafd8ba7f35726a4f3d5838e6831ec
309
py
Python
gym_reachability/gym_reachability/prob_envs/__init__.py
divyanshupachisia/safety_rl
4cb7a3606b793e45d071cff2183d2f15a3e4893b
[ "BSD-3-Clause" ]
null
null
null
gym_reachability/gym_reachability/prob_envs/__init__.py
divyanshupachisia/safety_rl
4cb7a3606b793e45d071cff2183d2f15a3e4893b
[ "BSD-3-Clause" ]
null
null
null
gym_reachability/gym_reachability/prob_envs/__init__.py
divyanshupachisia/safety_rl
4cb7a3606b793e45d071cff2183d2f15a3e4893b
[ "BSD-3-Clause" ]
null
null
null
""" Please contact the author(s) of this library if you have any questions. Authors: Kai-Chieh Hsu ( kaichieh@princeton.edu ) Vicenc Rubies Royo ( vrubies@berkeley.edu ) """ from .point_mass_zeromolo_prob import ProbZermeloShowEnv from .point_mass_zeromolo_prob_curvy import ProbZermeloShowEnvCurvy
34.333333
71
0.789644
41
309
5.780488
0.829268
0.075949
0.109705
0.177215
0.21097
0
0
0
0
0
0
0
0.142395
309
9
72
34.333333
0.89434
0.563107
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
806477dee0f683a0b40bdca19391bd9db84f012a
175
py
Python
src/dynamic_fixtures/fixtures/exceptions.py
duct-tape/django-dynamic-fixtures
da99b4b12b11be28ea4b36b6cf2896ca449c73c1
[ "MIT" ]
11
2016-05-18T18:02:25.000Z
2019-08-21T09:10:34.000Z
src/dynamic_fixtures/fixtures/exceptions.py
duct-tape/django-dynamic-fixtures
da99b4b12b11be28ea4b36b6cf2896ca449c73c1
[ "MIT" ]
16
2016-05-18T06:31:56.000Z
2020-12-30T16:38:10.000Z
src/dynamic_fixtures/fixtures/exceptions.py
Peter-Slump/django-factory-boy-fixtures
630182bd2a2b45833d29fa34134d6b68ff7a4349
[ "MIT" ]
7
2017-04-22T18:30:37.000Z
2021-12-22T11:14:38.000Z
class BadFixtureError(Exception): pass class MultipleFixturesFound(Exception): pass class FixtureNotFound(Exception): pass class DryRun(Exception): pass
11.666667
39
0.737143
16
175
8.0625
0.4375
0.403101
0.418605
0
0
0
0
0
0
0
0
0
0.194286
175
14
40
12.5
0.914894
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
8089b664874425b940c3b959079425bff3c94f94
78
py
Python
hawkeye/__init__.py
Ghalban/GhalbanCogs
65fef103fbcd0a2938cc5d6cf6d0aa76879c20c2
[ "MIT" ]
null
null
null
hawkeye/__init__.py
Ghalban/GhalbanCogs
65fef103fbcd0a2938cc5d6cf6d0aa76879c20c2
[ "MIT" ]
null
null
null
hawkeye/__init__.py
Ghalban/GhalbanCogs
65fef103fbcd0a2938cc5d6cf6d0aa76879c20c2
[ "MIT" ]
null
null
null
from .hawkeye import Hawkeye def setup(bot): bot.add_cog(Hawkeye(bot))
19.5
29
0.705128
12
78
4.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.179487
78
4
30
19.5
0.84375
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
80b537dbd2f20ecfb2f356d6d6e0340ec08e5f28
149
py
Python
classes/PeriodOfTime.py
Jollyfant/EPOS-TURTLE
8848a83e513b0bc9aacd96e290fc9f235bed687a
[ "MIT" ]
1
2020-10-06T13:28:54.000Z
2020-10-06T13:28:54.000Z
classes/PeriodOfTime.py
Jollyfant/EPOS-TURTLE
8848a83e513b0bc9aacd96e290fc9f235bed687a
[ "MIT" ]
null
null
null
classes/PeriodOfTime.py
Jollyfant/EPOS-TURTLE
8848a83e513b0bc9aacd96e290fc9f235bed687a
[ "MIT" ]
null
null
null
from EPOS import Node class PeriodOfTime(Node): def __init__(self, *args): self.type = self.dct.PeriodOfTime Node.__init__(self, args)
18.625
37
0.704698
20
149
4.85
0.6
0.329897
0.247423
0
0
0
0
0
0
0
0
0
0.187919
149
7
38
21.285714
0.801653
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
80cedff60e569ebce211ddf04f137459215dcf92
1,379
py
Python
tests/test_polarity_inversion.py
francislata/torch-audiomentations
37b086c87cfca0743244e3bbfc7f150280af3820
[ "MIT" ]
null
null
null
tests/test_polarity_inversion.py
francislata/torch-audiomentations
37b086c87cfca0743244e3bbfc7f150280af3820
[ "MIT" ]
null
null
null
tests/test_polarity_inversion.py
francislata/torch-audiomentations
37b086c87cfca0743244e3bbfc7f150280af3820
[ "MIT" ]
null
null
null
import unittest import numpy as np import torch from numpy.testing import assert_almost_equal from torch_audiomentations import PolarityInversion class TestPolarityInversion(unittest.TestCase): def test_polarity_inversion(self): samples = np.array([1.0, 0.5, -0.25, -0.125, 0.0], dtype=np.float32) sample_rate = 16000 augment = PolarityInversion(p=1.0) inverted_samples = augment( samples=torch.from_numpy(samples), sample_rate=sample_rate ).numpy() assert_almost_equal( inverted_samples, np.array([-1.0, -0.5, 0.25, 0.125, 0.0], dtype=np.float32) ) self.assertEqual(inverted_samples.dtype, np.float32) def test_polarity_inversion_multichannel(self): samples = np.array( [[1.0, 0.5, -0.25, -0.125, 0.0], [1.0, 0.5, -0.25, -0.125, 0.0]], dtype=np.float32, ) sample_rate = 16000 augment = PolarityInversion(p=1.0) inverted_samples = augment( samples=torch.from_numpy(samples), sample_rate=sample_rate ).numpy() assert_almost_equal( inverted_samples, np.array( [[-1.0, -0.5, 0.25, 0.125, 0.0], [-1.0, -0.5, 0.25, 0.125, 0.0]], dtype=np.float32, ), ) self.assertEqual(inverted_samples.dtype, np.float32)
32.069767
88
0.597534
183
1,379
4.360656
0.20765
0.030075
0.022556
0.030075
0.714286
0.714286
0.714286
0.714286
0.714286
0.714286
0
0.103792
0.273387
1,379
42
89
32.833333
0.692615
0
0
0.457143
0
0
0
0
0
0
0
0
0.142857
1
0.057143
false
0
0.142857
0
0.228571
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
80e3bd66aacbd04bacc61c0f68be11c1fc5a1691
116
py
Python
feature_flags_project/my_app/my_features.py
steuke/django_feature_flags_example
00e33378999d6d567c37593c17289405fc7b5847
[ "MIT" ]
null
null
null
feature_flags_project/my_app/my_features.py
steuke/django_feature_flags_example
00e33378999d6d567c37593c17289405fc7b5847
[ "MIT" ]
3
2021-09-22T18:56:38.000Z
2021-11-29T16:11:59.000Z
feature_flags_project/my_app/my_features.py
steuke/django_feature_flags_example
00e33378999d6d567c37593c17289405fc7b5847
[ "MIT" ]
null
null
null
from feature_flags.features import Feature SHOW_AWESOME_TEXT_FEATURE = Feature(name="enable_awesome_text_feature")
29
71
0.87069
16
116
5.875
0.625
0.234043
0.382979
0
0
0
0
0
0
0
0
0
0.068966
116
3
72
38.666667
0.87037
0
0
0
0
0
0.232759
0.232759
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
80fc9718b9ef2ad7c0912ae16dd82b22abfb7b70
2,666
py
Python
smaug/python/ops/data_op_test.py
mrbeann/smaug
01ef7892bb25cb08c13cea6125efc1528a8de260
[ "BSD-3-Clause" ]
50
2020-06-12T19:53:37.000Z
2022-03-30T15:05:34.000Z
smaug/python/ops/data_op_test.py
mrbeann/smaug
01ef7892bb25cb08c13cea6125efc1528a8de260
[ "BSD-3-Clause" ]
37
2020-06-23T17:28:42.000Z
2021-10-21T05:30:36.000Z
smaug/python/ops/data_op_test.py
mrbeann/smaug
01ef7892bb25cb08c13cea6125efc1528a8de260
[ "BSD-3-Clause" ]
18
2020-06-17T19:59:23.000Z
2022-02-15T07:40:47.000Z
#!/usr/bin/env python import unittest import numpy as np from smaug.core import types_pb2 from smaug.python.tensor import Tensor from smaug.python.graph import Graph from smaug.python.ops import data_op from smaug.python.ops import math_ops graph_name = "test_graph" backend = "Reference" def get_num_data_nodes(graph): count = 0 for node in graph.get_nodes(): if node.op == types_pb2.Data: count += 1 return count class TestUniqueName(unittest.TestCase): def test_auto_data_op(self): with Graph(graph_name, backend) as test_graph: x = Tensor(data_layout=types_pb2.N, tensor_data=np.array([1])) y = Tensor(data_layout=types_pb2.N, tensor_data=np.array([1])) res= math_ops.add(x, y) self.assertEqual(get_num_data_nodes(test_graph), 2) def test_no_extra_data_op(self): with Graph(graph_name, backend) as test_graph: x = Tensor(data_layout=types_pb2.N, tensor_data=np.array([1])) x_ = data_op.input_data(x) res= math_ops.add(x_, x) self.assertEqual(get_num_data_nodes(test_graph), 1) def test_use_existing_data_op(self): with Graph(graph_name, backend) as test_graph: x = Tensor(data_layout=types_pb2.N, tensor_data=np.array([1])) y = Tensor(data_layout=types_pb2.N, tensor_data=np.array([1])) x_ = data_op.input_data(x) res= math_ops.add(x, y) self.assertEqual(get_num_data_nodes(test_graph), 2) def test_shared_data_op(self): with Graph(graph_name, backend) as test_graph: x = Tensor(data_layout=types_pb2.N, tensor_data=np.array([1])) y = Tensor(data_layout=types_pb2.N, tensor_data=np.array([1])) res = math_ops.add(x, y) res = math_ops.mul(x, res) self.assertEqual(get_num_data_nodes(test_graph), 2) def test_use_existing_data_op_in_subgraph(self): with Graph(graph_name, backend) as parent_graph: x = Tensor(data_layout=types_pb2.N, tensor_data=np.array([1])) y = Tensor(data_layout=types_pb2.N, tensor_data=np.array([1])) with Graph(graph_name + "_subgraph", backend) as child_graph: res = math_ops.mul(x, y) res = math_ops.add(x, y) self.assertEqual(get_num_data_nodes(parent_graph), 2) def test_use_existing_data_op_in_parent_graph(self): with Graph(graph_name, backend) as parent_graph: x = Tensor(data_layout=types_pb2.N, tensor_data=np.array([1])) y = Tensor(data_layout=types_pb2.N, tensor_data=np.array([1])) res = math_ops.mul(x, y) with Graph(graph_name + "_subgraph", backend) as child_graph: res = math_ops.add(x, y) self.assertEqual(get_num_data_nodes(parent_graph), 2) if __name__ == "__main__": unittest.main()
36.520548
68
0.710803
444
2,666
3.961712
0.13964
0.125071
0.100057
0.131325
0.786811
0.751563
0.735645
0.735645
0.713474
0.687891
0
0.014421
0.167667
2,666
72
69
37.027778
0.778279
0.007502
0
0.55
0
0
0.017013
0
0
0
0
0
0.1
1
0.116667
false
0
0.116667
0
0.266667
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
03d54ca2f047218a141034258e22bffec4c558ff
621
py
Python
mate_scratch/joelnet/loss.py
matescharnitzky/deep-learning-from-scratch
2b0bf568550bfb7ebca7fa7b434da19b6114c5cc
[ "MIT" ]
null
null
null
mate_scratch/joelnet/loss.py
matescharnitzky/deep-learning-from-scratch
2b0bf568550bfb7ebca7fa7b434da19b6114c5cc
[ "MIT" ]
null
null
null
mate_scratch/joelnet/loss.py
matescharnitzky/deep-learning-from-scratch
2b0bf568550bfb7ebca7fa7b434da19b6114c5cc
[ "MIT" ]
null
null
null
from numpy import ndarray import numpy as np class Loss: def loss(self, prediction: ndarray, actual: ndarray) -> float: raise NotImplementedError def grad(self, prediction: ndarray, actual: ndarray) -> ndarray: raise NotImplementedError class MSE(Loss): """ Cost function for regression problems. """ def loss(self, prediction: ndarray, actual: ndarray) -> float: return np.sum((prediction - actual) ** 2) / prediction.shape[0] def grad(self, prediction: ndarray, actual: ndarray) -> ndarray: return 2.0 * (prediction - actual) / prediction.shape[0]
27
71
0.661836
71
621
5.788732
0.380282
0.136253
0.20438
0.262774
0.457421
0.457421
0.457421
0.457421
0
0
0
0.010438
0.228663
621
23
72
27
0.847599
0.061192
0
0.5
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.166667
0.833333
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
03e2fbfe1daafd1461fc0c669bbad4eccc173db8
6,029
py
Python
test/test_npu/test_network_ops/test_pdist.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_network_ops/test_pdist.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_network_ops/test_pdist.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, Huawei Technologies.All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import torch import numpy as np import sys from common_utils import TestCase, run_tests from common_device_type import dtypes, instantiate_device_type_tests from util_test import create_common_tensor class TestPdist(TestCase): def generate_data(self, min_d, max_d, shape, dtype): input1 = np.random.uniform(min_d, max_d, shape).astype(dtype) npu_input1 = torch.from_numpy(input1) return npu_input1 def cpu_op_exec_default(self, input1): stype = input1.dtype if stype == torch.float16: input1 = input1.float() output = torch.nn.functional.pdist(input1) if stype == torch.float16: output = output.half() output = output.numpy() return output def npu_op_exec_default(self, input1): input1 = input1.to("npu") output = torch.nn.functional.pdist(input1) output = output.to("cpu") output = output.numpy() return output def cpu_op_exec(self, input1, p): stype = input1.dtype if stype == torch.float16: input1 = input1.float() output = torch.nn.functional.pdist(input1, p) if stype == torch.float16: output = output.half() output = output.numpy() return output def npu_op_exec(self, input1, p): input1 = input1.to("npu") output = torch.nn.functional.pdist(input1, p) output = output.to("cpu") output = output.numpy() return output def test_pdist__5_360_float16(self, device): npu_input1 = self.generate_data(-2, 2, (5, 360), np.float16) cpu_output = self.cpu_op_exec_default(npu_input1) npu_output = self.npu_op_exec_default(npu_input1) self.assertRtolEqual(cpu_output, npu_output) def test_pdist_10_3600_float32(self, device): npu_input1 =self.generate_data(-2, 2, (10, 3600), np.float32) cpu_output = self.cpu_op_exec_default(npu_input1) npu_output = self.npu_op_exec_default(npu_input1) self.assertRtolEqual(cpu_output, npu_output) def test_pdist_30_301_0_float16(self, device): npu_input1 = self.generate_data(-2, 2, (30, 301), np.float16) cpu_output = self.cpu_op_exec(npu_input1, 0.0) npu_output = self.npu_op_exec(npu_input1, 0.0) self.assertRtolEqual(cpu_output, npu_output) def test_pdist_10_256_0_float32(self, device): npu_input1 = self.generate_data(-2, 2, (10, 256), np.float32) cpu_output = self.cpu_op_exec(npu_input1, 0.0) npu_output = self.npu_op_exec(npu_input1, 0.0) self.assertRtolEqual(cpu_output, npu_output) def test_pdist_20_234_1_float32(self, device): npu_input1 = self.generate_data(-2, 2, (20, 234), np.float32) cpu_output = self.cpu_op_exec(npu_input1, 1.0) npu_output = self.npu_op_exec(npu_input1, 1.0) self.assertRtolEqual(cpu_output, npu_output) def test_pdist_10_1600_1_float16(self, device): npu_input1 = self.generate_data(-2, 2, (10, 1600), np.float16) cpu_output = self.cpu_op_exec(npu_input1, 1.0) npu_output = self.npu_op_exec(npu_input1, 1.0) self.assertRtolEqual(cpu_output, npu_output) def test_pdist_8_1025_2_float32(self, device): npu_input1 = self.generate_data(-2, 2, (8, 1025), np.float32) cpu_output = self.cpu_op_exec(npu_input1, 2.0) npu_output = self.npu_op_exec(npu_input1, 2.0) self.assertRtolEqual(cpu_output, npu_output) def test_pdist_9_10250_2_float16(self, device): npu_input1 = self.generate_data(-2, 2, (9, 10250), np.float16) cpu_output = self.cpu_op_exec(npu_input1, 2.0) npu_output = self.npu_op_exec(npu_input1, 2.0) self.assertRtolEqual(cpu_output, npu_output) def test_pdist_100_7025_10_float32(self, device): npu_input1 = self.generate_data(-2, 2, (100, 7025), np.float32) cpu_output = self.cpu_op_exec(npu_input1, 10.0) npu_output = self.npu_op_exec(npu_input1, 10.0) self.assertRtolEqual(cpu_output, npu_output) def test_pdist_111_10025_10_float16(self, device): npu_input1 = self.generate_data(-2, 2, (111, 10025), np.float16) cpu_output = self.cpu_op_exec(npu_input1, 10.0) npu_output = self.npu_op_exec(npu_input1, 10.0) self.assertRtolEqual(cpu_output, npu_output) def test_pdist__50_0_float32(self, device): npu_input1 = self.generate_data(-2, 2, (50, 0), np.float32) cpu_output = self.cpu_op_exec_default(npu_input1) npu_output = self.npu_op_exec_default(npu_input1) self.assertRtolEqual(cpu_output, npu_output) def test_pdist__1_110_float32(self, device): npu_input1 = self.generate_data(-2, 2, (1, 110), np.float32) cpu_output = self.cpu_op_exec_default(npu_input1) npu_output = self.npu_op_exec_default(npu_input1) self.assertRtolEqual(cpu_output, npu_output) def test_pdist__0_0_float32(self, device): npu_input1 = self.generate_data(-2, 2, (0, 0), np.float32) cpu_output = self.cpu_op_exec_default(npu_input1) npu_output = self.npu_op_exec_default(npu_input1) self.assertRtolEqual(cpu_output, npu_output) instantiate_device_type_tests(TestPdist, globals(), except_for='cpu') if __name__ == "__main__": run_tests()
42.457746
74
0.680046
878
6,029
4.361048
0.164009
0.09637
0.061113
0.06268
0.747715
0.723165
0.723165
0.722643
0.720293
0.720293
0
0.070456
0.220766
6,029
142
75
42.457746
0.744572
0.095207
0
0.59633
0
0
0.004226
0
0
0
0
0
0.119266
1
0.165138
false
0
0.055046
0
0.275229
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
03f0b1569c64bae6a46e33d1ee92f3de304bd9c9
6,400
py
Python
p2_continuous-control/tests/policy_agent_reinforce.py
mayurand/deepRL-p2-Continuous-Control
02b9eef254dde34c3c13f1736b4e3ef88d642f7d
[ "MIT" ]
1
2019-10-14T00:45:06.000Z
2019-10-14T00:45:06.000Z
p2_continuous-control/tests/policy_agent_reinforce.py
mayurand/deepRL-p2-Continuous-Control
02b9eef254dde34c3c13f1736b4e3ef88d642f7d
[ "MIT" ]
null
null
null
p2_continuous-control/tests/policy_agent_reinforce.py
mayurand/deepRL-p2-Continuous-Control
02b9eef254dde34c3c13f1736b4e3ef88d642f7d
[ "MIT" ]
2
2019-01-30T19:36:40.000Z
2020-01-11T16:16:52.000Z
import numpy as np import random from collections import namedtuple, deque import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") class Policy(nn.Module): """ This class implements a Neural Network as a function approximator for a policy. """ def __init__(self, state_size=33, action_size=4, seed=0): # We need to initialize the nn.Module class within Policy(). super(Policy, self).__init__() # The super initializes the nn.Module parentclass h1_size=32 h2_size=64 self.state_size = state_size self.action_size = action_size self.seed = random.seed(seed) self.fc1 = nn.Linear(state_size, h1_size) # First layer self.fc2 = nn.Linear(h1_size, h2_size) # Second layer self.fc3 = nn.Linear(h2_size, action_size) # Output layer def forward(self, state): h1_state = F.relu(self.fc1(state)) h2_state = F.relu(self.fc2(h1_state)) action_probs = F.tanh(self.fc3(h2_state)) return action_probs def act(self, state): # Convert the state (as a numpy array) into a torch tensor state_in_torch = torch.from_numpy(state).float().unsqueeze(0) # Pass the input state from the network and get action probs action_probs = self.forward(state_in_torch).cpu() return action_probs class Policy_REINFORCE(nn.Module): """ This class implements a Neural Network as a function approximator for a policy. """ def __init__(self, state_size=33, action_size=4, seed=0): # We need to initialize the nn.Module class within Policy(). super(Policy_REINFORCE, self).__init__() # The super initializes the nn.Module parentclass h1_size=32 h2_size=64 self.state_size = state_size self.action_size = action_size self.seed = random.seed(seed) self.fc1 = nn.Linear(state_size, h1_size) # First layer self.fc2 = nn.Linear(h1_size, h2_size) # Second layer # The output layer gives the mean and variance values. Thus action_size*2 are the output values. self.fc3 = nn.Linear(h2_size, action_size*2) # Output layer def forward(self, state): h1_state = F.relu(self.fc1(state)) h2_state = F.relu(self.fc2(h1_state)) action_probs = F.softmax(self.fc3(h2_state), dim=1) return action_probs def act(self, state): # Convert the state (as a numpy array) into a torch tensor state_in_torch = torch.from_numpy(state).float().unsqueeze(0).to(device) # Pass the input state from the network and get action probs action_probs = self.forward(state_in_torch).cpu() return action_probs def collect_random_trajectory(env, policy, tmax=500): pass def collect_trajectory_REINFORCE(env, policy, tmax=500): #initialize returning lists and start the game! state_list=[] reward_list=[] action_vals_list=[] actions = [] brain_name = env.brain_names[0] brain = env.brains[brain_name] env_info = env.reset(train_mode=True)[brain_name] # reset the environment state = env_info.vector_observations[0] # get the current state # For the number of time steps for t in range(tmax): action_vals = policy.act(state).detach().numpy() # select an action action = [] # Draw the actions from normal distribution for i in range(0,len(action_vals[0]),2): mean = action_vals[0][i] variance = action_vals[0][i+1] a = np.random.normal(mean,variance) action.append(a) action = np.clip(action, -1, 1) # all actions between -1 and 1 env_info = env.step(action)[brain_name] # send the action to the environment next_state = env_info.vector_observations[0] # get the next state reward = env_info.rewards[0] # get the reward done = env_info.local_done[0] # see if episode has finished # store the result state_list.append(state) reward_list.append(reward) action_vals_list.append(action_vals) actions.append(action) state = next_state # roll over the state to next time step # stop if any of the trajectories is done # we want all the lists to be retangular if done: break action_vals_list = torch.Tensor(action_vals_list).to(device) # return action vals, states, rewards return action_vals_list, actions , state_list, reward_list def collect_trajectory(env, policy, tmax=500): #initialize returning lists and start the game! state_list=[] reward_list=[] action_vals_list=[] brain_name = env.brain_names[0] brain = env.brains[brain_name] env_info = env.reset(train_mode=True)[brain_name] # reset the environment state = env_info.vector_observations[0] # get the current state # For the number of time steps for t in range(tmax): action_val = policy.act(state) # select an action #actions = np.clip(action_val.detach().numpy(), -1, 1) # all actions between -1 and 1 env_info = env.step(action_val.detach().numpy())[brain_name] # send the action to the environment next_state = env_info.vector_observations[0] # get the next state reward = env_info.rewards[0] # get the reward done = env_info.local_done[0] # see if episode has finished # store the result state_list.append(state) reward_list.append(reward) action_vals_list.append(action_val) state = next_state # roll over the state to next time step # stop if any of the trajectories is done # we want all the lists to be retangular if done: break # return action vals, states, rewards return action_vals_list, state_list, reward_list
35.555556
111
0.617188
865
6,400
4.393064
0.182659
0.039474
0.029474
0.014737
0.782105
0.772632
0.772632
0.772632
0.756316
0.730526
0
0.019437
0.300625
6,400
179
112
35.75419
0.829535
0.276406
0
0.607843
0
0
0.001978
0
0
0
0
0
0
1
0.088235
false
0.009804
0.068627
0
0.235294
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
03f14f70684d520135761d0429702a4b4461bb76
156
py
Python
angr/analyses/forward_analysis/__init__.py
zhu8655/angr
c565292a2dd75a0eb77fad74a6b6dd2656216b1f
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/forward_analysis/__init__.py
zhu8655/angr
c565292a2dd75a0eb77fad74a6b6dd2656216b1f
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/forward_analysis/__init__.py
zhu8655/angr
c565292a2dd75a0eb77fad74a6b6dd2656216b1f
[ "BSD-2-Clause" ]
null
null
null
from .forward_analysis import ForwardAnalysis from .visitors import CallGraphVisitor, CFGVisitor, FunctionGraphVisitor, LoopVisitor, SingleNodeGraphVisitor
52
109
0.884615
13
156
10.538462
0.846154
0
0
0
0
0
0
0
0
0
0
0
0.076923
156
2
110
78
0.951389
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
ff157a1feedff5537bac5152d50006c2976f8cce
63
py
Python
practico_02/source/data/database.py
pablobots/frro-python-2021-00
1a3d6d80462e212aa724e6581baa68411b5d2240
[ "MIT" ]
null
null
null
practico_02/source/data/database.py
pablobots/frro-python-2021-00
1a3d6d80462e212aa724e6581baa68411b5d2240
[ "MIT" ]
14
2021-02-18T00:17:02.000Z
2021-03-22T12:53:01.000Z
practico_02/source/data/database.py
pablobots/frro-python-2021-00
1a3d6d80462e212aa724e6581baa68411b5d2240
[ "MIT" ]
1
2021-02-16T16:23:20.000Z
2021-02-16T16:23:20.000Z
print(f"Importaste con Éxito {__file__ }") name = "database"
12.6
42
0.698413
8
63
5
1
0
0
0
0
0
0
0
0
0
0
0
0.15873
63
4
43
15.75
0.754717
0
0
0
0
0
0.645161
0
0
0
0
0
0
1
0
false
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
1
0
null
0
0
0
0
0
0
0
0
1
0
0
1
0
5
206351b49f3f14433ceb7b67e68bd014fbdc7e79
89
py
Python
SimPEG/EM/Static/__init__.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
1
2020-03-17T11:24:15.000Z
2020-03-17T11:24:15.000Z
SimPEG/EM/Static/__init__.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
1
2020-10-29T11:42:21.000Z
2020-10-29T11:42:21.000Z
SimPEG/EM/Static/__init__.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
1
2021-01-14T08:33:45.000Z
2021-01-14T08:33:45.000Z
from . import DC from . import IP from . import SIP from . import SP from . import Utils
14.833333
19
0.719101
15
89
4.266667
0.466667
0.78125
0
0
0
0
0
0
0
0
0
0
0.224719
89
5
20
17.8
0.927536
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
207732bebf7885669d3d13ab3267ec05d06da86c
143
py
Python
src/pixies/species/__init__.py
shanqiaosong/pixies
d34abaa204903a6b83ec15d690eba1594e8472d4
[ "MIT" ]
2
2021-06-10T03:06:51.000Z
2021-06-14T19:25:10.000Z
src/pixies/species/__init__.py
shanqiaosong/pixies
d34abaa204903a6b83ec15d690eba1594e8472d4
[ "MIT" ]
null
null
null
src/pixies/species/__init__.py
shanqiaosong/pixies
d34abaa204903a6b83ec15d690eba1594e8472d4
[ "MIT" ]
null
null
null
from .Clicker import Clicker from .Resizer import Resizer from .Scroller import Scroller from .Toucher import Toucher from .Typer import Typer
23.833333
30
0.825175
20
143
5.9
0.35
0
0
0
0
0
0
0
0
0
0
0
0.13986
143
5
31
28.6
0.95935
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
20b504bc328d6db9390389571a8229b8ca56e574
75
py
Python
tutorials/install/turtlesim/lib/python3.8/site-packages/turtlesim/action/__init__.py
cclehui/study_ros
ecf7c258b561c4e6d6359471519e318c2ef888ae
[ "MIT" ]
3
2021-08-20T03:25:37.000Z
2022-03-31T02:47:28.000Z
tutorials/install/turtlesim/lib/python3.8/site-packages/turtlesim/action/__init__.py
cclehui/study_ros
ecf7c258b561c4e6d6359471519e318c2ef888ae
[ "MIT" ]
null
null
null
tutorials/install/turtlesim/lib/python3.8/site-packages/turtlesim/action/__init__.py
cclehui/study_ros
ecf7c258b561c4e6d6359471519e318c2ef888ae
[ "MIT" ]
null
null
null
from turtlesim.action._rotate_absolute import RotateAbsolute # noqa: F401
37.5
74
0.84
9
75
6.777778
1
0
0
0
0
0
0
0
0
0
0
0.044776
0.106667
75
1
75
75
0.865672
0.133333
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
20c6f1c4aeedf80c549ada5cbd5355635b93f1c4
406
py
Python
POO/arquivos-livro/09/Python3/duck_type/duckType.py
ell3a/estudos-python
09808a462aa3e73ad433501acb11f62217548af8
[ "MIT" ]
null
null
null
POO/arquivos-livro/09/Python3/duck_type/duckType.py
ell3a/estudos-python
09808a462aa3e73ad433501acb11f62217548af8
[ "MIT" ]
null
null
null
POO/arquivos-livro/09/Python3/duck_type/duckType.py
ell3a/estudos-python
09808a462aa3e73ad433501acb11f62217548af8
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # coding: utf-8 """ Exemplo de DuckType """ class Pato: def nadar(self): print("quack, quack, quack") def som(self): print('QUAAACCK !!! ') class PatinhoFeio: def nadar(self): print('Quãã...Quãã...') def som(self): print('Quãã... ') class Pluto: def som(self): print(' Au Au Au Au !!!') class Donald(Pato): pass
13.533333
36
0.53202
50
406
4.32
0.48
0.208333
0.138889
0.208333
0
0
0
0
0
0
0
0.006944
0.29064
406
29
37
14
0.743056
0.128079
0
0.333333
0
0
0.202899
0
0
0
0
0
0
1
0.333333
false
0.066667
0
0
0.6
0.333333
0
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
1
0
0
1
0
0
5
20ce362e8c5da7fc279be43787706a499ba48197
39
py
Python
nyc_data/nyc_data/settings/dev.py
nyccto-rapicastillo/nyc-ppe
e6d5ba45cf2815f7659298103d3b5bc7210ed8cf
[ "MIT" ]
3
2020-04-16T03:24:17.000Z
2020-09-11T22:12:31.000Z
nyc_data/nyc_data/settings/dev.py
nyccto-rapicastillo/nyc-ppe
e6d5ba45cf2815f7659298103d3b5bc7210ed8cf
[ "MIT" ]
47
2020-04-10T20:02:09.000Z
2021-09-08T02:05:09.000Z
nyc_data/nyc_data/settings/dev.py
nyccto-rapicastillo/nyc-ppe
e6d5ba45cf2815f7659298103d3b5bc7210ed8cf
[ "MIT" ]
1
2020-04-22T19:10:24.000Z
2020-04-22T19:10:24.000Z
from nyc_data.settings.common import *
19.5
38
0.820513
6
39
5.166667
1
0
0
0
0
0
0
0
0
0
0
0
0.102564
39
1
39
39
0.885714
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
20da66b8ce2f0bed9acb90be923d821adfa802c4
42
py
Python
tests/__init__.py
ACWI-SSWD/nldi_el_serv
35276014728662b1a9bdbbbf4790c562c1df760c
[ "CC0-1.0" ]
null
null
null
tests/__init__.py
ACWI-SSWD/nldi_el_serv
35276014728662b1a9bdbbbf4790c562c1df760c
[ "CC0-1.0" ]
1
2021-03-04T18:50:19.000Z
2021-03-04T18:50:19.000Z
tests/__init__.py
ACWI-SSWD/nldi_el_serv
35276014728662b1a9bdbbbf4790c562c1df760c
[ "CC0-1.0" ]
null
null
null
"""Unit test package for nldi_el_serv."""
21
41
0.714286
7
42
4
1
0
0
0
0
0
0
0
0
0
0
0
0.119048
42
1
42
42
0.756757
0.833333
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
45500572d152f09a8843bb92c098d9a9606cb03b
263
py
Python
entrypoint.py
MarkusPeitl/python_console_package
cc73658a54d2fa85126a8e8e3d58ec08693f34a5
[ "Apache-2.0" ]
null
null
null
entrypoint.py
MarkusPeitl/python_console_package
cc73658a54d2fa85126a8e8e3d58ec08693f34a5
[ "Apache-2.0" ]
null
null
null
entrypoint.py
MarkusPeitl/python_console_package
cc73658a54d2fa85126a8e8e3d58ec08693f34a5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """Simple Launcher useful when running application locally from this directory (not used in install)""" import sys import python_console_package.entrypoint if __name__ == '__main__': sys.exit(python_console_package.entrypoint.main())
29.222222
103
0.78327
35
263
5.542857
0.8
0.134021
0.206186
0.309278
0
0
0
0
0
0
0
0.00431
0.117871
263
9
104
29.222222
0.831897
0.452471
0
0
0
0
0.057554
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
455f8331d0b69286b0b8ab92968aeac452a51e19
83
py
Python
popol/cache/backends/__init__.py
aprilahijriyan/popol
5a0be69064ad35a8260f4524824960bc68f26890
[ "MIT" ]
null
null
null
popol/cache/backends/__init__.py
aprilahijriyan/popol
5a0be69064ad35a8260f4524824960bc68f26890
[ "MIT" ]
5
2022-03-05T12:55:27.000Z
2022-03-22T03:16:31.000Z
popol/cache/backends/__init__.py
aprilahijriyan/popol
5a0be69064ad35a8260f4524824960bc68f26890
[ "MIT" ]
null
null
null
from .base import BaseCacheBackend # noqa from .dummy import DummyBackend # noqa
27.666667
42
0.783133
10
83
6.5
0.7
0
0
0
0
0
0
0
0
0
0
0
0.168675
83
2
43
41.5
0.942029
0.108434
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
45c2d8f32c7f84e1682a93a4fd9606f00b3bad58
9,533
py
Python
NFLStatsbot/tests.py
rbhushans/nfl-statsbot
3bcdce6ed80abfe4ce12db9a272a86233abb9c35
[ "MIT" ]
4
2021-07-17T18:18:11.000Z
2022-02-14T12:27:05.000Z
NFLStatsbot/tests.py
rbhushans/nfl-statsbot
3bcdce6ed80abfe4ce12db9a272a86233abb9c35
[ "MIT" ]
null
null
null
NFLStatsbot/tests.py
rbhushans/nfl-statsbot
3bcdce6ed80abfe4ce12db9a272a86233abb9c35
[ "MIT" ]
1
2021-09-24T01:17:23.000Z
2021-09-24T01:17:23.000Z
from utils import random_stat, team_stat, player_stat, mention_parser, get_players, get_player_id, is_active # print(team_stat("bears", True, 2006, "touchdown")) # had 44 # print(team_stat("bears", False, 2006, "touchdown")) # allowed 32 # print(team_stat("cowboys", True, 2006, "touchdown")) # # print(team_stat("cowboys", False, 2006, "touchdown")) # print(team_stat("bears", True, None, "xyac_epa")) # print(team_stat("patriots", True, None, None)) # print(team_stat("patriots", False, None, None)) # print(team_stat("patriots", True, None, "fumble")) # print(team_stat("patriots", False, None, "fumble")) # print(team_stat("bears", True, 2020, None)) # print(team_stat("ravens", True, 2020, None)) # print(team_stat("bears", False, 2020, None)) # print(team_stat("ravens", True, 2020, "tot_yards")) # print(team_stat("ravens", False, 2020, "tot_yards")) # print(team_stat("ravens", True, 2020, "cmp_pct")) # print(team_stat("ravens", False, 2020, "cmp_pct")) # print(team_stat("ravens", True, 2020, "kick_distance")) # print(team_stat("ravens", False, 2020, "interception")) # print(team_stat("ravens", True, 2020, "interception")) # print(team_stat("ravens", False, 2020, "fumble")) # print(team_stat("ravens", True, 2020, "fumble")) # print(team_stat("ravens", False, 2020, "fumble_forced")) # print(team_stat("ravens", True, 2020, "fumble_forced")) # print(team_stat("ravens", False, 2020, "passing_yards")) # print(team_stat("ravens", True, 2020, "passing_yards")) # print(random_stat()) # print(player_stat("lamar jackson", 2020, "tot_yards")) # print(player_stat("aaron donald", 2020, "tot_yards")) # print(player_stat("lamar jackson", 2018, "cmp_pct")) # print(player_stat("lamar jackson", 2019, "cmp_pct")) # print(player_stat("lamar jackson", 2020, "cmp_pct")) # print(player_stat("lamar jackson", 2010, "passing_yards")) # print(player_stat("marlon humphrey", 2020, "fumble_forced")) # print(player_stat("chase claypool", 2010, "pass_touchdown")) # print(player_stat("chase claypool", 2020, "touchdown")) # print(player_stat("aaron rodgers", 2020, "passing_yards")) # print(player_stat("deshaun watson", 2018, "receiving_yards")) # print(player_stat("aaron donald", 2020, "cmp_pct")) # print(player_stat("marquise brown", 2020, "receiving_yards")) # print(player_stat("josh allen", 2020, "passing yards")) # print(player_stat("sam koch", None, "cmp_pct")) # print(player_stat("tom brady", 2020, "touchdown")) # print(player_stat("tua tagovailoa", 2020, "touchdown")) # print(player_stat("tom brady", 2020, "interception")) # print(player_stat("tua tagovailoa", 2020, "interception")) # print(player_stat("lamar jackson", 2020, "touchdown")) # print(player_stat("doug baldwin", 2017, "qb hit")) # print(player_stat("marlon humphrey", 2020, "qb hit")) # print(player_stat("lamar jackson", 2020, "qb hit")) # print(player_stat("doug baldwin", 2017, "tackle")) # print(player_stat("marlon humphrey", 2020, "tackle")) # print(player_stat("lamar jackson", 2020, "tackle")) # print(player_stat("doug baldwin", 2017, "sack")) # print(player_stat("marlon humphrey", 2020, "sack")) # print(player_stat("lamar jackson", 2020, "sack")) # print(player_stat("lamar jackson", 2010, "sack")) # print(player_stat("lamar jackson", 2010, "qb hit")) # print(player_stat("josh allen", 2020, "qb hit")) # print(player_stat("aaron donald", 2020, "qb hit")) # print(player_stat("russell wilson", 2020, "qb hit")) # print(player_stat("russell wilson", 1999, "qb hit")) # print(mention_parser("@nfl_statsbot epa/play, Tim Hightower, lamar jackson, 2010.")) # print(mention_parser("@nfl_statsbot epa, lamar jackson(db), josh allen (qb), 2019")) # print(mention_parser("@nfl_statsbot xyac epa/play, josh allen, 2020.")) # print(mention_parser("@nfl_statsbot qb epa/play, tom brady, 2013.")) # print(mention_parser("@nfl_statsbot air epa/play, Aaron Rodgers, 2018.")) # print(mention_parser("@nfl_statsbot xyac epa, josh allen, 2020.")) # print(mention_parser("@nfl_statsbot qb epa, tom brady, 2013.")) # print(mention_parser("@nfl_statsbot air epa, Aaron Rodgers, 2018.")) # print(mention_parser("@nfl_statsbot detroit lions, epa/play allowed, 2008")) # print(mention_parser("@nfl_statsbot lamar jackson (qb), epa/play, 2020")) # print(mention_parser("@nfl_statsbot lamar jackson (db), epa/play, 2020")) # print(mention_parser("@nfl_statsbot josh allen (qb), epa/play, 2020")) # print(team_stat("lions", False, 2008, "epa/play")) # print(player_stat("kurt vollers", 2004, "sack")) # print(player_stat("kurt vollers", 2004, "tackle")) # print(player_stat("kurt vollers", 2004, "qb_hit")) # print(player_stat("fred warner", 2020, "qb_hit")) # print(player_stat("fred warner", 2020, "fumble")) # print(player_stat("fred warner", 2020, "fumble_forced")) # print(player_stat("lamar jackson", 2019, "fumble")) # print(player_stat("kyler murray", 2019, "fumble_forced")) # # print(get_players(None)) # print(team_stat("texans", False, 1999, "rush")) # print(player_stat("julio jones", None, "interception")) # # print(player_stat("julio jones", 2020, "fumble")) # print(player_stat("lamar jackson", None, "interception")) # print(player_stat("tom brady", 2004, "rushing_yards")) # print(player_stat("marlon humphrey", 2019, "rushing_yards")) # print(player_stat("luke kuechly", 2016, "sack")) # print(player_stat("luke kuechly", 2016, "assist_tackle")) # print(player_stat("ronnie stanley", 2019, "penalty")) # print(player_stat("ronnie stanley", 2018, "penalty_yards")) # print(player_stat("lamar jackson", 2018, "fourth_down_converted", "qb")) # print(player_stat("lamar jackson", 2018, "fourth_down_converted")) # print(player_stat("lamar jackson", 2018, "fourth_down_converted", "db")) # print(player_stat("lamar jackson", 2018, "first_down_penalty", None)) # print(player_stat("sam koch", 2018, "cpoe")) # print(player_stat("saquon barkley", 2018, "cpoe")) # print(player_stat("marlon humphrey", 2018, "cpoe")) # print(player_stat("brandon williams", 2018, "cpoe")) # print(player_stat("mohamed sanu", 2018, "pass_attempt")) # print(player_stat("jarvis landry", 2020, "incomplete_pass")) # print(player_stat("tom brady", 2020, "reception")) # print(player_stat("tarik cohen", 2019, "tot_yards")) # print(player_stat("deshon elliott", 2020, "fumble_forced")) # print(player_stat("tarik cohen", 2019, "fumble_forced")) # print(player_stat("russell wilson", 2020, "sack")) # print(get_player_id("lamar jackson", 2020, "qb")) # print(get_player_id("lamar jackson", 2020, "db")) # print(get_player_id("lamar jackson", 2020, None)) # print(get_player_id("lamar jackson", 2020, None)) # print(get_player_id("lamar jackson", 2020, None)) # print(get_player_id("lamar jackson", 2020, "wr")) # print(get_player_id("lamar jackson", 2020, None)) # print(get_player_id("tom brady", 2004, None)) # text = "@nfl_statsbot lamar jackson (QB), lamar jackson (DB), lamar jackson (wr), lamar jackson (qb), josh allen, josh allen (de), epa/play, 2020" # msg = "" # play, team, year, cat, positions = mention_parser(text) # print("Parameters: ", str(play), str(team), str(year), str(cat), str(positions)) # err = False # if play == [None] and team == [None]: # print("Err 1") # elif team == [None] and cat == [None]: # msg = "That request was invalid! Make sure to use a valid category: https://github.com/rbhushans/nfl-statsbot/blob/master/data/cat_format.csv" # else: # i = 0 # for p in play: # if p == None: # break # for c in cat: # if err: # err = False # break # if c is not None and "_allowed" in c: # c = c.replace("_allowed", "") # for y in year: # try: # print("Calling stat with", p, y, c, positions[i]) # stat = player_stat(p, y, c, positions[i]) # i += 1 # except Exception as e: # print("Err 2:", e) # if stat == None: # continue # m = stat + "\n" # if len(msg) + len(m) > 280: # break # msg += m # if "did not play in the NFL" in stat or "rookies from the 2020 NFL season" in stat: # err = True # break # for t in team: # if t == None: # break # for c in cat: # if c is not None and "_allowed" in c: # off = False # c = c.replace("_allowed", "") # else: # off = True # for y in year: # try: # stat = team_stat(t, off, y, c) # except: # print("Err 3") # if stat == None: # continue # m = stat + "\n" # if len(msg) + len(m) > 280: # break # msg += m # print(msg) # print(mention_parser("@nfl_statsbot Stephon Gillmore, Interceptions, 2019")) # print(get_player_id("Jayson Oweh", 2021)) # print(is_active('00-0036940', None)) # print(player_stat("jayson oweh", 2020, "sack")) # print(player_stat("jayson oweh", 2021, "sack")) # print(player_stat("rondale moore", 2021, "receiving yards")) # print(player_stat("jayson oweh", None, "sack")) # print(player_stat("josh allen", 2020, "passing yards")) # print(player_stat("lamar jackson", 2021, "rushing yards", "QB")) # print(mention_parser("josh allen, passing yards, 2019, 2020"))
50.439153
148
0.642715
1,268
9,533
4.667192
0.160095
0.126732
0.185029
0.060831
0.730314
0.572491
0.345218
0.197364
0.132815
0.09902
0
0.06298
0.180531
9,533
189
149
50.439153
0.694572
0.949124
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
45e482de4ed381369e5ea78def3834a505b78a81
112
py
Python
ballistics/dynamics/constraintsolver/__init__.py
flupke/ballistics
844ef7dd9fd55f6f7d0be04df6b564beaa5aaa1a
[ "Zlib" ]
null
null
null
ballistics/dynamics/constraintsolver/__init__.py
flupke/ballistics
844ef7dd9fd55f6f7d0be04df6b564beaa5aaa1a
[ "Zlib" ]
null
null
null
ballistics/dynamics/constraintsolver/__init__.py
flupke/ballistics
844ef7dd9fd55f6f7d0be04df6b564beaa5aaa1a
[ "Zlib" ]
1
2020-04-29T13:52:31.000Z
2020-04-29T13:52:31.000Z
from ballistics.dynamics.constraintsolver.sequential_impulse import \ SequentialImpulseConstraintSolver
37.333333
69
0.848214
8
112
11.75
1
0
0
0
0
0
0
0
0
0
0
0
0.116071
112
2
70
56
0.949495
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
b3148a749ba5357594289438185302e0a9a9febf
494
py
Python
scripts/hw_gnare.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
null
null
null
scripts/hw_gnare.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
null
null
null
scripts/hw_gnare.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
1
2019-10-24T06:45:21.000Z
2019-10-24T06:45:21.000Z
# Hello World Script by Galen Nare GREEN = '\033[92m' strings = [ '# # #### # # ####', '# # # # # # #', '#### ### # # # #', '# # # # # # #', '# # #### ### ### ####', ' ', '# # #### ### # ### ', '# # # # # # # # #', '# # # # ### # # #', '# # # # # # # # # #', ' # # #### # # ### ###' ] for line in strings: print GREEN + line
27.444444
35
0.151822
17
494
4.411765
0.823529
0
0
0
0
0
0
0
0
0
0
0.022026
0.540486
494
17
36
29.058824
0.30837
0.064777
0
0.25
0
0
0.658696
0
0
0
0
0
0
0
null
null
0
0
null
null
0.0625
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
b329c598e597c68a9ade046c4d6bc83a3f91f4b6
546
py
Python
stubs/micropython-esp32-1_13-103/dht.py
RonaldHiemstra/micropython-stubs
d97f879b01f6687baaebef1c7e26a80909c3cff3
[ "MIT" ]
38
2020-10-18T21:59:44.000Z
2022-03-17T03:03:28.000Z
stubs/micropython-esp32-1_13-103/dht.py
RonaldHiemstra/micropython-stubs
d97f879b01f6687baaebef1c7e26a80909c3cff3
[ "MIT" ]
176
2020-10-18T14:31:03.000Z
2022-03-30T23:22:39.000Z
stubs/micropython-esp32-1_13-103/dht.py
RonaldHiemstra/micropython-stubs
d97f879b01f6687baaebef1c7e26a80909c3cff3
[ "MIT" ]
6
2020-12-28T21:11:12.000Z
2022-02-06T04:07:50.000Z
""" Module: 'dht' on esp32 1.13.0-103 """ # MCU: (sysname='esp32', nodename='esp32', release='1.13.0', version='v1.13-103-gb137d064e on 2020-10-09', machine='ESP32 module (spiram) with ESP32') # Stubber: 1.3.4 class DHT11: '' def humidity(): pass def measure(): pass def temperature(): pass class DHT22: '' def humidity(): pass def measure(): pass def temperature(): pass class DHTBase: '' def measure(): pass def dht_readinto(): pass
14
150
0.545788
67
546
4.432836
0.507463
0.117845
0.141414
0.171717
0.350168
0.350168
0.350168
0.350168
0.350168
0.350168
0
0.126649
0.305861
546
38
151
14.368421
0.656992
0.362637
0
0.818182
0
0
0
0
0
0
0
0
0
1
0.363636
true
0.363636
0
0
0.5
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
1
1
0
0
0
0
0
5
b3364963c8f71a845a8bd1f629fcad502c75ddf9
34
py
Python
src/ecs/components/blockingcomponent.py
joehowells/critical-keep
4aba3322a8582a2d06ab0d4b67028738249669e9
[ "MIT" ]
1
2019-04-27T22:39:33.000Z
2019-04-27T22:39:33.000Z
src/ecs/components/blockingcomponent.py
joehowells/critical-keep
4aba3322a8582a2d06ab0d4b67028738249669e9
[ "MIT" ]
null
null
null
src/ecs/components/blockingcomponent.py
joehowells/critical-keep
4aba3322a8582a2d06ab0d4b67028738249669e9
[ "MIT" ]
null
null
null
class BlockingComponent: pass
11.333333
24
0.764706
3
34
8.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.205882
34
2
25
17
0.962963
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
2fb11514eb9ba1ba2c7759ab5196a9c14084f3fe
11,216
py
Python
spider/spiders/lib/elasticsearch_util.py
panjf2000/news_spider
b6a01c7abfb3578e85582cd51d515a2b81b3a024
[ "Apache-2.0" ]
5
2018-07-10T02:43:46.000Z
2021-03-29T01:17:34.000Z
spider/spiders/lib/elasticsearch_util.py
panjf2000/news_spider
b6a01c7abfb3578e85582cd51d515a2b81b3a024
[ "Apache-2.0" ]
null
null
null
spider/spiders/lib/elasticsearch_util.py
panjf2000/news_spider
b6a01c7abfb3578e85582cd51d515a2b81b3a024
[ "Apache-2.0" ]
2
2018-02-11T02:23:41.000Z
2019-01-26T06:57:19.000Z
#!/usr/bin/python # coding: utf-8 import sys from elasticsearch import Elasticsearch from elasticsearch import helpers from elasticsearch.exceptions import * reload(sys) sys.setdefaultencoding('utf-8') sys.path.append('..') from spider import settings import es_instance INDEX = 'news' if settings.ES_HOST is not None: es = es_instance.es_instance() else: es = Elasticsearch() def index_doc(_index=INDEX, _type=None, _id=None, _doc=None): if _type and _doc: if _id: res = es.index(index=_index, doc_type=_type, id=_id, body=_doc, refresh=True) else: res = es.index(index=_index, doc_type=_type, body=_doc, refresh=True) return res def update_doc(_index=INDEX, _type=None, _id=None, _doc=None): if _type and _doc: if _id: res = es.update(index=_index, doc_type=_type, id=_id, body=_doc, refresh=True) else: return None return res def delete_doc(_index=INDEX, _type=None, _id=None): if _type and _id: res = es.delete(index=_index, doc_type=_type, id=_id, refresh=True) else: return None return res def streaming_bulk(actions, stat_only=False): try: success, failed = helpers.bulk(es, actions, stat_only) except TransportError as e: trys = 3 while trys: try: success, failed = helpers.bulk(es, actions, stat_only) break except TransportError as e: trys -= 1 continue if trys <= 0: raise e except ConnectionTimeout: trys = 3 while trys: try: success, failed = helpers.bulk(es, actions, stat_only) break except ConnectionTimeout as e: trys -= 1 continue if trys <= 0: raise e return success, failed def parallel_bulk(actions, thread_size=5, doc_size=500, max_bytes=100 * 1024 * 1024): success, failed = 0, 0 try: for ok, item in helpers.parallel_bulk(es, actions, thread_count=thread_size, chunk_size=doc_size, max_chunk_bytes=max_bytes): # go through request-reponse pairs and detect failures if not ok: failed += 1 else: success += 1 except TransportError as e: trys = 3 while trys: try: for ok, item in helpers.parallel_bulk(es, actions, thread_count=thread_size, chunk_size=doc_size, max_chunk_bytes=max_bytes): # go through request-reponse pairs and detect failures if not ok: failed += 1 else: success += 1 break except TransportError as e: trys -= 1 continue if trys <= 0: raise e except ConnectionTimeout: trys = 3 while trys: try: for ok, item in helpers.parallel_bulk(es, actions, thread_count=thread_size, chunk_size=doc_size, max_chunk_bytes=max_bytes): # go through request-reponse pairs and detect failures if not ok: failed += 1 else: success += 1 break except ConnectionTimeout as e: trys -= 1 continue if trys <= 0: raise e return success, failed def get_doc(_index=INDEX, _type=None, _id=None): if _index and _id: try: res = es.get_source(index=_index, type=_type, id=_id) return res except ConnectionTimeout as e: raise e except Exception as e: raise e def search_doc_struct_exact(_index=INDEX, _type=None, term={}, start=0, size=20): if _type and term: if len(term) == 1: _body = { "from": start, "size": size, "query": { "filtered": { "query": { "match_all": {} }, "filter": { "term": { term.keys()[0]: term.values()[0] } } } } } else: must_list = [] for k, v in term.items(): must_list.append({"term": {k: v}}) _body = { "from": start, "size": size, "query": { "filtered": { "query": { "match_all": {} }, "filter": { "bool": { "must": must_list } } } } } try: res = es.search(index=_index, doc_type=_type, body=_body) return res except ConnectionTimeout as e: raise e except Exception as e: raise e def search_doc_struct_mulexcat(_index=INDEX, _type=None, terms={}, start=0, size=20): if _type and terms: if len(terms) == 1: _body = { "from": start, "size": size, "query": { "filtered": { "filter": { "terms": { terms.keys()[0]: terms.values()[0] } } } } } else: must_list = [] for k, v in terms.items(): must_list.append({"term": {k: v}}) _body = { "from": start, "size": size, "query": { "filtered": { "query": { "match_all": {} }, "filter": { "bool": { "must": must_list } } } } } try: res = es.search(index=_index, doc_type=_type, body=_body) return res except ConnectionTimeout as e: raise e except Exception as e: raise e def search_doc_struct_range(_index=INDEX, _type=None, range={}, start=0, size=20): if _type and range: if len(range) == 1: _body = { "from": start, "size": size, "query": { "filtered": { "filter": { "range": { range.keys()[0]: range.values()[0] } } } } } else: must_list = [] for k, v in range.items(): must_list.append({"range": {k: v}}) _body = { "from": start, "size": size, "query": { "filtered": { "query": { "match_all": {} }, "filter": { "bool": { "must": must_list } } } } } try: res = es.search(index=_index, doc_type=_type, body=_body) return res except ConnectionTimeout as e: raise e except Exception as e: raise e def search_doc_fulltext_match(_index=INDEX, _type=None, match={}, start=0, size=20): if _type and match: if len(match) == 1: _body = { "from": start, "size": size, "query": { "match": { match.keys()[0]: match.values()[0] } } } else: match_list = [] for k, v in match: match_list.append({"match": {k: v}}) _body = { "from": start, "size": size, "query": { "bool": { "must": match_list } } } try: res = es.search(index=_index, doc_type=_type, body=_body) return res except ConnectionTimeout as e: raise e except Exception as e: raise e def search_doc_fulltext_com(_index=INDEX, _type=None, keyword='', fields=[], terms={}, start=0, size=20): if _type and keyword and fields: if terms: must_list = [] for k, v in terms.items(): must_list.append({"term": {k: v}}) _body = { "from": start, "size": size, "query": { "filtered": { "query": { "multi_match": { "query": keyword, "type": "best_fields", "fields": fields, "tie_breaker": 0.3, "minimum_should_match": "80%" } }, "filter": { "bool": { "must": must_list } } } } } else: _body = { "from": start, "size": size, "query": { "multi_match": { "query": keyword, "type": "best_fields", "fields": fields, "tie_breaker": 0.3, "minimum_should_match": "80%" } } } try: res = es.search(index=_index, doc_type=_type, body=_body) return res except ConnectionTimeout as e: raise e except Exception as e: raise e def search_doc_complex(_index=INDEX, _type=None, query={}): if _type and query: _body = query try: res = es.search(index=_index, doc_type=_type, body=_body) return res except ConnectionTimeout as e: raise e except Exception as e: raise e
29.208333
113
0.389889
979
11,216
4.276813
0.124617
0.054932
0.026749
0.030093
0.768808
0.760927
0.754956
0.72749
0.671603
0.615476
0
0.013358
0.519437
11,216
383
114
29.284595
0.763451
0.016851
0
0.670659
0
0
0.047451
0
0
0
0
0
0
1
0.035928
false
0
0.017964
0
0.095808
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2fbcdc3193a88118148c99989801d6cd7d7a8837
25
py
Python
ssh_keyword/__init__.py
befabri/ssh-keyword
27715ea025a8baa83657bc36514d853efb8accff
[ "MIT" ]
1
2020-02-05T00:29:54.000Z
2020-02-05T00:29:54.000Z
ssh_keyword/__init__.py
befabri/ssh-keyword
27715ea025a8baa83657bc36514d853efb8accff
[ "MIT" ]
null
null
null
ssh_keyword/__init__.py
befabri/ssh-keyword
27715ea025a8baa83657bc36514d853efb8accff
[ "MIT" ]
null
null
null
from ssh_keyword import *
25
25
0.84
4
25
5
1
0
0
0
0
0
0
0
0
0
0
0
0.12
25
1
25
25
0.909091
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
2fce6f465db1bb252b9ba3747ecce8cb0245cbf6
703
py
Python
hubcheck/utils/__init__.py
codedsk/hubcheck
2ff506eb56ba00f035300862f8848e4168452a17
[ "MIT" ]
1
2016-02-13T13:42:23.000Z
2016-02-13T13:42:23.000Z
hubcheck/utils/__init__.py
codedsk/hubcheck
2ff506eb56ba00f035300862f8848e4168452a17
[ "MIT" ]
null
null
null
hubcheck/utils/__init__.py
codedsk/hubcheck
2ff506eb56ba00f035300862f8848e4168452a17
[ "MIT" ]
null
null
null
from .record import WebRecordXvfb from .xvfbview import XvfbView from .decorators import hub_version, \ tool_container_version, \ check_hub_version, check_hub_hostname from .utilities import which, get_css_path, \ count_connection_types, href_normalize, \ switch_netloc, create_dictConfig, \ is_port_listening, cleanup_temporary_files, \ email_report __all__ = [ 'WebRecordXvfb', 'XvfbView', 'hub_version', 'tool_container_version', 'check_hub_version', 'check_hub_hostname', 'which', 'get_css_path', 'count_connection_types', 'href_normalize', 'switch_netloc', 'create_dictConfig', 'is_port_listening', 'cleanup_temporary_files', 'email_report' ]
30.565217
72
0.751067
81
703
6
0.432099
0.082305
0.123457
0.09465
0.757202
0.757202
0.757202
0.757202
0.757202
0.757202
0
0
0.152205
703
22
73
31.954545
0.815436
0
0
0
0
0
0.319544
0.095578
0
0
0
0
0
1
0
false
0
0.210526
0
0.210526
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
2fd09f8c6b0dbc49b8abdd218c90159ea6587454
99
py
Python
tccli/services/facefusion/__init__.py
zqfan/tencentcloud-cli
b6ad9fced2a2b340087e4e5522121d405f68b615
[ "Apache-2.0" ]
47
2018-05-31T11:26:25.000Z
2022-03-08T02:12:45.000Z
tccli/services/facefusion/__init__.py
zqfan/tencentcloud-cli
b6ad9fced2a2b340087e4e5522121d405f68b615
[ "Apache-2.0" ]
23
2018-06-14T10:46:30.000Z
2022-02-28T02:53:09.000Z
tccli/services/facefusion/__init__.py
zqfan/tencentcloud-cli
b6ad9fced2a2b340087e4e5522121d405f68b615
[ "Apache-2.0" ]
22
2018-10-22T09:49:45.000Z
2022-03-30T08:06:04.000Z
# -*- coding: utf-8 -*- from tccli.services.facefusion.facefusion_client import action_caller
24.75
69
0.737374
12
99
5.916667
0.916667
0
0
0
0
0
0
0
0
0
0
0.011765
0.141414
99
4
70
24.75
0.823529
0.212121
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
64292af8f197bd23e4a5464dc6615c055085aefb
69
py
Python
gnucash_reports/configuration/__init__.py
MeerkatLabs/gnucash-reporting
109e06be3625ad7a106db989ce7047998639ce34
[ "BSD-3-Clause" ]
null
null
null
gnucash_reports/configuration/__init__.py
MeerkatLabs/gnucash-reporting
109e06be3625ad7a106db989ce7047998639ce34
[ "BSD-3-Clause" ]
10
2017-10-22T20:55:19.000Z
2017-12-19T04:50:43.000Z
gnucash_reports/configuration/__init__.py
MeerkatLabs/gnucash-reporting
109e06be3625ad7a106db989ce7047998639ce34
[ "BSD-3-Clause" ]
1
2016-03-01T18:59:58.000Z
2016-03-01T18:59:58.000Z
from gnucash_reports.configuration.base import configure_application
34.5
68
0.913043
8
69
7.625
1
0
0
0
0
0
0
0
0
0
0
0
0.057971
69
1
69
69
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
ff273ec3a7664d428ecb7245cff8ec1bbabf367f
38
py
Python
wsgi.py
Cjwpython/WordlessBook
3426ccf3ab2f8848caef98bbc7635407774d32b2
[ "MIT" ]
2
2021-05-19T10:53:25.000Z
2022-01-20T01:20:08.000Z
wsgi.py
Cjwpython/WordlessBook
3426ccf3ab2f8848caef98bbc7635407774d32b2
[ "MIT" ]
null
null
null
wsgi.py
Cjwpython/WordlessBook
3426ccf3ab2f8848caef98bbc7635407774d32b2
[ "MIT" ]
1
2022-01-20T01:19:56.000Z
2022-01-20T01:19:56.000Z
# coding: utf-8 from apps import app
9.5
20
0.710526
7
38
3.857143
1
0
0
0
0
0
0
0
0
0
0
0.033333
0.210526
38
3
21
12.666667
0.866667
0.342105
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
ff5771c8c8c46c49e8fc44585118d576921f74b8
2,127
py
Python
tests/sentry/tasks/check_update/tests.py
erhuabushuo/sentry
8b3bad10155aaacfdff80910e5972e64304e880c
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/tasks/check_update/tests.py
erhuabushuo/sentry
8b3bad10155aaacfdff80910e5972e64304e880c
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/tasks/check_update/tests.py
erhuabushuo/sentry
8b3bad10155aaacfdff80910e5972e64304e880c
[ "BSD-3-Clause" ]
null
null
null
import json from mock import patch from sentry import options from sentry.testutils import TestCase from sentry.receivers import set_sentry_version from sentry.tasks.check_update import check_update, PYPI_URL class CheckUpdateTest(TestCase): OLD = '5.0.0' CURRENT = '5.5.0-DEV' NEW = '1000000000.5.1' KEY = 'sentry:latest_version' @patch('sentry.tasks.check_update.safe_urlopen') @patch('sentry.tasks.check_update.safe_urlread') def test_run_check_update_task(self, safe_urlread, safe_urlopen): safe_urlread.return_value = json.dumps({'info': {'version': self.NEW}}) check_update() # latest_version > current_version safe_urlopen.assert_called_once_with(PYPI_URL) safe_urlread.assert_called_once_with(safe_urlopen.return_value) self.assertEqual(options.get(key=self.KEY), self.NEW) @patch('sentry.tasks.check_update.safe_urlopen') @patch('sentry.tasks.check_update.safe_urlread') def test_run_check_update_task_with_bad_response(self, safe_urlread, safe_urlopen): safe_urlread.return_value = '' check_update() # latest_version == current_version safe_urlopen.assert_called_once_with(PYPI_URL) safe_urlread.assert_called_once_with(safe_urlopen.return_value) self.assertEqual(options.get(key=self.KEY), '') def test_set_sentry_version_empty_latest(self): set_sentry_version(latest=self.NEW) self.assertEqual(options.get(key=self.KEY), self.NEW) @patch('sentry.get_version') def test_set_sentry_version_new(self, get_version): options.set(self.KEY, self.OLD) get_version.return_value = self.CURRENT set_sentry_version(latest=self.NEW) self.assertEqual(options.get(key=self.KEY), self.NEW) @patch('sentry.get_version') def test_set_sentry_version_old(self, get_version): options.set(self.KEY, self.NEW) get_version.return_value = self.CURRENT set_sentry_version(latest=self.OLD) self.assertEqual(options.get(key=self.KEY), self.NEW)
31.746269
79
0.70898
286
2,127
4.965035
0.174825
0.054225
0.078873
0.077465
0.766197
0.75
0.75
0.75
0.700704
0.603521
0
0.010435
0.188999
2,127
66
80
32.227273
0.812754
0.03103
0
0.465116
0
0
0.120505
0.084062
0
0
0
0
0.209302
1
0.116279
false
0
0.139535
0
0.372093
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
ff5b729592622fea68d797a350519bca5ede1634
115
py
Python
Main/admin.py
DarshanDeshpande/Instagram-Bot-Reporter
15830b309325b2c8137df51b031d5ee2eddd28bf
[ "Apache-2.0" ]
2
2020-12-29T20:02:52.000Z
2021-09-20T06:42:01.000Z
Main/admin.py
DarshanDeshpande/Instagram-Bot-Reporter
15830b309325b2c8137df51b031d5ee2eddd28bf
[ "Apache-2.0" ]
null
null
null
Main/admin.py
DarshanDeshpande/Instagram-Bot-Reporter
15830b309325b2c8137df51b031d5ee2eddd28bf
[ "Apache-2.0" ]
2
2020-12-29T13:53:45.000Z
2021-09-20T06:42:02.000Z
from django.contrib import admin from .models import Bots # Register your models here. admin.site.register(Bots)
28.75
33
0.791304
17
115
5.352941
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.13913
115
4
34
28.75
0.919192
0.226087
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
ff83c4df6e032c5b2f459de3a640ae2406b16c2d
505
py
Python
parseridge/parser/training/callbacks/__init__.py
jgontrum/parseridge
f87ef82a9468addeb09a91c3b5310db38840bf0f
[ "Apache-2.0" ]
6
2019-10-06T23:00:29.000Z
2020-04-08T02:04:24.000Z
parseridge/parser/training/callbacks/__init__.py
jgontrum/parseridge
f87ef82a9468addeb09a91c3b5310db38840bf0f
[ "Apache-2.0" ]
2
2020-04-28T12:06:23.000Z
2020-04-28T13:30:03.000Z
parseridge/parser/training/callbacks/__init__.py
jgontrum/parseridge
f87ef82a9468addeb09a91c3b5310db38840bf0f
[ "Apache-2.0" ]
1
2019-12-23T00:53:38.000Z
2019-12-23T00:53:38.000Z
# flake8: noqa from .evaluation_callback import EvaluationCallback from .gradient_clipping_callback import GradientClippingCallback from .learning_rate_finder_callback import LearningRateFinderCallback from .lr_scheduler_callback import LRSchedulerCallback from .partial_freeze_embeddings_callback import PartialFreezeEmbeddingsCallback from .progress_bar_callback import ProgressBarCallback from .save_model_callback import SaveModelCallback from .simple_logger_callback import TrainSimpleLoggerCallback
50.5
79
0.910891
51
505
8.686275
0.588235
0.252822
0
0
0
0
0
0
0
0
0
0.002128
0.069307
505
9
80
56.111111
0.940426
0.023762
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
ff8878c75ec4c66915c65f865ae76f629e41e677
35
py
Python
django_sql_dashboard/__init__.py
admariner/django-sql-dashboard
59b71ea470f3bfa0be45abddf912ac3890c9308f
[ "Apache-2.0" ]
293
2021-03-13T04:46:29.000Z
2022-03-19T17:40:04.000Z
django_sql_dashboard/__init__.py
admariner/django-sql-dashboard
59b71ea470f3bfa0be45abddf912ac3890c9308f
[ "Apache-2.0" ]
143
2021-03-13T04:12:00.000Z
2022-03-28T09:25:32.000Z
django_sql_dashboard/__init__.py
admariner/django-sql-dashboard
59b71ea470f3bfa0be45abddf912ac3890c9308f
[ "Apache-2.0" ]
26
2021-03-15T00:06:46.000Z
2022-03-29T01:39:41.000Z
urls = "django_sql_dashboard.urls"
17.5
34
0.8
5
35
5.2
0.8
0
0
0
0
0
0
0
0
0
0
0
0.085714
35
1
35
35
0.8125
0
0
0
0
0
0.714286
0.714286
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
442be54f5a006ac4cef5b54db3848e9983deb3d7
178
py
Python
schoolmanagement/settings/production.py
lawalkeyd/school_management_system
5ae2a562b23228e602e112c96e5854c8cf5ec89e
[ "MIT" ]
null
null
null
schoolmanagement/settings/production.py
lawalkeyd/school_management_system
5ae2a562b23228e602e112c96e5854c8cf5ec89e
[ "MIT" ]
null
null
null
schoolmanagement/settings/production.py
lawalkeyd/school_management_system
5ae2a562b23228e602e112c96e5854c8cf5ec89e
[ "MIT" ]
null
null
null
from base import * PAYSTACK_PUBLIC_KEY = os.getenv('PAYSTACK_PUBLIC_KEY') PAYSTACK_SCRET_KEY = os.getenv('PAYSTACK_SCRET_KEY') ALLOWED_HOSTS = ['concordsmstest.herokuapp.com']
25.428571
54
0.803371
24
178
5.583333
0.583333
0.208955
0.253731
0.283582
0
0
0
0
0
0
0
0
0.08427
178
7
55
25.428571
0.822086
0
0
0
0
0
0.365169
0.157303
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
44974f91334d6c8a8dab542ba947430776e6eaba
149
py
Python
tensor__cpu/http/ss.py
Zhang-O/small
bfb41b2267159bd5e408dba524713d3bc0b28074
[ "MIT" ]
1
2017-09-25T03:16:00.000Z
2017-09-25T03:16:00.000Z
tensor__cpu/http/ss.py
Zhang-O/small
bfb41b2267159bd5e408dba524713d3bc0b28074
[ "MIT" ]
null
null
null
tensor__cpu/http/ss.py
Zhang-O/small
bfb41b2267159bd5e408dba524713d3bc0b28074
[ "MIT" ]
null
null
null
ss = '0310201274_PAPER-934712-QT-742440_QT-742440ans.mp3' path = './A-1000/'+ss print(path) with open(path,'rb') as f: print(f) print('ok')
18.625
57
0.651007
25
149
3.8
0.72
0.126316
0
0
0
0
0
0
0
0
0
0.259843
0.147651
149
7
58
21.285714
0.488189
0
0
0
0
0
0.425676
0.337838
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
923a1118eb6636bc886bceb159fb7186d6630576
16,650
py
Python
unit_test/cvs_test.py
AYCS/bigitr
6beefbe79fab887c4ef60e0dd7fa39bca61a22cc
[ "Apache-2.0" ]
3
2016-07-19T07:54:27.000Z
2021-09-13T08:25:20.000Z
unit_test/cvs_test.py
AYCS/bigitr
6beefbe79fab887c4ef60e0dd7fa39bca61a22cc
[ "Apache-2.0" ]
1
2016-02-03T14:17:47.000Z
2016-02-03T15:22:20.000Z
unit_test/cvs_test.py
mikjo/bigitr
6beefbe79fab887c4ef60e0dd7fa39bca61a22cc
[ "Apache-2.0" ]
4
2015-05-04T10:03:06.000Z
2020-10-22T04:46:38.000Z
# # Copyright 2012 SAS Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # from cStringIO import StringIO import mock import os import tempfile import testutils from bigitr import cvs, shell, context, util class TestCVS(testutils.TestCase): def setUp(self): self.dir = tempfile.mkdtemp(suffix='.bigitr') self.cdir = tempfile.mkdtemp(suffix='.bigitr') self.fdir = '%s/repo/brnch/Loc' %self.cdir os.makedirs(self.fdir) if 'CVSROOT' in os.environ: self.cvsroot = os.environ['CVSROOT'] else: self.cvsroot = None os.unsetenv('CVSROOT') with mock.patch('bigitr.log.Log') as mocklog: appConfig = StringIO('[global]\n' 'logdir = /logs\n' 'gitdir = %s\n' '[export]\n' 'cvsdir = %s\n' %(self.dir, self.cdir)) repConfig = StringIO('[GLOBAL]\n' '[repo]\n' 'cvsroot = asdf\n' 'cvspath = Some/Loc\n' 'prehook.cvs = precommand arg\n' 'posthook.cvs = postcommand arg\n' 'prehook.cvs.brnch = precommand brnch\n' 'posthook.cvs.brnch = postcommand brnch\n' '\n') self.ctx = context.Context(appConfig, repConfig) self.cvs = cvs.CVS(self.ctx, 'repo', 'brnch') self.mocklog = mocklog() def tearDown(self): self.removeRecursive(self.dir) self.removeRecursive(self.cdir) if self.cvsroot: os.environ['CVSROOT'] = self.cvsroot else: os.unsetenv('CVSROOT') def test_setEnvironment(self): self.cvs.setEnvironment() self.assertEqual(os.environ['CVSROOT'], self.ctx.getCVSRoot('repo')) def test_listContentFiles(self): fdir = '%s/repo/brnch/Loc' %self.cdir cdir = '%s/CVS' %fdir os.makedirs(cdir) os.makedirs(fdir+'/dir') file(cdir+'/ignoreme', 'w') file(fdir+'/includeme', 'w') file(fdir+'/dir/metoo', 'w') files = self.cvs.listContentFiles() self.assertEqual(files, ['includeme', 'dir/metoo']) def test_export(self): with mock.patch('bigitr.git.shell.run'): self.cvs.export('targetdir') shell.run.assert_called_once_with(mock.ANY, 'cvs', 'export', '-kk', '-d', 'targetdir', '-D', 'now', '-r', 'brnch', 'Some/Loc') self.assertEqual(os.environ['CVSROOT'], self.ctx.getCVSRoot('repo')) def test_checkout(self): with mock.patch('bigitr.git.shell.run'): with mock.patch.multiple('os', getcwd=mock.DEFAULT, chdir=mock.DEFAULT): self.cvs.checkout() shell.run.assert_called_once_with(mock.ANY, 'cvs', 'checkout', '-kk', '-d', 'Loc', '-r', 'brnch', 'Some/Loc') self.assertEqual(os.environ['CVSROOT'], self.ctx.getCVSRoot('repo')) def test_infoDiff(self): with mock.patch('bigitr.git.shell.run'): with mock.patch.multiple('os', getcwd=mock.DEFAULT, chdir=mock.DEFAULT): self.cvs.infoDiff() shell.run.assert_called_once_with(mock.ANY, 'cvs', 'diff', error=False) os.getcwd.assert_called_once_with() self.assertEqual(os.chdir.call_count, 2) os.chdir.assert_any_call(os.getcwd()) os.chdir.assert_any_call('%s/repo/brnch/Loc' %self.cdir) def test_update(self): with mock.patch('bigitr.git.shell.run'): with mock.patch.multiple('os', getcwd=mock.DEFAULT, chdir=mock.DEFAULT): self.cvs.update() shell.run.assert_called_once_with(mock.ANY, 'cvs', 'update', '-kk', '-d') os.getcwd.assert_called_once_with() self.assertEqual(os.chdir.call_count, 2) os.chdir.assert_any_call(os.getcwd()) os.chdir.assert_any_call('%s/repo/brnch/Loc' %self.cdir) def test_deleteFiles(self): with mock.patch('bigitr.git.shell.run'): with mock.patch.multiple('os', getcwd=mock.DEFAULT, chdir=mock.DEFAULT, remove=mock.DEFAULT): self.cvs.deleteFiles(['/a', '/b/c', '/b/d']) shell.run.assert_called_once_with(mock.ANY, 'cvs', 'remove', '/a', '/b/c', '/b/d') os.getcwd.assert_called_once_with() self.assertEqual(os.chdir.call_count, 2) os.chdir.assert_any_call(os.getcwd()) os.chdir.assert_any_call('%s/repo/brnch/Loc' %self.cdir) self.assertEqual(os.remove.call_count, 3) os.remove.assert_has_calls([ mock.call('/a'), mock.call('/b/c'), mock.call('/b/d'), ]) def test_deleteFilesEmpty(self): with mock.patch('bigitr.git.shell.run'): with mock.patch.multiple('os', getcwd=mock.DEFAULT, chdir=mock.DEFAULT, remove=mock.DEFAULT): self.cvs.deleteFiles([]) self.assertFalse(shell.run.called) self.assertFalse(os.remove.called) def test_copyFiles(self): with mock.patch('bigitr.util.copyFiles'): fileList = ['/a', '/b', '/dir/metoo'] self.cvs.copyFiles(self.dir, fileList) util.copyFiles.assertCalled(self.dir, self.cvs.path, fileList) def test_copyFilesEmpty(self): with mock.patch('os.path.exists'): self.cvs.copyFiles('/ignore', []) self.assertFalse(os.path.exists.called) def test_addDirectories(self): with mock.patch('bigitr.git.shell.run'): with mock.patch('os.path.exists'): # if CVS directories exist os.path.exists.return_value = True self.cvs.addDirectories(['a', 'b', 'dir/metoo']) self.assertFalse(shell.run.called) # if CVS directories do not exist os.path.exists.return_value = False self.cvs.addDirectories(['a', 'b', 'dir/metoo']) shell.run.assert_has_calls([ mock.call(mock.ANY, 'cvs', 'add', 'a'), mock.call(mock.ANY, 'cvs', 'add', 'b'), mock.call(mock.ANY, 'cvs', 'add', 'dir'), mock.call(mock.ANY, 'cvs', 'add', 'dir/metoo'), ]) shell.run.reset_mock() # make sure absolute paths do not recurse os.path.exists.return_value = False self.cvs.addDirectories(['/a', '/b', '/dir/metoo']) shell.run.assert_has_calls([ mock.call(mock.ANY, 'cvs', 'add', '/a'), mock.call(mock.ANY, 'cvs', 'add', '/b'), mock.call(mock.ANY, 'cvs', 'add', '/dir'), mock.call(mock.ANY, 'cvs', 'add', '/dir/metoo'), ]) def test_addFiles(self): with mock.patch('bigitr.git.shell.run'): self.cvs.addFiles(['/a', '/b', '/dir/metoo']) shell.run.assert_called_once_with(mock.ANY, 'cvs', 'add', '-kk', '/a', '/b', '/dir/metoo') def test_addFilesEmpty(self): with mock.patch('bigitr.git.shell.run'): self.cvs.addFiles([]) self.assertFalse(shell.run.called) @mock.patch('bigitr.util.removeRecursive') def test_commit(self, rR): with mock.patch('bigitr.git.shell.run'): with mock.patch.multiple('os', remove=mock.DEFAULT, close=mock.DEFAULT, rmdir=mock.DEFAULT, write=mock.DEFAULT) as mockos: with mock.patch('tempfile.mkstemp') as mockmkstemp: mockmkstemp.return_value = (123456789, '/notThere') self.cvs.commit('commitMessage') mockos['write'].assert_called_once_with(123456789, 'commitMessage') mockmkstemp.assert_called_once_with('.bigitr') shell.run.assert_called_once_with(mock.ANY, 'cvs', 'commit', '-r', 'brnch', '-R', '-F', '/notThere') mockos['remove'].assert_called_once_with('/notThere') mockos['close'].assert_called_once_with(123456789) rR.assert_not_called() mockos['rmdir'].assert_not_called(mock.ANY) def test_commitWithCVSVariables(self): with mock.patch('bigitr.git.shell.run'): with mock.patch.multiple('os', remove=mock.DEFAULT, close=mock.DEFAULT, write=mock.DEFAULT) as mockos: with mock.patch('tempfile.mkstemp') as mockmkstemp: mockmkstemp.return_value = (12345678, '/notThere') self.ctx._rm.set('GLOBAL', 'cvsvar.V1', 'val1') self.ctx._rm.set('GLOBAL', 'cvsvar.V2', 'invalid') self.ctx._rm.set('repo', 'cvsvar.V2', 'val2') self.cvs.commit('commitMessage') mockos['write'].assert_called_once_with(12345678, 'commitMessage') mockmkstemp.assert_called_once_with('.bigitr') shell.run.assert_called_once_with(mock.ANY, 'cvs', '-s', 'V1=val1', '-s', 'V2=val2', 'commit', '-r', 'brnch', '-R', '-F', '/notThere') mockos['remove'].assert_called_once_with('/notThere') mockos['close'].assert_called_once_with(12345678) @mock.patch('bigitr.util.removeRecursive') @mock.patch('tempfile.mkstemp') @mock.patch('bigitr.git.shell.run') def test_commitWithErrorReturn(self, run, mockmkstemp, rR): with mock.patch.multiple('os', remove=mock.DEFAULT, close=mock.DEFAULT, rmdir=mock.DEFAULT, write=mock.DEFAULT) as mockos: mockmkstemp.return_value = (123456789, '/notThere') run.side_effect = lambda *x, **z: {}[1] self.assertRaises(cvs.CVSError, self.cvs.commit, 'commitMessage') mockos['write'].assert_called_once_with(123456789, 'commitMessage') mockmkstemp.assert_called_once_with('.bigitr') shell.run.assert_called_once_with(mock.ANY, 'cvs', 'commit', '-r', 'brnch', '-R', '-F', '/notThere') mockos['remove'].assert_called_once_with('/notThere') mockos['close'].assert_called_once_with(123456789) rR.assert_called_once_with(self.cvs.path) mockos['rmdir'].assert_not_called(mock.ANY) def test_runPreHooks(self): with mock.patch('bigitr.git.shell.run'): self.cvs.runPreHooks() shell.run.assert_has_calls([ mock.call(mock.ANY, 'precommand', 'arg'), mock.call(mock.ANY, 'precommand', 'brnch'), ]) def test_runPostHooks(self): with mock.patch('bigitr.git.shell.run'): self.cvs.runPostHooks() shell.run.assert_has_calls([ mock.call(mock.ANY, 'postcommand', 'arg'), mock.call(mock.ANY, 'postcommand', 'brnch'), ]) class TestCVSTrunk(testutils.TestCase): def setUp(self): self.dir = tempfile.mkdtemp(suffix='.bigitr') self.cdir = tempfile.mkdtemp(suffix='.bigitr') self.fdir = '%s/repo/@{trunk}/Loc' %self.cdir os.makedirs(self.fdir) if 'CVSROOT' in os.environ: self.cvsroot = os.environ['CVSROOT'] else: self.cvsroot = None os.unsetenv('CVSROOT') with mock.patch('bigitr.log.Log') as mocklog: appConfig = StringIO('[global]\n' 'logdir = /logs\n' 'gitdir = %s\n' '[export]\n' 'cvsdir = %s\n' %(self.dir, self.cdir)) repConfig = StringIO('[GLOBAL]\n' '[repo]\n' 'cvsroot = asdf\n' 'cvspath = Some/Loc\n' 'prehook.cvs = precommand arg\n' 'posthook.cvs = postcommand arg\n' 'prehook.cvs.@{trunk} = precommand trunk\n' 'posthook.cvs.@{trunk} = postcommand trunk\n' '\n') self.ctx = context.Context(appConfig, repConfig) self.cvs = cvs.CVS(self.ctx, 'repo', '@{trunk}') self.mocklog = mocklog() def tearDown(self): self.removeRecursive(self.dir) self.removeRecursive(self.cdir) if self.cvsroot: os.environ['CVSROOT'] = self.cvsroot else: os.unsetenv('CVSROOT') def test_export(self): with mock.patch('bigitr.git.shell.run'): self.cvs.export('targetdir') shell.run.assert_called_once_with(mock.ANY, 'cvs', 'export', '-kk', '-d', 'targetdir', '-D', 'now', 'Some/Loc') self.assertEqual(os.environ['CVSROOT'], self.ctx.getCVSRoot('repo')) def test_checkout(self): with mock.patch('bigitr.git.shell.run'): with mock.patch.multiple('os', getcwd=mock.DEFAULT, chdir=mock.DEFAULT): self.cvs.checkout() shell.run.assert_called_once_with(mock.ANY, 'cvs', 'checkout', '-kk', '-d', 'Loc', 'Some/Loc') self.assertEqual(os.environ['CVSROOT'], self.ctx.getCVSRoot('repo')) @mock.patch('bigitr.util.removeRecursive') def test_commit(self, rR): with mock.patch('bigitr.git.shell.run'): with mock.patch.multiple('os', remove=mock.DEFAULT, close=mock.DEFAULT, rmdir=mock.DEFAULT, write=mock.DEFAULT) as mockos: with mock.patch('tempfile.mkstemp') as mockmkstemp: mockmkstemp.return_value = (123456789, '/notThere') self.cvs.commit('commitMessage') mockos['write'].assert_called_once_with(123456789, 'commitMessage') mockmkstemp.assert_called_once_with('.bigitr') shell.run.assert_called_once_with(mock.ANY, 'cvs', 'commit', '-R', '-F', '/notThere') mockos['remove'].assert_called_once_with('/notThere') mockos['close'].assert_called_once_with(123456789) rR.assert_not_called() mockos['rmdir'].assert_not_called(mock.ANY) def test_runPreHooks(self): with mock.patch('bigitr.git.shell.run'): self.cvs.runPreHooks() shell.run.assert_has_calls([ mock.call(mock.ANY, 'precommand', 'trunk'), ]) def test_runPostHooks(self): with mock.patch('bigitr.git.shell.run'): self.cvs.runPostHooks() shell.run.assert_has_calls([ mock.call(mock.ANY, 'postcommand', 'trunk'), ])
45.994475
98
0.513934
1,741
16,650
4.816772
0.126364
0.045791
0.055807
0.076318
0.797758
0.759719
0.742547
0.737658
0.733604
0.715478
0
0.011735
0.35003
16,650
361
99
46.121884
0.763168
0.039399
0
0.686901
0
0
0.152238
0.0077
0
0
0
0
0.214058
1
0.086262
false
0
0.019169
0
0.111821
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
92998ba1eed292be7ebce830422e18506d96b58d
199
py
Python
src/pypi_registration_test/greet.py
w40141/pypi_registration_test
feabd9ce7fe851249df741422489b6d504f3889c
[ "MIT" ]
null
null
null
src/pypi_registration_test/greet.py
w40141/pypi_registration_test
feabd9ce7fe851249df741422489b6d504f3889c
[ "MIT" ]
4
2020-03-24T17:51:28.000Z
2021-06-02T00:38:30.000Z
src/pypi_registration_test/greet.py
w40141/pypi_registration_test
feabd9ce7fe851249df741422489b6d504f3889c
[ "MIT" ]
null
null
null
class Greet(object): def __init__(self, number): self.number = number def say(self): print(f'My number is {self.number}.') def gprint(self): print(self.number)
18.090909
45
0.58794
26
199
4.346154
0.5
0.353982
0
0
0
0
0
0
0
0
0
0
0.281407
199
10
46
19.9
0.79021
0
0
0
0
0
0.135678
0
0
0
0
0
0
1
0.428571
false
0
0
0
0.571429
0.428571
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
1
0
5
929d801997036754da5dcff01e45385d285d53c7
69
py
Python
hexa/comments/__init__.py
qgerome/openhexa-app
8c9377b2ad972121d8e9575f5d52420212b52ed4
[ "MIT" ]
4
2021-07-19T12:53:21.000Z
2022-01-26T17:45:02.000Z
hexa/comments/__init__.py
qgerome/openhexa-app
8c9377b2ad972121d8e9575f5d52420212b52ed4
[ "MIT" ]
20
2021-05-17T12:27:06.000Z
2022-03-30T11:35:26.000Z
hexa/comments/__init__.py
hastakecorp/openhexa-app
dde38f14701c3bfe7fb51f29d73b35e6b8d45b7b
[ "MIT" ]
2
2021-09-07T04:19:59.000Z
2022-02-08T15:33:29.000Z
def get_model(): from .models import Comment return Comment
13.8
31
0.695652
9
69
5.222222
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.246377
69
4
32
17.25
0.903846
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
0
0
0
5
2b9b0414ecd3fbe43f33088e5a2bc1a15a15411e
101
py
Python
modifications_nicolai/print_cuda.py
nicolaiapp/im2recipe-Pytorch
584e44f7c0a900f8dd82382193ea7b1afaf08726
[ "MIT" ]
null
null
null
modifications_nicolai/print_cuda.py
nicolaiapp/im2recipe-Pytorch
584e44f7c0a900f8dd82382193ea7b1afaf08726
[ "MIT" ]
null
null
null
modifications_nicolai/print_cuda.py
nicolaiapp/im2recipe-Pytorch
584e44f7c0a900f8dd82382193ea7b1afaf08726
[ "MIT" ]
null
null
null
import torch if torch.cuda.is_available(): print('available') print(torch.cuda.device_count())
14.428571
32
0.732673
14
101
5.142857
0.642857
0.25
0
0
0
0
0
0
0
0
0
0
0.118812
101
7
32
14.428571
0.808989
0
0
0
0
0
0.088235
0
0
0
0
0
0
1
0
true
0
0.25
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
0
1
0
0
0
0
1
0
5
2bf18ad64bcd124d4f9547b4895ce837f1362172
32
py
Python
helper.py
jennfang/cs3240-labdemo
b3a6a682718f5e119031779cc662a1ebe63884c5
[ "MIT" ]
null
null
null
helper.py
jennfang/cs3240-labdemo
b3a6a682718f5e119031779cc662a1ebe63884c5
[ "MIT" ]
null
null
null
helper.py
jennfang/cs3240-labdemo
b3a6a682718f5e119031779cc662a1ebe63884c5
[ "MIT" ]
null
null
null
def greeting(msg): print (msg)
10.666667
18
0.6875
5
32
4.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.15625
32
2
19
16
0.814815
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0
0.5
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
1
0
5
921383930c3172e06623376ff01d3dc2521b79f9
139
py
Python
strax/__main__.py
XeBoris/strax
4157f6b3fc5732d44ecd5e0f83d92d90187997d9
[ "BSD-3-Clause" ]
2
2020-07-15T09:34:46.000Z
2020-07-15T09:38:56.000Z
strax/__main__.py
XeBoris/strax
4157f6b3fc5732d44ecd5e0f83d92d90187997d9
[ "BSD-3-Clause" ]
null
null
null
strax/__main__.py
XeBoris/strax
4157f6b3fc5732d44ecd5e0f83d92d90187997d9
[ "BSD-3-Clause" ]
null
null
null
# Rather boring __main__, makes it possible to test if strax imports with # python -m strax import strax # noqa print("Strax says hi!")
27.8
73
0.733813
22
139
4.454545
0.863636
0
0
0
0
0
0
0
0
0
0
0
0.194245
139
4
74
34.75
0.875
0.661871
0
0
0
0
0.325581
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
a694c6a16986b9a9397d7559f6ee6d730fcb0261
740
py
Python
kbdiffdi/utilities/conversion.py
subond/kbdi-ffdi
f0f05afbfa43ef62dedc92a5ca1f4ce2ca17b4b3
[ "MIT" ]
null
null
null
kbdiffdi/utilities/conversion.py
subond/kbdi-ffdi
f0f05afbfa43ef62dedc92a5ca1f4ce2ca17b4b3
[ "MIT" ]
null
null
null
kbdiffdi/utilities/conversion.py
subond/kbdi-ffdi
f0f05afbfa43ef62dedc92a5ca1f4ce2ca17b4b3
[ "MIT" ]
1
2021-12-04T15:39:30.000Z
2021-12-04T15:39:30.000Z
import numpy as np """ converting temperature values """ def celsius_to_fahrenheit(feature): feature.data = feature.data * (9./5.) + 32. def fahrenheit_to_celsius(feature): feature.data = (feature.data - 32.) * 5./9. """ converting precipitation values """ def millimeters_to_inches(feature): feature.data = feature.data/25.4 def inches_to_millimeters(feature): feature.data = feature.data*25.4 """ converting windspeed from m/s to km/h """ def mpers_to_kmperh(feature): feature.data = feature.data*3.6 """ converting the KBDI values """ def KBDI_index_to_millimeters(feature): feature.data = (feature.data/100) * 25.4 def KBDI_index_to_inches(feature): feature.data = (feature.data/25.4) * 100
22.424242
47
0.702703
105
740
4.8
0.333333
0.305556
0.25
0.347222
0.503968
0.331349
0.331349
0.15873
0.15873
0
0
0.045161
0.162162
740
33
48
22.424242
0.767742
0
0
0
0
0
0
0
0
0
0
0
0
1
0.466667
false
0
0.066667
0
0.533333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
a69e02481aa5dfd5c3345b9342ccfc96cb20f528
192
py
Python
fritz_switch_profiles/__init__.py
eifinger/fritz-switch-profiles
f02885080ab580537a4c9e66611a618730a8c2dc
[ "MIT" ]
null
null
null
fritz_switch_profiles/__init__.py
eifinger/fritz-switch-profiles
f02885080ab580537a4c9e66611a618730a8c2dc
[ "MIT" ]
6
2020-05-08T11:53:39.000Z
2022-03-07T17:03:57.000Z
fritz_switch_profiles/__init__.py
eifinger/fritz-switch-profiles
f02885080ab580537a4c9e66611a618730a8c2dc
[ "MIT" ]
3
2020-05-08T00:41:15.000Z
2021-06-06T22:36:41.000Z
"""fritz_switch_profiles""" import logging from .fritz_switch_profiles import FritzProfileSwitch # noqa logging.getLogger(__name__).addHandler(logging.NullHandler()) __version__ = "1.1.5"
21.333333
61
0.796875
22
192
6.409091
0.681818
0.156028
0.269504
0.35461
0
0
0
0
0
0
0
0.017143
0.088542
192
8
62
24
0.788571
0.140625
0
0
0
0
0.031447
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
a6f4aa54cce8c41a68540898e75873003f1999e2
169
py
Python
python_template/test_main.py
HirokiSAKABE/python-template
3171a898171e0a53c99b30c541eef9fda18e49de
[ "MIT" ]
null
null
null
python_template/test_main.py
HirokiSAKABE/python-template
3171a898171e0a53c99b30c541eef9fda18e49de
[ "MIT" ]
1
2021-11-23T11:23:09.000Z
2021-11-23T11:23:09.000Z
python_template/test_main.py
hirokisakabe/python-template
3171a898171e0a53c99b30c541eef9fda18e49de
[ "MIT" ]
null
null
null
""" sample test code """ from python_template import main def test_main(): """ sample test function """ assert main.hello("Python") == "Hello Python"
13
49
0.621302
20
169
5.15
0.6
0.194175
0
0
0
0
0
0
0
0
0
0
0.236686
169
12
50
14.083333
0.79845
0.218935
0
0
0
0
0.165138
0
0
0
0
0
0.333333
1
0.333333
true
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
5
5b2ed278d57ca92b902fe164a6a12e5fb8013c01
225
py
Python
Chapter 4/04/recipe26_runner.py
robert0714/Python-Testing-Cookbook-Second-Edition
c7c5d59e42e9ca2874faf12a6dd201736a45ca83
[ "MIT" ]
null
null
null
Chapter 4/04/recipe26_runner.py
robert0714/Python-Testing-Cookbook-Second-Edition
c7c5d59e42e9ca2874faf12a6dd201736a45ca83
[ "MIT" ]
null
null
null
Chapter 4/04/recipe26_runner.py
robert0714/Python-Testing-Cookbook-Second-Edition
c7c5d59e42e9ca2874faf12a6dd201736a45ca83
[ "MIT" ]
null
null
null
if __name__ == "__main__": import nose from recipe26_plugin import * args = ["", "recipe26", "--with-bdd"] nose.run(argv=["", "recipe26", "--with-bdd"], \ plugins=[BddPrinter()])
25
51
0.511111
21
225
5.047619
0.714286
0.226415
0.283019
0
0
0
0
0
0
0
0
0.037736
0.293333
225
8
52
28.125
0.628931
0
0
0
0
0
0.196429
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
5b3e042aac27f9fcdfe1a8ba5b523ebae0d7bb98
220
py
Python
backend/models/__init__.py
Exanis/cannelloni
43adcaf468d95ca774a82e1d2fea3877f0b648a4
[ "MIT" ]
1
2017-03-16T16:10:37.000Z
2017-03-16T16:10:37.000Z
backend/models/__init__.py
Exanis/cannelloni
43adcaf468d95ca774a82e1d2fea3877f0b648a4
[ "MIT" ]
null
null
null
backend/models/__init__.py
Exanis/cannelloni
43adcaf468d95ca774a82e1d2fea3877f0b648a4
[ "MIT" ]
null
null
null
# -*- coding: utf8 -*- "Export declaration for models" from .namespace import Namespace from .variable import Type, Group, Variable from .filter import Configuration, Filter, Link from .workflow import Layer, Workflow
24.444444
47
0.768182
27
220
6.259259
0.62963
0
0
0
0
0
0
0
0
0
0
0.005319
0.145455
220
8
48
27.5
0.893617
0.231818
0
0
0
0
0.146465
0
0
0
0
0
0
1
0
true
0
0.8
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
5b4f6a9fe85cfaa75395179af0502c2201973499
172
py
Python
tests/web_platform/CSS2/box_display/test_descendant_display_override.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/CSS2/box_display/test_descendant_display_override.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/CSS2/box_display/test_descendant_display_override.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
1
2020-01-16T01:56:41.000Z
2020-01-16T01:56:41.000Z
from tests.utils import W3CTestCase class TestDescendantDisplayOverride(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'descendant-display-override-'))
28.666667
83
0.813953
17
172
7.941176
0.823529
0
0
0
0
0
0
0
0
0
0
0.018987
0.081395
172
5
84
34.4
0.835443
0
0
0
0
0
0.163743
0.163743
0
0
0
0
0
1
0
true
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
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
5ba88be8b6442915b79c63ccfddb47351fa19d3f
150
py
Python
src/lib/__init__.py
heitor57/ant-colony-tsp
781d45b86b2619574a361480eae31d5ec35528bd
[ "MIT" ]
null
null
null
src/lib/__init__.py
heitor57/ant-colony-tsp
781d45b86b2619574a361480eae31d5ec35528bd
[ "MIT" ]
null
null
null
src/lib/__init__.py
heitor57/ant-colony-tsp
781d45b86b2619574a361480eae31d5ec35528bd
[ "MIT" ]
null
null
null
# import utils # import constants # from .TSPObjective import TSPObjective # from .SelectionPolicy import SelectionPolicy # import pheromony_policies
25
46
0.826667
15
150
8.2
0.533333
0.341463
0
0
0
0
0
0
0
0
0
0
0.126667
150
5
47
30
0.938931
0.926667
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
5bafaef04d3dc088b62c21a63a0aa13f1f7f7f8f
103
py
Python
regicecommon/__init__.py
anobli/regice-common
f10979bd13f4bf571751a66d71644387f85c94e4
[ "MIT" ]
null
null
null
regicecommon/__init__.py
anobli/regice-common
f10979bd13f4bf571751a66d71644387f85c94e4
[ "MIT" ]
null
null
null
regicecommon/__init__.py
anobli/regice-common
f10979bd13f4bf571751a66d71644387f85c94e4
[ "MIT" ]
null
null
null
""" Provides many common functions and helpers for regice modules. """ from regicecommon.pkg import *
20.6
63
0.757282
13
103
6
1
0
0
0
0
0
0
0
0
0
0
0
0.15534
103
4
64
25.75
0.896552
0.601942
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
5bbcdc846ae2e10331794a0ceb220bac51ac4ca7
36
py
Python
jupiter/domain/smart_lists/__init__.py
horia141/jupiter
2c721d1d44e1cd2607ad9936e54a20ea254741dc
[ "MIT" ]
15
2019-05-05T14:34:58.000Z
2022-02-25T09:57:28.000Z
jupiter/domain/smart_lists/__init__.py
horia141/jupiter
2c721d1d44e1cd2607ad9936e54a20ea254741dc
[ "MIT" ]
3
2020-02-22T16:09:39.000Z
2021-12-18T21:33:06.000Z
jupiter/domain/smart_lists/__init__.py
horia141/jupiter
2c721d1d44e1cd2607ad9936e54a20ea254741dc
[ "MIT" ]
null
null
null
"""Domain logic for smart lists."""
18
35
0.666667
5
36
4.8
1
0
0
0
0
0
0
0
0
0
0
0
0.138889
36
1
36
36
0.774194
0.805556
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
5bc580b2859d04ae60c67ff5255db9ce358aa870
15,003
py
Python
Tests/KidProfile_2/editing_cases.py
yupasik/AT
8f4f6535cef8b7714cb325a32dadf36f6f8664ee
[ "Apache-2.0" ]
null
null
null
Tests/KidProfile_2/editing_cases.py
yupasik/AT
8f4f6535cef8b7714cb325a32dadf36f6f8664ee
[ "Apache-2.0" ]
null
null
null
Tests/KidProfile_2/editing_cases.py
yupasik/AT
8f4f6535cef8b7714cb325a32dadf36f6f8664ee
[ "Apache-2.0" ]
null
null
null
# Test name = KidProfile_2 # Script dir = R:\Stingray\Tests\KidProfile_2\editing_cases\editing_cases.py from time import sleep from device import handler, updateTestResult import RC import UART import DO import GRAB import MOD import os from DO import status import OPER def runTest(): status("active") TestName = "KidProfile_2" ScriptName = "editing_cases" ScriptIndex = "1" Grabber = DO.grab_define() platform = DO.load_platform() Modulation = "DVBS" FEC = "3/4" SR = "27500000" Stream2 = "\\Kid Profile\\X_0000_00000_MUX_38000_kidsprofile-test_12226_20130905a.ts" Stream = "\\Kid Profile\\X_0000_00000_MUX_38000_KidProfile_Auto_20140905a.ts" Frequency = 1476 Modulator = "1" COM = "COM7" settings = [ScriptName, ScriptIndex, Grabber, Modulation, FEC, SR, Stream, Frequency, Modulator, COM] DO.save_settings(settings) GRAB.start_capture() MOD.stop(Modulator) # macros searching_from_wizard_general_E501 = ["ok 1 3400", "ok 1 3400", "ok 1 3400", "right 1 3400", "ok 1 3400", "ok 1 22200", "ok 1 15000", "ok 1 10000", "exit 2 3000"] searching_from_wizard_general_english_E501 = ["up 2 3400", "right 1 1000", "down 2 3400", "ok 1 3400", "ok 1 3400", "ok 1 3400", "right 1 3400", "ok 1 3400", "ok 1 22200", "ok 1 15000", "ok 1 10000", "exit 2 3000"] searching_from_wizard_centre_E501 = ["ok 1 3400", "ok 1 3400", "ok 1 3400", "right 1 3400", "ok 1 3400", "ok 1 22200", "down", "ok 1 15000", "ok 1 10000", "exit 2 3000"] searching_from_wizard_centre_english_E501 = ["up 3 3400", "right 1 1000", "down 3 3400", "ok 1 3400", "ok 1 3400", "ok 1 3400", "right", "ok 1 3400", "ok 1 22200", "ok 1 10000", "exit 2 3000"] searching_from_wizard_south_E501 = ["ok 1 3400", "ok 1 3400", "ok 1 3400", "right 1 3400", "ok 1 3400", "ok 1 22200", "down", "down", "ok 1 15000", "ok 1 10000", "exit 2 3000"] searching_from_wizard_general_ALL = ["ok 1 3400", "ok 1 3400", "right 1 3400", "ok 1 3400", "ok 1 22200", "ok 1 15000", "ok 1 10000", "exit 2 3000"] searching_from_wizard_general_english_ALL = ["up 2 3400", "right 1 1000", "down 2 3400", "ok 1 3400", "ok 1 3400", "right", "ok 1 3400", "ok 1 22200", "ok 1 15000", "ok 1 10000", "exit 2 3000"] searching_from_wizard_centre_ALL = ["ok 1 3400", "ok 1 3400", "right 1 3400", "ok 1 3400", "ok 1 22200", "down", "ok 1 15000", "ok 1 10000", "exit 2 3000"] searching_from_wizard_centre_english_ALL = ["up 3 3400", "right 1 1000", "down 3 3400", "ok 1 3400", "ok 1 3400", "right", "ok 1 3400", "ok 1 22200", "down 1 1000", "ok 1 15000", "ok 1 10000", "exit 2 3000"] searching_from_wizard_south_ALL = ["ok 1 3400", "ok 1 3400", "right 1 3400", "ok 1 3400", "ok 1 22200", "down", "down", "ok 1 15000", "ok 1 10000", "exit 2 3000"] load_regions_E501 = ["ok 1 3400", "ok 1 3400", "ok 1 3400", "right 1 3400", "ok 1 3400", "ok 1 22200"] load_regions_english_E501 = ["up 2 2400", "right 1 1000", "down 2 2400", "ok 1 3400", "ok 1 3400", "ok 1 3400", "right", "ok 1 3400", "ok 1 22200"] load_regions_ALL = ["ok 1 3400", "ok 1 3400", "right 1 3400", "ok 1 3400", "ok 1 22200"] load_regions_english_ALL = ["up 2 2400", "right 1 1000", "down 2 2400", "ok 1 3400", "ok 1 3400", "right", "ok 1 3400", "ok 1 22200"] ############################ TestCase 1 ########################################## testcase = 1 status("active") UART.default_settings() MOD.stop(Modulator) MOD.play_stream(Modulation, FEC, SR, Stream, Frequency, Modulator) OPER.search() RC.push(["exit 1 1000", "exit 1 1000"]) #-----Activating KID Profile-----# #UART.activate_app("kidsmode") #UART.start_app("settings") #sleep(5) #RC.push(["right 1 1500", "right 1 1500", "right 1 1500", "right 1 1500", "right 1 1500", "right 1 1500", "right 1 1500", "OK 1 1500", "down 1 1500", "4 1 1500", "3 1 500", "2 1 500", "1 1 500", "1 1 500", "1 1 500", "1 1 500", "1 1 500", "1 1 500", "1 1 500", "1 1 1500", "1 1 1500", "1 1 1500", "1 1 1500", "1 1 1500", "1 1 1500", "1 1 1500", "1 1 1500", "1 1 5500", "exit 1 1500", "exit 1 1500", "exit 1 1500", "exit 1 1500"]) sleep(3) RC.push(["kid_1 1 10500", "exit 1 1500", "left 1 1000", "OK 1 7000"]) UART.start_app("channelseditor") RC.push(["up 1 1000", "up 1 10000", "right 1 3000"]) GRAB.compare(testcase) ############################ TestCase 2 ########################################## testcase = 2 status("active") RC.push(["OK 1 1000"]) GRAB.compare(testcase) ############################ TestCase 3 ########################################## testcase = 3 status("active") RC.push(["exit 1 1000", "up 1 1000", "up 1 1000"]) GRAB.compare(testcase) ############################ TestCase 4 ########################################## testcase = 4 status("active") RC.push(["down 1 1000", "down 1 1000", "down 1 1000"]) GRAB.compare(testcase) ############################ TestCase 5 ########################################## testcase = 5 status("active") RC.push(["ChUp 1 1000"]) GRAB.compare(testcase) ############################ TestCase 6 ########################################## testcase = 6 status("active") RC.push(["ChDown 1 1000"]) GRAB.compare(testcase) ############################ TestCase 7 ########################################## testcase = 7 status("active") RC.push(["right 1 1000"]) GRAB.compare(testcase) ############################ TestCase 8 ########################################## testcase = 8 status("active") RC.push(["left 1 1000"]) GRAB.compare(testcase) ############################ TestCase 9 ########################################## testcase = 9 status("active") RC.push(["right 1 1000", "green 1 3000"]) GRAB.compare(testcase) ############################ TestCase 10 ########################################## testcase = 10 status("active") RC.push(["exit 1 1000", "yellow 1 1000"]) GRAB.compare(testcase) ############################ TestCase 11 ########################################## testcase = 11 status("active") RC.push(["up 1 1000", "blue 1 1000"]) GRAB.compare(testcase) ############################ TestCase 12 ########################################## testcase = 12 status("active") RC.push(["exit 1 1000", "red 1 1000"]) GRAB.compare(testcase) ############################ TestCase 13 ########################################## testcase = 13 status("active") UART.default_settings() MOD.stop(Modulator) MOD.play_stream(Modulation, FEC, SR, Stream, Frequency, Modulator) OPER.search() RC.push(["exit 1 1000", "exit 1 1000"]) sleep(3) RC.push(["kid_1 1 10500", "exit 1 1500", "left 1 1000", "OK 1 7000"]) UART.start_app("channelseditor") RC.push(["up 1 1000", "up 1 10000", "right 1 3000"]) GRAB.compare(testcase) ############################ TestCase 14 ########################################## testcase = "14_1" status("active") RC.push(["green 1 1000", "OK 1 1000", "OK 1 1000", "exit 1 2000"]) GRAB.compare(testcase) testcase = "14_2" status("active") RC.push(["exit 1 2000", "exit 1 1000", "exit 1 1000", "kid_7 1 10000", "OK 1 1000"]) GRAB.compare(testcase) ############################ TestCase 15 ########################################## testcase = 15 status("manual") GRAB.compare(testcase) ############################ TestCase 16 ########################################## testcase = 16 status("active") RC.push(["exit 1 1000", "up 1 7000", "up 1 7000"]) UART.start_app("channelseditor") RC.push(["up 1 1000", "up 1 1000", "right 1 1000", "down 1 1000", "down 1 1000", "yellow 1 3000"]) RC.push(["exit 1 7000", "red 1 2000"]) GRAB.compare(testcase) ############################ TestCase 17 ########################################## testcase = 17 status("active") UART.default_settings() MOD.stop(Modulator) MOD.play_stream(Modulation, FEC, SR, Stream, Frequency, Modulator) OPER.search() RC.push(["kid_1 1 1000", "down 1 10000", "exit 1 1000", "left 1 1000", "OK 1 1000"]) UART.start_app("channelseditor") RC.push(["up 1 1000", "up 1 1000", "right 1 1000", "yellow 1 1000", "yellow 1 1000", "exit 1 1000", "exit 1 1000", "exit 1 1000", "kid_1 1 1000"]) GRAB.compare(testcase) ############################ TestCase 18 ########################################## testcase = "18_1" status("active") UART.default_settings() MOD.stop(Modulator) MOD.play_stream(Modulation, FEC, SR, Stream, Frequency, Modulator) OPER.search() RC.push(["kid_1 1 1000", "exit 1 1000", "left 1 1000", "OK 1 1000"]) UART.start_app("channelseditor") RC.push(["up 1 1000", "up 1 1000", "right 1 1000", "up 1 1000", "right 1 3000", "OK 1 1000", "left 1 1000", "OK 1 1000"]) GRAB.compare(testcase) testcase = "18_2" status("active") RC.push(["exit 1 1000", "exit 1 1000", "exit 1 1000", "exit 1 1000", "kid_OK 1 10000", "red 1 1000"]) GRAB.compare(testcase) ############################ TestCase 19 ########################################## testcase = 19 status("active") RC.push(["exit 1 1000", "exit 1 1000", "left 1 1000", "OK 1 1000"]) UART.start_app("channelseditor") RC.push(["up 1 1000", "up 1 1000", "right 1 1000"]) GRAB.compare(testcase) ############################ TestCase 20 ########################################## testcase = 20 status("active") RC.push(["up 1 1000", "right 1 1000", "OK 1 1000", "left 1 1000", "OK 1 1000", "right 1 1000", "green 1 1000", "OK 1 1000", "OK 1 1000", "OK 1 1000", "exit 1 2000"]) RC.push(["exit 1 1000", "exit 1 1000", "exit 1 1000", "kid_star 1 10000", "OK 1 1000"]) GRAB.compare(testcase) ############################ TestCase 21 ########################################## testcase = 21 status("active") UART.default_settings() MOD.stop(Modulator) MOD.play_stream(Modulation, FEC, SR, Stream, Frequency, Modulator) OPER.search() RC.push(["kid_OK 1 7500", "exit 1 1000", "left 1 1000", "OK 1 1000"]) UART.start_app("channelseditor") RC.push(["up 1 1000", "up 1 1000", "yellow 1 1000", "left 1 1000", "OK 1 1000", "exit 1 1000", "exit 1 1000", "exit 1 1000"]) RC.push(["kid_OK 1 10500", "OK 1 1000"]) GRAB.compare(testcase) ############################ TestCase 22 ########################################## testcase = 22 status("active") RC.push(["exit 1 1000", "exit 1 1000", "left 1 1000", "OK 1 1000"]) UART.start_app("channelseditor") RC.push(["up 1 1000", "up 1 1000", "right 1 1000"]) GRAB.compare(testcase) ############################ TestCase 23 ########################################## testcase = 23 status("active") OPER.channel_block() OPER.set_pin("1111") RC.push(["kid_5 1 10000"]) GRAB.compare(testcase) ############################ TestCase 24 ########################################## testcase = "24_1" status("active") UART.default_settings() MOD.stop(Modulator) MOD.play_stream(Modulation, FEC, SR, Stream, Frequency, Modulator) OPER.search() UART.start_app("channelseditor") RC.push(["red 1 3000", "yellow 1 1000"]) #"Детский" RC.push(["down 1 1000", "down 1 1000", "down 1 1000", "left 1 1500", "left 1 1500", "left 1 1500", "left 1 1500", "down 1 1500", "OK 1 1000", "yellow 1 1000", "left 1 1500", "left 1 1500", "left 1 1500", "left 1 1500", "up 1 1500", "OK 1 1000", "down 1 1500", "down 1 1500", "right 1 1500", "right 1 1500", "OK 1 1000", "left 3 1000", "OK 1 1000", "up 2 1000", "OK 1 1000", "down 1 1500", "down 1 1500", "right 1 1500", "right 1 1500", "OK 1 1000", "left 1 1500", "left 1 1500", "left 1 1500", "left 1 1500", "left 1 1500", "up 1 1000", "up 1 1000", "OK 1 1000"]) #" режим" RC.push(["down 1 1500", "down 1 1500", "down 1 1500", "right 1 1500", "right 1 1500", "OK 1 1000", "yellow 1 1000", "up 1 1000", "up 1 1000", "right 1 1000", "right 1 1000", "right 1 1000", "right 1 1000", "right 1 1000", "OK 1 1000", "yellow 1 1000", "up 1 1000", "left 1 1000", "OK 1 1000", "down 1 1000", "right 1 1000", "right 1 1000", "right 1 1000", "right 1 1000", "right 1 1000", "OK 1 1000", "down 1 1000", "left 1 1000", "left 1 1000", "left 1 1000", "left 1 1000", "OK 1 1000", "left 1 1000", "OK 1 1000"]) RC.push(["blue 1 1000", "right 1 1000", "OK 1 3000", "OK 1 1000", "OK 1 1000", "OK 1 1000", "exit 1 1000", "exit 1 1000", "exit 1 1000", "kid_OK 1 8500", "OK 1 3000"]) GRAB.compare(testcase) testcase = "24_2" status("active") RC.push(["exit 1 1000", "exit 1 1000", "left 1 1000", "OK 1 1000"]) UART.start_app("channelseditor") RC.push(["up 1 1000", "up 1 1000"]) GRAB.compare(testcase) ############################ TestCase 25 ########################################## testcase = 25 status("active") UART.default_settings() MOD.stop(Modulator) MOD.play_stream(Modulation, FEC, SR, Stream, Frequency, Modulator) OPER.search() RC.push(["kid_OK 1 7500", "exit 1 1000", "left 1 1000", "OK 1 1000"]) UART.start_app("channelseditor") RC.push(["up 1 1000", "up 1 1000", "green 1 1000", "5 1 1000", "6 1 1000", "7 1 1000", "blue 1 1000", "exit 1 1000", "exit 1 1000", "exit 1 1000", "kid_0 1 8000", "red 1 2000"]) GRAB.compare(testcase) ############################ TestCase 26 ########################################## testcase = 26 status("active") RC.push(["exit 1 1000", "left 1 1000", "OK 1 1000"]) UART.start_app("channelseditor") RC.push(["up 1 1000", "up 1 1000"]) GRAB.compare(testcase) ############################ TestCase 27 ########################################## testcase = 27 status("manual") #Не удается обновить список каналов, "Список регионов недоступен" UART.default_settings() MOD.stop(Modulator) MOD.play_stream(Modulation, FEC, SR, Stream, Frequency, Modulator) OPER.search() RC.push(["kid_9 1 10000", "3 1 10000", "exit 1 1000", "left 1 1000", "OK 1 10000", "3 1 10000"]) sleep(400) RC.push(["OK 1 40000", ]) GRAB.compare(testcase) ############################ TestCase 28 ########################################## testcase = 28 status("manual") GRAB.compare(testcase) ############################ TestCase 29 ########################################## testcase = 29 status("manual") GRAB.compare(testcase) ############################ TestCase 30 ########################################## testcase = 30 status("manual") GRAB.compare(testcase) ############################ TestCase 31 ########################################## testcase = 31 status("manual") GRAB.compare(testcase) ################################################################################### status("active") MOD.stop(Modulator) GRAB.stop_capture()
50.345638
567
0.525495
2,067
15,003
3.750847
0.08031
0.123178
0.044241
0.045402
0.802786
0.775313
0.707081
0.628015
0.616407
0.58429
0
0.189077
0.183563
15,003
297
568
50.515152
0.443791
0.073519
0
0.54065
0
0
0.389615
0.010918
0
0
0
0
0
0
null
null
0
0.04065
null
null
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
5bcc3f089b42ee4d9d892f3f22cb545867ccbfc0
67
py
Python
examples/datetime.time.replace/ex1.py
mcorne/python-by-example
15339c0909c84b51075587a6a66391100971c033
[ "MIT" ]
null
null
null
examples/datetime.time.replace/ex1.py
mcorne/python-by-example
15339c0909c84b51075587a6a66391100971c033
[ "MIT" ]
null
null
null
examples/datetime.time.replace/ex1.py
mcorne/python-by-example
15339c0909c84b51075587a6a66391100971c033
[ "MIT" ]
null
null
null
from datetime import time print(time(12, 34, 56).replace(hour=10))
22.333333
40
0.746269
12
67
4.166667
0.916667
0
0
0
0
0
0
0
0
0
0
0.133333
0.104478
67
2
41
33.5
0.7
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
752e5f47f74154e3024ed9237333c7dc87f3fc41
136
py
Python
equal_area_breaks/__init__.py
jackastner/equal_area_breaks
2212d92a5baa446c42bd1f933e1eadf418559e58
[ "BSD-3-Clause" ]
null
null
null
equal_area_breaks/__init__.py
jackastner/equal_area_breaks
2212d92a5baa446c42bd1f933e1eadf418559e58
[ "BSD-3-Clause" ]
null
null
null
equal_area_breaks/__init__.py
jackastner/equal_area_breaks
2212d92a5baa446c42bd1f933e1eadf418559e58
[ "BSD-3-Clause" ]
null
null
null
name = "equal_area_breaks" from .equal_area_breaks import Equal_Area_DP, Equal_Area_Greedy2, Equal_Area_Greedy, Equal_Area_Weighted_DP
34
107
0.867647
22
136
4.772727
0.454545
0.514286
0.285714
0
0
0
0
0
0
0
0
0.008
0.080882
136
3
108
45.333333
0.832
0
0
0
0
0
0.125
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
7535f9ecbaa6be5e68896bd220532db3b7ce33f9
434
py
Python
test-projects/django_1_0/d1/tests.py
TheLitvinoff/django-async
322bdc2630393e8d38b613af1dfb83ba7b12d9d1
[ "BSL-1.0" ]
13
2015-06-21T12:42:14.000Z
2018-08-27T14:55:00.000Z
test-projects/django_1_0/d1/tests.py
TheLitvinoff/django-async
322bdc2630393e8d38b613af1dfb83ba7b12d9d1
[ "BSL-1.0" ]
11
2015-03-31T07:51:07.000Z
2019-03-22T06:59:32.000Z
test-projects/django_1_0/d1/tests.py
TheLitvinoff/django-async
322bdc2630393e8d38b613af1dfb83ba7b12d9d1
[ "BSL-1.0" ]
13
2015-06-09T04:30:18.000Z
2019-05-25T17:39:18.000Z
from async.tests.test_admin import * from async.tests.test_api import * from async.tests.test_commands import * from async.tests.test_deschedule import * from async.tests.test_execute import * from async.tests.test_flush_queue import * from async.tests.test_models import * from async.tests.test_schedule import * from async.tests.test_slumber_server import * from async.tests.test_stats import * from async.tests.test_utils import *
36.166667
45
0.822581
68
434
5.058824
0.264706
0.287791
0.447674
0.575581
0.697674
0
0
0
0
0
0
0
0.101382
434
11
46
39.454545
0.882051
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
1
null
null
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
1
0
0
0
1
0
0
0
0
5
754eaf7542c1a69ca13578a0c48a9fa475aefe30
124
py
Python
ethosdistro_py/exceptions.py
CoryKrol/ethosdistro_py
477233bb6e66ea6a57b9a857f39f1fd9b6192571
[ "Apache-2.0" ]
null
null
null
ethosdistro_py/exceptions.py
CoryKrol/ethosdistro_py
477233bb6e66ea6a57b9a857f39f1fd9b6192571
[ "Apache-2.0" ]
null
null
null
ethosdistro_py/exceptions.py
CoryKrol/ethosdistro_py
477233bb6e66ea6a57b9a857f39f1fd9b6192571
[ "Apache-2.0" ]
null
null
null
class APIError(Exception): pass class NotFoundError(Exception): pass class JsonFormatError(Exception): pass
11.272727
33
0.725806
12
124
7.5
0.5
0.433333
0.4
0
0
0
0
0
0
0
0
0
0.201613
124
10
34
12.4
0.909091
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
f330b484f5806a29d0d9f41356a30d8ea0f78bea
94
py
Python
EventEncoder.py
juanamari94/GraciasPorVenirBot
a483e64f16eeffc96a542eb4fb12e3aacc0767b2
[ "MIT" ]
null
null
null
EventEncoder.py
juanamari94/GraciasPorVenirBot
a483e64f16eeffc96a542eb4fb12e3aacc0767b2
[ "MIT" ]
null
null
null
EventEncoder.py
juanamari94/GraciasPorVenirBot
a483e64f16eeffc96a542eb4fb12e3aacc0767b2
[ "MIT" ]
null
null
null
import json class EventEncoder(json.JSONEncoder): def default(self, o): return o.__dict__
15.666667
37
0.765957
13
94
5.230769
0.846154
0
0
0
0
0
0
0
0
0
0
0
0.138298
94
5
38
18.8
0.839506
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
f3323e1737b419b4bb52c590549d014e31a61951
14,811
py
Python
sdk/python/pulumi_aws/ecr/registry_scanning_configuration.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ecr/registry_scanning_configuration.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ecr/registry_scanning_configuration.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * __all__ = ['RegistryScanningConfigurationArgs', 'RegistryScanningConfiguration'] @pulumi.input_type class RegistryScanningConfigurationArgs: def __init__(__self__, *, scan_type: pulumi.Input[str], rules: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryScanningConfigurationRuleArgs']]]] = None): """ The set of arguments for constructing a RegistryScanningConfiguration resource. :param pulumi.Input[str] scan_type: the scanning type to set for the registry. Can be either `ENHANCED` or `BASIC`. :param pulumi.Input[Sequence[pulumi.Input['RegistryScanningConfigurationRuleArgs']]] rules: One or multiple blocks specifying scanning rules to determine which repository filters are used and at what frequency scanning will occur. See below for schema. """ pulumi.set(__self__, "scan_type", scan_type) if rules is not None: pulumi.set(__self__, "rules", rules) @property @pulumi.getter(name="scanType") def scan_type(self) -> pulumi.Input[str]: """ the scanning type to set for the registry. Can be either `ENHANCED` or `BASIC`. """ return pulumi.get(self, "scan_type") @scan_type.setter def scan_type(self, value: pulumi.Input[str]): pulumi.set(self, "scan_type", value) @property @pulumi.getter def rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RegistryScanningConfigurationRuleArgs']]]]: """ One or multiple blocks specifying scanning rules to determine which repository filters are used and at what frequency scanning will occur. See below for schema. """ return pulumi.get(self, "rules") @rules.setter def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryScanningConfigurationRuleArgs']]]]): pulumi.set(self, "rules", value) @pulumi.input_type class _RegistryScanningConfigurationState: def __init__(__self__, *, registry_id: Optional[pulumi.Input[str]] = None, rules: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryScanningConfigurationRuleArgs']]]] = None, scan_type: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering RegistryScanningConfiguration resources. :param pulumi.Input[str] registry_id: The registry ID the scanning configuration applies to. :param pulumi.Input[Sequence[pulumi.Input['RegistryScanningConfigurationRuleArgs']]] rules: One or multiple blocks specifying scanning rules to determine which repository filters are used and at what frequency scanning will occur. See below for schema. :param pulumi.Input[str] scan_type: the scanning type to set for the registry. Can be either `ENHANCED` or `BASIC`. """ if registry_id is not None: pulumi.set(__self__, "registry_id", registry_id) if rules is not None: pulumi.set(__self__, "rules", rules) if scan_type is not None: pulumi.set(__self__, "scan_type", scan_type) @property @pulumi.getter(name="registryId") def registry_id(self) -> Optional[pulumi.Input[str]]: """ The registry ID the scanning configuration applies to. """ return pulumi.get(self, "registry_id") @registry_id.setter def registry_id(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "registry_id", value) @property @pulumi.getter def rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RegistryScanningConfigurationRuleArgs']]]]: """ One or multiple blocks specifying scanning rules to determine which repository filters are used and at what frequency scanning will occur. See below for schema. """ return pulumi.get(self, "rules") @rules.setter def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryScanningConfigurationRuleArgs']]]]): pulumi.set(self, "rules", value) @property @pulumi.getter(name="scanType") def scan_type(self) -> Optional[pulumi.Input[str]]: """ the scanning type to set for the registry. Can be either `ENHANCED` or `BASIC`. """ return pulumi.get(self, "scan_type") @scan_type.setter def scan_type(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "scan_type", value) class RegistryScanningConfiguration(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RegistryScanningConfigurationRuleArgs']]]]] = None, scan_type: Optional[pulumi.Input[str]] = None, __props__=None): """ Provides an Elastic Container Registry Scanning Configuration. Can't be completely deleted, instead reverts to the default `BASIC` scanning configuration without rules. ## Example Usage ### Basic example ```python import pulumi import pulumi_aws as aws configuration = aws.ecr.RegistryScanningConfiguration("configuration", rules=[aws.ecr.RegistryScanningConfigurationRuleArgs( repository_filters=[aws.ecr.RegistryScanningConfigurationRuleRepositoryFilterArgs( filter="example", filter_type="WILDCARD", )], scan_frequency="CONTINUOUS_SCAN", )], scan_type="ENHANCED") ``` ### Multiple rules ```python import pulumi import pulumi_aws as aws test = aws.ecr.RegistryScanningConfiguration("test", rules=[ aws.ecr.RegistryScanningConfigurationRuleArgs( repository_filters=[aws.ecr.RegistryScanningConfigurationRuleRepositoryFilterArgs( filter="*", filter_type="WILDCARD", )], scan_frequency="SCAN_ON_PUSH", ), aws.ecr.RegistryScanningConfigurationRuleArgs( repository_filters=[aws.ecr.RegistryScanningConfigurationRuleRepositoryFilterArgs( filter="example", filter_type="WILDCARD", )], scan_frequency="CONTINUOUS_SCAN", ), ], scan_type="ENHANCED") ``` ## Import ECR Scanning Configurations can be imported using the `registry_id`, e.g., ```sh $ pulumi import aws:ecr/registryScanningConfiguration:RegistryScanningConfiguration aws_ecr_registry_scanning_configuration 012345678901 ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RegistryScanningConfigurationRuleArgs']]]] rules: One or multiple blocks specifying scanning rules to determine which repository filters are used and at what frequency scanning will occur. See below for schema. :param pulumi.Input[str] scan_type: the scanning type to set for the registry. Can be either `ENHANCED` or `BASIC`. """ ... @overload def __init__(__self__, resource_name: str, args: RegistryScanningConfigurationArgs, opts: Optional[pulumi.ResourceOptions] = None): """ Provides an Elastic Container Registry Scanning Configuration. Can't be completely deleted, instead reverts to the default `BASIC` scanning configuration without rules. ## Example Usage ### Basic example ```python import pulumi import pulumi_aws as aws configuration = aws.ecr.RegistryScanningConfiguration("configuration", rules=[aws.ecr.RegistryScanningConfigurationRuleArgs( repository_filters=[aws.ecr.RegistryScanningConfigurationRuleRepositoryFilterArgs( filter="example", filter_type="WILDCARD", )], scan_frequency="CONTINUOUS_SCAN", )], scan_type="ENHANCED") ``` ### Multiple rules ```python import pulumi import pulumi_aws as aws test = aws.ecr.RegistryScanningConfiguration("test", rules=[ aws.ecr.RegistryScanningConfigurationRuleArgs( repository_filters=[aws.ecr.RegistryScanningConfigurationRuleRepositoryFilterArgs( filter="*", filter_type="WILDCARD", )], scan_frequency="SCAN_ON_PUSH", ), aws.ecr.RegistryScanningConfigurationRuleArgs( repository_filters=[aws.ecr.RegistryScanningConfigurationRuleRepositoryFilterArgs( filter="example", filter_type="WILDCARD", )], scan_frequency="CONTINUOUS_SCAN", ), ], scan_type="ENHANCED") ``` ## Import ECR Scanning Configurations can be imported using the `registry_id`, e.g., ```sh $ pulumi import aws:ecr/registryScanningConfiguration:RegistryScanningConfiguration aws_ecr_registry_scanning_configuration 012345678901 ``` :param str resource_name: The name of the resource. :param RegistryScanningConfigurationArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. """ ... def __init__(__self__, resource_name: str, *args, **kwargs): resource_args, opts = _utilities.get_resource_args_opts(RegistryScanningConfigurationArgs, pulumi.ResourceOptions, *args, **kwargs) if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RegistryScanningConfigurationRuleArgs']]]]] = None, scan_type: Optional[pulumi.Input[str]] = None, __props__=None): if opts is None: opts = pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = _utilities.get_version() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = RegistryScanningConfigurationArgs.__new__(RegistryScanningConfigurationArgs) __props__.__dict__["rules"] = rules if scan_type is None and not opts.urn: raise TypeError("Missing required property 'scan_type'") __props__.__dict__["scan_type"] = scan_type __props__.__dict__["registry_id"] = None super(RegistryScanningConfiguration, __self__).__init__( 'aws:ecr/registryScanningConfiguration:RegistryScanningConfiguration', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, registry_id: Optional[pulumi.Input[str]] = None, rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RegistryScanningConfigurationRuleArgs']]]]] = None, scan_type: Optional[pulumi.Input[str]] = None) -> 'RegistryScanningConfiguration': """ Get an existing RegistryScanningConfiguration resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] registry_id: The registry ID the scanning configuration applies to. :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RegistryScanningConfigurationRuleArgs']]]] rules: One or multiple blocks specifying scanning rules to determine which repository filters are used and at what frequency scanning will occur. See below for schema. :param pulumi.Input[str] scan_type: the scanning type to set for the registry. Can be either `ENHANCED` or `BASIC`. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _RegistryScanningConfigurationState.__new__(_RegistryScanningConfigurationState) __props__.__dict__["registry_id"] = registry_id __props__.__dict__["rules"] = rules __props__.__dict__["scan_type"] = scan_type return RegistryScanningConfiguration(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter(name="registryId") def registry_id(self) -> pulumi.Output[str]: """ The registry ID the scanning configuration applies to. """ return pulumi.get(self, "registry_id") @property @pulumi.getter def rules(self) -> pulumi.Output[Optional[Sequence['outputs.RegistryScanningConfigurationRule']]]: """ One or multiple blocks specifying scanning rules to determine which repository filters are used and at what frequency scanning will occur. See below for schema. """ return pulumi.get(self, "rules") @property @pulumi.getter(name="scanType") def scan_type(self) -> pulumi.Output[str]: """ the scanning type to set for the registry. Can be either `ENHANCED` or `BASIC`. """ return pulumi.get(self, "scan_type")
45.155488
278
0.650733
1,487
14,811
6.27505
0.124412
0.057764
0.031508
0.03483
0.762941
0.740971
0.718251
0.703569
0.698103
0.651484
0
0.002284
0.26082
14,811
327
279
45.293578
0.850018
0.461144
0
0.525926
1
0
0.140684
0.077801
0
0
0
0
0
1
0.148148
false
0.007407
0.051852
0
0.288889
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
f35053c9c63541df48a835ee8531d23665de8ab0
2,182
py
Python
tests/alerters/debug_test.py
perceptron01/elastalert2
bb91ecdb03dedda207237ca83d628fd5d40d29c6
[ "Apache-2.0" ]
250
2021-04-24T18:06:30.000Z
2022-03-31T04:37:47.000Z
tests/alerters/debug_test.py
perceptron01/elastalert2
bb91ecdb03dedda207237ca83d628fd5d40d29c6
[ "Apache-2.0" ]
129
2021-04-24T17:09:50.000Z
2022-03-29T08:52:14.000Z
tests/alerters/debug_test.py
perceptron01/elastalert2
bb91ecdb03dedda207237ca83d628fd5d40d29c6
[ "Apache-2.0" ]
128
2021-04-25T15:20:34.000Z
2022-03-31T04:37:49.000Z
import logging from elastalert.alerters.debug import DebugAlerter from elastalert.loaders import FileRulesLoader def test_debug_getinfo(): rule = { 'name': 'Test Rule', 'type': 'any', 'alert_subject': 'Cool subject', 'alert': [] } rules_loader = FileRulesLoader({}) rules_loader.load_modules(rule) alert = DebugAlerter(rule) expected_data = { 'type': 'debug' } actual_data = alert.get_info() assert expected_data == actual_data def test_debug_alerter(caplog): caplog.set_level(logging.INFO) rule = { 'name': 'Test Debug Event Alerter', 'type': 'any', 'alert': [], 'timestamp_field': 'timestamp' } rules_loader = FileRulesLoader({}) rules_loader.load_modules(rule) alert = DebugAlerter(rule) match = { '@timestamp': '2021-01-01T00:00:00', 'name': 'debug-test-name' } alert.alert([match]) excepted1 = 'Alert for Test Debug Event Alerter at None:' assert ('elastalert', logging.INFO, excepted1) == caplog.record_tuples[0] excepted2 = 'Test Debug Event Alerter\n\n@timestamp: 2021-01-01T00:00:00\n' excepted2 += 'name: debug-test-name\n' assert ('elastalert', logging.INFO, excepted2) == caplog.record_tuples[1] def test_debug_alerter_querykey(caplog): caplog.set_level(logging.INFO) rule = { 'name': 'Test Debug Event Alerter', 'type': 'any', 'alert': [], 'timestamp_field': 'timestamp', 'query_key': 'hostname' } rules_loader = FileRulesLoader({}) rules_loader.load_modules(rule) alert = DebugAlerter(rule) match = { '@timestamp': '2021-01-01T00:00:00', 'name': 'debug-test-name', 'hostname': 'aProbe' } alert.alert([match]) excepted1 = 'Alert for Test Debug Event Alerter, aProbe at None:' assert ('elastalert', logging.INFO, excepted1) == caplog.record_tuples[0] excepted2 = 'Test Debug Event Alerter\n\n@timestamp: 2021-01-01T00:00:00\n' excepted2 += 'hostname: aProbe\nname: debug-test-name\n' assert ('elastalert', logging.INFO, excepted2) == caplog.record_tuples[1]
29.093333
79
0.630614
250
2,182
5.38
0.228
0.060223
0.062454
0.09368
0.742751
0.742751
0.742751
0.742751
0.742751
0.742751
0
0.041568
0.228231
2,182
74
80
29.486486
0.757126
0
0
0.532258
0
0.032258
0.290559
0.039413
0
0
0
0
0.080645
1
0.048387
false
0
0.048387
0
0.096774
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
f3749ad96a306f2e80f6dc223dfcb9859a598f6e
22
py
Python
code/Python/helloworld-rishabhgupta03.py
foxbit19/Hello-World
4ae6ad8618441c802afa302d81e46025fcb20a72
[ "MIT" ]
63
2019-09-30T16:16:19.000Z
2021-06-17T17:23:06.000Z
code/Python/helloworld-rishabhgupta03.py
foxbit19/Hello-World
4ae6ad8618441c802afa302d81e46025fcb20a72
[ "MIT" ]
242
2019-09-30T14:07:06.000Z
2020-10-01T13:52:13.000Z
code/Python/helloworld-rishabhgupta03.py
foxbit19/Hello-World
4ae6ad8618441c802afa302d81e46025fcb20a72
[ "MIT" ]
743
2019-09-30T13:58:42.000Z
2021-12-29T21:58:28.000Z
print ('hello wrld!')
11
21
0.636364
3
22
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.136364
22
1
22
22
0.736842
0
0
0
0
0
0.5
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
f38999b129c8c95cce9ee4c00d9f72b47ce30e5a
339
py
Python
thirdparty/magma/parts/lattice/ice40/primitives/__init__.py
bjmnbraun/icestick_fastio
9fc61753e583a5a725688cb324bd1af08c2ddac4
[ "MIT" ]
null
null
null
thirdparty/magma/parts/lattice/ice40/primitives/__init__.py
bjmnbraun/icestick_fastio
9fc61753e583a5a725688cb324bd1af08c2ddac4
[ "MIT" ]
null
null
null
thirdparty/magma/parts/lattice/ice40/primitives/__init__.py
bjmnbraun/icestick_fastio
9fc61753e583a5a725688cb324bd1af08c2ddac4
[ "MIT" ]
null
null
null
# Programmable logic block functions from parts.lattice.ice40.primitives.PLB import * # Input/output functions from parts.lattice.ice40.primitives.IOB import * # Block RAM functions from parts.lattice.ice40.primitives.RAMB import * # PLL from parts.lattice.ice40.primitives.PLL import * FAMILY = 'ice40' print('import lattice ice40')
21.1875
49
0.784661
45
339
5.911111
0.422222
0.225564
0.240602
0.315789
0.567669
0.451128
0
0
0
0
0
0.040268
0.120944
339
15
50
22.6
0.852349
0.238938
0
0
0
0
0.098814
0
0
0
0
0
0
1
0
false
0
0.833333
0
0.833333
0.166667
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
f39354db84f34d0630b8421861761edbe548b48f
41
py
Python
src/__init__.py
yuliyabirman/pynd-pubs
61ee54f152343689169e1e6664edea94beed37cc
[ "Apache-2.0" ]
1
2015-11-03T21:06:26.000Z
2015-11-03T21:06:26.000Z
src/__init__.py
yuliyabirman/pynd-pubs
61ee54f152343689169e1e6664edea94beed37cc
[ "Apache-2.0" ]
null
null
null
src/__init__.py
yuliyabirman/pynd-pubs
61ee54f152343689169e1e6664edea94beed37cc
[ "Apache-2.0" ]
null
null
null
import sys sys.path.append('../package')
13.666667
29
0.707317
6
41
4.833333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.073171
41
2
30
20.5
0.763158
0
0
0
0
0
0.243902
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
f3aff0de66c92b71f4c9e9773b19b8672913e35c
102
py
Python
lib/experiments/__init__.py
103yiran/open-vot
9bb4427c300dc2bddf38e6a8c2c257a015d10d4f
[ "MIT" ]
95
2018-05-12T13:13:22.000Z
2021-09-30T18:42:11.000Z
lib/experiments/__init__.py
103yiran/open-vot
9bb4427c300dc2bddf38e6a8c2c257a015d10d4f
[ "MIT" ]
14
2018-05-21T03:43:28.000Z
2018-12-09T05:42:03.000Z
lib/experiments/__init__.py
103yiran/open-vot
9bb4427c300dc2bddf38e6a8c2c257a015d10d4f
[ "MIT" ]
19
2018-05-20T17:04:48.000Z
2019-04-02T12:28:15.000Z
from __future__ import absolute_import from .otb import ExperimentOTB from .vot import ExperimentVOT
20.4
38
0.852941
13
102
6.307692
0.615385
0
0
0
0
0
0
0
0
0
0
0
0.127451
102
4
39
25.5
0.921348
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