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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35167080efc71de01dbc6fca4b9b5ced7eec4f81
| 16
|
py
|
Python
|
openml_data_integration/protobuf_generator/openml_40975/myconstants.py
|
tuix/tutorials
|
733d35a8a39df079e8c2432c441b70785ab08440
|
[
"Apache-2.0"
] | 8
|
2020-04-21T13:29:04.000Z
|
2021-12-13T08:59:09.000Z
|
openml_data_integration/protobuf_generator/openml_40975/myconstants.py
|
tuix/tutorials
|
733d35a8a39df079e8c2432c441b70785ab08440
|
[
"Apache-2.0"
] | 3
|
2021-04-27T11:03:04.000Z
|
2021-05-24T18:22:57.000Z
|
openml_data_integration/protobuf_generator/openml_40975/myconstants.py
|
tuix/tutorials
|
733d35a8a39df079e8c2432c441b70785ab08440
|
[
"Apache-2.0"
] | 6
|
2020-07-06T08:23:25.000Z
|
2021-11-24T10:39:34.000Z
|
DATA_ID = 40975
| 8
| 15
| 0.75
| 3
| 16
| 3.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.384615
| 0.1875
| 16
| 1
| 16
| 16
| 0.461538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1027f8add77f4c532f87b37df723c80f53be1990
| 264
|
py
|
Python
|
topCoder/srms/200s/srm203/div2/user_name.py
|
gauravsingh58/algo
|
397859a53429e7a585e5f6964ad24146c6261326
|
[
"WTFPL"
] | 1
|
2020-09-30T19:53:08.000Z
|
2020-09-30T19:53:08.000Z
|
topCoder/srms/200s/srm203/div2/user_name.py
|
gauravsingh58/algo
|
397859a53429e7a585e5f6964ad24146c6261326
|
[
"WTFPL"
] | null | null | null |
topCoder/srms/200s/srm203/div2/user_name.py
|
gauravsingh58/algo
|
397859a53429e7a585e5f6964ad24146c6261326
|
[
"WTFPL"
] | 1
|
2020-10-15T09:10:57.000Z
|
2020-10-15T09:10:57.000Z
|
class UserName:
def newMember(self, existingNames, newName):
if newName in existingNames:
i = 1
while '{}{}'.format(newName, i) in existingNames:
i += 1
return newName + str(i)
return newName
| 29.333333
| 61
| 0.534091
| 27
| 264
| 5.222222
| 0.555556
| 0.212766
| 0.22695
| 0.241135
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012121
| 0.375
| 264
| 8
| 62
| 33
| 0.842424
| 0
| 0
| 0
| 0
| 0
| 0.015152
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
10332de23ad81ec201ccd570330d6a4ba3c230ea
| 99
|
py
|
Python
|
sanic_discord/slashlib/types/__init__.py
|
tuna2134/sanic-discord
|
5caa22c972de6946985332458c87fb6e4d000037
|
[
"MIT"
] | null | null | null |
sanic_discord/slashlib/types/__init__.py
|
tuna2134/sanic-discord
|
5caa22c972de6946985332458c87fb6e4d000037
|
[
"MIT"
] | null | null | null |
sanic_discord/slashlib/types/__init__.py
|
tuna2134/sanic-discord
|
5caa22c972de6946985332458c87fb6e4d000037
|
[
"MIT"
] | null | null | null |
from .embeds import Embed
from .commands import CommandOption, CommandGroup
from .user import User
| 24.75
| 49
| 0.828283
| 13
| 99
| 6.307692
| 0.615385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131313
| 99
| 3
| 50
| 33
| 0.953488
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
10712acd9aa7f40f7719e39ea2b0639d78bcbd94
| 69
|
py
|
Python
|
enabler/__init__.py
|
SGBC/ENAbler
|
23cea9fd137f8f9a4e8bd007739eab9b6b6ba2cd
|
[
"MIT"
] | null | null | null |
enabler/__init__.py
|
SGBC/ENAbler
|
23cea9fd137f8f9a4e8bd007739eab9b6b6ba2cd
|
[
"MIT"
] | 21
|
2019-01-21T08:08:39.000Z
|
2021-08-03T04:19:08.000Z
|
enabler/__init__.py
|
SGBC/ENAbler
|
23cea9fd137f8f9a4e8bd007739eab9b6b6ba2cd
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from enabler import *
| 13.8
| 23
| 0.608696
| 10
| 69
| 4.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017544
| 0.173913
| 69
| 4
| 24
| 17.25
| 0.719298
| 0.608696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1086f353a4ac6638eee5bfd8139cafbab823d4b0
| 2,101
|
py
|
Python
|
graphit/graph_model_classes/model_dictionary.py
|
codacy-badger/graphit
|
7fcfed114875466179ed3d4848dd9098fa3e60fb
|
[
"Apache-2.0"
] | null | null | null |
graphit/graph_model_classes/model_dictionary.py
|
codacy-badger/graphit
|
7fcfed114875466179ed3d4848dd9098fa3e60fb
|
[
"Apache-2.0"
] | null | null | null |
graphit/graph_model_classes/model_dictionary.py
|
codacy-badger/graphit
|
7fcfed114875466179ed3d4848dd9098fa3e60fb
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
file: model_dictionary.py
Graph mixin class to add method to a Graph base class that will have it
behave like a python dictionary.
"""
__all__ = ['PythonDictionary']
class PythonDictionary(object):
def items(self, keystring=None, valuestring=None):
"""
Python dict-like function to return node items in the (sub)graph.
Keystring defines the value lookup key in the node data dict.
This defaults to the graph key_tag.
Valuestring defines the value lookup key in the node data dict.
:param keystring: Data key to use for dictionary keys.
:type keystring: :py:str
:param valuestring: Data key to use for dictionary values.
:type valuestring: :py:str
:return: List of keys, value pairs
:rtype: :py:list
"""
keystring = keystring or self.key_tag
valuestring = valuestring or self.value_tag
return [(n.get(keystring), n.get(valuestring)) for n in self.iternodes()]
def keys(self, keystring=None):
"""
Python dict-like function to return node keys in the (sub)graph.
Keystring defines the value lookup key in the node data dict.
This defaults to the graph key_tag.
:param keystring: Data key to use for dictionary keys.
:type keystring: :py:str
:return: List of keys
:rtype: :py:list
"""
keystring = keystring or self.key_tag
return [n.get(keystring) for n in self.iternodes()]
def values(self, valuestring=None):
"""
Python dict-like function to return node values in the (sub)graph.
Valuestring defines the value lookup key in the node data dict.
:param valuestring: Data key to use for dictionary values.
:type valuestring: :py:str
:return: List of values
:rtype: :py:list
"""
valuestring = valuestring or self.value_tag
return [n.get(valuestring) for n in self.iternodes()]
| 30.449275
| 81
| 0.614945
| 272
| 2,101
| 4.709559
| 0.224265
| 0.027322
| 0.046838
| 0.065574
| 0.790788
| 0.768931
| 0.733802
| 0.733802
| 0.654176
| 0.441842
| 0
| 0.000687
| 0.306997
| 2,101
| 68
| 82
| 30.897059
| 0.879121
| 0.585436
| 0
| 0.333333
| 0
| 0
| 0.025237
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.583333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
10ac77e51c90674cc0d6f19e5bddfb6f2ad06c94
| 140
|
py
|
Python
|
es_stats/__init__.py
|
untergeek/ElasticStats-py
|
107754b703d3f618b849303048af570698ff70b5
|
[
"Apache-2.0"
] | 1
|
2015-12-14T05:44:02.000Z
|
2015-12-14T05:44:02.000Z
|
es_stats/__init__.py
|
untergeek/ElasticStats-py
|
107754b703d3f618b849303048af570698ff70b5
|
[
"Apache-2.0"
] | 2
|
2016-04-18T18:54:01.000Z
|
2018-04-05T20:50:52.000Z
|
es_stats/__init__.py
|
untergeek/ElasticStats-py
|
107754b703d3f618b849303048af570698ff70b5
|
[
"Apache-2.0"
] | 2
|
2016-10-31T17:51:18.000Z
|
2017-03-06T04:15:58.000Z
|
from es_stats.version import __version__
from es_stats.classes import (
ClusterHealth, ClusterState, ClusterStats, NodeInfo, NodeStats
)
| 35
| 66
| 0.821429
| 16
| 140
| 6.8125
| 0.6875
| 0.110092
| 0.201835
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121429
| 140
| 4
| 67
| 35
| 0.886179
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
10bde5119dead7aef2e791df1241d226f176e8cd
| 49
|
py
|
Python
|
tests/__init__.py
|
ahmed-shariff/acm-dl-hci-searcher-
|
0c2b683d0440fe6240e2a660ccc1c92461180f1e
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
ahmed-shariff/acm-dl-hci-searcher-
|
0c2b683d0440fe6240e2a660ccc1c92461180f1e
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
ahmed-shariff/acm-dl-hci-searcher-
|
0c2b683d0440fe6240e2a660ccc1c92461180f1e
|
[
"MIT"
] | null | null | null |
"""Unit test package for acm_dl_hci_searcher."""
| 24.5
| 48
| 0.755102
| 8
| 49
| 4.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102041
| 49
| 1
| 49
| 49
| 0.772727
| 0.857143
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
52a9e7ab24e857f29b7ce8a7a5d82a2efcc7546a
| 158
|
py
|
Python
|
personalcapital/__init__.py
|
aagnone3/personalcapital
|
55471602885c6c495a1dff9229c84213f2220ab2
|
[
"MIT"
] | 9
|
2019-04-01T01:16:38.000Z
|
2021-12-26T20:38:32.000Z
|
personalcapital/__init__.py
|
Kpasha/personal-capital-plus
|
55471602885c6c495a1dff9229c84213f2220ab2
|
[
"MIT"
] | null | null | null |
personalcapital/__init__.py
|
Kpasha/personal-capital-plus
|
55471602885c6c495a1dff9229c84213f2220ab2
|
[
"MIT"
] | 3
|
2020-06-23T02:58:53.000Z
|
2021-04-03T05:31:32.000Z
|
from .exceptions import (
RequireTwoFactorException,
LoginFailedException
)
from .connection import *
from .database import *
from .log import logger
| 19.75
| 30
| 0.772152
| 15
| 158
| 8.133333
| 0.6
| 0.163934
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170886
| 158
| 7
| 31
| 22.571429
| 0.931298
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.571429
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
52c230d6c3888134b988fcd61d2584baa7df07c7
| 182
|
py
|
Python
|
unfuddle/AppEngine/trackable/profilepage.py
|
pdbartlett/misc-stuff
|
0cebbbf30d13a070a663d58519e2dd5c35c765d2
|
[
"Apache-2.0"
] | null | null | null |
unfuddle/AppEngine/trackable/profilepage.py
|
pdbartlett/misc-stuff
|
0cebbbf30d13a070a663d58519e2dd5c35c765d2
|
[
"Apache-2.0"
] | 1
|
2020-03-24T22:28:58.000Z
|
2020-03-24T22:28:58.000Z
|
unfuddle/AppEngine/trackable/profilepage.py
|
pdbartlett/misc-stuff
|
0cebbbf30d13a070a663d58519e2dd5c35c765d2
|
[
"Apache-2.0"
] | null | null | null |
import model
import template
class Page(template.StandardPage):
def get(self):
template.StandardPage.render_page(self, 'profile.html', { 'profile' : model.getProfile() })
| 30.333333
| 95
| 0.725275
| 21
| 182
| 6.238095
| 0.619048
| 0.305344
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 182
| 6
| 95
| 30.333333
| 0.839744
| 0
| 0
| 0
| 0
| 0
| 0.106742
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
52c41b1adcb779b2193d882ad88d2deab5ce024d
| 183
|
py
|
Python
|
app/health/views.py
|
fuzz88/photo_stock
|
bdba73e5dfaca1831467df51eabf7e442ce68da9
|
[
"BSD-2-Clause"
] | null | null | null |
app/health/views.py
|
fuzz88/photo_stock
|
bdba73e5dfaca1831467df51eabf7e442ce68da9
|
[
"BSD-2-Clause"
] | null | null | null |
app/health/views.py
|
fuzz88/photo_stock
|
bdba73e5dfaca1831467df51eabf7e442ce68da9
|
[
"BSD-2-Clause"
] | null | null | null |
from django.http import JsonResponse
from django.views import View
class Check(View):
def get(self, request, *args, **kwargs):
return JsonResponse({"status": "online"})
| 22.875
| 49
| 0.699454
| 23
| 183
| 5.565217
| 0.782609
| 0.15625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174863
| 183
| 7
| 50
| 26.142857
| 0.847682
| 0
| 0
| 0
| 0
| 0
| 0.065574
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 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
| 1
| 1
| 1
| 0
|
0
| 5
|
52f88f910d0b5d0db41c4855cef87d49589e23ec
| 62
|
py
|
Python
|
Method/ontolearn/owlready2/utils.py
|
dice-group/LearnALCLengths
|
cb019ba234092a323f3785517d1cc6152a5ef7a4
|
[
"MIT"
] | 2
|
2021-07-13T19:30:53.000Z
|
2021-12-14T13:22:50.000Z
|
Method/ontolearn/owlready2/utils.py
|
dice-group/LearnALCLengths
|
cb019ba234092a323f3785517d1cc6152a5ef7a4
|
[
"MIT"
] | null | null | null |
Method/ontolearn/owlready2/utils.py
|
dice-group/LearnALCLengths
|
cb019ba234092a323f3785517d1cc6152a5ef7a4
|
[
"MIT"
] | null | null | null |
def get_full_iri(x):
return x.namespace.base_iri + x.name
| 20.666667
| 40
| 0.725806
| 12
| 62
| 3.5
| 0.75
| 0.190476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16129
| 62
| 2
| 41
| 31
| 0.807692
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
5e1e718be9a8d8b76354ba3e4740839c3ba420e4
| 103
|
py
|
Python
|
atcoder/corp/codefes2015_fa.py
|
knuu/competitive-programming
|
16bc68fdaedd6f96ae24310d697585ca8836ab6e
|
[
"MIT"
] | 1
|
2018-11-12T15:18:55.000Z
|
2018-11-12T15:18:55.000Z
|
atcoder/corp/codefes2015_fa.py
|
knuu/competitive-programming
|
16bc68fdaedd6f96ae24310d697585ca8836ab6e
|
[
"MIT"
] | null | null | null |
atcoder/corp/codefes2015_fa.py
|
knuu/competitive-programming
|
16bc68fdaedd6f96ae24310d697585ca8836ab6e
|
[
"MIT"
] | null | null | null |
S, T, U = input().split()
print('valid' if len(S) == 5 and len(T) == 7 and len(U) == 5 else 'invalid')
| 34.333333
| 76
| 0.553398
| 21
| 103
| 2.714286
| 0.666667
| 0.210526
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.036145
| 0.194175
| 103
| 2
| 77
| 51.5
| 0.650602
| 0
| 0
| 0
| 0
| 0
| 0.116505
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
eaa551f909059102a97140f953170bd849bf7e3b
| 58
|
py
|
Python
|
net/tools/__init__.py
|
eungbean/DCGAN-pytorch-lightning-comet
|
414cbd5eb50b7e45848479a69077d2060210d4ec
|
[
"Apache-2.0"
] | null | null | null |
net/tools/__init__.py
|
eungbean/DCGAN-pytorch-lightning-comet
|
414cbd5eb50b7e45848479a69077d2060210d4ec
|
[
"Apache-2.0"
] | null | null | null |
net/tools/__init__.py
|
eungbean/DCGAN-pytorch-lightning-comet
|
414cbd5eb50b7e45848479a69077d2060210d4ec
|
[
"Apache-2.0"
] | null | null | null |
from .logger import get_comet_logger
from .utils import *
| 19.333333
| 36
| 0.810345
| 9
| 58
| 5
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 58
| 2
| 37
| 29
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
eab15ca228c3ffc39d54541ae4614c66aa244396
| 148
|
py
|
Python
|
expenses_tracker_2/expenses_tracker_2/expenses/admin.py
|
Xamaneone/Django-Projects
|
4fac8659680a6448bb55bce008bfd0eac1ad1f6d
|
[
"MIT"
] | null | null | null |
expenses_tracker_2/expenses_tracker_2/expenses/admin.py
|
Xamaneone/Django-Projects
|
4fac8659680a6448bb55bce008bfd0eac1ad1f6d
|
[
"MIT"
] | null | null | null |
expenses_tracker_2/expenses_tracker_2/expenses/admin.py
|
Xamaneone/Django-Projects
|
4fac8659680a6448bb55bce008bfd0eac1ad1f6d
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
# Register your models here.
from expenses_tracker_2.expenses.models import Expense
admin.site.register(Expense)
| 21.142857
| 54
| 0.831081
| 21
| 148
| 5.761905
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007576
| 0.108108
| 148
| 6
| 55
| 24.666667
| 0.909091
| 0.175676
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
eaf08671565b95680c257cda8e6222e584078996
| 688
|
py
|
Python
|
tests/kyu_4_tests/test_next_bigger_number_with_same_digits.py
|
the-zebulan/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | 40
|
2016-03-09T12:26:20.000Z
|
2022-03-23T08:44:51.000Z
|
tests/kyu_4_tests/test_next_bigger_number_with_same_digits.py
|
akalynych/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | null | null | null |
tests/kyu_4_tests/test_next_bigger_number_with_same_digits.py
|
akalynych/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | 36
|
2016-11-07T19:59:58.000Z
|
2022-03-31T11:18:27.000Z
|
import unittest
from katas.kyu_4.next_bigger_number_with_same_digits import next_bigger
class NextBiggerTestCase(unittest.TestCase):
def test_equals(self):
self.assertEqual(next_bigger(12), 21)
def test_equals_2(self):
self.assertEqual(next_bigger(513), 531)
def test_equals_3(self):
self.assertEqual(next_bigger(2017), 2071)
def test_equals_4(self):
self.assertEqual(next_bigger(9), -1)
def test_equals_5(self):
self.assertEqual(next_bigger(111), -1)
def test_equals_6(self):
self.assertEqual(next_bigger(531), -1)
def test_equals_7(self):
self.assertEqual(next_bigger(1234567890), 1234567908)
| 25.481481
| 71
| 0.707849
| 95
| 688
| 4.842105
| 0.378947
| 0.195652
| 0.197826
| 0.35
| 0.441304
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09839
| 0.1875
| 688
| 26
| 72
| 26.461538
| 0.724508
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.411765
| 1
| 0.411765
| false
| 0
| 0.117647
| 0
| 0.588235
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
d818320a51e45f6351b67b422f6a3ffa0a45411d
| 2,504
|
py
|
Python
|
Python/DenavitHartenberg.py
|
zdynamics/zRobotics
|
aed0beac327710f319b996a34b42df37440d33cd
|
[
"MIT"
] | 2
|
2021-01-19T10:21:48.000Z
|
2021-02-15T14:55:12.000Z
|
Python/DenavitHartenberg.py
|
zdynamics/zRobotics
|
aed0beac327710f319b996a34b42df37440d33cd
|
[
"MIT"
] | null | null | null |
Python/DenavitHartenberg.py
|
zdynamics/zRobotics
|
aed0beac327710f319b996a34b42df37440d33cd
|
[
"MIT"
] | null | null | null |
import numpy as np
def matrix(robot):
"""
Denavit - Hartenberg parameters for n - th rigid body
theta: rotation on «z» axis
d: translation on «z» axis
a: translation on «x» axis
alpha: rotation on «x» axis
"""
return np.array([[0, 0, 0, 0],
[robot.jointsPositions[0, 0], robot.linksLengths[0], 0, np.pi / 2],
[robot.jointsPositions[1, 0], 0, robot.linksLengths[1], 0],
[robot.jointsPositions[2, 0], 0, 0, np.pi / 2],
[robot.jointsPositions[3, 0], robot.linksLengths[2], 0, 0]])
def centersOfMass(robot):
"""
Denavit - Hartenberg parameters for n - th center of mass
theta: rotation on «z» axis
d: translation on «z» axis
a: translation on «x» axis
alpha: rotation on «x» axis
"""
return np.array([[0, 0, 0, 0],
[robot.jointsPositions[0, 0], robot.centersOfMass[0], 0, np.pi / 2],
[robot.jointsPositions[1, 0], 0, robot.centersOfMass[1], 0],
[robot.jointsPositions[2, 0], 0, 0, np.pi / 2],
[robot.jointsPositions[3, 0], robot.centersOfMass[2], 0, 0]])
def symbolicMatrix(robot):
"""
Denavit - Hartenberg parameters for n - th rigid body
theta: rotation on «z» axis
d: translation on «z» axis
a: translation on «x» axis
alpha: rotation on «x» axis
"""
return np.array([[0, 0, 0, 0],
[robot.symbolicJointsPositions[0, 0], robot.symbolicLinksLengths[0], 0, np.pi / 2],
[robot.symbolicJointsPositions[1, 0], 0, robot.symbolicLinksLengths[1], 0],
[robot.symbolicJointsPositions[2, 0], 0, 0, np.pi / 2],
[robot.symbolicJointsPositions[3, 0], robot.symbolicLinksLengths[2], 0, 0]])
def symbolicCentersOfMass(robot):
"""
Denavit - Hartenberg parameters for n - th center of mass
theta: rotation on «z» axis
d: translation on «z» axis
a: translation on «x» axis
alpha: rotation on «x» axis
"""
return np.array([[0, 0, 0, 0],
[robot.symbolicJointsPositions[0, 0], robot.symbolicCentersOfMass[0], 0, np.pi / 2],
[robot.symbolicJointsPositions[1, 0], 0, robot.symbolicCentersOfMass[1], 0],
[robot.symbolicJointsPositions[2, 0], 0, 0, np.pi / 2],
[robot.symbolicJointsPositions[3, 0], robot.symbolicCentersOfMass[2], 0, 0]])
| 43.929825
| 104
| 0.5627
| 342
| 2,504
| 4.21345
| 0.128655
| 0.049965
| 0.024983
| 0.027759
| 0.798057
| 0.798057
| 0.798057
| 0.798057
| 0.798057
| 0.798057
| 0
| 0.054763
| 0.29992
| 2,504
| 57
| 105
| 43.929825
| 0.749002
| 0.264776
| 0
| 0.32
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.16
| false
| 0
| 0.04
| 0
| 0.36
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d81841be502683db4c5a34a99e2bb088c382fc60
| 110
|
py
|
Python
|
test/workout-test.py
|
Gplafferty0219/workout-app
|
1e6825ae07edf30ccf39041dfd26b3046bf6b0cf
|
[
"CC-BY-4.0"
] | 1
|
2020-06-26T00:35:07.000Z
|
2020-06-26T00:35:07.000Z
|
test/workout-test.py
|
Gplafferty0219/workout-app
|
1e6825ae07edf30ccf39041dfd26b3046bf6b0cf
|
[
"CC-BY-4.0"
] | null | null | null |
test/workout-test.py
|
Gplafferty0219/workout-app
|
1e6825ae07edf30ccf39041dfd26b3046bf6b0cf
|
[
"CC-BY-4.0"
] | 1
|
2020-06-26T00:35:11.000Z
|
2020-06-26T00:35:11.000Z
|
import os
import pytest
from app.workout import WORKOUT
def test_workout():
assert WORKOUT == "workout"
| 15.714286
| 31
| 0.745455
| 15
| 110
| 5.4
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 110
| 7
| 32
| 15.714286
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.063063
| 0
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0.2
| true
| 0
| 0.6
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d81f09979a77d040896892fc069cb2d7bfe4c629
| 162
|
py
|
Python
|
example/admin.py
|
acdh-oeaw/django-gnd
|
48e4d11bad0fb9ee11cc386d5f401480551e871c
|
[
"MIT"
] | null | null | null |
example/admin.py
|
acdh-oeaw/django-gnd
|
48e4d11bad0fb9ee11cc386d5f401480551e871c
|
[
"MIT"
] | null | null | null |
example/admin.py
|
acdh-oeaw/django-gnd
|
48e4d11bad0fb9ee11cc386d5f401480551e871c
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from example.models import MyText, Person
admin.site.register(MyText)
admin.site.register(Person)
# Register your models here.
| 20.25
| 41
| 0.808642
| 23
| 162
| 5.695652
| 0.565217
| 0.137405
| 0.259542
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 162
| 7
| 42
| 23.142857
| 0.909722
| 0.160494
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d82fca1d9e9f40eb25fdb54a8ce529e298928bc9
| 1,087
|
py
|
Python
|
tests/test_util.py
|
shengqh/bamsnap
|
4815c618011b2a1f2ab0d9e6418e39dbd292239b
|
[
"MIT"
] | 84
|
2020-01-09T11:12:52.000Z
|
2022-03-05T00:15:55.000Z
|
tests/test_util.py
|
shengqh/bamsnap
|
4815c618011b2a1f2ab0d9e6418e39dbd292239b
|
[
"MIT"
] | 23
|
2020-08-24T14:28:06.000Z
|
2021-11-27T16:42:40.000Z
|
tests/test_util.py
|
shengqh/bamsnap
|
4815c618011b2a1f2ab0d9e6418e39dbd292239b
|
[
"MIT"
] | 14
|
2020-08-28T16:55:21.000Z
|
2021-12-01T20:20:50.000Z
|
import bamsnap
def test_init_dict():
assert bamsnap.util.init_dict({'k1':11}, 'k1') == {'k1':11}
assert bamsnap.util.init_dict({'k1':11}, 'k2') == {'k1':11, 'k2':{}}
assert bamsnap.util.init_dict({}, 'k3') == {'k3':{}}
def test_add_dict_value():
assert bamsnap.util.add_dict_value({'k1':11}, 'k2', 1) == {'k1':11, 'k2':1}
assert bamsnap.util.add_dict_value({'k1':11}, 'k1', 2) == {'k1':13}
def test_get_scale():
assert bamsnap.util.get_scale(1000, 200, 30000) == 37.5
assert bamsnap.util.get_scale(1000, 200, 1000) == 1.25
def test_convert_int_list():
assert bamsnap.util.convert_int_list(['1','2','3']) == [1,2,3]
assert bamsnap.util.convert_int_list(['1',2,'3']) == [1,2,3]
assert bamsnap.util.convert_int_list(['-1','2','3']) == [-1,2,3]
assert bamsnap.util.convert_int_list(['a','2','3']) == [2,3]
def test_comma():
assert bamsnap.util.comma(3546) == '3,546'
assert bamsnap.util.comma(123453546) == '123,453,546'
assert bamsnap.util.comma(3546.02) == '3,546.02'
if __name__ == "__main__":
test_init_dict()
| 33.96875
| 79
| 0.615455
| 174
| 1,087
| 3.626437
| 0.229885
| 0.288431
| 0.377179
| 0.152139
| 0.689382
| 0.522979
| 0.522979
| 0.329636
| 0.22504
| 0.22504
| 0
| 0.134199
| 0.149954
| 1,087
| 31
| 80
| 35.064516
| 0.548701
| 0
| 0
| 0
| 0
| 0
| 0.069982
| 0
| 0
| 0
| 0
| 0
| 0.636364
| 1
| 0.227273
| true
| 0
| 0.045455
| 0
| 0.272727
| 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
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
dc1b0f6ced8205711842ceeb55373b6e73194d73
| 142
|
py
|
Python
|
satori/lib/engine/__init__.py
|
lastmeta/Satori
|
cb321ee53a15fe8cba8fcdd483eeb6acc8dab3ea
|
[
"MIT"
] | 3
|
2022-02-16T17:25:53.000Z
|
2022-02-25T05:24:15.000Z
|
satori/lib/engine/__init__.py
|
lastmeta/Satori
|
cb321ee53a15fe8cba8fcdd483eeb6acc8dab3ea
|
[
"MIT"
] | 9
|
2022-02-16T20:23:55.000Z
|
2022-03-26T17:27:23.000Z
|
satori/lib/engine/__init__.py
|
lastmeta/Satori
|
cb321ee53a15fe8cba8fcdd483eeb6acc8dab3ea
|
[
"MIT"
] | null | null | null |
from .structs import HyperParameter
from .managers.data import DataManager
from .managers.model import ModelManager
from .engine import Engine
| 35.5
| 40
| 0.852113
| 18
| 142
| 6.722222
| 0.555556
| 0.198347
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105634
| 142
| 4
| 41
| 35.5
| 0.952756
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
dc2dc1e027f4cec274dfb7f840da4b71bc13f413
| 2,021
|
py
|
Python
|
sdk/python/pulumi_mongodbatlas/__init__.py
|
Evaneos/pulumi-mongodbatlas
|
c7d5066bdfb2e935d80c11b14e31b6062276b9ef
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_mongodbatlas/__init__.py
|
Evaneos/pulumi-mongodbatlas
|
c7d5066bdfb2e935d80c11b14e31b6062276b9ef
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_mongodbatlas/__init__.py
|
Evaneos/pulumi-mongodbatlas
|
c7d5066bdfb2e935d80c11b14e31b6062276b9ef
|
[
"ECL-2.0",
"Apache-2.0"
] | 1
|
2020-03-27T15:50:31.000Z
|
2020-03-27T15:50:31.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import importlib
# Make subpackages available:
__all__ = ['config']
for pkg in __all__:
if pkg != 'config':
importlib.import_module(f'{__name__}.{pkg}')
# Export this package's modules as members:
from .alert_configuration import *
from .auditing import *
from .cloud_provider_snapshot import *
from .cloud_provider_snapshot_restore_job import *
from .cluster import *
from .custom_db_role import *
from .database_user import *
from .encryption_at_rest import *
from .global_cluster_configuration import *
from .maintenance_window import *
from .network_peering_container import *
from .network_peering_connection import *
from .private_endpoint import *
from .private_endpoint_interface_link import *
from .private_ip_mode import *
from .project import *
from .project_ip_whitelist import *
from .team import *
from .x509_authentication_database_user import *
from .get_alert_configuration import *
from .get_auditing import *
from .get_cloud_provider_snapshot import *
from .get_cloud_provider_snapshot_restore_job import *
from .get_cloud_provider_snapshot_restore_jobs import *
from .get_cloud_provider_snapshots import *
from .get_cluster import *
from .get_clusters import *
from .get_custom_db_role import *
from .get_custom_db_roles import *
from .get_database_user import *
from .get_database_users import *
from .get_global_cluster_config import *
from .get_maintenance_window import *
from .get_network_peering_container import *
from .get_network_peering_containers import *
from .get_network_peering_connection import *
from .get_network_peering_connections import *
from .get_private_endpoint import *
from .get_private_endpoint_interface_link import *
from .get_project import *
from .get_projects import *
from .get_team import *
from .get_x509_authentication_database_user import *
from .provider import *
| 35.45614
| 87
| 0.809005
| 280
| 2,021
| 5.467857
| 0.328571
| 0.280862
| 0.203788
| 0.057479
| 0.466362
| 0.206401
| 0.082299
| 0
| 0
| 0
| 0
| 0.00395
| 0.123206
| 2,021
| 56
| 88
| 36.089286
| 0.860045
| 0.122217
| 0
| 0
| 1
| 0
| 0.015837
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.938776
| 0
| 0.938776
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
dc3cfd7c0781baae1fa7c032199f1bc2fb521aab
| 40
|
py
|
Python
|
cli_client/tests/__init__.py
|
wilgucki/selfhosted_disposable_email_service
|
0401de9d887d3a030eb51e5d25f0ab79922e1122
|
[
"MIT"
] | 3
|
2020-07-19T07:07:25.000Z
|
2020-10-11T21:04:47.000Z
|
cli_client/tests/__init__.py
|
wilgucki/selfhosted_disposable_email_service
|
0401de9d887d3a030eb51e5d25f0ab79922e1122
|
[
"MIT"
] | null | null | null |
cli_client/tests/__init__.py
|
wilgucki/selfhosted_disposable_email_service
|
0401de9d887d3a030eb51e5d25f0ab79922e1122
|
[
"MIT"
] | null | null | null |
"""Unit test package for cli_client."""
| 20
| 39
| 0.7
| 6
| 40
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 40
| 1
| 40
| 40
| 0.771429
| 0.825
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
dc3dac5791951d4a52c9073ae343ce397a5d9935
| 167
|
py
|
Python
|
500. Keyboard Row/solution.py
|
Rukeith/leetcode
|
001aaf83968889d0cbc634dcc3bd1b59728d1ecc
|
[
"MIT"
] | 3
|
2018-06-19T08:36:32.000Z
|
2019-03-25T04:05:04.000Z
|
500. Keyboard Row/solution.py
|
Rukeith/leetcode
|
001aaf83968889d0cbc634dcc3bd1b59728d1ecc
|
[
"MIT"
] | null | null | null |
500. Keyboard Row/solution.py
|
Rukeith/leetcode
|
001aaf83968889d0cbc634dcc3bd1b59728d1ecc
|
[
"MIT"
] | null | null | null |
class Solution:
def findWords(self, words: List[str]) -> List[str]:
return filter(re.compile('(?i)([qwertyuiop]*|[asdfghjkl]*|[zxcvbnm]*)$').match, words)
| 41.75
| 94
| 0.634731
| 20
| 167
| 5.3
| 0.85
| 0.132075
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137725
| 167
| 3
| 95
| 55.666667
| 0.736111
| 0
| 0
| 0
| 0
| 0
| 0.263473
| 0.263473
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
dc7e3824d9806165ebe0d4346c8bc37aeb732522
| 139
|
py
|
Python
|
fwl-automation-decisions/domain/src/domain/model/environment/__init__.py
|
aherculano/fwl-project
|
6d4c4d40393b76d45cf13b572b5aabc0696e9285
|
[
"MIT"
] | null | null | null |
fwl-automation-decisions/domain/src/domain/model/environment/__init__.py
|
aherculano/fwl-project
|
6d4c4d40393b76d45cf13b572b5aabc0696e9285
|
[
"MIT"
] | null | null | null |
fwl-automation-decisions/domain/src/domain/model/environment/__init__.py
|
aherculano/fwl-project
|
6d4c4d40393b76d45cf13b572b5aabc0696e9285
|
[
"MIT"
] | null | null | null |
from .EnvironmentName import EnvironmentName
from .Environment import Environment
from .EnvironmentRepository import EnvironmentRepository
| 34.75
| 56
| 0.892086
| 12
| 139
| 10.333333
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086331
| 139
| 3
| 57
| 46.333333
| 0.976378
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
dc7fd663d0154b87f1d0c34fd7a793ded136f5dc
| 187
|
py
|
Python
|
iseteam/contact/urls.py
|
R3SWebDevelopment/iseteam
|
4f0e74a14f45b263a3d9fdab554bd21540fd4e22
|
[
"MIT"
] | null | null | null |
iseteam/contact/urls.py
|
R3SWebDevelopment/iseteam
|
4f0e74a14f45b263a3d9fdab554bd21540fd4e22
|
[
"MIT"
] | null | null | null |
iseteam/contact/urls.py
|
R3SWebDevelopment/iseteam
|
4f0e74a14f45b263a3d9fdab554bd21540fd4e22
|
[
"MIT"
] | null | null | null |
from django.conf.urls import patterns, include, url
from iseteam.contact.views import post
urlpatterns = patterns('iseteam.contact.views',
url(r'^$', 'post' , name = 'contact'),
)
| 20.777778
| 51
| 0.705882
| 24
| 187
| 5.5
| 0.625
| 0.212121
| 0.287879
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144385
| 187
| 9
| 52
| 20.777778
| 0.825
| 0
| 0
| 0
| 0
| 0
| 0.180851
| 0.111702
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
dc940265eaccb7701c4c9912501c8b3609eff98e
| 39
|
py
|
Python
|
tests/components/mullvad/__init__.py
|
tbarbette/core
|
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
|
[
"Apache-2.0"
] | 30,023
|
2016-04-13T10:17:53.000Z
|
2020-03-02T12:56:31.000Z
|
tests/components/mullvad/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 31,101
|
2020-03-02T13:00:16.000Z
|
2022-03-31T23:57:36.000Z
|
tests/components/mullvad/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 11,956
|
2016-04-13T18:42:31.000Z
|
2020-03-02T09:32:12.000Z
|
"""Tests for the mullvad component."""
| 19.5
| 38
| 0.692308
| 5
| 39
| 5.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128205
| 39
| 1
| 39
| 39
| 0.794118
| 0.820513
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
dc953c210afeee09ff1eb344ebbf09c45334f9cb
| 94
|
py
|
Python
|
pan/misc/__init__.py
|
pan-webis-de/bougiatiotis16
|
1ae950118d1ac5e7e1ac990d8e49e227af20e9d3
|
[
"MIT"
] | null | null | null |
pan/misc/__init__.py
|
pan-webis-de/bougiatiotis16
|
1ae950118d1ac5e7e1ac990d8e49e227af20e9d3
|
[
"MIT"
] | null | null | null |
pan/misc/__init__.py
|
pan-webis-de/bougiatiotis16
|
1ae950118d1ac5e7e1ac990d8e49e227af20e9d3
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
# below imports in order to make them available under pan
import _twokenize
| 23.5
| 57
| 0.787234
| 15
| 94
| 4.866667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148936
| 94
| 3
| 58
| 31.333333
| 0.9125
| 0.765957
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
dc980f7c651e2654eea443db0efcaa778a7042a1
| 98
|
py
|
Python
|
pyplayground/__init__.py
|
yw-fang/pyplayground
|
95b2699c0ddbf1663163fc1e4104da047150c323
|
[
"MIT"
] | null | null | null |
pyplayground/__init__.py
|
yw-fang/pyplayground
|
95b2699c0ddbf1663163fc1e4104da047150c323
|
[
"MIT"
] | null | null | null |
pyplayground/__init__.py
|
yw-fang/pyplayground
|
95b2699c0ddbf1663163fc1e4104da047150c323
|
[
"MIT"
] | null | null | null |
from .playground import greetings
# def greetings():
# return('Hello, I am the little start')
| 24.5
| 44
| 0.704082
| 13
| 98
| 5.307692
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.183673
| 98
| 3
| 45
| 32.666667
| 0.8625
| 0.602041
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
dcb1283607141dd32d0302d99afc63a5b1399377
| 160
|
py
|
Python
|
tests/conftest.py
|
manasm11/mm-ide
|
4c08fa1679747ebd6792f288f8394862c4a49d90
|
[
"MIT"
] | null | null | null |
tests/conftest.py
|
manasm11/mm-ide
|
4c08fa1679747ebd6792f288f8394862c4a49d90
|
[
"MIT"
] | null | null | null |
tests/conftest.py
|
manasm11/mm-ide
|
4c08fa1679747ebd6792f288f8394862c4a49d90
|
[
"MIT"
] | null | null | null |
from pytest import fixture
from threading import Thread
from mm_ide import ide
@fixture(scope="function")
def start_ui():
Thread(target=ide.main).start()
| 17.777778
| 35
| 0.7625
| 24
| 160
| 5
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1375
| 160
| 8
| 36
| 20
| 0.869565
| 0
| 0
| 0
| 0
| 0
| 0.05
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0
| 0.5
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
dcb561f78c0445a05d9eb49e40de8620ad2fef65
| 181
|
py
|
Python
|
contrib/tools/cython/Cython/Compiler/Version.py
|
HeyLey/catboost
|
f472aed90604ebe727537d9d4a37147985e10ec2
|
[
"Apache-2.0"
] | 6,989
|
2017-07-18T06:23:18.000Z
|
2022-03-31T15:58:36.000Z
|
contrib/tools/cython/Cython/Compiler/Version.py
|
HeyLey/catboost
|
f472aed90604ebe727537d9d4a37147985e10ec2
|
[
"Apache-2.0"
] | 3,094
|
2015-01-01T15:44:13.000Z
|
2022-03-31T19:49:57.000Z
|
contrib/tools/cython/Cython/Compiler/Version.py
|
HeyLey/catboost
|
f472aed90604ebe727537d9d4a37147985e10ec2
|
[
"Apache-2.0"
] | 1,425
|
2015-01-12T07:21:27.000Z
|
2022-03-30T14:10:40.000Z
|
# for backwards compatibility
from __future__ import absolute_import
from .. import __version__ as version
# For 'generated by' header line in C files.
watermark = str(version)
| 18.1
| 44
| 0.779006
| 24
| 181
| 5.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.165746
| 181
| 9
| 45
| 20.111111
| 0.874172
| 0.38674
| 0
| 0
| 1
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f4e8e70685a1acc74182c51feddbe75452ce4c75
| 36,622
|
py
|
Python
|
lib/googlecloudsdk/api_lib/recommender/flag_utils.py
|
google-cloud-sdk-unofficial/google-cloud-sdk
|
2a48a04df14be46c8745050f98768e30474a1aac
|
[
"Apache-2.0"
] | 2
|
2019-11-10T09:17:07.000Z
|
2019-12-18T13:44:08.000Z
|
lib/googlecloudsdk/api_lib/recommender/flag_utils.py
|
google-cloud-sdk-unofficial/google-cloud-sdk
|
2a48a04df14be46c8745050f98768e30474a1aac
|
[
"Apache-2.0"
] | null | null | null |
lib/googlecloudsdk/api_lib/recommender/flag_utils.py
|
google-cloud-sdk-unofficial/google-cloud-sdk
|
2a48a04df14be46c8745050f98768e30474a1aac
|
[
"Apache-2.0"
] | 1
|
2020-07-25T01:40:19.000Z
|
2020-07-25T01:40:19.000Z
|
# -*- coding: utf-8 -*- #
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""recommender API utlities."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.recommender import service as recommender_service
from googlecloudsdk.calliope import base
import six
RECOMMENDER_API_ALPHA_VERSION = 'v1alpha2'
RECOMMENDER_API_BETA_VERSION = 'v1beta1'
RECOMMENDER_API_GA_VERSION = 'v1'
def GetConfigServiceFromArgs(api_version, is_insight_api):
"""Returns the config api service from the user-specified arguments.
Args:
api_version: API version string.
is_insight_api: boolean value sepcify whether this is a insight api,
otherwise will return a recommendation service api.
"""
if is_insight_api:
return recommender_service.ProjectsInsightTypeConfigsService(api_version)
return recommender_service.ProjectsRecommenderConfigsService(api_version)
def GetServiceFromArgs(args, is_insight_api, api_version):
"""Returns the service from the user-specified arguments.
Args:
args: argparse.Namespace, An object that contains the values for the
arguments specified in the Args method.
is_insight_api: boolean value sepcify whether this is a insight api,
otherwise will return a recommendation service api.
api_version: API version string.
"""
if is_insight_api:
if args.project:
service = recommender_service.ProjectsInsightTypeInsightsService(
api_version)
elif args.billing_account:
service = recommender_service.BillingAccountsInsightTypeInsightsService(
api_version)
elif args.folder:
service = recommender_service.FoldersInsightTypeInsightsService(
api_version)
elif args.organization:
service = recommender_service.OrganizationsInsightTypeInsightsService(
api_version)
else:
if args.project:
service = recommender_service.ProjectsRecommenderRecommendationsService(
api_version)
elif args.billing_account:
service = recommender_service.BillingAccountsRecommenderRecommendationsService(
api_version)
elif args.folder:
service = recommender_service.FoldersRecommenderRecommendationsService(
api_version)
elif args.organization:
service = recommender_service.OrganizationsRecommenderRecommendationsService(
api_version)
return service
def GetListRequestFromArgs(args, parent_resource, is_insight_api, api_version):
"""Returns the get_request from the user-specified arguments.
Args:
args: argparse.Namespace, An object that contains the values for the
arguments specified in the Args method.
parent_resource: resource url string, the flags are already defined in
argparse namespace, including project, billing-account, folder,
organization, etc.
is_insight_api: boolean value specifying whether this is a insight api,
otherwise treat as a recommender service api and return related list
request message.
api_version: API version string.
"""
messages = recommender_service.RecommenderMessages(api_version)
if is_insight_api:
if args.project:
get_request = messages.RecommenderProjectsLocationsInsightTypesInsightsListRequest(
parent=parent_resource)
elif args.billing_account:
get_request = messages.RecommenderBillingAccountsLocationsInsightTypesInsightsListRequest(
parent=parent_resource)
elif args.organization:
get_request = messages.RecommenderOrganizationsLocationsInsightTypesInsightsListRequest(
parent=parent_resource)
elif args.folder:
get_request = messages.RecommenderFoldersLocationsInsightTypesInsightsListRequest(
parent=parent_resource)
else:
if args.project:
get_request = messages.RecommenderProjectsLocationsRecommendersRecommendationsListRequest(
parent=parent_resource)
elif args.billing_account:
get_request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsListRequest(
parent=parent_resource)
elif args.organization:
get_request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsListRequest(
parent=parent_resource)
elif args.folder:
get_request = messages.RecommenderFoldersLocationsRecommendersRecommendationsListRequest(
parent=parent_resource)
return get_request
def GetDescribeConfigRequestFromArgs(parent_resource, is_insight_api,
api_version):
"""Returns the describe request from the user-specified arguments.
Args:
parent_resource: resource url string, the flags are already defined in
argparse namespace.
is_insight_api: boolean value specifying whether this is a insight api,
otherwise treat as a recommender service api and return related describe
request message.
api_version: API version string.
"""
messages = recommender_service.RecommenderMessages(api_version)
if is_insight_api:
request = messages.RecommenderProjectsLocationsInsightTypesGetConfigRequest(
name=parent_resource)
else:
request = messages.RecommenderProjectsLocationsRecommendersGetConfigRequest(
name=parent_resource)
return request
def GetDescribeRequestFromArgs(args, parent_resource, is_insight_api,
api_version):
"""Returns the describe request from the user-specified arguments.
Args:
args: argparse.Namespace, An object that contains the values for the
arguments specified in the Args method.
parent_resource: resource url string, the flags are already defined in
argparse namespace, including project, billing-account, folder,
organization, etc.
is_insight_api: boolean value specifying whether this is a insight api,
otherwise treat as a recommender service api and return related list
request message.
api_version: API version string.
"""
messages = recommender_service.RecommenderMessages(api_version)
if is_insight_api:
if args.project:
request = messages.RecommenderProjectsLocationsInsightTypesInsightsGetRequest(
name=parent_resource)
elif args.billing_account:
request = messages.RecommenderBillingAccountsLocationsInsightTypesInsightsGetRequest(
name=parent_resource)
elif args.organization:
request = messages.RecommenderOrganizationsLocationsInsightTypesInsightsGetRequest(
name=parent_resource)
elif args.folder:
request = messages.RecommenderFoldersLocationsInsightTypesInsightsGetRequest(
name=parent_resource)
else:
if args.project:
request = messages.RecommenderProjectsLocationsRecommendersRecommendationsGetRequest(
name=parent_resource)
elif args.billing_account:
request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsGetRequest(
name=parent_resource)
elif args.organization:
request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsGetRequest(
name=parent_resource)
elif args.folder:
request = messages.RecommenderFoldersLocationsRecommendersRecommendationsGetRequest(
name=parent_resource)
return request
def GetMarkActiveRequestFromArgs(args, parent_resource, is_insight_api,
api_version):
"""Returns the mark active request from the user-specified arguments.
Args:
args: argparse.Namespace, An object that contains the values for the
arguments specified in the Args method.
parent_resource: resource url string, the flags are already defined in
argparse namespace, including project, billing-account, folder,
organization, etc.
is_insight_api: boolean value specifying whether this is a insight api,
otherwise treat as a recommender service api and return related list
request message.
api_version: API version string.
"""
messages = recommender_service.RecommenderMessages(api_version)
if is_insight_api:
mark_insight_active_request = messages.GoogleCloudRecommenderV1alpha2MarkInsightActiveRequest(
etag=args.etag)
if args.project:
request = messages.RecommenderProjectsLocationsInsightTypesInsightsMarkActiveRequest(
googleCloudRecommenderV1alpha2MarkInsightActiveRequest=mark_insight_active_request,
name=parent_resource)
elif args.billing_account:
request = messages.RecommenderBillingAccountsLocationsInsightTypesInsightsMarkActiveRequest(
googleCloudRecommenderV1alpha2MarkInsightActiveRequest=mark_insight_active_request,
name=parent_resource)
elif args.organization:
request = messages.RecommenderOrganizationsLocationsInsightTypesInsightsMarkActiveRequest(
googleCloudRecommenderV1alpha2MarkInsightActiveRequest=mark_insight_active_request,
name=parent_resource)
elif args.folder:
request = messages.RecommenderFoldersLocationsInsightTypesInsightsMarkActiveRequest(
googleCloudRecommenderV1alpha2MarkInsightActiveRequest=mark_insight_active_request,
name=parent_resource)
else:
mark_recommendation_active_request = messages.GoogleCloudRecommenderV1alpha2MarkRecommendationActiveRequest(
etag=args.etag)
if args.project:
request = messages.RecommenderProjectsLocationsRecommendersRecommendationsMarkActiveRequest(
googleCloudRecommenderV1alpha2MarkRecommendationActiveRequest=mark_recommendation_active_request,
name=parent_resource)
elif args.billing_account:
request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsMarkActiveRequest(
googleCloudRecommenderV1alpha2MarkRecommendationActiveRequest=mark_recommendation_active_request,
name=parent_resource)
elif args.organization:
request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsMarkActiveRequest(
googleCloudRecommenderV1alpha2MarkRecommendationActiveRequest=mark_recommendation_active_request,
name=parent_resource)
elif args.folder:
request = messages.RecommenderFoldersLocationsRecommendersRecommendationsMarkActiveRequest(
googleCloudRecommenderV1alpha2MarkRecommendationActiveRequest=mark_recommendation_active_request,
name=parent_resource)
return request
# TODO(b/179288751) refractor the code to remove if statements
def GetMarkClaimedRequestFromArgs(args, parent_resource, api_version):
"""Returns the mark_claimed_request from the user-specified arguments.
Args:
args: argparse.Namespace, An object that contains the values for the
arguments specified in the Args method.
parent_resource: resource location such as `organizations/123`
api_version: API version string.
"""
messages = recommender_service.RecommenderMessages(api_version)
if api_version == RECOMMENDER_API_ALPHA_VERSION:
message_request_field = messages.GoogleCloudRecommenderV1alpha2MarkRecommendationClaimedRequest
mark_recommendation_claimed_request = messages.GoogleCloudRecommenderV1alpha2MarkRecommendationClaimedRequest(
etag=args.etag,
stateMetadata=ParseStateMetadata(args.state_metadata,
message_request_field))
if args.project:
mark_request = messages.RecommenderProjectsLocationsRecommendersRecommendationsMarkClaimedRequest(
googleCloudRecommenderV1alpha2MarkRecommendationClaimedRequest=mark_recommendation_claimed_request,
name=parent_resource)
elif args.billing_account:
mark_request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsMarkClaimedRequest(
googleCloudRecommenderV1alpha2MarkRecommendationClaimedRequest=mark_recommendation_claimed_request,
name=parent_resource)
elif args.organization:
mark_request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsMarkClaimedRequest(
googleCloudRecommenderV1alpha2MarkRecommendationClaimedRequest=mark_recommendation_claimed_request,
name=parent_resource)
elif args.folder:
mark_request = messages.RecommenderFoldersLocationsRecommendersRecommendationsMarkClaimedRequest(
googleCloudRecommenderV1alpha2MarkRecommendationClaimedRequest=mark_recommendation_claimed_request,
name=parent_resource)
elif api_version == RECOMMENDER_API_BETA_VERSION:
message_request_field = messages.GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest
mark_recommendation_claimed_request = messages.GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest(
etag=args.etag,
stateMetadata=ParseStateMetadata(args.state_metadata,
message_request_field))
if args.project:
mark_request = messages.RecommenderProjectsLocationsRecommendersRecommendationsMarkClaimedRequest(
googleCloudRecommenderV1beta1MarkRecommendationClaimedRequest=mark_recommendation_claimed_request,
name=parent_resource)
elif args.billing_account:
mark_request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsMarkClaimedRequest(
googleCloudRecommenderV1beta1MarkRecommendationClaimedRequest=mark_recommendation_claimed_request,
name=parent_resource)
elif args.organization:
mark_request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsMarkClaimedRequest(
googleCloudRecommenderV1beta1MarkRecommendationClaimedRequest=mark_recommendation_claimed_request,
name=parent_resource)
elif args.folder:
mark_request = messages.RecommenderFoldersLocationsRecommendersRecommendationsMarkClaimedRequest(
googleCloudRecommenderV1beta1MarkRecommendationClaimedRequest=mark_recommendation_claimed_request,
name=parent_resource)
elif api_version == RECOMMENDER_API_GA_VERSION:
message_request_field = messages.GoogleCloudRecommenderV1MarkRecommendationClaimedRequest
mark_recommendation_claimed_request = messages.GoogleCloudRecommenderV1MarkRecommendationClaimedRequest(
etag=args.etag,
stateMetadata=ParseStateMetadata(args.state_metadata,
message_request_field))
if args.project:
mark_request = messages.RecommenderProjectsLocationsRecommendersRecommendationsMarkClaimedRequest(
googleCloudRecommenderV1MarkRecommendationClaimedRequest=mark_recommendation_claimed_request,
name=parent_resource)
elif args.billing_account:
mark_request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsMarkClaimedRequest(
googleCloudRecommenderV1MarkRecommendationClaimedRequest=mark_recommendation_claimed_request,
name=parent_resource)
elif args.organization:
mark_request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsMarkClaimedRequest(
googleCloudRecommenderV1MarkRecommendationClaimedRequest=mark_recommendation_claimed_request,
name=parent_resource)
elif args.folder:
mark_request = messages.RecommenderFoldersLocationsRecommendersRecommendationsMarkClaimedRequest(
googleCloudRecommenderV1MarkRecommendationClaimedRequest=mark_recommendation_claimed_request,
name=parent_resource)
return mark_request
def GetMarkFailedRequestFromArgs(args, parent_resource, api_version):
"""Returns the mark_failed_request from the user-specified arguments.
Args:
args: argparse.Namespace, An object that contains the values for the
arguments specified in the Args method.
parent_resource: resource location such as `organizations/123`
api_version: API version string.
"""
messages = recommender_service.RecommenderMessages(api_version)
if api_version == RECOMMENDER_API_ALPHA_VERSION:
message_request_field = messages.GoogleCloudRecommenderV1alpha2MarkRecommendationFailedRequest
mark_recommendation_failed_request = messages.GoogleCloudRecommenderV1alpha2MarkRecommendationFailedRequest(
etag=args.etag,
stateMetadata=ParseStateMetadata(args.state_metadata,
message_request_field))
if args.project:
mark_request = messages.RecommenderProjectsLocationsRecommendersRecommendationsMarkFailedRequest(
googleCloudRecommenderV1alpha2MarkRecommendationFailedRequest=mark_recommendation_failed_request,
name=parent_resource)
elif args.billing_account:
mark_request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsMarkFailedRequest(
googleCloudRecommenderV1alpha2MarkRecommendationFailedRequest=mark_recommendation_failed_request,
name=parent_resource)
elif args.organization:
mark_request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsMarkFailedRequest(
googleCloudRecommenderV1alpha2MarkRecommendationFailedRequest=mark_recommendation_failed_request,
name=parent_resource)
elif args.folder:
mark_request = messages.RecommenderFoldersLocationsRecommendersRecommendationsMarkFailedRequest(
googleCloudRecommenderV1alpha2MarkRecommendationFailedRequest=mark_recommendation_failed_request,
name=parent_resource)
elif api_version == RECOMMENDER_API_BETA_VERSION:
message_request_field = messages.GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest
mark_recommendation_failed_request = messages.GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest(
etag=args.etag,
stateMetadata=ParseStateMetadata(args.state_metadata,
message_request_field))
if args.project:
mark_request = messages.RecommenderProjectsLocationsRecommendersRecommendationsMarkFailedRequest(
googleCloudRecommenderV1beta1MarkRecommendationFailedRequest=mark_recommendation_failed_request,
name=parent_resource)
elif args.billing_account:
mark_request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsMarkFailedRequest(
googleCloudRecommenderV1beta1MarkRecommendationFailedRequest=mark_recommendation_failed_request,
name=parent_resource)
elif args.organization:
mark_request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsMarkFailedRequest(
googleCloudRecommenderV1beta1MarkRecommendationFailedRequest=mark_recommendation_failed_request,
name=parent_resource)
elif args.folder:
mark_request = messages.RecommenderFoldersLocationsRecommendersRecommendationsMarkFailedRequest(
googleCloudRecommenderV1beta1MarkRecommendationFailedRequest=mark_recommendation_failed_request,
name=parent_resource)
elif api_version == RECOMMENDER_API_GA_VERSION:
message_request_field = messages.GoogleCloudRecommenderV1MarkRecommendationFailedRequest
mark_recommendation_failed_request = messages.GoogleCloudRecommenderV1MarkRecommendationFailedRequest(
etag=args.etag,
stateMetadata=ParseStateMetadata(args.state_metadata,
message_request_field))
if args.project:
mark_request = messages.RecommenderProjectsLocationsRecommendersRecommendationsMarkFailedRequest(
googleCloudRecommenderV1MarkRecommendationFailedRequest=mark_recommendation_failed_request,
name=parent_resource)
elif args.billing_account:
mark_request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsMarkFailedRequest(
googleCloudRecommenderV1MarkRecommendationFailedRequest=mark_recommendation_failed_request,
name=parent_resource)
elif args.organization:
mark_request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsMarkFailedRequest(
googleCloudRecommenderV1MarkRecommendationFailedRequest=mark_recommendation_failed_request,
name=parent_resource)
elif args.folder:
mark_request = messages.RecommenderFoldersLocationsRecommendersRecommendationsMarkFailedRequest(
googleCloudRecommenderV1MarkRecommendationFailedRequest=mark_recommendation_failed_request,
name=parent_resource)
return mark_request
def GetMarkDismissedRequestFromArgs(args, parent_resource, is_insight_api,
api_version):
"""Returns the mark dismissed request from the user-specified arguments.
Args:
args: argparse.Namespace, An object that contains the values for the
arguments specified in the Args method.
parent_resource: resource url string, the flags are already defined in
argparse namespace, including project, billing-account, folder,
organization, etc.
is_insight_api: boolean value specifying whether this is a insight api,
otherwise treat as a recommender service api and return related list
request message.
api_version: API version string.
"""
messages = recommender_service.RecommenderMessages(api_version)
if is_insight_api:
mark_insight_dismissed_message = messages.GoogleCloudRecommenderV1alpha2MarkInsightDismissedRequest(
etag=args.etag,
recommendationChangeType=_GetRecommendationChangeType(
args.recommendation_change_type))
if args.project:
request = messages.RecommenderProjectsLocationsInsightTypesInsightsMarkDismissedRequest(
googleCloudRecommenderV1alpha2MarkInsightDismissedRequest=mark_insight_dismissed_message,
name=parent_resource)
elif args.billing_account:
request = messages.RecommenderBillingAccountsLocationsInsightTypesInsightsMarkDismissedRequest(
googleCloudRecommenderV1alpha2MarkInsightDismissedRequest=mark_insight_dismissed_message,
name=parent_resource)
elif args.organization:
request = messages.RecommenderOrganizationsLocationsInsightTypesInsightsMarkDismissedRequest(
googleCloudRecommenderV1alpha2MarkInsightDismissedRequest=mark_insight_dismissed_message,
name=parent_resource)
elif args.folder:
request = messages.RecommenderFoldersLocationsInsightTypesInsightsMarkDismissedRequest(
googleCloudRecommenderV1alpha2MarkInsightDismissedRequest=mark_insight_dismissed_message,
name=parent_resource)
else:
mark_recommendation_dismissed_message = messages.GoogleCloudRecommenderV1alpha2MarkRecommendationDismissedRequest(
etag=args.etag)
if args.project:
request = messages.RecommenderProjectsLocationsRecommendersRecommendationsMarkDismissedRequest(
googleCloudRecommenderV1alpha2MarkRecommendationDismissedRequest=mark_recommendation_dismissed_message,
name=parent_resource)
elif args.billing_account:
request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsMarkDismissedRequest(
googleCloudRecommenderV1alpha2MarkRecommendationDismissedRequest=mark_recommendation_dismissed_message,
name=parent_resource)
elif args.organization:
request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsMarkDismissedRequest(
googleCloudRecommenderV1alpha2MarkRecommendationDismissedRequest=mark_recommendation_dismissed_message,
name=parent_resource)
elif args.folder:
request = messages.RecommenderFoldersLocationsRecommendersRecommendationsMarkDismissedRequest(
googleCloudRecommenderV1alpha2MarkRecommendationDismissedRequest=mark_recommendation_dismissed_message,
name=parent_resource)
return request
def GetMarkAcceptedRequestFromArgs(args, parent_resource, is_insight_api,
api_version):
"""Returns the mark accepted request.
Args:
args: argparse.Namespace, An object that contains the values for the
arguments specified in the Args method.
parent_resource: resource url string, the flags are already defined in
argparse namespace, including project, billing-account, folder,
organization, etc.
is_insight_api: boolean value specifying whether this is a insight api,
otherwise treat as a recommender service api and return related list
request message.
api_version: API version string.
"""
messages = recommender_service.RecommenderMessages(api_version)
if api_version == RECOMMENDER_API_ALPHA_VERSION:
if is_insight_api:
message_request_field = messages.GoogleCloudRecommenderV1alpha2MarkInsightAcceptedRequest
mark_insight_accepted_message = messages.GoogleCloudRecommenderV1alpha2MarkInsightAcceptedRequest(
etag=args.etag,
stateMetadata=ParseStateMetadata(args.state_metadata,
message_request_field))
if args.project:
request = messages.RecommenderProjectsLocationsInsightTypesInsightsMarkAcceptedRequest(
googleCloudRecommenderV1alpha2MarkInsightAcceptedRequest=mark_insight_accepted_message,
name=parent_resource)
elif args.billing_account:
request = messages.RecommenderBillingAccountsLocationsInsightTypesInsightsMarkAcceptedRequest(
googleCloudRecommenderV1alpha2MarkInsightAcceptedRequest=mark_insight_accepted_message,
name=parent_resource)
elif args.organization:
request = messages.RecommenderOrganizationsLocationsInsightTypesInsightsMarkAcceptedRequest(
googleCloudRecommenderV1alpha2MarkInsightAcceptedRequest=mark_insight_accepted_message,
name=parent_resource)
elif args.folder:
request = messages.RecommenderFoldersLocationsInsightTypesInsightsMarkAcceptedRequest(
googleCloudRecommenderV1alpha2MarkInsightAcceptedRequest=mark_insight_accepted_message,
name=parent_resource)
elif api_version == RECOMMENDER_API_BETA_VERSION:
if is_insight_api:
message_request_field = messages.GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest
mark_insight_accepted_message = messages.GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest(
etag=args.etag,
stateMetadata=ParseStateMetadata(args.state_metadata,
message_request_field))
if args.project:
request = messages.RecommenderProjectsLocationsInsightTypesInsightsMarkAcceptedRequest(
googleCloudRecommenderV1beta1MarkInsightAcceptedRequest=mark_insight_accepted_message,
name=parent_resource)
elif args.billing_account:
request = messages.RecommenderBillingAccountsLocationsInsightTypesInsightsMarkAcceptedRequest(
googleCloudRecommenderV1beta1MarkInsightAcceptedRequest=mark_insight_accepted_message,
name=parent_resource)
elif args.organization:
request = messages.RecommenderOrganizationsLocationsInsightTypesInsightsMarkAcceptedRequest(
googleCloudRecommenderV1beta1MarkInsightAcceptedRequest=mark_insight_accepted_message,
name=parent_resource)
elif args.folder:
request = messages.RecommenderFoldersLocationsInsightTypesInsightsMarkAcceptedRequest(
googleCloudRecommenderV1beta1MarkInsightAcceptedRequest=mark_insight_accepted_message,
name=parent_resource)
elif api_version == RECOMMENDER_API_GA_VERSION:
if is_insight_api:
message_request_field = messages.GoogleCloudRecommenderV1MarkInsightAcceptedRequest
mark_insight_accepted_message = messages.GoogleCloudRecommenderV1MarkInsightAcceptedRequest(
etag=args.etag,
stateMetadata=ParseStateMetadata(args.state_metadata,
message_request_field))
if args.project:
request = messages.RecommenderProjectsLocationsInsightTypesInsightsMarkAcceptedRequest(
googleCloudRecommenderV1MarkInsightAcceptedRequest=mark_insight_accepted_message,
name=parent_resource)
elif args.billing_account:
request = messages.RecommenderBillingAccountsLocationsInsightTypesInsightsMarkAcceptedRequest(
googleCloudRecommenderV1MarkInsightAcceptedRequest=mark_insight_accepted_message,
name=parent_resource)
elif args.organization:
request = messages.RecommenderOrganizationsLocationsInsightTypesInsightsMarkAcceptedRequest(
googleCloudRecommenderV1MarkInsightAcceptedRequest=mark_insight_accepted_message,
name=parent_resource)
elif args.folder:
request = messages.RecommenderFoldersLocationsInsightTypesInsightsMarkAcceptedRequest(
googleCloudRecommenderV1MarkInsightAcceptedRequest=mark_insight_accepted_message,
name=parent_resource)
return request
def GetMarkSucceededRequestFromArgs(args, parent_resource, api_version):
"""Returns the mark_succeeded_request from the user-specified arguments.
Args:
args: argparse.Namespace, An object that contains the values for the
arguments specified in the Args method.
parent_resource: resource location such as `organizations/123`
api_version: API version string.
"""
messages = recommender_service.RecommenderMessages(api_version)
if api_version == RECOMMENDER_API_ALPHA_VERSION:
message_request_field = messages.GoogleCloudRecommenderV1alpha2MarkRecommendationSucceededRequest
mark_recommendation_succeeded_request = messages.GoogleCloudRecommenderV1alpha2MarkRecommendationSucceededRequest(
etag=args.etag,
stateMetadata=ParseStateMetadata(args.state_metadata,
message_request_field))
if args.project:
mark_request = messages.RecommenderProjectsLocationsRecommendersRecommendationsMarkSucceededRequest(
googleCloudRecommenderV1alpha2MarkRecommendationSucceededRequest=mark_recommendation_succeeded_request,
name=parent_resource)
elif args.billing_account:
mark_request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsMarkSucceededRequest(
googleCloudRecommenderV1alpha2MarkRecommendationSucceededRequest=mark_recommendation_succeeded_request,
name=parent_resource)
elif args.organization:
mark_request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsMarkSucceededRequest(
googleCloudRecommenderV1alpha2MarkRecommendationSucceededRequest=mark_recommendation_succeeded_request,
name=parent_resource)
elif args.folder:
mark_request = messages.RecommenderFoldersLocationsRecommendersRecommendationsMarkSucceededRequest(
googleCloudRecommenderV1alpha2MarkRecommendationSucceededRequest=mark_recommendation_succeeded_request,
name=parent_resource)
elif api_version == RECOMMENDER_API_BETA_VERSION:
message_request_field = messages.GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest
mark_recommendation_succeeded_request = messages.GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest(
etag=args.etag,
stateMetadata=ParseStateMetadata(args.state_metadata,
message_request_field))
if args.project:
mark_request = messages.RecommenderProjectsLocationsRecommendersRecommendationsMarkSucceededRequest(
googleCloudRecommenderV1beta1MarkRecommendationSucceededRequest=mark_recommendation_succeeded_request,
name=parent_resource)
elif args.billing_account:
mark_request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsMarkSucceededRequest(
googleCloudRecommenderV1beta1MarkRecommendationSucceededRequest=mark_recommendation_succeeded_request,
name=parent_resource)
elif args.organization:
mark_request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsMarkSucceededRequest(
googleCloudRecommenderV1beta1MarkRecommendationSucceededRequest=mark_recommendation_succeeded_request,
name=parent_resource)
elif args.folder:
mark_request = messages.RecommenderFoldersLocationsRecommendersRecommendationsMarkSucceededRequest(
googleCloudRecommenderV1beta1MarkRecommendationSucceededRequest=mark_recommendation_succeeded_request,
name=parent_resource)
elif api_version == RECOMMENDER_API_GA_VERSION:
message_request_field = messages.GoogleCloudRecommenderV1MarkRecommendationSucceededRequest
mark_recommendation_succeeded_request = messages.GoogleCloudRecommenderV1MarkRecommendationSucceededRequest(
etag=args.etag,
stateMetadata=ParseStateMetadata(args.state_metadata,
message_request_field))
if args.project:
mark_request = messages.RecommenderProjectsLocationsRecommendersRecommendationsMarkSucceededRequest(
googleCloudRecommenderV1MarkRecommendationSucceededRequest=mark_recommendation_succeeded_request,
name=parent_resource)
elif args.billing_account:
mark_request = messages.RecommenderBillingAccountsLocationsRecommendersRecommendationsMarkSucceededRequest(
googleCloudRecommenderV1MarkRecommendationSucceededRequest=mark_recommendation_succeeded_request,
name=parent_resource)
elif args.organization:
mark_request = messages.RecommenderOrganizationsLocationsRecommendersRecommendationsMarkSucceededRequest(
googleCloudRecommenderV1MarkRecommendationSucceededRequest=mark_recommendation_succeeded_request,
name=parent_resource)
elif args.folder:
mark_request = messages.RecommenderFoldersLocationsRecommendersRecommendationsMarkSucceededRequest(
googleCloudRecommenderV1MarkRecommendationSucceededRequest=mark_recommendation_succeeded_request,
name=parent_resource)
return mark_request
def ParseStateMetadata(metadata, message_request):
"""Parsing args to get full state metadata string.
Args:
metadata: dict, key-value pairs passed in from the --metadata flag.
message_request: specific request field of message module
Returns:
A message object.
"""
if not metadata:
return None
additional_properties = []
metadata_value_msg = message_request.StateMetadataValue
for key, value in six.iteritems(metadata):
additional_properties.append(
metadata_value_msg.AdditionalProperty(key=key, value=value))
return metadata_value_msg(additionalProperties=additional_properties) or None
def GetApiVersion(release_track):
"""Get API version string.
Converts API version string from release track value.
Args:
release_track: release_track value, can be ALPHA, BETA, GA
Returns:
API version string.
"""
switcher = {
base.ReleaseTrack.ALPHA: RECOMMENDER_API_ALPHA_VERSION,
base.ReleaseTrack.BETA: RECOMMENDER_API_BETA_VERSION,
base.ReleaseTrack.GA: RECOMMENDER_API_GA_VERSION,
}
return switcher.get(release_track, RECOMMENDER_API_ALPHA_VERSION)
def _GetRecommendationChangeType(recommendation_change_type):
"""Get RecommendationChangeType enum value.
Converts recommendation_change_type argument value to
RecommendationChangeType enum value.
Args:
recommendation_change_type: recommendation_change_type flag value
Returns:
RecommendationChangeType enum value
"""
if not recommendation_change_type:
return None
messages = recommender_service.RecommenderMessages()
if recommendation_change_type.lower() == 'leave_unchanged':
return messages.GoogleCloudRecommenderV1alpha2MarkInsightDismissedRequest.RecommendationChangeTypeValueValuesEnum(
'LEAVE_RECOMMENDATIONS_UNCHANGED')
elif recommendation_change_type.lower() == 'dismiss':
return messages.GoogleCloudRecommenderV1alpha2MarkInsightDismissedRequest.RecommendationChangeTypeValueValuesEnum(
'DISMISS_RECOMMENDATIONS')
else:
return None
| 50.863889
| 118
| 0.791273
| 2,821
| 36,622
| 10.019497
| 0.103155
| 0.049531
| 0.047125
| 0.048258
| 0.757969
| 0.712365
| 0.702707
| 0.697824
| 0.642915
| 0.605802
| 0
| 0.006423
| 0.166758
| 36,622
| 719
| 119
| 50.934631
| 0.919843
| 0.160996
| 0
| 0.765873
| 0
| 0
| 0.00306
| 0.001776
| 0
| 0
| 0
| 0.001391
| 0
| 1
| 0.027778
| false
| 0
| 0.011905
| 0
| 0.077381
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f4fcd78421c04ac4c7877051ae6675794a78363f
| 68
|
py
|
Python
|
src/openeo_classification/__init__.py
|
openEOPlatform/openeo-classification
|
2e593a0760c210d78454a6a4cd54e0c78cda8b22
|
[
"Apache-2.0"
] | null | null | null |
src/openeo_classification/__init__.py
|
openEOPlatform/openeo-classification
|
2e593a0760c210d78454a6a4cd54e0c78cda8b22
|
[
"Apache-2.0"
] | 2
|
2022-03-31T12:19:19.000Z
|
2022-03-31T14:35:39.000Z
|
src/openeo_classification/__init__.py
|
openEOPlatform/openeo-classification
|
2e593a0760c210d78454a6a4cd54e0c78cda8b22
|
[
"Apache-2.0"
] | null | null | null |
from openeo_classification._version import __version__, get_version
| 34
| 67
| 0.897059
| 8
| 68
| 6.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073529
| 68
| 1
| 68
| 68
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
76166d0b11e2310fa4a10745c2ef2cebb35462c8
| 145
|
py
|
Python
|
marionette_tg/__init__.py
|
kpdyer/marionette
|
bb40a334a18c82728eec01c9b56330bcb91a28da
|
[
"Apache-2.0"
] | 73
|
2015-05-22T20:07:32.000Z
|
2015-11-12T15:09:00.000Z
|
marionette_tg/__init__.py
|
kpdyer/marionette
|
bb40a334a18c82728eec01c9b56330bcb91a28da
|
[
"Apache-2.0"
] | 20
|
2015-04-14T03:40:41.000Z
|
2015-10-02T00:57:28.000Z
|
marionette_tg/__init__.py
|
kpdyer/marionette
|
bb40a334a18c82728eec01c9b56330bcb91a28da
|
[
"Apache-2.0"
] | 14
|
2015-04-29T18:10:42.000Z
|
2015-11-03T00:36:29.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from .server import Server
from .client import Client
from .exceptions import MarionetteException
| 20.714286
| 43
| 0.744828
| 19
| 145
| 5.684211
| 0.684211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008
| 0.137931
| 145
| 6
| 44
| 24.166667
| 0.856
| 0.289655
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
520411034293f09c2e49ff9440e254526a9d58b4
| 179
|
py
|
Python
|
tests/test_version.py
|
UDST/orca-installation-testing
|
207c7044ec4fd7a249405f5bdf49addaa6f1a766
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_version.py
|
UDST/orca-installation-testing
|
207c7044ec4fd7a249405f5bdf49addaa6f1a766
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_version.py
|
UDST/orca-installation-testing
|
207c7044ec4fd7a249405f5bdf49addaa6f1a766
|
[
"BSD-3-Clause"
] | null | null | null |
import tables
import orca
def test_version():
# Conda release has the wrong version number currently, so this test won't pass
assert orca.__version__ == '1.5.3'
pass
| 22.375
| 83
| 0.715084
| 28
| 179
| 4.392857
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021277
| 0.212291
| 179
| 7
| 84
| 25.571429
| 0.851064
| 0.430168
| 0
| 0
| 0
| 0
| 0.05
| 0
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0.2
| true
| 0.2
| 0.4
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
524c01d7a2bbbae66c9737eaaf210eabd178ab61
| 134
|
py
|
Python
|
glo/data/__init__.py
|
learnitall/glo
|
f0a615613ddf9bcf593de437314c3bf22952c2ee
|
[
"MIT"
] | null | null | null |
glo/data/__init__.py
|
learnitall/glo
|
f0a615613ddf9bcf593de437314c3bf22952c2ee
|
[
"MIT"
] | null | null | null |
glo/data/__init__.py
|
learnitall/glo
|
f0a615613ddf9bcf593de437314c3bf22952c2ee
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tools for working with datasets."""
from . import kingsoopers, pandas # noqa: F401
| 26.8
| 47
| 0.656716
| 18
| 134
| 4.888889
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044248
| 0.156716
| 134
| 4
| 48
| 33.5
| 0.734513
| 0.649254
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
524f58ed10828fe30956f141c0b6cf8009742026
| 216
|
py
|
Python
|
apps/domain/D.py
|
sanchezcarlosjr/PyK-Ar
|
13ed535b85a9025464ae85feda46d94887d75e3e
|
[
"Apache-2.0"
] | 1
|
2021-09-24T23:13:22.000Z
|
2021-09-24T23:13:22.000Z
|
apps/domain/D.py
|
sanchezcarlosjr/PyK-Ar
|
13ed535b85a9025464ae85feda46d94887d75e3e
|
[
"Apache-2.0"
] | 10
|
2021-09-25T05:15:04.000Z
|
2021-10-04T20:02:27.000Z
|
apps/domain/D.py
|
sanchezcarlosjr/PyK-Ar
|
13ed535b85a9025464ae85feda46d94887d75e3e
|
[
"Apache-2.0"
] | null | null | null |
from application.constant import Constant
# Spectrometer discrimination correction factor for two mass
class D(Constant):
def __new__(cls, value=None):
return super().__new__(cls, key="D", value=value)
| 27
| 60
| 0.740741
| 28
| 216
| 5.428571
| 0.75
| 0.078947
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162037
| 216
| 7
| 61
| 30.857143
| 0.839779
| 0.268519
| 0
| 0
| 0
| 0
| 0.00641
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
52759f2bff16bb281656290da32eb74742005070
| 21,304
|
py
|
Python
|
src/falconpy/cspm_registration.py
|
mccbryan3/falconpy
|
ec4d3a574f2e9b06d046fc8d7ca6818f1f97331f
|
[
"Unlicense"
] | null | null | null |
src/falconpy/cspm_registration.py
|
mccbryan3/falconpy
|
ec4d3a574f2e9b06d046fc8d7ca6818f1f97331f
|
[
"Unlicense"
] | null | null | null |
src/falconpy/cspm_registration.py
|
mccbryan3/falconpy
|
ec4d3a574f2e9b06d046fc8d7ca6818f1f97331f
|
[
"Unlicense"
] | null | null | null |
"""
_______ __ _______ __ __ __
| _ .----.-----.--.--.--.--| | _ | |_.----|__| |--.-----.
|. 1___| _| _ | | | | _ | 1___| _| _| | <| -__|
|. |___|__| |_____|________|_____|____ |____|__| |__|__|__|_____|
|: 1 | |: 1 |
|::.. . | CROWDSTRIKE FALCON |::.. . | FalconPy
`-------' `-------'
OAuth2 API - Customer SDK
cspm_registration - Falcon Horizon for AWS API Interface Class
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>
"""
# pylint: disable=C0103 # Aligning method names to API operation IDs
from ._util import service_request, force_default, args_to_params
from ._service_class import ServiceClass
from ._endpoint._cspm_registration import _cspm_registration_endpoints as Endpoints
class CSPM_Registration(ServiceClass):
"""The only requirement to instantiate an instance of this class
is a valid token provided by the Falcon API SDK OAuth2 class.
"""
@force_default(defaults=["parameters"], default_types=["dict"])
def GetCSPMAwsAccount(self: object, parameters: dict = None, **kwargs) -> dict:
"""Returns information about the current status of an AWS account."""
# [GET] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/GetCSPMAwsAccount
operation_id = "GetCSPMAwsAccount"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}".replace("?ids={}", "")
header_payload = self.headers
parameter_payload = args_to_params(parameters, kwargs, Endpoints, operation_id)
returned = service_request(caller=self,
method="GET",
endpoint=target_url,
params=parameter_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
def CreateCSPMAwsAccount(self: object, body: dict) -> dict:
"""Creates a new account in our system for a customer and generates a script
to run in their AWS cloud environment to grant CrowdStrike Horizon access.
"""
# [POST] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/CreateCSPMAwsAccount
operation_id = "CreateCSPMAwsAccount"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
body_payload = body
returned = service_request(caller=self,
method="POST",
endpoint=target_url,
body=body_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
@force_default(defaults=["parameters"], default_types=["dict"])
def DeleteCSPMAwsAccount(self: object, parameters: dict = None, **kwargs) -> dict:
"""Delete an existing AWS Account or Organization by specifying their IDs."""
# [DELETE] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/DeleteCSPMAwsAccount
operation_id = "DeleteCSPMAwsAccount"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}".replace("?ids={}", "")
header_payload = self.headers
parameter_payload = args_to_params(parameters, kwargs, Endpoints, operation_id)
returned = service_request(caller=self,
method="DELETE",
endpoint=target_url,
params=parameter_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
def PatchCSPMAwsAccount(self: object, body: dict) -> dict:
"""Patches a existing account in our system for a customer."""
# [PATCH] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/PatchCSPMAwsAccount
operation_id = "PatchCSPMAwsAccount"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
body_payload = body
returned = service_request(caller=self,
method="PATCH",
endpoint=target_url,
body=body_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
def GetCSPMAwsConsoleSetupURLs(self: object) -> dict:
"""Returns a URL for customers to visit in their cloud environment to grant access to CrowdStrike"""
# [GET] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/GetCSPMAwsConsoleSetupURLs
operation_id = "GetCSPMAwsConsoleSetupURLs"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
returned = service_request(caller=self,
method="GET",
endpoint=target_url,
headers=header_payload,
verify=self.ssl_verify
)
return returned
def GetCSPMAwsAccountScriptsAttachment(self: object) -> dict:
"""Return a script for customers to run in their cloud environment
to grant access to CrowdStrike for their AWS environment.
"""
# [GET] https://assets.falcon.crowdstrike.com/support/api/swagger.html#
# ... /cspm-registration/GetCSPMAwsAccountScriptsAttachment
operation_id = "GetCSPMAwsAccountScriptsAttachment"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
returned = service_request(caller=self,
method="GET",
endpoint=target_url,
headers=header_payload,
verify=self.ssl_verify
)
return returned
@force_default(defaults=["parameters"], default_types=["dict"])
def GetCSPMAzureAccount(self: object, parameters: dict = None, **kwargs) -> dict:
"""Return information about Azure account registration."""
# [GET] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/GetCSPMAzureAccount
operation_id = "GetCSPMAzureAccount"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}".replace("?ids={}", "")
header_payload = self.headers
parameter_payload = args_to_params(parameters, kwargs, Endpoints, operation_id)
returned = service_request(caller=self,
method="GET",
endpoint=target_url,
params=parameter_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
def CreateCSPMAzureAccount(self: object, body: dict) -> dict:
"""Creates a new account in our system for a customer and generates a script
to run in their cloud environment to grant CrowdStrike Horizon access.
"""
# [POST] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/CreateCSPMAzureAccount
operation_id = "CreateCSPMAzureAccount"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
body_payload = body
returned = service_request(caller=self,
method="POST",
endpoint=target_url,
body=body_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
@force_default(defaults=["parameters"], default_types=["dict"])
def DeleteCSPMAzureAccount(self: object, parameters: dict = None, **kwargs) -> dict:
"""Delete an existing Azure Subscription by specifying their IDs."""
# [DELETE] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/DeleteCSPMAzureAccount
operation_id = "DeleteCSPMAzureAccount"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}".replace("?ids={}", "")
header_payload = self.headers
parameter_payload = args_to_params(parameters, kwargs, Endpoints, operation_id)
returned = service_request(caller=self,
method="DELETE",
endpoint=target_url,
params=parameter_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
@force_default(defaults=["parameters"], default_types=["dict"])
def UpdateCSPMAzureAccountClientID(self: object, body: dict = None, parameters: dict = None, **kwargs) -> dict:
"""Update an Azure service account in our system with the
user-created client_id created with the public key we've provided.
"""
# [PATCH] https://assets.falcon.crowdstrike.com/support/api/swagger.html#
# ... /cspm-registration/UpdateCSPMAzureAccountClientID2
# This shows up as UpdateCSPMAzureAccountClientID2 in the Uber class
operation_id = "UpdateCSPMAzureAccountClientID"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
parameter_payload = args_to_params(parameters, kwargs, Endpoints, operation_id)
if body is None:
body = {}
body_payload = body
returned = service_request(caller=self,
method="PATCH",
endpoint=target_url,
body=body_payload,
params=parameter_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
@force_default(defaults=["parameters"], default_types=["dict"])
def UpdateCSPMAzureTenantDefaultSubscriptionID(self: object, parameters: dict = None, **kwargs) -> dict:
"""Update an Azure service account in our system with the
user-created client_id created with the public key we've provided.
"""
# [PATCH] https://assets.falcon.crowdstrike.com/support/api/swagger.html#
# ... /cspm-registration/UpdateCSPMAzureTenantDefaultSubscriptionID
operation_id = "UpdateCSPMAzureTenantDefaultSubscriptionID"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
parameter_payload = args_to_params(parameters, kwargs, Endpoints, operation_id)
returned = service_request(caller=self,
method="PATCH",
endpoint=target_url,
params=parameter_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
@force_default(defaults=["parameters"], default_types=["dict"])
def GetCSPMAzureUserScriptsAttachment(self: object, parameters: dict = None, **kwargs) -> dict:
"""Return a script for customers to run in their cloud environment
to grant access to CrowdStrike for their Azure environment.
"""
# [GET] https://assets.falcon.crowdstrike.com/support/api/swagger.html#
# ... /cspm-registration/GetCSPMAzureUserScriptsAttachment
operation_id = "GetCSPMAzureUserScriptsAttachment"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
parameter_payload = args_to_params(parameters, kwargs, Endpoints, operation_id)
returned = service_request(caller=self,
method="GET",
endpoint=target_url,
params=parameter_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
@force_default(defaults=["parameters"], default_types=["dict"])
def GetIOAEvents(self: object, parameters: dict = None, **kwargs) -> dict:
"""For CSPM IOA events, gets list of IOA events."""
# [GET] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/GetIOAEvents
operation_id = "GetIOAEvents"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
parameter_payload = args_to_params(parameters, kwargs, Endpoints, operation_id)
returned = service_request(caller=self,
method="GET",
endpoint=target_url,
params=parameter_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
@force_default(defaults=["parameters"], default_types=["dict"])
def GetIOAUsers(self: object, parameters: dict = None, **kwargs) -> dict:
"""For CSPM IOA users, gets list of IOA users."""
# [GET] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/GetIOAUsers
operation_id = "GetIOAUsers"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
parameter_payload = args_to_params(parameters, kwargs, Endpoints, operation_id)
returned = service_request(caller=self,
method="GET",
endpoint=target_url,
params=parameter_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
@force_default(defaults=["parameters"], default_types=["dict"])
def GetCSPMPolicy(self: object, parameters: dict = None, **kwargs) -> dict:
"""Given a policy ID, returns detailed policy information."""
# [GET] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/GetCSPMPolicy
operation_id = "GetCSPMPolicy"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}".replace("?ids={}", "")
header_payload = self.headers
parameter_payload = args_to_params(parameters, kwargs, Endpoints, operation_id)
returned = service_request(caller=self,
method="GET",
endpoint=target_url,
params=parameter_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
@force_default(defaults=["parameters"], default_types=["dict"])
def GetCSPMPolicySettings(self: object, parameters: dict = None, **kwargs) -> dict:
"""Returns information about current policy settings."""
# [GET] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/GetCSPMPolicySettings
operation_id = "GetCSPMPolicySettings"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
parameter_payload = args_to_params(parameters, kwargs, Endpoints, operation_id)
returned = service_request(caller=self,
method="GET",
endpoint=target_url,
params=parameter_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
def UpdateCSPMPolicySettings(self: object, body: dict) -> dict:
"""Updates a policy setting - can be used to override policy severity or to disable a policy entirely."""
# [PATCH] https://assets.falcon.crowdstrike.com/support/api/swagger.html#
# ... /cspm-registration/UpdateCSPMPolicySettings
operation_id = "UpdateCSPMPolicySettings"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
body_payload = body
returned = service_request(caller=self,
method="PATCH",
endpoint=target_url,
body=body_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
@force_default(defaults=["parameters"], default_types=["dict"])
def GetCSPMScanSchedule(self: object, parameters: dict = None, **kwargs) -> dict:
"""Returns scan schedule configuration for one or more cloud platforms."""
# [GET] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/GetCSPMScanSchedule
operation_id = "GetCSPMScanSchedule"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
parameter_payload = args_to_params(parameters, kwargs, Endpoints, operation_id)
returned = service_request(caller=self,
method="GET",
endpoint=target_url,
params=parameter_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
def UpdateCSPMScanSchedule(self: object, body: dict) -> dict:
"""Updates scan schedule configuration for one or more cloud platforms."""
# [POST] https://assets.falcon.crowdstrike.com/support/api/swagger.html#/cspm-registration/UpdateCSPMScanSchedule
operation_id = "UpdateCSPMScanSchedule"
target_url = f"{self.base_url}{[ep[2] for ep in Endpoints if operation_id in ep[0]][0]}"
header_payload = self.headers
body_payload = body
returned = service_request(caller=self,
method="POST",
endpoint=target_url,
body=body_payload,
headers=header_payload,
verify=self.ssl_verify
)
return returned
| 55.769634
| 124
| 0.573977
| 2,105
| 21,304
| 5.634204
| 0.124466
| 0.046374
| 0.027234
| 0.044857
| 0.71484
| 0.712985
| 0.708094
| 0.701518
| 0.687015
| 0.674283
| 0
| 0.004886
| 0.337073
| 21,304
| 381
| 125
| 55.916011
| 0.834879
| 0.271498
| 0
| 0.760456
| 0
| 0.072243
| 0.135937
| 0.045553
| 0
| 0
| 0
| 0
| 0
| 1
| 0.072243
| false
| 0
| 0.011407
| 0
| 0.159696
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
528b2651aa9ed39ee019a0f62e3f2a4cb5a60d07
| 80
|
py
|
Python
|
src/python/gitlab_ci/__init__.py
|
bvdeenen/bitbar
|
4bd0876dacecc55f2cb60027510ba47ff7d84d12
|
[
"MIT"
] | 3
|
2020-01-21T10:12:31.000Z
|
2021-12-22T09:05:37.000Z
|
src/python/gitlab_ci/__init__.py
|
bvdeenen/bitbar
|
4bd0876dacecc55f2cb60027510ba47ff7d84d12
|
[
"MIT"
] | 3
|
2021-12-24T11:34:24.000Z
|
2022-01-18T09:17:32.000Z
|
src/python/gitlab_ci/__init__.py
|
bvdeenen/bitbar
|
4bd0876dacecc55f2cb60027510ba47ff7d84d12
|
[
"MIT"
] | 2
|
2021-05-28T13:32:51.000Z
|
2021-12-21T19:09:21.000Z
|
from .config import GitlabConfig
from .domain import *
from .gitlab_ci import *
| 20
| 32
| 0.7875
| 11
| 80
| 5.636364
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 80
| 3
| 33
| 26.666667
| 0.911765
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
870aeebb96efdd652eb0a21bc88d49fffb9aad97
| 141
|
py
|
Python
|
savecode/threeyears/datacontract/idowndataset/__init__.py
|
Octoberr/swm0920
|
8f05a6b91fc205960edd57f9076facec04f49a1a
|
[
"Apache-2.0"
] | 2
|
2019-05-19T11:54:26.000Z
|
2019-05-19T12:03:49.000Z
|
savecode/threeyears/datacontract/idowndataset/__init__.py
|
Octoberr/swm0920
|
8f05a6b91fc205960edd57f9076facec04f49a1a
|
[
"Apache-2.0"
] | 1
|
2020-11-27T07:55:15.000Z
|
2020-11-27T07:55:15.000Z
|
savecode/threeyears/datacontract/idowndataset/__init__.py
|
Octoberr/swm0920
|
8f05a6b91fc205960edd57f9076facec04f49a1a
|
[
"Apache-2.0"
] | 2
|
2021-09-06T18:06:12.000Z
|
2021-12-31T07:44:43.000Z
|
"""idown task"""
# -*- coding:utf-8 -*-
from .task import Task, ETokenType, ETaskType
from .datafeedback import EBackResult, TaskBatchBack
| 20.142857
| 52
| 0.723404
| 16
| 141
| 6.375
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008197
| 0.134752
| 141
| 6
| 53
| 23.5
| 0.827869
| 0.22695
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
87330b8d61ea5ef2b165aa95cbc8517383b91ab2
| 198
|
py
|
Python
|
mani_skill_learn/utils/fileio/__init__.py
|
art-e-fact/ManiSkill-Learn
|
9742da932448a5234222cf94381ca0f861dc83fd
|
[
"Apache-2.0"
] | 39
|
2021-07-29T05:59:20.000Z
|
2022-03-25T06:32:51.000Z
|
mani_skill_learn/utils/fileio/__init__.py
|
art-e-fact/ManiSkill-Learn
|
9742da932448a5234222cf94381ca0f861dc83fd
|
[
"Apache-2.0"
] | 27
|
2021-08-04T03:37:03.000Z
|
2022-03-08T06:18:25.000Z
|
mani_skill_learn/utils/fileio/__init__.py
|
art-e-fact/ManiSkill-Learn
|
9742da932448a5234222cf94381ca0f861dc83fd
|
[
"Apache-2.0"
] | 5
|
2021-08-24T14:21:06.000Z
|
2022-02-21T04:31:01.000Z
|
from .h5_utils import (merge_h5_trajectory, load_h5_as_dict_array, load_h5s_as_list_dict_array, generate_chunked_h5_replay)
from .serialization import *
from .hash_utils import check_md5sum, md5sum
| 49.5
| 123
| 0.868687
| 32
| 198
| 4.84375
| 0.59375
| 0.141935
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038462
| 0.080808
| 198
| 3
| 124
| 66
| 0.813187
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5e4af69108fb4a30f4494f85a21e2e1366f03d67
| 1,199
|
py
|
Python
|
eth2/beacon/db/exceptions.py
|
eddiewebb/trinity
|
c04c2945136298335fbb93db3cbb9f1baaa7ad7c
|
[
"MIT"
] | null | null | null |
eth2/beacon/db/exceptions.py
|
eddiewebb/trinity
|
c04c2945136298335fbb93db3cbb9f1baaa7ad7c
|
[
"MIT"
] | null | null | null |
eth2/beacon/db/exceptions.py
|
eddiewebb/trinity
|
c04c2945136298335fbb93db3cbb9f1baaa7ad7c
|
[
"MIT"
] | null | null | null |
class BeaconDBException(Exception):
"""
Base class for exceptions raised by this package.
"""
pass
class HeadStateSlotNotFound(BeaconDBException):
"""
Exception raised if head state slot does not exist.
"""
pass
class StateNotFound(BeaconDBException):
"""
Exception raised if state with the given state does not exist.
"""
pass
class FinalizedHeadNotFound(BeaconDBException):
"""
Exception raised if no finalized head is set in this database.
"""
pass
class JustifiedHeadNotFound(BeaconDBException):
"""
Exception raised if no justified head is set in this database.
"""
pass
class AttestationRootNotFound(BeaconDBException):
"""
Exception raised if no attestation root is set in this database.
"""
pass
class MissingForkChoiceScorings(BeaconDBException):
"""
Exception raised if a client tries to score a block without providing
the ability to generate a score via a ``scoring``.
"""
pass
class MissingForkChoiceContext(BeaconDBException):
"""
Exception raised if the database lacks the state required for the
chain's fork choice.
"""
pass
| 18.446154
| 73
| 0.683903
| 129
| 1,199
| 6.356589
| 0.426357
| 0.253659
| 0.273171
| 0.290244
| 0.295122
| 0.112195
| 0.112195
| 0.078049
| 0
| 0
| 0
| 0
| 0.245204
| 1,199
| 64
| 74
| 18.734375
| 0.906077
| 0.469558
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
5ea87522981862cdd767863522199dd452a0a0c1
| 36
|
py
|
Python
|
pelican/plugins/defer_loading_images/__init__.py
|
Kartones/PythonAssorted
|
0351b176f45aab886965056bebd951d29f5b99fb
|
[
"Unlicense"
] | 12
|
2016-12-27T19:41:46.000Z
|
2020-06-02T19:14:26.000Z
|
pelican/plugins/defer_loading_images/__init__.py
|
Kartones/PythonAssorted
|
0351b176f45aab886965056bebd951d29f5b99fb
|
[
"Unlicense"
] | 1
|
2020-08-18T20:58:29.000Z
|
2020-08-19T05:31:40.000Z
|
pelican/plugins/defer_loading_images/__init__.py
|
Kartones/PythonAssorted
|
0351b176f45aab886965056bebd951d29f5b99fb
|
[
"Unlicense"
] | 2
|
2020-08-18T20:23:59.000Z
|
2021-08-01T13:35:02.000Z
|
from .defer_loading_images import *
| 18
| 35
| 0.833333
| 5
| 36
| 5.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 36
| 1
| 36
| 36
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
0d8f43aeeab822125e0aa3038c2cd0f9c22da32f
| 1,060
|
py
|
Python
|
test/fixtures/alignment_fixtures.py
|
undeadpixel/mallet
|
86ca17b72e7a24bc898a4a49076609dfd38a7d2c
|
[
"MIT"
] | 1
|
2016-07-15T13:03:13.000Z
|
2016-07-15T13:03:13.000Z
|
test/fixtures/alignment_fixtures.py
|
undeadpixel/mallet
|
86ca17b72e7a24bc898a4a49076609dfd38a7d2c
|
[
"MIT"
] | null | null | null |
test/fixtures/alignment_fixtures.py
|
undeadpixel/mallet
|
86ca17b72e7a24bc898a4a49076609dfd38a7d2c
|
[
"MIT"
] | null | null | null |
from mallet.sequence import Sequence
from mallet.alignment import Alignment
def alignments():
return [
Alignment(Sequence("P1", "ABABABA"), Sequence("State path", "STTTTTU"), -12.34),
Alignment(Sequence("P2", "ABA"), Sequence("State path", "STU"), -1.56),
Alignment(Sequence("P3", "AAAB"), Sequence("State path", "SSSU"), -2.78)
]
def none_state_alignments():
return [
Alignment(Sequence("P1", "AAAB"), None, -2.78),
Alignment(Sequence("P2", "ABA"), Sequence("State path", "STU"), -1.56),
]
def long_alignments():
return [
Alignment(Sequence("P1", "ABA"*80), Sequence("State path", "STU"*80), -1.56),
Alignment(Sequence("P2", "AA"*76), Sequence("State path", "SU"*76), 45.56),
]
def none_score_alignments():
return [
Alignment(Sequence("P1", "ABABABA"), Sequence("State path", "STTTTTU"), -12.34),
Alignment(Sequence("P2", "ABA"), Sequence("State path", "STU"), None),
Alignment(Sequence("P3", "AAAB"), Sequence("State path", "SSSU"), None)
]
| 35.333333
| 88
| 0.599057
| 126
| 1,060
| 5
| 0.261905
| 0.269841
| 0.242857
| 0.209524
| 0.68254
| 0.571429
| 0.571429
| 0.571429
| 0.431746
| 0.431746
| 0
| 0.052509
| 0.191509
| 1,060
| 29
| 89
| 36.551724
| 0.682614
| 0
| 0
| 0.333333
| 0
| 0
| 0.175637
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0
| 0.083333
| 0.166667
| 0.416667
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
0dcf0c3de274f65070cc3c5602f2b37a41b495de
| 122
|
py
|
Python
|
Chapter04/counter_zero.py
|
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
|
805d00c7a54927ba94c9077e9a580508ee3c5e56
|
[
"MIT"
] | 13
|
2018-06-21T01:44:49.000Z
|
2021-12-01T10:49:53.000Z
|
Chapter04/counter_zero.py
|
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
|
805d00c7a54927ba94c9077e9a580508ee3c5e56
|
[
"MIT"
] | null | null | null |
Chapter04/counter_zero.py
|
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
|
805d00c7a54927ba94c9077e9a580508ee3c5e56
|
[
"MIT"
] | 6
|
2018-10-05T08:29:24.000Z
|
2022-01-11T14:49:50.000Z
|
>>> count = Counter(["spam", "eggs", "bacon"])
>>> count["toast"]
0
>>> count
Counter({'spam': 1, 'eggs': 1, 'bacon': 1})
| 20.333333
| 46
| 0.52459
| 16
| 122
| 4
| 0.5
| 0.375
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038095
| 0.139344
| 122
| 5
| 47
| 24.4
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0.254098
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
0dda58fa041b17a77b08b94ca9faf18663dfa17f
| 125
|
py
|
Python
|
historie/models.py
|
mribrgr/StuRa-Mitgliederdatenbank
|
87a261d66c279ff86056e315b05e6966b79df9fa
|
[
"MIT"
] | 8
|
2019-11-26T13:34:46.000Z
|
2021-06-21T13:41:57.000Z
|
historie/models.py
|
mribrgr/StuRa-Mitgliederdatenbank
|
87a261d66c279ff86056e315b05e6966b79df9fa
|
[
"MIT"
] | 93
|
2019-12-16T09:29:10.000Z
|
2021-04-24T12:03:33.000Z
|
historie/models.py
|
mribrgr/StuRa-Mitgliederdatenbank
|
87a261d66c279ff86056e315b05e6966b79df9fa
|
[
"MIT"
] | 2
|
2020-12-03T12:43:19.000Z
|
2020-12-22T21:48:47.000Z
|
from django.db import models
from django.contrib.auth.models import User
from simple_history import register
register(User)
| 20.833333
| 43
| 0.84
| 19
| 125
| 5.473684
| 0.578947
| 0.192308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112
| 125
| 5
| 44
| 25
| 0.936937
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
21898281a6edceb2793d8cda6fb05f88e2f303e4
| 310
|
py
|
Python
|
pybacktest/__init__.py
|
dataronio/pybacktest
|
066edd589ffc97a4267bd5824fabd5477ed3990f
|
[
"MIT"
] | 690
|
2015-01-13T03:02:45.000Z
|
2022-03-27T12:26:40.000Z
|
pybacktest/__init__.py
|
dataronio/pybacktest
|
066edd589ffc97a4267bd5824fabd5477ed3990f
|
[
"MIT"
] | 20
|
2015-04-28T19:17:36.000Z
|
2021-08-15T08:22:39.000Z
|
pybacktest/__init__.py
|
dataronio/pybacktest
|
066edd589ffc97a4267bd5824fabd5477ed3990f
|
[
"MIT"
] | 246
|
2015-01-08T00:33:26.000Z
|
2022-02-11T22:29:50.000Z
|
from pybacktest.backtest import Backtest
from pybacktest.optimizer import Optimizer
from pybacktest import performance
from pybacktest.data import load_from_yahoo
from pybacktest.ami_funcs import *
from pybacktest.verification import iter_verify, verify
from pybacktest.production import check_position_change
| 38.75
| 55
| 0.880645
| 40
| 310
| 6.675
| 0.45
| 0.367041
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093548
| 310
| 7
| 56
| 44.285714
| 0.950178
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
21fb3aa2f53023e457ce51d88db061eb39312a0d
| 189
|
py
|
Python
|
simple_loader/test.py
|
usefss/django-webpack
|
9d8acdfd0e75d3c12086dcdbca96117ac1e5101b
|
[
"MIT"
] | 16
|
2020-08-05T12:56:46.000Z
|
2021-12-27T10:32:10.000Z
|
simple_loader/test.py
|
usefss/django-vue
|
9d8acdfd0e75d3c12086dcdbca96117ac1e5101b
|
[
"MIT"
] | 6
|
2020-10-01T06:08:28.000Z
|
2021-09-22T19:32:28.000Z
|
simple_loader/test.py
|
usefss/django-vue
|
9d8acdfd0e75d3c12086dcdbca96117ac1e5101b
|
[
"MIT"
] | 1
|
2020-09-17T01:02:47.000Z
|
2020-09-17T01:02:47.000Z
|
from django.test import TestCase
class TestWebpackStatusLoader(TestCase):
def test_loader_output(self):
from .utils import get_clean_bundle
print(get_clean_bundle())
| 21
| 43
| 0.746032
| 23
| 189
| 5.869565
| 0.695652
| 0.118519
| 0.207407
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.190476
| 189
| 8
| 44
| 23.625
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1d048106cb9a24b30bf1701c814a474430939d93
| 16
|
py
|
Python
|
openml_data_integration/protobuf_generator/openml_40671/myconstants.py
|
tuix/tutorials
|
733d35a8a39df079e8c2432c441b70785ab08440
|
[
"Apache-2.0"
] | 8
|
2020-04-21T13:29:04.000Z
|
2021-12-13T08:59:09.000Z
|
openml_data_integration/protobuf_generator/openml_40671/myconstants.py
|
tuix/tutorials
|
733d35a8a39df079e8c2432c441b70785ab08440
|
[
"Apache-2.0"
] | 3
|
2021-04-27T11:03:04.000Z
|
2021-05-24T18:22:57.000Z
|
openml_data_integration/protobuf_generator/openml_40671/myconstants.py
|
tuix/tutorials
|
733d35a8a39df079e8c2432c441b70785ab08440
|
[
"Apache-2.0"
] | 6
|
2020-07-06T08:23:25.000Z
|
2021-11-24T10:39:34.000Z
|
DATA_ID = 40671
| 8
| 15
| 0.75
| 3
| 16
| 3.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.384615
| 0.1875
| 16
| 1
| 16
| 16
| 0.461538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1d04c5991c808efad388c19d1bb81c39eba13b49
| 912
|
py
|
Python
|
tests/kyu_6_tests/test_group_repeating_fractions.py
|
the-zebulan/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | 40
|
2016-03-09T12:26:20.000Z
|
2022-03-23T08:44:51.000Z
|
tests/kyu_6_tests/test_group_repeating_fractions.py
|
akalynych/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | null | null | null |
tests/kyu_6_tests/test_group_repeating_fractions.py
|
akalynych/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | 36
|
2016-11-07T19:59:58.000Z
|
2022-03-31T11:18:27.000Z
|
import unittest
from katas.kyu_6.group_repeating_fractions import repeating_fractions
class RepeatingFractionsTestCase(unittest.TestCase):
def test_equals(self):
self.assertEqual(repeating_fractions(1, 1), '1.0')
def test_equals_2(self):
self.assertEqual(repeating_fractions(1, 2), '0.5')
def test_equals_3(self):
self.assertEqual(repeating_fractions(1, 3), '0.(3)')
def test_equals_4(self):
self.assertEqual(repeating_fractions(2, 888), '0.(0)(2)5(2)5(2)5(2)5')
def test_equals_5(self):
self.assertEqual(repeating_fractions(1554, 70), '22.2')
def test_equals_6(self):
self.assertEqual(repeating_fractions(11, 7), '1.57142857143')
def test_equals_7(self):
self.assertEqual(repeating_fractions(15, 7), '2.14285714286')
def test_equals_8(self):
self.assertEqual(repeating_fractions(32, 11), '2.90909090909')
| 30.4
| 78
| 0.697368
| 127
| 912
| 4.795276
| 0.275591
| 0.295567
| 0.170772
| 0.367816
| 0.504105
| 0.200328
| 0
| 0
| 0
| 0
| 0
| 0.117414
| 0.16886
| 912
| 29
| 79
| 31.448276
| 0.686016
| 0
| 0
| 0
| 0
| 0
| 0.082237
| 0.023026
| 0
| 0
| 0
| 0
| 0.421053
| 1
| 0.421053
| false
| 0
| 0.105263
| 0
| 0.578947
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
df418fc86a59dc8a2f3c17fa7869018ff819d626
| 121
|
py
|
Python
|
doe2022geothermalcc_app/urls.py
|
NicholasFry/DOE2022CollegiateCompetition
|
f182c00b036b88e5b20236bcaaedece689032151
|
[
"CC0-1.0"
] | null | null | null |
doe2022geothermalcc_app/urls.py
|
NicholasFry/DOE2022CollegiateCompetition
|
f182c00b036b88e5b20236bcaaedece689032151
|
[
"CC0-1.0"
] | null | null | null |
doe2022geothermalcc_app/urls.py
|
NicholasFry/DOE2022CollegiateCompetition
|
f182c00b036b88e5b20236bcaaedece689032151
|
[
"CC0-1.0"
] | null | null | null |
from django.urls import path
from django.views.generic.base import TemplateView
from .views import *
urlpatterns = [
]
| 15.125
| 50
| 0.77686
| 16
| 121
| 5.875
| 0.625
| 0.212766
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14876
| 121
| 7
| 51
| 17.285714
| 0.912621
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
df5234fe53792eef70b6b834af2bf7b9d43cdb56
| 4,142
|
py
|
Python
|
babySteps/Actions/Kickoff.py
|
kiyoshimoran/RLBot
|
007d551c07a8d4f213a3fbbfc107a9e68c368202
|
[
"MIT"
] | null | null | null |
babySteps/Actions/Kickoff.py
|
kiyoshimoran/RLBot
|
007d551c07a8d4f213a3fbbfc107a9e68c368202
|
[
"MIT"
] | null | null | null |
babySteps/Actions/Kickoff.py
|
kiyoshimoran/RLBot
|
007d551c07a8d4f213a3fbbfc107a9e68c368202
|
[
"MIT"
] | null | null | null |
from rlbot.agents.base_agent import BaseAgent, SimpleControllerState
from util.vec import Vec3
#from rlutilities.mechanics import WaveDash
from Actions.Action import Action
from Decisions.info import MyInfo
from util.sequence import Sequence, ControlStep
import math
class kickoff(Sequence):
def __init__(self, loc):
self.side = get_side(loc)
self.name = "kickoff"
# drive, diagonal flip, drive, front flip
if is_diagonal(loc):
print("Diagonal kickoff")
steps = [
ControlStep(duration=0.45, controls=SimpleControllerState(throttle=1, boost=True, steer=.25*self.side)),
ControlStep(duration=0.1, controls=SimpleControllerState(throttle=1, boost=True, jump=True)),
ControlStep(duration=0.1, controls=SimpleControllerState(throttle=1, jump=False, yaw=-self.side)),
ControlStep(duration=0.05, controls=SimpleControllerState(throttle=1, jump=True, yaw=-self.side, pitch=-1)),
ControlStep(duration=0.15, controls=SimpleControllerState(throttle=1, boost=True, yaw=0.75*self.side)),
ControlStep(duration=0.05, controls=SimpleControllerState(boost=True, yaw=-0.75*self.side, pitch=-1)),
ControlStep(duration=0.05, controls=SimpleControllerState(boost=True, steer=0.5*self.side)),
ControlStep(duration=0.05, controls=SimpleControllerState(jump=True, boost=True, steer=0, yaw=0)),
ControlStep(duration=0.05, controls=SimpleControllerState(jump=False)),
ControlStep(duration=0.1, controls=SimpleControllerState(jump=True, pitch=-1, yaw=0, steer=0)),
ControlStep(duration=0.2, controls=SimpleControllerState())
]
elif self.side != 0:
print("Long kickoff")
steps = [
ControlStep(duration=0.6, controls=SimpleControllerState(throttle=1, boost=True, steer=-0.2*self.side)),
ControlStep(duration=0.05, controls=SimpleControllerState(throttle=1, jump=True)),
ControlStep(duration=0.15, controls=SimpleControllerState(throttle=1, jump=False)),
ControlStep(duration=0.05, controls=SimpleControllerState(throttle=1, jump=True, yaw=0.7*self.side, pitch=-1)),
ControlStep(duration=0.1, controls=SimpleControllerState(throttle=1, pitch=-1, yaw=.2*self.side)),
ControlStep(duration=0.1, controls=SimpleControllerState(throttle=1, yaw=0, steer=.2*self.side)),
ControlStep(duration=0.05, controls=SimpleControllerState(jump=True)),
ControlStep(duration=0.05, controls=SimpleControllerState(jump=False)),
ControlStep(duration=0.05, controls=SimpleControllerState(jump=True, pitch=-1)),
ControlStep(duration=0.1, controls=SimpleControllerState())
]
else:
print("Straight kickoff")
steps = [
ControlStep(duration=0.7, controls=SimpleControllerState(throttle=1, boost=True, steer=-0.1*self.side)),
ControlStep(duration=0.05, controls=SimpleControllerState(throttle=1, jump=True)),
ControlStep(duration=0.15, controls=SimpleControllerState(throttle=1, jump=False)),
ControlStep(duration=0.05, controls=SimpleControllerState(throttle=1, jump=True, yaw=0.7*self.side, pitch=-1)),
ControlStep(duration=0.1, controls=SimpleControllerState(throttle=1, pitch=-1, yaw=.2*self.side)),
ControlStep(duration=0.2, controls=SimpleControllerState(throttle=1, yaw=0, steer=.2*self.side, boost=True)),
ControlStep(duration=0.05, controls=SimpleControllerState(jump=True)),
ControlStep(duration=0.05, controls=SimpleControllerState(jump=False)),
ControlStep(duration=0.05, controls=SimpleControllerState(jump=True, pitch=-1)),
ControlStep(duration=0.1, controls=SimpleControllerState())
]
super().__init__(steps)
'''dash = WaveDash(self.car)
while not dash.finished:
dash.step()'''
def is_diagonal(loc):
return abs(loc.y) < 2900
def get_side(loc):
if loc.x == 0:
return 0
return -loc.x / abs(loc.x)
| 60.028986
| 123
| 0.676726
| 481
| 4,142
| 5.800416
| 0.158004
| 0.211111
| 0.222222
| 0.231541
| 0.791398
| 0.754122
| 0.71362
| 0.677419
| 0.549462
| 0.549104
| 0
| 0.042725
| 0.191936
| 4,142
| 68
| 124
| 60.911765
| 0.790857
| 0.019797
| 0
| 0.333333
| 0
| 0
| 0.012846
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.05
| false
| 0
| 0.1
| 0.016667
| 0.216667
| 0.05
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
df6cf05f1887abf9c9337f549c2edfe15ea84526
| 325
|
py
|
Python
|
CLIP-ViL/src/lxrt/adapters/hypercomplex/inits.py
|
ylsung/VL_adapter
|
287409f383f89a11764fc45806864693a4d3e498
|
[
"MIT"
] | 41
|
2021-12-14T02:50:16.000Z
|
2022-03-30T07:41:19.000Z
|
CLIP-ViL/src/lxrt/adapters/hypercomplex/inits.py
|
ylsung/VL_adapter
|
287409f383f89a11764fc45806864693a4d3e498
|
[
"MIT"
] | 1
|
2022-01-07T03:31:47.000Z
|
2022-03-25T00:31:53.000Z
|
CLIP-ViL/src/lxrt/adapters/hypercomplex/inits.py
|
ylsung/VL_adapter
|
287409f383f89a11764fc45806864693a4d3e498
|
[
"MIT"
] | 2
|
2021-12-14T03:10:18.000Z
|
2022-03-29T04:59:23.000Z
|
# The codes are from https://github.com/bayer-science-for-a-better-life/phc-gnn
import torch
import math
def glorot_normal(tensor: torch.Tensor):
return torch.nn.init.xavier_normal_(tensor, gain=math.sqrt(2))
def glorot_uniform(tensor: torch.Tensor):
return torch.nn.init.xavier_uniform_(tensor, gain=math.sqrt(2))
| 32.5
| 79
| 0.769231
| 53
| 325
| 4.603774
| 0.566038
| 0.07377
| 0.139344
| 0.188525
| 0.483607
| 0.327869
| 0.327869
| 0.327869
| 0
| 0
| 0
| 0.006826
| 0.098462
| 325
| 10
| 80
| 32.5
| 0.825939
| 0.236923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 0
| 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
| 1
| 0
|
0
| 5
|
df7c0ef67ccd9f7435fde957c46dcdff14be2483
| 55
|
py
|
Python
|
src/networks/__init__.py
|
starsky2021/Watermark-Removal
|
7d9747dea3cea4a563b574cdca91169ea7cae77f
|
[
"MIT"
] | null | null | null |
src/networks/__init__.py
|
starsky2021/Watermark-Removal
|
7d9747dea3cea4a563b574cdca91169ea7cae77f
|
[
"MIT"
] | null | null | null |
src/networks/__init__.py
|
starsky2021/Watermark-Removal
|
7d9747dea3cea4a563b574cdca91169ea7cae77f
|
[
"MIT"
] | null | null | null |
from .segmentation import WMIDNet
from .gan import GAN
| 18.333333
| 33
| 0.818182
| 8
| 55
| 5.625
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145455
| 55
| 2
| 34
| 27.5
| 0.957447
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
df8f12572bb3e0fa0f0b0cb5297e3a6b24f29502
| 1,415
|
py
|
Python
|
Models/migrations/0027_auto_20190122_1311.py
|
whutinfo/web_develop
|
0be75ed314b6524b55f83aedc85450f6c17d25c3
|
[
"Unlicense"
] | null | null | null |
Models/migrations/0027_auto_20190122_1311.py
|
whutinfo/web_develop
|
0be75ed314b6524b55f83aedc85450f6c17d25c3
|
[
"Unlicense"
] | null | null | null |
Models/migrations/0027_auto_20190122_1311.py
|
whutinfo/web_develop
|
0be75ed314b6524b55f83aedc85450f6c17d25c3
|
[
"Unlicense"
] | null | null | null |
# Generated by Django 2.1.4 on 2019-01-22 13:11
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('Models', '0026_auto_20190122_1302'),
]
operations = [
migrations.RemoveField(
model_name='stockin',
name='cat',
),
migrations.RemoveField(
model_name='stockin',
name='goods',
),
migrations.RemoveField(
model_name='stockin',
name='manufactor',
),
migrations.RemoveField(
model_name='stockin',
name='performer',
),
migrations.RemoveField(
model_name='stockin',
name='seller',
),
migrations.RemoveField(
model_name='stockin',
name='supplier',
),
migrations.RemoveField(
model_name='stockout',
name='cat',
),
migrations.RemoveField(
model_name='stockout',
name='goods',
),
migrations.RemoveField(
model_name='stockout',
name='performer',
),
migrations.RemoveField(
model_name='stockout',
name='seller',
),
migrations.DeleteModel(
name='StockIn',
),
migrations.DeleteModel(
name='StockOut',
),
]
| 23.583333
| 47
| 0.493993
| 106
| 1,415
| 6.471698
| 0.349057
| 0.306122
| 0.379009
| 0.437318
| 0.653061
| 0.653061
| 0
| 0
| 0
| 0
| 0
| 0.036047
| 0.392226
| 1,415
| 59
| 48
| 23.983051
| 0.761628
| 0.031802
| 0
| 0.792453
| 1
| 0
| 0.133041
| 0.016813
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.018868
| 0
| 0.075472
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
10c58651fa7b081891cdbd21bc1d38ac0f074bcf
| 136
|
py
|
Python
|
ideas/python-proxy/pyproxy/platforms/win/os.py
|
Krozark/lab
|
2d7a371170d054bfceb5c92c5fffebcaadbd78b8
|
[
"BSD-2-Clause"
] | null | null | null |
ideas/python-proxy/pyproxy/platforms/win/os.py
|
Krozark/lab
|
2d7a371170d054bfceb5c92c5fffebcaadbd78b8
|
[
"BSD-2-Clause"
] | null | null | null |
ideas/python-proxy/pyproxy/platforms/win/os.py
|
Krozark/lab
|
2d7a371170d054bfceb5c92c5fffebcaadbd78b8
|
[
"BSD-2-Clause"
] | null | null | null |
from pyproxy.facades import Os
class WinOs(Os):
def _name_impl(self):
return "win"
def instance_class():
return WinOs
| 15.111111
| 30
| 0.676471
| 19
| 136
| 4.684211
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.235294
| 136
| 9
| 31
| 15.111111
| 0.855769
| 0
| 0
| 0
| 0
| 0
| 0.021898
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
10d576e59963a30bd40ce15308c5f903823ae852
| 37
|
py
|
Python
|
esmvaltool/diag_scripts/__init__.py
|
yifatdzigan/ESMValTool
|
83320b0e0b24ddde965599961bb80428e180a731
|
[
"Apache-2.0"
] | 148
|
2017-02-07T13:16:03.000Z
|
2022-03-26T02:21:56.000Z
|
esmvaltool/diag_scripts/__init__.py
|
yifatdzigan/ESMValTool
|
83320b0e0b24ddde965599961bb80428e180a731
|
[
"Apache-2.0"
] | 2,026
|
2017-02-03T12:57:13.000Z
|
2022-03-31T15:11:51.000Z
|
esmvaltool/diag_scripts/__init__.py
|
yifatdzigan/ESMValTool
|
83320b0e0b24ddde965599961bb80428e180a731
|
[
"Apache-2.0"
] | 113
|
2017-01-27T13:10:19.000Z
|
2022-02-03T13:42:11.000Z
|
"""ESMValTool diagnostic scripts."""
| 18.5
| 36
| 0.72973
| 3
| 37
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081081
| 37
| 1
| 37
| 37
| 0.794118
| 0.810811
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
33a4ea4433ff5bc3df9b7e0223e98f660e3ac234
| 33
|
py
|
Python
|
src/models/__init__.py
|
myuanz/HTTP-Forwarding
|
859f9b7cedfffd1eecc535822f34433ce0c1e4e0
|
[
"BSD-3-Clause"
] | null | null | null |
src/models/__init__.py
|
myuanz/HTTP-Forwarding
|
859f9b7cedfffd1eecc535822f34433ce0c1e4e0
|
[
"BSD-3-Clause"
] | null | null | null |
src/models/__init__.py
|
myuanz/HTTP-Forwarding
|
859f9b7cedfffd1eecc535822f34433ce0c1e4e0
|
[
"BSD-3-Clause"
] | null | null | null |
from .IRegister import IRegister
| 16.5
| 32
| 0.848485
| 4
| 33
| 7
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 33
| 1
| 33
| 33
| 0.965517
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
33c7fedd1cf8ce70000ca3b5c5147aec227a9912
| 127
|
py
|
Python
|
pysearpc/__init__.py
|
jjzhang166/libsearpc
|
0570df3f4a3c6ae4a5326722b34a9a9fda8cc8ea
|
[
"Apache-2.0"
] | null | null | null |
pysearpc/__init__.py
|
jjzhang166/libsearpc
|
0570df3f4a3c6ae4a5326722b34a9a9fda8cc8ea
|
[
"Apache-2.0"
] | null | null | null |
pysearpc/__init__.py
|
jjzhang166/libsearpc
|
0570df3f4a3c6ae4a5326722b34a9a9fda8cc8ea
|
[
"Apache-2.0"
] | null | null | null |
from common import SearpcError
from client import SearpcClient, searpc_func, SearpcObjEncoder
from server import searpc_server
| 31.75
| 62
| 0.874016
| 16
| 127
| 6.8125
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110236
| 127
| 3
| 63
| 42.333333
| 0.964602
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
33c84dbbc6531d704a4d21ec84291068fc244139
| 111
|
py
|
Python
|
src/modules/site/base/views/tools/__init__.py
|
AndersenLab/CAENDR
|
ce4cdb74db736db8226ffc90988959b71b0d5ff5
|
[
"MIT"
] | 3
|
2022-02-09T07:04:37.000Z
|
2022-03-11T02:46:35.000Z
|
src/modules/site/base/views/tools/__init__.py
|
AndersenLab/CAENDR
|
ce4cdb74db736db8226ffc90988959b71b0d5ff5
|
[
"MIT"
] | 4
|
2022-01-28T22:28:08.000Z
|
2022-02-11T21:47:15.000Z
|
src/modules/site/base/views/tools/__init__.py
|
AndersenLab/CAENDR
|
ce4cdb74db736db8226ffc90988959b71b0d5ff5
|
[
"MIT"
] | 1
|
2022-01-11T03:39:02.000Z
|
2022-01-11T03:39:02.000Z
|
from .tools import tools_bp
from .indel_primer import indel_primer_bp
from .heritability import heritability_bp
| 37
| 41
| 0.873874
| 17
| 111
| 5.411765
| 0.411765
| 0.130435
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.099099
| 111
| 3
| 42
| 37
| 0.92
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
33c9090a562b071c64be773d20f5c9dd01f88f95
| 112
|
py
|
Python
|
src/utils.py
|
adrianogil/nanogenmo17
|
25c32adbc0cd002e683b59cc542d8e182386b06a
|
[
"MIT"
] | null | null | null |
src/utils.py
|
adrianogil/nanogenmo17
|
25c32adbc0cd002e683b59cc542d8e182386b06a
|
[
"MIT"
] | null | null | null |
src/utils.py
|
adrianogil/nanogenmo17
|
25c32adbc0cd002e683b59cc542d8e182386b06a
|
[
"MIT"
] | null | null | null |
from random import randint
def get_random(l):
'''
list l
'''
return l[randint(0, len(l)-1)]
| 16
| 34
| 0.553571
| 17
| 112
| 3.588235
| 0.705882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025316
| 0.294643
| 112
| 7
| 34
| 16
| 0.746835
| 0.053571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
33cbebfe0288f193a957b142dbbdce898f12b619
| 78
|
py
|
Python
|
pyvims/geotiff/__init__.py
|
pedrohasselmann/pyvims
|
6512baea34088bf2bffc9d883eedcc985ca600dd
|
[
"MIT"
] | null | null | null |
pyvims/geotiff/__init__.py
|
pedrohasselmann/pyvims
|
6512baea34088bf2bffc9d883eedcc985ca600dd
|
[
"MIT"
] | null | null | null |
pyvims/geotiff/__init__.py
|
pedrohasselmann/pyvims
|
6512baea34088bf2bffc9d883eedcc985ca600dd
|
[
"MIT"
] | null | null | null |
from .geotiff import GeoTiff
from .envi import ENVI
from .arcmap import ArcMap
| 26
| 28
| 0.820513
| 12
| 78
| 5.333333
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141026
| 78
| 3
| 29
| 26
| 0.955224
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
33efc06edadfd2ea35d8ee0f54d3192ce904b451
| 14,162
|
py
|
Python
|
discovery-infra/tests/test_cancel_and_reset.py
|
osherdp/assisted-test-infra
|
d320b5d76e12a4824c910e405316668fd5d93327
|
[
"Apache-2.0"
] | null | null | null |
discovery-infra/tests/test_cancel_and_reset.py
|
osherdp/assisted-test-infra
|
d320b5d76e12a4824c910e405316668fd5d93327
|
[
"Apache-2.0"
] | 124
|
2020-11-09T06:44:26.000Z
|
2022-03-28T08:04:02.000Z
|
discovery-infra/tests/test_cancel_and_reset.py
|
osherdp/assisted-test-infra
|
d320b5d76e12a4824c910e405316668fd5d93327
|
[
"Apache-2.0"
] | null | null | null |
import logging
import pytest
from netaddr import IPNetwork
from test_infra import consts
from tests.base_test import BaseTest
from tests.conftest import env_variables
from assisted_service_client.rest import ApiException
logger = logging.getLogger(__name__)
DUMMY_SSH_KEY = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj+lurtXW2WxojtNXSxEWWTmkm1VLzAj/" \
"9Mhz4W1jCPkiLBrelT+DeuCzFHhTW01GJ8o5qCl2hG1R1SUrICmry6CsCnZErdotJLw1eDY" \
"TuBvGSNoZGxeRAgu7XsgJLQcxVRx1a9AmI9nwu/tPXKm6Rsg9uY65DabcL/uXXqfyfiOjXX" \
"i/fbkVhPfNTxKL5yH5ulqa4HOdpg/hKHOQSVg1/BeU5reAB0LWiKURPofkkR3vNuI+Vf2Ew" \
"IX7n2upNmP6BdUHmKFkM4k4yXcSFSKbMkMDb2plZPi48ctagrGPI/N0m3nyEvdw3HA358IZ" \
"ssMM2gE7AYdBgVL/QEAILFBdvDKGCNNYX+EQ3umr5CkJXPZFbFVMDLvp2wOwCw5ysWjj33m" \
"d0Nb7u4/7cpvXnVmrskiqCjkxAsUWh+D4vvASYAsxl5OFhhst6EQG3C07EHGE6FHXCfP54b" \
"z6RyQIUSSUeHGFH9PeE0t8nuNVvfp4V7X0SoJbP+jYfcyo5OYtQbXs= root@test." \
"ocp-cluster.lab.eng.tlv2.redhat.com.com"
class TestCancelReset(BaseTest):
@pytest.mark.sanity
def test_cancel_reset_before_node_boot(self, api_client, nodes, cluster):
# Define new cluster
new_cluster = cluster()
new_cluster.prepare_for_install(nodes=nodes)
# Start cluster install
new_cluster.start_install()
# Cancel cluster install once cluster installation start
new_cluster.cancel_install()
assert new_cluster.is_in_cancelled_status()
# Reset cluster install
new_cluster.reset_install()
assert new_cluster.is_in_insufficient_status()
# Reboot required nodes into ISO
new_cluster.reboot_required_nodes_into_iso_after_reset(nodes=nodes)
# Wait for hosts to be rediscovered
new_cluster.wait_until_hosts_are_discovered()
new_cluster.wait_for_ready_to_install()
# Install Cluster
new_cluster.start_install()
# wait until all nodes are in Installed status, will fail in case one host in error
new_cluster.wait_for_hosts_to_install()
new_cluster.wait_for_install()
@pytest.mark.regression
def test_cancel_reset_after_node_boot(self, api_client, nodes, cluster):
new_cluster = cluster()
new_cluster.prepare_for_install(nodes=nodes)
new_cluster.start_install()
# Cancel cluster install once at least one host booted
new_cluster.wait_for_at_least_one_host_to_boot_during_install()
new_cluster.cancel_install()
assert new_cluster.is_in_cancelled_status()
# Reset cluster install
new_cluster.reset_install()
assert new_cluster.is_in_insufficient_status()
# Reboot required nodes into ISO
new_cluster.reboot_required_nodes_into_iso_after_reset(nodes=nodes)
# Wait for hosts to be rediscovered
new_cluster.wait_until_hosts_are_discovered()
new_cluster.wait_for_ready_to_install()
# Install Cluster
new_cluster.start_install()
new_cluster.wait_for_hosts_to_install()
new_cluster.wait_for_install()
@pytest.mark.regression
def test_cancel_reset_one_node_unavailable(self, api_client, nodes, cluster):
new_cluster = cluster()
new_cluster.prepare_for_install(nodes=nodes)
new_cluster.start_install()
# Cancel cluster install once cluster installation start
new_cluster.wait_for_installing_in_progress(nodes_count=2)
new_cluster.cancel_install()
assert new_cluster.is_in_cancelled_status()
# Shutdown one node
node = nodes.get_random_node()
node.shutdown()
# Reset cluster install
new_cluster.reset_install()
assert new_cluster.is_in_insufficient_status()
# Reboot required nodes into ISO
new_cluster.reboot_required_nodes_into_iso_after_reset(nodes=nodes)
# Wait for hosts to be rediscovered
new_cluster.wait_until_hosts_are_discovered()
new_cluster.wait_for_ready_to_install()
# Install Cluster
new_cluster.start_install()
new_cluster.wait_for_hosts_to_install()
new_cluster.wait_for_install()
@pytest.mark.regression
def test_cancel_reset_while_disable_workers(self, api_client, nodes, cluster):
new_cluster = cluster()
new_cluster.prepare_for_install(nodes=nodes)
new_cluster.disable_worker_hosts()
new_cluster.start_install()
# Cancel cluster install once cluster installation start
new_cluster.wait_for_installing_in_progress(nodes_count=2)
new_cluster.cancel_install()
assert new_cluster.is_in_cancelled_status()
# Reset cluster install
new_cluster.reset_install()
assert new_cluster.is_in_insufficient_status()
# Reboot required nodes into ISO
new_cluster.reboot_required_nodes_into_iso_after_reset(nodes=nodes)
# Wait for hosts to be rediscovered
new_cluster.wait_until_hosts_are_discovered(nodes_count=env_variables['num_masters'])
new_cluster.wait_for_ready_to_install()
# Install Cluster
new_cluster.start_install()
new_cluster.wait_for_hosts_to_install(nodes_count=env_variables['num_masters'])
new_cluster.wait_for_install()
@pytest.mark.regression
def test_reset_cluster_while_at_least_one_node_finished_installation(self,
api_client,
nodes,
cluster):
new_cluster = cluster()
logger.debug(f'Cluster ID for '
f'test_reset_cluster_while_at_least_one_node_finished_installation is '
f'{new_cluster.id}')
new_cluster.prepare_for_install(nodes=nodes)
new_cluster.start_install()
new_cluster.wait_for_hosts_to_install(nodes_count=1)
new_cluster.cancel_install()
assert new_cluster.is_in_cancelled_status(), \
f'cluster {new_cluster.id} failed to cancel after at least one ' \
f'host has finished installation'
new_cluster.reset_install()
assert new_cluster.is_in_insufficient_status(), \
f'cluster {new_cluster.id} failed to reset from canceled state'
new_cluster.reboot_required_nodes_into_iso_after_reset(nodes=nodes)
new_cluster.wait_until_hosts_are_discovered()
new_cluster.wait_for_ready_to_install()
new_cluster.start_install()
new_cluster.wait_for_hosts_to_install()
new_cluster.wait_for_install()
@pytest.mark.regression
@pytest.mark.skip
def test_cluster_install_and_reset_10_times(self,
api_client,
nodes,
cluster):
new_cluster = cluster()
logger.debug(f'Cluster ID for test_cluster_install_and_reset_10_times is'
f' {new_cluster.id}')
new_cluster.prepare_for_install(nodes=nodes)
for i in range(10):
logger.debug(f'test_cluster_install_and_reset_10_times attempt number: {i + 1}')
new_cluster.start_install()
new_cluster.wait_for_write_image_to_disk(nodes_count=2)
new_cluster.cancel_install()
assert new_cluster.is_in_cancelled_status(), \
f'cluster {new_cluster.id} failed to cancel after on attempt ' \
f'number: {i}'
new_cluster.reset_install()
assert new_cluster.is_in_insufficient_status(), \
f'cluster {new_cluster.id} failed to reset from on attempt ' \
f'number: {i}'
new_cluster.reboot_required_nodes_into_iso_after_reset(
nodes=nodes)
new_cluster.wait_until_hosts_are_discovered()
new_cluster.wait_for_ready_to_install()
new_cluster.start_install()
new_cluster.wait_for_hosts_to_install()
new_cluster.wait_for_install()
@pytest.mark.regression
def test_reset_cluster_after_successful_installation(
self,
api_client,
nodes,
cluster):
new_cluster = cluster()
logger.debug(f'Cluster ID for '
f'test_reset_cluster_while_at_least_one_node_finished_installation is'
f' {new_cluster.id}')
new_cluster.prepare_for_install(nodes)
new_cluster.start_install()
new_cluster.wait_for_hosts_to_install()
new_cluster.wait_for_install()
with pytest.raises(ApiException):
# TODO: catch the specific error code
new_cluster.cancel_install()
with pytest.raises(ApiException):
# TODO: catch the specific error code
new_cluster.reset_install()
@pytest.mark.regression
def test_reset_cluster_after_changing_cluster_configuration(
self,
api_client,
nodes,
cluster):
new_cluster = cluster()
logger.debug(
'Cluster ID for '
'test_reset_cluster_after_changing_cluster_configuration is %s',
new_cluster.id
)
new_cluster.prepare_for_install(nodes=nodes)
new_cluster.start_install()
new_cluster.wait_for_hosts_to_install(nodes_count=1)
new_cluster.cancel_install()
assert new_cluster.is_in_cancelled_status(), \
f'cluster {new_cluster.id} failed to cancel'
new_cluster.reset_install()
assert new_cluster.is_in_insufficient_status(), \
f'cluster {new_cluster.id} failed to reset from canceled state'
vips = nodes.controller.get_ingress_and_api_vips()
api_vip = IPNetwork(vips['api_vip'])
api_vip += 1
ingress_vip = IPNetwork(vips['ingress_vip'])
ingress_vip += 1
api_vip = str(api_vip).split("/")[0]
ingress_vip = str(ingress_vip).split("/")[0]
new_cluster.set_ingress_and_api_vips({
'api_vip': api_vip,
'ingress_vip': ingress_vip})
new_cluster.set_ssh_key({'ssh_public_key': DUMMY_SSH_KEY})
new_cluster.reboot_required_nodes_into_iso_after_reset(
nodes)
new_cluster.wait_until_hosts_are_discovered()
new_cluster.wait_for_ready_to_install()
new_cluster.start_install()
new_cluster.wait_for_hosts_to_install()
new_cluster.wait_for_install()
@pytest.mark.regression
def test_cancel_reset_after_installation_failure(self, api_client, nodes, cluster):
# Define new cluster
new_cluster = cluster()
new_cluster.prepare_for_install(nodes=nodes)
# Start cluster install
new_cluster.start_install()
new_cluster.wait_for_installing_in_progress(nodes_count=env_variables['num_nodes'])
# Kill bootstrap installer to simulate cluster error
b_node_name = new_cluster.get_bootstrap_hostname()
bootstrap = nodes.get_bootstrap_node(cluster=new_cluster)
bootstrap.kill_podman_container_by_name("assisted-installer")
# Wait for cluster state Error
new_cluster.wait_for_cluster_in_error_status()
# Reset cluster install
new_cluster.reset_install()
assert new_cluster.is_in_insufficient_status()
# Reboot required nodes into ISO
new_cluster.reboot_required_nodes_into_iso_after_reset(nodes=nodes)
# Wait for hosts to be rediscovered
new_cluster.wait_until_hosts_are_discovered()
new_cluster.wait_for_ready_to_install()
# Install Cluster
new_cluster.start_install()
# wait until all nodes are in Installed status, will fail in case one host in error
new_cluster.wait_for_hosts_to_install()
new_cluster.wait_for_install()
@pytest.mark.regression
def test_cancel_reset_after_installation_failure_and_wrong_boot(self,
api_client,
nodes,
cluster):
# Define new cluster
new_cluster = cluster()
# Change boot order to a master node
selected_master = nodes.get_masters()[0]
nodes.set_wrong_boot_order(selected_master)
# Start cluster install
new_cluster.prepare_for_install(nodes=nodes)
new_cluster.start_install()
new_cluster.wait_for_installing_in_progress(nodes_count=env_variables['num_nodes'])
# Kill worker installer to simulate host error
worker_host = new_cluster.get_hosts_by_role(consts.NodeRoles.WORKER)[0]
selected_worker_node = nodes.get_node_from_cluster_host(worker_host)
selected_worker_node.kill_podman_container_by_name("assisted-installer")
# Wait for node Error
new_cluster.wait_for_host_status([consts.NodesStatus.ERROR])
# Wait for wong boot order
new_cluster.wait_for_one_host_to_be_in_wrong_boot_order(fall_on_error_status=False)
# Cancel cluster install once cluster installation start
new_cluster.cancel_install()
assert new_cluster.is_in_cancelled_status()
# Reset cluster install
new_cluster.reset_install()
assert new_cluster.is_in_insufficient_status()
# Fix boot order and reboot required nodes into ISO
selected_master.set_boot_order(cd_first=False)
new_cluster.reboot_required_nodes_into_iso_after_reset(nodes=nodes)
# Wait for hosts to be rediscovered
new_cluster.wait_until_hosts_are_discovered()
new_cluster.wait_for_ready_to_install()
# Install Cluster
new_cluster.start_install()
# wait until all nodes are in Installed status, will fail in case one host in error
new_cluster.wait_for_hosts_to_install()
new_cluster.wait_for_install()
| 46.130293
| 93
| 0.675117
| 1,677
| 14,162
| 5.281455
| 0.113298
| 0.171616
| 0.077453
| 0.076775
| 0.775206
| 0.762674
| 0.75748
| 0.732415
| 0.728012
| 0.710624
| 0
| 0.009276
| 0.261616
| 14,162
| 306
| 94
| 46.281046
| 0.837716
| 0.111072
| 0
| 0.683333
| 0
| 0
| 0.12208
| 0.067299
| 0
| 0
| 0
| 0.003268
| 0.070833
| 1
| 0.041667
| false
| 0
| 0.029167
| 0
| 0.075
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1d213b1dbfcb2429a9ff1493533b9d7edf7d884f
| 325
|
py
|
Python
|
objectives/conditions/character.py
|
HansGR/WorldsCollide
|
af227be553e120ee004b130598360c61daf7df59
|
[
"MIT"
] | 7
|
2022-01-15T02:53:53.000Z
|
2022-02-17T00:51:32.000Z
|
objectives/conditions/character.py
|
HansGR/WorldsCollide
|
af227be553e120ee004b130598360c61daf7df59
|
[
"MIT"
] | 8
|
2022-01-16T02:45:24.000Z
|
2022-03-21T02:08:27.000Z
|
objectives/conditions/character.py
|
HansGR/WorldsCollide
|
af227be553e120ee004b130598360c61daf7df59
|
[
"MIT"
] | 5
|
2022-01-15T02:53:38.000Z
|
2022-01-19T17:42:10.000Z
|
from objectives.conditions._objective_condition import *
class Condition(ObjectiveCondition):
NAME = "Character"
def __init__(self, character):
self.character = character
super().__init__(ConditionType.Character, self.character)
def __str__(self):
return super().__str__(self.character)
| 29.545455
| 65
| 0.72
| 32
| 325
| 6.75
| 0.53125
| 0.240741
| 0.203704
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181538
| 325
| 10
| 66
| 32.5
| 0.81203
| 0
| 0
| 0
| 0
| 0
| 0.027692
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.125
| 0.125
| 0.75
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
1d84391f2553be1f4e18d3d25aac8fcd3075e1f5
| 1,434
|
py
|
Python
|
watpi/apps/rover/rover.py
|
WatPi/WatPi
|
60c77e12b2a28c3cc5cef894fae3b9089322db23
|
[
"MIT"
] | 1
|
2021-01-02T23:48:19.000Z
|
2021-01-02T23:48:19.000Z
|
watpi/apps/rover/rover.py
|
WatPi/WatPi
|
60c77e12b2a28c3cc5cef894fae3b9089322db23
|
[
"MIT"
] | 47
|
2017-10-07T00:56:04.000Z
|
2017-12-10T11:03:58.000Z
|
watpi/apps/rover/rover.py
|
WatPi/WatPi
|
60c77e12b2a28c3cc5cef894fae3b9089322db23
|
[
"MIT"
] | 2
|
2017-10-09T03:56:02.000Z
|
2017-10-16T01:24:14.000Z
|
# import time
# import atexit
# from Adafruit_MotorHAT import Adafruit_MotorHAT
# mh = Adafruit_MotorHAT(addr=0x60)
# # recommended for auto-disabling motors on shutdown!
# def turnOffMotors():
# mh.getMotor(3).run(Adafruit_MotorHAT.RELEASE)
# mh.getMotor(4).run(Adafruit_MotorHAT.RELEASE)
# atexit.register(turnOffMotors)
# #################################
# leftMotor = mh.getMotor(3)
# rightMotor = mh.getMotor(4)
# # set the speed to start, from 0 (off) to 255 (max speed)
# leftMotor.setSpeed(150)
# leftMotor.run(Adafruit_MotorHAT.FORWARD)
# rightMotor.setSpeed(150)
# rightMotor.run(Adafruit_MotorHAT.FORWARD)
# # turn on motor
# leftMotor.run(Adafruit_MotorHAT.RELEASE)
# rightMotor.run(Adafruit_MotorHAT.RELEASE)
# def move_rover(direction):
# if direction == 'forward':
# leftMotor.run(Adafruit_MotorHAT.FORWARD)
# rightMotor.run(Adafruit_MotorHAT.FORWARD)
# elif direction == 'backward':
# leftMotor.run(Adafruit_MotorHAT.BACKWARD)
# rightMotor.run(Adafruit_MotorHAT.BACKWARD)
# elif direction == 'left':
# leftMotor.run(Adafruit_MotorHAT.RELEASE)
# rightMotor.run(Adafruit_MotorHAT.FORWARD)
# elif direction == 'right':
# leftMotor.run(Adafruit_MotorHAT.FORWARD)
# rightMotor.run(Adafruit_MotorHAT.RELEASE)
# def stop_rover():
# leftMotor.run(Adafruit_MotorHAT.RELEASE)
# rightMotor.run(Adafruit_MotorHAT.RELEASE)
| 29.875
| 59
| 0.703626
| 159
| 1,434
| 6.213836
| 0.308176
| 0.307692
| 0.307692
| 0.210526
| 0.473684
| 0.437247
| 0.378543
| 0.338057
| 0.338057
| 0.143725
| 0
| 0.014073
| 0.157601
| 1,434
| 47
| 60
| 30.510638
| 0.803808
| 0.916318
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1d993fe13445c5c46a622e9260f0b7457a89f204
| 68
|
py
|
Python
|
dac/envs/__init__.py
|
automl/DAC
|
cab5f195d168e90b36a769d13734dee947775954
|
[
"Apache-2.0"
] | 17
|
2020-02-10T18:30:07.000Z
|
2022-02-19T07:17:14.000Z
|
dac/envs/__init__.py
|
automl/DAC
|
cab5f195d168e90b36a769d13734dee947775954
|
[
"Apache-2.0"
] | null | null | null |
dac/envs/__init__.py
|
automl/DAC
|
cab5f195d168e90b36a769d13734dee947775954
|
[
"Apache-2.0"
] | 4
|
2020-03-25T06:07:52.000Z
|
2021-04-08T15:19:08.000Z
|
from dac.envs.toy_env import SigmoidMultiActMultiValAction, LubyTime
| 68
| 68
| 0.897059
| 8
| 68
| 7.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 68
| 1
| 68
| 68
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d5244257008bcee90392067de6366725ec939e07
| 51
|
py
|
Python
|
jogoteca/models/__init__.py
|
LucasBiason/FlaskStudies
|
a594846f6eaa1655267f84da73764716e22f719b
|
[
"MIT"
] | null | null | null |
jogoteca/models/__init__.py
|
LucasBiason/FlaskStudies
|
a594846f6eaa1655267f84da73764716e22f719b
|
[
"MIT"
] | null | null | null |
jogoteca/models/__init__.py
|
LucasBiason/FlaskStudies
|
a594846f6eaa1655267f84da73764716e22f719b
|
[
"MIT"
] | null | null | null |
from .jogo import Jogo
from .usuario import Usuario
| 25.5
| 28
| 0.823529
| 8
| 51
| 5.25
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 51
| 2
| 28
| 25.5
| 0.954545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d531bdec3fe76c1967d11d66b19ba791a3419dc3
| 95
|
py
|
Python
|
lcd/losses/__init__.py
|
pfe-everis/lcd
|
25f3fe7dc7e0c8ba02fb380dbcbe7752747b3fb5
|
[
"BSD-3-Clause"
] | 76
|
2019-11-22T04:28:37.000Z
|
2022-03-31T12:48:04.000Z
|
lcd/losses/__init__.py
|
pfe-everis/lcd
|
25f3fe7dc7e0c8ba02fb380dbcbe7752747b3fb5
|
[
"BSD-3-Clause"
] | 10
|
2019-12-23T02:28:24.000Z
|
2022-03-18T08:08:16.000Z
|
lcd/losses/__init__.py
|
pfe-everis/lcd
|
25f3fe7dc7e0c8ba02fb380dbcbe7752747b3fb5
|
[
"BSD-3-Clause"
] | 7
|
2019-11-23T08:21:52.000Z
|
2021-12-29T14:40:57.000Z
|
from .mse import MSELoss
from .triplet import HardTripletLoss
from .chamfer import ChamferLoss
| 23.75
| 36
| 0.842105
| 12
| 95
| 6.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126316
| 95
| 3
| 37
| 31.666667
| 0.963855
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d563fb1b417b277d0e217ade30b57c24db15632e
| 464
|
py
|
Python
|
src/backend/app/crud/contact_info.py
|
douglasdaly/dougliz-wedding
|
da673baf3a7387c3818960c0ffa12ab7c830a89b
|
[
"MIT"
] | 5
|
2020-02-02T02:39:23.000Z
|
2021-08-17T15:50:57.000Z
|
src/backend/app/crud/contact_info.py
|
douglasdaly/dougliz-wedding
|
da673baf3a7387c3818960c0ffa12ab7c830a89b
|
[
"MIT"
] | 4
|
2021-03-31T19:39:57.000Z
|
2022-01-22T09:29:10.000Z
|
src/backend/app/crud/contact_info.py
|
douglasdaly/dougliz-wedding
|
da673baf3a7387c3818960c0ffa12ab7c830a89b
|
[
"MIT"
] | 1
|
2020-04-12T17:11:43.000Z
|
2020-04-12T17:11:43.000Z
|
# -*- coding: utf-8 -*-
"""
ContactInfo object storage repository.
"""
from abc import ABCMeta
from app.crud.base import Repository
from app.crud.base import T
from app.models.contact_info import ContactInfoCreate
from app.models.contact_info import ContactInfoUpdate
class ContactInfoRepository(
Repository[T, ContactInfoCreate, ContactInfoUpdate],
metaclass=ABCMeta
):
"""
Abstract base ContactInfo object storage repository.
"""
pass
| 22.095238
| 56
| 0.75431
| 52
| 464
| 6.692308
| 0.480769
| 0.08046
| 0.137931
| 0.195402
| 0.293103
| 0.172414
| 0
| 0
| 0
| 0
| 0
| 0.002564
| 0.159483
| 464
| 20
| 57
| 23.2
| 0.889744
| 0.24569
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.1
| 0.5
| 0
| 0.6
| 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
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
d56e5a51def6e2e4cb01179fec13d23014a89923
| 53
|
py
|
Python
|
socialjusticebingo/settings.py
|
jessamynsmith/socialjusticebingo
|
91ea2cae4250db7f6023cde04ae4848aec59449c
|
[
"MIT"
] | null | null | null |
socialjusticebingo/settings.py
|
jessamynsmith/socialjusticebingo
|
91ea2cae4250db7f6023cde04ae4848aec59449c
|
[
"MIT"
] | 3
|
2020-06-05T18:41:44.000Z
|
2021-06-10T20:38:30.000Z
|
socialjusticebingo/settings.py
|
jessamynsmith/socialjusticebingo
|
91ea2cae4250db7f6023cde04ae4848aec59449c
|
[
"MIT"
] | null | null | null |
from socialjusticebingo.settings.production import *
| 26.5
| 52
| 0.867925
| 5
| 53
| 9.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075472
| 53
| 1
| 53
| 53
| 0.938776
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d57f077f917a85ea306e0522274467dde6736aca
| 420
|
py
|
Python
|
sensors/stereo/stereo_camera_calibrate/printImgListLeft.py
|
titanomachy/flight
|
6de4e0b44a963cc016adc6d6ddaab5b24a31fe03
|
[
"BSD-3-Clause"
] | 1,040
|
2015-02-11T07:55:00.000Z
|
2022-03-08T16:16:12.000Z
|
sensors/stereo/stereo_camera_calibrate/printImgListLeft.py
|
qiuwenhui/flight
|
435a74da51e25a0f2654d46a83afff6f315436dd
|
[
"BSD-3-Clause"
] | 9
|
2015-11-04T16:33:19.000Z
|
2020-01-02T11:38:55.000Z
|
sensors/stereo/stereo_camera_calibrate/printImgListLeft.py
|
qiuwenhui/flight
|
435a74da51e25a0f2654d46a83afff6f315436dd
|
[
"BSD-3-Clause"
] | 317
|
2015-03-28T02:54:59.000Z
|
2022-03-08T16:16:13.000Z
|
#for i in range(500,2000,20):
#for i in [600, 620, 640, 660, 680, 700, 760, 780, 800, 820, 840, 860, 880, 1040, 1060, 1080, 1120, 1100, 1160, 1180, 1260, 1280, 1300, 1320, 1340, 1360, 1380, 1400, 1420, 1440, 1540, 1560, 1580, 1600, 1720, 1800, 1820, 1840, 1860, 1880, 1900, 1940, 1960, 1980]:
import sys
for i in range(1,int(sys.argv[1]) + 1):
print "img/cam1-%05d.ppm" % i
# print "img/cam2-%05d.ppm" % i
| 42
| 262
| 0.619048
| 78
| 420
| 3.333333
| 0.794872
| 0.046154
| 0.069231
| 0.084615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.535503
| 0.195238
| 420
| 9
| 263
| 46.666667
| 0.233728
| 0.766667
| 0
| 0
| 0
| 0
| 0.178947
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.333333
| null | null | 0.333333
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
6363bfeaf595af822fbb1364dab2b82ea03afe93
| 4,593
|
py
|
Python
|
tools/NeoPredPipe/predict_binding.py
|
Xiaohuaniu0032/NeoPred
|
feb628359f4545f1ecbc2eb1797e2cf25c9b80cf
|
[
"MIT"
] | 1
|
2021-02-04T01:29:57.000Z
|
2021-02-04T01:29:57.000Z
|
tools/NeoPredPipe/predict_binding.py
|
Xiaohuaniu0032/NeoPred
|
feb628359f4545f1ecbc2eb1797e2cf25c9b80cf
|
[
"MIT"
] | null | null | null |
tools/NeoPredPipe/predict_binding.py
|
Xiaohuaniu0032/NeoPred
|
feb628359f4545f1ecbc2eb1797e2cf25c9b80cf
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
'''
@author: Ryan Schenck, ryan.schenck@univ.ox.ac.uk
Contributions from: Eszter Lakatos
'''
import sys
import os
import subprocess
def predict_neoantigens(FilePath, patName, inFile, hlasnormed, epitopeLens, netMHCpan, Options):
'''
Strips out all WILDTYPE and IMMEDIATE-STOPGAIN from fasta file.
:param FilePath: Primary path of working directory
:param patName: ID associated with a patient
:param inFile: Fasta file with reformatted coding changes.
:param hlas: HLA types for the patient.
:param epitopeLens: List of epitope lengths to predict
:param netMHCpan: Dictionary housing netMHCpan specific script locations and data. See README.md.
:param ELpred: Logical for EL (true) or BA (false) predictions
:return: netMHCpan predictions for each file.
'''
print("INFO: Predicting neoantigens for %s" % (patName))
# Verify that the fasta file has information in it to avoid any errors thrown from netMHCpan
checks = dict.fromkeys(inFile.keys())
for n in inFile:
cmd = "wc -l %s" % (inFile[n])
pipe = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout
k = int(pipe.read().decode("utf-8").lstrip(" ").split(" ")[0])
checks[n]=k
#print("n is ...")
#print(n)
#print("k value is...")
#print(k)
epcalls = []
for n in inFile:
if checks[n] > 0:
output_file = FilePath+'tmp/%s.epitopes.%s.txt' % (patName, n)
epcalls.append(output_file)
with open(output_file, 'a') as epitope_pred:
print("INFO: Running Epitope Predictions for %s on epitopes of length %s"%(patName,n))
if Options.ELpred:
cmd = [netMHCpan['netmhcpan'], '-l', str(n).split('.')[0], '-a', ','.join(hlasnormed), '-f', inFile[n]]
elif Options.typeII:
cmd = [netMHCpan['netmhcpan'], '-length', str(n).split('.')[0], '-a', ','.join(hlasnormed), '-f', inFile[n]]
else:
cmd = [netMHCpan['netmhcpan'], '-BA', '-l', str(n).split('.')[0], '-a', ','.join(hlasnormed), '-f', inFile[n]]
netMHC_run = subprocess.Popen(cmd, stdout=epitope_pred, stderr=epitope_pred)
netMHC_run.wait()
else:
print("INFO: Skipping Sample! No peptides to predict for %s" % (patName))
print("INFO: Predictions complete for %s on epitopes of length %s" % (patName, n))
return(epcalls)
def predict_neoantigensWT(FilePath, patName, inFile, hlasnormed, epitopeLens, netMHCpan):
'''
Strips out all WILDTYPE and IMMEDIATE-STOPGAIN from fasta file.
:param FilePath: Primary path of working directory
:param patName: ID associated with a patient
:param inFile: Fasta file with reformatted coding changes.
:param hlas: HLA types for the patient.
:param epitopeLens: List of epitope lengths to predict
:param netMHCpan: Dictionary housing netMHCpan specific script locations and data. See README.md.
:return: netMHCpan predictions for each file.
'''
# Verify that the fasta file has information in it to avoid any errors thrown from netMHCpan
checks = dict.fromkeys(inFile.keys())
for n in inFile:
cmd = "wc -l %s" % (inFile[n])
pipe = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout
k = int(pipe.read().decode("utf-8").lstrip(" ").split(" ")[0])
checks[n]=k
epcalls = []
for n in epitopeLens:
if checks[n] > 0:
output_file = '%s%s.wildtype.epitopes.%s.txt' % (FilePath, patName, n)
epcalls.append(output_file)
if os.path.isfile(output_file)==False:
print("INFO: Predicting neoantigens for %s" % (patName))
with open(output_file, 'a') as epitope_pred:
print("INFO: Running Epitope Predictions for %s on epitopes of length %s"%(patName,n))
cmd = [netMHCpan['netmhcpan'], '-BA', '-l', str(n), '-a', ','.join(hlasnormed), '-f', inFile[n]]
netMHC_run = subprocess.Popen(cmd, stdout=epitope_pred, stderr=epitope_pred)
netMHC_run.wait()
print("INFO: Predictions complete for %s on epitopes of length %s" % (patName, n))
else:
print("INFO: Neoantigen predictions already complete for %s epitopes of length %s" % (patName, n))
else:
print("INFO: Skipping Sample! No peptides to predict for %s" % (patName))
return(epcalls)
| 43.330189
| 130
| 0.612889
| 575
| 4,593
| 4.862609
| 0.25913
| 0.02897
| 0.028612
| 0.030401
| 0.822604
| 0.812947
| 0.713519
| 0.665951
| 0.665951
| 0.652361
| 0
| 0.002643
| 0.258654
| 4,593
| 105
| 131
| 43.742857
| 0.818502
| 0.288047
| 0
| 0.709091
| 0
| 0
| 0.206886
| 0.016109
| 0
| 0
| 0
| 0
| 0
| 1
| 0.036364
| false
| 0
| 0.054545
| 0
| 0.090909
| 0.163636
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
636e7476fdc6850dbd0201bc765dec10de33314c
| 112
|
py
|
Python
|
Back/ecoreleve_server/core/configuration_model/__init__.py
|
NaturalSolutions/ecoReleve-Data
|
535a6165984544902563eca7cb10d07f1686c963
|
[
"MIT"
] | 15
|
2015-02-15T18:02:54.000Z
|
2021-10-31T00:08:41.000Z
|
Back/ecoreleve_server/core/configuration_model/__init__.py
|
NaturalSolutions/ecoReleve-Data
|
535a6165984544902563eca7cb10d07f1686c963
|
[
"MIT"
] | 505
|
2015-03-24T15:16:55.000Z
|
2022-03-21T22:17:11.000Z
|
Back/ecoreleve_server/core/configuration_model/__init__.py
|
NaturalSolutions/ecoReleve-Data
|
535a6165984544902563eca7cb10d07f1686c963
|
[
"MIT"
] | 31
|
2015-04-09T10:48:31.000Z
|
2020-12-08T16:32:30.000Z
|
from .Business import *
from .frontmodules import *
from .configuration_resource import ConfiguredObjectResource
| 37.333333
| 60
| 0.857143
| 11
| 112
| 8.636364
| 0.636364
| 0.210526
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098214
| 112
| 3
| 60
| 37.333333
| 0.940594
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
63862da10fadb380f5c3f964cdd107c1464d4569
| 171
|
py
|
Python
|
portfol/projects/admin.py
|
IsaacMorzy/Portfolio
|
be55346110b87dc4be29c19b24504279ffc77c10
|
[
"MIT"
] | null | null | null |
portfol/projects/admin.py
|
IsaacMorzy/Portfolio
|
be55346110b87dc4be29c19b24504279ffc77c10
|
[
"MIT"
] | 4
|
2021-03-09T23:27:58.000Z
|
2021-12-09T01:16:36.000Z
|
portfol/projects/admin.py
|
IsaacMorzy/Portfolio
|
be55346110b87dc4be29c19b24504279ffc77c10
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
# Register your models here.
from markdownx.admin import MarkdownxModelAdmin
from .models import Project
admin.site.register(Project)
| 17.1
| 47
| 0.818713
| 22
| 171
| 6.363636
| 0.590909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128655
| 171
| 9
| 48
| 19
| 0.939597
| 0.152047
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
63a29e87257075140aafd8e57f7f4d0106d3aeae
| 83
|
py
|
Python
|
bin/yt_dlp.py
|
evolution-ant/local-youtube-dl
|
e9be36e8cdc585c0e24a18c74d790b62af6e11a7
|
[
"Unlicense"
] | null | null | null |
bin/yt_dlp.py
|
evolution-ant/local-youtube-dl
|
e9be36e8cdc585c0e24a18c74d790b62af6e11a7
|
[
"Unlicense"
] | null | null | null |
bin/yt_dlp.py
|
evolution-ant/local-youtube-dl
|
e9be36e8cdc585c0e24a18c74d790b62af6e11a7
|
[
"Unlicense"
] | null | null | null |
#!/usr/bin/env python
import yt_dlp
if __name__ == '__main__':
yt_dlp.main()
| 11.857143
| 26
| 0.662651
| 13
| 83
| 3.461538
| 0.769231
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180723
| 83
| 6
| 27
| 13.833333
| 0.661765
| 0.240964
| 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 | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
63c9934ecdf6bd3cd62315e8253f76f1596b6d6f
| 246
|
py
|
Python
|
grocercheck/map/admin.py
|
andy0liang/GrocerCheck
|
1d056fd3fb2fa9bd098722fc715109c5f02df1fc
|
[
"MIT"
] | null | null | null |
grocercheck/map/admin.py
|
andy0liang/GrocerCheck
|
1d056fd3fb2fa9bd098722fc715109c5f02df1fc
|
[
"MIT"
] | null | null | null |
grocercheck/map/admin.py
|
andy0liang/GrocerCheck
|
1d056fd3fb2fa9bd098722fc715109c5f02df1fc
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Store
from .models import blog_entry
from .models import ad_placement
# Register your models here.
admin.site.register(ad_placement)
admin.site.register(Store)
admin.site.register(blog_entry)
| 24.6
| 33
| 0.825203
| 37
| 246
| 5.378378
| 0.405405
| 0.150754
| 0.241206
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101626
| 246
| 9
| 34
| 27.333333
| 0.900452
| 0.105691
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.571429
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
891dd0e3a41d6c1903a645474c296859870a7f6f
| 67
|
py
|
Python
|
styledating/backend/thing.py
|
jnngu/codingdatingsite
|
18187f95d3864f23b005a7ceba932cdba78638a0
|
[
"MIT"
] | null | null | null |
styledating/backend/thing.py
|
jnngu/codingdatingsite
|
18187f95d3864f23b005a7ceba932cdba78638a0
|
[
"MIT"
] | null | null | null |
styledating/backend/thing.py
|
jnngu/codingdatingsite
|
18187f95d3864f23b005a7ceba932cdba78638a0
|
[
"MIT"
] | null | null | null |
import os
os.popen('sml -m sources.cm <<< \"test.py test3.py\"')
| 22.333333
| 54
| 0.61194
| 12
| 67
| 3.416667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017544
| 0.149254
| 67
| 3
| 54
| 22.333333
| 0.701754
| 0
| 0
| 0
| 0
| 0
| 0.636364
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
895b8c47820133d739ea061843b817fffd306562
| 50
|
py
|
Python
|
holobot/framework/ioc/graphs/sorting/__init__.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | 1
|
2021-05-24T00:17:46.000Z
|
2021-05-24T00:17:46.000Z
|
holobot/framework/ioc/graphs/sorting/__init__.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | 41
|
2021-03-24T22:50:09.000Z
|
2021-12-17T12:15:13.000Z
|
holobot/framework/ioc/graphs/sorting/__init__.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | null | null | null |
from .topological_sorter import TopologicalSorter
| 25
| 49
| 0.9
| 5
| 50
| 8.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 50
| 1
| 50
| 50
| 0.956522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8970e55a7038d092aa6417feb97836db8c9261af
| 55
|
py
|
Python
|
src/azbacklog/services/__init__.py
|
Azure/Azure-Backlog-Generator
|
23628a92caac95a3131b111908e04c7382e3f4a1
|
[
"MIT"
] | 5
|
2020-05-17T10:25:21.000Z
|
2022-02-17T01:05:50.000Z
|
src/azbacklog/services/__init__.py
|
Azure/Azure-Backlog-Generator
|
23628a92caac95a3131b111908e04c7382e3f4a1
|
[
"MIT"
] | 27
|
2020-05-15T22:20:31.000Z
|
2020-07-23T02:20:32.000Z
|
src/azbacklog/services/__init__.py
|
Azure/Azure-Backlog-Generator
|
23628a92caac95a3131b111908e04c7382e3f4a1
|
[
"MIT"
] | 3
|
2020-05-15T14:12:38.000Z
|
2021-01-02T15:02:01.000Z
|
from .github import GitHub
from .azure import AzDevOps
| 18.333333
| 27
| 0.818182
| 8
| 55
| 5.625
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145455
| 55
| 2
| 28
| 27.5
| 0.957447
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
89819270bc65c571c545b19b32fa41f9c45e5918
| 42
|
py
|
Python
|
Slicing_Strings.py
|
mcjohnchristopher/Python_Samples
|
738f3b7d9baa7f4e396647f380118eba66ea645c
|
[
"CC0-1.0"
] | null | null | null |
Slicing_Strings.py
|
mcjohnchristopher/Python_Samples
|
738f3b7d9baa7f4e396647f380118eba66ea645c
|
[
"CC0-1.0"
] | null | null | null |
Slicing_Strings.py
|
mcjohnchristopher/Python_Samples
|
738f3b7d9baa7f4e396647f380118eba66ea645c
|
[
"CC0-1.0"
] | null | null | null |
word = 'John Christopher'
print word[0:4]
| 21
| 26
| 0.714286
| 7
| 42
| 4.285714
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 0.142857
| 42
| 2
| 27
| 21
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
8984ca308b614b6e40ce036acd84f92991cc53ab
| 1,037
|
py
|
Python
|
clients/oathkeeper/python/ory_oathkeeper_client/models/__init__.py
|
ory/sdk-generator
|
958314d130922ad6f20f439b5230141a832231a5
|
[
"Apache-2.0"
] | 77
|
2020-02-14T17:27:36.000Z
|
2022-03-25T08:44:52.000Z
|
clients/oathkeeper/python/ory_oathkeeper_client/models/__init__.py
|
ory/sdk-generator
|
958314d130922ad6f20f439b5230141a832231a5
|
[
"Apache-2.0"
] | 125
|
2020-02-07T21:45:52.000Z
|
2022-03-31T12:54:24.000Z
|
clients/oathkeeper/python/ory_oathkeeper_client/models/__init__.py
|
ory/sdk-generator
|
958314d130922ad6f20f439b5230141a832231a5
|
[
"Apache-2.0"
] | 44
|
2020-01-31T22:05:47.000Z
|
2022-03-09T14:41:22.000Z
|
# flake8: noqa
# import all models into this package
# if you have many models here with many references from one model to another this may
# raise a RecursionError
# to avoid this, import only the models that you directly need like:
# from from ory_oathkeeper_client.model.pet import Pet
# or import this package, but before doing it, use:
# import sys
# sys.setrecursionlimit(n)
from ory_oathkeeper_client.model.health_not_ready_status import HealthNotReadyStatus
from ory_oathkeeper_client.model.health_status import HealthStatus
from ory_oathkeeper_client.model.inline_response500 import InlineResponse500
from ory_oathkeeper_client.model.json_web_key import JsonWebKey
from ory_oathkeeper_client.model.json_web_key_set import JsonWebKeySet
from ory_oathkeeper_client.model.rule import Rule
from ory_oathkeeper_client.model.rule_handler import RuleHandler
from ory_oathkeeper_client.model.rule_match import RuleMatch
from ory_oathkeeper_client.model.upstream import Upstream
from ory_oathkeeper_client.model.version import Version
| 47.136364
| 86
| 0.858245
| 154
| 1,037
| 5.558442
| 0.428571
| 0.089953
| 0.218458
| 0.295561
| 0.411215
| 0.280374
| 0.088785
| 0.088785
| 0
| 0
| 0
| 0.007527
| 0.103182
| 1,037
| 21
| 87
| 49.380952
| 0.912903
| 0.349084
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
982d3ac1d1e72a2b379fed14273b391b922b40c9
| 147
|
py
|
Python
|
djmercurysample/views.py
|
jcfigueiredo/django-mercury
|
6c2ea1266f95a6db01ade450d828cd48304bccb3
|
[
"MIT"
] | 2
|
2016-02-16T10:29:03.000Z
|
2020-01-03T14:21:37.000Z
|
djmercurysample/views.py
|
jcfigueiredo/django-mercury
|
6c2ea1266f95a6db01ade450d828cd48304bccb3
|
[
"MIT"
] | null | null | null |
djmercurysample/views.py
|
jcfigueiredo/django-mercury
|
6c2ea1266f95a6db01ade450d828cd48304bccb3
|
[
"MIT"
] | null | null | null |
#-*- coding:utf-8 -*-
from django.template.response import TemplateResponse
def index(request):
return TemplateResponse(request, 'index.html')
| 29.4
| 53
| 0.755102
| 17
| 147
| 6.529412
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007634
| 0.108844
| 147
| 5
| 54
| 29.4
| 0.839695
| 0.136054
| 0
| 0
| 0
| 0
| 0.07874
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
|
0
| 5
|
9838604072d71aa787a23b0fbd648513915e26f3
| 57
|
py
|
Python
|
engine/data/datasets/cifar.py
|
ssyang1999/cl-sbatch-val
|
95b6d83739637404096bef3324d4f1f17f7f2db8
|
[
"MIT"
] | 1
|
2020-11-23T06:35:20.000Z
|
2020-11-23T06:35:20.000Z
|
engine/data/datasets/cifar.py
|
ssyang1999/cl-sbatch-val
|
95b6d83739637404096bef3324d4f1f17f7f2db8
|
[
"MIT"
] | null | null | null |
engine/data/datasets/cifar.py
|
ssyang1999/cl-sbatch-val
|
95b6d83739637404096bef3324d4f1f17f7f2db8
|
[
"MIT"
] | null | null | null |
from torchvision.datasets.cifar import CIFAR10, CIFAR100
| 28.5
| 56
| 0.859649
| 7
| 57
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096154
| 0.087719
| 57
| 1
| 57
| 57
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9874d92229d49255ff674500964bed16194ec16b
| 93
|
py
|
Python
|
pull/admin.py
|
jannson/Similar
|
975527fae5fe63ab63913fa1f24619d616331687
|
[
"MIT"
] | 2
|
2015-12-17T17:25:44.000Z
|
2019-01-24T16:46:55.000Z
|
pull/admin.py
|
jannson/Similar
|
975527fae5fe63ab63913fa1f24619d616331687
|
[
"MIT"
] | null | null | null |
pull/admin.py
|
jannson/Similar
|
975527fae5fe63ab63913fa1f24619d616331687
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from pull.models import *
admin.site.register(HtmlContent)
| 18.6
| 32
| 0.817204
| 13
| 93
| 5.846154
| 0.769231
| 0.289474
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107527
| 93
| 4
| 33
| 23.25
| 0.915663
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
98a8014ac625518f07b4d29479182247a984b965
| 154
|
py
|
Python
|
biostar/emailer/admin.py
|
tangibleai/biostar-central
|
8c1cce4d3d95d49071db8ec225aa88a66b0b3910
|
[
"MIT"
] | 477
|
2015-01-01T00:18:54.000Z
|
2022-03-21T10:29:29.000Z
|
biostar/emailer/admin.py
|
coreydipsy/biostar-central
|
2b2f09199a6332877885ef54d9ac588ed0765770
|
[
"MIT"
] | 247
|
2015-01-02T08:12:03.000Z
|
2022-02-24T15:20:58.000Z
|
biostar/emailer/admin.py
|
coreydipsy/biostar-central
|
2b2f09199a6332877885ef54d9ac588ed0765770
|
[
"MIT"
] | 251
|
2015-01-01T16:05:57.000Z
|
2022-03-25T21:32:44.000Z
|
from django.contrib import admin
from .models import EmailGroup,EmailSubscription
admin.site.register(EmailGroup)
admin.site.register(EmailSubscription)
| 25.666667
| 48
| 0.857143
| 18
| 154
| 7.333333
| 0.555556
| 0.136364
| 0.257576
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 154
| 5
| 49
| 30.8
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7f481fd671c61daebb67555cb992918cccb2238e
| 884
|
py
|
Python
|
kcliutils/utils/texts/install_dependencies.py
|
kkristof200/py_cli_utils
|
8c18ea37e84be5e7df1f5fcf7cdc10ae70ecf7c6
|
[
"MIT"
] | null | null | null |
kcliutils/utils/texts/install_dependencies.py
|
kkristof200/py_cli_utils
|
8c18ea37e84be5e7df1f5fcf7cdc10ae70ecf7c6
|
[
"MIT"
] | null | null | null |
kcliutils/utils/texts/install_dependencies.py
|
kkristof200/py_cli_utils
|
8c18ea37e84be5e7df1f5fcf7cdc10ae70ecf7c6
|
[
"MIT"
] | null | null | null |
# ------------------------------------------------------------ Imports ----------------------------------------------------------- #
# System
from typing import List
# Pip
from kdependencies import InstalledPackage
# Local
from .core_texts import install_dependencies
# -------------------------------------------------------------------------------------------------------------------------------- #
# -------------------------------------------------------- Public methods -------------------------------------------------------- #
def new_install_dependencies_file(packages: List[InstalledPackage]) -> str:
return install_dependencies.replace(
'[COMMANDS]',
'\n'.join([p.get_install_command() for p in packages])
)
# -------------------------------------------------------------------------------------------------------------------------------- #
| 35.36
| 132
| 0.312217
| 44
| 884
| 6.090909
| 0.704545
| 0.212687
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09276
| 884
| 25
| 133
| 35.36
| 0.334165
| 0.605204
| 0
| 0
| 0
| 0
| 0.035608
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0.375
| 0.125
| 0.625
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
7f5edd892e25f8b2ecae37b93fa1ae8429a219ce
| 188
|
py
|
Python
|
async_example/iterator3.py
|
wapj/pyconkr2019
|
29a2b97ee31662759b1e26e55644aa37cb0f3884
|
[
"Apache-2.0"
] | 10
|
2019-08-15T15:29:36.000Z
|
2019-09-20T07:54:14.000Z
|
async_example/iterator3.py
|
wapj/pyconkr2019
|
29a2b97ee31662759b1e26e55644aa37cb0f3884
|
[
"Apache-2.0"
] | null | null | null |
async_example/iterator3.py
|
wapj/pyconkr2019
|
29a2b97ee31662759b1e26e55644aa37cb0f3884
|
[
"Apache-2.0"
] | 2
|
2019-08-15T05:50:48.000Z
|
2019-08-15T05:51:10.000Z
|
nums = [1, 2, 3, 4, 5]
# iter, next 를 직접 호출해서
# 잘 동작하는지 실행해봅시다.
it = iter(nums)
print(next(it))
print(next(it))
print(next(it))
print(next(it))
print(next(it))
# 여기서 중단됨
print(next(it))
| 13.428571
| 22
| 0.62766
| 37
| 188
| 3.189189
| 0.486486
| 0.457627
| 0.559322
| 0.542373
| 0.466102
| 0.466102
| 0.466102
| 0.466102
| 0.466102
| 0.466102
| 0
| 0.031847
| 0.164894
| 188
| 13
| 23
| 14.461538
| 0.719745
| 0.234043
| 0
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.75
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
7fa10f80884692789f106beccae38e72b332a9f7
| 78
|
py
|
Python
|
conftest.py
|
klorenz/python-elastico
|
9a39e6cfe33d3081cc52424284c19e9698343006
|
[
"MIT"
] | null | null | null |
conftest.py
|
klorenz/python-elastico
|
9a39e6cfe33d3081cc52424284c19e9698343006
|
[
"MIT"
] | null | null | null |
conftest.py
|
klorenz/python-elastico
|
9a39e6cfe33d3081cc52424284c19e9698343006
|
[
"MIT"
] | null | null | null |
import sys
from os.path import dirname
sys.path.insert(0, dirname(__file__))
| 15.6
| 37
| 0.782051
| 13
| 78
| 4.384615
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014493
| 0.115385
| 78
| 4
| 38
| 19.5
| 0.811594
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f6a563025bfb90ee0afc03e78b7c4deaff1882ed
| 163
|
py
|
Python
|
jet_bridge/filters/datetime_filter.py
|
BradyBromley/jet-bridge
|
06be16d3bbfdf56a943057dfa48340693c6ed5bb
|
[
"MIT"
] | 2
|
2020-07-27T22:18:42.000Z
|
2021-11-15T10:03:14.000Z
|
jet_bridge/filters/datetime_filter.py
|
BradyBromley/jet-bridge
|
06be16d3bbfdf56a943057dfa48340693c6ed5bb
|
[
"MIT"
] | null | null | null |
jet_bridge/filters/datetime_filter.py
|
BradyBromley/jet-bridge
|
06be16d3bbfdf56a943057dfa48340693c6ed5bb
|
[
"MIT"
] | null | null | null |
from jet_bridge.fields.datetime import DateTimeField
from jet_bridge.filters.filter import Filter
class DateTimeFilter(Filter):
field_class = DateTimeField
| 20.375
| 52
| 0.828221
| 20
| 163
| 6.6
| 0.6
| 0.106061
| 0.19697
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122699
| 163
| 7
| 53
| 23.285714
| 0.923077
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f6c229f52cd8fe377731a87e3e66580cd319d1ad
| 8,133
|
py
|
Python
|
sa/profiles/Sumavision/IPQAM/get_metrics.py
|
prorevizor/noc
|
37e44b8afc64318b10699c06a1138eee9e7d6a4e
|
[
"BSD-3-Clause"
] | null | null | null |
sa/profiles/Sumavision/IPQAM/get_metrics.py
|
prorevizor/noc
|
37e44b8afc64318b10699c06a1138eee9e7d6a4e
|
[
"BSD-3-Clause"
] | null | null | null |
sa/profiles/Sumavision/IPQAM/get_metrics.py
|
prorevizor/noc
|
37e44b8afc64318b10699c06a1138eee9e7d6a4e
|
[
"BSD-3-Clause"
] | null | null | null |
# ---------------------------------------------------------------------
# Sumavision.IPQAM.get_metrics
# ---------------------------------------------------------------------
# Copyright (C) 2007-2021 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# NOC modules
from noc.sa.profiles.Generic.get_metrics import Script as GetMetricsScript, metrics
class Script(GetMetricsScript):
name = "Sumavision.IPQAM.get_metrics"
@metrics(
["Interface | Load | In", "Interface | Status | Admin", "Interface | Status | Oper"],
has_capability="DB | Interfaces",
volatile=True,
access="S", # SNMP version
)
def get_interface_metrics(self, metrics):
for metric in metrics:
ifname = self.snmp.get("1.3.6.1.4.1.32285.2.2.10.3008.4.2.1.11.1.1.%s" % metric.ifindex)
istatus = self.snmp.get(
"1.3.6.1.4.1.32285.2.2.10.3008.4.2.1.10.1.1.%s" % metric.ifindex
)
load = self.snmp.get("1.3.6.1.4.1.32285.2.2.10.3008.4.5.1.3.1.%s" % metric.ifindex)
self.set_metric(
id=("Interface | Status | Admin", [f"noc::interface::{ifname}"]),
value=1 if istatus not in ["Shut Down", "linkError"] else 0,
type="gauge",
scale=1,
)
self.set_metric(
id=("Interface | Status | Oper", [f"noc::interface::{ifname}"]),
value=1 if istatus not in ["Shut Down", "Link Error"] else 0,
type="gauge",
scale=1,
)
self.set_metric(
id=("Interface | Load | In", [f"noc::interface::{ifname}"]),
value=float(load.rstrip("Mbps")),
type="gauge",
scale=1000000,
)
@metrics(
[
"Multicast | Channel | Bandwidth | Used",
],
has_capability="DB | Interfaces",
volatile=True,
access="S", # SNMP version
)
def get_channel_bandwidth_u_metrics(self, metrics):
for metric in metrics:
used_bandwidth = self.snmp.get(
"1.3.6.1.4.1.32285.2.2.10.3008.5.3.1.18.1.1.%s" % metric.ifindex
)
self.set_metric(
id=(
"Multicast | Channel | Bandwidth | Used",
[f"noc::interface::1/1.{metric.ifindex}"],
),
labels=([f"noc::multicast::channel::1/1.{metric.ifindex}"]),
value=float(used_bandwidth.rstrip("Mbps")),
type="gauge",
scale=1000000,
)
@metrics(
[
"Multicast | Channel | Bandwidth | Percent",
],
has_capability="DB | Interfaces",
volatile=True,
access="S", # SNMP version
)
def get_channel_bandwidth_p_metrics(self, metrics):
for metric in metrics:
used_bandwidth = self.snmp.get(
"1.3.6.1.4.1.32285.2.2.10.3008.5.3.1.18.1.1.%s" % metric.ifindex
)
capacity_bandwidth = self.snmp.get(
"1.3.6.1.4.1.32285.2.2.10.3008.5.3.1.19.1.1.%s" % metric.ifindex
)
value = (100 / float(capacity_bandwidth.rstrip("Mbps"))) * float(
used_bandwidth.rstrip("Mbps")
)
self.set_metric(
id=(
"Multicast | Channel | Bandwidth | Percent",
[f"noc::interface::1/1.{metric.ifindex}"],
),
labels=([f"noc::multicast::channel::1/1.{metric.ifindex}"]),
value=int(value),
type="gauge",
scale=1,
)
@metrics(
["Multicast | Channel | Group | Count"],
has_capability="DB | Interfaces",
volatile=True,
access="S", # SNMP version
)
def get_channel_udp_metrics(self, metrics):
for metric in metrics:
udp_ports = self.snmp.get(
"1.3.6.1.4.1.32285.2.2.10.3008.5.3.1.17.1.1.%s" % metric.ifindex
)
self.set_metric(
id=(
"Multicast | Channel | Group | Count",
[f"noc::interface::1/1.{metric.ifindex}"],
),
labels=([f"noc::multicast::channel::1/1.{metric.ifindex}"]),
value=udp_ports,
type="gauge",
scale=1,
)
@metrics(
["Multicast | Group | Status"],
has_capability="DB | Interfaces",
volatile=True,
access="S", # SNMP version
)
def get_group_metrics(self, metrics):
for metric in metrics:
channel, index = int(str(metric.ifindex)[0]), int(str(metric.ifindex)[1:])
mname = self.snmp.get(
"1.3.6.1.4.1.32285.2.2.10.3008.5.6.1.5.1.1.%s.%s" % (channel, index)
)
m_astatus = self.snmp.get(
"1.3.6.1.4.1.32285.2.2.10.3008.5.6.1.7.1.1.%s.%s" % (channel, index)
)
try:
minname = self.snmp.get(
"1.3.6.1.4.1.32285.2.2.10.3008.4.6.1.8.1.1.%s.%s" % (channel, index)
)
if minname and mname == minname and m_astatus:
m_ostatus = 1
else:
m_ostatus = 0
except self.snmp.SNMPError:
m_ostatus = -1
self.set_metric(
id=("Multicast | Group | Status", [f"noc::interface::{channel}/{mname}"]),
labels=(
[f"noc::multicast::group::{mname}", f"noc::multicast::channel::1/1.{channel}"]
),
value=m_ostatus,
type="gauge",
scale=1,
)
@metrics(
["Multicast | Group | Bitrate | In"],
has_capability="DB | Interfaces",
volatile=True,
access="S", # SNMP version
)
def get_group_bitrate_in_metrics(self, metrics):
for metric in metrics:
channel, index = int(str(metric.ifindex)[0]), int(str(metric.ifindex)[1:])
mname = self.snmp.get(
"1.3.6.1.4.1.32285.2.2.10.3008.5.6.1.5.1.1.%s.%s" % (channel, index)
)
try:
input = self.snmp.get(
"1.3.6.1.4.1.32285.2.2.10.3008.4.6.1.18.1.1.%s.%s" % (channel, index)
)
input = float(input.rstrip("Mbps"))
except self.snmp.SNMPError:
input = 0
self.set_metric(
id=("Multicast | Group | Bitrate | In", [f"noc::interface::{channel}/{mname}"]),
labels=(
[f"noc::multicast::group::{mname}", f"noc::multicast::channel::1/1.{channel}"]
),
value=input,
type="gauge",
scale=1000000,
)
@metrics(
["Multicast | Group | Bitrate | Out"],
has_capability="DB | Interfaces",
volatile=True,
access="S", # SNMP version
)
def get_group_bitrate_out_metrics(self, metrics):
for metric in metrics:
channel, index = int(str(metric.ifindex)[0]), int(str(metric.ifindex)[1:])
mname = self.snmp.get(
"1.3.6.1.4.1.32285.2.2.10.3008.5.6.1.5.1.1.%s.%s" % (channel, index)
)
try:
input = self.snmp.get(
"1.3.6.1.4.1.32285.2.2.10.3008.5.6.1.24.1.1.%s.%s" % (channel, index)
)
input = float(input.rstrip("Mbps"))
except self.snmp.SNMPError:
input = 0
self.set_metric(
id=("Multicast | Group | Bitrate | Out", [f"noc::interface::{channel}/{mname}"]),
labels=(
[f"noc::multicast::group::{mname}", f"noc::multicast::channel::1/1.{channel}"]
),
value=input,
type="gauge",
scale=1000000,
)
| 37.479263
| 100
| 0.46133
| 932
| 8,133
| 3.965665
| 0.121245
| 0.011905
| 0.041667
| 0.045455
| 0.82684
| 0.794102
| 0.763528
| 0.706169
| 0.698052
| 0.698052
| 0
| 0.083849
| 0.36358
| 8,133
| 216
| 101
| 37.652778
| 0.630216
| 0.049797
| 0
| 0.588832
| 0
| 0.071066
| 0.267211
| 0.16712
| 0
| 0
| 0
| 0
| 0
| 1
| 0.035533
| false
| 0
| 0.005076
| 0
| 0.050761
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1003027b3cb2ca0d16e926edfe5d69f10e7bec17
| 183
|
py
|
Python
|
src/core/usecase/maps/MapModel.py
|
danielbrai/lol_stats_etl
|
730930c8a0ae03c1d07b37cd5f3cc523d2be0646
|
[
"MIT"
] | null | null | null |
src/core/usecase/maps/MapModel.py
|
danielbrai/lol_stats_etl
|
730930c8a0ae03c1d07b37cd5f3cc523d2be0646
|
[
"MIT"
] | null | null | null |
src/core/usecase/maps/MapModel.py
|
danielbrai/lol_stats_etl
|
730930c8a0ae03c1d07b37cd5f3cc523d2be0646
|
[
"MIT"
] | null | null | null |
class MapModel:
def __init__(self, id, riot_map_id, name, notes):
self.id = id
self.riot_map_id = riot_map_id
self.name = name
self.notes = notes
| 22.875
| 53
| 0.601093
| 27
| 183
| 3.703704
| 0.37037
| 0.21
| 0.27
| 0.22
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.311475
| 183
| 7
| 54
| 26.142857
| 0.793651
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
63fa531b4953f7fdde32d25e839f36a0b314bc10
| 245
|
py
|
Python
|
misc/requests_ex.py
|
decaun/easy-python-study
|
70da7db22b28811890265ebc5df2007edb829606
|
[
"Apache-2.0"
] | 1
|
2019-04-15T06:32:22.000Z
|
2019-04-15T06:32:22.000Z
|
misc/requests_ex.py
|
decaun/easy-python-study
|
70da7db22b28811890265ebc5df2007edb829606
|
[
"Apache-2.0"
] | 4
|
2021-03-18T22:53:33.000Z
|
2021-03-19T10:35:04.000Z
|
misc/requests_ex.py
|
decaun/easy-python-study
|
70da7db22b28811890265ebc5df2007edb829606
|
[
"Apache-2.0"
] | null | null | null |
import requests
session = requests.Session()
response = requests.get("https://google.co.in",
cookies={"new-cookie-identifier": "1234abcd"})
print(response.headers)
print(response.request.headers)
print(response.reason)
| 24.5
| 70
| 0.693878
| 27
| 245
| 6.296296
| 0.666667
| 0.229412
| 0.235294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019417
| 0.159184
| 245
| 9
| 71
| 27.222222
| 0.805825
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0.085714
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.142857
| 0.428571
| 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
| 1
|
0
| 5
|
122c641b7ae24d188ce7b957438f3b2f7dd0dd4d
| 171
|
py
|
Python
|
conductor.py
|
matt-ketk/charges-2D
|
0bf35bb6d1ea5e099a7a3dcf83f4a287d1870541
|
[
"MIT"
] | null | null | null |
conductor.py
|
matt-ketk/charges-2D
|
0bf35bb6d1ea5e099a7a3dcf83f4a287d1870541
|
[
"MIT"
] | null | null | null |
conductor.py
|
matt-ketk/charges-2D
|
0bf35bb6d1ea5e099a7a3dcf83f4a287d1870541
|
[
"MIT"
] | null | null | null |
from constants import Constants
class Conductor:
def __init__(self, resistivity=Constants.COPPER_RESISTIVITY):
# resistivity in ohms
self.resistivity = resistivity
| 24.428571
| 62
| 0.807018
| 19
| 171
| 7
| 0.631579
| 0.225564
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134503
| 171
| 7
| 63
| 24.428571
| 0.898649
| 0.111111
| 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
| 1
| 0
|
0
| 5
|
89c5130ca0f372ac856005619dd3e84a737895d6
| 288
|
py
|
Python
|
ihna/kozhukhov/imageanalysis/gui/isolines/__init__.py
|
serik1987/ihna_kozhuhov_image_analysis
|
ccfb3b48cbf6b351acb10f8b99315c65281f8ab8
|
[
"Unlicense"
] | null | null | null |
ihna/kozhukhov/imageanalysis/gui/isolines/__init__.py
|
serik1987/ihna_kozhuhov_image_analysis
|
ccfb3b48cbf6b351acb10f8b99315c65281f8ab8
|
[
"Unlicense"
] | null | null | null |
ihna/kozhukhov/imageanalysis/gui/isolines/__init__.py
|
serik1987/ihna_kozhuhov_image_analysis
|
ccfb3b48cbf6b351acb10f8b99315c65281f8ab8
|
[
"Unlicense"
] | null | null | null |
# -*- coding: utf-8
from .isoline import IsolineEditor
from .noisoline import NoIsolineEditor
from .linearfitisoline import LinearFitIsolineEditor
from .timeaverageisoline import TimeAverageIsolineEditor
editor_list = [NoIsolineEditor, LinearFitIsolineEditor, TimeAverageIsolineEditor]
| 32
| 81
| 0.854167
| 24
| 288
| 10.208333
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003831
| 0.09375
| 288
| 8
| 82
| 36
| 0.934866
| 0.059028
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
89d1856a70246ae1ca27615555ffc23521df7c00
| 52
|
py
|
Python
|
Factory/autos/__init__.py
|
deorerohan/DesignPatterns
|
2bd698246e12ed289917bb4e3b84eaa2210534fd
|
[
"MIT"
] | null | null | null |
Factory/autos/__init__.py
|
deorerohan/DesignPatterns
|
2bd698246e12ed289917bb4e3b84eaa2210534fd
|
[
"MIT"
] | null | null | null |
Factory/autos/__init__.py
|
deorerohan/DesignPatterns
|
2bd698246e12ed289917bb4e3b84eaa2210534fd
|
[
"MIT"
] | null | null | null |
from .ciaz import Ciaz
from .null_car import NullCar
| 26
| 29
| 0.826923
| 9
| 52
| 4.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134615
| 52
| 2
| 29
| 26
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d62ae75deb1273f7a1926765e9475b23af60f8a2
| 146
|
py
|
Python
|
search_product/urls.py
|
connor-blackburn/HighCal
|
6669d5be6298eefd3f5189df7d30a5c06ce1e04d
|
[
"MIT"
] | null | null | null |
search_product/urls.py
|
connor-blackburn/HighCal
|
6669d5be6298eefd3f5189df7d30a5c06ce1e04d
|
[
"MIT"
] | 8
|
2021-06-02T00:51:39.000Z
|
2022-03-12T00:10:27.000Z
|
search_product/urls.py
|
connor-blackburn/HighCal
|
6669d5be6298eefd3f5189df7d30a5c06ce1e04d
|
[
"MIT"
] | null | null | null |
from django.conf.urls import url
from .views import do_search_product
urlpatterns = [
url(r'^$', do_search_product, name='search_product')
]
| 24.333333
| 56
| 0.746575
| 21
| 146
| 4.952381
| 0.619048
| 0.375
| 0.288462
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136986
| 146
| 6
| 57
| 24.333333
| 0.825397
| 0
| 0
| 0
| 0
| 0
| 0.108844
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
c384a5af087fe087137d0b7c4a181a5c4753ae52
| 27
|
py
|
Python
|
src/pySpeedDownloader/__init__.py
|
cuicaihao/py-downloader-app
|
5bb283b7e467a6d0c541a2c52f0e93d5f5bebe01
|
[
"MIT"
] | 1
|
2021-06-28T04:46:21.000Z
|
2021-06-28T04:46:21.000Z
|
src/pySpeedDownloader/__init__.py
|
cuicaihao/py-downloader-app
|
5bb283b7e467a6d0c541a2c52f0e93d5f5bebe01
|
[
"MIT"
] | null | null | null |
src/pySpeedDownloader/__init__.py
|
cuicaihao/py-downloader-app
|
5bb283b7e467a6d0c541a2c52f0e93d5f5bebe01
|
[
"MIT"
] | null | null | null |
name = "pySpeedDownloader"
| 13.5
| 26
| 0.777778
| 2
| 27
| 10.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 27
| 1
| 27
| 27
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0.62963
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c3885be63f7fc7785beb3e49be33026a8aa16670
| 256
|
py
|
Python
|
wsgi/iportalen_django/thesis_portal/admin.py
|
I-sektionen/i-portalen
|
1713e5814d40c0da1bf3278d60a561e7d3df3550
|
[
"MIT"
] | 4
|
2016-09-21T17:06:01.000Z
|
2018-02-06T16:36:44.000Z
|
wsgi/iportalen_django/thesis_portal/admin.py
|
I-sektionen/i-portalen
|
1713e5814d40c0da1bf3278d60a561e7d3df3550
|
[
"MIT"
] | 149
|
2016-03-07T23:50:47.000Z
|
2022-03-11T23:16:33.000Z
|
wsgi/iportalen_django/thesis_portal/admin.py
|
I-sektionen/i-portalen
|
1713e5814d40c0da1bf3278d60a561e7d3df3550
|
[
"MIT"
] | 1
|
2016-03-07T23:02:06.000Z
|
2016-03-07T23:02:06.000Z
|
from django.contrib import admin
from .models import Thesis_Article
from utils.admin import HiddenModelAdmin, iportalen_admin_site, iportalen_superadmin_site
iportalen_admin_site.register(Thesis_Article)
iportalen_superadmin_site.register(Thesis_Article)
| 36.571429
| 89
| 0.890625
| 33
| 256
| 6.575758
| 0.424242
| 0.179724
| 0.165899
| 0.230415
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066406
| 256
| 6
| 90
| 42.666667
| 0.90795
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c396fb286e1c54c6fa3563a98507359671427cc9
| 1,515
|
py
|
Python
|
Chapter21.TheBenchmarkingInterlude/timeseqs2.py
|
mindnhand/Learning-Python-5th
|
3dc1b28d6e048d512bf851de6c7f6445edfe7b84
|
[
"MIT"
] | null | null | null |
Chapter21.TheBenchmarkingInterlude/timeseqs2.py
|
mindnhand/Learning-Python-5th
|
3dc1b28d6e048d512bf851de6c7f6445edfe7b84
|
[
"MIT"
] | null | null | null |
Chapter21.TheBenchmarkingInterlude/timeseqs2.py
|
mindnhand/Learning-Python-5th
|
3dc1b28d6e048d512bf851de6c7f6445edfe7b84
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
#encoding=utf-8
#-----------------------------------------------------------
# Usage: python3 timeseqs2.py
# Description: time module with different implementation
#-----------------------------------------------------------
import sys, timer
reps = 10000
repslist = list(range(reps))
def for_loop():
res = []
for x in repslist:
res.append(x + 10)
return res
def list_comp():
return [x + 10 for x in repslist]
def map_call():
return list(map((lambda x: x + 10), repslist))
def gen_expr():
return list(x + 10 for x in repslist)
def gen_func():
def gen():
for x in repslist:
yield x + 10
return list(gen())
print(sys.version)
for test in (for_loop, list_comp, map_call, gen_expr, gen_func):
(bestof, (total, result)) = timer.bestoftotal(5, 1000, test)
print('%-9s: %.5f => [%s...%s]' % (test.__name__, bestof, result[0], result[-1]))
'''
执行结果如下:
0.0017566680908203125
(0.00012350082397460938, 'SPAM')
bestof time of tb1 = (0.0, 'SPAM')
bestof time of tb2 = 0.0029191970825195312
bestof time of tb3 = (0.00016379356384277344, (0.00012254714965820312, 'SPAM'))
bestoftotal time of tbt2 = (0.00016427040100097656, (0.0001232624053955078, 'SPAM'))
3.8.6 (default, Nov 9 2020, 16:14:32)
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
for_loop : 1.32099 => [10...10009]
list_comp: 0.73948 => [10...10009]
map_call : 1.51109 => [10...10009]
gen_expr : 1.03686 => [10...10009]
gen_func : 1.03553 => [10...10009]
'''
| 21.642857
| 85
| 0.592079
| 211
| 1,515
| 4.161137
| 0.421801
| 0.017084
| 0.027335
| 0.063781
| 0.045558
| 0.045558
| 0.045558
| 0
| 0
| 0
| 0
| 0.218825
| 0.179538
| 1,515
| 69
| 86
| 21.956522
| 0.48753
| 0.155776
| 0
| 0.086957
| 0
| 0
| 0.032578
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.26087
| false
| 0
| 0.043478
| 0.130435
| 0.521739
| 0.086957
| 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
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
c3da5c9b935b4e074086ecb4b34d5767ab2729ea
| 671
|
py
|
Python
|
jardin/database/client_provider.py
|
ankushgoel27/jardin
|
d1c0937c690599a2d5f1bd7d626fcb4affcae2df
|
[
"MIT"
] | null | null | null |
jardin/database/client_provider.py
|
ankushgoel27/jardin
|
d1c0937c690599a2d5f1bd7d626fcb4affcae2df
|
[
"MIT"
] | 11
|
2022-03-15T20:18:58.000Z
|
2022-03-15T20:20:50.000Z
|
jardin/database/client_provider.py
|
ankushgoel27/jardin
|
d1c0937c690599a2d5f1bd7d626fcb4affcae2df
|
[
"MIT"
] | null | null | null |
from jardin.database.datasources import Datasources
class ClientProvider:
def __init__(self, datasource_name):
self.datasource_name = datasource_name
self.generator = Datasources.client_generator(self.datasource_name)
@property
def name(self):
return self.datasource_name
@property
def config(self):
return Datasources.db_configs(self.datasource_name)[0]
@property
def lexicon(self):
return Datasources.db_lexicon(self.datasource_name)
def connection_count(self):
return len(Datasources.db_configs(self.datasource_name))
def next_client(self):
return next(self.generator)
| 25.807692
| 75
| 0.716841
| 77
| 671
| 6.012987
| 0.324675
| 0.241901
| 0.272138
| 0.112311
| 0.289417
| 0.164147
| 0
| 0
| 0
| 0
| 0
| 0.001873
| 0.204173
| 671
| 25
| 76
| 26.84
| 0.865169
| 0
| 0
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.055556
| 0.277778
| 0.722222
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
c3f535cdf7da05f55b69608465b33ed54cd4bce3
| 180
|
py
|
Python
|
rosalind/scripts/__init__.py
|
alantsv/ufpa-bioinf-2018
|
f188f2077bcd55dc41e5ee096176d24d5f5ec482
|
[
"MIT"
] | null | null | null |
rosalind/scripts/__init__.py
|
alantsv/ufpa-bioinf-2018
|
f188f2077bcd55dc41e5ee096176d24d5f5ec482
|
[
"MIT"
] | null | null | null |
rosalind/scripts/__init__.py
|
alantsv/ufpa-bioinf-2018
|
f188f2077bcd55dc41e5ee096176d24d5f5ec482
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
'''
Scripts for functions common to multiple ROSALIND bioinformatics problems.
'''
from FASTA import ReadFASTA
from scoring_matrices import BLOSUM62, PAM250
| 22.5
| 74
| 0.8
| 23
| 180
| 6.217391
| 0.913043
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.031847
| 0.127778
| 180
| 7
| 75
| 25.714286
| 0.878981
| 0.527778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.