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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e6c2c4c3191a440e2947d6d6edc9786561372c35
| 135
|
py
|
Python
|
clarisse/var/lib/linux/menus/main_menu/edit/create_sl_use_kinematics.py
|
GuillaumeVFX/pipel
|
a1bd726239e6887745396723c3aad5d61e88ce44
|
[
"MIT"
] | 2
|
2020-05-12T11:38:44.000Z
|
2022-03-07T04:13:50.000Z
|
clarisse/var/lib/linux/menus/main_menu/edit/create_sl_use_kinematics.py
|
GuillaumeVFX/pipel
|
a1bd726239e6887745396723c3aad5d61e88ce44
|
[
"MIT"
] | null | null | null |
clarisse/var/lib/linux/menus/main_menu/edit/create_sl_use_kinematics.py
|
GuillaumeVFX/pipel
|
a1bd726239e6887745396723c3aad5d61e88ce44
|
[
"MIT"
] | null | null | null |
ix.enable_command_history()
ix.api.SdkHelpers.create_shading_layer_for_items_selected(ix.application, 3)
ix.disable_command_history()
| 27
| 76
| 0.866667
| 20
| 135
| 5.4
| 0.75
| 0.259259
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007692
| 0.037037
| 135
| 5
| 77
| 27
| 0.823077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 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
| 0
| 0
| 0
| 0
|
0
| 4
|
e6e67c10f01eafd3227340b44f827bd6a7f703fe
| 32
|
py
|
Python
|
mds/http/__init__.py
|
AlbertoPaulPopescu/doi_site
|
540be1928bc83596500ead847108bc2ebf65c692
|
[
"BSD-3-Clause"
] | null | null | null |
mds/http/__init__.py
|
AlbertoPaulPopescu/doi_site
|
540be1928bc83596500ead847108bc2ebf65c692
|
[
"BSD-3-Clause"
] | 6
|
2019-11-18T16:34:13.000Z
|
2021-02-12T13:36:49.000Z
|
mds/http/__init__.py
|
AlbertoPaulPopescu/doi_site
|
540be1928bc83596500ead847108bc2ebf65c692
|
[
"BSD-3-Clause"
] | 4
|
2018-01-03T13:41:27.000Z
|
2018-10-10T08:14:14.000Z
|
""" The ReST API calls out. """
| 16
| 31
| 0.5625
| 5
| 32
| 3.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.21875
| 32
| 1
| 32
| 32
| 0.72
| 0.71875
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fc2ea8438942b2e132bf9fbedf3a5e34fd7dd7b7
| 899
|
py
|
Python
|
pytests_stack.py
|
alehpineda/parentheses_matching
|
1b1f6d322e0ab3081864a5f76248e4fe37109acd
|
[
"MIT"
] | null | null | null |
pytests_stack.py
|
alehpineda/parentheses_matching
|
1b1f6d322e0ab3081864a5f76248e4fe37109acd
|
[
"MIT"
] | null | null | null |
pytests_stack.py
|
alehpineda/parentheses_matching
|
1b1f6d322e0ab3081864a5f76248e4fe37109acd
|
[
"MIT"
] | null | null | null |
# Testing the code
import unittest
from parentheses_matching_stack import check
class TestSum(unittest.TestCase):
def test_01(self):
self.assertEqual(check("(a[0]+b[2c[6]]){24+53}"), True, "True")
def test_02(self):
self.assertEqual(check("f(e(d))"), True, "True")
def test_03(self):
self.assertEqual(check("[()]{}([])"), True, "True")
def test_04(self):
self.assertEqual(check("((b)"), False, "False")
def test_05(self):
self.assertEqual(check("(c]"), False, "False")
def test_06(self):
self.assertEqual(check("{(a[])"), False, "False")
def test_07(self):
self.assertEqual(check("([)]"), False, "False")
def test_08(self):
self.assertEqual(check(")("), False, "False")
def test_09(self):
self.assertEqual(check(""), False, "False")
if __name__ == '__main__':
unittest.main()
| 24.972222
| 71
| 0.592881
| 114
| 899
| 4.508772
| 0.368421
| 0.122568
| 0.332685
| 0.420233
| 0.322957
| 0.225681
| 0.159533
| 0.159533
| 0
| 0
| 0
| 0.035014
| 0.205784
| 899
| 35
| 72
| 25.685714
| 0.684874
| 0.017798
| 0
| 0
| 0
| 0
| 0.122588
| 0.024972
| 0
| 0
| 0
| 0
| 0.391304
| 1
| 0.391304
| false
| 0
| 0.086957
| 0
| 0.521739
| 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
| 0
| 1
| 0
|
0
| 4
|
fc3783932953c49e1dcadf729a54bc9a4473cd84
| 24
|
py
|
Python
|
modules/2.79/bpy/types/FModifier.py
|
cmbasnett/fake-bpy-module
|
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
|
[
"MIT"
] | null | null | null |
modules/2.79/bpy/types/FModifier.py
|
cmbasnett/fake-bpy-module
|
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
|
[
"MIT"
] | null | null | null |
modules/2.79/bpy/types/FModifier.py
|
cmbasnett/fake-bpy-module
|
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
|
[
"MIT"
] | null | null | null |
FModifier.type = None
| 6
| 21
| 0.708333
| 3
| 24
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208333
| 24
| 3
| 22
| 8
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fc388f80e3f5dcff2e5d7f48c78d26a0af0326c7
| 126
|
py
|
Python
|
codes_auto/1700.minimum-deletion-cost-to-avoid-repeating-letters.py
|
smartmark-pro/leetcode_record
|
6504b733d892a705571eb4eac836fb10e94e56db
|
[
"MIT"
] | null | null | null |
codes_auto/1700.minimum-deletion-cost-to-avoid-repeating-letters.py
|
smartmark-pro/leetcode_record
|
6504b733d892a705571eb4eac836fb10e94e56db
|
[
"MIT"
] | null | null | null |
codes_auto/1700.minimum-deletion-cost-to-avoid-repeating-letters.py
|
smartmark-pro/leetcode_record
|
6504b733d892a705571eb4eac836fb10e94e56db
|
[
"MIT"
] | null | null | null |
#
# @lc app=leetcode.cn id=1700 lang=python3
#
# [1700] minimum-deletion-cost-to-avoid-repeating-letters
#
None
# @lc code=end
| 18
| 57
| 0.722222
| 20
| 126
| 4.55
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080357
| 0.111111
| 126
| 7
| 58
| 18
| 0.732143
| 0.865079
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fc4382e5939466979c19a8dd54a6dc28762c6aac
| 84
|
py
|
Python
|
jlcpcbexporter/__init__.py
|
Flameeyes/jlcpcbexporter
|
9039a525b5457b72699085fb0be6c381d5184f9c
|
[
"MIT"
] | null | null | null |
jlcpcbexporter/__init__.py
|
Flameeyes/jlcpcbexporter
|
9039a525b5457b72699085fb0be6c381d5184f9c
|
[
"MIT"
] | null | null | null |
jlcpcbexporter/__init__.py
|
Flameeyes/jlcpcbexporter
|
9039a525b5457b72699085fb0be6c381d5184f9c
|
[
"MIT"
] | 1
|
2020-10-09T16:24:35.000Z
|
2020-10-09T16:24:35.000Z
|
# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò
#
# SPDX-License-Identifier: 0BSD
| 21
| 49
| 0.785714
| 10
| 84
| 6.6
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.067568
| 0.119048
| 84
| 3
| 50
| 28
| 0.824324
| 0.916667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fc51899c936dbe009ce021a23ea49388b3b288f9
| 100
|
py
|
Python
|
cell_database/apps.py
|
Samuel-Buteau/universal-battery-database
|
55e64db74eb05cd9f0541a243bb540c0deba7d60
|
[
"Apache-2.0"
] | 33
|
2020-06-16T16:25:21.000Z
|
2022-03-13T12:38:32.000Z
|
cell_database/apps.py
|
agafonovslava/universal-battery-database
|
55e64db74eb05cd9f0541a243bb540c0deba7d60
|
[
"Apache-2.0"
] | 66
|
2020-04-14T17:18:44.000Z
|
2022-02-10T13:46:09.000Z
|
cell_database/apps.py
|
agafonovslava/universal-battery-database
|
55e64db74eb05cd9f0541a243bb540c0deba7d60
|
[
"Apache-2.0"
] | 10
|
2020-04-27T01:31:37.000Z
|
2022-01-13T18:04:53.000Z
|
from django.apps import AppConfig
class CellDatabaseConfig(AppConfig):
name = 'cell_database'
| 16.666667
| 36
| 0.78
| 11
| 100
| 7
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 100
| 5
| 37
| 20
| 0.905882
| 0
| 0
| 0
| 0
| 0
| 0.13
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
fc525575426491f4db757c27bf4ed4f3336f503d
| 248
|
py
|
Python
|
catalog/bindings/gmd/multi_curve_coverage_type.py
|
NIVANorge/s-enda-playground
|
56ae0a8978f0ba8a5546330786c882c31e17757a
|
[
"Apache-2.0"
] | null | null | null |
catalog/bindings/gmd/multi_curve_coverage_type.py
|
NIVANorge/s-enda-playground
|
56ae0a8978f0ba8a5546330786c882c31e17757a
|
[
"Apache-2.0"
] | null | null | null |
catalog/bindings/gmd/multi_curve_coverage_type.py
|
NIVANorge/s-enda-playground
|
56ae0a8978f0ba8a5546330786c882c31e17757a
|
[
"Apache-2.0"
] | null | null | null |
from dataclasses import dataclass
from bindings.gmd.abstract_discrete_coverage_type import AbstractDiscreteCoverageType
__NAMESPACE__ = "http://www.opengis.net/gml"
@dataclass
class MultiCurveCoverageType(AbstractDiscreteCoverageType):
pass
| 24.8
| 85
| 0.850806
| 24
| 248
| 8.5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08871
| 248
| 9
| 86
| 27.555556
| 0.902655
| 0
| 0
| 0
| 0
| 0
| 0.104839
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.166667
| 0.333333
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
fc5a3f075fa39b57c048e332d2a7767a3f53ee2f
| 214
|
py
|
Python
|
solardb/run/sys/__init__.py
|
PolasekT/SolarDB
|
602882fd37c4d90af8d946bd1201ebbc57209f9f
|
[
"MIT"
] | null | null | null |
solardb/run/sys/__init__.py
|
PolasekT/SolarDB
|
602882fd37c4d90af8d946bd1201ebbc57209f9f
|
[
"MIT"
] | null | null | null |
solardb/run/sys/__init__.py
|
PolasekT/SolarDB
|
602882fd37c4d90af8d946bd1201ebbc57209f9f
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Internal systems for the helper script.
"""
__all__ = [
"DataLoader",
"DataSaver",
]
from solardb.run.sys.loader import DataLoader
from solardb.run.sys.saver import DataSaver
| 15.285714
| 45
| 0.67757
| 26
| 214
| 5.423077
| 0.730769
| 0.156028
| 0.198582
| 0.241135
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005682
| 0.17757
| 214
| 13
| 46
| 16.461538
| 0.795455
| 0.28972
| 0
| 0
| 0
| 0
| 0.131944
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
fc62ef37bbedac55eb9b52af3ec8e875388a3b22
| 129
|
py
|
Python
|
tests/escape.py
|
manicmaniac/backquotes
|
03e92ad4fce0278d928cb3c59c4b1a7bdb0528ed
|
[
"MIT"
] | 6
|
2017-04-08T13:02:33.000Z
|
2022-01-05T18:40:31.000Z
|
tests/escape.py
|
manicmaniac/backquotes
|
03e92ad4fce0278d928cb3c59c4b1a7bdb0528ed
|
[
"MIT"
] | null | null | null |
tests/escape.py
|
manicmaniac/backquotes
|
03e92ad4fce0278d928cb3c59c4b1a7bdb0528ed
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import backquotes
os.environ['SPAM'] = 'SPAM'
print(`'printf $$SPAM'`)
| 12.9
| 27
| 0.627907
| 18
| 129
| 4.5
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009009
| 0.139535
| 129
| 9
| 28
| 14.333333
| 0.720721
| 0.317829
| 0
| 0
| 0
| 0
| 0.244186
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
fc9dee20ed29096202fb60a90f73750f03f3b605
| 6,120
|
py
|
Python
|
tests/test_requirements.py
|
zalke/home-assistant
|
a31e49c857722c0723dc5297cd83cbce0f8716f6
|
[
"Apache-2.0"
] | 4
|
2019-07-03T22:36:57.000Z
|
2019-08-10T15:33:25.000Z
|
tests/test_requirements.py
|
zalke/home-assistant
|
a31e49c857722c0723dc5297cd83cbce0f8716f6
|
[
"Apache-2.0"
] | 7
|
2019-08-23T05:26:02.000Z
|
2022-03-11T23:57:18.000Z
|
tests/test_requirements.py
|
zalke/home-assistant
|
a31e49c857722c0723dc5297cd83cbce0f8716f6
|
[
"Apache-2.0"
] | 2
|
2018-08-15T03:59:35.000Z
|
2018-10-18T12:20:05.000Z
|
"""Test requirements module."""
import os
from pathlib import Path
from unittest.mock import patch, call
from homeassistant import setup
from homeassistant.requirements import (
CONSTRAINT_FILE, async_process_requirements, PROGRESS_FILE, _install)
from tests.common import (
get_test_home_assistant, MockModule, mock_coro, mock_integration)
class TestRequirements:
"""Test the requirements module."""
hass = None
backup_cache = None
# pylint: disable=invalid-name, no-self-use
def setup_method(self, method):
"""Set up the test."""
self.hass = get_test_home_assistant()
def teardown_method(self, method):
"""Clean up."""
self.hass.stop()
@patch('os.path.dirname')
@patch('homeassistant.util.package.is_virtual_env', return_value=True)
@patch('homeassistant.util.package.is_docker_env', return_value=False)
@patch('homeassistant.util.package.install_package', return_value=True)
def test_requirement_installed_in_venv(
self, mock_install, mock_denv, mock_venv, mock_dirname):
"""Test requirement installed in virtual environment."""
mock_dirname.return_value = 'ha_package_path'
self.hass.config.skip_pip = False
mock_integration(
self.hass,
MockModule('comp', requirements=['package==0.0.1']))
assert setup.setup_component(self.hass, 'comp', {})
assert 'comp' in self.hass.config.components
assert mock_install.call_args == call(
'package==0.0.1',
constraints=os.path.join('ha_package_path', CONSTRAINT_FILE),
no_cache_dir=False,
)
@patch('os.path.dirname')
@patch('homeassistant.util.package.is_virtual_env', return_value=False)
@patch('homeassistant.util.package.is_docker_env', return_value=False)
@patch('homeassistant.util.package.install_package', return_value=True)
def test_requirement_installed_in_deps(
self, mock_install, mock_denv, mock_venv, mock_dirname):
"""Test requirement installed in deps directory."""
mock_dirname.return_value = 'ha_package_path'
self.hass.config.skip_pip = False
mock_integration(
self.hass,
MockModule('comp', requirements=['package==0.0.1']))
assert setup.setup_component(self.hass, 'comp', {})
assert 'comp' in self.hass.config.components
assert mock_install.call_args == call(
'package==0.0.1', target=self.hass.config.path('deps'),
constraints=os.path.join('ha_package_path', CONSTRAINT_FILE),
no_cache_dir=False,
)
async def test_install_existing_package(hass):
"""Test an install attempt on an existing package."""
with patch('homeassistant.util.package.install_package',
return_value=mock_coro(True)) as mock_inst:
assert await async_process_requirements(
hass, 'test_component', ['hello==1.0.0'])
assert len(mock_inst.mock_calls) == 1
with patch('homeassistant.util.package.is_installed', return_value=True), \
patch(
'homeassistant.util.package.install_package') as mock_inst:
assert await async_process_requirements(
hass, 'test_component', ['hello==1.0.0'])
assert len(mock_inst.mock_calls) == 0
async def test_install_with_wheels_index(hass):
"""Test an install attempt with wheels index URL."""
hass.config.skip_pip = False
mock_integration(
hass, MockModule('comp', requirements=['hello==1.0.0']))
with patch(
'homeassistant.util.package.is_installed', return_value=False
), \
patch(
'homeassistant.util.package.is_docker_env', return_value=True
), \
patch(
'homeassistant.util.package.install_package'
) as mock_inst, \
patch.dict(
os.environ, {'WHEELS_LINKS': "https://wheels.hass.io/test"}
), \
patch(
'os.path.dirname'
) as mock_dir:
mock_dir.return_value = 'ha_package_path'
assert await setup.async_setup_component(hass, 'comp', {})
assert 'comp' in hass.config.components
print(mock_inst.call_args)
assert mock_inst.call_args == call(
'hello==1.0.0', find_links="https://wheels.hass.io/test",
constraints=os.path.join('ha_package_path', CONSTRAINT_FILE),
no_cache_dir=True,
)
async def test_install_on_docker(hass):
"""Test an install attempt on an docker system env."""
hass.config.skip_pip = False
mock_integration(
hass, MockModule('comp', requirements=['hello==1.0.0']))
with patch(
'homeassistant.util.package.is_installed', return_value=False
), \
patch(
'homeassistant.util.package.is_docker_env', return_value=True
), \
patch(
'homeassistant.util.package.install_package'
) as mock_inst, \
patch(
'os.path.dirname'
) as mock_dir:
mock_dir.return_value = 'ha_package_path'
assert await setup.async_setup_component(hass, 'comp', {})
assert 'comp' in hass.config.components
print(mock_inst.call_args)
assert mock_inst.call_args == call(
'hello==1.0.0',
constraints=os.path.join('ha_package_path', CONSTRAINT_FILE),
no_cache_dir=True,
)
async def test_progress_lock(hass):
"""Test an install attempt on an existing package."""
progress_path = Path(hass.config.path(PROGRESS_FILE))
kwargs = {'hello': 'world'}
def assert_env(req, **passed_kwargs):
"""Assert the env."""
assert progress_path.exists()
assert req == 'hello'
assert passed_kwargs == kwargs
return True
with patch('homeassistant.util.package.install_package',
side_effect=assert_env):
_install(hass, 'hello', kwargs)
assert not progress_path.exists()
| 36.86747
| 79
| 0.635784
| 727
| 6,120
| 5.11967
| 0.156809
| 0.077378
| 0.094573
| 0.124664
| 0.74503
| 0.736432
| 0.722461
| 0.701236
| 0.685653
| 0.650725
| 0
| 0.006964
| 0.249183
| 6,120
| 165
| 80
| 37.090909
| 0.803047
| 0.038889
| 0
| 0.625
| 0
| 0
| 0.200036
| 0.115903
| 0
| 0
| 0
| 0
| 0.171875
| 1
| 0.039063
| false
| 0.015625
| 0.046875
| 0
| 0.117188
| 0.015625
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5d78f3ad9eab466a8b23643b6484b041470925cf
| 176
|
py
|
Python
|
fdp/methods/currentshot.py
|
Fusion-Data-Platform/fdp
|
d87a52207238f168ed69b9f96dc8f20f4481366d
|
[
"MIT"
] | 10
|
2015-12-18T22:38:07.000Z
|
2020-03-02T09:15:50.000Z
|
fdp/methods/currentshot.py
|
Fusion-Data-Platform/fdp
|
d87a52207238f168ed69b9f96dc8f20f4481366d
|
[
"MIT"
] | 14
|
2015-12-07T16:41:48.000Z
|
2019-01-18T17:48:55.000Z
|
fdp/methods/currentshot.py
|
Fusion-Data-Platform/fdp
|
d87a52207238f168ed69b9f96dc8f20f4481366d
|
[
"MIT"
] | 5
|
2016-05-20T17:35:23.000Z
|
2019-01-17T19:00:06.000Z
|
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 23 14:42:54 2016
@author: ktritz
"""
def currentshot(self):
return self._connections[0].get('current_shot("nstx")').value
| 16
| 65
| 0.647727
| 26
| 176
| 4.307692
| 0.961538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09396
| 0.153409
| 176
| 10
| 66
| 17.6
| 0.657718
| 0.426136
| 0
| 0
| 0
| 0
| 0.215054
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
5d864f5f6cdcb1dbc5518045bda516d5e9e64c66
| 6,017
|
py
|
Python
|
tests/test_ddl.py
|
NiyazNz/clickhouse-sqlalchemy
|
3ec95fea8fda3cf9def756045d80b5a2b8e8cbd2
|
[
"MIT"
] | null | null | null |
tests/test_ddl.py
|
NiyazNz/clickhouse-sqlalchemy
|
3ec95fea8fda3cf9def756045d80b5a2b8e8cbd2
|
[
"MIT"
] | null | null | null |
tests/test_ddl.py
|
NiyazNz/clickhouse-sqlalchemy
|
3ec95fea8fda3cf9def756045d80b5a2b8e8cbd2
|
[
"MIT"
] | null | null | null |
from sqlalchemy import Column
from sqlalchemy.sql.ddl import CreateTable
from clickhouse_sqlalchemy import types, engines, Table
from clickhouse_sqlalchemy.sql.ddl import DropTable
from tests.testcase import BaseTestCase
from tests.session import mocked_engine
class DDLTestCase(BaseTestCase):
def test_create_table(self):
table = Table(
't1', self.metadata(),
Column('x', types.Int32, primary_key=True),
Column('y', types.String),
Column('z', types.String(10)),
engines.Memory()
)
# No NOT NULL. And any PKS.
self.assertEqual(
self.compile(CreateTable(table)),
'CREATE TABLE t1 (x Int32, y String, z FixedString(10)) '
'ENGINE = Memory'
)
def test_create_table_nested_types(self):
table = Table(
't1', self.metadata(),
Column('x', types.Int32, primary_key=True),
Column('y', types.Array(types.String)),
engines.Memory()
)
self.assertEqual(
self.compile(CreateTable(table)),
'CREATE TABLE t1 '
'(x Int32, y Array(String)) '
'ENGINE = Memory'
)
table = Table(
't1', self.metadata(),
Column('x', types.Int32, primary_key=True),
Column('y', types.Array(types.Array(types.String))),
engines.Memory()
)
self.assertEqual(
self.compile(CreateTable(table)),
'CREATE TABLE t1 '
'(x Int32, y Array(Array(String))) '
'ENGINE = Memory'
)
table = Table(
't1', self.metadata(),
Column('x', types.Int32, primary_key=True),
Column('y', types.Array(types.Array(types.String))),
engines.Memory()
)
self.assertEqual(
self.compile(CreateTable(table)),
'CREATE TABLE t1 '
'(x Int32, y Array(Array(String))) '
'ENGINE = Memory'
)
def test_create_table_nullable(self):
table = Table(
't1', self.metadata(),
Column('x', types.Int32, primary_key=True),
Column('y', types.Nullable(types.String)),
Column('z', types.Nullable(types.String(10))),
engines.Memory()
)
self.assertEqual(
self.compile(CreateTable(table)),
'CREATE TABLE t1 '
'(x Int32, y Nullable(String), z Nullable(FixedString(10))) '
'ENGINE = Memory'
)
def test_create_table_nested(self):
table = Table(
't1',
self.metadata(),
Column('x', types.Int32, primary_key=True),
Column('parent', types.Nested(
Column('child1', types.Int32),
Column('child2', types.String),
)),
engines.Memory()
)
self.assertEqual(
self.compile(CreateTable(table)),
'CREATE TABLE t1 ('
'x Int32, '
'parent Nested('
'child1 Int32, '
"child2 String"
')'
') ENGINE = Memory'
)
def test_create_table_nested_nullable(self):
table = Table(
't1', self.metadata(),
Column('x', types.Int32, primary_key=True),
Column('y', types.Array(types.Nullable(types.String))),
engines.Memory()
)
self.assertEqual(
self.compile(CreateTable(table)),
'CREATE TABLE t1 '
'(x Int32, y Array(Nullable(String))) '
'ENGINE = Memory'
)
def test_create_table_nullable_nested_nullable(self):
table = Table(
't1', self.metadata(),
Column('x', types.Int32, primary_key=True),
Column('y', types.Nullable(
types.Array(types.Nullable(types.String)))
),
engines.Memory()
)
self.assertEqual(
self.compile(CreateTable(table)),
'CREATE TABLE t1 '
'(x Int32, y Nullable(Array(Nullable(String)))) '
'ENGINE = Memory'
)
def test_table_create_on_cluster(self):
table = Table(
't1', self.metadata(),
Column('x', types.Int32, primary_key=True),
engines.Memory(),
clickhouse_cluster='test_cluster'
)
create_sql = (
'CREATE TABLE t1 ON CLUSTER test_cluster '
'(x Int32) ENGINE = Memory'
)
with mocked_engine() as engine:
table.create()
engine.assert_sql([create_sql])
self.assertEqual(
self.compile(CreateTable(table)),
create_sql
)
def test_drop_table_clause(self):
table = Table(
't1', self.metadata(),
Column('x', types.Int32, primary_key=True)
)
self.assertEqual(
self.compile(DropTable(table)),
'DROP TABLE t1'
)
self.assertEqual(
self.compile(DropTable(table, if_exists=True)),
'DROP TABLE IF EXISTS t1'
)
def test_table_drop(self):
table = Table(
't1', self.metadata(),
Column('x', types.Int32, primary_key=True)
)
with mocked_engine() as engine:
table.drop(if_exists=True)
engine.assert_sql(['DROP TABLE IF EXISTS t1'])
def test_table_drop_on_cluster(self):
table = Table(
't1', self.metadata(),
Column('x', types.Int32, primary_key=True),
clickhouse_cluster='test_cluster'
)
drop_sql = 'DROP TABLE IF EXISTS t1 ON CLUSTER test_cluster'
with mocked_engine() as engine:
table.drop(if_exists=True)
engine.assert_sql([drop_sql])
self.assertEqual(
self.compile(DropTable(table, if_exists=True)),
drop_sql
)
| 29.787129
| 73
| 0.524514
| 605
| 6,017
| 5.099174
| 0.099174
| 0.049919
| 0.046353
| 0.062237
| 0.808428
| 0.770178
| 0.740681
| 0.698541
| 0.678444
| 0.62658
| 0
| 0.021441
| 0.356656
| 6,017
| 201
| 74
| 29.935323
| 0.77551
| 0.004155
| 0
| 0.520231
| 0
| 0
| 0.139733
| 0.021035
| 0
| 0
| 0
| 0
| 0.086705
| 1
| 0.057803
| false
| 0
| 0.034682
| 0
| 0.098266
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5d9483c510532428104a96e6aa0da98610e185d3
| 3,148
|
py
|
Python
|
4.isp.py
|
balaa/solid.python
|
d8a66834fc508f227617d28a9894873a488ae5e6
|
[
"MIT"
] | 604
|
2019-03-10T23:15:25.000Z
|
2022-03-28T03:19:35.000Z
|
4.isp.py
|
balaa/solid.python
|
d8a66834fc508f227617d28a9894873a488ae5e6
|
[
"MIT"
] | 2
|
2019-07-08T11:25:32.000Z
|
2020-06-23T22:43:40.000Z
|
4.isp.py
|
balaa/solid.python
|
d8a66834fc508f227617d28a9894873a488ae5e6
|
[
"MIT"
] | 156
|
2019-04-11T11:23:35.000Z
|
2022-03-21T00:44:09.000Z
|
"""
Interface Segregation Principle
Make fine grained interfaces that are client specific Clients should not be
forced to depend upon interfaces that they do not use. This principle deals
with the disadvantages of implementing big interfaces.
Let’s look at the below IShape interface:
"""
class IShape:
def draw_square(self):
raise NotImplementedError
def draw_rectangle(self):
raise NotImplementedError
def draw_circle(self):
raise NotImplementedError
"""
This interface draws squares, circles, rectangles. class Circle, Square or
Rectangle implementing the IShape interface must define the methods
draw_square(), draw_rectangle(), draw_circle().
"""
class Circle(IShape):
def draw_square(self):
pass
def draw_rectangle(self):
pass
def draw_circle(self):
pass
class Square(IShape):
def draw_square(self):
pass
def draw_rectangle(self):
pass
def draw_circle(self):
pass
class Rectangle(IShape):
def draw_square(self):
pass
def draw_rectangle(self):
pass
def draw_circle(self):
pass
"""
It’s quite funny looking at the code above. class Rectangle implements methods
(draw_circle and draw_square) it has no use of, likewise Square implementing
draw_circle, and draw_rectangle, and class Circle (draw_square, draw_rectangle).
If we add another method to the IShape interface, like draw_triangle(),
"""
class IShape:
def draw_square(self):
raise NotImplementedError
def draw_rectangle(self):
raise NotImplementedError
def draw_circle(self):
raise NotImplementedError
def draw_triangle(self):
raise NotImplementedError
"""
The classes must implement the new method or error will be thrown.
We see that it is impossible to implement a shape that can draw a circle but not
a rectangle or a square or a triangle. We can just implement the methods to
throw an error that shows the operation cannot be performed.
ISP frowns against the design of this IShape interface. clients (here Rectangle,
Circle, and Square) should not be forced to depend on methods that they do not
need or use. Also, ISP states that interfaces should perform only one job (just
like the SRP principle) any extra grouping of behavior should be abstracted away
to another interface.
Here, our IShape interface performs actions that should be handled independently
by other interfaces.
To make our IShape interface conform to the ISP principle, we segregate the
actions to different interfaces. Classes (Circle, Rectangle, Square, Triangle,
etc) can just inherit from the IShape interface and implement their own draw
behavior.
"""
class IShape:
def draw(self):
raise NotImplementedError
class Circle(IShape):
def draw(self):
pass
class Square(IShape):
def draw(self):
pass
class Rectangle(IShape):
def draw(self):
pass
"""
We can then use the I -interfaces to create Shape specifics like Semi Circle,
Right-Angled Triangle, Equilateral Triangle, Blunt-Edged Rectangle, etc.
"""
| 26.233333
| 80
| 0.724905
| 430
| 3,148
| 5.246512
| 0.318605
| 0.062057
| 0.051862
| 0.039894
| 0.302305
| 0.285904
| 0.257979
| 0.221631
| 0.221631
| 0.221631
| 0
| 0
| 0.219504
| 3,148
| 120
| 81
| 26.233333
| 0.918193
| 0.089898
| 0
| 0.979592
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.408163
| false
| 0.244898
| 0
| 0
| 0.591837
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 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
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
5daca527e2781b40a516bf96896d04e7d13374ee
| 69
|
py
|
Python
|
pbt/exploration/models/model.py
|
automl/HPO_for_RL
|
d82c7ddd6fe19834c088137570530f11761d9390
|
[
"Apache-2.0"
] | 9
|
2021-06-22T08:54:19.000Z
|
2022-03-28T09:10:59.000Z
|
pbt/exploration/models/model.py
|
automl/HPO_for_RL
|
d82c7ddd6fe19834c088137570530f11761d9390
|
[
"Apache-2.0"
] | null | null | null |
pbt/exploration/models/model.py
|
automl/HPO_for_RL
|
d82c7ddd6fe19834c088137570530f11761d9390
|
[
"Apache-2.0"
] | null | null | null |
class Model:
def sample(self):
raise NotImplementedError
| 17.25
| 33
| 0.681159
| 7
| 69
| 6.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.26087
| 69
| 3
| 34
| 23
| 0.921569
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
5db986f566d72249c6201beeca9d387bca7004bc
| 95
|
py
|
Python
|
examples/komegaExamples/kw_py/bf_ex.py
|
rrjudd/jvsip
|
56a965fff595b027139ff151d27d434f2480b9e8
|
[
"MIT"
] | 10
|
2016-01-16T04:10:13.000Z
|
2022-03-22T02:17:44.000Z
|
examples/komegaExamples/kw_py/bf_ex.py
|
rrjudd/jvsip
|
56a965fff595b027139ff151d27d434f2480b9e8
|
[
"MIT"
] | 1
|
2015-09-11T04:48:03.000Z
|
2015-09-11T13:44:29.000Z
|
examples/komegaExamples/kw_py/bf_ex.py
|
rrjudd/jvsip
|
56a965fff595b027139ff151d27d434f2480b9e8
|
[
"MIT"
] | 4
|
2017-06-13T21:48:23.000Z
|
2020-08-26T15:07:44.000Z
|
import matplotlib.pyplot as plt
import beamformer as bf
bf.beamformer('param_file')
plt.show()
| 19
| 31
| 0.8
| 15
| 95
| 5
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 95
| 4
| 32
| 23.75
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5dbfd6413f5e2d4721e0310cd13dbb904a025d94
| 161
|
py
|
Python
|
file_upload/uploadfiles/forms.py
|
rathodabhi0/Django_File_Upload_APP
|
0cb1b9360097d208298e3b6dedcc51a8332dbfe5
|
[
"MIT"
] | null | null | null |
file_upload/uploadfiles/forms.py
|
rathodabhi0/Django_File_Upload_APP
|
0cb1b9360097d208298e3b6dedcc51a8332dbfe5
|
[
"MIT"
] | null | null | null |
file_upload/uploadfiles/forms.py
|
rathodabhi0/Django_File_Upload_APP
|
0cb1b9360097d208298e3b6dedcc51a8332dbfe5
|
[
"MIT"
] | null | null | null |
from django import forms
from .models import ls_20
class DocumentForm(forms.ModelForm):
class Meta:
model = ls_20
fields = ('Elect_file',)
| 17.888889
| 36
| 0.670807
| 21
| 161
| 5
| 0.714286
| 0.07619
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033058
| 0.248447
| 161
| 9
| 37
| 17.888889
| 0.834711
| 0
| 0
| 0
| 0
| 0
| 0.061728
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5dcbbfd949a85b9476b009a88af325b1d093fd81
| 108
|
py
|
Python
|
ReSpider/templates/project_template/spiders/__init__.py
|
zaoxg/ReSpiderFramework
|
bd49ffb79867f5cd0eceb5f820498fbbf8611a60
|
[
"MIT"
] | 1
|
2022-03-27T15:03:36.000Z
|
2022-03-27T15:03:36.000Z
|
ReSpider/templates/project_template/spiders/__init__.py
|
zaoxg/ReSpiderFramework
|
bd49ffb79867f5cd0eceb5f820498fbbf8611a60
|
[
"MIT"
] | null | null | null |
ReSpider/templates/project_template/spiders/__init__.py
|
zaoxg/ReSpiderFramework
|
bd49ffb79867f5cd0eceb5f820498fbbf8611a60
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# @Time : 2022/2/23 17:18
# @Author : ZhaoXiangPeng
# @File : __init__.py.py
| 21.6
| 28
| 0.555556
| 15
| 108
| 3.733333
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144578
| 0.231481
| 108
| 4
| 29
| 27
| 0.53012
| 0.916667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b90adcceb0f84aa6ca59ba7fbbd69fa91cfd5b7c
| 193
|
py
|
Python
|
script/generate_gallery.py
|
vsoch/mosaic
|
347574696b06cfdb1c57c43f9e874414de7e5030
|
[
"MIT"
] | 2
|
2016-02-22T11:40:35.000Z
|
2018-09-28T20:02:22.000Z
|
script/generate_gallery.py
|
vsoch/mosaic
|
347574696b06cfdb1c57c43f9e874414de7e5030
|
[
"MIT"
] | 4
|
2015-12-05T23:36:31.000Z
|
2016-02-22T18:11:28.000Z
|
script/generate_gallery.py
|
vsoch/mosaic
|
347574696b06cfdb1c57c43f9e874414de7e5030
|
[
"MIT"
] | 3
|
2016-02-22T14:08:53.000Z
|
2017-11-24T23:49:46.000Z
|
from visci.app import generate_vis_index
from glob import glob
import os
base = os.path.abspath("../")
template_files = glob("%s/gallery/*.html" %base)
generate_vis_index(template_files,base)
| 24.125
| 48
| 0.772021
| 30
| 193
| 4.766667
| 0.566667
| 0.153846
| 0.223776
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098446
| 193
| 7
| 49
| 27.571429
| 0.821839
| 0
| 0
| 0
| 1
| 0
| 0.103627
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f8d648aa5eb050aed382fb792d92749acd4e032c
| 585
|
py
|
Python
|
viadot/sources/__init__.py
|
winiar93/viadot
|
7d8f8b0a30de3d40da161615639532012de072b0
|
[
"MIT"
] | null | null | null |
viadot/sources/__init__.py
|
winiar93/viadot
|
7d8f8b0a30de3d40da161615639532012de072b0
|
[
"MIT"
] | null | null | null |
viadot/sources/__init__.py
|
winiar93/viadot
|
7d8f8b0a30de3d40da161615639532012de072b0
|
[
"MIT"
] | null | null | null |
from .azure_blob_storage import AzureBlobStorage
from .azure_data_lake import AzureDataLake
from .azure_sql import AzureSQL
from .supermetrics import Supermetrics
from .cloud_for_customers import CloudForCustomers
from .sharepoint import Sharepoint
from .bigquery import BigQuery
from .salesforce import Salesforce
from .outlook import Outlook
try:
from .sap_rfc import SAPRFC
except ImportError:
pass
# APIS
from .uk_carbon_intensity import UKCarbonIntensity
from .sqlite import SQLite
from .duckdb import DuckDB
from .sql_server import SQLServer
from .epicor import Epicor
| 26.590909
| 50
| 0.839316
| 76
| 585
| 6.315789
| 0.486842
| 0.05625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129915
| 585
| 21
| 51
| 27.857143
| 0.943026
| 0.006838
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.055556
| 0.888889
| 0
| 0.888889
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
f8df05d808b9ab2f7530f3284703492f126213e1
| 191
|
py
|
Python
|
pay_with_amazon/lwa_region.py
|
kdhe70/amazon-seller
|
973608475b79160812633d0e83b36a5b6dafe313
|
[
"Apache-2.0"
] | 36
|
2017-03-16T02:01:42.000Z
|
2021-12-06T02:06:25.000Z
|
pay_with_amazon/lwa_region.py
|
EfficientEra/login-and-pay-with-amazon-sdk-python
|
029175abc9835ba1927cdd04e88209212cee2443
|
[
"Apache-2.0"
] | 9
|
2017-04-02T01:56:15.000Z
|
2021-09-14T12:49:34.000Z
|
pay_with_amazon/lwa_region.py
|
EfficientEra/login-and-pay-with-amazon-sdk-python
|
029175abc9835ba1927cdd04e88209212cee2443
|
[
"Apache-2.0"
] | 30
|
2017-03-28T09:59:18.000Z
|
2021-11-08T11:43:31.000Z
|
regions = {'jp': 'amazon.co.jp',
'uk': 'amazon.co.uk',
'de': 'amazon.de',
'eu': 'amazon.co.uk',
'us': 'amazon.com',
'na': 'amazon.com'}
| 27.285714
| 32
| 0.39267
| 22
| 191
| 3.409091
| 0.454545
| 0.32
| 0.266667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.361257
| 191
| 6
| 33
| 31.833333
| 0.614754
| 0
| 0
| 0
| 0
| 0
| 0.403141
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 0
| 0
|
0
| 4
|
5d0116892063d1a7deac8424bbe6edd3c6191b79
| 6,437
|
py
|
Python
|
tests/test_dict.py
|
gabrielcipriano/shared-memory-dict
|
823c8d12bee1ac0110e0f6dc02cb527882bad25f
|
[
"MIT"
] | null | null | null |
tests/test_dict.py
|
gabrielcipriano/shared-memory-dict
|
823c8d12bee1ac0110e0f6dc02cb527882bad25f
|
[
"MIT"
] | null | null | null |
tests/test_dict.py
|
gabrielcipriano/shared-memory-dict
|
823c8d12bee1ac0110e0f6dc02cb527882bad25f
|
[
"MIT"
] | null | null | null |
import sys
import pytest
from shared_memory_dict import SharedMemoryDict
class TestSharedMemoryDict:
@pytest.fixture
def shared_memory_dict(self):
smd = SharedMemoryDict(name='ut', size=1024)
yield smd
smd.clear()
smd.cleanup()
@pytest.fixture
def key(self):
return 'fake-key'
@pytest.fixture
def value(self):
return 'fake-value'
def test_should_add_a_key(self, shared_memory_dict, key, value):
try:
shared_memory_dict[key] = value
except Exception as e:
pytest.fail(f'Its should not raises: {e}')
def test_should_read_a_key(self, shared_memory_dict, key, value):
shared_memory_dict[key] = value
assert shared_memory_dict[key] == value
def test_should_read_a_key_with_default(
self, shared_memory_dict, key, value
):
default_value = 'default_value'
assert shared_memory_dict.get(key, default_value) == default_value
def test_should_read_a_key_without_default(
self, shared_memory_dict, key, value
):
assert shared_memory_dict.get(key) is None
def test_should_remove_a_key(self, shared_memory_dict, key, value):
shared_memory_dict[key] = value
try:
del shared_memory_dict[key]
except Exception as e:
pytest.fail(f'Its should not raises: {e}')
with pytest.raises(KeyError):
shared_memory_dict[key]
def test_should_get_len_of_dict(self, shared_memory_dict, key, value):
assert len(shared_memory_dict) == 0
shared_memory_dict[key] = value
assert len(shared_memory_dict) == 1
def test_should_popitem(self, shared_memory_dict, key, value):
shared_memory_dict[key] = value
assert shared_memory_dict.popitem() == (key, value)
def test_should_clear_dict(self, shared_memory_dict, key, value):
shared_memory_dict[key] = value
try:
shared_memory_dict.clear()
except Exception as e:
pytest.fail(f'Its should not raises: {e}')
with pytest.raises(KeyError):
shared_memory_dict[key]
def test_should_finalize_dict(self):
smd = SharedMemoryDict(name='unit-tests', size=64)
try:
del smd
except Exception as e:
pytest.fail(f'Its should not raises: {e}')
def test_should_check_item_in_dict(self, shared_memory_dict, key, value):
shared_memory_dict[key] = value
assert (key in shared_memory_dict) is True
assert ('some-another-key' in shared_memory_dict) is False
def test_should_return_dict_keys(self, shared_memory_dict, key, value):
shared_memory_dict[key] = value
assert list(shared_memory_dict.keys()) == [key]
def test_should_warning_about_move_to_end_deprecation(
self, shared_memory_dict, key, value
):
shared_memory_dict[key] = value
deprecation_message = (
'The \'move_to_end\' method will be removed in future versions. '
'Use pop and reassignment instead.'
)
with pytest.deprecated_call(match=deprecation_message):
shared_memory_dict.move_to_end(key)
def test_should_warning_about_last_parameter_deprecation_in_popitem(
self, shared_memory_dict, key, value
):
shared_memory_dict[key] = value
deprecation_message = (
'The \'last\' parameter will be removed in future versions. '
'The \'popitem\' function now always returns last inserted.'
)
with pytest.deprecated_call(match=deprecation_message):
shared_memory_dict.popitem(last=True)
def test_should_be_iterable_as_a_dict(
self, shared_memory_dict, key, value
):
shared_memory_dict[key] = value
assert list(iter(shared_memory_dict)) == list(iter({key: value}))
def test_can_be_iterated_in_reverse_order(
self, shared_memory_dict, key, value
):
shared_memory_dict[key] = value
shared_memory_dict[value] = key
assert list(reversed(shared_memory_dict)) == [value, key]
def test_should_be_comparable(self, shared_memory_dict, key, value):
shared_memory_dict[key] = value
assert shared_memory_dict == {key: value}
assert shared_memory_dict != {value: key}
@pytest.mark.skipif(
sys.version_info < (3, 9), reason='requires python3.9 or higher'
)
def test_allow_dict_merge(self, shared_memory_dict, key, value):
assert shared_memory_dict | {key: value} == {key: value}
assert {key: value} | shared_memory_dict == {key: value}
@pytest.mark.skipif(
sys.version_info < (3, 9), reason='requires python3.9 or higher'
)
def test_allow_dict_update(self, shared_memory_dict, key, value):
shared_memory_dict |= {key: value}
assert shared_memory_dict == {key: value}
def test_have_a_dict_like_str_conversion(
self, shared_memory_dict, key, value
):
shared_memory_dict[key] = value
assert str(shared_memory_dict) == str({key: value})
def test_have_a_dict_like_repr(self, shared_memory_dict, key, value):
shared_memory_dict[key] = value
assert repr(shared_memory_dict) == repr({key: value})
def test_should_return_dict_values(self, shared_memory_dict, key, value):
shared_memory_dict[key] = value
assert list(shared_memory_dict.values()) == [value]
def test_should_return_dict_items(self, shared_memory_dict, key, value):
shared_memory_dict[key] = value
assert list(shared_memory_dict.items()) == [(key, value)]
def test_pop_an_item_without_default(self, shared_memory_dict, key, value):
shared_memory_dict[key] = value
assert shared_memory_dict.pop(key) == value
def test_pop_an_item_with_default(self, shared_memory_dict, key, value):
shared_memory_dict[key] = value
default = 'default'
assert shared_memory_dict.pop('unknown', default) == default
def test_can_be_updated(self, shared_memory_dict, key, value):
shared_memory_dict.update({key: value})
assert shared_memory_dict[key] == value
def test_can_get_an_key_or_set_it_with_a_default(
self, shared_memory_dict, key, value
):
shared_memory_dict.setdefault(key, value)
assert shared_memory_dict[key] == value
| 35.761111
| 79
| 0.671741
| 853
| 6,437
| 4.717468
| 0.154748
| 0.238569
| 0.318091
| 0.259692
| 0.770129
| 0.718936
| 0.660785
| 0.619284
| 0.577783
| 0.54672
| 0
| 0.003267
| 0.239087
| 6,437
| 179
| 80
| 35.960894
| 0.818293
| 0
| 0
| 0.462069
| 0
| 0
| 0.064471
| 0
| 0
| 0
| 0
| 0
| 0.165517
| 1
| 0.2
| false
| 0
| 0.02069
| 0.013793
| 0.241379
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5d321533e111b0f55f93a9909ab56783e27abc17
| 243
|
py
|
Python
|
python/misc/learning_python/map_implementation_with_generator.py
|
TGITS/programming-workouts
|
799e805ccf3fd0936ec8ac2417f7193b8e9bcb55
|
[
"MIT"
] | null | null | null |
python/misc/learning_python/map_implementation_with_generator.py
|
TGITS/programming-workouts
|
799e805ccf3fd0936ec8ac2417f7193b8e9bcb55
|
[
"MIT"
] | 16
|
2020-05-30T12:38:13.000Z
|
2022-02-19T09:23:31.000Z
|
python/misc/learning_python/map_implementation_with_generator.py
|
TGITS/programming-workouts
|
799e805ccf3fd0936ec8ac2417f7193b8e9bcb55
|
[
"MIT"
] | null | null | null |
def my_map(transformation_function, sequence):
for elt in sequence:
yield transformation_function(elt)
powers_of_two = my_map(lambda x: x**2, range(1,11))
print(powers_of_two)
print(next(powers_of_two))
print(list(powers_of_two))
| 27
| 51
| 0.761317
| 40
| 243
| 4.325
| 0.55
| 0.184971
| 0.254335
| 0.184971
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018868
| 0.127572
| 243
| 9
| 52
| 27
| 0.79717
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0
| 0
| 0.142857
| 0.428571
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
5d65e513b9a3958779343c6267560fb4b838fc45
| 239
|
py
|
Python
|
Practice2/bubble_sort.py
|
amituttam/Projects
|
8f0f79d82f34459a60f24a718b08b0a79e6e31f1
|
[
"MIT"
] | null | null | null |
Practice2/bubble_sort.py
|
amituttam/Projects
|
8f0f79d82f34459a60f24a718b08b0a79e6e31f1
|
[
"MIT"
] | null | null | null |
Practice2/bubble_sort.py
|
amituttam/Projects
|
8f0f79d82f34459a60f24a718b08b0a79e6e31f1
|
[
"MIT"
] | null | null | null |
def bubble_sort(alist):
for _ in range(len(alist)-1,0,-1):
for i in range(_):
if alist[i] > alist[i+1]:
alist[i+1],alist[i] = alist[i],alist[i+1]
return alist
print(bubble_sort([1,4,2,3,9,0]))
| 23.9
| 57
| 0.531381
| 43
| 239
| 2.860465
| 0.418605
| 0.292683
| 0.268293
| 0.292683
| 0.317073
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069364
| 0.276151
| 239
| 9
| 58
| 26.555556
| 0.641619
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0
| 0
| 0.285714
| 0.142857
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5371c7e0902819137e533db633f0a1739e8c8561
| 217
|
py
|
Python
|
spec/data/image/layer_spec.py
|
PhilHarnish/forge
|
663f19d759b94d84935c14915922070635a4af65
|
[
"MIT"
] | 2
|
2020-08-18T18:43:09.000Z
|
2020-08-18T20:05:59.000Z
|
spec/data/image/layer_spec.py
|
PhilHarnish/forge
|
663f19d759b94d84935c14915922070635a4af65
|
[
"MIT"
] | null | null | null |
spec/data/image/layer_spec.py
|
PhilHarnish/forge
|
663f19d759b94d84935c14915922070635a4af65
|
[
"MIT"
] | null | null | null |
from data.image import layer
from spec.mamba import *
with description('layer'):
with description('constructor') as self:
with it('instantiates'):
expect(calling(layer.Layer, '', [])).not_to(raise_error)
| 27.125
| 62
| 0.705069
| 28
| 217
| 5.392857
| 0.714286
| 0.198676
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147465
| 217
| 7
| 63
| 31
| 0.816216
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5385ef39b6003ff71c6e6a27e2f043a90301084e
| 149
|
py
|
Python
|
sample.py
|
bjornsnoen/minica
|
2d9f65435b194e9a3f3ad3a8869264d9a9ebfa72
|
[
"MIT"
] | null | null | null |
sample.py
|
bjornsnoen/minica
|
2d9f65435b194e9a3f3ad3a8869264d9a9ebfa72
|
[
"MIT"
] | null | null | null |
sample.py
|
bjornsnoen/minica
|
2d9f65435b194e9a3f3ad3a8869264d9a9ebfa72
|
[
"MIT"
] | null | null | null |
from ctypes import cdll, c_char_p
print(
cdll.LoadLibrary("./minica").generateCertificate(
c_char_p("test.com".encode("utf-8"))
)
)
| 18.625
| 53
| 0.657718
| 20
| 149
| 4.7
| 0.8
| 0.106383
| 0.12766
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008197
| 0.181208
| 149
| 7
| 54
| 21.285714
| 0.762295
| 0
| 0
| 0
| 1
| 0
| 0.14094
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.166667
| 0
| 0.166667
| 0.166667
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
53a00270bd0b65aaa9ce739f512219274de4f705
| 186
|
py
|
Python
|
m-musicas/musicas.py
|
solito83/aprendendo-programar-em-python
|
af5bce7efa2ffa4d081c015830e3710044899924
|
[
"MIT"
] | null | null | null |
m-musicas/musicas.py
|
solito83/aprendendo-programar-em-python
|
af5bce7efa2ffa4d081c015830e3710044899924
|
[
"MIT"
] | null | null | null |
m-musicas/musicas.py
|
solito83/aprendendo-programar-em-python
|
af5bce7efa2ffa4d081c015830e3710044899924
|
[
"MIT"
] | null | null | null |
print ('Musicas')
import pygame
pygame.init()
pygame.mixer_music.load('musicas\pushme.mp3')
pygame.mixer_music.play()
#Não funcionou pesquisar mais se for necessario usar este código.
| 20.666667
| 65
| 0.784946
| 27
| 186
| 5.333333
| 0.777778
| 0.152778
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005988
| 0.102151
| 186
| 8
| 66
| 23.25
| 0.856287
| 0.344086
| 0
| 0
| 0
| 0
| 0.206612
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.2
| 0
| 0.2
| 0.2
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
53bce15ae3e704daae344be8cfbeb015e4c6f8c0
| 311
|
py
|
Python
|
mews/events/__init__.py
|
sandialabs/MEWS
|
0817022836c5617295a73ccd856b8519ce114bad
|
[
"BSD-3-Clause"
] | 11
|
2021-07-07T19:43:20.000Z
|
2022-03-29T16:00:44.000Z
|
mews/events/__init__.py
|
sandialabs/MEWS
|
0817022836c5617295a73ccd856b8519ce114bad
|
[
"BSD-3-Clause"
] | 2
|
2021-07-13T21:15:40.000Z
|
2022-01-14T20:22:39.000Z
|
mews/events/__init__.py
|
sandialabs/MEWS
|
0817022836c5617295a73ccd856b8519ce114bad
|
[
"BSD-3-Clause"
] | null | null | null |
"""
The Multi-scenario Extreme Weather Simulator (MEWS)
weather module reads in, alters, and writes out weather files
to account for extreme events or climate change.
"""
from mews.events.extreme_temperature_waves import ExtremeTemperatureWaves
from mews.events.extreme_temperature_waves import ClimateScenario
| 38.875
| 73
| 0.839228
| 41
| 311
| 6.268293
| 0.682927
| 0.062257
| 0.108949
| 0.163424
| 0.33463
| 0.33463
| 0.33463
| 0
| 0
| 0
| 0
| 0
| 0.109325
| 311
| 7
| 74
| 44.428571
| 0.927798
| 0.5209
| 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
| 0
| 0
|
0
| 4
|
53d6745f9348218d6429dd335a255bebc6f2a9d3
| 213
|
py
|
Python
|
django_project/telegrambot/usersmanage/admin.py
|
KARTASAR/DatingBot
|
fa20bb9188e6d9744ecdb35854ea54fb7ea8fd55
|
[
"MIT"
] | 12
|
2021-10-20T16:05:02.000Z
|
2022-03-22T14:20:30.000Z
|
django_project/telegrambot/usersmanage/admin.py
|
KARTASAR/DatingBot
|
fa20bb9188e6d9744ecdb35854ea54fb7ea8fd55
|
[
"MIT"
] | 17
|
2021-11-02T20:33:14.000Z
|
2022-03-17T11:45:24.000Z
|
django_project/telegrambot/usersmanage/admin.py
|
KARTASAR/DatingBot
|
fa20bb9188e6d9744ecdb35854ea54fb7ea8fd55
|
[
"MIT"
] | 7
|
2021-09-25T20:19:17.000Z
|
2022-02-20T09:31:41.000Z
|
from django.contrib import admin
from .models import User
# Register your models here.
@admin.register(User)
class UserAdmin(admin.ModelAdmin):
list_display = ("id", "telegram_id", "username", "created_at")
| 23.666667
| 66
| 0.746479
| 28
| 213
| 5.571429
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131455
| 213
| 8
| 67
| 26.625
| 0.843243
| 0.122066
| 0
| 0
| 0
| 0
| 0.167568
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
53f08224bb350931c0f10dd5a870824764891070
| 266
|
py
|
Python
|
plusseg/utils/collect_env.py
|
tonysy/SegmentationToolbox.PyTorch
|
4d487dd81d0101bc5cdb7b2337776fdf1b5546ff
|
[
"MIT"
] | 13
|
2019-07-26T11:33:15.000Z
|
2021-09-22T06:48:52.000Z
|
plusseg/utils/collect_env.py
|
tonysy/SegmentationToolbox.PyTorch
|
4d487dd81d0101bc5cdb7b2337776fdf1b5546ff
|
[
"MIT"
] | 1
|
2018-11-05T14:07:07.000Z
|
2018-11-05T14:07:07.000Z
|
plusseg/utils/collect_env.py
|
tonysy/SegmentationToolbox.PyTorch
|
4d487dd81d0101bc5cdb7b2337776fdf1b5546ff
|
[
"MIT"
] | 2
|
2019-07-26T11:33:32.000Z
|
2020-03-04T13:47:50.000Z
|
import PIL
from torch.utils.collect_env import get_pretty_env_info
def get_pil_version():
return "\n Pillow ({})".format(PIL.__version__)
def collect_env_info():
env_str = get_pretty_env_info()
env_str += get_pil_version()
return env_str
| 20.461538
| 55
| 0.714286
| 40
| 266
| 4.25
| 0.425
| 0.123529
| 0.141176
| 0.188235
| 0.188235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.18797
| 266
| 12
| 56
| 22.166667
| 0.787037
| 0
| 0
| 0
| 0
| 0
| 0.06391
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.125
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
54f1dcbf6b5941ca027da8a89e21369f230a6e98
| 5,249
|
py
|
Python
|
archive/data-processing/archive/features/hvr-tool-basic.py
|
FloFincke/affective-chat
|
241c2b555541968f7e5e70b022fdb71102aed510
|
[
"MIT"
] | null | null | null |
archive/data-processing/archive/features/hvr-tool-basic.py
|
FloFincke/affective-chat
|
241c2b555541968f7e5e70b022fdb71102aed510
|
[
"MIT"
] | 10
|
2020-01-28T22:17:46.000Z
|
2022-02-09T23:30:57.000Z
|
archive/data-processing/archive/features/hvr-tool-basic.py
|
FloFincke/affective-chat
|
241c2b555541968f7e5e70b022fdb71102aed510
|
[
"MIT"
] | null | null | null |
from hrv.classical import time_domain
import numpy as np
import math
rr = [0.116144, 0.8793759999999999, 0.813008, 0.8296, 0.8793759999999999, 0.862784, 0.813008, 0.8461919999999999, 0.813008, 0.796416, 0.779824, 0.813008, 0.796416, 0.9125599999999999, 0.713456, 0.74664, 0.796416, 0.796416, 0.796416, 0.8461919999999999, 0.8793759999999999, 0.895968, 0.895968, 0.895968, 0.929152, 0.962336, 0.680272, 0.779824, 0.74664, 0.7300479999999999, 0.7632319999999999, 0.8296, 0.862784, 0.813008, 1.1448479999999999, 0.7632319999999999, 0.713456, 0.862784, 0.813008, 0.813008, 0.779824, 0.7632319999999999, 0.813008, 0.862784, 0.9125599999999999, 0.9457439999999999, 0.9789279999999999, 0.8461919999999999, 0.779824, 0.779824, 0.779824, 0.8296, 0.8296, 0.8461919999999999, 0.8793759999999999, 0.962336, 0.8793759999999999, 0.7300479999999999, 0.796416, 0.8461919999999999, 0.8461919999999999, 0.895968, 1.012112, 0.813008, 1.012112, 0.8793759999999999, 0.8296, 0.779824, 0.6968639999999999, 0.9457439999999999, 0.597312, 0.779824, 0.6968639999999999, 0.680272, 0.18251199999999998, 0.8793759999999999, 0.613904, 0.464576, 0.929152, 0.680272, 0.033184, 0.38161599999999996, 0.315248, 0.199104, 0.38161599999999996, 0.033184, 0.232288, 0.36502399999999996, 0.597312, 0.464576, 0.597312, 0.597312, 0.033184, 0.564128, 0.58072, 0.547536, 0.630496, 0.613904, 0.895968, 0.6968639999999999, 0.7300479999999999, 0.547536, 0.713456, 0.8461919999999999, 0.7632319999999999, 0.74664, 0.74664, 0.779824, 0.8461919999999999, 0.8793759999999999, 0.895968, 0.813008, 0.99552, 0.962336, 0.9789279999999999, 0.796416, 0.8296, 0.813008, 0.779824, 0.779824, 0.713456, 0.713456, 0.74664, 0.862784, 0.895968, 0.929152, 0.99552, 0.7632319999999999, 0.929152, 0.74664, 0.929152, 1.0287039999999998, 0.9789279999999999, 1.012112, 1.2112159999999998, 0.9125599999999999, 0.4148, 0.481168, 0.813008, 0.08295999999999999, 0.779824, 0.066368, 0.149328, 1.2775839999999998, 0.9457439999999999, 0.962336, 0.9789279999999999, 0.9457439999999999, 0.9789279999999999, 0.8461919999999999, 0.8793759999999999, 0.8296, 0.7632319999999999, 0.9125599999999999, 0.9125599999999999, 0.9457439999999999, 0.929152, 0.895968, 0.8793759999999999, 0.862784, 0.8461919999999999, 0.647088, 0.6636799999999999, 0.8461919999999999, 0.8296, 0.6968639999999999, 0.779824, 0.8461919999999999, 0.862784, 0.8793759999999999, 0.8793759999999999, 0.8793759999999999, 0.929152, 0.9457439999999999, 0.9125599999999999, 0.9457439999999999, 0.895968, 0.9125599999999999, 0.8296, 0.862784, 0.862784, 0.8793759999999999, 0.8793759999999999, 0.862784, 0.8793759999999999, 0.862784, 0.895968, 0.862784, 0.862784, 0.862784, 0.8793759999999999, 0.8461919999999999, 0.8461919999999999, 0.8461919999999999, 0.8793759999999999, 0.862784, 0.862784, 0.862784, 0.8461919999999999, 0.8296, 0.813008, 0.796416, 0.8461919999999999, 0.813008, 0.813008, 0.8296, 0.8296, 1.178032, 0.862784, 0.895968, 0.7632319999999999, 0.680272, 0.929152, 0.613904, 0.862784, 0.680272, 0.813008, 0.862784, 1.227808, 0.99552, 0.74664, 0.8296, 0.8296, 0.813008, 0.813008, 0.8296, 0.862784, 0.862784, 0.862784, 0.9125599999999999, 0.929152, 0.9457439999999999, 0.9125599999999999, 0.8793759999999999, 0.8793759999999999, 0.862784, 0.862784, 0.8296, 0.8296, 0.813008, 0.8461919999999999, 0.8461919999999999, 0.813008, 0.813008, 0.813008, 0.8296, 1.045296, 0.8296, 0.8296, 0.9457439999999999, 1.41032, 0.58072, 0.962336, 0.282064, 0.630496, 0.862784, 0.680272, 0.895968, 0.315248, 0.18251199999999998, 0.6636799999999999, 0.8296, 0.796416, 0.8296, 0.8461919999999999, 0.8793759999999999, 0.9125599999999999, 0.8461919999999999, 0.8461919999999999, 0.813008, 0.779824, 0.779824, 0.8461919999999999, 0.9125599999999999, 0.9125599999999999, 0.895968, 0.9125599999999999, 0.9125599999999999, 0.929152, 0.9457439999999999, 0.8793759999999999, 0.8793759999999999, 1.045296, 0.647088, 0.7300479999999999, 0.796416, 0.779824, 0.813008, 0.779824, 0.813008, 0.862784, 0.8793759999999999, 0.929152, 0.895968, 1.012112, 0.813008, 0.7632319999999999, 0.796416, 0.7300479999999999, 0.74664, 0.813008, 0.8461919999999999, 0.862784, 0.862784, 0.862784, 0.8793759999999999, 0.895968, 0.862784, 0.8296, 0.8296, 0.862784, 0.8461919999999999, 0.8461919999999999, 0.8461919999999999, 0.8461919999999999, 0.8793759999999999, 0.8296, 0.862784, 1.045296, 0.8296, 0.481168, 0.8296, 0.862784, 0.8793759999999999, 0.895968, 0.8793759999999999, 0.9125599999999999, 0.895968, 0.9457439999999999, 0.929152, 0.9125599999999999, 0.929152, 0.9125599999999999, 0.895968, 0.813008, 0.613904, 0.613904, 0.9125599999999999, 1.1448479999999999, 0.895968, 0.862784, 0.796416, 0.6636799999999999, 0.813008, 0.8296, 0.862784, 0.895968, 0.862784, 0.8296, 0.713456, 0.6636799999999999, 0.796416, 0.7300479999999999, 0.895968, 1.128256, 0.8296, 0.564128, 0.647088, 0.813008, 0.7632319999999999, 0.9125599999999999, 1.0287039999999998, 0.8296, 0.862784, 0.7300479999999999, 0.8461919999999999]
results = time_domain(rr)
sdnn = np.std(rr)
results['sd1'] = math.sqrt(0.5 * sdnn * sdnn)
rrdiff = []
for i in range(1, len(rr) - 1):
rrdiff.append(rr[i - 1] - rr[i]);
sdsd = np.std(rrdiff)
sdnn = np.std(rr)
val = 2 * sdsd * sdsd - 0.5 * sdnn * sdnn
results['sd2'] = math.sqrt(val)
print(results)
| 228.217391
| 4,873
| 0.764527
| 800
| 5,249
| 5.01375
| 0.105
| 0.066318
| 0.071803
| 0.034904
| 0.626776
| 0.318624
| 0.30541
| 0.053603
| 0.053603
| 0
| 0
| 0.785699
| 0.083444
| 5,249
| 23
| 4,874
| 228.217391
| 0.048015
| 0
| 0
| 0.133333
| 0
| 0
| 0.001143
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0.066667
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
54feaf1edb89e530344d2b725874d3a15b47e53a
| 6,548
|
py
|
Python
|
test/validate/test_Schema.py
|
pip-services-python/pip-services-commons-python
|
ecfe0aab2b1442ed3b550115dd2c2472537452de
|
[
"MIT"
] | null | null | null |
test/validate/test_Schema.py
|
pip-services-python/pip-services-commons-python
|
ecfe0aab2b1442ed3b550115dd2c2472537452de
|
[
"MIT"
] | null | null | null |
test/validate/test_Schema.py
|
pip-services-python/pip-services-commons-python
|
ecfe0aab2b1442ed3b550115dd2c2472537452de
|
[
"MIT"
] | 2
|
2020-03-11T21:41:13.000Z
|
2020-03-14T00:26:20.000Z
|
# -*- coding: utf-8 -*-
"""
tests.validate.test_Schema
~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) Conceptual Vision Consulting LLC 2015-2016, see AUTHORS for more details.
:license: MIT, see LICENSE for more details.
"""
from pip_services3_commons.convert import TypeCode
from pip_services3_commons.validate import ArraySchema
from pip_services3_commons.validate import MapSchema
from pip_services3_commons.validate import ObjectSchema
from pip_services3_commons.validate import Schema
from .ObjectTest import ObjectTest
class TestSchema:
def test_empty_schema(self):
schema = ObjectSchema()
results = schema.validate(None)
assert 0 == len(results)
def test_required(self):
schema = Schema().make_required()
results = schema.validate(None)
assert 1 == len(results)
def test_unexpected(self):
schema = ObjectSchema()
obj = ObjectTest()
results = schema.validate(obj)
assert 10 == len(results)
def test_optional_properties(self):
schema = ObjectSchema() \
.with_optional_property("int_field", None) \
.with_optional_property("string_property", None) \
.with_optional_property("null_property", None) \
.with_optional_property("int_array_property", None) \
.with_optional_property("string_list_property", None) \
.with_optional_property("map_property", None) \
.with_optional_property("sub_object_property", None) \
.with_optional_property("sub_array_property", None)
obj = ObjectTest()
results = schema.validate(obj)
assert 2 == len(results)
def test_required_properties(self):
schema = ObjectSchema() \
.with_required_property('__private_field') \
.with_required_property('__private_property') \
.with_required_property("int_field") \
.with_required_property("string_property") \
.with_required_property("null_property") \
.with_required_property("int_array_property") \
.with_required_property("string_list_property") \
.with_required_property("map_property") \
.with_required_property("sub_object_property") \
.with_required_property("sub_array_property")
obj = ObjectTest()
obj.sub_array_property = None
results = schema.validate(obj)
assert 2 == len(results)
def test_object_types(self):
schema = ObjectSchema() \
.with_required_property('__private_field') \
.with_required_property('__private_property') \
.with_required_property("int_field", TypeCode.Long) \
.with_required_property("string_property", TypeCode.String) \
.with_optional_property("null_property", TypeCode.Object) \
.with_required_property("int_array_property", TypeCode.Array) \
.with_required_property("string_list_property", TypeCode.Array) \
.with_required_property("map_property", TypeCode.Map) \
.with_required_property("sub_object_property", TypeCode.Object) \
.with_required_property("sub_array_property", TypeCode.Array)
obj = ObjectTest()
results = schema.validate(obj)
assert 0 == len(results)
def test_string_types(self):
schema = ObjectSchema() \
.with_required_property('__private_field') \
.with_required_property('__private_property') \
.with_required_property("int_field", TypeCode.Long) \
.with_required_property("string_property", TypeCode.String) \
.with_optional_property("null_property", TypeCode.Object) \
.with_required_property("int_array_property", TypeCode.Array) \
.with_required_property("string_list_property", TypeCode.Array) \
.with_required_property("map_property", TypeCode.Map) \
.with_required_property("sub_object_property", TypeCode.Map) \
.with_required_property("sub_array_property", TypeCode.Array)
obj = ObjectTest()
obj.sub_object_property = {'test_map': 123}
results = schema.validate(obj)
assert 0 == len(results)
def test_sub_schema(self):
sub_schema = ObjectSchema() \
.with_required_property("id", TypeCode.String) \
.with_required_property("float_field", TypeCode.Double) \
.with_optional_property("null_property", TypeCode.Map)
schema = ObjectSchema() \
.with_required_property('__private_field') \
.with_required_property('__private_property') \
.with_required_property("int_field", TypeCode.Long) \
.with_required_property("string_property", TypeCode.String) \
.with_optional_property("null_property", TypeCode.Object) \
.with_required_property("int_array_property", TypeCode.Array) \
.with_required_property("string_list_property", TypeCode.Array) \
.with_required_property("map_property", TypeCode.Map) \
.with_required_property("sub_object_property", sub_schema) \
.with_required_property("sub_array_property", TypeCode.Array)
obj = ObjectTest()
results = schema.validate(obj)
assert 0 == len(results)
def test_array_and_map_schema(self):
sub_schema = ObjectSchema() \
.with_required_property("id", TypeCode.String) \
.with_required_property("float_field", TypeCode.Double) \
.with_optional_property("null_property", TypeCode.Map)
schema = ObjectSchema() \
.with_required_property('__private_field') \
.with_required_property('__private_property') \
.with_required_property("int_field", TypeCode.Long) \
.with_required_property("string_property", TypeCode.String) \
.with_optional_property("null_property", TypeCode.Object) \
.with_required_property("int_array_property", ArraySchema(TypeCode.Long)) \
.with_required_property("string_list_property", ArraySchema(TypeCode.String)) \
.with_required_property("map_property", MapSchema(TypeCode.String, TypeCode.Long)) \
.with_required_property("sub_object_property", sub_schema) \
.with_required_property("sub_array_property", ArraySchema(sub_schema))
obj = ObjectTest()
results = schema.validate(obj)
assert 0 == len(results)
| 44.243243
| 96
| 0.66066
| 669
| 6,548
| 6.056801
| 0.106129
| 0.148075
| 0.246792
| 0.076012
| 0.838845
| 0.73618
| 0.626357
| 0.611797
| 0.611797
| 0.611797
| 0
| 0.005371
| 0.232285
| 6,548
| 147
| 97
| 44.544218
| 0.800676
| 0.032376
| 0
| 0.635593
| 0
| 0
| 0.153614
| 0
| 0
| 0
| 0
| 0
| 0.076271
| 1
| 0.076271
| false
| 0
| 0.050847
| 0
| 0.135593
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
54feb885ff0deca5075f234e26a369ca4f0882cf
| 87
|
py
|
Python
|
backend/server/mlearn/apps.py
|
jarifrahman/mlearn
|
63d4da28bba1e05b077ba0bf27aa4793caedaf10
|
[
"MIT"
] | null | null | null |
backend/server/mlearn/apps.py
|
jarifrahman/mlearn
|
63d4da28bba1e05b077ba0bf27aa4793caedaf10
|
[
"MIT"
] | 5
|
2021-03-19T12:01:28.000Z
|
2021-06-10T20:28:47.000Z
|
backend/server/mlearn/apps.py
|
jarifrahman/mlearn
|
63d4da28bba1e05b077ba0bf27aa4793caedaf10
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class MlearnConfig(AppConfig):
name = 'mlearn'
| 14.5
| 33
| 0.747126
| 10
| 87
| 6.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172414
| 87
| 5
| 34
| 17.4
| 0.902778
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
070c8f80728dc178eeccdcfa9aa51ed8eeebc83d
| 88
|
py
|
Python
|
call_jcdecaux.py
|
pchtsp/transport_api
|
d3c727adf9f9cc1243d0888096f08fa597006ad6
|
[
"MIT"
] | null | null | null |
call_jcdecaux.py
|
pchtsp/transport_api
|
d3c727adf9f9cc1243d0888096f08fa597006ad6
|
[
"MIT"
] | null | null | null |
call_jcdecaux.py
|
pchtsp/transport_api
|
d3c727adf9f9cc1243d0888096f08fa597006ad6
|
[
"MIT"
] | null | null | null |
# backwards compatibility
from jcdecaux import cli
if __name__ == '__main__':
cli()
| 17.6
| 26
| 0.727273
| 10
| 88
| 5.6
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 88
| 5
| 27
| 17.6
| 0.777778
| 0.261364
| 0
| 0
| 0
| 0
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0721990801017c975428b7c0631f65ac21a57181
| 139
|
py
|
Python
|
Python-ModifyingListElements.py
|
H2oPtic/Codecademy-Education
|
454ecff36a055fa17b4b338e1c6f1e9b3b94ef66
|
[
"MIT"
] | null | null | null |
Python-ModifyingListElements.py
|
H2oPtic/Codecademy-Education
|
454ecff36a055fa17b4b338e1c6f1e9b3b94ef66
|
[
"MIT"
] | null | null | null |
Python-ModifyingListElements.py
|
H2oPtic/Codecademy-Education
|
454ecff36a055fa17b4b338e1c6f1e9b3b94ef66
|
[
"MIT"
] | null | null | null |
garden_waitlist = ["Jiho", "Adam", "Sonny", "Alisha"]
garden_waitlist[1] = "Calla"
garden_waitlist[-1] = "Alex"
print(garden_waitlist)
| 27.8
| 54
| 0.683453
| 17
| 139
| 5.352941
| 0.588235
| 0.615385
| 0.32967
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016393
| 0.122302
| 139
| 4
| 55
| 34.75
| 0.729508
| 0
| 0
| 0
| 0
| 0
| 0.207407
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 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
| 0
| 0
|
0
| 4
|
072d03d833443202c99fb6fcc15ad455519d78fc
| 255
|
py
|
Python
|
posts/admin.py
|
dharati-code/SMA-Team-4
|
dc2250d09a7943f82f5092bb94d3f357420aba3f
|
[
"MIT"
] | null | null | null |
posts/admin.py
|
dharati-code/SMA-Team-4
|
dc2250d09a7943f82f5092bb94d3f357420aba3f
|
[
"MIT"
] | null | null | null |
posts/admin.py
|
dharati-code/SMA-Team-4
|
dc2250d09a7943f82f5092bb94d3f357420aba3f
|
[
"MIT"
] | 11
|
2021-07-15T20:55:50.000Z
|
2021-10-01T13:33:38.000Z
|
from django.contrib import admin
from .models import Posts, PostCategory, PostLikes, PostComments
# Register your models here.
admin.site.register(Posts)
admin.site.register(PostCategory)
admin.site.register(PostLikes)
admin.site.register(PostComments)
| 25.5
| 64
| 0.823529
| 32
| 255
| 6.5625
| 0.4375
| 0.171429
| 0.32381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086275
| 255
| 9
| 65
| 28.333333
| 0.901288
| 0.101961
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
074de9f6684dfd2ee7ac55a10d04d67d194c8021
| 67
|
py
|
Python
|
tcex/api/tc/v3/threat_intelligence/__init__.py
|
GShepherdTC/tcex
|
70b1199b8bb9e63f53e2ba792489267108c909cd
|
[
"Apache-2.0"
] | null | null | null |
tcex/api/tc/v3/threat_intelligence/__init__.py
|
GShepherdTC/tcex
|
70b1199b8bb9e63f53e2ba792489267108c909cd
|
[
"Apache-2.0"
] | null | null | null |
tcex/api/tc/v3/threat_intelligence/__init__.py
|
GShepherdTC/tcex
|
70b1199b8bb9e63f53e2ba792489267108c909cd
|
[
"Apache-2.0"
] | null | null | null |
"""ThreatConnect API Threat Intelligence Module."""
# flake8: noqa
| 22.333333
| 51
| 0.746269
| 7
| 67
| 7.142857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016949
| 0.119403
| 67
| 2
| 52
| 33.5
| 0.830508
| 0.880597
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
075c7f1317de86f30a6e6f8af1364bc39286c24f
| 290
|
py
|
Python
|
back-end/curso-em-video/python3/Mundo I/Desafios/6F - (Dobro, Triplo e Raiz).py
|
gustavocamalionti/cursos-e-linguagens
|
615db91aff13db5678a783aac69df11231c925e8
|
[
"MIT"
] | null | null | null |
back-end/curso-em-video/python3/Mundo I/Desafios/6F - (Dobro, Triplo e Raiz).py
|
gustavocamalionti/cursos-e-linguagens
|
615db91aff13db5678a783aac69df11231c925e8
|
[
"MIT"
] | null | null | null |
back-end/curso-em-video/python3/Mundo I/Desafios/6F - (Dobro, Triplo e Raiz).py
|
gustavocamalionti/cursos-e-linguagens
|
615db91aff13db5678a783aac69df11231c925e8
|
[
"MIT"
] | null | null | null |
#Desafio 006: Crie um algoritmo que mostre o seu dobro, triplo e raiz quadrada.
n1 = float(input('Digite um número:'))
print(f'Sabemos que: \n O dobro de {n1} é {n1*2:.3f} \n O Triplo de {n1} é {n1*3:.3f} \n E a raiz quadrada de {n1}, com 3 números depois da vírgula vale {n1**(1/2):.3f}')
| 72.5
| 170
| 0.668966
| 60
| 290
| 3.233333
| 0.6
| 0.061856
| 0.051546
| 0.072165
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075
| 0.172414
| 290
| 4
| 170
| 72.5
| 0.733333
| 0.268966
| 0
| 0
| 0
| 0.5
| 0.834906
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
07654f121e76a1cc61459240aa79e9a2a8778159
| 265
|
py
|
Python
|
genesys/genesys/codelets/__init__.py
|
ziqingzeng/public
|
4102b3bd42f43b49cf74599492d52d4f755ab7b2
|
[
"BSD-3-Clause"
] | 6
|
2021-04-20T06:33:25.000Z
|
2022-02-24T06:46:13.000Z
|
genesys/genesys/codelets/__init__.py
|
ziqingzeng/public
|
4102b3bd42f43b49cf74599492d52d4f755ab7b2
|
[
"BSD-3-Clause"
] | 3
|
2021-04-20T04:28:51.000Z
|
2021-05-24T05:14:31.000Z
|
genesys/genesys/codelets/__init__.py
|
ziqingzeng/public
|
4102b3bd42f43b49cf74599492d52d4f755ab7b2
|
[
"BSD-3-Clause"
] | 4
|
2021-04-08T16:38:46.000Z
|
2021-04-30T05:51:30.000Z
|
from . import graph
from . import adl
from .adl import util
from .compiler import initialize_program
from .compiler.compilation_stages import tile, hoist, pad_operands, update_operand_dtypes,\
update_batch_size, add_backprop
from .adl.operation import Datatype
| 33.125
| 91
| 0.822642
| 37
| 265
| 5.675676
| 0.621622
| 0.095238
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.124528
| 265
| 7
| 92
| 37.857143
| 0.905172
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.857143
| 0
| 0.857143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4acb7d23b38790c31cf950bbceec291caff46206
| 5,753
|
py
|
Python
|
sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties.py
|
pjquirk/azure-sdk-for-python
|
cbf02ec4f177b96eae1dbbba87c34c2c93880150
|
[
"MIT"
] | 1
|
2021-09-07T18:36:04.000Z
|
2021-09-07T18:36:04.000Z
|
sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties.py
|
pjquirk/azure-sdk-for-python
|
cbf02ec4f177b96eae1dbbba87c34c2c93880150
|
[
"MIT"
] | 2
|
2019-10-02T23:37:38.000Z
|
2020-10-02T01:17:31.000Z
|
sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties.py
|
xiafu-msft/azure-sdk-for-python
|
4d9560cfd519ee60667f3cc2f5295a58c18625db
|
[
"MIT"
] | null | null | null |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
class ProjectTaskProperties(Model):
"""Base class for all types of DMS task properties. If task is not supported
by current client, this object is returned.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: GetTdeCertificatesSqlTaskProperties,
ValidateMongoDbTaskProperties,
ValidateMigrationInputSqlServerSqlMISyncTaskProperties,
ValidateMigrationInputSqlServerSqlMITaskProperties,
ValidateMigrationInputSqlServerSqlDbSyncTaskProperties,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties,
MigrateMySqlAzureDbForMySqlSyncTaskProperties,
MigrateSqlServerSqlDbSyncTaskProperties,
MigrateSqlServerSqlDbTaskProperties,
MigrateSqlServerSqlMISyncTaskProperties,
MigrateSqlServerSqlMITaskProperties, MigrateMongoDbTaskProperties,
ConnectToTargetAzureDbForMySqlTaskProperties,
ConnectToTargetSqlMISyncTaskProperties, ConnectToTargetSqlMITaskProperties,
GetUserTablesSqlSyncTaskProperties, GetUserTablesSqlTaskProperties,
ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties,
ConnectToTargetSqlSqlDbSyncTaskProperties,
ConnectToTargetSqlDbTaskProperties,
ConnectToSourcePostgreSqlSyncTaskProperties,
ConnectToSourceSqlServerSyncTaskProperties,
ConnectToSourceSqlServerTaskProperties, ConnectToMongoDbTaskProperties,
ConnectToSourceMySqlTaskProperties,
MigrateSchemaSqlServerSqlDbTaskProperties
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar errors: Array of errors. This is ignored if submitted.
:vartype errors: list[~azure.mgmt.datamigration.models.ODataError]
:ivar state: The state of the task. This is ignored if submitted. Possible
values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded',
'Failed', 'FailedInputValidation', 'Faulted'
:vartype state: str or ~azure.mgmt.datamigration.models.TaskState
:ivar commands: Array of command properties.
:vartype commands:
list[~azure.mgmt.datamigration.models.CommandProperties]
:param client_data: Key value pairs of client data to attach meta data
information to task
:type client_data: dict[str, str]
:param task_type: Required. Constant filled by server.
:type task_type: str
"""
_validation = {
'errors': {'readonly': True},
'state': {'readonly': True},
'commands': {'readonly': True},
'task_type': {'required': True},
}
_attribute_map = {
'errors': {'key': 'errors', 'type': '[ODataError]'},
'state': {'key': 'state', 'type': 'str'},
'commands': {'key': 'commands', 'type': '[CommandProperties]'},
'client_data': {'key': 'clientData', 'type': '{str}'},
'task_type': {'key': 'taskType', 'type': 'str'},
}
_subtype_map = {
'task_type': {'GetTDECertificates.Sql': 'GetTdeCertificatesSqlTaskProperties', 'Validate.MongoDb': 'ValidateMongoDbTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS': 'ValidateMigrationInputSqlServerSqlMISyncTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'ValidateMigrationInput.SqlServer.SqlDb.Sync': 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties', 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.MySql.AzureDbForMySql.Sync': 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDb.Sync': 'MigrateSqlServerSqlDbSyncTaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI.Sync.LRS': 'MigrateSqlServerSqlMISyncTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMITaskProperties', 'Migrate.MongoDb': 'MigrateMongoDbTaskProperties', 'ConnectToTarget.AzureDbForMySql': 'ConnectToTargetAzureDbForMySqlTaskProperties', 'ConnectToTarget.AzureSqlDbMI.Sync.LRS': 'ConnectToTargetSqlMISyncTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMITaskProperties', 'GetUserTables.AzureSqlDb.Sync': 'GetUserTablesSqlSyncTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.AzureDbForPostgreSql.Sync': 'ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.SqlDb.Sync': 'ConnectToTargetSqlSqlDbSyncTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.PostgreSql.Sync': 'ConnectToSourcePostgreSqlSyncTaskProperties', 'ConnectToSource.SqlServer.Sync': 'ConnectToSourceSqlServerSyncTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties', 'Connect.MongoDb': 'ConnectToMongoDbTaskProperties', 'ConnectToSource.MySql': 'ConnectToSourceMySqlTaskProperties', 'MigrateSchemaSqlServerSqlDb': 'MigrateSchemaSqlServerSqlDbTaskProperties'}
}
def __init__(self, **kwargs):
super(ProjectTaskProperties, self).__init__(**kwargs)
self.errors = None
self.state = None
self.commands = None
self.client_data = kwargs.get('client_data', None)
self.task_type = None
| 63.922222
| 2,040
| 0.763428
| 422
| 5,753
| 10.350711
| 0.440758
| 0.012821
| 0.01511
| 0.019231
| 0.025641
| 0
| 0
| 0
| 0
| 0
| 0
| 0.000198
| 0.121154
| 5,753
| 89
| 2,041
| 64.640449
| 0.863726
| 0.455936
| 0
| 0
| 0
| 0
| 0.693822
| 0.593347
| 0
| 0
| 0
| 0
| 0
| 1
| 0.04
| false
| 0
| 0.04
| 0
| 0.24
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4ad59262188f18cf97ef479c45ac6a618ee076d4
| 34
|
py
|
Python
|
Python/Iniciante/1957.py
|
TiagoSanti/uri-solutions
|
e80d9e2874cac13e721a96d7aeb075e7d72ceb2d
|
[
"MIT"
] | null | null | null |
Python/Iniciante/1957.py
|
TiagoSanti/uri-solutions
|
e80d9e2874cac13e721a96d7aeb075e7d72ceb2d
|
[
"MIT"
] | null | null | null |
Python/Iniciante/1957.py
|
TiagoSanti/uri-solutions
|
e80d9e2874cac13e721a96d7aeb075e7d72ceb2d
|
[
"MIT"
] | null | null | null |
V = int(input())
print('%X' % V)
| 8.5
| 16
| 0.470588
| 6
| 34
| 2.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.205882
| 34
| 3
| 17
| 11.333333
| 0.592593
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
ab1e5c571753069bf75c9f430990aff5bf8ed9ff
| 256
|
py
|
Python
|
src/agx/generator/uml/__init__.py
|
bluedynamics/agx.generator.uml
|
aa831f92458592b31aef0724c995c03649ff74b6
|
[
"BSD-3-Clause"
] | 1
|
2019-07-09T12:50:00.000Z
|
2019-07-09T12:50:00.000Z
|
src/agx/generator/uml/__init__.py
|
bluedynamics/agx.generator.uml
|
aa831f92458592b31aef0724c995c03649ff74b6
|
[
"BSD-3-Clause"
] | null | null | null |
src/agx/generator/uml/__init__.py
|
bluedynamics/agx.generator.uml
|
aa831f92458592b31aef0724c995c03649ff74b6
|
[
"BSD-3-Clause"
] | null | null | null |
import profile
import hierarchy
import datatypedependent
import stereotypes
def register():
"""Register this generator.
"""
import agx.generator.uml
from agx.core.config import register_generator
register_generator(agx.generator.uml)
| 19.692308
| 50
| 0.761719
| 29
| 256
| 6.655172
| 0.482759
| 0.124352
| 0.15544
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.167969
| 256
| 12
| 51
| 21.333333
| 0.906103
| 0.09375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| true
| 0
| 0.75
| 0
| 0.875
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ab377abb5d3c83752547b02f25c1a8f0e75230a1
| 2,417
|
py
|
Python
|
startup/16-ptycho.py
|
NSLS-II-HXN/ipython_ophyd
|
c257ea567eb0aaa4149237df1e2a774ff16f2d0a
|
[
"BSD-2-Clause"
] | null | null | null |
startup/16-ptycho.py
|
NSLS-II-HXN/ipython_ophyd
|
c257ea567eb0aaa4149237df1e2a774ff16f2d0a
|
[
"BSD-2-Clause"
] | 10
|
2016-02-18T20:25:32.000Z
|
2021-09-25T20:05:17.000Z
|
startup/16-ptycho.py
|
NSLS-II-HXN/ipython_ophyd
|
c257ea567eb0aaa4149237df1e2a774ff16f2d0a
|
[
"BSD-2-Clause"
] | 5
|
2016-09-30T16:09:27.000Z
|
2019-09-13T20:30:32.000Z
|
from ophyd import (EpicsMotor, Device, Component as Cpt)
class HxnPrototypeMicroscope(Device):
vx = Cpt(EpicsMotor, 'XF:03IDC-ES{Proto:1-Ax:1}Mtr')
vy = Cpt(EpicsMotor, 'XF:03IDC-ES{Proto:1-Ax:2}Mtr')
vz = Cpt(EpicsMotor, 'XF:03IDC-ES{MC:4-Ax:8}Mtr')
v_rz = Cpt(EpicsMotor, 'XF:03IDC-ES{Proto:1-Ax:3}Mtr')
v_rx = Cpt(EpicsMotor, 'XF:03IDC-ES{Proto:1-Ax:4}Mtr')
v_ry = Cpt(EpicsMotor, 'XF:03IDC-ES{MCS:4-Ax:1}Mtr')
osa_rz = Cpt(EpicsMotor, 'XF:03IDC-ES{Proto:1-Ax:5}Mtr')
osa_ry = Cpt(EpicsMotor,'XF:03IDC-ES{MC:4-Ax:1}Mtr')
osay = Cpt(EpicsMotor, 'XF:03IDC-ES{Proto:1-Ax:6}Mtr')
osax = Cpt(EpicsMotor, 'XF:03IDC-ES{Proto:1-Ax:7}Mtr')
osaz = Cpt(EpicsMotor, 'XF:03IDC-ES{Proto:1-Ax:8}Mtr')
#ssx = Cpt(EpicsMotor, 'XF:03IDC-ES{Ddrive:1-Ax:2}Mtr')
#ssy = Cpt(EpicsMotor, 'XF:03IDC-ES{Ddrive:1-Ax:3}Mtr')
#ssz = Cpt(EpicsMotor, 'XF:03IDC-ES{Ddrive:1-Ax:1}Mtr')
#vz = Cpt(EpicsMotor, 'XF:03IDC-ES{MMC100:1-Ax:1}Mtr')
#cz = Cpt(EpicsMotor, 'XF:03IDC-ES{MMC100:1-Ax:2}Mtr')
#cx = Cpt(EpicsMotor, 'XF:03IDC-ES{MMC100:1-Ax:3}Mtr')
#cy = Cpt(EpicsMotor, 'XF:03IDC-ES{ANC350:9-Ax:0}Mtr')
#bz = Cpt(EpicsMotor, 'XF:03IDC-ES{MC:4-Ax:4}Mtr')
#bx = Cpt(EpicsMotor, 'XF:03IDC-ES{MC:4-Ax:2}Mtr')
bsx = Cpt(EpicsMotor, 'XF:03IDC-ES{MCS:3-Ax:1}Mtr')
bsy = Cpt(EpicsMotor, 'XF:03IDC-ES{MCS:3-Ax:3}Mtr')
bsz = Cpt(EpicsMotor, 'XF:03IDC-ES{MCS:3-Ax:2}Mtr')
#vth = Cpt(EpicsMotor, 'XF:03IDC-ES{MCS:4-Ax:1}Mtr')
p = HxnPrototypeMicroscope('', name='p')
p_vx = p.vx
p_vy = p.vy
p_vz = p.vz
p_v_rx = p.v_rx
p_v_ry = p.v_ry
p_v_rz = p.v_rz
p_osa_rz = p.osa_rz
p_osa_ry = p.osa_ry
p_osay = p.osay
p_osax = p.osax
p_osaz = p.osaz
#p_ssx = p.ssx
#p_ssy = p.ssy
#p_ssz = p.ssz
#p_vz = p.vz
#p_cz = p.cz
#p_cx = p.cx
#p_cy = p.cy
#p_bz = p.bz
#p_bx = p.bx
p_bsx = p.bsx
p_bsy = p.bsy
p_bsz = p.bsz
#p_vth = p.vth
class HxnPrototypeSample(Device):
sbx = Cpt(EpicsMotor, 'XF:03IDC-ES{ANC350:9-Ax:3}Mtr')
sby = Cpt(EpicsMotor, 'XF:03IDC-ES{ANC350:9-Ax:2}Mtr')
sbz = Cpt(EpicsMotor, 'XF:03IDC-ES{ANC350:9-Ax:1}Mtr')
ps = HxnPrototypeSample('', name='ps')
p_sbx = ps.sbx
p_sby = ps.sby
p_sbz = ps.sbz
class HxnPrototypePhasePlate(Device):
pp_x = Cpt(EpicsMotor, 'XF:03IDC-ES{PPlate:X}Mtr')
pp_y = Cpt(EpicsMotor, 'XF:03IDC-ES{PPlate:Y}Mtr')
pp = HxnPrototypePhasePlate('',name='pp')
p_pp_x = pp.pp_x
p_pp_y = pp.pp_y
| 27.781609
| 60
| 0.646256
| 481
| 2,417
| 3.143451
| 0.137214
| 0.249339
| 0.287698
| 0.383598
| 0.614418
| 0.593915
| 0.542328
| 0.535714
| 0.084656
| 0.042328
| 0
| 0.064783
| 0.1506
| 2,417
| 86
| 61
| 28.104651
| 0.6717
| 0.265205
| 0
| 0
| 0
| 0
| 0.295157
| 0.292308
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.022222
| 0
| 0.511111
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
ab48b52dd9343baf8463df4d8d6ff9adf8611e99
| 3,726
|
py
|
Python
|
var/spack/repos/builtin/packages/mochi-margo/package.py
|
FJ-NaokiMatsumura/spack
|
7cfe626e21795f0a4bfe61f36ca1b48ffd2fc961
|
[
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null |
var/spack/repos/builtin/packages/mochi-margo/package.py
|
FJ-NaokiMatsumura/spack
|
7cfe626e21795f0a4bfe61f36ca1b48ffd2fc961
|
[
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 5
|
2021-11-29T17:23:20.000Z
|
2022-03-02T17:29:12.000Z
|
var/spack/repos/builtin/packages/mochi-margo/package.py
|
FJ-NaokiMatsumura/spack
|
7cfe626e21795f0a4bfe61f36ca1b48ffd2fc961
|
[
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null |
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class MochiMargo(AutotoolsPackage):
"""A library that provides Argobots bindings to the Mercury RPC
implementation."""
homepage = 'https://github.com/mochi-hpc/mochi-margo'
git = 'https://github.com/mochi-hpc/mochi-margo.git'
url = 'https://github.com/mochi-hpc/mochi-margo/archive/v0.9.tar.gz'
maintainers = ['carns', 'mdorier', 'fbudin69500', 'chuckatkins']
version('main', branch='main')
version('0.9.8', sha256='a139e804bf0b2725433c256e8315a2ba896f1fb34d9057261a4b92df783ffbbb')
version('0.9.7', sha256='ab45c5594f10d7d8cf8e67529b3972f7174b4ee5e3fbcd8446658490a884c5e2')
version('0.9.6', sha256='fa339cc9621542fb398bb9fcd6b081d3578c75c3f398f3e6b05033f24ea63e33')
version('0.9.5', sha256='b5c52477a82aa44a079f876cbb8166d0bce5a07a92bcf8a0c76670b245e728a3')
version('0.9.4', sha256='4292e083c8375ab07bc6dd0b3b1ea2ce9c9dd864c27ac7f07c6913dcccecc746')
version('0.9.3', sha256='1331423d4864349c3a9ec52b2114122659da310d5270fa1aea652e8ee48a0b3a')
version('0.9.2', sha256='de88cd725c8ff3ec63412f3f5ed22ad1a56cb367c31b842c816ce40cba777f7c')
version('0.9.1', sha256='3fe933f2d758ef23d582bc776e4f8cfae9bf9d0849b8b1f9d73ee024e218f2bc')
version('0.9', sha256='a24376f66450cc8fd7a43043e189f8efce5a931585e53c1e2e41894a3e99b517')
version('0.7', sha256='492d1afe2e7984fa638614a5d34486d2ff761f5599b5984efd5ae3f55cafde54')
version('0.7.2', sha256='0ca796abdb82084813a5de033d92364910b5ad1a0df135534d6b1c36ef627859')
version('0.7.1', sha256='eebbe02c47ed4c65ef1d4f23ffdc6a8aa2e2348ca6c51bfc3c4dfbf78fbfc30b')
version('0.6', sha256='56feb718da2b155d7277a7b10b669516ebffaa034f811f3665ceed7ad0f19d1b')
version('0.6.4', sha256='5ba1c72ee05aa9738d3dc4d6d01bd59790284c6c77b909c5d7756fe7049d6177')
version('0.6.3', sha256='5f373cd554edd15cead58bd5d30093bd88d45039d06ff7738eb18b3674287c76')
version('0.6.2', sha256='c6a6909439e1d3ba1a1693d8da66057eb7e4ec4b239c04bc7f19fc487c4c58da')
version('0.6.1', sha256='80d8d15d0917b5522c31dc2d83136de2313d50ca05c71c5e5ad83c483a3214b7')
version('0.5', sha256='d3b768b8300bc2cb87964e74c39b4e8eb9822d8a2e56fc93dc475ddcb1a868e3')
version('0.5.2', sha256='73be3acaf012a85a91ac62824c93f5ee1ea0ffe4c25779ece19723f4baf9547d')
version('0.5.1', sha256='6fdf58e189538e22341c8361ab069fc80fe5460a6869882359b295a890febad7')
version('0.4.7', sha256='596d83b11fb2bd9950fd99c9ab12c14915ab2cda233084ae40ecae1e6c584333')
version('0.4.6', sha256='b27447a2050ae61091bae3ff6b4d23a56153947f18847face9f98facbdb4e329')
version('0.4.5', sha256='b0d02f73edf180f2393f54c5a980620b8d6dcd42b90efdea6866861824fa49cf')
version('0.4.4', sha256='2e2e6e2a8a7d7385e2fe204c113cb149f30847f0b1f48ec8dd708a74280bd89e')
version('0.4.3', sha256='61a634d6983bee2ffa06e1e2da4c541cb8f56ddd9dd9f8e04e8044fb38657475')
version('0.4.2', sha256='91085e28f50e373b9616e1ae5c3c8d40a19a7d3776259592d8f361766890bcaa')
depends_on('json-c', when='@0.9:')
depends_on('autoconf@2.65:', type=("build"))
depends_on('m4', type=('build'))
depends_on('automake', type=("build"))
depends_on('libtool', type=("build"))
depends_on('pkgconfig', type=("build"))
depends_on('argobots@1.0:')
# "breadcrumb" support not available in mercury-1.0
depends_on('mercury@1.0.0:', type=("build", "link", "run"), when='@:0.5.1')
depends_on('mercury@2.0.0:', type=("build", "link", "run"), when='@0.5.2:')
def autoreconf(self, spec, prefix):
sh = which('sh')
sh('./prepare.sh')
| 61.081967
| 95
| 0.773215
| 323
| 3,726
| 8.891641
| 0.393189
| 0.072423
| 0.028203
| 0.031337
| 0.052228
| 0.052228
| 0.052228
| 0.041086
| 0.016713
| 0
| 0
| 0.360593
| 0.094203
| 3,726
| 60
| 96
| 62.1
| 0.49037
| 0.084809
| 0
| 0
| 0
| 0.022222
| 0.630448
| 0.489988
| 0
| 0
| 0
| 0
| 0
| 1
| 0.022222
| false
| 0
| 0.022222
| 0
| 0.155556
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ab4ebd6255f4b428c623c0dbbaaf9eb0ccdea384
| 429
|
py
|
Python
|
INBa/2015/ZORIN_D_I/task_2_7.py
|
YukkaSarasti/pythonintask
|
eadf4245abb65f4400a3bae30a4256b4658e009c
|
[
"Apache-2.0"
] | null | null | null |
INBa/2015/ZORIN_D_I/task_2_7.py
|
YukkaSarasti/pythonintask
|
eadf4245abb65f4400a3bae30a4256b4658e009c
|
[
"Apache-2.0"
] | null | null | null |
INBa/2015/ZORIN_D_I/task_2_7.py
|
YukkaSarasti/pythonintask
|
eadf4245abb65f4400a3bae30a4256b4658e009c
|
[
"Apache-2.0"
] | null | null | null |
# Задача 2. Вариант 7.
# Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Стендаль. Не забудьте о том, что автор должен быть упомянут на отдельной строке.
# Krasnikov A. S.
# 19.03.2016
print("Будем трудиться, потому что труд - это отец удовольствия.")
print("\n\n Cтендаль")
input("\n\nНажмите Enter для выхода.")
| 53.625
| 201
| 0.689977
| 56
| 429
| 5.285714
| 0.910714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030211
| 0.228438
| 429
| 8
| 202
| 53.625
| 0.864048
| 0.575758
| 0
| 0
| 0
| 0
| 0.803371
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.666667
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
ab53c39cfc993f99b95befc6241dde9d616d0cfb
| 11,978
|
py
|
Python
|
build/ARM/python/swig/debug.py
|
magnuram/edelsten5
|
63de812a22142f07fa48c253636e5c96156d4da9
|
[
"BSD-3-Clause"
] | null | null | null |
build/ARM/python/swig/debug.py
|
magnuram/edelsten5
|
63de812a22142f07fa48c253636e5c96156d4da9
|
[
"BSD-3-Clause"
] | null | null | null |
build/ARM/python/swig/debug.py
|
magnuram/edelsten5
|
63de812a22142f07fa48c253636e5c96156d4da9
|
[
"BSD-3-Clause"
] | null | null | null |
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_debug', [dirname(__file__)])
except ImportError:
import _debug
return _debug
if fp is not None:
try:
_mod = imp.load_module('_debug', fp, pathname, description)
finally:
fp.close()
return _mod
_debug = swig_import_helper()
del swig_import_helper
else:
import _debug
del version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name, None)
if method:
return method(self, value)
if (not static):
object.__setattr__(self, name, value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr_nondynamic(self, class_type, name, static=1):
if (name == "thisown"):
return self.this.own()
method = class_type.__swig_getmethods__.get(name, None)
if method:
return method(self)
if (not static):
return object.__getattr__(self, name)
else:
raise AttributeError(name)
def _swig_getattr(self, class_type, name):
return _swig_getattr_nondynamic(self, class_type, name, 0)
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except AttributeError:
class _object:
pass
_newclass = 0
def _swig_setattr_nondynamic_method(set):
def set_attr(self, name, value):
if (name == "thisown"):
return self.this.own(value)
if hasattr(self, name) or (name == "this"):
set(self, name, value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
return set_attr
class SwigPyIterator(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_destroy__ = _debug.delete_SwigPyIterator
__del__ = lambda self: None
def value(self):
return _debug.SwigPyIterator_value(self)
def incr(self, n=1):
return _debug.SwigPyIterator_incr(self, n)
def decr(self, n=1):
return _debug.SwigPyIterator_decr(self, n)
def distance(self, x):
return _debug.SwigPyIterator_distance(self, x)
def equal(self, x):
return _debug.SwigPyIterator_equal(self, x)
def copy(self):
return _debug.SwigPyIterator_copy(self)
def next(self):
return _debug.SwigPyIterator_next(self)
def __next__(self):
return _debug.SwigPyIterator___next__(self)
def previous(self):
return _debug.SwigPyIterator_previous(self)
def advance(self, n):
return _debug.SwigPyIterator_advance(self, n)
def __eq__(self, x):
return _debug.SwigPyIterator___eq__(self, x)
def __ne__(self, x):
return _debug.SwigPyIterator___ne__(self, x)
def __iadd__(self, n):
return _debug.SwigPyIterator___iadd__(self, n)
def __isub__(self, n):
return _debug.SwigPyIterator___isub__(self, n)
def __add__(self, n):
return _debug.SwigPyIterator___add__(self, n)
def __sub__(self, *args):
return _debug.SwigPyIterator___sub__(self, *args)
def __iter__(self):
return self
SwigPyIterator_swigregister = _debug.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)
def breakpoint():
return _debug.breakpoint()
breakpoint = _debug.breakpoint
class Flag(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_destroy__ = _debug.delete_Flag
__del__ = lambda self: None
def name(self):
return _debug.Flag_name(self)
def desc(self):
return _debug.Flag_desc(self)
def kids(self):
return _debug.Flag_kids(self)
def enable(self):
return _debug.Flag_enable(self)
def disable(self):
return _debug.Flag_disable(self)
Flag_swigregister = _debug.Flag_swigregister
Flag_swigregister(Flag)
class SimpleFlag(Flag):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, name, desc):
this = _debug.new_SimpleFlag(name, desc)
try:
self.this.append(this)
except Exception:
self.this = this
def status(self):
return _debug.SimpleFlag_status(self)
def __nonzero__(self):
return _debug.SimpleFlag___nonzero__(self)
__bool__ = __nonzero__
def enable(self):
return _debug.SimpleFlag_enable(self)
def disable(self):
return _debug.SimpleFlag_disable(self)
__swig_destroy__ = _debug.delete_SimpleFlag
__del__ = lambda self: None
SimpleFlag_swigregister = _debug.SimpleFlag_swigregister
SimpleFlag_swigregister(SimpleFlag)
class CompoundFlag(SimpleFlag):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
this = _debug.new_CompoundFlag(*args)
try:
self.this.append(this)
except Exception:
self.this = this
def enable(self):
return _debug.CompoundFlag_enable(self)
def disable(self):
return _debug.CompoundFlag_disable(self)
__swig_destroy__ = _debug.delete_CompoundFlag
__del__ = lambda self: None
CompoundFlag_swigregister = _debug.CompoundFlag_swigregister
CompoundFlag_swigregister(CompoundFlag)
def allFlags():
return _debug.allFlags()
allFlags = _debug.allFlags
def findFlag(name):
return _debug.findFlag(name)
findFlag = _debug.findFlag
def changeFlag(s, value):
return _debug.changeFlag(s, value)
changeFlag = _debug.changeFlag
def setDebugFlag(string):
return _debug.setDebugFlag(string)
setDebugFlag = _debug.setDebugFlag
def clearDebugFlag(string):
return _debug.clearDebugFlag(string)
clearDebugFlag = _debug.clearDebugFlag
def dumpDebugFlags():
return _debug.dumpDebugFlags()
dumpDebugFlags = _debug.dumpDebugFlags
class Cycles(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
this = _debug.new_Cycles(*args)
try:
self.this.append(this)
except Exception:
self.this = this
__swig_destroy__ = _debug.delete_Cycles
__del__ = lambda self: None
Cycles_swigregister = _debug.Cycles_swigregister
Cycles_swigregister(Cycles)
cvar = _debug.cvar
All = cvar.All
MaxTick = cvar.MaxTick
def romMicroPC(upc):
return _debug.romMicroPC(upc)
romMicroPC = _debug.romMicroPC
def normalMicroPC(upc):
return _debug.normalMicroPC(upc)
normalMicroPC = _debug.normalMicroPC
def isRomMicroPC(upc):
return _debug.isRomMicroPC(upc)
isRomMicroPC = _debug.isRomMicroPC
def schedBreak(when):
return _debug.schedBreak(when)
schedBreak = _debug.schedBreak
def takeCheckpoint(when):
return _debug.takeCheckpoint(when)
takeCheckpoint = _debug.takeCheckpoint
def eventqDump():
return _debug.eventqDump()
eventqDump = _debug.eventqDump
def py_interact():
return _debug.py_interact()
py_interact = _debug.py_interact
def getRemoteGDBPort():
return _debug.getRemoteGDBPort()
getRemoteGDBPort = _debug.getRemoteGDBPort
def setRemoteGDBPort(port):
return _debug.setRemoteGDBPort(port)
setRemoteGDBPort = _debug.setRemoteGDBPort
class AllFlags(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def iterator(self):
return _debug.AllFlags_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _debug.AllFlags___nonzero__(self)
def __bool__(self):
return _debug.AllFlags___bool__(self)
def __len__(self):
return _debug.AllFlags___len__(self)
def __getslice__(self, i, j):
return _debug.AllFlags___getslice__(self, i, j)
def __setslice__(self, *args):
return _debug.AllFlags___setslice__(self, *args)
def __delslice__(self, i, j):
return _debug.AllFlags___delslice__(self, i, j)
def __delitem__(self, *args):
return _debug.AllFlags___delitem__(self, *args)
def __getitem__(self, *args):
return _debug.AllFlags___getitem__(self, *args)
def __setitem__(self, *args):
return _debug.AllFlags___setitem__(self, *args)
def pop(self):
return _debug.AllFlags_pop(self)
def append(self, x):
return _debug.AllFlags_append(self, x)
def empty(self):
return _debug.AllFlags_empty(self)
def size(self):
return _debug.AllFlags_size(self)
def swap(self, v):
return _debug.AllFlags_swap(self, v)
def begin(self):
return _debug.AllFlags_begin(self)
def end(self):
return _debug.AllFlags_end(self)
def rbegin(self):
return _debug.AllFlags_rbegin(self)
def rend(self):
return _debug.AllFlags_rend(self)
def clear(self):
return _debug.AllFlags_clear(self)
def get_allocator(self):
return _debug.AllFlags_get_allocator(self)
def pop_back(self):
return _debug.AllFlags_pop_back(self)
def erase(self, *args):
return _debug.AllFlags_erase(self, *args)
def __init__(self, *args):
this = _debug.new_AllFlags(*args)
try:
self.this.append(this)
except Exception:
self.this = this
def push_back(self, x):
return _debug.AllFlags_push_back(self, x)
def front(self):
return _debug.AllFlags_front(self)
def back(self):
return _debug.AllFlags_back(self)
def assign(self, n, x):
return _debug.AllFlags_assign(self, n, x)
def resize(self, *args):
return _debug.AllFlags_resize(self, *args)
def insert(self, *args):
return _debug.AllFlags_insert(self, *args)
def reserve(self, n):
return _debug.AllFlags_reserve(self, n)
def capacity(self):
return _debug.AllFlags_capacity(self)
__swig_destroy__ = _debug.delete_AllFlags
__del__ = lambda self: None
AllFlags_swigregister = _debug.AllFlags_swigregister
AllFlags_swigregister(AllFlags)
MicroPCRomBit = cvar.MicroPCRomBit
MaxAddr = cvar.MaxAddr
InvalidThreadID = cvar.InvalidThreadID
InvalidPortID = cvar.InvalidPortID
def getAllFlagsVersion():
return _debug.getAllFlagsVersion()
getAllFlagsVersion = _debug.getAllFlagsVersion
def getAllFlags():
return _debug.getAllFlags()
getAllFlags = _debug.getAllFlags
| 26.856502
| 107
| 0.681833
| 1,431
| 11,978
| 5.293501
| 0.143256
| 0.111815
| 0.065347
| 0.051617
| 0.355248
| 0.248449
| 0.224951
| 0.197492
| 0.176898
| 0.16132
| 0
| 0.001717
| 0.221907
| 11,978
| 445
| 108
| 26.916854
| 0.811052
| 0.019118
| 0
| 0.231707
| 1
| 0
| 0.02845
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.280488
| false
| 0.006098
| 0.027439
| 0.243902
| 0.682927
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
ab59565b0f57d6e466e2599fd48e26b55cde439e
| 135
|
py
|
Python
|
fzutils/spider/templates/__init__.py
|
superonesfazai/fzutils
|
a8aafaacd94af0001af2ab139f0aa8cbcb8b5eda
|
[
"MIT"
] | 11
|
2018-08-04T08:14:27.000Z
|
2021-09-03T09:00:33.000Z
|
build/lib/fzutils/spider/templates/__init__.py
|
superonesfazai/fzutils
|
a8aafaacd94af0001af2ab139f0aa8cbcb8b5eda
|
[
"MIT"
] | null | null | null |
build/lib/fzutils/spider/templates/__init__.py
|
superonesfazai/fzutils
|
a8aafaacd94af0001af2ab139f0aa8cbcb8b5eda
|
[
"MIT"
] | 8
|
2018-08-04T08:16:17.000Z
|
2019-05-05T09:17:35.000Z
|
# coding:utf-8
'''
@author = super_fazai
@File : __init__.py.py
@Time : 2016/12/13 15:39
@connect : superonesfazai@gmail.com
'''
| 16.875
| 35
| 0.651852
| 20
| 135
| 4.15
| 0.95
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116071
| 0.17037
| 135
| 8
| 36
| 16.875
| 0.625
| 0.925926
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ab5d89149c78a69ed15935adec842adba890c7e4
| 631
|
py
|
Python
|
pystratis/api/federation/responsemodels/federationmembermodel.py
|
TjadenFroyda/pyStratis
|
9cc7620d7506637f8a2b84003d931eceb36ac5f2
|
[
"MIT"
] | 8
|
2021-06-30T20:44:22.000Z
|
2021-12-07T14:42:22.000Z
|
pystratis/api/federation/responsemodels/federationmembermodel.py
|
TjadenFroyda/pyStratis
|
9cc7620d7506637f8a2b84003d931eceb36ac5f2
|
[
"MIT"
] | 2
|
2021-07-01T11:50:18.000Z
|
2022-01-25T18:39:49.000Z
|
pystratis/api/federation/responsemodels/federationmembermodel.py
|
TjadenFroyda/pyStratis
|
9cc7620d7506637f8a2b84003d931eceb36ac5f2
|
[
"MIT"
] | 4
|
2021-07-01T04:36:42.000Z
|
2021-09-17T10:54:19.000Z
|
from pystratis.api import Model
from pystratis.core import PubKey
from pystratis.core.types import Money
from pydantic import Field
class FederationMemberModel(Model):
"""A pydantic model for a federation member."""
pubkey: PubKey
"""The federation member's pubkey."""
collateral_amount: Money = Field(alias='collateralAmount')
"""The federation member's collateral amount."""
last_active_time: str = Field(alias='lastActiveTime')
"""The federation member's last active time."""
period_of_inactivity: str = Field(alias='periodOfInactivity')
"""The federation member's period of inactivity."""
| 37.117647
| 65
| 0.736926
| 77
| 631
| 5.974026
| 0.415584
| 0.173913
| 0.165217
| 0.173913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155309
| 631
| 16
| 66
| 39.4375
| 0.863039
| 0.064976
| 0
| 0
| 0
| 0
| 0.119701
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.444444
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ab602b44522cbcfdef7cdd8370ebf242eb87f2d5
| 134
|
py
|
Python
|
services/arlington/groups/apps.py
|
ShadowServants/ctfcup2018
|
561ad0f40554afdbe2823528037abf7191c3db21
|
[
"WTFPL"
] | 4
|
2018-12-03T12:51:37.000Z
|
2019-04-08T10:14:02.000Z
|
services/arlington/groups/apps.py
|
ctfcup/2018-attack-defense
|
561ad0f40554afdbe2823528037abf7191c3db21
|
[
"WTFPL"
] | 3
|
2020-02-11T23:29:21.000Z
|
2021-06-10T21:01:47.000Z
|
services/arlington/groups/apps.py
|
ctfcup/2018-attack-defense
|
561ad0f40554afdbe2823528037abf7191c3db21
|
[
"WTFPL"
] | 1
|
2019-11-29T15:24:20.000Z
|
2019-11-29T15:24:20.000Z
|
from django.apps import AppConfig
from django.db.models.signals import post_save
class GroupsConfig(AppConfig):
name = 'groups'
| 19.142857
| 46
| 0.783582
| 18
| 134
| 5.777778
| 0.777778
| 0.192308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141791
| 134
| 6
| 47
| 22.333333
| 0.904348
| 0
| 0
| 0
| 0
| 0
| 0.044776
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
db3e6437f2b5148bd1a43c847d7b2543e486c2b8
| 4,479
|
py
|
Python
|
poly_py_tools/provision/model_meta.py
|
mjmunger/PolyPyTools
|
116014a47479f360ee73006d6ba3ddc7f362c7a1
|
[
"MIT"
] | 7
|
2017-11-15T19:25:37.000Z
|
2022-01-20T01:30:56.000Z
|
poly_py_tools/provision/model_meta.py
|
DrDamnit/PolyPyTools
|
116014a47479f360ee73006d6ba3ddc7f362c7a1
|
[
"MIT"
] | 40
|
2020-05-19T19:46:20.000Z
|
2020-11-12T16:13:55.000Z
|
poly_py_tools/provision/model_meta.py
|
mjmunger/PolyPyTools
|
116014a47479f360ee73006d6ba3ddc7f362c7a1
|
[
"MIT"
] | null | null | null |
from poly_py_tools.polypy_config import PolypyConfig
import os
class ModelMeta(object):
pconf = None
polycom_dict = {
"SPIP320": {"part": "2345-12200-002", "current_firmware_version": "3.3.5.0247"},
"SPIP321": {"part": "2345-12360-001", "current_firmware_version": "4.0.15.1009"},
"SPIP330": {"part": "2345-12200-001", "current_firmware_version": "3.3.5.0247"},
"SPIP331": {"part": "2345-12365-001", "current_firmware_version": "4.0.15.1009"},
"SPIP335": {"part": "2345-12375-001", "current_firmware_version": "4.0.15.1009"},
"SPIP430": {"part": "2345-11402-001", "current_firmware_version": "3.2.7.0198"},
"SPIP450": {"part": "2345-12450-001", "current_firmware_version": "4.0.15.1009"},
"SSIP5000": {"part": "3111-30900-001", "current_firmware_version": "4.0.15.1009"},
"SPIP550": {"part": "2345-12500-001", "current_firmware_version": "4.0.15.1009"},
"SPIP560": {"part": "2345-12560-001", "current_firmware_version": "4.0.15.1009"},
"SPIP650": {"part": "2345-12600-001", "current_firmware_version": "4.0.15.1009"},
"SPIP670": {"part": "2345-12670-001", "current_firmware_version": "4.0.15.1009"},
"SSIP6000": {"part": "3111-15600-001", "current_firmware_version": "4.0.15.1009"},
"SSIP7000": {"part": "3111-40000-001", "current_firmware_version": "4.0.15.1009"},
"VVX101": {"part": "3111-40250-001", "current_firmware_version": "6.3.0.14929"},
"VVX150": {"part": "3111-48810-001", "current_firmware_version": "6.3.0.14929"},
"VVX1500": {"part": "2345-17960-001", "current_firmware_version": "5.9.6.2327"},
"VVX201": {"part": "3111-40450-001", "current_firmware_version": "6.3.0.14929"},
"VVX250": {"part": "3111-48820-001", "current_firmware_version": "6.3.0.14929"},
"VVX300": {"part": "3111-46135-002", "current_firmware_version": "5.9.6.2327"},
"VVX301": {"part": "3111-48300-001", "current_firmware_version": "5.9.6.2327"},
"VVX310": {"part": "3111-46161-001", "current_firmware_version": "5.9.6.2327"},
"VVX311": {"part": "3111-48350-001", "current_firmware_version": "5.9.6.2327"},
"VVX350": {"part": "3111-48830-001", "current_firmware_version": "6.3.0.14929"},
"VVX400": {"part": "3111-46157-002", "current_firmware_version": "5.9.6.2327"},
"VVX401": {"part": "3111-48400-001", "current_firmware_version": "6.3.0.14929"},
"VVX410": {"part": "3111-46162-001", "current_firmware_version": "5.9.6.2327"},
"VVX411": {"part": "3111-48450-001", "current_firmware_version": "6.3.0.14929"},
"VVX450": {"part": "3111-48840-001", "current_firmware_version": "6.3.0.14929"},
"VVX500": {"part": "3111-44500-001", "current_firmware_version": "5.9.6.2327"},
"VVX501": {"part": "3111-48500-001", "current_firmware_version": "6.3.0.14929"},
"VVX600": {"part": "3111-44600-001", "current_firmware_version": "5.9.6.2327"},
"VVX601": {"part": "3111-48600-001", "current_firmware_version": "6.3.0.14929"},
"VVXD60": {"part": "3111-17823-001", "current_firmware_version": "6.3.0.14929"},
}
def use_configs(self, pconf: PolypyConfig):
self.pconf = pconf
def get_requested_model(self, requested_model):
for model in self.polycom_dict:
if model == requested_model:
return self.polycom_dict[model]
print(
"The model you requested, {}, is unsupported. Legacy phones without a currently supported version of firmware are not supported.".format(
requested_model))
return False
def get_meta(self, requested_model, meta):
model = self.get_requested_model(requested_model)
if model is False:
return False
else:
return model[meta]
def get_part(self, requested_model):
return self.get_meta(requested_model, 'part')
def get_firmware_version(self, requested_model):
return self.get_meta(requested_model, 'current_firmware_version')
def get_firmware_base_dir(self):
"""
This is here so we can mock.patch it and redirect for tests.
:return:
"""
return os.path.join(self.pconf.tftproot_path(), "firmware")
def get_firmware_dir(self, requested_model):
dir = os.path.join(self.get_firmware_base_dir(), self.get_firmware_version(requested_model))
print(dir)
return dir
| 53.963855
| 149
| 0.622907
| 588
| 4,479
| 4.559524
| 0.255102
| 0.207012
| 0.287206
| 0.289071
| 0.463633
| 0.436404
| 0.436404
| 0.414771
| 0.036554
| 0
| 0
| 0.211607
| 0.184416
| 4,479
| 82
| 150
| 54.621951
| 0.52231
| 0.015405
| 0
| 0.030303
| 0
| 0.015152
| 0.497029
| 0.191956
| 0
| 0
| 0
| 0
| 0
| 1
| 0.106061
| false
| 0
| 0.030303
| 0.030303
| 0.30303
| 0.030303
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
db542da420d2326a10b3431f8301b6c0af1e22ea
| 7,917
|
py
|
Python
|
PythonProjects/99-CapstoneProject-202020-DavidAndVIbha/labs/lab2a_touch_sensor.py
|
much2mutch/csse120-public
|
4f862a6deb7a5373fb5723fb2a23e4042e4d4157
|
[
"MIT"
] | null | null | null |
PythonProjects/99-CapstoneProject-202020-DavidAndVIbha/labs/lab2a_touch_sensor.py
|
much2mutch/csse120-public
|
4f862a6deb7a5373fb5723fb2a23e4042e4d4157
|
[
"MIT"
] | null | null | null |
PythonProjects/99-CapstoneProject-202020-DavidAndVIbha/labs/lab2a_touch_sensor.py
|
much2mutch/csse120-public
|
4f862a6deb7a5373fb5723fb2a23e4042e4d4157
|
[
"MIT"
] | null | null | null |
"""
Capstone Team Project. Code to run on a ROBOT (NOT a laptop).
This module is for testing STAND-ALONE code running on the ROBOT
(WITHOUT having LAPTOP GUI code running on the LAPTOP at the same time).
In particular, it tests the TouchSensor class.
Authors: Your professors (for the framework)
and PUT_YOUR_NAME_HERE.
Winter term, 2019-2020.
"""
# TODO: 1. In the above, put the names of EACH team member who contributes
# (in any way) to this module.
# -----------------------------------------------------------------------------
# TODO: 2. Note that you will use the rosebot library (shorthand: rb).
# Then change this _TODO_ to DONE.
# -----------------------------------------------------------------------------
import libs.rosebot as rb
import time
def main():
""" Tests the TouchSensor of a Snatch3r robot. """
print()
print("--------------------------------------------------")
print("Testing the TOUCH SENSOR of a robot")
print("--------------------------------------------------")
# -------------------------------------------------------------------------
# TODO: 3. The following constructs a TouchSensor object,
# then sends it as an argument to the TEST functions. In those TEST
# functions, you will access the methods of the TouchSensor object.
# Change this _TODO_ to DONE after you understand the following code.
# -------------------------------------------------------------------------
robot = rb.RoseBot()
run_test_get_reading(robot)
run_test_is_pressed(robot)
run_test_wait_until_pressed(robot)
run_test_wait_until_released(robot)
def run_test_get_reading(robot):
"""
Tests the get_reading method of the TouchSensor class.
:type robot: rb.RoseBot
"""
print()
print("--------------------------------------------------")
print("Testing the get_reading method")
print(" of the TouchSensor class.")
print("--------------------------------------------------")
print()
print("In the output that will appear, you should see:")
print(" 1 when the physical Touch Sensor is pressed")
print(" 0 when the physical Touch Sensor is NOT pressed")
print("Stop this test by pressing Control-C when desired.")
input("Press the ENTER key when ready to start getting readings.")
try:
while True:
# -----------------------------------------------------------------
# TODO: 4. This code is inside a try ... except clause so that
# when you press Control-C to stop the program, it "catches"
# that "exception" and allows the program to continue to the
# next set of tests.
# _
# Replace the pass statement below with code that:
# a. Calls the get_reading method on the given TouchSensor,
# storing the returned value in a variable if you like.
# b. Prints that returned value.
# c. Sleeps for 0.5 seconds so that you are not overwhelmed
# by the output.
# -----------------------------------------------------------------
pass
except KeyboardInterrupt:
print()
print("OK, you just did a keyboard interrupt (Control-C).")
print("No worries. The program will keep running from here.")
def run_test_is_pressed(robot):
"""
Tests the is_pressed method of the TouchSensor class.
:type robot: rb.RoseBot
"""
print()
print("--------------------------------------------------")
print("Testing the is_pressed method")
print(" of the TouchSensor class.")
print("--------------------------------------------------")
print()
print("In the output that will appear, you should see:")
print(" True when the physical Touch Sensor is pressed")
print(" False when the physical Touch Sensor is NOT pressed")
print("Stop this program by pressing Control-C when desired.")
input("Press the ENTER key when ready to start getting readings.")
try:
while True:
# -----------------------------------------------------------------
# TODO: 5. This code is inside a try ... except clause so that
# when you press Control-C to stop the program, it "catches"
# that "exception" and allows the program to continue to the
# next set of tests.
# _
# Replace the pass statement below with code that:
# a. Calls the is_pressed method on the given TouchSensor,
# storing the returned value in a variable if you like.
# b. Prints that returned value.
# c. Sleeps for 0.5 seconds so that you are not overwhelmed
# by the output.
# -----------------------------------------------------------------
pass
except KeyboardInterrupt:
print()
print("OK, you just did a keyboard interrupt (Control-C).")
print("No worries. The program will keep running from here.")
def run_test_wait_until_pressed(robot):
"""
Tests the wait_until_pressed method of the TouchSensor class.
:type robot: rb.RoseBot
"""
print()
print("--------------------------------------------------")
print("Testing the wait_until_pressed method")
print(" of the TouchSensor class.")
print("--------------------------------------------------")
print()
print("Press the ENTER key when ready to WAIT until the")
print("Touch Sensor is pressed. Then, when you are ready,")
print("press the Touch Sensor, which should stop this test.")
print(" If pressing the Touch Sensor does NOT stop this test,")
input(" press Control-C to force this test to stop.")
try:
# ---------------------------------------------------------------------
# TODO: 6. Replace the pass statement below with a call to
# the wait_until_pressed method on the given TouchSensor object.
# Then print a simple message like "Pressed!"
# ---------------------------------------------------------------------
pass
except KeyboardInterrupt:
print()
print("OK, you just did a keyboard interrupt (Control-C).")
print("No worries. The program will keep running from here.")
def run_test_wait_until_released(robot):
"""
Tests the wait_until_released method of the TouchSensor class.
:type robot: rb.RoseBot
"""
print()
print("--------------------------------------------------")
print("Testing the wait_until_released method")
print(" of the TouchSensor class.")
print("--------------------------------------------------")
print("Press the ENTER key when ready to WAIT until the")
print("Touch Sensor is RELEASED. That is, press and hold down")
print("the Touch Sensor now, then press the ENTER key.")
print("Then, when you are ready, RELEASE the Touch Sensor")
input("which should stop this test.")
print(" If releasing the Touch Sensor does NOT stop this test,")
input(" press Control-C to force this test to stop.")
try:
# -------------------------------------------------------------------------
# TODO: 7. Replace the pass statement below with a call to
# the wait_until_released method on the given TouchSensor object.
# Then print a simple message like "Released!"
# -------------------------------------------------------------------------
pass
except KeyboardInterrupt:
print()
print("OK, you just did a keyboard interrupt (Control-C).")
print("No worries. The program will keep running from here.")
| 42.794595
| 83
| 0.514841
| 883
| 7,917
| 4.553794
| 0.202718
| 0.052226
| 0.042527
| 0.041781
| 0.766227
| 0.709525
| 0.682666
| 0.667744
| 0.639891
| 0.639891
| 0
| 0.00371
| 0.250979
| 7,917
| 184
| 84
| 43.027174
| 0.674368
| 0.436782
| 0
| 0.643678
| 0
| 0
| 0.5354
| 0.115687
| 0
| 0
| 0
| 0.027174
| 0
| 1
| 0.057471
| false
| 0.045977
| 0.022989
| 0
| 0.08046
| 0.643678
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
db5ab01595682cfe45f5e6db55ad960112eebbab
| 139
|
py
|
Python
|
minv/main.py
|
kevinadi/invoke-mongodb
|
f84bd1705396a5cd5a2900435f58dde362bdffbf
|
[
"Apache-2.0"
] | null | null | null |
minv/main.py
|
kevinadi/invoke-mongodb
|
f84bd1705396a5cd5a2900435f58dde362bdffbf
|
[
"Apache-2.0"
] | null | null | null |
minv/main.py
|
kevinadi/invoke-mongodb
|
f84bd1705396a5cd5a2900435f58dde362bdffbf
|
[
"Apache-2.0"
] | null | null | null |
from invoke import Collection, Program
from minv import tasks
program = Program(namespace=Collection.from_module(tasks), version='0.1.0')
| 27.8
| 75
| 0.798561
| 20
| 139
| 5.5
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.024
| 0.100719
| 139
| 4
| 76
| 34.75
| 0.856
| 0
| 0
| 0
| 0
| 0
| 0.035971
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
db62a4be864267bedb16df8169807f06d999ed29
| 133
|
py
|
Python
|
.history/my_classes/FirstClassFunctions/reducing_functions_20210707133805.py
|
minefarmer/deep-Dive-1
|
b0675b853180c5b5781888266ea63a3793b8d855
|
[
"Unlicense"
] | null | null | null |
.history/my_classes/FirstClassFunctions/reducing_functions_20210707133805.py
|
minefarmer/deep-Dive-1
|
b0675b853180c5b5781888266ea63a3793b8d855
|
[
"Unlicense"
] | null | null | null |
.history/my_classes/FirstClassFunctions/reducing_functions_20210707133805.py
|
minefarmer/deep-Dive-1
|
b0675b853180c5b5781888266ea63a3793b8d855
|
[
"Unlicense"
] | null | null | null |
"""Reducing Functions in Python
These are functions that recombine an iterable recursively, ending up with a single return value
"""
| 33.25
| 96
| 0.796992
| 19
| 133
| 5.578947
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150376
| 133
| 4
| 97
| 33.25
| 0.938053
| 0.93985
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
db6d7e34726ae46ecf5b21659ff3352834e2f368
| 705
|
py
|
Python
|
pattern4/hamburg_store_v5/src/SichuanIngredientsFactory.py
|
icexmoon/design-pattern-with-python
|
bb897e886fe52bb620db0edc6ad9d2e5ecb067af
|
[
"MIT"
] | null | null | null |
pattern4/hamburg_store_v5/src/SichuanIngredientsFactory.py
|
icexmoon/design-pattern-with-python
|
bb897e886fe52bb620db0edc6ad9d2e5ecb067af
|
[
"MIT"
] | null | null | null |
pattern4/hamburg_store_v5/src/SichuanIngredientsFactory.py
|
icexmoon/design-pattern-with-python
|
bb897e886fe52bb620db0edc6ad9d2e5ecb067af
|
[
"MIT"
] | null | null | null |
#######################################################
#
# SichuanIngredientsFactory.py
# Python implementation of the Class SichuanIngredientsFactory
# Generated by Enterprise Architect
# Created on: 19-6��-2021 21:34:31
# Original author: 70748
#
#######################################################
from .Chicken import Chicken
from .Pepper import Pepper
from .SichuanPepper import SichuanPepper
from .ThreeYellowChicken import ThreeYellowChicken
from .IngredientsFactory import IngredientsFactory
class SichuanIngredientsFactory(IngredientsFactory):
def getChicken(self) -> Chicken:
return ThreeYellowChicken()
def getPepper(self) -> Pepper:
return SichuanPepper()
| 30.652174
| 62
| 0.658156
| 59
| 705
| 7.898305
| 0.59322
| 0.128755
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002837
| 0.029412
| 0.131915
| 705
| 22
| 63
| 32.045455
| 0.728758
| 0.260993
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.5
| 0.2
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
db912c789b6f7a387997e1afc1d7b52f20928558
| 196
|
py
|
Python
|
PolynomialKernel.py
|
ddkdl/svm-text-classifier
|
7a19efd7e67e4d6ca6548b299a8d9d72c4b9453f
|
[
"Apache-2.0"
] | null | null | null |
PolynomialKernel.py
|
ddkdl/svm-text-classifier
|
7a19efd7e67e4d6ca6548b299a8d9d72c4b9453f
|
[
"Apache-2.0"
] | null | null | null |
PolynomialKernel.py
|
ddkdl/svm-text-classifier
|
7a19efd7e67e4d6ca6548b299a8d9d72c4b9453f
|
[
"Apache-2.0"
] | null | null | null |
from Kernel import Kernel
import numpy as np
class PolynomialKernel(Kernel):
def __init__(self, p=3):
self.p = p
def eval(self, X, Y):
return (1 + np.dot(X, Y)) ** self.p
| 21.777778
| 43
| 0.607143
| 32
| 196
| 3.59375
| 0.59375
| 0.130435
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013889
| 0.265306
| 196
| 9
| 43
| 21.777778
| 0.784722
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.285714
| 0.142857
| 0.857143
| 0
| 0
| 0
| 0
| null | 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
| 4
|
db92434498dcfa5a2430790eab6e5896a277bd63
| 199
|
py
|
Python
|
restful/response.py
|
beowulf-foundation/beowulf-python
|
04d644fde32e602d64d70946b1fc8d0ebebce6c2
|
[
"MIT"
] | 9
|
2019-08-20T19:57:36.000Z
|
2022-02-22T05:25:30.000Z
|
restful/response.py
|
beowulf-foundation/beowulf-python
|
04d644fde32e602d64d70946b1fc8d0ebebce6c2
|
[
"MIT"
] | null | null | null |
restful/response.py
|
beowulf-foundation/beowulf-python
|
04d644fde32e602d64d70946b1fc8d0ebebce6c2
|
[
"MIT"
] | 2
|
2020-07-18T18:07:27.000Z
|
2021-01-11T13:22:25.000Z
|
import json
class ResponseBody(object):
def __init__(self, error, data):
self.error_code = error
self.data = data
def toJson(self):
return json.dumps(self.__dict__)
| 19.9
| 40
| 0.643216
| 25
| 199
| 4.76
| 0.6
| 0.151261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.261307
| 199
| 10
| 40
| 19.9
| 0.809524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.142857
| 0.142857
| 0.714286
| 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
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
db9f4e8fd40e0afcfb8a0f0edee7f82260a85c4b
| 298
|
py
|
Python
|
sweepstakes_stack_manager.py
|
snguy3nn/sweepstakes
|
20820016a192ccfd5b2edfbbc2d34c80a2c00436
|
[
"MIT"
] | null | null | null |
sweepstakes_stack_manager.py
|
snguy3nn/sweepstakes
|
20820016a192ccfd5b2edfbbc2d34c80a2c00436
|
[
"MIT"
] | null | null | null |
sweepstakes_stack_manager.py
|
snguy3nn/sweepstakes
|
20820016a192ccfd5b2edfbbc2d34c80a2c00436
|
[
"MIT"
] | null | null | null |
from stack import Stack
from sweepstake import Sweepstake
class SweepstakesStackManager:
def __init__(self):
self.stack = Stack
def insert_sweepstakes(self, sweepstakes):
self.sweepstakes = sweepstakes
def get_sweepstakes(self):
self.sweepstake = Sweepstake
| 21.285714
| 46
| 0.721477
| 31
| 298
| 6.741935
| 0.387097
| 0.215311
| 0.248804
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.221477
| 298
| 14
| 47
| 21.285714
| 0.900862
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.222222
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
dbb0bef326b952d8c7641bf6e05a0f310b517d37
| 289
|
py
|
Python
|
Exercise_3_3.py
|
kushrami/Python-Crash-Course-book-Excersice
|
7093181940a90d9f4bab5775ef56f57963450393
|
[
"Apache-2.0"
] | null | null | null |
Exercise_3_3.py
|
kushrami/Python-Crash-Course-book-Excersice
|
7093181940a90d9f4bab5775ef56f57963450393
|
[
"Apache-2.0"
] | null | null | null |
Exercise_3_3.py
|
kushrami/Python-Crash-Course-book-Excersice
|
7093181940a90d9f4bab5775ef56f57963450393
|
[
"Apache-2.0"
] | null | null | null |
#Your Own list.
List_of_transportation = ["car","bike","truck"]
print("I just love to ride a "+List_of_transportation[1]+".")
print("But i also love to sit in a "+List_of_transportation[0]+" comfortably and drive.")
print("I also play simulator games of "+List_of_transportation[2]+".")
| 36.125
| 89
| 0.723183
| 47
| 289
| 4.276596
| 0.595745
| 0.119403
| 0.39801
| 0.208955
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011765
| 0.117647
| 289
| 7
| 90
| 41.285714
| 0.776471
| 0.048443
| 0
| 0
| 0
| 0
| 0.430657
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.75
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
dbc17ed8eca974a625d2729851496a77099f3ba5
| 171
|
py
|
Python
|
{{cookiecutter.repo_name}}/src/{{cookiecutter.package_name}}/cli.py
|
coddingtonbear/cookiecutter-pylibrary
|
c8b5936226340d966a8f2b44bbfc5b1c2f6f9816
|
[
"BSD-2-Clause"
] | null | null | null |
{{cookiecutter.repo_name}}/src/{{cookiecutter.package_name}}/cli.py
|
coddingtonbear/cookiecutter-pylibrary
|
c8b5936226340d966a8f2b44bbfc5b1c2f6f9816
|
[
"BSD-2-Clause"
] | null | null | null |
{{cookiecutter.repo_name}}/src/{{cookiecutter.package_name}}/cli.py
|
coddingtonbear/cookiecutter-pylibrary
|
c8b5936226340d966a8f2b44bbfc5b1c2f6f9816
|
[
"BSD-2-Clause"
] | null | null | null |
import argparse
import sys
def main(args=sys.argv):
parser = argparse.ArgumentParser(description='Command description.')
args = parser.parse_args(args=args[1:])
| 21.375
| 72
| 0.74269
| 22
| 171
| 5.727273
| 0.590909
| 0.126984
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006757
| 0.134503
| 171
| 7
| 73
| 24.428571
| 0.844595
| 0
| 0
| 0
| 0
| 0
| 0.116959
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
91a0cdb6fba63e647af6baa1bef6260794c8dd29
| 3,598
|
py
|
Python
|
pipelines/pipelines.py
|
SPOClab-ca/COVFEFE
|
905e8e5eb0905791de869db18c6f755838657203
|
[
"Apache-2.0"
] | 29
|
2018-08-25T15:05:21.000Z
|
2021-07-12T06:23:46.000Z
|
pipelines/pipelines.py
|
SPOClab-ca/COVFEFE
|
905e8e5eb0905791de869db18c6f755838657203
|
[
"Apache-2.0"
] | 16
|
2018-08-28T02:36:01.000Z
|
2020-12-07T12:32:34.000Z
|
pipelines/pipelines.py
|
SPOClab-ca/COVFEFE
|
905e8e5eb0905791de869db18c6f755838657203
|
[
"Apache-2.0"
] | 11
|
2018-08-28T13:41:12.000Z
|
2021-07-18T13:53:16.000Z
|
from nodes.helper import ProgressPipeline
from pipelines import pipeline_registry
from nodes import helper, audio, lexicosyntactic, lexicosyntactic_multi
from utils.segment_mappers import TxtSegments, EafSegments
@pipeline_registry
def split_speech_eaf(in_folder, out_folder, num_threads):
file_finder = helper.FindFiles("file_finder", dir=in_folder, ext=".wav")
splitter = EafSegments(in_folder)
split = audio.SplitSegments("split_speech", out_dir=out_folder, segment_mapping_fn=splitter.get_segs_for_file)
p = ProgressPipeline(file_finder | split, n_threads=num_threads, quiet=True)
return p
@pipeline_registry
def split_speech_txt(in_folder, out_folder, num_threads):
file_finder = helper.FindFiles("file_finder", dir=in_folder, ext=".wav")
splitter = TxtSegments(in_folder)
split = audio.SplitSegments("split_speech", out_dir=out_folder, segment_mapping_fn=splitter.get_segs_for_file)
p = ProgressPipeline(file_finder | split, n_threads=num_threads, quiet=True)
return p
@pipeline_registry
def opensmile_is10_lld(in_folder, out_folder, num_threads):
file_finder = helper.FindFiles("file_finder", dir=in_folder, ext=".wav")
is10 = audio.OpenSmileRunner("is10_lld", out_dir=out_folder, conf_file="IS10_paraling.conf", out_flag="-lldcsvoutput")
p = ProgressPipeline(file_finder | is10, n_threads=num_threads, quiet=True)
return p
@pipeline_registry
def opensmile_is10(in_folder, out_folder, num_threads):
file_finder = helper.FindFiles("file_finder", dir=in_folder, ext=".wav")
is10 = audio.OpenSmileRunner("is10", out_dir=out_folder, conf_file="IS10_paraling.conf", out_flag="-csvoutput")
p = ProgressPipeline(file_finder | is10, n_threads=num_threads, quiet=True)
return p
@pipeline_registry
def matlab(in_folder, out_folder, num_threads):
from nodes import matlab as mtlb
file_finder = helper.FindFiles("file_finder", dir=in_folder, ext=".wav")
is10 = mtlb.MatlabRunner("matlab_acoustics", out_dir=out_folder, function="extract_acoustics", out_ext=".txt")
p = ProgressPipeline(file_finder | is10, n_threads=num_threads, quiet=True)
return p
@pipeline_registry
def lex(in_folder, out_folder, num_threads):
file_finder = helper.FindFiles("file_finder", dir=in_folder, ext=".txt")
feats = lexicosyntactic.Lexicosyntactic("lexicosyntactic", out_dir=out_folder, cfg_file="default.conf")
p = ProgressPipeline(file_finder | feats, n_threads=num_threads, quiet=True)
return p
@pipeline_registry
def lex_chinese(in_folder, out_folder, num_threads):
file_finder = helper.FindFiles("file_finder", dir=in_folder, ext=".txt")
feats = lexicosyntactic_multi.ChineseLex("lex_chinese", out_dir=out_folder)
p = ProgressPipeline(file_finder | feats, n_threads=num_threads, quiet=True, exec_name="ParallelExecutor2")
return p
@pipeline_registry
def praat_syllable_nuclei(in_folder, out_folder, num_threads):
file_finder = helper.FindFiles("file_finder", dir=in_folder, ext=".wav")
praat = audio.PraatRunner("praat_syllable_nuclei", out_dir=out_folder)
p = ProgressPipeline(file_finder | praat, n_threads=num_threads, quiet=True)
return p
@pipeline_registry
def kaldi_asr(in_folder, out_folder, num_threads):
file_finder = helper.FindFiles("file_finder", dir=in_folder, ext=".wav")
resample = audio.ResampleWav("resampled_audio", out_dir=out_folder, new_sr=8000)
asr = audio.KaldiASR("kaldi_asr", out_dir=out_folder)
p = ProgressPipeline(file_finder | resample | asr, n_threads=num_threads, quiet=True)
return p
| 33.943396
| 122
| 0.766259
| 495
| 3,598
| 5.252525
| 0.165657
| 0.103846
| 0.034615
| 0.057692
| 0.753846
| 0.728077
| 0.717692
| 0.717692
| 0.666538
| 0.666538
| 0
| 0.009239
| 0.127571
| 3,598
| 105
| 123
| 34.266667
| 0.819051
| 0
| 0
| 0.548387
| 0
| 0
| 0.102001
| 0.005837
| 0
| 0
| 0
| 0
| 0
| 1
| 0.145161
| false
| 0
| 0.080645
| 0
| 0.370968
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
91e553c94b678c5406c3ac5d094dcb0023d4133d
| 190
|
py
|
Python
|
permissions/middleware.py
|
350dotorg/akcrm
|
9b0441cefd17dadd7dc16aac107353fc01605c74
|
[
"BSD-3-Clause"
] | null | null | null |
permissions/middleware.py
|
350dotorg/akcrm
|
9b0441cefd17dadd7dc16aac107353fc01605c74
|
[
"BSD-3-Clause"
] | 3
|
2020-02-11T21:53:41.000Z
|
2021-06-10T17:33:55.000Z
|
permissions/middleware.py
|
350dotorg/akcrm
|
9b0441cefd17dadd7dc16aac107353fc01605c74
|
[
"BSD-3-Clause"
] | null | null | null |
from akcrm.permissions import LazyPermissions
class PermissionsMiddleware(object):
def process_request(self, request):
setattr(request, 'PERMISSIONS', LazyPermissions(request))
| 31.666667
| 65
| 0.784211
| 18
| 190
| 8.222222
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131579
| 190
| 5
| 66
| 38
| 0.89697
| 0
| 0
| 0
| 0
| 0
| 0.057895
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
91e574048aaa7b844fe3a9cde154d6ee7feb39e5
| 176
|
py
|
Python
|
test/constexpr_dev.py
|
FindDefinition/cumm
|
3d58e85b660afa05c20514afe65b8aa3a4995953
|
[
"Apache-2.0"
] | 20
|
2021-10-13T03:41:59.000Z
|
2022-03-31T07:23:14.000Z
|
test/constexpr_dev.py
|
FindDefinition/cumm
|
3d58e85b660afa05c20514afe65b8aa3a4995953
|
[
"Apache-2.0"
] | 3
|
2021-11-21T11:25:55.000Z
|
2022-03-08T06:12:35.000Z
|
test/constexpr_dev.py
|
FindDefinition/cumm
|
3d58e85b660afa05c20514afe65b8aa3a4995953
|
[
"Apache-2.0"
] | 4
|
2021-10-13T03:42:01.000Z
|
2022-03-21T13:07:56.000Z
|
import numpy as np
if __name__ == "__main__":
a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 3]])
b = np.array([[9, 7, 8], [6, 5, 4], [3, 2, 1]])
print(b @ a[0])
| 25.142857
| 51
| 0.426136
| 35
| 176
| 1.914286
| 0.6
| 0.208955
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152
| 0.289773
| 176
| 7
| 52
| 25.142857
| 0.384
| 0
| 0
| 0
| 0
| 0
| 0.045198
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0.2
| 0
| 0
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
91e76e8ce09ad989d61daf718014718920ea5da5
| 2,322
|
py
|
Python
|
test/test_path.py
|
tekknolagi/makesite-demo
|
ff14176c4afe1d764d0801550d93b417a7a52ccd
|
[
"MIT"
] | 1,744
|
2018-03-17T11:42:03.000Z
|
2022-03-16T08:58:36.000Z
|
test/test_path.py
|
tekknolagi/makesite-demo
|
ff14176c4afe1d764d0801550d93b417a7a52ccd
|
[
"MIT"
] | 24
|
2018-03-18T00:41:17.000Z
|
2021-01-03T16:53:32.000Z
|
test/test_path.py
|
tekknolagi/makesite-demo
|
ff14176c4afe1d764d0801550d93b417a7a52ccd
|
[
"MIT"
] | 365
|
2018-03-17T12:45:46.000Z
|
2022-03-25T12:05:47.000Z
|
import unittest
import os
import shutil
from test import path
class PathTest(unittest.TestCase):
def test_temppath(self):
self.assertTrue(path.temppath())
def test_move_existing_file(self):
src = os.path.join(path.temppath(), 'foo.txt')
dst = os.path.join(path.temppath(), 'bar.txt')
with open(src, 'w') as f:
f.write('foo')
path.move(src, dst)
self.assertFalse(os.path.isfile(src))
self.assertTrue(os.path.isfile(dst))
with open(dst) as f:
text = f.read()
os.remove(dst)
self.assertEqual(text, 'foo')
def test_move_missing_file(self):
src = os.path.join(path.temppath(), 'foo.txt')
dst = os.path.join(path.temppath(), 'bar.txt')
path.move(src, dst)
self.assertFalse(os.path.isfile(src))
self.assertFalse(os.path.isfile(dst))
def test_move_file_cleanup(self):
src = os.path.join(path.temppath(), 'foo.txt')
dst = os.path.join(path.temppath(), 'bar.txt')
with open(dst, 'w') as f:
f.write('foo')
path.move(src, dst)
self.assertFalse(os.path.isfile(src))
self.assertFalse(os.path.isfile(dst))
def test_move_existing_dir(self):
src = os.path.join(path.temppath(), 'foo')
srcf = os.path.join(src, 'foo.txt')
dst = os.path.join(path.temppath(), 'bar')
dstf = os.path.join(dst, 'foo.txt')
os.makedirs(src)
with open(srcf, 'w') as f:
f.write('foo')
path.move(src, dst)
self.assertFalse(os.path.isdir(src))
self.assertTrue(os.path.isdir(dst))
with open(dstf) as f:
text = f.read()
shutil.rmtree(dst)
self.assertEqual(text, 'foo')
def test_move_missing_dir(self):
src = os.path.join(path.temppath(), 'foo')
dst = os.path.join(path.temppath(), 'bar')
path.move(src, dst)
self.assertFalse(os.path.isdir(src))
self.assertFalse(os.path.isdir(dst))
def test_move_dir_cleanup(self):
src = os.path.join(path.temppath(), 'foo')
dst = os.path.join(path.temppath(), 'bar')
os.makedirs(dst)
path.move(src, dst)
self.assertFalse(os.path.isdir(src))
self.assertFalse(os.path.isdir(dst))
| 29.392405
| 54
| 0.582257
| 321
| 2,322
| 4.152648
| 0.133956
| 0.117029
| 0.105026
| 0.126032
| 0.763691
| 0.72168
| 0.72168
| 0.72168
| 0.72168
| 0.592648
| 0
| 0
| 0.260121
| 2,322
| 78
| 55
| 29.769231
| 0.775902
| 0
| 0
| 0.57377
| 0
| 0
| 0.039621
| 0
| 0
| 0
| 0
| 0
| 0.245902
| 1
| 0.114754
| false
| 0
| 0.065574
| 0
| 0.196721
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
37e107d6d12c32d5836a45d30bc980d3c8cd016d
| 470
|
py
|
Python
|
opennem/schema/util.py
|
paulculmsee/opennem
|
9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1
|
[
"MIT"
] | 22
|
2020-06-30T05:27:21.000Z
|
2022-02-21T12:13:51.000Z
|
opennem/schema/util.py
|
paulculmsee/opennem
|
9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1
|
[
"MIT"
] | 71
|
2020-08-07T13:06:30.000Z
|
2022-03-15T06:44:49.000Z
|
opennem/schema/util.py
|
paulculmsee/opennem
|
9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1
|
[
"MIT"
] | 13
|
2020-06-30T03:28:32.000Z
|
2021-12-30T08:17:16.000Z
|
import re
def first_or_none(values=None):
if values and type(values) is list and len(values) > 0:
return values[0]
return None
def cast_bool(f=None):
return True if f.lower() in ["true", "1", "yes"] else False
def strip_supressed(f=None):
return None if f.lower() in ["suppressed"] else f
def strip_schema(f=None):
return f
def strip_spaces(f=None):
return f.replace(" ", "")
def capitalize(f=None):
return f.capitalize()
| 16.785714
| 63
| 0.648936
| 76
| 470
| 3.934211
| 0.421053
| 0.083612
| 0.183946
| 0.120401
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008152
| 0.217021
| 470
| 27
| 64
| 17.407407
| 0.804348
| 0
| 0
| 0
| 0
| 0
| 0.040426
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0.066667
| 0.333333
| 0.933333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
37f866dc4ad58be63040400ba41c06d6c084f7de
| 39
|
py
|
Python
|
bob/db/swan/config_protocol_licit_p3_face_f4.py
|
bioidiap/bob.db.swan
|
676510d47cb08b65be04f51d45746127c36bf2ce
|
[
"BSD-3-Clause"
] | null | null | null |
bob/db/swan/config_protocol_licit_p3_face_f4.py
|
bioidiap/bob.db.swan
|
676510d47cb08b65be04f51d45746127c36bf2ce
|
[
"BSD-3-Clause"
] | null | null | null |
bob/db/swan/config_protocol_licit_p3_face_f4.py
|
bioidiap/bob.db.swan
|
676510d47cb08b65be04f51d45746127c36bf2ce
|
[
"BSD-3-Clause"
] | null | null | null |
database.protocol = 'licit_p3_face_f4'
| 19.5
| 38
| 0.820513
| 6
| 39
| 4.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 0.076923
| 39
| 1
| 39
| 39
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.410256
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
53059651b86915e2ce5e2b9a6f0f3d869f1dffdb
| 102
|
py
|
Python
|
symptom_checker/server/check_symptoms/apps.py
|
kevinhu/symptom-checker
|
9da05552290b300b21086b81dce6648d778d82f1
|
[
"MIT"
] | null | null | null |
symptom_checker/server/check_symptoms/apps.py
|
kevinhu/symptom-checker
|
9da05552290b300b21086b81dce6648d778d82f1
|
[
"MIT"
] | null | null | null |
symptom_checker/server/check_symptoms/apps.py
|
kevinhu/symptom-checker
|
9da05552290b300b21086b81dce6648d778d82f1
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class CheckSymptomsConfig(AppConfig):
name = "check_symptoms"
| 17
| 37
| 0.784314
| 11
| 102
| 7.181818
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147059
| 102
| 5
| 38
| 20.4
| 0.908046
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
530623b72562bebd9a1bde77f3579e658db80e2a
| 358
|
py
|
Python
|
Custom Configuration/tests/test_environment.py
|
adrianopaduam/pytest_studies
|
05932963539fb43baf64900b08fa12b8178c663b
|
[
"MIT"
] | null | null | null |
Custom Configuration/tests/test_environment.py
|
adrianopaduam/pytest_studies
|
05932963539fb43baf64900b08fa12b8178c663b
|
[
"MIT"
] | null | null | null |
Custom Configuration/tests/test_environment.py
|
adrianopaduam/pytest_studies
|
05932963539fb43baf64900b08fa12b8178c663b
|
[
"MIT"
] | null | null | null |
def test_environment_is_qa(app_config):
base_url = app_config.base_url
port = app_config.app_port
assert base_url == 'https://myqa-env.com'
assert port == '80'
def test_environment_is_dev(app_config):
base_url = app_config.base_url
port = app_config.app_port
assert base_url == 'https://mydev-env.com'
assert port == '8080'
| 27.538462
| 46
| 0.703911
| 56
| 358
| 4.142857
| 0.339286
| 0.232759
| 0.224138
| 0.275862
| 0.603448
| 0.603448
| 0.603448
| 0.603448
| 0.603448
| 0.603448
| 0
| 0.020548
| 0.184358
| 358
| 12
| 47
| 29.833333
| 0.773973
| 0
| 0
| 0.4
| 0
| 0
| 0.131285
| 0
| 0
| 0
| 0
| 0
| 0.4
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.2
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
530aeaa02d826491323ba63a2c3cb059a4b272d7
| 139
|
py
|
Python
|
python/testData/refactoring/inlineFunction/removeTypingOverrides/main.after.py
|
tgodzik/intellij-community
|
f5ef4191fc30b69db945633951fb160c1cfb7b6f
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/refactoring/inlineFunction/removeTypingOverrides/main.after.py
|
Cyril-lamirand/intellij-community
|
60ab6c61b82fc761dd68363eca7d9d69663cfa39
|
[
"Apache-2.0"
] | 2
|
2022-02-19T09:45:05.000Z
|
2022-02-27T20:32:55.000Z
|
python/testData/refactoring/inlineFunction/removeTypingOverrides/main.after.py
|
Cyril-lamirand/intellij-community
|
60ab6c61b82fc761dd68363eca7d9d69663cfa39
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
class MyClass:
def __init__(self, my_val):
self.my_val = my_val
my_class = MyClass(1)
print(my_class.my_val)
print(2)
res = 2
| 15.444444
| 31
| 0.676259
| 25
| 139
| 3.36
| 0.44
| 0.238095
| 0.214286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027273
| 0.208633
| 139
| 9
| 32
| 15.444444
| 0.736364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0
| 0
| 0.285714
| 0.285714
| 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
| 0
| 0
|
0
| 4
|
532304e5301ab488f7e6ee4068962bcbec873f82
| 143
|
py
|
Python
|
opentsdb/__init__.py
|
Kayoku/opentsdb-py
|
95fa6e7b1db13a0497534d08ae132708f479af37
|
[
"MIT"
] | 48
|
2016-12-27T10:11:41.000Z
|
2021-11-15T16:05:24.000Z
|
opentsdb/__init__.py
|
Kayoku/opentsdb-py
|
95fa6e7b1db13a0497534d08ae132708f479af37
|
[
"MIT"
] | 8
|
2017-10-08T16:20:30.000Z
|
2022-02-23T08:36:52.000Z
|
opentsdb/__init__.py
|
Kayoku/opentsdb-py
|
95fa6e7b1db13a0497534d08ae132708f479af37
|
[
"MIT"
] | 17
|
2017-10-01T01:14:55.000Z
|
2021-11-15T16:05:24.000Z
|
from .tsdb_client import TSDBClient, TSDBConnectProtocols
from .metrics import Counter, Gauge
from .exceptions import *
__version__ = '0.6.0'
| 23.833333
| 57
| 0.797203
| 18
| 143
| 6.055556
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.024
| 0.125874
| 143
| 5
| 58
| 28.6
| 0.848
| 0
| 0
| 0
| 0
| 0
| 0.034965
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
53265eaf9ebe72d3d47b22a0e1b49b3137598da2
| 140
|
py
|
Python
|
vdo_ops/api/schemas/host.py
|
rackerlabs/vdo-ops
|
cd077a4c446eaf2c4cdd2dec81e5101088f8bfec
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
vdo_ops/api/schemas/host.py
|
rackerlabs/vdo-ops
|
cd077a4c446eaf2c4cdd2dec81e5101088f8bfec
|
[
"Apache-2.0",
"MIT"
] | 1
|
2020-07-15T16:02:50.000Z
|
2020-07-24T15:15:18.000Z
|
vdo_ops/api/schemas/host.py
|
rackerlabs/vdo-ops
|
cd077a4c446eaf2c4cdd2dec81e5101088f8bfec
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
from flask_rebar import RequestSchema
from marshmallow import fields
class NetworkCopySchema(RequestSchema):
toHost = fields.String()
| 20
| 39
| 0.814286
| 15
| 140
| 7.533333
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135714
| 140
| 6
| 40
| 23.333333
| 0.933884
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
532b14dd645c4795ed300fe1240095c461dd3b21
| 283
|
py
|
Python
|
test/test_generate.py
|
hoj201/pyso3
|
e6888dba39a54740bff41a8bfec88d85b2285380
|
[
"MIT"
] | null | null | null |
test/test_generate.py
|
hoj201/pyso3
|
e6888dba39a54740bff41a8bfec88d85b2285380
|
[
"MIT"
] | null | null | null |
test/test_generate.py
|
hoj201/pyso3
|
e6888dba39a54740bff41a8bfec88d85b2285380
|
[
"MIT"
] | null | null | null |
import unittest
class TestGenerate(unittest.TestCase):
def test_generate(self):
from pyso3 import generate_random_rot
R = generate_random_rot()
from pyso3.check import isSO
self.assertTrue(isSO(R))
if __name__ == '__main__':
unittest.main()
| 23.583333
| 45
| 0.685512
| 34
| 283
| 5.323529
| 0.588235
| 0.099448
| 0.187845
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009174
| 0.229682
| 283
| 11
| 46
| 25.727273
| 0.821101
| 0
| 0
| 0
| 1
| 0
| 0.028269
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 1
| 0.111111
| false
| 0
| 0.333333
| 0
| 0.555556
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
532b5504220a3e79f46dd0344125b289ed2f4dca
| 133
|
py
|
Python
|
jirajumper/cache/models.py
|
jeeves-sh/jeeves-jira
|
2ac9e1ebb5324b8674664152a600834ffae38959
|
[
"MIT"
] | 2
|
2021-11-15T08:35:51.000Z
|
2022-01-16T07:05:41.000Z
|
jirajumper/cache/models.py
|
anatoly-scherbakov/jirajumper
|
2ac9e1ebb5324b8674664152a600834ffae38959
|
[
"MIT"
] | null | null | null |
jirajumper/cache/models.py
|
anatoly-scherbakov/jirajumper
|
2ac9e1ebb5324b8674664152a600834ffae38959
|
[
"MIT"
] | null | null | null |
from pydantic import BaseModel
class IssueField(BaseModel):
"""Custom JIRA field."""
cli_name: str
readable_name: str
| 14.777778
| 30
| 0.699248
| 16
| 133
| 5.6875
| 0.8125
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.210526
| 133
| 8
| 31
| 16.625
| 0.866667
| 0.135338
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 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
| 0
| 0
| 1
| 0
|
0
| 4
|
53417ffa76caa75d1d886ce024b55b2a1732560b
| 26
|
py
|
Python
|
python/events/lib/python3.4/io.py
|
classmember/proof_of_concept
|
da284ca57806f7c05c1b39bebfe0d681db2260fc
|
[
"MIT"
] | null | null | null |
python/events/lib/python3.4/io.py
|
classmember/proof_of_concept
|
da284ca57806f7c05c1b39bebfe0d681db2260fc
|
[
"MIT"
] | 3
|
2020-06-05T23:21:54.000Z
|
2021-06-10T22:02:26.000Z
|
python/events/lib/python3.4/io.py
|
classmember/proof_of_concept
|
da284ca57806f7c05c1b39bebfe0d681db2260fc
|
[
"MIT"
] | null | null | null |
/usr/lib64/python3.4/io.py
| 26
| 26
| 0.769231
| 6
| 26
| 3.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 0
| 26
| 1
| 26
| 26
| 0.615385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
725e9c1cfc62b0e29eef04ed622f2996ae4a547a
| 13,272
|
py
|
Python
|
search/tests/unit/proxy/v2/fixtures_v2.py
|
kokizzu/amundsen
|
710786443125e513f6d23ecda7442fe47a2a6523
|
[
"Apache-2.0"
] | 1
|
2022-01-09T03:23:59.000Z
|
2022-01-09T03:23:59.000Z
|
search/tests/unit/proxy/v2/fixtures_v2.py
|
kokizzu/amundsen
|
710786443125e513f6d23ecda7442fe47a2a6523
|
[
"Apache-2.0"
] | null | null | null |
search/tests/unit/proxy/v2/fixtures_v2.py
|
kokizzu/amundsen
|
710786443125e513f6d23ecda7442fe47a2a6523
|
[
"Apache-2.0"
] | null | null | null |
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0
TERM_FILTERS_QUERY = {
"bool": {
"must": [
{
"multi_match": {
"query": "mock_feature",
"fields": [
"feature_name.raw^25",
"feature_name^7",
"feature_group.raw^15",
"feature_group^7",
"version^7",
"description^3",
"status",
"entity",
"tags",
"badges",
],
"type": "cross_fields",
}
}
],
"filter": [
{"wildcard": {"badges": "pii"}},
{
"bool": {
"should": [
{"wildcard": {"feature_group.raw": "test_group"}},
{"wildcard": {"feature_group.raw": "mock_group"}},
],
"minimum_should_match": 1,
}
},
],
}
}
TERM_QUERY = {
"bool": {
"must": [
{
"multi_match": {
"query": "mock_table",
"fields": [
"name^3",
"name.raw^3",
"schema^2",
"description",
"column_names",
"badges",
],
"type": "cross_fields",
}
}
]
}
}
FILTER_QUERY = {
"bool": {
"filter": [
{
"bool": {
"should": [{"wildcard": {"name.raw": "mock_dashobard_*"}}],
"minimum_should_match": 1,
}
},
{
"bool": {
"should": [
{"wildcard": {"group_name.raw": "test_group"}},
{"wildcard": {"group_name.raw": "mock_group"}},
],
"minimum_should_match": 1,
}
},
{"wildcard": {"tags": "tag_*"}},
{"wildcard": {"tags": "tag_2"}},
]
}
}
RESPONSE_1 = [
{
"took": 10,
"timed_out": False,
"_shards": {"total": 5, "successful": 5, "skipped": 0, "failed": 0},
"hits": {
"total": {"value": 2, "relation": "eq"},
"max_score": 804.52716,
"hits": [
{
"_index": "table_search_index",
"_type": "table",
"_id": "mock_id_1",
"_score": 804.52716,
"_source": {
"badges": ["pii", "beta"],
"cluster": "mock_cluster",
"column_descriptions": [
"mock_col_desc_1",
"mock_col_desc_2",
"mock_col_desc_3",
],
"column_names": ["mock_col_1", "mock_col_2", "mock_col_3"],
"database": "mock_db",
"description": "mock table description",
"display_name": "mock_schema.mock_table_1",
"key": "mock_db://mock_cluster.mock_schema/mock_table_1",
"last_updated_timestamp": 1635831717,
"name": "mock_table_1",
"programmatic_descriptions": [],
"schema": "mock_schema",
"schema_description": None,
"tags": ["mock_tag_1", "mock_tag_2", "mock_tag_3"],
"total_usage": 74841,
"unique_usage": 457,
"resource_type": "table",
},
},
{
"_index": "table_search_index",
"_type": "table",
"_id": "mock_id_2",
"_score": 9.104584,
"_source": {
"badges": [],
"cluster": "mock_cluster",
"column_descriptions": [
"mock_col_desc_1",
"mock_col_desc_2",
"mock_col_desc_3",
],
"column_names": ["mock_col_1", "mock_col_2", "mock_col_3"],
"database": "mock_db",
"description": "mock table description",
"display_name": "mock_schema.mock_table_2",
"key": "mock_db://mock_cluster.mock_schema/mock_table_2",
"last_updated_timestamp": 1635831717,
"name": "mock_table_2",
"programmatic_descriptions": [],
"schema": "mock_schema",
"schema_description": None,
"tags": ["mock_tag_4", "mock_tag_5", "mock_tag_6"],
"total_usage": 4715,
"unique_usage": 254,
"resource_type": "table",
},
},
],
},
"status": 200,
},
{
"took": 1,
"timed_out": False,
"_shards": {"total": 5, "successful": 5, "skipped": 0, "failed": 0},
"hits": {
"total": {"value": 0, "relation": "eq"},
"max_score": None,
"hits": [],
},
"status": 200,
},
]
RESPONSE_2 = [
{
"took": 12,
"timed_out": False,
"_shards": {"total": 5, "successful": 5, "skipped": 0, "failed": 0},
"hits": {
"total": {"value": 2, "relation": "eq"},
"max_score": 771.9865,
"hits": [
{
"_index": "table_search_index",
"_type": "table",
"_id": "mock_id_1",
"_score": 804.52716,
"_source": {
"badges": ["pii", "beta"],
"cluster": "mock_cluster",
"column_descriptions": [
"mock_col_desc_1",
"mock_col_desc_2",
"mock_col_desc_3",
],
"column_names": ["mock_col_1", "mock_col_2", "mock_col_3"],
"database": "mock_db",
"description": "mock table description",
"display_name": "mock_schema.mock_table_1",
"key": "mock_db://mock_cluster.mock_schema/mock_table_1",
"last_updated_timestamp": 1635831717,
"name": "mock_table_1",
"programmatic_descriptions": [],
"schema": "mock_schema",
"schema_description": None,
"tags": ["mock_tag_1", "mock_tag_2", "mock_tag_3"],
"total_usage": 74841,
"unique_usage": 457,
"resource_type": "table",
},
},
{
"_index": "table_search_index",
"_type": "table",
"_id": "mock_id_2",
"_score": 9.104584,
"_source": {
"badges": [],
"cluster": "mock_cluster",
"column_descriptions": [
"mock_col_desc_1",
"mock_col_desc_2",
"mock_col_desc_3",
],
"column_names": ["mock_col_1", "mock_col_2", "mock_col_3"],
"database": "mock_db",
"description": "mock table description",
"display_name": "mock_schema.mock_table_2",
"key": "mock_db://mock_cluster.mock_schema/mock_table_2",
"last_updated_timestamp": 1635831717,
"name": "mock_table_2",
"programmatic_descriptions": [],
"schema": "mock_schema",
"schema_description": None,
"tags": ["mock_tag_4", "mock_tag_5", "mock_tag_6"],
"total_usage": 4715,
"unique_usage": 254,
"resource_type": "table",
},
},
],
},
"status": 200,
},
{
"took": 6,
"timed_out": False,
"_shards": {"total": 5, "successful": 5, "skipped": 0, "failed": 0},
"hits": {
"total": {"value": 1, "relation": "eq"},
"max_score": 61.40606,
"hits": [
{
"_index": "user_search_index",
"_type": "user",
"_id": "mack_user_id",
"_score": 61.40606,
"_source": {
"email": "mock_user@amundsen.com",
"employee_type": "",
"first_name": "Allison",
"full_name": "Allison Suarez Miranda",
"github_username": "allisonsuarez",
"is_active": True,
"last_name": "Suarez Miranda",
"manager_email": "mock_manager@amundsen.com",
"role_name": "SWE",
"slack_id": "",
"team_name": "Amundsen",
"total_follow": 0,
"total_own": 1,
"total_read": 0,
"resource_type": "user",
},
}
],
},
"status": 200,
},
{
"took": 8,
"timed_out": False,
"_shards": {"total": 5, "successful": 5, "skipped": 0, "failed": 0},
"hits": {
"total": {"value": 3, "relation": "eq"},
"max_score": 62.66787,
"hits": [
{
"_index": "feature_search_index",
"_type": "feature",
"_id": "mock_feat_id",
"_score": 62.66787,
"_source": {
"availability": None,
"badges": [],
"description": "mock feature description",
"entity": None,
"feature_group": "fg_2",
"feature_name": "feature_1",
"key": "none/feature_1/1",
"last_updated_timestamp": 1525208316,
"status": "active",
"tags": [],
"total_usage": 0,
"version": 1,
"resource_type": "feature",
},
},
{
"_index": "feature_search_index",
"_type": "feature",
"_id": "mock_feat_id_2",
"_score": 62.66787,
"_source": {
"availability": None,
"badges": [],
"description": "mock feature description",
"entity": None,
"feature_group": "fg_2",
"feature_name": "feature_2",
"key": "fg_2/feature_2/1",
"last_updated_timestamp": 1525208316,
"status": "active",
"tags": [],
"total_usage": 10,
"version": 1,
"resource_type": "feature",
},
},
{
"_index": "feature_search_index",
"_type": "feature",
"_id": "mock_feat_id_3",
"_score": 62.66787,
"_source": {
"availability": None,
"badges": ["pii"],
"description": "mock feature description",
"entity": None,
"feature_group": "fg_3",
"feature_name": "feature_3",
"key": "fg_3/feature_3/2",
"last_updated_timestamp": 1525208316,
"status": "active",
"tags": [],
"total_usage": 3,
"version": 2,
"resource_type": "feature",
},
},
],
},
"status": 200,
},
]
| 37.597734
| 83
| 0.342902
| 907
| 13,272
| 4.637266
| 0.151047
| 0.039943
| 0.031384
| 0.036139
| 0.747028
| 0.734189
| 0.734189
| 0.694722
| 0.694722
| 0.667855
| 0
| 0.052648
| 0.526296
| 13,272
| 352
| 84
| 37.704545
| 0.616351
| 0.006254
| 0
| 0.590116
| 0
| 0
| 0.31632
| 0.044365
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 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
| 4
|
725ea299b357a1ff918cd79705e4387a5809b4b8
| 207
|
py
|
Python
|
tests/test_dijkstra.py
|
gzxultra/GraphAlg
|
9ca203a5451636f2c32ff47494c60c2f57f94ddd
|
[
"MIT"
] | null | null | null |
tests/test_dijkstra.py
|
gzxultra/GraphAlg
|
9ca203a5451636f2c32ff47494c60c2f57f94ddd
|
[
"MIT"
] | null | null | null |
tests/test_dijkstra.py
|
gzxultra/GraphAlg
|
9ca203a5451636f2c32ff47494c60c2f57f94ddd
|
[
"MIT"
] | null | null | null |
from src.dijkstra import dijkstra
def test_dijkstra(graph1):
src, dst = 0, 2
result = dijkstra(graph1, src, dst)
assert result == ({0: 0, 1: 100, 2: 300, 3: 200}, {0: None, 1: 0, 2: 3, 3: 1})
| 23
| 82
| 0.589372
| 36
| 207
| 3.361111
| 0.5
| 0.231405
| 0.280992
| 0.330579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159236
| 0.241546
| 207
| 8
| 83
| 25.875
| 0.611465
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
72a130b6d73579a1be0db62e24e0334268d806ba
| 271
|
py
|
Python
|
myapi/core/serializers.py
|
prateekspanwar/django-rest-crud
|
ecf989dcfef50dfcc01a7e1991ea402e7e057fac
|
[
"MIT"
] | null | null | null |
myapi/core/serializers.py
|
prateekspanwar/django-rest-crud
|
ecf989dcfef50dfcc01a7e1991ea402e7e057fac
|
[
"MIT"
] | 3
|
2020-02-12T01:25:17.000Z
|
2021-06-10T21:52:10.000Z
|
myapi/core/serializers.py
|
prateekspanwar/django-rest-crud
|
ecf989dcfef50dfcc01a7e1991ea402e7e057fac
|
[
"MIT"
] | null | null | null |
from rest_framework import serializers
from .models import Inventory
class InventorySerializer(serializers.ModelSerializer):
class Meta:
model = Inventory
fields = ('id','title','author','isbn','publisher_name','publisher_date','category','stocks')
| 38.714286
| 103
| 0.730627
| 28
| 271
| 6.964286
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147601
| 271
| 7
| 103
| 38.714286
| 0.844156
| 0
| 0
| 0
| 0
| 0
| 0.216912
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
72a952131ee801ed1198e0cb692213ed524593ae
| 147
|
py
|
Python
|
tests/someapp/tasks.py
|
winhamwr/celery
|
249a270301ddb9b025cf8d00400bb442df9cae62
|
[
"BSD-3-Clause"
] | 1
|
2017-12-26T06:29:37.000Z
|
2017-12-26T06:29:37.000Z
|
tests/someapp/tasks.py
|
winhamwr/celery
|
249a270301ddb9b025cf8d00400bb442df9cae62
|
[
"BSD-3-Clause"
] | null | null | null |
tests/someapp/tasks.py
|
winhamwr/celery
|
249a270301ddb9b025cf8d00400bb442df9cae62
|
[
"BSD-3-Clause"
] | null | null | null |
from celery.task import tasks, Task
class SomeAppTask(Task):
name = "c.unittest.SomeAppTask"
def run(self, **kwargs):
return 42
| 16.333333
| 35
| 0.659864
| 19
| 147
| 5.105263
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017699
| 0.231293
| 147
| 8
| 36
| 18.375
| 0.840708
| 0
| 0
| 0
| 0
| 0
| 0.14966
| 0.14966
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
72ab571005595f5ab5f5536c2f1997e5823383a4
| 62
|
py
|
Python
|
{{ cookiecutter.tool_name_slug }}/{{ cookiecutter.tool_name_slug }}/model/__init__.py
|
polyglot-jones/cookiecutter-cli-filter
|
cc2552d16c619369c8f77cc4b4271e89ffbca6f8
|
[
"BSD-3-Clause"
] | null | null | null |
{{ cookiecutter.tool_name_slug }}/{{ cookiecutter.tool_name_slug }}/model/__init__.py
|
polyglot-jones/cookiecutter-cli-filter
|
cc2552d16c619369c8f77cc4b4271e89ffbca6f8
|
[
"BSD-3-Clause"
] | null | null | null |
{{ cookiecutter.tool_name_slug }}/{{ cookiecutter.tool_name_slug }}/model/__init__.py
|
polyglot-jones/cookiecutter-cli-filter
|
cc2552d16c619369c8f77cc4b4271e89ffbca6f8
|
[
"BSD-3-Clause"
] | null | null | null |
# The existence of this file makes this subfolder a "package"
| 31
| 61
| 0.774194
| 10
| 62
| 4.8
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177419
| 62
| 1
| 62
| 62
| 0.941176
| 0.951613
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
72b05e8b927784f70e755d952422adc9e16a6ed0
| 91
|
py
|
Python
|
mods/mods.py
|
arpith/warmups
|
5acbb84bcbfb5f6ca9c6a0b58503a146863f16d1
|
[
"MIT"
] | null | null | null |
mods/mods.py
|
arpith/warmups
|
5acbb84bcbfb5f6ca9c6a0b58503a146863f16d1
|
[
"MIT"
] | null | null | null |
mods/mods.py
|
arpith/warmups
|
5acbb84bcbfb5f6ca9c6a0b58503a146863f16d1
|
[
"MIT"
] | null | null | null |
def mods(l, n):
ret = [[x for x in l if x % n == i] for i in xrange(n)]
return ret
| 22.75
| 59
| 0.516484
| 21
| 91
| 2.238095
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.32967
| 91
| 3
| 60
| 30.333333
| 0.770492
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
72d8284b8c564c4b0aed592d52356c8aafda78a3
| 127
|
py
|
Python
|
torchfcn/models/vgg.py
|
oksidgy/pytorch-fcn
|
bae7eb3c6785ad16a82414ef6901a4eb7a8f795b
|
[
"MIT"
] | null | null | null |
torchfcn/models/vgg.py
|
oksidgy/pytorch-fcn
|
bae7eb3c6785ad16a82414ef6901a4eb7a8f795b
|
[
"MIT"
] | null | null | null |
torchfcn/models/vgg.py
|
oksidgy/pytorch-fcn
|
bae7eb3c6785ad16a82414ef6901a4eb7a8f795b
|
[
"MIT"
] | null | null | null |
import torchvision
def VGG16(pretrained=False):
model = torchvision.models.vgg16(pretrained=pretrained)
return model
| 18.142857
| 59
| 0.771654
| 14
| 127
| 7
| 0.642857
| 0.306122
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037037
| 0.149606
| 127
| 7
| 60
| 18.142857
| 0.87037
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
72e5255b925d11c3da8e31a47b6c5a2c4a207e0a
| 260
|
wsgi
|
Python
|
manage.wsgi
|
willypuzzle/flask-foundation
|
3d4a09470d8303905969f19a990baa0945fdf1d0
|
[
"BSD-2-Clause"
] | null | null | null |
manage.wsgi
|
willypuzzle/flask-foundation
|
3d4a09470d8303905969f19a990baa0945fdf1d0
|
[
"BSD-2-Clause"
] | null | null | null |
manage.wsgi
|
willypuzzle/flask-foundation
|
3d4a09470d8303905969f19a990baa0945fdf1d0
|
[
"BSD-2-Clause"
] | null | null | null |
import sys
import os
sys.path.insert(0, os.path.dirname(__file__))
sys.path.insert(1, os.path.dirname(__file__)+os.path.sep+'env'+os.path.sep+'lib'+os.path.sep+'python3.5'+os.path.sep+'site-packages')
from app.application import create
application = create()
| 32.5
| 133
| 0.753846
| 45
| 260
| 4.177778
| 0.444444
| 0.191489
| 0.191489
| 0.180851
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016393
| 0.061538
| 260
| 7
| 134
| 37.142857
| 0.754098
| 0
| 0
| 0
| 0
| 0
| 0.107692
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
72e63539296ccb15ad44c3bafb77457a3e3dbb68
| 1,114
|
py
|
Python
|
tests/materializers/types/test_scoped_factor.py
|
CamDavidsonPilon/formulaic
|
7afb4e4029860f081e16473621595e2c47634933
|
[
"MIT"
] | 1
|
2021-04-04T09:14:03.000Z
|
2021-04-04T09:14:03.000Z
|
tests/materializers/types/test_scoped_factor.py
|
bashtage/formulaic
|
bd2ad61e1f06b5ef083a9d91804a47b69cf06ae1
|
[
"MIT"
] | null | null | null |
tests/materializers/types/test_scoped_factor.py
|
bashtage/formulaic
|
bd2ad61e1f06b5ef083a9d91804a47b69cf06ae1
|
[
"MIT"
] | null | null | null |
import pytest
from formulaic.materializers.types import ScopedFactor
from formulaic.parser.types import Factor
class TestScopedFactor:
@pytest.fixture
def scoped_factor(self):
return ScopedFactor(Factor('a'))
@pytest.fixture
def scoped_factor_reduced(self):
return ScopedFactor(Factor('a'), reduced=True)
def test_repr(self, scoped_factor, scoped_factor_reduced):
assert repr(scoped_factor) == 'a'
assert repr(scoped_factor_reduced) == 'a-'
def test_hash(self, scoped_factor, scoped_factor_reduced):
assert hash(scoped_factor) == hash('a')
assert hash(scoped_factor_reduced) == hash('a-')
def test_equality(self, scoped_factor, scoped_factor_reduced):
assert scoped_factor == scoped_factor
assert scoped_factor != scoped_factor_reduced
assert scoped_factor != 1
def test_sort(self, scoped_factor, scoped_factor_reduced):
assert scoped_factor_reduced < scoped_factor
assert scoped_factor < ScopedFactor(Factor('b'))
with pytest.raises(TypeError):
scoped_factor < 1
| 30.944444
| 66
| 0.705566
| 133
| 1,114
| 5.639098
| 0.225564
| 0.368
| 0.228
| 0.192
| 0.532
| 0.316
| 0.316
| 0.206667
| 0.141333
| 0
| 0
| 0.002262
| 0.206463
| 1,114
| 35
| 67
| 31.828571
| 0.846154
| 0
| 0
| 0.08
| 0
| 0
| 0.008079
| 0
| 0
| 0
| 0
| 0
| 0.36
| 1
| 0.24
| false
| 0
| 0.12
| 0.08
| 0.48
| 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
| 0
| 0
|
0
| 4
|
72e722db8fef28f2a1feb1b0052a9ed951799016
| 214
|
py
|
Python
|
test/anchor_test.py
|
engineer1109/TensorFlow-R-FCN-for-primary-students
|
66be2133052cacc04b5b04054624333c2c17ebd2
|
[
"MIT"
] | 12
|
2017-12-23T12:03:36.000Z
|
2020-04-28T09:37:30.000Z
|
test/anchor_test.py
|
engineer1109/TensorFlow-R-FCN-for-primary-students
|
66be2133052cacc04b5b04054624333c2c17ebd2
|
[
"MIT"
] | 6
|
2017-12-27T12:30:52.000Z
|
2021-05-02T11:01:59.000Z
|
test/anchor_test.py
|
engineer1109/TensorFlow-R-FCN-for-primary-students
|
66be2133052cacc04b5b04054624333c2c17ebd2
|
[
"MIT"
] | 3
|
2018-08-22T08:47:17.000Z
|
2019-10-10T07:53:40.000Z
|
import tensorflow as tf
import numpy as np
from layer_utils import snippets
if __name__ == '__main__':
anchors, length = snippets.generate_anchors_pre(40, 60, 16)
print(anchors[:32, :])
print(length)
| 21.4
| 63
| 0.719626
| 30
| 214
| 4.766667
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045714
| 0.182243
| 214
| 9
| 64
| 23.777778
| 0.771429
| 0
| 0
| 0
| 1
| 0
| 0.037383
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.428571
| 0
| 0.428571
| 0.285714
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f412e3eb1e10b16ee54f1595c6d748fe7f225b38
| 155
|
py
|
Python
|
systori/lib/templatetags/pusher.py
|
systori/systori
|
e309c63e735079ff6032fdaf1db354ec872b28b1
|
[
"BSD-3-Clause"
] | 12
|
2018-01-30T00:44:06.000Z
|
2020-07-13T05:20:48.000Z
|
systori/lib/templatetags/pusher.py
|
systori/systori
|
e309c63e735079ff6032fdaf1db354ec872b28b1
|
[
"BSD-3-Clause"
] | 36
|
2018-03-06T17:49:50.000Z
|
2020-06-23T19:26:00.000Z
|
systori/lib/templatetags/pusher.py
|
systori/systori
|
e309c63e735079ff6032fdaf1db354ec872b28b1
|
[
"BSD-3-Clause"
] | 3
|
2018-08-03T07:03:09.000Z
|
2020-07-09T20:21:10.000Z
|
import os
from django import template
register = template.Library()
@register.simple_tag
def pusher_key():
return os.environ.get("PUSHER_KEY", "")
| 14.090909
| 43
| 0.735484
| 21
| 155
| 5.285714
| 0.714286
| 0.162162
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148387
| 155
| 10
| 44
| 15.5
| 0.840909
| 0
| 0
| 0
| 0
| 0
| 0.064516
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
f41353ba939d04729dcb8f9762c5ba52e5a9adac
| 397
|
py
|
Python
|
jacdac/capacitive_button/constants.py
|
microsoft/jacdac-python
|
712ad5559e29065f5eccb5dbfe029c039132df5a
|
[
"MIT"
] | 1
|
2022-02-15T21:30:36.000Z
|
2022-02-15T21:30:36.000Z
|
jacdac/capacitive_button/constants.py
|
microsoft/jacdac-python
|
712ad5559e29065f5eccb5dbfe029c039132df5a
|
[
"MIT"
] | null | null | null |
jacdac/capacitive_button/constants.py
|
microsoft/jacdac-python
|
712ad5559e29065f5eccb5dbfe029c039132df5a
|
[
"MIT"
] | 1
|
2022-02-08T19:32:45.000Z
|
2022-02-08T19:32:45.000Z
|
# Autogenerated constants for Capacitive Button service
from jacdac.constants import *
from jacdac.system.constants import *
JD_SERVICE_CLASS_CAPACITIVE_BUTTON = const(0x2865adc9)
JD_CAPACITIVE_BUTTON_REG_THRESHOLD = const(JD_REG_ACTIVE_THRESHOLD)
JD_CAPACITIVE_BUTTON_CMD_CALIBRATE = const(JD_CMD_CALIBRATE)
JD_CAPACITIVE_BUTTON_PACK_FORMATS = {
JD_CAPACITIVE_BUTTON_REG_THRESHOLD: "u0.16"
}
| 39.7
| 67
| 0.858942
| 53
| 397
| 5.962264
| 0.433962
| 0.303797
| 0.227848
| 0.132911
| 0.189873
| 0
| 0
| 0
| 0
| 0
| 0
| 0.024793
| 0.085642
| 397
| 9
| 68
| 44.111111
| 0.84573
| 0.133501
| 0
| 0
| 1
| 0
| 0.01462
| 0
| 0
| 0
| 0.02924
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f414567e50f555baa9283a32ced6938bd5c02d90
| 167
|
py
|
Python
|
digsby/src/gui/native/shared/__init__.py
|
ifwe/digsby
|
f5fe00244744aa131e07f09348d10563f3d8fa99
|
[
"Python-2.0"
] | 35
|
2015-08-15T14:32:38.000Z
|
2021-12-09T16:21:26.000Z
|
digsby/src/gui/native/shared/__init__.py
|
niterain/digsby
|
16a62c7df1018a49eaa8151c0f8b881c7e252949
|
[
"Python-2.0"
] | 4
|
2015-09-12T10:42:57.000Z
|
2017-02-27T04:05:51.000Z
|
digsby/src/gui/native/shared/__init__.py
|
niterain/digsby
|
16a62c7df1018a49eaa8151c0f8b881c7e252949
|
[
"Python-2.0"
] | 15
|
2015-07-10T23:58:07.000Z
|
2022-01-23T22:16:33.000Z
|
'''
The purpose of this directory is to contain files used by multiple
platforms, but not by all. (In some cases GTK and Mac impls. can share code,
for example.)
'''
| 27.833333
| 77
| 0.730539
| 29
| 167
| 4.206897
| 0.965517
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191617
| 167
| 5
| 78
| 33.4
| 0.903704
| 0.946108
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f41e4e52f4ffadb39739c0ea6e10894af80ef0ec
| 291
|
py
|
Python
|
tests/model_regress/test_state.py
|
ni-ning/django
|
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
|
[
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 19
|
2015-07-07T02:08:59.000Z
|
2021-11-08T11:05:40.000Z
|
tests/model_regress/test_state.py
|
ni-ning/django
|
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
|
[
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 57
|
2018-10-08T12:37:30.000Z
|
2018-10-08T17:39:26.000Z
|
tests/model_regress/test_state.py
|
mustafa0x/django
|
d7394cfa13a4d1a02356e3a83e10ec100fbb9948
|
[
"BSD-3-Clause",
"0BSD"
] | 145
|
2019-03-14T18:54:45.000Z
|
2022-03-04T20:25:31.000Z
|
from django.db.models.base import ModelState, ModelStateFieldsCacheDescriptor
from django.test import SimpleTestCase
class ModelStateTests(SimpleTestCase):
def test_fields_cache_descriptor(self):
self.assertIsInstance(ModelState.fields_cache, ModelStateFieldsCacheDescriptor)
| 32.333333
| 87
| 0.841924
| 28
| 291
| 8.607143
| 0.642857
| 0.082988
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103093
| 291
| 8
| 88
| 36.375
| 0.923372
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0.2
| false
| 0
| 0.4
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f43069295a70a85e4e658a054ed2ac2fb3d1d01b
| 137
|
py
|
Python
|
active-learning-service/src/admin.py
|
liqishi1988/data-annotator-for-machine-learning
|
ed093fcc397314193d22d3ac850e87eba3758a0a
|
[
"Apache-2.0"
] | 33
|
2021-05-11T00:16:30.000Z
|
2022-02-24T16:49:28.000Z
|
active-learning-service/src/admin.py
|
liqishi1988/data-annotator-for-machine-learning
|
ed093fcc397314193d22d3ac850e87eba3758a0a
|
[
"Apache-2.0"
] | 117
|
2021-05-13T01:19:39.000Z
|
2022-03-31T03:31:56.000Z
|
active-learning-service/src/admin.py
|
liqishi1988/data-annotator-for-machine-learning
|
ed093fcc397314193d22d3ac850e87eba3758a0a
|
[
"Apache-2.0"
] | 16
|
2021-05-18T01:33:11.000Z
|
2022-02-24T16:53:33.000Z
|
# Copyright 2019-2021 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0
from django.contrib import admin
# Register your models here.
| 19.571429
| 37
| 0.766423
| 20
| 137
| 5.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.084746
| 0.138686
| 137
| 6
| 38
| 22.833333
| 0.805085
| 0.693431
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f43361c918e9b9c3468bf93893bc9057dd807049
| 81
|
py
|
Python
|
src/python/v2/base/module/runoob1.py
|
youngzil/quickstart-python
|
988aabb9357ee35aa06ec0d18c36d201b9e640b1
|
[
"Apache-2.0"
] | null | null | null |
src/python/v2/base/module/runoob1.py
|
youngzil/quickstart-python
|
988aabb9357ee35aa06ec0d18c36d201b9e640b1
|
[
"Apache-2.0"
] | null | null | null |
src/python/v2/base/module/runoob1.py
|
youngzil/quickstart-python
|
988aabb9357ee35aa06ec0d18c36d201b9e640b1
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
def runoob1():
print "I'm in runoob1"
| 16.2
| 23
| 0.592593
| 13
| 81
| 3.692308
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044118
| 0.160494
| 81
| 5
| 24
| 16.2
| 0.661765
| 0.469136
| 0
| 0
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
f43b9bfb09ca98797a541292335baca99b64a173
| 406
|
py
|
Python
|
synapse/cells.py
|
larrycameron80/synapse
|
24bf21c40b4a467e5dc28c8204aecaf502d5cddf
|
[
"Apache-2.0"
] | null | null | null |
synapse/cells.py
|
larrycameron80/synapse
|
24bf21c40b4a467e5dc28c8204aecaf502d5cddf
|
[
"Apache-2.0"
] | null | null | null |
synapse/cells.py
|
larrycameron80/synapse
|
24bf21c40b4a467e5dc28c8204aecaf502d5cddf
|
[
"Apache-2.0"
] | null | null | null |
'''
Constructors for the various cells.
( used for dmon config automation)
'''
import synapse.axon as s_axon
import synapse.neuron as s_neuron
import synapse.cryotank as s_cryotank
def cryo(dirn, conf=None):
return s_cryotank.CryoCell(dirn, conf=conf)
def axon(dirn, conf=None):
return s_axon.AxonCell(dirn, conf=conf)
#def neuron(dirn, conf=None):
#return s_neuron.Neuron(dirn, conf=conf)
| 22.555556
| 47
| 0.746305
| 64
| 406
| 4.640625
| 0.375
| 0.161616
| 0.121212
| 0.181818
| 0.191919
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14532
| 406
| 17
| 48
| 23.882353
| 0.855908
| 0.339901
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.428571
| 0.285714
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
|
0
| 4
|
f444ccf9ba60701a2fe120fae876e8bea8f16e17
| 67
|
py
|
Python
|
sparv/modules/sensaldo/__init__.py
|
heatherleaf/sparv-pipeline
|
0fe5f27d0d82548ecc6cb21a69289668aac54cf1
|
[
"MIT"
] | 17
|
2018-09-21T07:01:45.000Z
|
2022-02-24T23:26:49.000Z
|
sparv/modules/sensaldo/__init__.py
|
heatherleaf/sparv-pipeline
|
0fe5f27d0d82548ecc6cb21a69289668aac54cf1
|
[
"MIT"
] | 146
|
2018-11-13T19:13:25.000Z
|
2022-03-31T09:57:56.000Z
|
sparv/modules/sensaldo/__init__.py
|
heatherleaf/sparv-pipeline
|
0fe5f27d0d82548ecc6cb21a69289668aac54cf1
|
[
"MIT"
] | 5
|
2019-02-14T00:50:38.000Z
|
2021-03-29T15:37:41.000Z
|
"""Sentiment annotation using SenSALDO."""
from . import sensaldo
| 16.75
| 42
| 0.746269
| 7
| 67
| 7.142857
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134328
| 67
| 3
| 43
| 22.333333
| 0.862069
| 0.537313
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
be474ff6dad68a01f0f5cecc885d779c587ebd2d
| 123
|
py
|
Python
|
chainer/functions/caffe/__init__.py
|
mingxiaoh/chainer-v3
|
815ff00f5eaf7944d6e8a75662ff64a2fe046a4d
|
[
"BSD-3-Clause"
] | 7
|
2017-05-08T07:02:40.000Z
|
2018-12-02T18:35:39.000Z
|
chainer/functions/caffe/__init__.py
|
mingxiaoh/chainer-v3
|
815ff00f5eaf7944d6e8a75662ff64a2fe046a4d
|
[
"BSD-3-Clause"
] | 1
|
2016-11-09T06:32:32.000Z
|
2016-11-09T10:20:04.000Z
|
chainer/functions/caffe/__init__.py
|
mingxiaoh/chainer-v3
|
815ff00f5eaf7944d6e8a75662ff64a2fe046a4d
|
[
"BSD-3-Clause"
] | 1
|
2021-05-27T16:52:11.000Z
|
2021-05-27T16:52:11.000Z
|
from chainer.links.caffe import caffe_function
# for backward compatibility
CaffeFunction = caffe_function.CaffeFunction
| 20.5
| 46
| 0.853659
| 14
| 123
| 7.357143
| 0.714286
| 0.252427
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105691
| 123
| 5
| 47
| 24.6
| 0.936364
| 0.211382
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
be53c501b602f8c83440f60862780a32ae6d3e48
| 202
|
py
|
Python
|
supportbot/bots.py
|
zhangkaizhao/supportbot
|
03c8e1761a3450614b53c3bdc8c5c33af1f186ec
|
[
"MIT"
] | 1
|
2019-02-27T06:07:17.000Z
|
2019-02-27T06:07:17.000Z
|
supportbot/bots.py
|
zhangkaizhao/supportbot
|
03c8e1761a3450614b53c3bdc8c5c33af1f186ec
|
[
"MIT"
] | null | null | null |
supportbot/bots.py
|
zhangkaizhao/supportbot
|
03c8e1761a3450614b53c3bdc8c5c33af1f186ec
|
[
"MIT"
] | null | null | null |
from supportbot.full_text_search.bot import FullTextSearchSupportbot
from supportbot.fuzzy_matching.bot import FuzzyMatchingSupportbot
__all__ = ["FullTextSearchSupportbot", "FuzzyMatchingSupportbot"]
| 40.4
| 68
| 0.876238
| 18
| 202
| 9.444444
| 0.666667
| 0.164706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064356
| 202
| 4
| 69
| 50.5
| 0.899471
| 0
| 0
| 0
| 0
| 0
| 0.232673
| 0.232673
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
bea26cf69a2516db56b01ee6c3dbbf4371d6f339
| 511
|
py
|
Python
|
HolePlateMaker/setBU32.py
|
henjin0/HolePlateMaker
|
daf7ef5269b03f2ac2fdc9a8132f945b14177aa0
|
[
"MIT"
] | 2
|
2020-10-10T21:46:18.000Z
|
2021-11-01T03:53:16.000Z
|
HolePlateMaker/setBU32.py
|
henjin0/HolePlateMaker
|
daf7ef5269b03f2ac2fdc9a8132f945b14177aa0
|
[
"MIT"
] | null | null | null |
HolePlateMaker/setBU32.py
|
henjin0/HolePlateMaker
|
daf7ef5269b03f2ac2fdc9a8132f945b14177aa0
|
[
"MIT"
] | null | null | null |
import numpy as np
from stl import mesh
from HolePlateMaker import mesh_scale as m_s
from HolePlateMaker import mesh_update as m_u
from HolePlateMaker import mesh_location_zero as m_l_z
def setBU32(xPoint,yPoint,zPoint):
your_mesh = mesh.Mesh.from_file('HolePlateMaker/BU3.2mm.stl')
your_mesh = m_l_z.mesh_location_zero(your_mesh)
your_mesh = m_u.mesh_update(your_mesh)
your_mesh.translate(np.array([xPoint*5,yPoint*5,zPoint*3]))
your_mesh = m_u.mesh_update(your_mesh)
return your_mesh
| 36.5
| 65
| 0.78865
| 89
| 511
| 4.235955
| 0.348315
| 0.190981
| 0.190981
| 0.222812
| 0.148541
| 0.148541
| 0.148541
| 0.148541
| 0
| 0
| 0
| 0.015801
| 0.133072
| 511
| 14
| 66
| 36.5
| 0.835214
| 0
| 0
| 0.166667
| 0
| 0
| 0.050781
| 0.050781
| 0
| 0
| 0
| 0
| 0
| 1
| 0.083333
| false
| 0
| 0.416667
| 0
| 0.583333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
fe33369b26a5a78f5bb9ef455f4ad8880bad1e85
| 90
|
py
|
Python
|
database/nfl_data/apps.py
|
luispereda555/nfl-player-stats
|
e74c3817f7d10746546cdb9ce763bbd850badd89
|
[
"MIT"
] | 74
|
2017-12-09T14:32:21.000Z
|
2022-01-26T20:22:09.000Z
|
database/nfl_data/apps.py
|
luispereda555/nfl-player-stats
|
e74c3817f7d10746546cdb9ce763bbd850badd89
|
[
"MIT"
] | 14
|
2017-12-10T01:03:46.000Z
|
2020-12-02T16:12:39.000Z
|
database/nfl_data/apps.py
|
luispereda555/nfl-player-stats
|
e74c3817f7d10746546cdb9ce763bbd850badd89
|
[
"MIT"
] | 41
|
2017-12-08T22:31:13.000Z
|
2021-12-08T23:25:50.000Z
|
from django.apps import AppConfig
class NflDataConfig(AppConfig):
name = 'nfl_data'
| 15
| 33
| 0.755556
| 11
| 90
| 6.090909
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 90
| 5
| 34
| 18
| 0.893333
| 0
| 0
| 0
| 0
| 0
| 0.088889
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
fe6233507e6954c640851a443fe9f83f5ba4fd02
| 462
|
py
|
Python
|
python/abc/abc_register.py
|
zeroam/TIL
|
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
|
[
"MIT"
] | null | null | null |
python/abc/abc_register.py
|
zeroam/TIL
|
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
|
[
"MIT"
] | null | null | null |
python/abc/abc_register.py
|
zeroam/TIL
|
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
|
[
"MIT"
] | null | null | null |
import abc
from abc_base import PluginBase
class LocalBaseClass:
pass
@PluginBase.register
class RegisterImplementation(LocalBaseClass):
def load(self, input):
return input.read()
def save(self, output, data):
return output.write(data)
if __name__ == "__main__":
print("Subclass:", issubclass(RegisterImplementation, PluginBase))
print("Instance:", isinstance(RegisterImplementation(), PluginBase))
| 22
| 73
| 0.692641
| 44
| 462
| 7.068182
| 0.636364
| 0.205788
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.207792
| 462
| 20
| 74
| 23.1
| 0.849727
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.153846
| false
| 0.076923
| 0.153846
| 0.153846
| 0.615385
| 0.153846
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
2283576978d6d55108f162756207fdc0cf1296ff
| 77
|
py
|
Python
|
mmfashion/models/backbones/__init__.py
|
aleksandrkrivolap/mmfashion
|
ca7f045d02db47b3d77fe15657fa0fddcadcb4ca
|
[
"Apache-2.0"
] | 1
|
2019-12-12T11:15:02.000Z
|
2019-12-12T11:15:02.000Z
|
mmfashion/models/backbones/__init__.py
|
aleksandrkrivolap/mmfashion
|
ca7f045d02db47b3d77fe15657fa0fddcadcb4ca
|
[
"Apache-2.0"
] | null | null | null |
mmfashion/models/backbones/__init__.py
|
aleksandrkrivolap/mmfashion
|
ca7f045d02db47b3d77fe15657fa0fddcadcb4ca
|
[
"Apache-2.0"
] | null | null | null |
from .vgg import Vgg
from .resnet import ResNet
__all__ = ['Vgg', 'ResNet']
| 15.4
| 27
| 0.701299
| 11
| 77
| 4.545455
| 0.454545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168831
| 77
| 4
| 28
| 19.25
| 0.78125
| 0
| 0
| 0
| 0
| 0
| 0.116883
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
22926d283419b20e6fa84617224b0a273a5e641e
| 102
|
py
|
Python
|
src/learning_email/apps.py
|
gsi-luis/djangolearning
|
4cf1e016cfe2910c907a669e518f5233ae04fb12
|
[
"MIT"
] | 1
|
2020-07-05T18:33:33.000Z
|
2020-07-05T18:33:33.000Z
|
src/learning_email/apps.py
|
gsi-luis/djangolearning
|
4cf1e016cfe2910c907a669e518f5233ae04fb12
|
[
"MIT"
] | 2
|
2021-03-30T13:49:58.000Z
|
2021-06-10T19:43:27.000Z
|
src/learning_email/apps.py
|
gsi-luis/djangolearning
|
4cf1e016cfe2910c907a669e518f5233ae04fb12
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class LearningEmailConfig(AppConfig):
name = 'learning_email'
| 17
| 37
| 0.784314
| 11
| 102
| 7.181818
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147059
| 102
| 5
| 38
| 20.4
| 0.908046
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
22aa38e80934036017e39907372506496a10de02
| 62
|
py
|
Python
|
setup.py
|
hernantz/django-knowledge
|
1cd757320e61fe3e5e6d91b3e3b060dfa2dce9a2
|
[
"ISC"
] | null | null | null |
setup.py
|
hernantz/django-knowledge
|
1cd757320e61fe3e5e6d91b3e3b060dfa2dce9a2
|
[
"ISC"
] | null | null | null |
setup.py
|
hernantz/django-knowledge
|
1cd757320e61fe3e5e6d91b3e3b060dfa2dce9a2
|
[
"ISC"
] | null | null | null |
from distutils.core import setup # setuptools breaks
setup()
| 15.5
| 52
| 0.790323
| 8
| 62
| 6.125
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145161
| 62
| 3
| 53
| 20.666667
| 0.924528
| 0.274194
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
22bf4e1146e6516d79709e8a8202f19951da0e28
| 185
|
py
|
Python
|
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/zipfile/zipfile_printdir.py
|
webdevhub42/Lambda
|
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
|
[
"MIT"
] | null | null | null |
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/zipfile/zipfile_printdir.py
|
webdevhub42/Lambda
|
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
|
[
"MIT"
] | null | null | null |
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/zipfile/zipfile_printdir.py
|
webdevhub42/Lambda
|
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
"""Print the table of contents of a ZIP archive
"""
# end_pymotw_header
import zipfile
with zipfile.ZipFile("example.zip", "r") as zf:
print(zf.printdir())
| 18.5
| 47
| 0.702703
| 29
| 185
| 4.413793
| 0.793103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006369
| 0.151351
| 185
| 9
| 48
| 20.555556
| 0.808917
| 0.454054
| 0
| 0
| 0
| 0
| 0.129032
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.