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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
83e59a4eebbc243e205d45a8335643c180fcec40
| 77
|
py
|
Python
|
gameideabot/__init__.py
|
anaplian/gameideabot
|
0e190a7cdb3a7489c3a2b25448ebd8da3ad44aba
|
[
"MIT"
] | 4
|
2018-07-06T10:54:13.000Z
|
2022-01-11T17:35:46.000Z
|
gameideabot/__init__.py
|
turingincomplete/gameideabot
|
8c16ec9611feaeca62fe8b2e1981e22fe28be3de
|
[
"MIT"
] | null | null | null |
gameideabot/__init__.py
|
turingincomplete/gameideabot
|
8c16ec9611feaeca62fe8b2e1981e22fe28be3de
|
[
"MIT"
] | 1
|
2018-10-25T21:44:39.000Z
|
2018-10-25T21:44:39.000Z
|
"""
A simple twitterbot designed to tweet original game ideas every hour
"""
| 19.25
| 68
| 0.753247
| 11
| 77
| 5.272727
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168831
| 77
| 3
| 69
| 25.666667
| 0.90625
| 0.883117
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
83f2b6d35d9f00f928c8e2278e6617c04b43273b
| 30
|
py
|
Python
|
tests/__init__.py
|
fa-ribeiro/pyApp
|
79e95034db67f1b35240db2253c88c9a8c4d1ea8
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
fa-ribeiro/pyApp
|
79e95034db67f1b35240db2253c88c9a8c4d1ea8
|
[
"MIT"
] | 1
|
2021-12-27T23:42:55.000Z
|
2021-12-27T23:44:36.000Z
|
tests/__init__.py
|
fa-ribeiro/pyApp
|
79e95034db67f1b35240db2253c88c9a8c4d1ea8
|
[
"MIT"
] | null | null | null |
"""
Test suite for PyApp.
"""
| 7.5
| 21
| 0.566667
| 4
| 30
| 4.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 30
| 3
| 22
| 10
| 0.708333
| 0.7
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
83f81120107b2d87830f2e1611c01925086ae1b4
| 146
|
py
|
Python
|
quantecon/game_theory/game_generators/__init__.py
|
canishknaik/QuantEcon.py
|
1c84f6fe0c0c451c974af236618f4cd4f027583b
|
[
"BSD-3-Clause"
] | 1
|
2018-12-31T15:16:45.000Z
|
2018-12-31T15:16:45.000Z
|
quantecon/game_theory/game_generators/__init__.py
|
canishknaik/QuantEcon.py
|
1c84f6fe0c0c451c974af236618f4cd4f027583b
|
[
"BSD-3-Clause"
] | null | null | null |
quantecon/game_theory/game_generators/__init__.py
|
canishknaik/QuantEcon.py
|
1c84f6fe0c0c451c974af236618f4cd4f027583b
|
[
"BSD-3-Clause"
] | 2
|
2019-07-09T04:20:19.000Z
|
2019-11-02T14:41:09.000Z
|
"""
game_theory.game_generators
"""
from .bimatrix_generators import (
blotto_game, ranking_game, sgc_game, tournament_game, unit_vector_game
)
| 18.25
| 71
| 0.80137
| 19
| 146
| 5.684211
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10274
| 146
| 7
| 72
| 20.857143
| 0.824427
| 0.184932
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f7ccba4620b703b5e19b9d15293b3fe6fe7b233f
| 270
|
py
|
Python
|
authentik/stages/deny/apps.py
|
BeryJu/passbook
|
350f0d836580f4411524614f361a76c4f27b8a2d
|
[
"MIT"
] | 15
|
2020-01-05T09:09:57.000Z
|
2020-11-28T05:27:39.000Z
|
authentik/stages/deny/apps.py
|
BeryJu/passbook
|
350f0d836580f4411524614f361a76c4f27b8a2d
|
[
"MIT"
] | 302
|
2020-01-21T08:03:59.000Z
|
2020-12-04T05:04:57.000Z
|
authentik/stages/deny/apps.py
|
BeryJu/passbook
|
350f0d836580f4411524614f361a76c4f27b8a2d
|
[
"MIT"
] | 3
|
2020-03-04T08:21:59.000Z
|
2020-08-01T20:37:18.000Z
|
"""authentik deny stage app config"""
from django.apps import AppConfig
class AuthentikStageDenyConfig(AppConfig):
"""authentik deny stage config"""
name = "authentik.stages.deny"
label = "authentik_stages_deny"
verbose_name = "authentik Stages.Deny"
| 24.545455
| 42
| 0.733333
| 30
| 270
| 6.5
| 0.533333
| 0.230769
| 0.292308
| 0.235897
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162963
| 270
| 10
| 43
| 27
| 0.862832
| 0.218519
| 0
| 0
| 0
| 0
| 0.315
| 0.21
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
f7dfb792dcadf7fa9089ddcc75d1f000869ebdea
| 1,749
|
py
|
Python
|
autoscalingsim/deltarepr/node_group_delta/node_group_delta.py
|
Remit/autoscaling-simulator
|
091943c0e9eedf9543e9305682a067ab60f56def
|
[
"MIT"
] | 6
|
2021-03-10T16:23:10.000Z
|
2022-01-14T04:57:46.000Z
|
autoscalingsim/deltarepr/node_group_delta/node_group_delta.py
|
Remit/autoscaling-simulator
|
091943c0e9eedf9543e9305682a067ab60f56def
|
[
"MIT"
] | null | null | null |
autoscalingsim/deltarepr/node_group_delta/node_group_delta.py
|
Remit/autoscaling-simulator
|
091943c0e9eedf9543e9305682a067ab60f56def
|
[
"MIT"
] | 1
|
2022-01-14T04:57:55.000Z
|
2022-01-14T04:57:55.000Z
|
from copy import deepcopy
class NodeGroupDelta:
def __init__(self, node_group : 'NodeGroup', sign : int = 1, virtual : bool = False):
self.node_group = node_group.produce_virtual_copy() if (virtual and not node_group.virtual) else node_group
self._sign = sign
def enforce(self):
return self.__class__(self.node_group.enforce(), self._sign, False)
def to_virtual(self):
return self.__class__(self.node_group, self._sign, True)
def copy(self):
return self.__class__(self.node_group, self._sign, self.virtual)
def __deepcopy__(self, memo):
result = self.__class__(deepcopy(self.node_group, memo), self._sign, self.virtual)
memo[id(result)] = result
return result
@property
def in_change(self):
return not self.node_group.enforced
@property
def virtual(self):
return self.node_group.virtual
@property
def provider(self):
return self.node_group.node_info.provider
@property
def node_type(self):
return self.node_group.node_info.node_type
@property
def is_scale_down(self):
return self._sign == -1
@property
def is_scale_up(self):
return self._sign == 1
@property
def id(self):
return self.node_group.id
@property
def is_empty(self):
return self.node_group.nodes_count == 0
@property
def nodes_change(self):
return self.node_group.nodes_count * self._sign
def __repr__(self):
return f'{self.__class__.__name__}( node_group = {self.node_group}, \
sign = {self._sign}, \
virtual = {self.virtual})'
| 22.423077
| 115
| 0.620926
| 217
| 1,749
| 4.640553
| 0.221198
| 0.160874
| 0.180735
| 0.107249
| 0.343595
| 0.297915
| 0.297915
| 0.079444
| 0.079444
| 0
| 0
| 0.003187
| 0.282447
| 1,749
| 77
| 116
| 22.714286
| 0.799203
| 0
| 0
| 0.195652
| 0
| 0
| 0.005146
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.326087
| false
| 0
| 0.021739
| 0.282609
| 0.673913
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
f7e349107a68e0a5173914e174a52ae3c61d9e5f
| 143
|
py
|
Python
|
tail/tail.py
|
jonboland/morsels
|
77a8ab44bcc48822378c6a15e357acdb586861ba
|
[
"MIT"
] | null | null | null |
tail/tail.py
|
jonboland/morsels
|
77a8ab44bcc48822378c6a15e357acdb586861ba
|
[
"MIT"
] | null | null | null |
tail/tail.py
|
jonboland/morsels
|
77a8ab44bcc48822378c6a15e357acdb586861ba
|
[
"MIT"
] | null | null | null |
def tail(sequence, n):
"""Returns the last n items of a given sequence."""
if n <= 0:
return []
return list(sequence[-n:])
| 23.833333
| 55
| 0.566434
| 21
| 143
| 3.857143
| 0.714286
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009709
| 0.27972
| 143
| 5
| 56
| 28.6
| 0.776699
| 0.314685
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f7f4b50a1751778c556d0163ed3ab50e01c4821b
| 257
|
py
|
Python
|
django_covid19/apps.py
|
zhangguoyuanshuai/Python-Covid19API
|
2c5f69a8eed16df4c04af5137fb5574ea5125ee5
|
[
"MIT"
] | 103
|
2020-05-07T06:13:25.000Z
|
2022-03-27T14:15:35.000Z
|
django_covid19/apps.py
|
zhangguoyuanshuai/Python-Covid19API
|
2c5f69a8eed16df4c04af5137fb5574ea5125ee5
|
[
"MIT"
] | 13
|
2020-05-14T05:18:41.000Z
|
2022-03-02T14:53:44.000Z
|
django_covid19/apps.py
|
zhangguoyuanshuai/Python-Covid19API
|
2c5f69a8eed16df4c04af5137fb5574ea5125ee5
|
[
"MIT"
] | 31
|
2020-05-17T13:24:09.000Z
|
2022-03-28T09:22:31.000Z
|
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class DjangoCovid19Config(AppConfig):
name = 'django_covid19'
verbose_name = _('django_covid19')
def ready(self):
import django_covid19.signals
| 23.363636
| 55
| 0.754864
| 30
| 257
| 6.233333
| 0.633333
| 0.208556
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037736
| 0.175097
| 257
| 11
| 56
| 23.363636
| 0.84434
| 0
| 0
| 0
| 0
| 0
| 0.108527
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.428571
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f7fe1d9d3eaf3358e979f16c4e47e42c1529c075
| 499
|
py
|
Python
|
src/xraysink/util.py
|
garyd203/xray-asyncio
|
6fe8a4de74372a5a914f52fcbfb9b9a390ed290a
|
[
"Apache-2.0"
] | null | null | null |
src/xraysink/util.py
|
garyd203/xray-asyncio
|
6fe8a4de74372a5a914f52fcbfb9b9a390ed290a
|
[
"Apache-2.0"
] | null | null | null |
src/xraysink/util.py
|
garyd203/xray-asyncio
|
6fe8a4de74372a5a914f52fcbfb9b9a390ed290a
|
[
"Apache-2.0"
] | null | null | null |
"""Miscellaneous functions for working with the X-Ray SDK."""
from aws_xray_sdk.core import xray_recorder
# noinspection PyProtectedMember
def has_current_trace() -> bool:
"""Whether there is currently a trace.
This is like calling xray_recorder.get_trace_entity(), but without the
annoying error handling.
"""
# See authoritative implementation in aws_xray_sdk.core.context.Context.get_trace_entity()
return bool(getattr(xray_recorder.context._local, "entities", None))
| 33.266667
| 94
| 0.761523
| 67
| 499
| 5.462687
| 0.701493
| 0.098361
| 0.054645
| 0.076503
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150301
| 499
| 14
| 95
| 35.642857
| 0.863208
| 0.619238
| 0
| 0
| 0
| 0
| 0.048485
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
790519b7959d0e8179d7bf9c0c1de569a69fc55a
| 262
|
py
|
Python
|
HW2/majority_baseline_classifier.py
|
dompuiu/PROEA-821-005-Spring-2018
|
cde4a09a3a60b37a332895a524a7a3f63343e601
|
[
"MIT"
] | null | null | null |
HW2/majority_baseline_classifier.py
|
dompuiu/PROEA-821-005-Spring-2018
|
cde4a09a3a60b37a332895a524a7a3f63343e601
|
[
"MIT"
] | null | null | null |
HW2/majority_baseline_classifier.py
|
dompuiu/PROEA-821-005-Spring-2018
|
cde4a09a3a60b37a332895a524a7a3f63343e601
|
[
"MIT"
] | null | null | null |
from collections import Counter
class MajorityBaselineClassifier:
@staticmethod
def train(_, labels):
c = Counter(labels)
return c.most_common()[0][0]
@staticmethod
def predict(_, majority_label):
return majority_label
| 20.153846
| 36
| 0.675573
| 27
| 262
| 6.37037
| 0.666667
| 0.174419
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010101
| 0.244275
| 262
| 12
| 37
| 21.833333
| 0.858586
| 0
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.111111
| 0.111111
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
79117ce573affdfdcfc7fae4ef3ef37dc2328a7d
| 140
|
py
|
Python
|
easyquotation/__init__.py
|
gitrobi/easyquotation
|
f369b4ee4fd8e7ecc4b4fe55301b82bf892d957a
|
[
"MIT"
] | 9
|
2019-04-12T09:46:32.000Z
|
2022-02-21T13:21:48.000Z
|
easyquotation/__init__.py
|
lipq525/easyquotation
|
a75820db4f05f5386e1c1024d05b0bfc1de6cbda
|
[
"MIT"
] | null | null | null |
easyquotation/__init__.py
|
lipq525/easyquotation
|
a75820db4f05f5386e1c1024d05b0bfc1de6cbda
|
[
"MIT"
] | 2
|
2021-08-14T03:50:02.000Z
|
2022-02-21T13:21:49.000Z
|
# coding:utf8
from .api import *
from .helpers import get_stock_codes, update_stock_codes
__version__ = "0.5.14"
__author__ = "shidenggui"
| 20
| 56
| 0.771429
| 20
| 140
| 4.8
| 0.8
| 0.208333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.040984
| 0.128571
| 140
| 6
| 57
| 23.333333
| 0.745902
| 0.078571
| 0
| 0
| 0
| 0
| 0.125984
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
791769d9ab81aeb2a059e1b5052d3a45397b13cb
| 75
|
py
|
Python
|
tests/example_files/classvar.py
|
kracekumar/pep585-upgrade
|
949a8d6d9afeee4b178ee4a1d534aa174e5adb7d
|
[
"BSD-3-Clause"
] | 10
|
2021-01-14T23:23:27.000Z
|
2021-01-18T06:52:09.000Z
|
tests/example_files/classvar.py
|
kracekumar/pep585-upgrade
|
949a8d6d9afeee4b178ee4a1d534aa174e5adb7d
|
[
"BSD-3-Clause"
] | 1
|
2021-01-17T00:12:54.000Z
|
2021-01-17T00:12:54.000Z
|
tests/example_files/classvar.py
|
sondrelg/pep585-upgrade
|
cc5678ebc6ddf2f1fa17c34d212627474c988e86
|
[
"BSD-3-Clause"
] | null | null | null |
from collections.abc import Generator
x: Generator[str, str, None, None]
| 15
| 37
| 0.76
| 11
| 75
| 5.181818
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146667
| 75
| 4
| 38
| 18.75
| 0.890625
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f73b01975ebb13cdcf0df9646b4dbb50b9335e5a
| 51
|
py
|
Python
|
plugins/holland.backup.pgdump/holland/backup/pgdump/__init__.py
|
a5a351e7/holland
|
58a12a5ce10206eed9434ab42b02217de29784bb
|
[
"BSD-3-Clause"
] | 1
|
2019-06-06T01:07:34.000Z
|
2019-06-06T01:07:34.000Z
|
plugins/holland.backup.pgdump/holland/backup/pgdump/__init__.py
|
a5a351e7/holland
|
58a12a5ce10206eed9434ab42b02217de29784bb
|
[
"BSD-3-Clause"
] | null | null | null |
plugins/holland.backup.pgdump/holland/backup/pgdump/__init__.py
|
a5a351e7/holland
|
58a12a5ce10206eed9434ab42b02217de29784bb
|
[
"BSD-3-Clause"
] | 2
|
2015-12-04T12:17:59.000Z
|
2022-03-23T07:22:02.000Z
|
from holland.backup.pgdump.interface import PgDump
| 25.5
| 50
| 0.862745
| 7
| 51
| 6.285714
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078431
| 51
| 1
| 51
| 51
| 0.93617
| 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
| 0
| 0
|
0
| 4
|
f7725b80874ae57b25717bec41fc24dd4f8bb410
| 314
|
py
|
Python
|
backend/coreapp/util.py
|
ChrisNonyminus/decomp.me
|
b51e8d586ba95bd20f6b2e5881ecc34459e761bc
|
[
"MIT"
] | 47
|
2021-11-05T14:20:58.000Z
|
2022-03-19T18:56:46.000Z
|
backend/coreapp/util.py
|
ChrisNonyminus/decomp.me
|
b51e8d586ba95bd20f6b2e5881ecc34459e761bc
|
[
"MIT"
] | 131
|
2021-10-20T09:17:16.000Z
|
2022-03-31T22:22:54.000Z
|
backend/coreapp/util.py
|
ChrisNonyminus/decomp.me
|
b51e8d586ba95bd20f6b2e5881ecc34459e761bc
|
[
"MIT"
] | 20
|
2021-11-23T18:49:45.000Z
|
2022-03-29T06:25:10.000Z
|
import hashlib
import logging
import time
from typing import Tuple
logger = logging.getLogger(__name__)
_startup_time = int(time.time())
logger.info("Startup time: %s", _startup_time)
def gen_hash(key: Tuple[str, ...]) -> str:
return hashlib.sha256(str(key + (_startup_time,)).encode("utf-8")).hexdigest()
| 22.428571
| 82
| 0.726115
| 44
| 314
| 4.931818
| 0.568182
| 0.202765
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014493
| 0.121019
| 314
| 13
| 83
| 24.153846
| 0.771739
| 0
| 0
| 0
| 0
| 0
| 0.066879
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0
| 0.444444
| 0.111111
| 0.666667
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
f77d042a57248a66eca2b7925c480f281fd321e2
| 23
|
py
|
Python
|
src/version.py
|
copyit/picbed
|
b8790f83bb9fd12cba55ae0387bfaea7b393c71b
|
[
"BSD-3-Clause"
] | 115
|
2019-12-30T11:56:37.000Z
|
2021-01-16T11:29:43.000Z
|
src/version.py
|
copyit/picbed
|
b8790f83bb9fd12cba55ae0387bfaea7b393c71b
|
[
"BSD-3-Clause"
] | 8
|
2020-01-02T15:29:47.000Z
|
2020-07-22T02:37:10.000Z
|
src/version.py
|
copyit/picbed
|
b8790f83bb9fd12cba55ae0387bfaea7b393c71b
|
[
"BSD-3-Clause"
] | 28
|
2020-01-07T06:46:25.000Z
|
2020-11-20T08:49:46.000Z
|
__version__ = "1.13.3"
| 11.5
| 22
| 0.652174
| 4
| 23
| 2.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0.130435
| 23
| 1
| 23
| 23
| 0.35
| 0
| 0
| 0
| 0
| 0
| 0.26087
| 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
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f78dfee9a5b8604d26c3683a2d2a7bda9101c1c3
| 25
|
py
|
Python
|
homeassistant/components/oem/__init__.py
|
domwillcode/home-assistant
|
f170c80bea70c939c098b5c88320a1c789858958
|
[
"Apache-2.0"
] | 30,023
|
2016-04-13T10:17:53.000Z
|
2020-03-02T12:56:31.000Z
|
homeassistant/components/oem/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 31,101
|
2020-03-02T13:00:16.000Z
|
2022-03-31T23:57:36.000Z
|
homeassistant/components/oem/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 11,956
|
2016-04-13T18:42:31.000Z
|
2020-03-02T09:32:12.000Z
|
"""The oem component."""
| 12.5
| 24
| 0.6
| 3
| 25
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 25
| 1
| 25
| 25
| 0.681818
| 0.72
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e3a6c2f7f6923115dbe5bee6523a2112858f4fd5
| 207
|
py
|
Python
|
Lib/site-packages/stripe/api_resources/account_link.py
|
nemarugommula/ecommerce
|
60185e79655fbaf0fcad9e877a886fe9eb3c4451
|
[
"bzip2-1.0.6"
] | 29
|
2019-09-05T18:40:53.000Z
|
2022-03-10T22:00:57.000Z
|
Lib/site-packages/stripe/api_resources/account_link.py
|
nemarugommula/ecommerce
|
60185e79655fbaf0fcad9e877a886fe9eb3c4451
|
[
"bzip2-1.0.6"
] | 14
|
2020-10-03T07:24:50.000Z
|
2021-04-11T14:45:31.000Z
|
Lib/site-packages/stripe/api_resources/account_link.py
|
nemarugommula/ecommerce
|
60185e79655fbaf0fcad9e877a886fe9eb3c4451
|
[
"bzip2-1.0.6"
] | 20
|
2020-10-03T09:49:24.000Z
|
2021-11-25T08:48:30.000Z
|
from __future__ import absolute_import, division, print_function
from stripe.api_resources.abstract import CreateableAPIResource
class AccountLink(CreateableAPIResource):
OBJECT_NAME = "account_link"
| 25.875
| 64
| 0.845411
| 22
| 207
| 7.545455
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10628
| 207
| 7
| 65
| 29.571429
| 0.897297
| 0
| 0
| 0
| 0
| 0
| 0.057971
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
e3aa791c23390df3b05413196bc67a40650362fe
| 164
|
py
|
Python
|
careers/forms.py
|
LABETE/InstitutionalPortal
|
f3dc1e38aef8ddd48618f125ddf0807fb2841312
|
[
"BSD-3-Clause"
] | null | null | null |
careers/forms.py
|
LABETE/InstitutionalPortal
|
f3dc1e38aef8ddd48618f125ddf0807fb2841312
|
[
"BSD-3-Clause"
] | null | null | null |
careers/forms.py
|
LABETE/InstitutionalPortal
|
f3dc1e38aef8ddd48618f125ddf0807fb2841312
|
[
"BSD-3-Clause"
] | null | null | null |
from django import forms
from .models import Career
class CareerForm(forms.ModelForm):
class Meta:
model = Career
fields = ('name', 'code',)
| 16.4
| 34
| 0.646341
| 19
| 164
| 5.578947
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.256098
| 164
| 9
| 35
| 18.222222
| 0.868852
| 0
| 0
| 0
| 0
| 0
| 0.04878
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
e3df1f9d05501e37a239129e0482cf24af6dfd59
| 311
|
py
|
Python
|
r2_1.py
|
wonghoifung/learning-python
|
ad1691be1d185bfff828779a553b2c59d36d16ea
|
[
"MIT"
] | null | null | null |
r2_1.py
|
wonghoifung/learning-python
|
ad1691be1d185bfff828779a553b2c59d36d16ea
|
[
"MIT"
] | null | null | null |
r2_1.py
|
wonghoifung/learning-python
|
ad1691be1d185bfff828779a553b2c59d36d16ea
|
[
"MIT"
] | null | null | null |
import re
line = 'asdf fff; ddd, fffc,baba, zz'
print re.split(r'[;,\s]\s*', line)
arr = [1,2,3,4]
print arr[1::2]
print arr[::1]
print arr[1::]
print arr[::3] # start::step
arr2 = [5,6,7,8,9]
print zip(arr,arr2)
print re.split(r'(;|,|\s)\s*', line)
print re.split(r'(?:;|,|\s)\s*', line)
| 12.958333
| 48
| 0.533762
| 60
| 311
| 2.766667
| 0.45
| 0.096386
| 0.216867
| 0.23494
| 0.5
| 0.343373
| 0.343373
| 0
| 0
| 0
| 0
| 0.063241
| 0.186495
| 311
| 23
| 49
| 13.521739
| 0.592885
| 0.03537
| 0
| 0
| 0
| 0
| 0.241611
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.083333
| null | null | 0.666667
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
5415a902ce078ab06add1c53e0878f68de4fdb8e
| 85
|
py
|
Python
|
conftest.py
|
walmsles/bing-cli-python
|
8d9dff7efea21862060e18e6cb31928cda8f3bab
|
[
"MIT"
] | null | null | null |
conftest.py
|
walmsles/bing-cli-python
|
8d9dff7efea21862060e18e6cb31928cda8f3bab
|
[
"MIT"
] | 4
|
2021-01-02T03:30:01.000Z
|
2021-01-02T04:41:50.000Z
|
conftest.py
|
walmsles/bing-images-python
|
8d9dff7efea21862060e18e6cb31928cda8f3bab
|
[
"MIT"
] | null | null | null |
# required to setup module access for global libraries from this root path for pytest
| 85
| 85
| 0.823529
| 14
| 85
| 5
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164706
| 85
| 1
| 85
| 85
| 0.985915
| 0.976471
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
580f9fb796d9751acb3df2e1d0698874419e38df
| 204
|
py
|
Python
|
hello.py
|
panubo/docker-python-flask-example
|
20cc8b2b31361b2f4a29272475605fcbf1a7c24a
|
[
"MIT"
] | null | null | null |
hello.py
|
panubo/docker-python-flask-example
|
20cc8b2b31361b2f4a29272475605fcbf1a7c24a
|
[
"MIT"
] | null | null | null |
hello.py
|
panubo/docker-python-flask-example
|
20cc8b2b31361b2f4a29272475605fcbf1a7c24a
|
[
"MIT"
] | 1
|
2020-06-18T23:24:25.000Z
|
2020-06-18T23:24:25.000Z
|
# Minimal Flask Application.
# See http://flask.pocoo.org/docs/0.12/quickstart/#a-minimal-application
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
| 22.666667
| 72
| 0.720588
| 29
| 204
| 4.931034
| 0.724138
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.01676
| 0.122549
| 204
| 8
| 73
| 25.5
| 0.782123
| 0.470588
| 0
| 0
| 0
| 0
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
582caa420966f0ea793931526efc6ff5330e72a5
| 118
|
py
|
Python
|
library/library/forms.py
|
buckldav/merit-library
|
1e1bf00a955b1d9b9a34bb4ebc95a7ca7df81a19
|
[
"MIT"
] | null | null | null |
library/library/forms.py
|
buckldav/merit-library
|
1e1bf00a955b1d9b9a34bb4ebc95a7ca7df81a19
|
[
"MIT"
] | null | null | null |
library/library/forms.py
|
buckldav/merit-library
|
1e1bf00a955b1d9b9a34bb4ebc95a7ca7df81a19
|
[
"MIT"
] | null | null | null |
from django import forms
class EmailForm(forms.Form):
your_email = forms.CharField(label='Email', max_length=100)
| 29.5
| 63
| 0.771186
| 17
| 118
| 5.235294
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028846
| 0.118644
| 118
| 4
| 63
| 29.5
| 0.826923
| 0
| 0
| 0
| 0
| 0
| 0.042017
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
583cb3c38c671b8d0df834087566bf2bae905499
| 10,165
|
py
|
Python
|
proj/common/env_pool.py
|
angelolovatto/deep-rl
|
9f0c1aafe71852c8973bf1ab732114a3cdbe23ad
|
[
"MIT"
] | 1
|
2018-11-28T15:21:44.000Z
|
2018-11-28T15:21:44.000Z
|
proj/common/env_pool.py
|
angelolovatto/deep-rl
|
9f0c1aafe71852c8973bf1ab732114a3cdbe23ad
|
[
"MIT"
] | null | null | null |
proj/common/env_pool.py
|
angelolovatto/deep-rl
|
9f0c1aafe71852c8973bf1ab732114a3cdbe23ad
|
[
"MIT"
] | null | null | null |
"""
Vectorized environment wrappers.
"""
import numpy as np
import multiprocessing as mp
import ctypes
from baselines.common.vec_env import VecEnv
def env_worker(env_maker, conn, n_envs):
envs = [env_maker() for _ in range(n_envs)]
try:
while True:
command, data = conn.recv()
if command == "reset":
conn.send([env.reset() for env in envs])
elif command == "seed":
for env, seed in zip(envs, data):
env.seed(int(seed))
elif command == "step":
results = []
for env, action in zip(envs, data):
next_ob, rew, done, info = env.step(action)
if done:
next_ob = env.reset()
results.append((next_ob, rew, done, info))
conn.send(results)
elif command == "get_spaces":
conn.send((envs[0].observation_space, envs[0].action_space))
elif command == "render":
conn.send([env.render(mode="rgb_array") for env in envs])
elif command == "close":
break
else:
raise ValueError("Unrecognized command: {}".format(command))
except KeyboardInterrupt:
print("EnvPool worker: got KeyboardInterrupt")
finally:
conn.close()
for env in envs:
env.close()
class EnvPool(VecEnv):
"""
Uses a pool of workers to run multiple environments in parallel using
mp.Pipe (pickles data). This implementation supports multiple environments
per worker to be as flexible as possible.
"""
def __init__(self, env_maker, n_envs=None, n_parallel=None):
n_envs = n_envs or mp.cpu_count()
n_parallel = n_parallel or mp.cpu_count() / 2
# No point in having more parallel workers than environments
self.n_parallel = n_envs if n_parallel > n_envs else n_parallel
# try to split evenly, but this isn't always possible
num_worker_envs = [
len(d) for d in np.array_split(np.arange(n_envs), self.n_parallel)
]
self.worker_env_seps = np.concatenate([[0], np.cumsum(num_worker_envs)])
self.workers, self.conns = [], []
for num_envs in self.worker_env_seps[1:] - self.worker_env_seps[:-1]:
worker_conn, master_conn = mp.Pipe()
worker = mp.Process(
target=env_worker, args=(env_maker, worker_conn, num_envs)
)
worker.daemon = True
worker.start()
self.workers.append(worker)
self.conns.append(master_conn)
self.conns[0].send(("get_spaces", None))
ob_space, ac_space = self.conns[0].recv()
super().__init__(n_envs, ob_space, ac_space)
self.waiting = False
self.closed = False
# set initial seeds
seeds = np.random.randint(low=0, high=np.iinfo(np.int32).max, size=n_envs)
self.seed(seeds)
def reset(self):
assert not self.closed
if self.waiting:
self.step_wait()
for conn in self.conns:
conn.send(("reset", None))
obs = []
for conn in self.conns:
obs.extend(conn.recv())
return np.stack(obs)
def step_async(self, actions):
assert not self.waiting and not self.closed
for conn, acts in zip(
self.conns, np.split(actions, self.worker_env_seps[1:-1])
):
conn.send(("step", acts))
self.waiting = True
def step_wait(self):
assert self.waiting and not self.closed
results = []
for conn in self.conns:
results.extend(conn.recv())
next_obs, rews, dones, infos = zip(*results)
self.waiting = False
return np.stack(next_obs), np.stack(rews), np.stack(dones), infos
def seed(self, seeds):
assert not self.waiting and not self.closed
for conn, data in zip(self.conns, np.split(seeds, self.worker_env_seps[1:-1])):
conn.send(("seed", data))
def close_extras(self):
if self.waiting:
self.step_wait()
for conn in self.conns:
conn.send(("close", None))
conn.close()
for worker in self.workers:
worker.join()
def get_images(self):
assert not self.waiting and not self.closed
for conn in self.conns:
conn.send(("render", None))
imgs = []
for conn in self.conns:
imgs.extend(conn.recv())
return imgs
_NP_TO_CT = {
np.float32: ctypes.c_float,
np.int32: ctypes.c_int32,
np.int8: ctypes.c_int8,
np.uint8: ctypes.c_char,
np.bool: ctypes.c_bool,
}
def shm_worker(env_maker, conn, n_envs, obs_bufs, obs_shape, obs_dtype):
envs = [env_maker() for _ in range(n_envs)]
def _write_obs(obs):
for ob, obs_buf in zip(obs, obs_bufs):
dst = obs_buf.get_obj()
dst_np = np.frombuffer(dst, dtype=obs_dtype).reshape(obs_shape)
np.copyto(dst_np, ob)
try:
while True:
command, data = conn.recv()
if command == "reset":
conn.send(_write_obs([env.reset() for env in envs]))
elif command == "seed":
for env, seed in zip(envs, data):
env.seed(int(seed))
elif command == "step":
results, obs = [], []
for env, action in zip(envs, data):
ob, rew, done, info = env.step(action)
if done:
ob = env.reset()
results.append((rew, done, info))
obs.append(ob)
_write_obs(obs)
conn.send(results)
elif command == "render":
conn.send([env.render(mode="rgb_array") for env in envs])
elif command == "close":
break
else:
raise RuntimeError("Unrecognized command: {}".format(command))
except KeyboardInterrupt:
print("ShmEnvPool worker: got KeyboardInterrupt")
finally:
conn.close()
for env in envs:
env.close()
class ShmEnvPool(VecEnv):
"""
Uses a pool of workers to run multiple environments in parallel using shared
memory to pass observations. This implementation supports multiple
environments per worker to be as flexible as possible.
"""
def __init__(self, env_maker, n_envs=None, n_parallel=None):
n_envs = n_envs or mp.cpu_count()
n_parallel = n_parallel or mp.cpu_count() / 2
dummy = env_maker()
ob_space, ac_space = dummy.observation_space, dummy.action_space
del dummy
super().__init__(n_envs, ob_space, ac_space)
# No point in having more parallel workers than environments
self.n_parallel = n_envs if n_parallel > n_envs else n_parallel
# try to split evenly, but this isn't always possible
num_worker_envs = [
len(d) for d in np.array_split(np.arange(n_envs), self.n_parallel)
]
self.worker_env_seps = np.concatenate([[0], np.cumsum(num_worker_envs)])
self.obs_dtype, self.obs_shape = ob_space.dtype, ob_space.shape
self.obs_bufs = []
for _ in range(n_envs):
self.obs_bufs.append(
mp.Array(_NP_TO_CT[ob_space.dtype.type], int(np.prod(ob_space.shape)))
)
self.workers, self.conns = [], []
for beg, end in zip(self.worker_env_seps[:-1], self.worker_env_seps[1:]):
worker_conn, master_conn = mp.Pipe()
worker = mp.Process(
target=shm_worker,
args=(
env_maker,
worker_conn,
end - beg,
self.obs_bufs[beg:end],
ob_space.shape,
ob_space.dtype,
),
)
worker.daemon = True
worker.start()
self.workers.append(worker)
self.conns.append(master_conn)
self.waiting = False
self.closed = False
# set initial seeds
seeds = np.random.randint(low=0, high=np.iinfo(np.int32).max, size=n_envs)
self.seed(seeds)
def reset(self):
assert not self.closed
if self.waiting:
self.step_wait()
for conn in self.conns:
conn.send(("reset", None))
for conn in self.conns:
conn.recv()
return self._decode_obses()
def step_async(self, actions):
assert not self.waiting and not self.closed
for conn, acts in zip(
self.conns, np.split(actions, self.worker_env_seps[1:-1])
):
conn.send(("step", acts))
self.waiting = True
def step_wait(self):
assert self.waiting and not self.closed
results = []
for conn in self.conns:
results.extend(conn.recv())
rews, dones, infos = zip(*results)
self.waiting = False
return self._decode_obses(), np.stack(rews), np.stack(dones), infos
def seed(self, seeds):
assert not self.waiting and not self.closed
for conn, data in zip(self.conns, np.split(seeds, self.worker_env_seps[1:-1])):
conn.send(("seed", data))
def close_extras(self):
if self.waiting:
self.step_wait()
for conn in self.conns:
conn.send(("close", None))
conn.close()
for worker in self.workers:
worker.join()
self.obs_bufs.clear()
def get_images(self):
assert not self.waiting and not self.closed
for conn in self.conns:
conn.send(("render", None))
imgs = []
for conn in self.conns:
imgs.extend(conn.recv())
return imgs
def _decode_obses(self):
results = [
np.frombuffer(b.get_obj(), dtype=self.obs_dtype).reshape(self.obs_shape)
for b in self.obs_bufs
]
return np.stack(results)
| 33.996656
| 87
| 0.559272
| 1,295
| 10,165
| 4.239382
| 0.148263
| 0.036066
| 0.019672
| 0.028415
| 0.797632
| 0.76102
| 0.738434
| 0.707468
| 0.687432
| 0.659016
| 0
| 0.005169
| 0.333891
| 10,165
| 298
| 88
| 34.110738
| 0.805642
| 0.066601
| 0
| 0.670782
| 0
| 0
| 0.027468
| 0
| 0
| 0
| 0
| 0
| 0.041152
| 1
| 0.074074
| false
| 0
| 0.016461
| 0
| 0.127572
| 0.00823
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
587da1c6309fc368a3ef18f52dfdc8bfe11c473c
| 28
|
py
|
Python
|
homeassistant/components/temper/__init__.py
|
domwillcode/home-assistant
|
f170c80bea70c939c098b5c88320a1c789858958
|
[
"Apache-2.0"
] | 30,023
|
2016-04-13T10:17:53.000Z
|
2020-03-02T12:56:31.000Z
|
homeassistant/components/temper/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 31,101
|
2020-03-02T13:00:16.000Z
|
2022-03-31T23:57:36.000Z
|
homeassistant/components/temper/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 11,956
|
2016-04-13T18:42:31.000Z
|
2020-03-02T09:32:12.000Z
|
"""The temper component."""
| 14
| 27
| 0.642857
| 3
| 28
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107143
| 28
| 1
| 28
| 28
| 0.72
| 0.75
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
587eba887ada9db2683d7f83a9037b3b1715a7d8
| 74
|
py
|
Python
|
celery_tasks/__init__.py
|
wdy-exceedteam/celery-tasks
|
3a66ac6a391286dfe6aba223b11d649f3bbe8bcc
|
[
"MIT"
] | null | null | null |
celery_tasks/__init__.py
|
wdy-exceedteam/celery-tasks
|
3a66ac6a391286dfe6aba223b11d649f3bbe8bcc
|
[
"MIT"
] | null | null | null |
celery_tasks/__init__.py
|
wdy-exceedteam/celery-tasks
|
3a66ac6a391286dfe6aba223b11d649f3bbe8bcc
|
[
"MIT"
] | null | null | null |
from .celery_settings import app as celery_app
__all__ = ('celery_app',)
| 18.5
| 46
| 0.77027
| 11
| 74
| 4.545455
| 0.636364
| 0.36
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135135
| 74
| 3
| 47
| 24.666667
| 0.78125
| 0
| 0
| 0
| 0
| 0
| 0.135135
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
588a2bf98811dc20503666ed93519b5cba2f7497
| 631
|
py
|
Python
|
210322/step_1.py
|
kurganITteacher/python-adv
|
3ebc048598eea00f12ebdb6a502b2455465a04c0
|
[
"Apache-2.0"
] | 1
|
2021-09-02T10:21:35.000Z
|
2021-09-02T10:21:35.000Z
|
210322/step_1.py
|
kurganITteacher/python-adv
|
3ebc048598eea00f12ebdb6a502b2455465a04c0
|
[
"Apache-2.0"
] | null | null | null |
210322/step_1.py
|
kurganITteacher/python-adv
|
3ebc048598eea00f12ebdb6a502b2455465a04c0
|
[
"Apache-2.0"
] | 2
|
2021-03-14T07:44:18.000Z
|
2021-04-25T18:18:02.000Z
|
BASE_DIR = './'
environ = {
'KPK_DATA': '/home/kpk/data',
'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
}
KPK_DATA = environ.get('KPK_DATA')
# print(KPK_DATA)
# _KPK_DATA = environ['KPK_DATA']
# print(_KPK_DATA)
# os.environ.get('KPK_DATA') or BASE_DIR
#
# os.environ.get('KPK_DATA') if os.environ.get('KPK_DATA') else BASE_DIR
# ROOT = os.environ.get('KPK_DATA') if os.environ.get('KPK_DATA') else BASE_DIR
pass
if KPK_DATA:
ROOT = KPK_DATA
else:
ROOT = BASE_DIR
print(ROOT)
pass
ROOT = KPK_DATA if KPK_DATA else BASE_DIR
print(ROOT)
pass
ROOT = KPK_DATA or BASE_DIR
print(ROOT)
| 17.527778
| 79
| 0.686212
| 109
| 631
| 3.733945
| 0.174312
| 0.309582
| 0.191646
| 0.250614
| 0.614251
| 0.402948
| 0.402948
| 0.402948
| 0.250614
| 0.250614
| 0
| 0
| 0.14897
| 631
| 35
| 80
| 18.028571
| 0.757914
| 0.399366
| 0
| 0.333333
| 0
| 0.055556
| 0.259459
| 0.162162
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.166667
| 0
| 0
| 0
| 0.166667
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
588fcf94539570766e2c4d1b778df3fab0e51522
| 73
|
py
|
Python
|
lang/py/pylib/code/pdb/pdb_break_remote.py
|
ch1huizong/learning
|
632267634a9fd84a5f5116de09ff1e2681a6cc85
|
[
"MIT"
] | 13
|
2020-01-04T07:37:38.000Z
|
2021-08-31T05:19:58.000Z
|
lang/py/pylib/code/pdb/pdb_break_remote.py
|
ch1huizong/learning
|
632267634a9fd84a5f5116de09ff1e2681a6cc85
|
[
"MIT"
] | 3
|
2020-06-05T22:42:53.000Z
|
2020-08-24T07:18:54.000Z
|
lang/py/pylib/code/pdb/pdb_break_remote.py
|
ch1huizong/learning
|
632267634a9fd84a5f5116de09ff1e2681a6cc85
|
[
"MIT"
] | 9
|
2020-10-19T04:53:06.000Z
|
2021-08-31T05:20:01.000Z
|
#!/usr/bin/env python
# encoding: utf-8
from pdb_break import f
f(5)
| 8.111111
| 23
| 0.671233
| 14
| 73
| 3.428571
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033898
| 0.191781
| 73
| 8
| 24
| 9.125
| 0.779661
| 0.493151
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
58a2209ff4bc45709af505e882fa9ec6a66086b3
| 68
|
py
|
Python
|
resolwe_bio/expression_filters/__init__.py
|
gregorjerse/resolwe-bio
|
80f1e354cf0014a1eeff00acc112c622a2a044a9
|
[
"Apache-2.0"
] | 12
|
2015-12-07T18:29:27.000Z
|
2022-03-16T08:00:18.000Z
|
resolwe_bio/expression_filters/__init__.py
|
gregorjerse/resolwe-bio
|
80f1e354cf0014a1eeff00acc112c622a2a044a9
|
[
"Apache-2.0"
] | 480
|
2015-11-20T21:46:43.000Z
|
2022-03-28T12:40:57.000Z
|
resolwe_bio/expression_filters/__init__.py
|
gregorjerse/resolwe-bio
|
80f1e354cf0014a1eeff00acc112c622a2a044a9
|
[
"Apache-2.0"
] | 45
|
2015-11-19T14:54:07.000Z
|
2022-02-13T21:36:50.000Z
|
"""Additional expression filters for Resolwe expression engines."""
| 34
| 67
| 0.794118
| 7
| 68
| 7.714286
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102941
| 68
| 1
| 68
| 68
| 0.885246
| 0.897059
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
58a3b7bb3cd99dcfbc3a5ef47149df03d747598d
| 51,595
|
py
|
Python
|
gcloud/bigtable/_generated/bigtable_data_pb2.py
|
scrapinghub/gcloud-python
|
1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29
|
[
"Apache-2.0"
] | null | null | null |
gcloud/bigtable/_generated/bigtable_data_pb2.py
|
scrapinghub/gcloud-python
|
1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29
|
[
"Apache-2.0"
] | null | null | null |
gcloud/bigtable/_generated/bigtable_data_pb2.py
|
scrapinghub/gcloud-python
|
1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29
|
[
"Apache-2.0"
] | 2
|
2017-07-30T16:18:23.000Z
|
2020-10-14T11:24:18.000Z
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/bigtable/v1/bigtable_data.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='google/bigtable/v1/bigtable_data.proto',
package='google.bigtable.v1',
syntax='proto3',
serialized_pb=b'\n&google/bigtable/v1/bigtable_data.proto\x12\x12google.bigtable.v1\"@\n\x03Row\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12,\n\x08\x66\x61milies\x18\x02 \x03(\x0b\x32\x1a.google.bigtable.v1.Family\"C\n\x06\x46\x61mily\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x1a.google.bigtable.v1.Column\"D\n\x06\x43olumn\x12\x11\n\tqualifier\x18\x01 \x01(\x0c\x12\'\n\x05\x63\x65lls\x18\x02 \x03(\x0b\x32\x18.google.bigtable.v1.Cell\"?\n\x04\x43\x65ll\x12\x18\n\x10timestamp_micros\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x0e\n\x06labels\x18\x03 \x03(\t\".\n\x08RowRange\x12\x11\n\tstart_key\x18\x02 \x01(\x0c\x12\x0f\n\x07\x65nd_key\x18\x03 \x01(\x0c\"\xd6\x01\n\x0b\x43olumnRange\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12#\n\x19start_qualifier_inclusive\x18\x02 \x01(\x0cH\x00\x12#\n\x19start_qualifier_exclusive\x18\x03 \x01(\x0cH\x00\x12!\n\x17\x65nd_qualifier_inclusive\x18\x04 \x01(\x0cH\x01\x12!\n\x17\x65nd_qualifier_exclusive\x18\x05 \x01(\x0cH\x01\x42\x11\n\x0fstart_qualifierB\x0f\n\rend_qualifier\"N\n\x0eTimestampRange\x12\x1e\n\x16start_timestamp_micros\x18\x01 \x01(\x03\x12\x1c\n\x14\x65nd_timestamp_micros\x18\x02 \x01(\x03\"\xa8\x01\n\nValueRange\x12\x1f\n\x15start_value_inclusive\x18\x01 \x01(\x0cH\x00\x12\x1f\n\x15start_value_exclusive\x18\x02 \x01(\x0cH\x00\x12\x1d\n\x13\x65nd_value_inclusive\x18\x03 \x01(\x0cH\x01\x12\x1d\n\x13\x65nd_value_exclusive\x18\x04 \x01(\x0cH\x01\x42\r\n\x0bstart_valueB\x0b\n\tend_value\"\xdf\x08\n\tRowFilter\x12\x34\n\x05\x63hain\x18\x01 \x01(\x0b\x32#.google.bigtable.v1.RowFilter.ChainH\x00\x12>\n\ninterleave\x18\x02 \x01(\x0b\x32(.google.bigtable.v1.RowFilter.InterleaveH\x00\x12<\n\tcondition\x18\x03 \x01(\x0b\x32\'.google.bigtable.v1.RowFilter.ConditionH\x00\x12\x0e\n\x04sink\x18\x10 \x01(\x08H\x00\x12\x19\n\x0fpass_all_filter\x18\x11 \x01(\x08H\x00\x12\x1a\n\x10\x62lock_all_filter\x18\x12 \x01(\x08H\x00\x12\x1e\n\x14row_key_regex_filter\x18\x04 \x01(\x0cH\x00\x12\x1b\n\x11row_sample_filter\x18\x0e \x01(\x01H\x00\x12\"\n\x18\x66\x61mily_name_regex_filter\x18\x05 \x01(\tH\x00\x12\'\n\x1d\x63olumn_qualifier_regex_filter\x18\x06 \x01(\x0cH\x00\x12>\n\x13\x63olumn_range_filter\x18\x07 \x01(\x0b\x32\x1f.google.bigtable.v1.ColumnRangeH\x00\x12\x44\n\x16timestamp_range_filter\x18\x08 \x01(\x0b\x32\".google.bigtable.v1.TimestampRangeH\x00\x12\x1c\n\x12value_regex_filter\x18\t \x01(\x0cH\x00\x12<\n\x12value_range_filter\x18\x0f \x01(\x0b\x32\x1e.google.bigtable.v1.ValueRangeH\x00\x12%\n\x1b\x63\x65lls_per_row_offset_filter\x18\n \x01(\x05H\x00\x12$\n\x1a\x63\x65lls_per_row_limit_filter\x18\x0b \x01(\x05H\x00\x12\'\n\x1d\x63\x65lls_per_column_limit_filter\x18\x0c \x01(\x05H\x00\x12!\n\x17strip_value_transformer\x18\r \x01(\x08H\x00\x12!\n\x17\x61pply_label_transformer\x18\x13 \x01(\tH\x00\x1a\x37\n\x05\x43hain\x12.\n\x07\x66ilters\x18\x01 \x03(\x0b\x32\x1d.google.bigtable.v1.RowFilter\x1a<\n\nInterleave\x12.\n\x07\x66ilters\x18\x01 \x03(\x0b\x32\x1d.google.bigtable.v1.RowFilter\x1a\xad\x01\n\tCondition\x12\x37\n\x10predicate_filter\x18\x01 \x01(\x0b\x32\x1d.google.bigtable.v1.RowFilter\x12\x32\n\x0btrue_filter\x18\x02 \x01(\x0b\x32\x1d.google.bigtable.v1.RowFilter\x12\x33\n\x0c\x66\x61lse_filter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v1.RowFilterB\x08\n\x06\x66ilter\"\xc9\x04\n\x08Mutation\x12\x38\n\x08set_cell\x18\x01 \x01(\x0b\x32$.google.bigtable.v1.Mutation.SetCellH\x00\x12K\n\x12\x64\x65lete_from_column\x18\x02 \x01(\x0b\x32-.google.bigtable.v1.Mutation.DeleteFromColumnH\x00\x12K\n\x12\x64\x65lete_from_family\x18\x03 \x01(\x0b\x32-.google.bigtable.v1.Mutation.DeleteFromFamilyH\x00\x12\x45\n\x0f\x64\x65lete_from_row\x18\x04 \x01(\x0b\x32*.google.bigtable.v1.Mutation.DeleteFromRowH\x00\x1a\x61\n\x07SetCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x18\n\x10timestamp_micros\x18\x03 \x01(\x03\x12\r\n\x05value\x18\x04 \x01(\x0c\x1ay\n\x10\x44\x65leteFromColumn\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x36\n\ntime_range\x18\x03 \x01(\x0b\x32\".google.bigtable.v1.TimestampRange\x1a\'\n\x10\x44\x65leteFromFamily\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x1a\x0f\n\rDeleteFromRowB\n\n\x08mutation\"\x80\x01\n\x13ReadModifyWriteRule\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x16\n\x0c\x61ppend_value\x18\x03 \x01(\x0cH\x00\x12\x1a\n\x10increment_amount\x18\x04 \x01(\x03H\x00\x42\x06\n\x04ruleB-\n\x16\x63om.google.bigtable.v1B\x11\x42igtableDataProtoP\x01\x62\x06proto3'
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_ROW = _descriptor.Descriptor(
name='Row',
full_name='google.bigtable.v1.Row',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='google.bigtable.v1.Row.key', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='families', full_name='google.bigtable.v1.Row.families', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=62,
serialized_end=126,
)
_FAMILY = _descriptor.Descriptor(
name='Family',
full_name='google.bigtable.v1.Family',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='google.bigtable.v1.Family.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='columns', full_name='google.bigtable.v1.Family.columns', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=128,
serialized_end=195,
)
_COLUMN = _descriptor.Descriptor(
name='Column',
full_name='google.bigtable.v1.Column',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='qualifier', full_name='google.bigtable.v1.Column.qualifier', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cells', full_name='google.bigtable.v1.Column.cells', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=197,
serialized_end=265,
)
_CELL = _descriptor.Descriptor(
name='Cell',
full_name='google.bigtable.v1.Cell',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='timestamp_micros', full_name='google.bigtable.v1.Cell.timestamp_micros', index=0,
number=1, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='value', full_name='google.bigtable.v1.Cell.value', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='labels', full_name='google.bigtable.v1.Cell.labels', index=2,
number=3, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=267,
serialized_end=330,
)
_ROWRANGE = _descriptor.Descriptor(
name='RowRange',
full_name='google.bigtable.v1.RowRange',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='start_key', full_name='google.bigtable.v1.RowRange.start_key', index=0,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='end_key', full_name='google.bigtable.v1.RowRange.end_key', index=1,
number=3, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=332,
serialized_end=378,
)
_COLUMNRANGE = _descriptor.Descriptor(
name='ColumnRange',
full_name='google.bigtable.v1.ColumnRange',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='family_name', full_name='google.bigtable.v1.ColumnRange.family_name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='start_qualifier_inclusive', full_name='google.bigtable.v1.ColumnRange.start_qualifier_inclusive', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='start_qualifier_exclusive', full_name='google.bigtable.v1.ColumnRange.start_qualifier_exclusive', index=2,
number=3, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='end_qualifier_inclusive', full_name='google.bigtable.v1.ColumnRange.end_qualifier_inclusive', index=3,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='end_qualifier_exclusive', full_name='google.bigtable.v1.ColumnRange.end_qualifier_exclusive', index=4,
number=5, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='start_qualifier', full_name='google.bigtable.v1.ColumnRange.start_qualifier',
index=0, containing_type=None, fields=[]),
_descriptor.OneofDescriptor(
name='end_qualifier', full_name='google.bigtable.v1.ColumnRange.end_qualifier',
index=1, containing_type=None, fields=[]),
],
serialized_start=381,
serialized_end=595,
)
_TIMESTAMPRANGE = _descriptor.Descriptor(
name='TimestampRange',
full_name='google.bigtable.v1.TimestampRange',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='start_timestamp_micros', full_name='google.bigtable.v1.TimestampRange.start_timestamp_micros', index=0,
number=1, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='end_timestamp_micros', full_name='google.bigtable.v1.TimestampRange.end_timestamp_micros', index=1,
number=2, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=597,
serialized_end=675,
)
_VALUERANGE = _descriptor.Descriptor(
name='ValueRange',
full_name='google.bigtable.v1.ValueRange',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='start_value_inclusive', full_name='google.bigtable.v1.ValueRange.start_value_inclusive', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='start_value_exclusive', full_name='google.bigtable.v1.ValueRange.start_value_exclusive', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='end_value_inclusive', full_name='google.bigtable.v1.ValueRange.end_value_inclusive', index=2,
number=3, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='end_value_exclusive', full_name='google.bigtable.v1.ValueRange.end_value_exclusive', index=3,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='start_value', full_name='google.bigtable.v1.ValueRange.start_value',
index=0, containing_type=None, fields=[]),
_descriptor.OneofDescriptor(
name='end_value', full_name='google.bigtable.v1.ValueRange.end_value',
index=1, containing_type=None, fields=[]),
],
serialized_start=678,
serialized_end=846,
)
_ROWFILTER_CHAIN = _descriptor.Descriptor(
name='Chain',
full_name='google.bigtable.v1.RowFilter.Chain',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='filters', full_name='google.bigtable.v1.RowFilter.Chain.filters', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1665,
serialized_end=1720,
)
_ROWFILTER_INTERLEAVE = _descriptor.Descriptor(
name='Interleave',
full_name='google.bigtable.v1.RowFilter.Interleave',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='filters', full_name='google.bigtable.v1.RowFilter.Interleave.filters', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1722,
serialized_end=1782,
)
_ROWFILTER_CONDITION = _descriptor.Descriptor(
name='Condition',
full_name='google.bigtable.v1.RowFilter.Condition',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='predicate_filter', full_name='google.bigtable.v1.RowFilter.Condition.predicate_filter', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='true_filter', full_name='google.bigtable.v1.RowFilter.Condition.true_filter', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='false_filter', full_name='google.bigtable.v1.RowFilter.Condition.false_filter', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1785,
serialized_end=1958,
)
_ROWFILTER = _descriptor.Descriptor(
name='RowFilter',
full_name='google.bigtable.v1.RowFilter',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='chain', full_name='google.bigtable.v1.RowFilter.chain', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='interleave', full_name='google.bigtable.v1.RowFilter.interleave', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='condition', full_name='google.bigtable.v1.RowFilter.condition', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='sink', full_name='google.bigtable.v1.RowFilter.sink', index=3,
number=16, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='pass_all_filter', full_name='google.bigtable.v1.RowFilter.pass_all_filter', index=4,
number=17, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='block_all_filter', full_name='google.bigtable.v1.RowFilter.block_all_filter', index=5,
number=18, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='row_key_regex_filter', full_name='google.bigtable.v1.RowFilter.row_key_regex_filter', index=6,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='row_sample_filter', full_name='google.bigtable.v1.RowFilter.row_sample_filter', index=7,
number=14, type=1, cpp_type=5, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='family_name_regex_filter', full_name='google.bigtable.v1.RowFilter.family_name_regex_filter', index=8,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='column_qualifier_regex_filter', full_name='google.bigtable.v1.RowFilter.column_qualifier_regex_filter', index=9,
number=6, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='column_range_filter', full_name='google.bigtable.v1.RowFilter.column_range_filter', index=10,
number=7, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='timestamp_range_filter', full_name='google.bigtable.v1.RowFilter.timestamp_range_filter', index=11,
number=8, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='value_regex_filter', full_name='google.bigtable.v1.RowFilter.value_regex_filter', index=12,
number=9, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='value_range_filter', full_name='google.bigtable.v1.RowFilter.value_range_filter', index=13,
number=15, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cells_per_row_offset_filter', full_name='google.bigtable.v1.RowFilter.cells_per_row_offset_filter', index=14,
number=10, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cells_per_row_limit_filter', full_name='google.bigtable.v1.RowFilter.cells_per_row_limit_filter', index=15,
number=11, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cells_per_column_limit_filter', full_name='google.bigtable.v1.RowFilter.cells_per_column_limit_filter', index=16,
number=12, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='strip_value_transformer', full_name='google.bigtable.v1.RowFilter.strip_value_transformer', index=17,
number=13, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='apply_label_transformer', full_name='google.bigtable.v1.RowFilter.apply_label_transformer', index=18,
number=19, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_ROWFILTER_CHAIN, _ROWFILTER_INTERLEAVE, _ROWFILTER_CONDITION, ],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='filter', full_name='google.bigtable.v1.RowFilter.filter',
index=0, containing_type=None, fields=[]),
],
serialized_start=849,
serialized_end=1968,
)
_MUTATION_SETCELL = _descriptor.Descriptor(
name='SetCell',
full_name='google.bigtable.v1.Mutation.SetCell',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='family_name', full_name='google.bigtable.v1.Mutation.SetCell.family_name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='column_qualifier', full_name='google.bigtable.v1.Mutation.SetCell.column_qualifier', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='timestamp_micros', full_name='google.bigtable.v1.Mutation.SetCell.timestamp_micros', index=2,
number=3, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='value', full_name='google.bigtable.v1.Mutation.SetCell.value', index=3,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2266,
serialized_end=2363,
)
_MUTATION_DELETEFROMCOLUMN = _descriptor.Descriptor(
name='DeleteFromColumn',
full_name='google.bigtable.v1.Mutation.DeleteFromColumn',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='family_name', full_name='google.bigtable.v1.Mutation.DeleteFromColumn.family_name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='column_qualifier', full_name='google.bigtable.v1.Mutation.DeleteFromColumn.column_qualifier', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='time_range', full_name='google.bigtable.v1.Mutation.DeleteFromColumn.time_range', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2365,
serialized_end=2486,
)
_MUTATION_DELETEFROMFAMILY = _descriptor.Descriptor(
name='DeleteFromFamily',
full_name='google.bigtable.v1.Mutation.DeleteFromFamily',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='family_name', full_name='google.bigtable.v1.Mutation.DeleteFromFamily.family_name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2488,
serialized_end=2527,
)
_MUTATION_DELETEFROMROW = _descriptor.Descriptor(
name='DeleteFromRow',
full_name='google.bigtable.v1.Mutation.DeleteFromRow',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2529,
serialized_end=2544,
)
_MUTATION = _descriptor.Descriptor(
name='Mutation',
full_name='google.bigtable.v1.Mutation',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='set_cell', full_name='google.bigtable.v1.Mutation.set_cell', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='delete_from_column', full_name='google.bigtable.v1.Mutation.delete_from_column', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='delete_from_family', full_name='google.bigtable.v1.Mutation.delete_from_family', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='delete_from_row', full_name='google.bigtable.v1.Mutation.delete_from_row', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_MUTATION_SETCELL, _MUTATION_DELETEFROMCOLUMN, _MUTATION_DELETEFROMFAMILY, _MUTATION_DELETEFROMROW, ],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='mutation', full_name='google.bigtable.v1.Mutation.mutation',
index=0, containing_type=None, fields=[]),
],
serialized_start=1971,
serialized_end=2556,
)
_READMODIFYWRITERULE = _descriptor.Descriptor(
name='ReadModifyWriteRule',
full_name='google.bigtable.v1.ReadModifyWriteRule',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='family_name', full_name='google.bigtable.v1.ReadModifyWriteRule.family_name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='column_qualifier', full_name='google.bigtable.v1.ReadModifyWriteRule.column_qualifier', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='append_value', full_name='google.bigtable.v1.ReadModifyWriteRule.append_value', index=2,
number=3, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='increment_amount', full_name='google.bigtable.v1.ReadModifyWriteRule.increment_amount', index=3,
number=4, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='rule', full_name='google.bigtable.v1.ReadModifyWriteRule.rule',
index=0, containing_type=None, fields=[]),
],
serialized_start=2559,
serialized_end=2687,
)
_ROW.fields_by_name['families'].message_type = _FAMILY
_FAMILY.fields_by_name['columns'].message_type = _COLUMN
_COLUMN.fields_by_name['cells'].message_type = _CELL
_COLUMNRANGE.oneofs_by_name['start_qualifier'].fields.append(
_COLUMNRANGE.fields_by_name['start_qualifier_inclusive'])
_COLUMNRANGE.fields_by_name['start_qualifier_inclusive'].containing_oneof = _COLUMNRANGE.oneofs_by_name['start_qualifier']
_COLUMNRANGE.oneofs_by_name['start_qualifier'].fields.append(
_COLUMNRANGE.fields_by_name['start_qualifier_exclusive'])
_COLUMNRANGE.fields_by_name['start_qualifier_exclusive'].containing_oneof = _COLUMNRANGE.oneofs_by_name['start_qualifier']
_COLUMNRANGE.oneofs_by_name['end_qualifier'].fields.append(
_COLUMNRANGE.fields_by_name['end_qualifier_inclusive'])
_COLUMNRANGE.fields_by_name['end_qualifier_inclusive'].containing_oneof = _COLUMNRANGE.oneofs_by_name['end_qualifier']
_COLUMNRANGE.oneofs_by_name['end_qualifier'].fields.append(
_COLUMNRANGE.fields_by_name['end_qualifier_exclusive'])
_COLUMNRANGE.fields_by_name['end_qualifier_exclusive'].containing_oneof = _COLUMNRANGE.oneofs_by_name['end_qualifier']
_VALUERANGE.oneofs_by_name['start_value'].fields.append(
_VALUERANGE.fields_by_name['start_value_inclusive'])
_VALUERANGE.fields_by_name['start_value_inclusive'].containing_oneof = _VALUERANGE.oneofs_by_name['start_value']
_VALUERANGE.oneofs_by_name['start_value'].fields.append(
_VALUERANGE.fields_by_name['start_value_exclusive'])
_VALUERANGE.fields_by_name['start_value_exclusive'].containing_oneof = _VALUERANGE.oneofs_by_name['start_value']
_VALUERANGE.oneofs_by_name['end_value'].fields.append(
_VALUERANGE.fields_by_name['end_value_inclusive'])
_VALUERANGE.fields_by_name['end_value_inclusive'].containing_oneof = _VALUERANGE.oneofs_by_name['end_value']
_VALUERANGE.oneofs_by_name['end_value'].fields.append(
_VALUERANGE.fields_by_name['end_value_exclusive'])
_VALUERANGE.fields_by_name['end_value_exclusive'].containing_oneof = _VALUERANGE.oneofs_by_name['end_value']
_ROWFILTER_CHAIN.fields_by_name['filters'].message_type = _ROWFILTER
_ROWFILTER_CHAIN.containing_type = _ROWFILTER
_ROWFILTER_INTERLEAVE.fields_by_name['filters'].message_type = _ROWFILTER
_ROWFILTER_INTERLEAVE.containing_type = _ROWFILTER
_ROWFILTER_CONDITION.fields_by_name['predicate_filter'].message_type = _ROWFILTER
_ROWFILTER_CONDITION.fields_by_name['true_filter'].message_type = _ROWFILTER
_ROWFILTER_CONDITION.fields_by_name['false_filter'].message_type = _ROWFILTER
_ROWFILTER_CONDITION.containing_type = _ROWFILTER
_ROWFILTER.fields_by_name['chain'].message_type = _ROWFILTER_CHAIN
_ROWFILTER.fields_by_name['interleave'].message_type = _ROWFILTER_INTERLEAVE
_ROWFILTER.fields_by_name['condition'].message_type = _ROWFILTER_CONDITION
_ROWFILTER.fields_by_name['column_range_filter'].message_type = _COLUMNRANGE
_ROWFILTER.fields_by_name['timestamp_range_filter'].message_type = _TIMESTAMPRANGE
_ROWFILTER.fields_by_name['value_range_filter'].message_type = _VALUERANGE
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['chain'])
_ROWFILTER.fields_by_name['chain'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['interleave'])
_ROWFILTER.fields_by_name['interleave'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['condition'])
_ROWFILTER.fields_by_name['condition'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['sink'])
_ROWFILTER.fields_by_name['sink'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['pass_all_filter'])
_ROWFILTER.fields_by_name['pass_all_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['block_all_filter'])
_ROWFILTER.fields_by_name['block_all_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['row_key_regex_filter'])
_ROWFILTER.fields_by_name['row_key_regex_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['row_sample_filter'])
_ROWFILTER.fields_by_name['row_sample_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['family_name_regex_filter'])
_ROWFILTER.fields_by_name['family_name_regex_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['column_qualifier_regex_filter'])
_ROWFILTER.fields_by_name['column_qualifier_regex_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['column_range_filter'])
_ROWFILTER.fields_by_name['column_range_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['timestamp_range_filter'])
_ROWFILTER.fields_by_name['timestamp_range_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['value_regex_filter'])
_ROWFILTER.fields_by_name['value_regex_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['value_range_filter'])
_ROWFILTER.fields_by_name['value_range_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['cells_per_row_offset_filter'])
_ROWFILTER.fields_by_name['cells_per_row_offset_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['cells_per_row_limit_filter'])
_ROWFILTER.fields_by_name['cells_per_row_limit_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['cells_per_column_limit_filter'])
_ROWFILTER.fields_by_name['cells_per_column_limit_filter'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['strip_value_transformer'])
_ROWFILTER.fields_by_name['strip_value_transformer'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_ROWFILTER.oneofs_by_name['filter'].fields.append(
_ROWFILTER.fields_by_name['apply_label_transformer'])
_ROWFILTER.fields_by_name['apply_label_transformer'].containing_oneof = _ROWFILTER.oneofs_by_name['filter']
_MUTATION_SETCELL.containing_type = _MUTATION
_MUTATION_DELETEFROMCOLUMN.fields_by_name['time_range'].message_type = _TIMESTAMPRANGE
_MUTATION_DELETEFROMCOLUMN.containing_type = _MUTATION
_MUTATION_DELETEFROMFAMILY.containing_type = _MUTATION
_MUTATION_DELETEFROMROW.containing_type = _MUTATION
_MUTATION.fields_by_name['set_cell'].message_type = _MUTATION_SETCELL
_MUTATION.fields_by_name['delete_from_column'].message_type = _MUTATION_DELETEFROMCOLUMN
_MUTATION.fields_by_name['delete_from_family'].message_type = _MUTATION_DELETEFROMFAMILY
_MUTATION.fields_by_name['delete_from_row'].message_type = _MUTATION_DELETEFROMROW
_MUTATION.oneofs_by_name['mutation'].fields.append(
_MUTATION.fields_by_name['set_cell'])
_MUTATION.fields_by_name['set_cell'].containing_oneof = _MUTATION.oneofs_by_name['mutation']
_MUTATION.oneofs_by_name['mutation'].fields.append(
_MUTATION.fields_by_name['delete_from_column'])
_MUTATION.fields_by_name['delete_from_column'].containing_oneof = _MUTATION.oneofs_by_name['mutation']
_MUTATION.oneofs_by_name['mutation'].fields.append(
_MUTATION.fields_by_name['delete_from_family'])
_MUTATION.fields_by_name['delete_from_family'].containing_oneof = _MUTATION.oneofs_by_name['mutation']
_MUTATION.oneofs_by_name['mutation'].fields.append(
_MUTATION.fields_by_name['delete_from_row'])
_MUTATION.fields_by_name['delete_from_row'].containing_oneof = _MUTATION.oneofs_by_name['mutation']
_READMODIFYWRITERULE.oneofs_by_name['rule'].fields.append(
_READMODIFYWRITERULE.fields_by_name['append_value'])
_READMODIFYWRITERULE.fields_by_name['append_value'].containing_oneof = _READMODIFYWRITERULE.oneofs_by_name['rule']
_READMODIFYWRITERULE.oneofs_by_name['rule'].fields.append(
_READMODIFYWRITERULE.fields_by_name['increment_amount'])
_READMODIFYWRITERULE.fields_by_name['increment_amount'].containing_oneof = _READMODIFYWRITERULE.oneofs_by_name['rule']
DESCRIPTOR.message_types_by_name['Row'] = _ROW
DESCRIPTOR.message_types_by_name['Family'] = _FAMILY
DESCRIPTOR.message_types_by_name['Column'] = _COLUMN
DESCRIPTOR.message_types_by_name['Cell'] = _CELL
DESCRIPTOR.message_types_by_name['RowRange'] = _ROWRANGE
DESCRIPTOR.message_types_by_name['ColumnRange'] = _COLUMNRANGE
DESCRIPTOR.message_types_by_name['TimestampRange'] = _TIMESTAMPRANGE
DESCRIPTOR.message_types_by_name['ValueRange'] = _VALUERANGE
DESCRIPTOR.message_types_by_name['RowFilter'] = _ROWFILTER
DESCRIPTOR.message_types_by_name['Mutation'] = _MUTATION
DESCRIPTOR.message_types_by_name['ReadModifyWriteRule'] = _READMODIFYWRITERULE
Row = _reflection.GeneratedProtocolMessageType('Row', (_message.Message,), dict(
DESCRIPTOR = _ROW,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.Row)
))
_sym_db.RegisterMessage(Row)
Family = _reflection.GeneratedProtocolMessageType('Family', (_message.Message,), dict(
DESCRIPTOR = _FAMILY,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.Family)
))
_sym_db.RegisterMessage(Family)
Column = _reflection.GeneratedProtocolMessageType('Column', (_message.Message,), dict(
DESCRIPTOR = _COLUMN,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.Column)
))
_sym_db.RegisterMessage(Column)
Cell = _reflection.GeneratedProtocolMessageType('Cell', (_message.Message,), dict(
DESCRIPTOR = _CELL,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.Cell)
))
_sym_db.RegisterMessage(Cell)
RowRange = _reflection.GeneratedProtocolMessageType('RowRange', (_message.Message,), dict(
DESCRIPTOR = _ROWRANGE,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.RowRange)
))
_sym_db.RegisterMessage(RowRange)
ColumnRange = _reflection.GeneratedProtocolMessageType('ColumnRange', (_message.Message,), dict(
DESCRIPTOR = _COLUMNRANGE,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.ColumnRange)
))
_sym_db.RegisterMessage(ColumnRange)
TimestampRange = _reflection.GeneratedProtocolMessageType('TimestampRange', (_message.Message,), dict(
DESCRIPTOR = _TIMESTAMPRANGE,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.TimestampRange)
))
_sym_db.RegisterMessage(TimestampRange)
ValueRange = _reflection.GeneratedProtocolMessageType('ValueRange', (_message.Message,), dict(
DESCRIPTOR = _VALUERANGE,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.ValueRange)
))
_sym_db.RegisterMessage(ValueRange)
RowFilter = _reflection.GeneratedProtocolMessageType('RowFilter', (_message.Message,), dict(
Chain = _reflection.GeneratedProtocolMessageType('Chain', (_message.Message,), dict(
DESCRIPTOR = _ROWFILTER_CHAIN,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.RowFilter.Chain)
))
,
Interleave = _reflection.GeneratedProtocolMessageType('Interleave', (_message.Message,), dict(
DESCRIPTOR = _ROWFILTER_INTERLEAVE,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.RowFilter.Interleave)
))
,
Condition = _reflection.GeneratedProtocolMessageType('Condition', (_message.Message,), dict(
DESCRIPTOR = _ROWFILTER_CONDITION,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.RowFilter.Condition)
))
,
DESCRIPTOR = _ROWFILTER,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.RowFilter)
))
_sym_db.RegisterMessage(RowFilter)
_sym_db.RegisterMessage(RowFilter.Chain)
_sym_db.RegisterMessage(RowFilter.Interleave)
_sym_db.RegisterMessage(RowFilter.Condition)
Mutation = _reflection.GeneratedProtocolMessageType('Mutation', (_message.Message,), dict(
SetCell = _reflection.GeneratedProtocolMessageType('SetCell', (_message.Message,), dict(
DESCRIPTOR = _MUTATION_SETCELL,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.Mutation.SetCell)
))
,
DeleteFromColumn = _reflection.GeneratedProtocolMessageType('DeleteFromColumn', (_message.Message,), dict(
DESCRIPTOR = _MUTATION_DELETEFROMCOLUMN,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.Mutation.DeleteFromColumn)
))
,
DeleteFromFamily = _reflection.GeneratedProtocolMessageType('DeleteFromFamily', (_message.Message,), dict(
DESCRIPTOR = _MUTATION_DELETEFROMFAMILY,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.Mutation.DeleteFromFamily)
))
,
DeleteFromRow = _reflection.GeneratedProtocolMessageType('DeleteFromRow', (_message.Message,), dict(
DESCRIPTOR = _MUTATION_DELETEFROMROW,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.Mutation.DeleteFromRow)
))
,
DESCRIPTOR = _MUTATION,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.Mutation)
))
_sym_db.RegisterMessage(Mutation)
_sym_db.RegisterMessage(Mutation.SetCell)
_sym_db.RegisterMessage(Mutation.DeleteFromColumn)
_sym_db.RegisterMessage(Mutation.DeleteFromFamily)
_sym_db.RegisterMessage(Mutation.DeleteFromRow)
ReadModifyWriteRule = _reflection.GeneratedProtocolMessageType('ReadModifyWriteRule', (_message.Message,), dict(
DESCRIPTOR = _READMODIFYWRITERULE,
__module__ = 'google.bigtable.v1.bigtable_data_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.v1.ReadModifyWriteRule)
))
_sym_db.RegisterMessage(ReadModifyWriteRule)
DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\026com.google.bigtable.v1B\021BigtableDataProtoP\001')
import abc
from grpc.beta import implementations as beta_implementations
from grpc.early_adopter import implementations as early_adopter_implementations
from grpc.framework.alpha import utilities as alpha_utilities
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
# @@protoc_insertion_point(module_scope)
| 43.503373
| 4,613
| 0.759143
| 6,726
| 51,595
| 5.491674
| 0.050996
| 0.045699
| 0.063243
| 0.047649
| 0.784363
| 0.745242
| 0.705363
| 0.653437
| 0.581639
| 0.56239
| 0
| 0.038828
| 0.11348
| 51,595
| 1,185
| 4,614
| 43.540084
| 0.768714
| 0.028297
| 0
| 0.652489
| 1
| 0.006335
| 0.214599
| 0.163194
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.00362
| 0.009955
| 0
| 0.009955
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
546245cd469c69c617a7997fcf70ab6fe142bbd4
| 213
|
py
|
Python
|
src/utils/io.py
|
ShaghayeghAmeri/test
|
968eea52ce0ea309f020add61ab597ca402feb14
|
[
"MIT"
] | null | null | null |
src/utils/io.py
|
ShaghayeghAmeri/test
|
968eea52ce0ea309f020add61ab597ca402feb14
|
[
"MIT"
] | null | null | null |
src/utils/io.py
|
ShaghayeghAmeri/test
|
968eea52ce0ea309f020add61ab597ca402feb14
|
[
"MIT"
] | null | null | null |
import json
def read_json(filename):
with open(filename, 'r') as f:
return json.load(f)
def write_json(data, filename):
with open(filename, 'w') as f:
return json.dump(data, f, indent=4)
| 21.3
| 43
| 0.638498
| 34
| 213
| 3.941176
| 0.529412
| 0.179104
| 0.238806
| 0.358209
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006098
| 0.230047
| 213
| 10
| 43
| 21.3
| 0.810976
| 0
| 0
| 0
| 0
| 0
| 0.009346
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.142857
| 0
| 0.714286
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
5466f74301d27c9c9e89a1bef7aa7116ce58d1b9
| 31
|
py
|
Python
|
modules/__init__.py
|
TendTo/MemeBot
|
b4ba23aa3991181903b7be285bcf587a69dedabb
|
[
"MIT"
] | 1
|
2020-09-10T22:10:57.000Z
|
2020-09-10T22:10:57.000Z
|
modules/__init__.py
|
TendTo/MemeBot
|
b4ba23aa3991181903b7be285bcf587a69dedabb
|
[
"MIT"
] | null | null | null |
modules/__init__.py
|
TendTo/MemeBot
|
b4ba23aa3991181903b7be285bcf587a69dedabb
|
[
"MIT"
] | null | null | null |
"""Modules used in this bot"""
| 15.5
| 30
| 0.645161
| 5
| 31
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16129
| 31
| 1
| 31
| 31
| 0.769231
| 0.774194
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
546709b23a18da0ff0a40662f5e0aac85b840f08
| 71
|
py
|
Python
|
anurag.py
|
anukaal/fossotober
|
ba3011460c24c900e59f1460adf8c2315c7a9f30
|
[
"MIT"
] | null | null | null |
anurag.py
|
anukaal/fossotober
|
ba3011460c24c900e59f1460adf8c2315c7a9f30
|
[
"MIT"
] | null | null | null |
anurag.py
|
anukaal/fossotober
|
ba3011460c24c900e59f1460adf8c2315c7a9f30
|
[
"MIT"
] | null | null | null |
print("Kumar Anurag")
print("AM.EN.U4CSE19130")
PRINT("Batch - CSE B")
| 17.75
| 25
| 0.690141
| 11
| 71
| 4.454545
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 0.098592
| 71
| 3
| 26
| 23.666667
| 0.671875
| 0
| 0
| 0
| 0
| 0
| 0.577465
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
548b43bd116d9a9e73e1b039bc65744fc435304e
| 253
|
py
|
Python
|
wrappers/python/sovrin/error.py
|
evernym/sovrin-client-rust2
|
c3664cad7cd92c8cb661071c82fd3a1f4678a807
|
[
"Apache-2.0"
] | 3
|
2017-05-06T13:49:16.000Z
|
2019-06-11T14:47:13.000Z
|
wrappers/python/sovrin/error.py
|
evernym/sovrin-client-rust2
|
c3664cad7cd92c8cb661071c82fd3a1f4678a807
|
[
"Apache-2.0"
] | 10
|
2017-04-14T04:58:34.000Z
|
2018-01-11T11:53:22.000Z
|
wrappers/python/sovrin/error.py
|
evernym/sovrin-client-rust2
|
c3664cad7cd92c8cb661071c82fd3a1f4678a807
|
[
"Apache-2.0"
] | 11
|
2017-04-12T08:37:23.000Z
|
2021-06-06T15:53:26.000Z
|
from enum import Enum
class SovrinErrorCode(Enum):
Success = 0
CommonInvalidParam1 = 100
class SovrinError(Exception):
error_code: SovrinErrorCode
def __init__(self, error_code: SovrinErrorCode):
self.error_code = error_code
| 19.461538
| 52
| 0.735178
| 28
| 253
| 6.357143
| 0.571429
| 0.202247
| 0.269663
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.024752
| 0.201581
| 253
| 12
| 53
| 21.083333
| 0.856436
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0.125
| 0
| 0.875
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
548cc6c63e1842a55cf7683c9d989df44104582c
| 282
|
py
|
Python
|
tests/test_stock_price_data_loader.py
|
victor-huang/alpha_tech_tracker
|
a25545d41e2b647c514ca2de1c2eb09c7e862234
|
[
"MIT"
] | null | null | null |
tests/test_stock_price_data_loader.py
|
victor-huang/alpha_tech_tracker
|
a25545d41e2b647c514ca2de1c2eb09c7e862234
|
[
"MIT"
] | 10
|
2017-09-29T05:25:15.000Z
|
2021-06-02T00:43:57.000Z
|
tests/test_stock_price_data_loader.py
|
victor-huang/alpha_tech_tracker
|
a25545d41e2b647c514ca2de1c2eb09c7e862234
|
[
"MIT"
] | 1
|
2021-02-24T13:47:54.000Z
|
2021-02-24T13:47:54.000Z
|
import numpy
from numpy.testing import assert_array_equal
import pandas as pd
import pytest
import ipdb
import alpha_tech_tracker.technical_analysis as ta
import alpha_tech_tracker.stock_price_data_loader as data_loader
def test_load_from_csv():
data_loader.load_from_csv()
| 20.142857
| 64
| 0.851064
| 46
| 282
| 4.847826
| 0.565217
| 0.134529
| 0.134529
| 0.197309
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117021
| 282
| 13
| 65
| 21.692308
| 0.895582
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 1
| 0.111111
| true
| 0
| 0.777778
| 0
| 0.888889
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
54b64ba6194672dce8a9def84c29b5acb7cd5319
| 752
|
py
|
Python
|
src/controller/senhasController.py
|
waleson-melo/gerenciador_de_senhas
|
62d329d2c3bb28eb7c47454a3f9a68487762612a
|
[
"MIT"
] | 3
|
2021-01-13T22:29:52.000Z
|
2021-06-19T22:40:46.000Z
|
src/controller/senhasController.py
|
waleson-melo/gerenciador_de_senhas
|
62d329d2c3bb28eb7c47454a3f9a68487762612a
|
[
"MIT"
] | null | null | null |
src/controller/senhasController.py
|
waleson-melo/gerenciador_de_senhas
|
62d329d2c3bb28eb7c47454a3f9a68487762612a
|
[
"MIT"
] | 1
|
2021-06-27T04:06:47.000Z
|
2021-06-27T04:06:47.000Z
|
import src.view.senhasView as sv
import src.model.senhasModel as sm
class SenhasController:
def __init__(self):
self.senhas_model = sm.SenhasModel()
def start(self):
sev = sv.SenhasView(self)
sev.start()
def searchAllSenhas(self):
return self.senhas_model.selectAll()
def searchSenha(self, nome):
return self.senhas_model.select(nome)
def saveSenha(self, nome, tipo, login, senha, obs):
return self.senhas_model.save(nome, tipo, login, senha, obs)
def updateSenha(self, codigo, nome, tipo, login, senha, obs):
return self.senhas_model.update(codigo, nome, tipo, login, senha, obs)
def deleteSenha(self, codigo):
return self.senhas_model.delete(codigo)
| 27.851852
| 78
| 0.676862
| 97
| 752
| 5.14433
| 0.350515
| 0.12024
| 0.180361
| 0.210421
| 0.288577
| 0.288577
| 0.168337
| 0.168337
| 0.168337
| 0
| 0
| 0
| 0.216755
| 752
| 26
| 79
| 28.923077
| 0.847199
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.388889
| false
| 0
| 0.111111
| 0.277778
| 0.833333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
54c55b6343b85cd509dd4f11ec7152ab1972fc20
| 98
|
py
|
Python
|
algorithms/collaborative_filtering/__init__.py
|
joaoms/incRec
|
99729099ed51fd1d40a7468da4ddc8279532b53f
|
[
"MIT"
] | 5
|
2020-07-05T16:17:19.000Z
|
2020-07-26T17:06:44.000Z
|
algorithms/collaborative_filtering/__init__.py
|
joaoms/incRec
|
99729099ed51fd1d40a7468da4ddc8279532b53f
|
[
"MIT"
] | 1
|
2020-07-05T14:23:17.000Z
|
2020-07-05T14:23:17.000Z
|
algorithms/collaborative_filtering/__init__.py
|
joaoms/incRec
|
99729099ed51fd1d40a7468da4ddc8279532b53f
|
[
"MIT"
] | 1
|
2020-12-30T11:42:05.000Z
|
2020-12-30T11:42:05.000Z
|
from .collaborative_filtering import CollaborativeFiltering
__all__ = ["CollaborativeFiltering"]
| 24.5
| 59
| 0.857143
| 7
| 98
| 11.285714
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081633
| 98
| 3
| 60
| 32.666667
| 0.877778
| 0
| 0
| 0
| 0
| 0
| 0.22449
| 0.22449
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
49b67833fcac2b95104a33cbce9866032ad15430
| 1,006
|
py
|
Python
|
store/admin.py
|
jserver/pagila
|
ef53c90de987b02eb8c524684d1705deb594ce91
|
[
"BSD-3-Clause"
] | null | null | null |
store/admin.py
|
jserver/pagila
|
ef53c90de987b02eb8c524684d1705deb594ce91
|
[
"BSD-3-Clause"
] | null | null | null |
store/admin.py
|
jserver/pagila
|
ef53c90de987b02eb8c524684d1705deb594ce91
|
[
"BSD-3-Clause"
] | 1
|
2021-07-06T23:43:24.000Z
|
2021-07-06T23:43:24.000Z
|
from django.contrib import admin
from store.models import (Address, City, Country, Customer, Inventory, Payment,
Rental, Staff, Store)
# Register your models here.
class AddressAdmin(admin.ModelAdmin):
pass
class CityAdmin(admin.ModelAdmin):
pass
class CountryAdmin(admin.ModelAdmin):
pass
class CustomerAdmin(admin.ModelAdmin):
pass
class InventoryAdmin(admin.ModelAdmin):
pass
class PaymentAdmin(admin.ModelAdmin):
pass
class RentalAdmin(admin.ModelAdmin):
pass
class StaffAdmin(admin.ModelAdmin):
pass
class StoreAdmin(admin.ModelAdmin):
pass
admin.site.register(Address, AddressAdmin)
admin.site.register(City, CityAdmin)
admin.site.register(Country, CountryAdmin)
admin.site.register(Customer, CustomerAdmin)
admin.site.register(Inventory, InventoryAdmin)
admin.site.register(Payment, PaymentAdmin)
admin.site.register(Rental, RentalAdmin)
admin.site.register(Staff, StaffAdmin)
admin.site.register(Store, StoreAdmin)
| 18.981132
| 79
| 0.757455
| 112
| 1,006
| 6.803571
| 0.276786
| 0.177165
| 0.224409
| 0.251969
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148111
| 1,006
| 52
| 80
| 19.346154
| 0.889148
| 0.025845
| 0
| 0.3
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.3
| 0.066667
| 0
| 0.366667
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
49bb5a11cddf4563855db7d3f0eeb979835607ec
| 445
|
py
|
Python
|
pymetawear/exceptions.py
|
somacoder/pymetawear
|
3cac6415e610e5ae7d2dac3ffbe6136a65f566f1
|
[
"MIT"
] | null | null | null |
pymetawear/exceptions.py
|
somacoder/pymetawear
|
3cac6415e610e5ae7d2dac3ffbe6136a65f566f1
|
[
"MIT"
] | null | null | null |
pymetawear/exceptions.py
|
somacoder/pymetawear
|
3cac6415e610e5ae7d2dac3ffbe6136a65f566f1
|
[
"MIT"
] | 1
|
2021-01-08T03:45:35.000Z
|
2021-01-08T03:45:35.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. moduleauthor:: hbldh <henrik.blidh@nedomkull.com>
Created on 2016-03-30, 10:11
"""
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
class PyMetaWearException(Exception):
"""Main exception."""
pass
class PyMetaWearConnectionTimeout(PyMetaWearException):
"""Connection could not be established in time."""
pass
| 19.347826
| 55
| 0.730337
| 51
| 445
| 6.098039
| 0.784314
| 0.096463
| 0.154341
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034392
| 0.150562
| 445
| 22
| 56
| 20.227273
| 0.78836
| 0.41573
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.285714
| 0.428571
| 0
| 0.714286
| 0.142857
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
49d68bc80c6c4318db38dd502784f0cbde23f34d
| 45
|
py
|
Python
|
test.py
|
brysonSaclausa/CSPYLS
|
ac51401625556de3540925ee7b1397b555952eb0
|
[
"MIT"
] | null | null | null |
test.py
|
brysonSaclausa/CSPYLS
|
ac51401625556de3540925ee7b1397b555952eb0
|
[
"MIT"
] | null | null | null |
test.py
|
brysonSaclausa/CSPYLS
|
ac51401625556de3540925ee7b1397b555952eb0
|
[
"MIT"
] | null | null | null |
greeting= "world"
print("hello" + greeting)
| 11.25
| 25
| 0.688889
| 5
| 45
| 6.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 45
| 3
| 26
| 15
| 0.794872
| 0
| 0
| 0
| 0
| 0
| 0.227273
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
49fe05d538ffaea84b3940da0415b656641acb8d
| 32
|
py
|
Python
|
grortir/main/controller/__init__.py
|
wojtekPi/grortir
|
0ef8b495527a4f3861e5df5db756d0ee3ed4aa6f
|
[
"MIT"
] | null | null | null |
grortir/main/controller/__init__.py
|
wojtekPi/grortir
|
0ef8b495527a4f3861e5df5db756d0ee3ed4aa6f
|
[
"MIT"
] | null | null | null |
grortir/main/controller/__init__.py
|
wojtekPi/grortir
|
0ef8b495527a4f3861e5df5db756d0ee3ed4aa6f
|
[
"MIT"
] | null | null | null |
"""Package with controllers."""
| 16
| 31
| 0.6875
| 3
| 32
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 32
| 1
| 32
| 32
| 0.758621
| 0.78125
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b70467b7ab59e78592ebce435a50d2d3d020e5e4
| 431
|
py
|
Python
|
src/data/general_type_data/api_general_type_data.py
|
logzio/logzio-api-fetcher
|
0401d2bc4cff51a29fd3a97a6dd60588b28eb6a8
|
[
"Apache-2.0"
] | null | null | null |
src/data/general_type_data/api_general_type_data.py
|
logzio/logzio-api-fetcher
|
0401d2bc4cff51a29fd3a97a6dd60588b28eb6a8
|
[
"Apache-2.0"
] | null | null | null |
src/data/general_type_data/api_general_type_data.py
|
logzio/logzio-api-fetcher
|
0401d2bc4cff51a29fd3a97a6dd60588b28eb6a8
|
[
"Apache-2.0"
] | 1
|
2021-08-30T14:37:31.000Z
|
2021-08-30T14:37:31.000Z
|
from .api_json_paths import ApiJsonPaths
class ApiGeneralTypeData:
def __init__(self, api_start_date_name: str, api_json_paths: ApiJsonPaths) -> None:
self._start_date_name = api_start_date_name
self._json_paths = api_json_paths
@property
def start_date_name(self) -> str:
return self._start_date_name
@property
def json_paths(self) -> ApiJsonPaths:
return self._json_paths
| 25.352941
| 87
| 0.721578
| 57
| 431
| 4.947368
| 0.315789
| 0.191489
| 0.230496
| 0.113475
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.211137
| 431
| 16
| 88
| 26.9375
| 0.829412
| 0
| 0
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0.090909
| 0.181818
| 0.636364
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
b72982c1ddef81c7f446fb33b807599b0a59428f
| 30,280
|
py
|
Python
|
xac/views.py
|
amachefe/XAc
|
5bf13fe06ccf9e11392eb40058c6a97a725b6e03
|
[
"BSD-3-Clause"
] | null | null | null |
xac/views.py
|
amachefe/XAc
|
5bf13fe06ccf9e11392eb40058c6a97a725b6e03
|
[
"BSD-3-Clause"
] | null | null | null |
xac/views.py
|
amachefe/XAc
|
5bf13fe06ccf9e11392eb40058c6a97a725b6e03
|
[
"BSD-3-Clause"
] | null | null | null |
# Copyright (c) 2016, AB Uobis
# All rights reserved.
import os
import io
import uuid
import ast
import csv
import calendar
from collections import OrderedDict
from datetime import datetime,date
from flask import flash, render_template, request, redirect, url_for, send_from_directory, send_file
from xac import app, db, forms, models
import sqlalchemy
from sqlalchemy.sql import func
from sqlalchemy.orm import aliased
from xac.accounting.memoranda import process_filestorage
import xac.accounting.ledgers as ledgers
import xac.accounting.rates as rates
import xac.accounting.valuations as valuations
@app.route('/')
def index():
return render_template("index.html")
@app.route('/Configure')
def configure():
return redirect(url_for('chart_of_accounts'))
@app.route('/Configure/ChartOfAccounts')
def chart_of_accounts():
classificationform = forms.NewClassification()
accountform = forms.NewAccount()
subaccountform = forms.NewSubAccount()
subaccounts = models.Subaccounts.query.all()
return render_template("configure/chart_of_accounts.html",
subaccounts=subaccounts,
classificationform=classificationform,
accountform=accountform,
subaccountform=subaccountform)
@app.route('/Configure/ChartOfAccounts/AddClassification', methods=['POST','GET'])
def add_classification():
if request.method == 'POST':
form = request.form.copy().to_dict()
name = form['classification']
parent = form['classificationparent']
parent = models.Elements.query.filter_by(id=parent).one()
parent = parent.name
classification = models.Classifications(name=name, parent=parent)
db.session.add(classification)
db.session.commit()
return redirect(url_for('chart_of_accounts'))
@app.route('/Configure/ChartOfAccounts/DeleteClassification/<classification>')
def delete_classification(classification):
classification = models.Classifications \
.query \
.filter_by(name=classification) \
.first()
db.session.delete(classification)
db.session.commit()
return redirect(url_for('chart_of_accounts'))
@app.route('/Configure/ChartOfAccounts/AddAccount', methods=['POST','GET'])
def add_account():
if request.method == 'POST':
form = request.form.copy().to_dict()
name = form['account']
parent = form['accountparent']
parent = models.Classifications \
.query \
.filter_by(id=parent) \
.one()
parent = parent.name
account = models.Accounts(name=name, parent=parent)
db.session.add(account)
db.session.commit()
return redirect(url_for('chart_of_accounts'))
@app.route('/Configure/ChartOfAccounts/DeleteAccount/<account>')
def delete_account(account):
account = models.Accounts.query.filter_by(name=account).first()
db.session.delete(account)
db.session.commit()
return redirect(url_for('chart_of_accounts'))
@app.route('/Configure/ChartOfAccounts/AddSubAccount', methods=['POST','GET'])
def add_subaccount():
if request.method == 'POST':
form = request.form.copy().to_dict()
name = form['subaccount']
parent = form['subaccountparent']
parent = models.Accounts.query.filter_by(id=parent).one()
parent = parent.name
subaccount = models.Subaccounts(name=name, parent=parent)
db.session.add(subaccount)
db.session.commit()
return redirect(url_for('chart_of_accounts'))
@app.route('/Configure/ChartOfAccounts/DeleteSubAccount/<subaccount>')
def delete_subaccount(subaccount):
subaccount = models.Accounts.query.filter_by(name=subaccount).first()
db.session.delete(subaccount)
db.session.commit()
return redirect(url_for('chart_of_accounts'))
@app.route('/Bookkeeping')
def bookkeeping():
return redirect(url_for('upload_csv'))
@app.route('/Bookkeeping/Memoranda/Upload', methods=['POST','GET'])
def upload_csv():
filenames = ''
if request.method == 'POST':
uploaded_files = request.files.getlist("file[]")
for file in uploaded_files:
process_filestorage(file)
return redirect(url_for('upload_csv'))
memos = models.Memoranda \
.query \
.order_by(models.Memoranda.date.desc()) \
.all()
return render_template('bookkeeping/upload.html',
title = 'Upload',
memos=memos)
@app.route('/Bookkeeping/Memoranda/ExchangeRates')
def exchange_rates():
return render_template("bookkeeping/exchange_rates.html")
@app.route('/Bookkeeping/Memoranda/DownloadRates')
def download_rates():
rates.download_rates()
return redirect(url_for('exchange_rates'))
@app.route('/Bookkeeping/Memoranda/ExchangeRates/Summarize')
def summarize_rates():
rates.summarize_rates("xac")
return redirect(url_for('exchange_rates'))
@app.route('/Bookkeeping/Memoranda/ExchangeRates/Import')
def import_rates():
rates.import_rates("xac")
return redirect(url_for('exchange_rates'))
@app.route('/Bookkeeping/Memoranda/ExchangeRates/CalculateGains/<method>')
def calc_gains(method):
valuations.calculate_bitcoin_gains(method)
return redirect(url_for('exchange_rates'))
@app.route('/Bookkeeping/Memoranda/Memos', methods=['POST','GET'])
def memoranda():
memos = models.Memoranda \
.query \
.order_by(models.Memoranda.date.desc()) \
.all()
for memo in memos:
transactions = models.MemorandaTransactions \
.query \
.filter_by(memoranda_id=memo.id) \
.all()
memo.count = len(transactions)
return render_template('bookkeeping/memos.html',
title = 'Memoranda',
memos=memos)
@app.route('/Bookkeeping/Memoranda/Memos/Delete/<fileName>')
def delete_memoranda(fileName):
memo = models.Memoranda \
.query \
.filter_by(fileName=fileName) \
.first()
transactions = models.MemorandaTransactions \
.query \
.filter_by(memoranda_id=memo.id) \
.all()
for transaction in transactions:
journal_entry = models.JournalEntries \
.query \
.filter_by(memoranda_transactions_id=transaction.id) \
.first()
ledger_entries = models.LedgerEntries \
.query \
.filter_by(journal_entry_id = journal_entry.id) \
.all()
for entry in ledger_entries:
db.session.delete(entry)
db.session.commit()
db.session.delete(journal_entry)
db.session.commit()
db.session.delete(transaction)
db.session.commit()
db.session.delete(memo)
db.session.commit()
return redirect(url_for('upload_csv'))
@app.route('/Bookkeeping/Memoranda/Memos/<fileName>')
def memo_file(fileName):
memo = models.Memoranda.query.filter_by(fileName=fileName).first()
fileText = memo.fileText
document = io.StringIO(fileText)
reader = csv.reader(document)
rows = [pair for pair in reader]
return render_template('bookkeeping/memo_file.html',
title = 'Memo',
rows=rows,
fileName=fileName)
@app.route('/Bookkeeping/Memoranda/Memos/Transactions')
def transactions():
transactions = models.MemorandaTransactions.query.all()
for transaction in transactions:
transaction.details = ast.literal_eval(transaction.details)
journal_entry = models.JournalEntries.query.filter_by(memoranda_transactions_id=transaction.id).first()
transaction.journal_entry_id = journal_entry.id
return render_template('bookkeeping/memo_transactions.html',
title = 'Memo',
transactions=transactions)
@app.route('/Bookkeeping/Memoranda/Memos/<fileName>/Transactions')
def memo_transactions(fileName):
memo = models.Memoranda.query.filter_by(fileName=fileName).first()
transactions = models.MemorandaTransactions.query.filter_by(memoranda_id=memo.id).all()
for transaction in transactions:
transaction.details = ast.literal_eval(transaction.details)
journal_entry = models.JournalEntries.query.filter_by(memoranda_transactions_id=transaction.id).first()
transaction.journal_entry_id = journal_entry.id
return render_template('bookkeeping/memo_transactions.html',
title = 'Memo',
transactions=transactions,
fileName=fileName)
@app.route('/Bookkeeping/GeneralJournal/<currency>')
def general_journal(currency):
journal_entries = db.session \
.query(models.JournalEntries) \
.filter(models.JournalEntries.ledgerentries \
.any(currency=currency)) \
.join(models.LedgerEntries) \
.order_by(models.LedgerEntries.date.desc()) \
.all()
for journal_entry in journal_entries:
journal_entry.ledgerentries = [c for c in journal_entry.ledgerentries if c.currency == currency]
return render_template('bookkeeping/general_journal.html',
title = 'General Journal',
journal_entries=journal_entries,
currency=currency)
@app.route('/Bookkeeping/GeneralJournal/Entry/<id>')
def journal_entry(id):
journal_entry = models.JournalEntries.query.filter_by(id = id).first()
ledger_entries = models.LedgerEntries.query.filter_by(journal_entry_id = id).order_by(models.LedgerEntries.date.desc()).order_by(models.LedgerEntries.tside.desc()).all()
transaction = models.MemorandaTransactions.query.filter_by(id=journal_entry.memoranda_transactions_id).first()
memo = models.Memoranda.query.filter_by(id=transaction.memoranda_id).first()
transaction.details = ast.literal_eval(transaction.details)
print(ledger_entries)
return render_template('bookkeeping/journal_entry.html',
title = 'Journal Entry',
journal_entry=journal_entry,
ledger_entries=ledger_entries,
transaction=transaction,
memo=memo)
@app.route('/Bookkeeping/GeneralJournal/<id>/Edit', methods=['POST','GET'])
def edit_journal_entry(id):
journal_entry = models.JournalEntries.query.filter_by(id = id).first()
ledger_entries = models.LedgerEntries.query.filter_by(journal_entry_id = id).order_by(models.LedgerEntries.date.desc()).order_by(models.LedgerEntries.tside.desc()).all()
transaction = models.MemorandaTransactions.query.filter_by(id=journal_entry.memoranda_transactions_id).first()
memo = models.Memoranda.query.filter_by(id=transaction.memoranda_id).first()
transaction.details = ast.literal_eval(transaction.details)
return render_template('bookkeeping/journal_entry_edit.html',
title = 'Journal Entry',
journal_entry=journal_entry,
ledger_entries=ledger_entries,
transaction=transaction,
memo=memo)
@app.route('/Bookkeeping/GeneralLedger/<currency>')
def general_ledger(currency):
accountsQuery = db.session\
.query(models.LedgerEntries.ledger)\
.group_by(models.LedgerEntries.ledger).all()
accounts = []
for accountResult in accountsQuery:
accountName = accountResult[0]
query = ledgers.query_entries(accountName, 'Monthly', currency)
accounts.append(query)
return render_template('bookkeeping/general_ledger.html',
title = 'General Ledger',
accounts=accounts,
currency=currency)
@app.route('/Bookkeeping/Ledger/<accountName>/<currency>/<groupby>')
def ledger(accountName, currency, groupby):
query = ledgers.query_entries(accountName, groupby, currency)
return render_template('bookkeeping/ledger.html',
title = 'Ledger',
currency=currency,
account=query[0],
ledger_entries=query[1],
groupby = groupby,
accountName=accountName)
@app.route('/Bookkeeping/Ledger/<accountName>/<currency>/<groupby>/<interval>')
def ledger_page(accountName, currency, groupby, interval):
if groupby == "Daily":
interval = datetime.strptime(interval, "%m-%d-%Y")
year = interval.year
month = interval.month
day = interval.day
ledger_entries = models.LedgerEntries \
.query \
.filter_by(ledger=accountName) \
.filter_by(currency=currency) \
.filter( \
func.date_part('year', models.LedgerEntries.date)==year, \
func.date_part('month', models.LedgerEntries.date)==month, \
func.date_part('day', models.LedgerEntries.date)==day) \
.order_by(models.LedgerEntries.date) \
.order_by(models.LedgerEntries.tside.asc()) \
.all()
account = ledgers.foot_account(accountName, ledger_entries, 'All')
if groupby == "Monthly":
interval = datetime.strptime(interval, "%m-%Y")
year = interval.year
month = interval.month
ledger_entries = models.LedgerEntries\
.query\
.filter_by(ledger=accountName) \
.filter_by(currency=currency) \
.filter( \
func.date_part('year', models.LedgerEntries.date)==year, \
func.date_part('month', models.LedgerEntries.date)==month)\
.order_by(models.LedgerEntries.date) \
.order_by(models.LedgerEntries.tside.desc()) \
.all()
account = ledgers.foot_account(accountName, ledger_entries, 'All')
return render_template('bookkeeping/ledger.html',
title = 'Ledger',
account=account,
ledger_entries=ledger_entries,
groupby2 = groupby,
groupby = 'All',
accountName=accountName,
interval=interval,
currency=currency)
@app.route('/Bookkeeping/TrialBalance/<currency>')
def trial_balance(currency):
accountsQuery = db.session \
.query(models.LedgerEntries.ledger) \
.group_by(models.LedgerEntries.ledger) \
.filter(models.LedgerEntries.currency==currency) \
.all()
periods = db.session \
.query(\
func.date_part('year', models.LedgerEntries.date) + '-'+
func.date_part('month', models.LedgerEntries.date)) \
.filter(models.LedgerEntries.currency==currency) \
.group_by(\
func.date_part('year', models.LedgerEntries.date), \
func.date_part('month', models.LedgerEntries.date)) \
.all()
period = datetime.now()
year = period.year
month = period.month
accounts = []
totalDebits = 0
totalCredits = 0
for accountResult in accountsQuery:
accountName = accountResult[0]
ledger_entries = models.LedgerEntries \
.query \
.filter_by(ledger=accountName)\
.filter_by(currency=currency) \
.filter( \
func.date_part('year', models.LedgerEntries.date)==year,
func.date_part('month', models.LedgerEntries.date)==month) \
.order_by(models.LedgerEntries.date) \
.order_by(models.LedgerEntries.tside.desc()) \
.all()
query = ledgers.foot_account(accountName, ledger_entries, 'All')
totalDebits += query['debitBalance']
totalCredits += query['creditBalance']
accounts.append(query)
return render_template('bookkeeping/trial_balance.html',
currency=currency,
periods=periods,
period=period,
accounts=accounts,
totalDebits=totalDebits,
totalCredits=totalCredits)
@app.route('/Bookkeeping/TrialBalance/<currency>/<groupby>/<period>')
def trial_balance_historical(currency, groupby, period):
accountsQuery = db.session \
.query(models.LedgerEntries.ledger) \
.group_by(models.LedgerEntries.ledger) \
.filter(models.LedgerEntries.currency==currency) \
.all()
periods = db.session \
.query(\
func.date_part('year', models.LedgerEntries.date) + '-'+
func.date_part('month', models.LedgerEntries.date)) \
.group_by(\
func.date_part('year', models.LedgerEntries.date),\
func.date_part('month', models.LedgerEntries.date)) \
.filter(models.LedgerEntries.currency==currency) \
.all()
period = datetime.strptime(period, "%Y-%m")
year = period.year
month = period.month
day = calendar.monthrange(year, month)[1]
period = datetime(year, month, day, 23, 59, 59)
accounts = []
totalDebits = 0
totalCredits = 0
for accountResult in accountsQuery:
accountName = accountResult[0]
ledger_entries = models.LedgerEntries \
.query \
.filter_by(ledger=accountName) \
.filter_by(currency=currency) \
.filter( \
func.date_part('year', models.LedgerEntries.date)==year, \
func.date_part('month', models.LedgerEntries.date)==month) \
.order_by(models.LedgerEntries.date) \
.order_by(models.LedgerEntries.tside.desc()) \
.all()
query = ledgers.foot_account(accountName, ledger_entries, 'All')
totalDebits += query['debitBalance']
totalCredits += query['creditBalance']
accounts.append(query)
return render_template('bookkeeping/trial_balance.html',
currency=currency,
periods=periods,
period=period,
accounts=accounts,
totalDebits=totalDebits,
totalCredits=totalCredits)
@app.route('/FinancialStatements')
def financial_statements():
return redirect(url_for('income_statement', currency='satoshis'))
@app.route('/FinancialStatements/IncomeStatement/<currency>')
def income_statement(currency):
periods = db.session \
.query(\
func.date_part('year', models.LedgerEntries.date),\
func.date_part('month', models.LedgerEntries.date)) \
.group_by( \
func.date_part('year', models.LedgerEntries.date),\
func.date_part('month', models.LedgerEntries.date)) \
.all()
periods = sorted([date(int(period[0]), int(period[1]), 1) for period in periods])
period = datetime.now()
period_beg = datetime(period.year, period.month, 1, 0, 0, 0, 0)
period_end = datetime(period.year, period.month, period.day, 23, 59, 59, 999999)
elements = db.session \
.query(models.Elements) \
.join(models.Classifications) \
.filter(models.Classifications.name.in_(['Revenues', 'Expenses', 'Gains', 'Losses']))\
.join(models.Accounts) \
.join(models.Subaccounts) \
.all()
net_income = 0
for element in elements:
element.classifications = [c for c in element.classifications if c.name in ['Revenues', 'Expenses', 'Gains', 'Losses']]
for classification in element.classifications:
for account in classification.accounts:
for subaccount in account.subaccounts:
subaccount.total = 0
subaccount.ledgerentries = [c for c in subaccount.ledgerentries if period_beg <= c.date <= period_end ]
for ledger_entry in subaccount.ledgerentries:
if ledger_entry.currency == currency:
if ledger_entry.tside == 'credit':
subaccount.total += ledger_entry.amount
net_income += ledger_entry.amount
elif ledger_entry.tside == 'debit':
net_income -= ledger_entry.amount
subaccount.total -= ledger_entry.amount
return render_template('financial_statements/income_statement.html',
title = 'Income Statement',
periods = periods,
currency = currency,
elements = elements,
net_income = net_income)
@app.route('/FinancialStatements/IncomeStatement/<currency>/<period>')
def income_statement_historical(currency, period):
periods = db.session \
.query(\
func.date_part('year', models.LedgerEntries.date), \
func.date_part('month', models.LedgerEntries.date)) \
.group_by( \
func.date_part('year', models.LedgerEntries.date), \
func.date_part('month', models.LedgerEntries.date)) \
.all()
periods = sorted([date(int(period[0]), int(period[1]), 1) for period in periods])
period = datetime.strptime(period, "%Y-%m")
lastday = calendar.monthrange(period.year, period.month)[1]
period_beg = datetime(period.year, period.month, 1, 0, 0, 0, 0)
period_end = datetime(period.year, period.month, lastday, 23, 59, 59, 999999)
elements = db.session \
.query(models.Elements) \
.join(models.Classifications) \
.filter(models.Classifications.name.in_(['Revenues', 'Expenses', 'Gains', 'Losses']))\
.join(models.Accounts) \
.join(models.Subaccounts) \
.all()
net_income = 0
for element in elements:
element.classifications = [c for c in element.classifications if c.name in ['Revenues', 'Expenses', 'Gains', 'Losses']]
for classification in element.classifications:
for account in classification.accounts:
for subaccount in account.subaccounts:
subaccount.total = 0
subaccount.ledgerentries = [c for c in subaccount.ledgerentries if period_beg <= c.date <= period_end ]
for ledger_entry in subaccount.ledgerentries:
if ledger_entry.currency == currency:
if ledger_entry.tside == 'credit':
net_income += ledger_entry.amount
subaccount.total += ledger_entry.amount
elif ledger_entry.tside == 'debit':
net_income -= ledger_entry.amount
subaccount.total -= ledger_entry.amount
return render_template('financial_statements/income_statement.html',
title = 'Income Statement',
periods = periods,
currency = currency,
elements = elements,
net_income = net_income)
@app.route('/FinancialStatements/BalanceSheet/<currency>')
def balance_sheet(currency):
periods = db.session \
.query(\
func.date_part('year', models.LedgerEntries.date), \
func.date_part('month', models.LedgerEntries.date)) \
.group_by( \
func.date_part('year', models.LedgerEntries.date), \
func.date_part('month', models.LedgerEntries.date)) \
.all()
periods = sorted([date(int(period[0]), int(period[1]), 1) for period in periods])
period = datetime.now()
period_beg = datetime(period.year, period.month, 1, 0, 0, 0, 0)
period_end = datetime(period.year, period.month, period.day, 23, 59, 59, 999999)
elements = db.session \
.query(models.Elements) \
.join(models.Classifications) \
.join(models.Accounts) \
.join(models.Subaccounts) \
.all()
retained_earnings = 0
for element in elements:
element.balance = 0
for classification in element.classifications:
classification.balance = 0
for account in classification.accounts:
account.balance = 0
for subaccount in account.subaccounts:
subaccount.balance = 0
subaccount.ledgerentries = [c for c in subaccount.ledgerentries if c.date <= period_end ]
for ledger_entry in subaccount.ledgerentries:
if ledger_entry.currency == currency:
if ledger_entry.tside == 'credit':
element.balance -= ledger_entry.amount
classification.balance -= ledger_entry.amount
account.balance -= ledger_entry.amount
subaccount.balance -= ledger_entry.amount
elif ledger_entry.tside == 'debit':
element.balance += ledger_entry.amount
classification.balance += ledger_entry.amount
account.balance += ledger_entry.amount
subaccount.balance += ledger_entry.amount
if element.name == 'Equity':
retained_earnings = -element.balance
print(retained_earnings)
elements = [c for c in elements if c.name in ['Assets', 'Liabilities']]
return render_template('financial_statements/balance_sheet.html',
periods=periods,
currency=currency,
elements=elements,
retained_earnings=retained_earnings,
period=period_end)
@app.route('/FinancialStatements/BalanceSheet/<currency>/<period>')
def balance_sheet_historical(currency, period):
periods = db.session \
.query(\
func.date_part('year', models.LedgerEntries.date), \
func.date_part('month', models.LedgerEntries.date)) \
.group_by( \
func.date_part('year', models.LedgerEntries.date), \
func.date_part('month', models.LedgerEntries.date)) \
.all()
periods = sorted([date(int(period[0]), int(period[1]), 1) for period in periods])
period = datetime.strptime(period, "%Y-%m")
lastday = calendar.monthrange(period.year, period.month)[1]
period_beg = datetime(period.year, period.month, 1, 0, 0, 0, 0)
period_end = datetime(period.year, period.month, lastday, 23, 59, 59, 999999)
elements = db.session \
.query(models.Elements) \
.join(models.Classifications) \
.join(models.Accounts) \
.join(models.Subaccounts) \
.all()
retained_earnings = 0
for element in elements:
element.balance = 0
for classification in element.classifications:
classification.balance = 0
for account in classification.accounts:
account.balance = 0
for subaccount in account.subaccounts:
subaccount.balance = 0
subaccount.ledgerentries = [c for c in subaccount.ledgerentries if c.date <= period_end ]
for ledger_entry in subaccount.ledgerentries:
if ledger_entry.currency == currency:
if ledger_entry.tside == 'credit':
element.balance -= ledger_entry.amount
classification.balance -= ledger_entry.amount
account.balance -= ledger_entry.amount
subaccount.balance -= ledger_entry.amount
elif ledger_entry.tside == 'debit':
element.balance += ledger_entry.amount
classification.balance += ledger_entry.amount
account.balance += ledger_entry.amount
subaccount.balance += ledger_entry.amount
if element.name == 'Equity':
retained_earnings = -element.balance
print(retained_earnings)
elements = [c for c in elements if c.name in ['Assets', 'Liabilities']]
return render_template('financial_statements/balance_sheet.html',
periods=periods,
currency=currency,
elements=elements,
retained_earnings=retained_earnings,
period=period_end)
@app.route('/FinancialStatements/StatementOfCashFlows/<currency>/<period>')
def statement_of_cash_flows(currency, period):
periods = db.session \
.query(\
func.date_part('year', models.LedgerEntries.date), \
func.date_part('month', models.LedgerEntries.date)) \
.group_by( \
func.date_part('year', models.LedgerEntries.date), \
func.date_part('month', models.LedgerEntries.date)) \
.all()
periods = sorted([date(int(period[0]), int(period[1]), 1) for period in periods])
if period == 'Current':
period = datetime.now()
lastday = period.day
else:
period = datetime.strptime(period, "%Y-%m")
lastday = calendar.monthrange(period.year, period.month)[1]
period_beg = datetime(period.year, period.month, 1, 0, 0, 0, 0)
period_end = datetime(period.year, period.month, lastday, 23, 59, 59, 999999)
elements = db.session \
.query(models.Elements) \
.join(models.Classifications) \
.filter(models.Classifications.name.in_(['Revenues', 'Expenses', 'Gains', 'Losses']))\
.join(models.Accounts) \
.join(models.Subaccounts) \
.all()
net_income = 0
for element in elements:
element.classifications = [c for c in element.classifications if c.name in ['Revenues', 'Expenses', 'Gains', 'Losses']]
for classification in element.classifications:
classification.balance = 0
for account in classification.accounts:
account.balance = 0
for subaccount in account.subaccounts:
subaccount.balance = 0
subaccount.ledgerentries = [c for c in subaccount.ledgerentries if period_beg <= c.date <= period_end ]
for ledger_entry in subaccount.ledgerentries:
if ledger_entry.currency == currency:
if ledger_entry.tside == 'credit':
classification.balance -= ledger_entry.amount
account.balance -= ledger_entry.amount
subaccount.balance -= ledger_entry.amount
elif ledger_entry.tside == 'debit':
classification.balance += ledger_entry.amount
account.balance += ledger_entry.amount
subaccount.balance += ledger_entry.amount
return render_template('financial_statements/statement_of_cash_flows.html',
period = period,
periods = periods,
currency = currency,
elements = elements,
net_income = net_income)
| 42.52809
| 173
| 0.632629
| 3,093
| 30,280
| 6.063046
| 0.072745
| 0.068896
| 0.053965
| 0.028156
| 0.799072
| 0.755879
| 0.73039
| 0.705914
| 0.698288
| 0.686184
| 0
| 0.006279
| 0.25317
| 30,280
| 711
| 174
| 42.587904
| 0.822986
| 0.001618
| 0
| 0.695122
| 0
| 0
| 0.104307
| 0.06752
| 0
| 0
| 0
| 0
| 0
| 1
| 0.053354
| false
| 0
| 0.030488
| 0.007622
| 0.13872
| 0.004573
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b72ec778e937eff162ae374a4068868ba0ec282c
| 311
|
py
|
Python
|
2021/Helpers/ArrayHelpers.py
|
Quikks1lver/advent-of-code-2020
|
ead0450b6983fccc6a353dab8ef583a3a5d84527
|
[
"MIT"
] | null | null | null |
2021/Helpers/ArrayHelpers.py
|
Quikks1lver/advent-of-code-2020
|
ead0450b6983fccc6a353dab8ef583a3a5d84527
|
[
"MIT"
] | null | null | null |
2021/Helpers/ArrayHelpers.py
|
Quikks1lver/advent-of-code-2020
|
ead0450b6983fccc6a353dab8ef583a3a5d84527
|
[
"MIT"
] | null | null | null |
from typing import List
def is_inbounds(twod_array: List[list], row: int, col: int) -> bool:
"""
Returns true if the row and column indices are within the bounds of the array, false otherwise
"""
return True if row >= 0 and row < len(twod_array) and col >= 0 and col < len(twod_array[0]) else False
| 44.428571
| 105
| 0.694534
| 54
| 311
| 3.925926
| 0.555556
| 0.127358
| 0.113208
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012146
| 0.205788
| 311
| 7
| 105
| 44.428571
| 0.846154
| 0.302251
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 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
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
b73b63ddac5112ea5c771800b9da67ed93a79f08
| 1,001
|
py
|
Python
|
website/project/serializers.py
|
BornToDebug/homeStruction
|
354e03c05cb363d8397d0e2d7afeb78a029266f9
|
[
"Apache-2.0"
] | 6
|
2016-08-31T16:46:54.000Z
|
2017-09-15T19:34:30.000Z
|
website/project/serializers.py
|
BornToDebug/homeStruction
|
354e03c05cb363d8397d0e2d7afeb78a029266f9
|
[
"Apache-2.0"
] | 4
|
2016-09-02T09:18:41.000Z
|
2016-09-02T09:24:08.000Z
|
website/project/serializers.py
|
BornToDebug/homeStruction
|
354e03c05cb363d8397d0e2d7afeb78a029266f9
|
[
"Apache-2.0"
] | null | null | null |
from rest_framework import serializers
from models import Temperature, Lamp, Light, Door, Window, Humidity
class TemperatureSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Temperature
fields = ('time_recorded', 'value')
class LampSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Lamp
fields = ('time_recorded', 'value')
class LightSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Light
fields = ('time_recorded', 'value')
class DoorSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Door
fields = ('time_recorded', 'value')
class WindowSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Window
fields = ('time_recorded', 'value')
class HumiditySerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Humidity
fields = ('time_recorded', 'value')
| 28.6
| 68
| 0.704296
| 86
| 1,001
| 8.116279
| 0.302326
| 0.318052
| 0.361032
| 0.395415
| 0.638968
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206793
| 1,001
| 34
| 69
| 29.441176
| 0.879093
| 0
| 0
| 0.461538
| 0
| 0
| 0.108
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.076923
| 0
| 0.538462
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
3f8e2a08f9944e80883eff0a3f71486fe899db1e
| 525
|
py
|
Python
|
test_coin_change.py
|
jaebradley/leetcode.py
|
64634cc7d0e975ddd163f35acb18cc92960b8eb5
|
[
"MIT"
] | null | null | null |
test_coin_change.py
|
jaebradley/leetcode.py
|
64634cc7d0e975ddd163f35acb18cc92960b8eb5
|
[
"MIT"
] | 2
|
2019-11-13T19:55:49.000Z
|
2019-11-13T19:55:57.000Z
|
test_coin_change.py
|
jaebradley/leetcode.py
|
64634cc7d0e975ddd163f35acb18cc92960b8eb5
|
[
"MIT"
] | null | null | null |
from unittest import TestCase
from coin_change import Solution
class TestCoinChange(TestCase):
def test_multiple_of_one_coin(self):
self.assertEqual(Solution().coinChange([1, 2, 5], 11), 3)
def test_zero(self):
self.assertEqual(Solution().coinChange([1, 2, 3], 0), 0)
def test_unreachable_value(self):
self.assertEqual(Solution().coinChange([2], 3), -1)
def test_reachable_value_that_encounters_unreachable_value(self):
self.assertEqual(Solution().coinChange([2], 4), 2)
| 29.166667
| 69
| 0.702857
| 69
| 525
| 5.144928
| 0.434783
| 0.078873
| 0.214085
| 0.304225
| 0.523944
| 0.523944
| 0.523944
| 0.304225
| 0
| 0
| 0
| 0.038902
| 0.167619
| 525
| 17
| 70
| 30.882353
| 0.773455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.363636
| 1
| 0.363636
| false
| 0
| 0.181818
| 0
| 0.636364
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
3f92df9989a8a0865d377722932e0f2f453fe2d8
| 82
|
py
|
Python
|
bigcommerce/resources/time.py
|
Anmol-Gulati/bigcommerce-api-python
|
a20e9bdb27fb6357426da0be91b9b9fb21da755f
|
[
"MIT"
] | 69
|
2015-01-09T03:00:19.000Z
|
2022-03-30T07:27:20.000Z
|
bigcommerce/resources/time.py
|
Anmol-Gulati/bigcommerce-api-python
|
a20e9bdb27fb6357426da0be91b9b9fb21da755f
|
[
"MIT"
] | 70
|
2015-01-04T20:27:45.000Z
|
2022-02-14T23:34:10.000Z
|
bigcommerce/resources/time.py
|
CUCWD/bigcommerce-api-python
|
e8fc7df64dfe776bb49895d2bcdec853e30f3134
|
[
"MIT"
] | 71
|
2015-01-08T06:30:53.000Z
|
2022-03-11T11:58:22.000Z
|
from .base import *
class Time(ListableApiResource):
resource_name = 'time'
| 13.666667
| 32
| 0.719512
| 9
| 82
| 6.444444
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.182927
| 82
| 5
| 33
| 16.4
| 0.865672
| 0
| 0
| 0
| 0
| 0
| 0.04878
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3fd396dbcedb20d8bd25ccd327d1710892b88ac8
| 98
|
py
|
Python
|
test/testproj/foo/models.py
|
WorkHorseIndustries/drf-api-test
|
b946e7cac38c3eaedbaebb84b22826fba8c3f20c
|
[
"MIT"
] | 1
|
2021-02-09T14:18:12.000Z
|
2021-02-09T14:18:12.000Z
|
test/testproj/foo/models.py
|
WorkHorseIndustries/drf-api-test
|
b946e7cac38c3eaedbaebb84b22826fba8c3f20c
|
[
"MIT"
] | null | null | null |
test/testproj/foo/models.py
|
WorkHorseIndustries/drf-api-test
|
b946e7cac38c3eaedbaebb84b22826fba8c3f20c
|
[
"MIT"
] | null | null | null |
from django.db import models
class Foo(models.Model):
bar = models.CharField(max_length=10)
| 16.333333
| 41
| 0.744898
| 15
| 98
| 4.8
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.024096
| 0.153061
| 98
| 5
| 42
| 19.6
| 0.843373
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3fd8d6937a29154e65934e58f0af108994cb6dab
| 196
|
py
|
Python
|
etk/data_extractors/digPriceExtractor/digpe/unit/__init__.py
|
linqyd/etk
|
dcf0cae4076619f5261573d47b4f5f26baaf15b7
|
[
"MIT"
] | null | null | null |
etk/data_extractors/digPriceExtractor/digpe/unit/__init__.py
|
linqyd/etk
|
dcf0cae4076619f5261573d47b4f5f26baaf15b7
|
[
"MIT"
] | null | null | null |
etk/data_extractors/digPriceExtractor/digpe/unit/__init__.py
|
linqyd/etk
|
dcf0cae4076619f5261573d47b4f5f26baaf15b7
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# @Author: ZwEin
# @Date: 2016-07-04 11:51:12
# @Last Modified by: ZwEin
# @Last Modified time: 2016-07-04 11:53:27
from price_units import *
from time_units import *
| 21.777778
| 42
| 0.658163
| 33
| 196
| 3.848485
| 0.666667
| 0.094488
| 0.125984
| 0.15748
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.18125
| 0.183673
| 196
| 9
| 43
| 21.777778
| 0.6125
| 0.678571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3fe5134c2ee648f241002b81b7d22ca25f2384b0
| 85
|
py
|
Python
|
create_configuration_bodyflow.py
|
BigOto2/BlenderRenderDNS
|
a8ff239ecffef5217f0db35d579227a0a444c32d
|
[
"MIT"
] | 1
|
2021-07-28T00:42:39.000Z
|
2021-07-28T00:42:39.000Z
|
create_configuration_bodyflow.py
|
BigOto2/BlenderRenderDNS
|
a8ff239ecffef5217f0db35d579227a0a444c32d
|
[
"MIT"
] | null | null | null |
create_configuration_bodyflow.py
|
BigOto2/BlenderRenderDNS
|
a8ff239ecffef5217f0db35d579227a0a444c32d
|
[
"MIT"
] | 1
|
2019-05-13T17:38:05.000Z
|
2019-05-13T17:38:05.000Z
|
import os
os.chdir("Render2018/lib/")
os.system("python3 create_config_bodyflow.py")
| 21.25
| 46
| 0.788235
| 13
| 85
| 5
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 0.058824
| 85
| 3
| 47
| 28.333333
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.564706
| 0.294118
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b7776befb991a61b4086861fcc8c72cbab4ad146
| 9,979
|
py
|
Python
|
src/main/resources/pytz/zoneinfo/US/Central.py
|
TheEin/swagger-maven-plugin
|
cf93dce2d5c8d3534f4cf8c612b11e2d2313871b
|
[
"Apache-2.0"
] | 65
|
2015-11-14T13:46:01.000Z
|
2021-08-14T05:54:04.000Z
|
lib/pytz/zoneinfo/US/Central.py
|
tjsavage/polymer-dashboard
|
19bc467f1206613f8eec646b6f2bc43cc319ef75
|
[
"CNRI-Python",
"Linux-OpenIB"
] | 13
|
2016-03-31T20:00:17.000Z
|
2021-08-20T14:52:31.000Z
|
lib/pytz/zoneinfo/US/Central.py
|
tjsavage/polymer-dashboard
|
19bc467f1206613f8eec646b6f2bc43cc319ef75
|
[
"CNRI-Python",
"Linux-OpenIB"
] | 20
|
2015-03-18T08:41:37.000Z
|
2020-12-18T02:58:30.000Z
|
'''tzinfo timezone information for US/Central.'''
from pytz.tzinfo import DstTzInfo
from pytz.tzinfo import memorized_datetime as d
from pytz.tzinfo import memorized_ttinfo as i
class Central(DstTzInfo):
'''US/Central timezone definition. See datetime.tzinfo for details'''
zone = 'US/Central'
_utc_transition_times = [
d(1,1,1,0,0,0),
d(1918,3,31,8,0,0),
d(1918,10,27,7,0,0),
d(1919,3,30,8,0,0),
d(1919,10,26,7,0,0),
d(1920,6,13,8,0,0),
d(1920,10,31,7,0,0),
d(1921,3,27,8,0,0),
d(1921,10,30,7,0,0),
d(1922,4,30,8,0,0),
d(1922,9,24,7,0,0),
d(1923,4,29,8,0,0),
d(1923,9,30,7,0,0),
d(1924,4,27,8,0,0),
d(1924,9,28,7,0,0),
d(1925,4,26,8,0,0),
d(1925,9,27,7,0,0),
d(1926,4,25,8,0,0),
d(1926,9,26,7,0,0),
d(1927,4,24,8,0,0),
d(1927,9,25,7,0,0),
d(1928,4,29,8,0,0),
d(1928,9,30,7,0,0),
d(1929,4,28,8,0,0),
d(1929,9,29,7,0,0),
d(1930,4,27,8,0,0),
d(1930,9,28,7,0,0),
d(1931,4,26,8,0,0),
d(1931,9,27,7,0,0),
d(1932,4,24,8,0,0),
d(1932,9,25,7,0,0),
d(1933,4,30,8,0,0),
d(1933,9,24,7,0,0),
d(1934,4,29,8,0,0),
d(1934,9,30,7,0,0),
d(1935,4,28,8,0,0),
d(1935,9,29,7,0,0),
d(1936,3,1,8,0,0),
d(1936,11,15,7,0,0),
d(1937,4,25,8,0,0),
d(1937,9,26,7,0,0),
d(1938,4,24,8,0,0),
d(1938,9,25,7,0,0),
d(1939,4,30,8,0,0),
d(1939,9,24,7,0,0),
d(1940,4,28,8,0,0),
d(1940,9,29,7,0,0),
d(1941,4,27,8,0,0),
d(1941,9,28,7,0,0),
d(1942,2,9,8,0,0),
d(1945,8,14,23,0,0),
d(1945,9,30,7,0,0),
d(1946,4,28,8,0,0),
d(1946,9,29,7,0,0),
d(1947,4,27,8,0,0),
d(1947,9,28,7,0,0),
d(1948,4,25,8,0,0),
d(1948,9,26,7,0,0),
d(1949,4,24,8,0,0),
d(1949,9,25,7,0,0),
d(1950,4,30,8,0,0),
d(1950,9,24,7,0,0),
d(1951,4,29,8,0,0),
d(1951,9,30,7,0,0),
d(1952,4,27,8,0,0),
d(1952,9,28,7,0,0),
d(1953,4,26,8,0,0),
d(1953,9,27,7,0,0),
d(1954,4,25,8,0,0),
d(1954,9,26,7,0,0),
d(1955,4,24,8,0,0),
d(1955,10,30,7,0,0),
d(1956,4,29,8,0,0),
d(1956,10,28,7,0,0),
d(1957,4,28,8,0,0),
d(1957,10,27,7,0,0),
d(1958,4,27,8,0,0),
d(1958,10,26,7,0,0),
d(1959,4,26,8,0,0),
d(1959,10,25,7,0,0),
d(1960,4,24,8,0,0),
d(1960,10,30,7,0,0),
d(1961,4,30,8,0,0),
d(1961,10,29,7,0,0),
d(1962,4,29,8,0,0),
d(1962,10,28,7,0,0),
d(1963,4,28,8,0,0),
d(1963,10,27,7,0,0),
d(1964,4,26,8,0,0),
d(1964,10,25,7,0,0),
d(1965,4,25,8,0,0),
d(1965,10,31,7,0,0),
d(1966,4,24,8,0,0),
d(1966,10,30,7,0,0),
d(1967,4,30,8,0,0),
d(1967,10,29,7,0,0),
d(1968,4,28,8,0,0),
d(1968,10,27,7,0,0),
d(1969,4,27,8,0,0),
d(1969,10,26,7,0,0),
d(1970,4,26,8,0,0),
d(1970,10,25,7,0,0),
d(1971,4,25,8,0,0),
d(1971,10,31,7,0,0),
d(1972,4,30,8,0,0),
d(1972,10,29,7,0,0),
d(1973,4,29,8,0,0),
d(1973,10,28,7,0,0),
d(1974,1,6,8,0,0),
d(1974,10,27,7,0,0),
d(1975,2,23,8,0,0),
d(1975,10,26,7,0,0),
d(1976,4,25,8,0,0),
d(1976,10,31,7,0,0),
d(1977,4,24,8,0,0),
d(1977,10,30,7,0,0),
d(1978,4,30,8,0,0),
d(1978,10,29,7,0,0),
d(1979,4,29,8,0,0),
d(1979,10,28,7,0,0),
d(1980,4,27,8,0,0),
d(1980,10,26,7,0,0),
d(1981,4,26,8,0,0),
d(1981,10,25,7,0,0),
d(1982,4,25,8,0,0),
d(1982,10,31,7,0,0),
d(1983,4,24,8,0,0),
d(1983,10,30,7,0,0),
d(1984,4,29,8,0,0),
d(1984,10,28,7,0,0),
d(1985,4,28,8,0,0),
d(1985,10,27,7,0,0),
d(1986,4,27,8,0,0),
d(1986,10,26,7,0,0),
d(1987,4,5,8,0,0),
d(1987,10,25,7,0,0),
d(1988,4,3,8,0,0),
d(1988,10,30,7,0,0),
d(1989,4,2,8,0,0),
d(1989,10,29,7,0,0),
d(1990,4,1,8,0,0),
d(1990,10,28,7,0,0),
d(1991,4,7,8,0,0),
d(1991,10,27,7,0,0),
d(1992,4,5,8,0,0),
d(1992,10,25,7,0,0),
d(1993,4,4,8,0,0),
d(1993,10,31,7,0,0),
d(1994,4,3,8,0,0),
d(1994,10,30,7,0,0),
d(1995,4,2,8,0,0),
d(1995,10,29,7,0,0),
d(1996,4,7,8,0,0),
d(1996,10,27,7,0,0),
d(1997,4,6,8,0,0),
d(1997,10,26,7,0,0),
d(1998,4,5,8,0,0),
d(1998,10,25,7,0,0),
d(1999,4,4,8,0,0),
d(1999,10,31,7,0,0),
d(2000,4,2,8,0,0),
d(2000,10,29,7,0,0),
d(2001,4,1,8,0,0),
d(2001,10,28,7,0,0),
d(2002,4,7,8,0,0),
d(2002,10,27,7,0,0),
d(2003,4,6,8,0,0),
d(2003,10,26,7,0,0),
d(2004,4,4,8,0,0),
d(2004,10,31,7,0,0),
d(2005,4,3,8,0,0),
d(2005,10,30,7,0,0),
d(2006,4,2,8,0,0),
d(2006,10,29,7,0,0),
d(2007,3,11,8,0,0),
d(2007,11,4,7,0,0),
d(2008,3,9,8,0,0),
d(2008,11,2,7,0,0),
d(2009,3,8,8,0,0),
d(2009,11,1,7,0,0),
d(2010,3,14,8,0,0),
d(2010,11,7,7,0,0),
d(2011,3,13,8,0,0),
d(2011,11,6,7,0,0),
d(2012,3,11,8,0,0),
d(2012,11,4,7,0,0),
d(2013,3,10,8,0,0),
d(2013,11,3,7,0,0),
d(2014,3,9,8,0,0),
d(2014,11,2,7,0,0),
d(2015,3,8,8,0,0),
d(2015,11,1,7,0,0),
d(2016,3,13,8,0,0),
d(2016,11,6,7,0,0),
d(2017,3,12,8,0,0),
d(2017,11,5,7,0,0),
d(2018,3,11,8,0,0),
d(2018,11,4,7,0,0),
d(2019,3,10,8,0,0),
d(2019,11,3,7,0,0),
d(2020,3,8,8,0,0),
d(2020,11,1,7,0,0),
d(2021,3,14,8,0,0),
d(2021,11,7,7,0,0),
d(2022,3,13,8,0,0),
d(2022,11,6,7,0,0),
d(2023,3,12,8,0,0),
d(2023,11,5,7,0,0),
d(2024,3,10,8,0,0),
d(2024,11,3,7,0,0),
d(2025,3,9,8,0,0),
d(2025,11,2,7,0,0),
d(2026,3,8,8,0,0),
d(2026,11,1,7,0,0),
d(2027,3,14,8,0,0),
d(2027,11,7,7,0,0),
d(2028,3,12,8,0,0),
d(2028,11,5,7,0,0),
d(2029,3,11,8,0,0),
d(2029,11,4,7,0,0),
d(2030,3,10,8,0,0),
d(2030,11,3,7,0,0),
d(2031,3,9,8,0,0),
d(2031,11,2,7,0,0),
d(2032,3,14,8,0,0),
d(2032,11,7,7,0,0),
d(2033,3,13,8,0,0),
d(2033,11,6,7,0,0),
d(2034,3,12,8,0,0),
d(2034,11,5,7,0,0),
d(2035,3,11,8,0,0),
d(2035,11,4,7,0,0),
d(2036,3,9,8,0,0),
d(2036,11,2,7,0,0),
d(2037,3,8,8,0,0),
d(2037,11,1,7,0,0),
]
_transition_info = [
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,0,'EST'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CWT'),
i(-18000,3600,'CPT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
i(-18000,3600,'CDT'),
i(-21600,0,'CST'),
]
Central = Central()
| 20.323829
| 73
| 0.562481
| 2,645
| 9,979
| 2.119471
| 0.066541
| 0.084552
| 0.125758
| 0.210489
| 0.781663
| 0.76436
| 0.480021
| 0.480021
| 0.480021
| 0.480021
| 0
| 0.440106
| 0.055517
| 9,979
| 490
| 74
| 20.365306
| 0.154695
| 0.010723
| 0
| 0.483402
| 0
| 0
| 0.072819
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.006224
| 0
| 0.014523
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b7cd25e7ab5c0f185d0ebd9e078041ed2fd09f3d
| 592
|
py
|
Python
|
tools/rosunit/test/dotname_cases.py
|
mcx/ros
|
93d8da32091b8b43702eab5d3202f4511dfeb7dc
|
[
"BSD-3-Clause"
] | 2,051
|
2015-01-03T01:00:53.000Z
|
2022-03-30T13:36:24.000Z
|
tools/rosunit/test/dotname_cases.py
|
mcx/ros
|
93d8da32091b8b43702eab5d3202f4511dfeb7dc
|
[
"BSD-3-Clause"
] | 204
|
2015-01-01T00:44:00.000Z
|
2022-03-17T07:31:55.000Z
|
tools/rosunit/test/dotname_cases.py
|
mcx/ros
|
93d8da32091b8b43702eab5d3202f4511dfeb7dc
|
[
"BSD-3-Clause"
] | 730
|
2015-01-04T05:44:08.000Z
|
2022-03-24T07:16:31.000Z
|
import unittest
class CaseA(unittest.TestCase):
def runTest(self):
self.assertTrue(True)
class CaseB(unittest.TestCase):
def runTest(self):
self.assertTrue(True)
class DotnameLoadingSuite(unittest.TestSuite):
def __init__(self):
super(DotnameLoadingSuite, self).__init__()
self.addTest(CaseA())
self.addTest(CaseB())
class DotnameLoadingTest(unittest.TestCase):
def test_a(self):
self.assertTrue(True)
def test_b(self):
self.assertTrue(True)
class NotTestCase():
def not_test(self):
pass
| 16
| 51
| 0.658784
| 64
| 592
| 5.921875
| 0.359375
| 0.084433
| 0.189974
| 0.23219
| 0.350923
| 0.279683
| 0.279683
| 0.279683
| 0.279683
| 0
| 0
| 0
| 0.231419
| 592
| 36
| 52
| 16.444444
| 0.832967
| 0
| 0
| 0.3
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0.3
| false
| 0.05
| 0.05
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
b7d62e7b8eabb92764e97f755e324f3a6a8b83aa
| 96
|
py
|
Python
|
email_tools/apps.py
|
pennlabs/django-email-tools
|
5fce8037fcca0d635123b563fba278ad8a5df871
|
[
"MIT"
] | null | null | null |
email_tools/apps.py
|
pennlabs/django-email-tools
|
5fce8037fcca0d635123b563fba278ad8a5df871
|
[
"MIT"
] | null | null | null |
email_tools/apps.py
|
pennlabs/django-email-tools
|
5fce8037fcca0d635123b563fba278ad8a5df871
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class EmailToolsConfig(AppConfig):
name = "email_tools"
| 16
| 34
| 0.770833
| 11
| 96
| 6.636364
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 96
| 5
| 35
| 19.2
| 0.901235
| 0
| 0
| 0
| 0
| 0
| 0.114583
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
b7d82a05078f0e92ee58c65678162e32b72632eb
| 59
|
bzl
|
Python
|
docs/rules_proto_stub/proto/defs.bzl
|
laurentlb/rules_rust
|
dc9b207586d328f86931e1ce3be630041b2a0f5e
|
[
"Apache-2.0"
] | 1
|
2021-02-05T06:44:28.000Z
|
2021-02-05T06:44:28.000Z
|
docs/rules_proto_stub/proto/defs.bzl
|
Strum355/rules_rust
|
6865219d2ddf7849bd8c98d8dc44715660452bde
|
[
"Apache-2.0"
] | null | null | null |
docs/rules_proto_stub/proto/defs.bzl
|
Strum355/rules_rust
|
6865219d2ddf7849bd8c98d8dc44715660452bde
|
[
"Apache-2.0"
] | 2
|
2020-09-12T19:28:00.000Z
|
2020-11-24T02:46:42.000Z
|
ProtoInfo = provider()
def proto_library(**args):
pass
| 14.75
| 26
| 0.694915
| 7
| 59
| 5.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.169492
| 59
| 4
| 27
| 14.75
| 0.816327
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
4d269921f99fc202d7f7cec1c9f32a979cd0fdf1
| 780
|
py
|
Python
|
stubs/m5stack_flowui-v1_4_0-beta/flowlib/lib/imu.py
|
mattytrentini/micropython-stubs
|
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
|
[
"MIT"
] | null | null | null |
stubs/m5stack_flowui-v1_4_0-beta/flowlib/lib/imu.py
|
mattytrentini/micropython-stubs
|
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
|
[
"MIT"
] | null | null | null |
stubs/m5stack_flowui-v1_4_0-beta/flowlib/lib/imu.py
|
mattytrentini/micropython-stubs
|
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
|
[
"MIT"
] | null | null | null |
"""
Module: 'flowlib.lib.imu' on M5 FlowUI v1.4.0-beta
"""
# MCU: (sysname='esp32', nodename='esp32', release='1.11.0', version='v1.11-284-g5d8e1c867 on 2019-08-30', machine='ESP32 module with ESP32')
# Stubber: 1.3.1 - updated
from typing import Any
class IMU:
""""""
def _accel_fs(self, *argv) -> Any:
pass
def _gyro_fs(self, *argv) -> Any:
pass
def _register_char(self, *argv) -> Any:
pass
def _register_short(self, *argv) -> Any:
pass
def _register_three_shorts(self, *argv) -> Any:
pass
acceleration = None
gyro = None
def setGyroOffsets(self, *argv) -> Any:
pass
whoami = None
ypr = None
MPU6050_ADDR = 104
SH200Q_ADDR = 108
i2c_bus = None
imu_i2c = None
mpu6050 = None
| 18.571429
| 141
| 0.607692
| 109
| 780
| 4.211009
| 0.53211
| 0.104575
| 0.143791
| 0.196078
| 0.217865
| 0.217865
| 0
| 0
| 0
| 0
| 0
| 0.099828
| 0.255128
| 780
| 41
| 142
| 19.02439
| 0.690189
| 0.276923
| 0
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.26087
| false
| 0.26087
| 0.043478
| 0
| 0.521739
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
4d4886c6eff4a830d42fcf093c4a302629258e41
| 175
|
py
|
Python
|
demo/code/2015-12-17/mydebugapp/bar/views.py
|
uxlsl/uxlsl.github.io
|
91b62eb01fad38b913016236bb687eb6f0fe2012
|
[
"MIT"
] | null | null | null |
demo/code/2015-12-17/mydebugapp/bar/views.py
|
uxlsl/uxlsl.github.io
|
91b62eb01fad38b913016236bb687eb6f0fe2012
|
[
"MIT"
] | null | null | null |
demo/code/2015-12-17/mydebugapp/bar/views.py
|
uxlsl/uxlsl.github.io
|
91b62eb01fad38b913016236bb687eb6f0fe2012
|
[
"MIT"
] | null | null | null |
from django.http import JsonResponse
from .models import People
def hello(request):
p = People.objects.all().count()
print(p)
return JsonResponse({"hello":123})
| 19.444444
| 38
| 0.702857
| 23
| 175
| 5.347826
| 0.73913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02069
| 0.171429
| 175
| 8
| 39
| 21.875
| 0.827586
| 0
| 0
| 0
| 0
| 0
| 0.028571
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.666667
| 0.166667
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4d4dc10b99ef9bb67f0ae19187e4ff8fbeb2de00
| 1,291
|
py
|
Python
|
presalytics/client/presalytics_doc_converter/__init__.py
|
presalytics/python-client
|
5d80b78562126feeeb49af4738e2c1aed12dce3a
|
[
"MIT"
] | 4
|
2020-02-21T16:30:46.000Z
|
2021-01-12T12:22:03.000Z
|
presalytics/client/presalytics_doc_converter/__init__.py
|
presalytics/python-client
|
5d80b78562126feeeb49af4738e2c1aed12dce3a
|
[
"MIT"
] | 4
|
2019-12-28T19:30:08.000Z
|
2020-03-31T19:27:45.000Z
|
presalytics/client/presalytics_doc_converter/__init__.py
|
presalytics/python-client
|
5d80b78562126feeeb49af4738e2c1aed12dce3a
|
[
"MIT"
] | null | null | null |
# coding: utf-8
# flake8: noqa
"""
Doc Converter
This api converts file formats of OpenXml and OpenOffice documents formats to vector files (e.g., svg) # noqa: E501
The version of the OpenAPI document: 0.1
Contact: kevin@presalytics.io
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
__version__ = "1.0.0"
# import apis into sdk package
from presalytics.client.presalytics_doc_converter.api.default_api import DefaultApi
# import ApiClient
from presalytics.client.presalytics_doc_converter.api_client import ApiClient
from presalytics.client.presalytics_doc_converter.configuration import Configuration
from presalytics.client.presalytics_doc_converter.exceptions import OpenApiException
from presalytics.client.presalytics_doc_converter.exceptions import ApiTypeError
from presalytics.client.presalytics_doc_converter.exceptions import ApiValueError
from presalytics.client.presalytics_doc_converter.exceptions import ApiKeyError
from presalytics.client.presalytics_doc_converter.exceptions import ApiException
# import models into sdk package
from presalytics.client.presalytics_doc_converter.models.file_to_convert import FileToConvert
from presalytics.client.presalytics_doc_converter.models.file_url import FileUrl
| 36.885714
| 120
| 0.841983
| 163
| 1,291
| 6.460123
| 0.386503
| 0.125356
| 0.19943
| 0.303894
| 0.573599
| 0.573599
| 0.573599
| 0.567901
| 0.110161
| 0
| 0
| 0.008643
| 0.103796
| 1,291
| 34
| 121
| 37.970588
| 0.901469
| 0.273431
| 0
| 0
| 0
| 0
| 0.005525
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.916667
| 0
| 0.916667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4d63c4abf32f41d9642ebe24d745301201c8d042
| 87
|
py
|
Python
|
preprocessor/__init__.py
|
shuvorahman/digital_sister
|
4e804a39bf16db0875d31c5274cd31db82891d4b
|
[
"MIT"
] | null | null | null |
preprocessor/__init__.py
|
shuvorahman/digital_sister
|
4e804a39bf16db0875d31c5274cd31db82891d4b
|
[
"MIT"
] | null | null | null |
preprocessor/__init__.py
|
shuvorahman/digital_sister
|
4e804a39bf16db0875d31c5274cd31db82891d4b
|
[
"MIT"
] | null | null | null |
"""
Package contains:
Database Class
Decoder Class
Cleaner Class
MyHTMLParser Class
"""
| 12.428571
| 18
| 0.793103
| 10
| 87
| 6.9
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126437
| 87
| 7
| 19
| 12.428571
| 0.907895
| 0.908046
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4d84399b7c7da77414785a920e0ab71de089d93f
| 23
|
py
|
Python
|
.history/ClassFiles/Functions/Functions_20210101224921.py
|
minefarmer/Comprehensive-Python
|
f97b9b83ec328fc4e4815607e6a65de90bb8de66
|
[
"Unlicense"
] | null | null | null |
.history/ClassFiles/Functions/Functions_20210101224921.py
|
minefarmer/Comprehensive-Python
|
f97b9b83ec328fc4e4815607e6a65de90bb8de66
|
[
"Unlicense"
] | null | null | null |
.history/ClassFiles/Functions/Functions_20210101224921.py
|
minefarmer/Comprehensive-Python
|
f97b9b83ec328fc4e4815607e6a65de90bb8de66
|
[
"Unlicense"
] | null | null | null |
''' FUNCTIONS
| 7.666667
| 21
| 0.391304
| 1
| 23
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.478261
| 23
| 2
| 22
| 11.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4d8caeff5bb6260fab741ec71f7f4ad0d32b4fac
| 6,724
|
py
|
Python
|
metrics.py
|
Edouard360/text-mining-challenge
|
9120567c18f20f2f25a7f5d8e1f879c9bdcb0726
|
[
"Apache-2.0"
] | 1
|
2017-03-04T14:23:30.000Z
|
2017-03-04T14:23:30.000Z
|
metrics.py
|
Edouard360/text-mining-challenge
|
9120567c18f20f2f25a7f5d8e1f879c9bdcb0726
|
[
"Apache-2.0"
] | 4
|
2017-09-23T21:59:56.000Z
|
2017-09-27T06:01:08.000Z
|
metrics.py
|
Edouard360/text-mining-challenge
|
9120567c18f20f2f25a7f5d8e1f879c9bdcb0726
|
[
"Apache-2.0"
] | 2
|
2017-03-04T14:23:31.000Z
|
2017-05-26T22:54:46.000Z
|
# -*- coding: utf-8 -*-
"""
Contributors:
- Louis Rémus
"""
import numpy as np
# Without the means
def squared_error(y_true, y_estimated):
"""
Args:
y_true (array-like):
y_estimated (array-like):
Returns:
(array-like) Squared Error
"""
y_true, y_estimated = map(np.asarray, [y_true, y_estimated])
return (y_true - y_estimated) ** 2
def absolute_error(y_true, y_estimated):
"""
Args:
y_true (array-like):
y_estimated (array-like):
Returns:
(array-like) Absolute Error
"""
y_true, y_estimated = map(np.asarray, [y_true, y_estimated])
return np.abs(y_true - y_estimated)
def absolute_percentage_error(y_true, y_estimated):
"""
Known issues:
- It is not symmetric since:
- y_true, y_estimated do not play a symmetric role
- over- and under-forecasts are not treated equally
- If the actual value or forecast value is 0, the value of error will boom up to the upper-limit of error
Args:
y_true (array-like):
y_estimated (array-like):
Returns:
(array-like) Absolute Percentage Error
"""
y_true, y_estimated = map(np.asarray, [y_true, y_estimated])
return np.abs((y_true - y_estimated) / y_true)
def adjusted_absolute_percentage_error(y_true, y_estimated):
"""
Known issues:
- It is not symmetric since over- and under-forecasts are not treated equally
- If the actual value or forecast value is 0, the value of error will boom up to the upper-limit of error
Args:
y_true (array-like):
y_estimated (array-like):
References:
https://www.wikiwand.com/en/Symmetric_mean_absolute_percentage_error
Returns:
(array-like) Adjusted Absolute Percentage Error
"""
y_true, y_estimated = map(np.asarray, [y_true, y_estimated])
return np.abs((y_true - y_estimated) / (np.abs(y_true) + np.abs(y_estimated)))
def absolute_scaled_error(y_train, y_true, y_estimated, seasonal_period=1):
"""
Properties:
- Scale invariance (since error fraction)
- Predictable behavior towards 0
- Symmetry (both symmetry criterion verified)
Args:
seasonal_period (int): default equal to 1 (non-seasonal time series)
y_train (array-like):
y_true (array-like):
y_estimated (array-like):
References:
https://www.wikiwand.com/en/Mean_absolute_scaled_error
"Another look at measures of forecast accuracy", Rob J Hyndman
Returns:
(array-like) Absolute Scaled Error
"""
y_true, y_estimated, y_train = map(np.asarray, [y_true, y_estimated, y_train])
# Mean Absolute Error of the naïve forecast method on the training set
# which uses the actual value from the prior period as the forecast: Forecasted[t] = Actual[t−1]
mae_naive_forecast = np.mean(absolute_error(y_true=y_train[seasonal_period:],
y_estimated=y_train[:-seasonal_period]))
# Absolute error of the forecast
ae_forecast = absolute_error(y_true=y_true, y_estimated=y_estimated)
return ae_forecast / mae_naive_forecast
# Mean errors
def mean_squared_error(y_true, y_estimated):
"""
Args:
y_true (array-like):
y_estimated (array-like):
Returns:
(float) MSE
"""
return np.mean(squared_error(y_true=y_true, y_estimated=y_estimated))
def mean_absolute_error(y_true, y_estimated):
"""
Args:
y_true (array-like):
y_estimated (array-like):
Returns:
(float) MAE
"""
return np.mean(absolute_error(y_true=y_true, y_estimated=y_estimated))
def mean_absolute_percentage_error(y_true, y_estimated):
"""
Args:
y_true (array-like):
y_estimated (array-like):
Returns:
(float) MAPE
"""
return np.mean(absolute_percentage_error(y_true=y_true, y_estimated=y_estimated))
def mean_adjusted_absolute_percentage_error(y_true, y_estimated):
"""
Args:
y_true (array-like):
y_estimated (array-like):
Returns:
(float) MAAPE
"""
return np.mean(adjusted_absolute_percentage_error(y_true=y_true, y_estimated=y_estimated))
def mean_absolute_scaled_error(y_train, y_true, y_estimated, seasonal_period=1):
"""
Args:
seasonal_period (int): default equal to 1 (non-seasonal time series)
y_true (array-like):
y_estimated (array-like):
Returns:
(float) MASE
"""
return np.mean(
absolute_scaled_error(y_train=y_train, y_true=y_true, y_estimated=y_estimated, seasonal_period=seasonal_period))
# Decorator to have metric ignore NaNs
def nan_ignoring(metric):
"""
Decorator to make metric ignore NaNs
Args:
metric (callable): metric to modify
Returns:
nan-ignoring metric function
"""
def nan_wrapper(y_true, y_estimated):
"""
Wrapping function
Args:
y_true (array-like):
y_estimated (array-like):
Returns:
nan-ignoring metric function value for (y_true, y_estimated)
"""
# Boolean mask
# True is y_true or y_estimated are NaN
# False otherwise
nan_mask = np.logical_or(np.isnan(y_true), np.isnan(y_estimated))
# New arguments to the metric function: values without NaNs
kwargs = {
'y_true': y_true[~nan_mask],
'y_estimated': y_estimated[~nan_mask]
}
return metric(**kwargs)
return nan_wrapper
# Means ignoring NaN
@nan_ignoring
def mean_squared_error_ignoring_nans(y_true, y_estimated):
return mean_squared_error(y_true=y_true, y_estimated=y_estimated)
@nan_ignoring
def mean_absolute_error_ignoring_nans(y_true, y_estimated):
return mean_absolute_error(y_true=y_true, y_estimated=y_estimated)
@nan_ignoring
def mean_absolute_percentage_error_ignoring_nans(y_true, y_estimated):
return mean_absolute_percentage_error(y_true=y_true, y_estimated=y_estimated)
@nan_ignoring
def neg_mean_absolute_percentage_error_ignoring_nans(y_true, y_estimated):
return -mean_absolute_percentage_error(y_true=y_true, y_estimated=y_estimated)
@nan_ignoring
def mean_adjusted_absolute_percentage_error_ignoring_nans(y_true, y_estimated):
return mean_adjusted_absolute_percentage_error(y_true=y_true, y_estimated=y_estimated)
@nan_ignoring
def mean_absolute_scaled_error_ignoring_nans(y_train, y_true, y_estimated, seasonal_period=1):
return mean_absolute_scaled_error(y_train=y_train, y_true=y_true, y_estimated=y_estimated,
seasonal_period=seasonal_period)
| 28.371308
| 120
| 0.675045
| 924
| 6,724
| 4.611472
| 0.156926
| 0.088008
| 0.083079
| 0.158414
| 0.712978
| 0.690214
| 0.679418
| 0.666745
| 0.661112
| 0.643746
| 0
| 0.002136
| 0.233938
| 6,724
| 236
| 121
| 28.491525
| 0.824888
| 0.410321
| 0
| 0.172414
| 0
| 0
| 0.00491
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.310345
| false
| 0
| 0.017241
| 0.103448
| 0.637931
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
4d912879bfe54bd9e73d2d8a2f456244c77b5868
| 32
|
py
|
Python
|
custom_components/read_email/__init__.py
|
kdosiodjinud/hassio_read_email
|
ddca7af2896518915931ed5b7793995287e88304
|
[
"MIT"
] | null | null | null |
custom_components/read_email/__init__.py
|
kdosiodjinud/hassio_read_email
|
ddca7af2896518915931ed5b7793995287e88304
|
[
"MIT"
] | null | null | null |
custom_components/read_email/__init__.py
|
kdosiodjinud/hassio_read_email
|
ddca7af2896518915931ed5b7793995287e88304
|
[
"MIT"
] | null | null | null |
"""The read_email component."""
| 16
| 31
| 0.6875
| 4
| 32
| 5.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 32
| 1
| 32
| 32
| 0.724138
| 0.78125
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4d919498aa49a6fb303450b8b49d9ba735c550ee
| 68
|
py
|
Python
|
openpyxl/workbook/__init__.py
|
xinetzone/openpyxl
|
df1507591952e6b4f865957bafc4f69e44845b75
|
[
"MIT"
] | null | null | null |
openpyxl/workbook/__init__.py
|
xinetzone/openpyxl
|
df1507591952e6b4f865957bafc4f69e44845b75
|
[
"MIT"
] | null | null | null |
openpyxl/workbook/__init__.py
|
xinetzone/openpyxl
|
df1507591952e6b4f865957bafc4f69e44845b75
|
[
"MIT"
] | null | null | null |
# Copyright (c) 2010-2022 openpyxl
from .workbook import Workbook
| 13.6
| 34
| 0.764706
| 9
| 68
| 5.777778
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140351
| 0.161765
| 68
| 4
| 35
| 17
| 0.77193
| 0.470588
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
4da91f261ce7f74ec4d88996c3f4905ec9ebdcdf
| 118
|
py
|
Python
|
vspreview/widgets/__init__.py
|
wwww-wwww/vs-preview
|
3aaad4f2242ca1d490dccb895efe27e823162d2a
|
[
"Apache-2.0"
] | null | null | null |
vspreview/widgets/__init__.py
|
wwww-wwww/vs-preview
|
3aaad4f2242ca1d490dccb895efe27e823162d2a
|
[
"Apache-2.0"
] | null | null | null |
vspreview/widgets/__init__.py
|
wwww-wwww/vs-preview
|
3aaad4f2242ca1d490dccb895efe27e823162d2a
|
[
"Apache-2.0"
] | null | null | null |
# flake8: noqa
from .custom import *
from .colorview import ColorView
from .timeline import Timeline, Notch, Notches
| 19.666667
| 46
| 0.779661
| 15
| 118
| 6.133333
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.01
| 0.152542
| 118
| 5
| 47
| 23.6
| 0.91
| 0.101695
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
4de59f30a68bab02a3b7bcd614262f3a4f7be8da
| 2,507
|
py
|
Python
|
lectures/decoradores_test.py
|
jadry92/Python-course-platzi
|
56c5f15d2090a370a67377b5b73e6a053e65fb70
|
[
"MIT"
] | null | null | null |
lectures/decoradores_test.py
|
jadry92/Python-course-platzi
|
56c5f15d2090a370a67377b5b73e6a053e65fb70
|
[
"MIT"
] | null | null | null |
lectures/decoradores_test.py
|
jadry92/Python-course-platzi
|
56c5f15d2090a370a67377b5b73e6a053e65fb70
|
[
"MIT"
] | null | null | null |
PASSWD = '12345'
def password_required(func):
def wrapper():
password = input('Cual es el passwd ? ')
if password == PASSWD:
return func()
else:
print('error')
return wrapper
def p_decorate(func):
def func_wrapper(name):
return "<p>{0}</p>".format(func(name))
return func_wrapper
def strong_decorate(func):
def func_wrapper(name):
return "<strong>{0}</strong>".format(func(name))
return func_wrapper
def div_decorate(func):
def func_wrapper(name):
return "<div>{0}</div>".format(func(name))
return func_wrapper
def upper_dec(func):
def wrapper(*args,**kwargs):
result = func(*args,**kwargs)
return result.upper()
return wrapper
@upper_dec
def get_my_name(name):
return "My name is {0}".format(name)
@div_decorate
@p_decorate
@strong_decorate
def get_text(name):
return "lorem ipsum, {0} dolor sit amet".format(name)
a = get_text
@password_required
def needs_password():
print('la contra esta correcta!!')
########################################################
## test general arguments "*args,**kwargs"
def test_valor_kwargs(**kwargs):
if kwargs is not None:
for key, value in kwargs.items():
print('%s == %s' %(key,value))
print(type(kwargs))
def test_valor_args(n_arg, *args):
print('primer valor normal: ', n_arg)
for arg in args:
print('este es un valor de *args: ',arg)
print(type(args))
def test_valor_kwargs_args(*args, **kwargs):
print(type(kwargs))
print(kwargs)
print('----------')
print(type(args))
print(args)
################################################################################
### example decorators in classes
def p_decorate_cla(func):
def func_wrapper(*args, **kwargs):
return "<p>{0}</p>".format(func(*args, **kwargs))
return func_wrapper
class Person():
def __init__(self):
self.name = "John"
self.family = "Doe"
@p_decorate_cla
def get_fullname(self):
return self.name+" "+self.family
if __name__ == '__main__':
#print(get_my_name('johan'))
print(a('johan'))
#test_valor_kwargs(caricatura='batman')
#test_valor_args('carlos','Karla','Paola','Elena',[1,2,3,5,1])
#test_valor_kwargs_args('flash', 'batman',[1,2,3,5,1], caricatura='batman', empresa = 'dc')
#
#my_person = Person()
#print(my_person.get_fullname())
#needs_password()
#print(get_text('johan'))
| 23.650943
| 95
| 0.591145
| 321
| 2,507
| 4.420561
| 0.280374
| 0.062016
| 0.031008
| 0.05074
| 0.170543
| 0.163495
| 0.147992
| 0
| 0
| 0
| 0
| 0.010532
| 0.204627
| 2,507
| 105
| 96
| 23.87619
| 0.701103
| 0.14998
| 0
| 0.19403
| 0
| 0
| 0.122222
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.298507
| false
| 0.089552
| 0
| 0.104478
| 0.537313
| 0.19403
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
4def355b2c703b3f1816db48d4a346c09ff98aca
| 176
|
py
|
Python
|
Projekt/testfiles/analysis/euclid-complexity.py
|
jonasw234/TAINTalyzing
|
80603bd68324911a57f566f6e2977ed96c229f32
|
[
"MIT"
] | 4
|
2020-03-06T14:35:51.000Z
|
2020-04-29T11:01:46.000Z
|
Projekt/testfiles/analysis/euclid-complexity.py
|
jonasw234/TAINTalyzing
|
80603bd68324911a57f566f6e2977ed96c229f32
|
[
"MIT"
] | null | null | null |
Projekt/testfiles/analysis/euclid-complexity.py
|
jonasw234/TAINTalyzing
|
80603bd68324911a57f566f6e2977ed96c229f32
|
[
"MIT"
] | 1
|
2020-07-29T13:59:07.000Z
|
2020-07-29T13:59:07.000Z
|
def euclid(n, m):
if n > m:
r = m
m = n
n = r
r = m % n
while r != 0:
m = n
n = r
r = m % n
return n
| 14.666667
| 18
| 0.255682
| 28
| 176
| 1.607143
| 0.321429
| 0.177778
| 0.133333
| 0.177778
| 0.311111
| 0.311111
| 0.311111
| 0
| 0
| 0
| 0
| 0.015873
| 0.642045
| 176
| 11
| 19
| 16
| 0.698413
| 0
| 0
| 0.545455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.090909
| false
| 0
| 0
| 0
| 0.181818
| 0
| 1
| 0
| 1
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1278e5f96ced70af78f6ada5c795ed536be4eba7
| 149
|
py
|
Python
|
Cryptohack/Intro/ascii.py
|
kbrezinski/Cryptography-Encryption
|
0d44c06a509fb5b3b85cad10ac0e98264490fd01
|
[
"BSD-3-Clause"
] | null | null | null |
Cryptohack/Intro/ascii.py
|
kbrezinski/Cryptography-Encryption
|
0d44c06a509fb5b3b85cad10ac0e98264490fd01
|
[
"BSD-3-Clause"
] | null | null | null |
Cryptohack/Intro/ascii.py
|
kbrezinski/Cryptography-Encryption
|
0d44c06a509fb5b3b85cad10ac0e98264490fd01
|
[
"BSD-3-Clause"
] | null | null | null |
ords = [99, 114, 121, 112, 116, 111, 123, 65, 83, 67, 73, 73, 95, 112, 114, 49, 110, 116, 52, 98, 108, 51, 125]
print(''.join(chr(o) for o in ords))
| 49.666667
| 111
| 0.57047
| 32
| 149
| 2.65625
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.487395
| 0.201342
| 149
| 3
| 112
| 49.666667
| 0.226891
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
128b9194e00dc55eee22a85d315eab2f555e1767
| 91
|
py
|
Python
|
learningmachines/searcher/apps.py
|
ucdscenter/learning_machines_app
|
0d4802f23db637b498c148828817421964821603
|
[
"MIT"
] | 1
|
2016-03-29T05:36:05.000Z
|
2016-03-29T05:36:05.000Z
|
learningmachines/searcher/apps.py
|
ucdscenter/learning_machines_app
|
0d4802f23db637b498c148828817421964821603
|
[
"MIT"
] | null | null | null |
learningmachines/searcher/apps.py
|
ucdscenter/learning_machines_app
|
0d4802f23db637b498c148828817421964821603
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class SearcherConfig(AppConfig):
name = 'searcher'
| 15.166667
| 33
| 0.758242
| 10
| 91
| 6.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164835
| 91
| 5
| 34
| 18.2
| 0.907895
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
12c861d72d88d6776ed5cda38a7340daa2191a30
| 205
|
py
|
Python
|
mocksi/api/service.py
|
pishchalnikov/mocksi
|
c4d8cfe8f543a06ee15cadf7850fa6a27ed91fe8
|
[
"MIT"
] | null | null | null |
mocksi/api/service.py
|
pishchalnikov/mocksi
|
c4d8cfe8f543a06ee15cadf7850fa6a27ed91fe8
|
[
"MIT"
] | null | null | null |
mocksi/api/service.py
|
pishchalnikov/mocksi
|
c4d8cfe8f543a06ee15cadf7850fa6a27ed91fe8
|
[
"MIT"
] | null | null | null |
from flask import jsonify
from mocksi.api import api
from mocksi.utils.config import Config
config = Config()
@api.route('/services')
def get_services():
return jsonify(config.get_all_services())
| 15.769231
| 45
| 0.756098
| 29
| 205
| 5.241379
| 0.482759
| 0.131579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141463
| 205
| 12
| 46
| 17.083333
| 0.863636
| 0
| 0
| 0
| 0
| 0
| 0.043902
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.428571
| 0.142857
| 0.714286
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
12d3359609399cf727107811d74b980dd0eaaef4
| 164
|
py
|
Python
|
Day 1/Labs/Lab-7.2/boot.py
|
thingslu/IoT-Bootcamp
|
f349af47e0edf716656232b4dbec57d4838263bb
|
[
"MIT"
] | null | null | null |
Day 1/Labs/Lab-7.2/boot.py
|
thingslu/IoT-Bootcamp
|
f349af47e0edf716656232b4dbec57d4838263bb
|
[
"MIT"
] | null | null | null |
Day 1/Labs/Lab-7.2/boot.py
|
thingslu/IoT-Bootcamp
|
f349af47e0edf716656232b4dbec57d4838263bb
|
[
"MIT"
] | null | null | null |
# This file is executed on every boot (including wake-boot from deepsleep)
# Set default path needed for importing modules
import sys
sys.path.append('flash/lib')
| 32.8
| 74
| 0.780488
| 26
| 164
| 4.923077
| 0.884615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146341
| 164
| 5
| 75
| 32.8
| 0.914286
| 0.719512
| 0
| 0
| 0
| 0
| 0.204545
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
12eaf5a84942f1f3eaa499da95d5602ddb355a94
| 497
|
py
|
Python
|
http/exception.py
|
JNRowe-retired/http
|
8961180cbff000965e723ce8f800198c45488334
|
[
"MIT"
] | 4
|
2019-07-10T10:12:14.000Z
|
2021-09-16T13:03:41.000Z
|
http/exception.py
|
JNRowe-retired/http
|
8961180cbff000965e723ce8f800198c45488334
|
[
"MIT"
] | 5
|
2019-07-10T09:56:45.000Z
|
2021-07-16T09:35:36.000Z
|
http/exception.py
|
JNRowe-retired/http
|
8961180cbff000965e723ce8f800198c45488334
|
[
"MIT"
] | 1
|
2021-07-13T10:15:16.000Z
|
2021-07-13T10:15:16.000Z
|
def http_exception(response):
raise HTTPException(response)
class HTTPException(Exception):
def __init__(self, response):
self._response = response
def __str__(self):
return self._response.message
@property
def is_redirect(self):
return self._response.is_redirect
@property
def is_client_error(self):
return self._response.is_client_error
@property
def is_server_error(self):
return self._response.is_server_error
| 20.708333
| 45
| 0.696177
| 58
| 497
| 5.551724
| 0.310345
| 0.223602
| 0.173913
| 0.273292
| 0.254658
| 0.180124
| 0
| 0
| 0
| 0
| 0
| 0
| 0.229376
| 497
| 23
| 46
| 21.608696
| 0.840731
| 0
| 0
| 0.1875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0
| 0.25
| 0.6875
| 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
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
420af97ebf94d06f5cc41f25015a1b961aca044b
| 126
|
py
|
Python
|
manage.py
|
mitpokerbots/equity
|
df91a4b05a5ed1aa5815d6fc8cef9bbedc0c3e8b
|
[
"MIT"
] | 1
|
2019-06-19T12:04:03.000Z
|
2019-06-19T12:04:03.000Z
|
manage.py
|
mitpokerbots/equity
|
df91a4b05a5ed1aa5815d6fc8cef9bbedc0c3e8b
|
[
"MIT"
] | null | null | null |
manage.py
|
mitpokerbots/equity
|
df91a4b05a5ed1aa5815d6fc8cef9bbedc0c3e8b
|
[
"MIT"
] | null | null | null |
from equity import app
from flask_script import Manager
manager = Manager(app)
if __name__ == '__main__':
manager.run()
| 15.75
| 32
| 0.738095
| 17
| 126
| 4.941176
| 0.647059
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174603
| 126
| 7
| 33
| 18
| 0.807692
| 0
| 0
| 0
| 0
| 0
| 0.063492
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
421c632357f5de120b3acf367c79cd1afbfdc8c1
| 109
|
py
|
Python
|
hellofun2.py
|
Dyavathrocky/rocky
|
693833e61ce9317ab003ca61d4654c6b3806cd22
|
[
"Apache-2.0"
] | null | null | null |
hellofun2.py
|
Dyavathrocky/rocky
|
693833e61ce9317ab003ca61d4654c6b3806cd22
|
[
"Apache-2.0"
] | null | null | null |
hellofun2.py
|
Dyavathrocky/rocky
|
693833e61ce9317ab003ca61d4654c6b3806cd22
|
[
"Apache-2.0"
] | null | null | null |
#print hello with arguments
def hello(name):
print('hello ' + name)
hello('bob')
hello('alice')
| 13.625
| 28
| 0.614679
| 14
| 109
| 4.785714
| 0.571429
| 0.298507
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.229358
| 109
| 7
| 29
| 15.571429
| 0.797619
| 0.238532
| 0
| 0
| 0
| 0
| 0.186667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.25
| 0.25
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
422b4800dc8a6e5936404da3761307e32b75370f
| 158
|
py
|
Python
|
backend/src/gloader/xml/unicode/__init__.py
|
anrl/gini4
|
d26649c8c02a1737159e48732cf1ee15ba2a604d
|
[
"MIT"
] | 11
|
2019-03-02T20:39:34.000Z
|
2021-09-02T19:47:38.000Z
|
backend/src/gloader/xml/unicode/__init__.py
|
anrl/gini4
|
d26649c8c02a1737159e48732cf1ee15ba2a604d
|
[
"MIT"
] | 29
|
2019-01-17T15:44:48.000Z
|
2021-06-02T00:19:40.000Z
|
backend/src/gloader/xml/unicode/__init__.py
|
anrl/gini4
|
d26649c8c02a1737159e48732cf1ee15ba2a604d
|
[
"MIT"
] | 11
|
2019-01-28T05:00:55.000Z
|
2021-11-12T03:08:32.000Z
|
"""This package exists for compatibility with PyXML 0.5.x. Its
functionality is superceded by the Python 2.0 Unicode type; it should
be used only by 4DOM."""
| 39.5
| 69
| 0.765823
| 28
| 158
| 4.321429
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037594
| 0.158228
| 158
| 3
| 70
| 52.666667
| 0.87218
| 0.955696
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
423c6d48696c55bc9e105d922f3ee3e0e631a85d
| 149
|
py
|
Python
|
tests/conftest.py
|
hezhao/cycle
|
1eb4d23ed5aeb88401dcb1af7bf353960dd2deac
|
[
"BSD-3-Clause"
] | 5
|
2017-03-22T15:12:30.000Z
|
2021-07-04T14:03:04.000Z
|
tests/conftest.py
|
hezhao/cycle
|
1eb4d23ed5aeb88401dcb1af7bf353960dd2deac
|
[
"BSD-3-Clause"
] | null | null | null |
tests/conftest.py
|
hezhao/cycle
|
1eb4d23ed5aeb88401dcb1af7bf353960dd2deac
|
[
"BSD-3-Clause"
] | 1
|
2017-04-01T06:42:18.000Z
|
2017-04-01T06:42:18.000Z
|
import pytest
from app import app
@pytest.fixture
def test_app():
test_app = app.test_client()
test_app.testing = True
return test_app
| 14.9
| 32
| 0.718121
| 23
| 149
| 4.434783
| 0.478261
| 0.27451
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208054
| 149
| 9
| 33
| 16.555556
| 0.864407
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.285714
| 0
| 0.571429
| 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
| 0
| 0
| 1
| 0
|
0
| 4
|
424cc89e2dcb7ee1708777e1fa44f59dab075f0c
| 1,639
|
py
|
Python
|
src/classes/commands.py
|
ike753z/BLRE-Server-Info-Discord-Bot
|
38af42bfaa7424ce6e2b5d7b3feed7b0f03a0a07
|
[
"MIT"
] | null | null | null |
src/classes/commands.py
|
ike753z/BLRE-Server-Info-Discord-Bot
|
38af42bfaa7424ce6e2b5d7b3feed7b0f03a0a07
|
[
"MIT"
] | null | null | null |
src/classes/commands.py
|
ike753z/BLRE-Server-Info-Discord-Bot
|
38af42bfaa7424ce6e2b5d7b3feed7b0f03a0a07
|
[
"MIT"
] | null | null | null |
from enum import Enum, auto
class AutoName(Enum):
def _generate_next_value_(name, start, count, last_values):
return name.lower()
class CommandType(AutoName):
Unknown = auto()
Help = auto()
Status = auto()
Restart = auto()
Map = auto()
Bots = auto()
Playlist = auto()
Gamemode = auto()
SCP = auto()
TimeLimit = auto()
AutoRestart = auto()
Reset = auto()
Register = auto()
Primary = auto()
List = auto()
def getMessageType(message: str):
if(message.lower().startswith('help')):
return CommandType.Help
if(message.lower().startswith('status')):
return CommandType.Status
if(message.lower().startswith('restart')):
return CommandType.Restart
if(message.lower().startswith('map')):
return CommandType.Map
if(message.lower().startswith('bots')):
return CommandType.Bots
if(message.lower().startswith('playlist')):
return CommandType.Playlist
if(message.lower().startswith('gamemode')):
return CommandType.Gamemode
if(message.lower().startswith('scp')):
return CommandType.SCP
if(message.lower().startswith('timelimit')):
return CommandType.TimeLimit
if(message.lower().startswith('autorestart')):
return CommandType.AutoRestart
if(message.lower().startswith('reset')):
return CommandType.Reset
if(message.lower().startswith('register')):
return CommandType.Register
if(message.lower().startswith('primary')):
return CommandType.Primary
if(message.lower().startswith('list')):
return CommandType.List
| 30.351852
| 63
| 0.644295
| 169
| 1,639
| 6.218935
| 0.224852
| 0.119886
| 0.186489
| 0.319696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.213545
| 1,639
| 53
| 64
| 30.924528
| 0.815361
| 0
| 0
| 0
| 1
| 0
| 0.053081
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.040816
| false
| 0
| 0.020408
| 0.020408
| 0.714286
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
42661e7ea81bcae100ae84c3b719983ba23bd43f
| 63
|
py
|
Python
|
altdeutsch/__init__.py
|
clemsciences/old_high_german_texts
|
1fe458613da5f13760d743cee99fc2eaceb59298
|
[
"MIT"
] | 5
|
2018-10-17T15:35:51.000Z
|
2022-01-23T10:57:55.000Z
|
sigurd/__init__.py
|
clemsciences/comparison_sigurdr_siegfried
|
8839f0d2fa497825a7225d09d9b7f729ec0b7723
|
[
"MIT"
] | 5
|
2018-06-25T16:06:00.000Z
|
2018-09-09T13:50:16.000Z
|
runesanalyzer/__init__.py
|
clemsciences/runes-analyzer
|
0af8baaf604179c31dcbf28b1a023ca650a9ff34
|
[
"MIT"
] | 1
|
2021-08-21T17:20:43.000Z
|
2021-08-21T17:20:43.000Z
|
import os
PACKDIR = os.path.abspath(os.path.dirname(__file__))
| 21
| 52
| 0.777778
| 10
| 63
| 4.5
| 0.7
| 0.266667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.079365
| 63
| 2
| 53
| 31.5
| 0.775862
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
426a9dd3b60dcd0ebfd75444303cfd3aa9cd440e
| 911
|
py
|
Python
|
mixnmatchttp/handlers/authenticator/exc.py
|
aayla-secura/simple_CORS_https_server
|
e32e1c0ce44f3b5a5e5dc830364eddb0b7127040
|
[
"MIT"
] | 3
|
2019-03-28T04:17:17.000Z
|
2021-08-02T20:15:17.000Z
|
mixnmatchttp/handlers/authenticator/exc.py
|
aayla-secura/simple_CORS_https_server
|
e32e1c0ce44f3b5a5e5dc830364eddb0b7127040
|
[
"MIT"
] | 1
|
2020-07-02T20:48:18.000Z
|
2020-07-07T19:09:24.000Z
|
mixnmatchttp/handlers/authenticator/exc.py
|
aayla-secura/simple_CORS_https_server
|
e32e1c0ce44f3b5a5e5dc830364eddb0b7127040
|
[
"MIT"
] | 2
|
2020-05-31T11:24:10.000Z
|
2021-08-02T20:20:32.000Z
|
from ..._py2 import *
class AuthError(Exception):
'''Base class for exceptions related to request body read'''
pass
class UserAlreadyExistsError(AuthError):
'''Exception raised when a duplicate user is created'''
def __init__(self, username):
super().__init__('User {} already exists'.format(username))
class NoSuchUserError(AuthError):
'''Exception raised when a non-existend user is accessed'''
def __init__(self, username):
super().__init__('No such user {}'.format(username))
class InvalidUsernameError(AuthError):
'''Exception raised when an invalid username is created'''
def __init__(self, username):
super().__init__('Invalid username {}'.format(username))
class BadPasswordError(AuthError):
'''Exception raised when new password is invalid'''
def __init__(self, username):
super().__init__('Choose a stronger password')
| 29.387097
| 67
| 0.700329
| 102
| 911
| 5.931373
| 0.441176
| 0.14876
| 0.158678
| 0.185124
| 0.310744
| 0.214876
| 0.122314
| 0.122314
| 0
| 0
| 0
| 0.001339
| 0.180022
| 911
| 30
| 68
| 30.366667
| 0.808568
| 0.282108
| 0
| 0.266667
| 0
| 0
| 0.130573
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.266667
| false
| 0.2
| 0.066667
| 0
| 0.666667
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
4283fee6e3f26b13bc1d353412b4476ed2330182
| 103
|
py
|
Python
|
gameon/users/admin.py
|
Mozilla-GitHub-Standards/d1f672f1bcefb364864bc3fcece0e1461840e6ed1ade1fe7f67552d85c28621f
|
d124c26bb50f8d78c032802bee1a7a5213cee762
|
[
"BSD-3-Clause"
] | null | null | null |
gameon/users/admin.py
|
Mozilla-GitHub-Standards/d1f672f1bcefb364864bc3fcece0e1461840e6ed1ade1fe7f67552d85c28621f
|
d124c26bb50f8d78c032802bee1a7a5213cee762
|
[
"BSD-3-Clause"
] | null | null | null |
gameon/users/admin.py
|
Mozilla-GitHub-Standards/d1f672f1bcefb364864bc3fcece0e1461840e6ed1ade1fe7f67552d85c28621f
|
d124c26bb50f8d78c032802bee1a7a5213cee762
|
[
"BSD-3-Clause"
] | null | null | null |
from django.contrib import admin
from gameon.users import models
admin.site.register(models.Profile)
| 17.166667
| 35
| 0.825243
| 15
| 103
| 5.666667
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106796
| 103
| 5
| 36
| 20.6
| 0.923913
| 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
| 0
| 0
|
0
| 4
|
35ed0b7929a77189e0464b7ee3f0a952502d9264
| 100
|
py
|
Python
|
__init__.py
|
skgrush/blackbird
|
662c249070338ec665e35efc45f76bc166f4f18a
|
[
"MIT"
] | null | null | null |
__init__.py
|
skgrush/blackbird
|
662c249070338ec665e35efc45f76bc166f4f18a
|
[
"MIT"
] | null | null | null |
__init__.py
|
skgrush/blackbird
|
662c249070338ec665e35efc45f76bc166f4f18a
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
import os,sys
sys.path.insert(0,os.path.abspath(os.path.dirname(__file__)))
| 16.666667
| 61
| 0.74
| 18
| 100
| 3.888889
| 0.722222
| 0.171429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010753
| 0.07
| 100
| 5
| 62
| 20
| 0.741935
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c4381817144cc247ead86e444ae8ca59a877349d
| 842
|
py
|
Python
|
notebooks/lib/get_content_type_ext.py
|
leoyuholo/bad-vis-images
|
941ae5459fbb301fdbd58fbf5560c7ec3359ea52
|
[
"CC-BY-4.0"
] | 3
|
2020-08-03T12:41:36.000Z
|
2021-01-04T10:32:36.000Z
|
notebooks/lib/get_content_type_ext.py
|
leoyuholo/bad-vis-images
|
941ae5459fbb301fdbd58fbf5560c7ec3359ea52
|
[
"CC-BY-4.0"
] | null | null | null |
notebooks/lib/get_content_type_ext.py
|
leoyuholo/bad-vis-images
|
941ae5459fbb301fdbd58fbf5560c7ec3359ea52
|
[
"CC-BY-4.0"
] | null | null | null |
import requests
import magic
def get_content_type_ext (content_type, req=None):
content_type = content_type.lower()
if content_type.startswith('image/jpeg') or content_type.startswith('image/jpg'):
return '.jpg'
elif content_type.startswith('image/png'):
return '.png'
elif content_type.startswith('image/gif'):
return '.gif'
elif content_type.startswith('image/webp'):
return '.webp'
elif content_type.startswith('image/svg'):
return '.svg'
elif content_type.startswith('image/bmp'):
return '.bmp'
elif req:
return get_content_type_ext(magic.from_buffer(req.content, mime=True))
elif content_type.startswith('text/html'):
return '.html'
elif content_type.startswith('application/pdf'):
return '.pdf'
else:
return ''
| 32.384615
| 85
| 0.66152
| 104
| 842
| 5.173077
| 0.317308
| 0.286245
| 0.351301
| 0.33829
| 0.27881
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.211401
| 842
| 25
| 86
| 33.68
| 0.810241
| 0
| 0
| 0
| 0
| 0
| 0.146081
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.041667
| false
| 0
| 0.083333
| 0
| 0.541667
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
c438f9181f223090be238b0f657ead8900bc3571
| 9,345
|
py
|
Python
|
python/pillow_cli.py
|
munetaka/tools
|
773fd696172191cd17289a654c848cb9c1e1888f
|
[
"MIT"
] | null | null | null |
python/pillow_cli.py
|
munetaka/tools
|
773fd696172191cd17289a654c848cb9c1e1888f
|
[
"MIT"
] | null | null | null |
python/pillow_cli.py
|
munetaka/tools
|
773fd696172191cd17289a654c848cb9c1e1888f
|
[
"MIT"
] | null | null | null |
import click
from PIL import Image
from PIL import ImageOps
from PIL import ImageChops
from PIL import ImageFilter
import numpy as np
@click.group()
@click.option('--out', '-o', default=None)
@click.pass_context
def cli(ctx, out):
ctx.obj['out'] = out
@click.pass_context
def save(ctx, img):
if ctx.obj.get('out') is not None:
click.echo('output to {}'.format(ctx.obj.get('out')))
img.save(ctx.obj.get('out'))
else:
img.show()
def convert_array_to_image(array):
return Image.fromarray(np.uint8(array))
def convert_pil_to_array(img):
return np.asarray(img)
@cli.command(short_help='show image info')
@click.argument('image', type=click.Path(exists=True), required=True)
def info(image):
'''show IMAGE format, size, mode'''
im = Image.open(image)
click.echo('format\t{}\nsize\t{}\nmode\t{}'.format(im.format, im.size, im.mode))
@cli.command(short_help='resize image')
@click.argument('image', type=click.Path(exists=True), required=True)
@click.argument('size', type=click.Tuple([int, int]), required=True)
def resize(image, size):
'''resize IMAGE SIZE. SIZE is tuple (width, height)'''
im = Image.open(image)
im = im.resize(size)
save(im)
@cli.command(short_help='blend two images')
@click.argument('image1', type=click.Path(exists=True), required=True)
@click.argument('image2', type=click.Path(exists=True), required=True)
@click.argument('alpha', default=0.5)
def blend(image1, image2, alpha):
'''blend IMAGE1 and IMAGE2.'''
im1 = Image.open(image1)
im2 = Image.open(image2)
blended_im = Image.blend(im1, im2, alpha)
save(blended_im)
@cli.command(short_help='composite images')
@click.argument('image1', type=click.Path(exists=True), required=True)
@click.argument('image2', type=click.Path(exists=True), required=True)
@click.argument('mask', default=0.5)
def composite(image1, image2, mask):
'''composite IMAGE1 and IMAGE2'''
im1 = Image.open(image1)
im2 = Image.open(image2)
mask = Image.open(mask).convert('1')
composited_im = Image.composite(im1, im2, mask)
save(composited_im)
@cli.command()
def create():
'''create tiny sample image'''
array = np.eye(10) * 255
im = convert_array_to_image(array)
save(im)
@cli.command()
@click.argument('image', type=click.Path(exists=True), required=True)
@click.option('--equalize', '-e', is_flag=True)
def grayscale(image, equalize):
im = Image.open(image)
if equalize is True:
im = ImageOps.equalize(image)
im = im.convert("L")
save(im)
@cli.command()
@click.argument('image', type=click.Path(exists=True), required=True)
@click.option('--equalize', '-e', is_flag=True)
def threshold(image, equalize):
im = Image.open(image)
if equalize is True:
im = ImageOps.equalize(im)
im = im.convert("L")
im = im.point(lambda x: 0 if x < 230 else x)
save(im)
@cli.command()
@click.argument('image', type=click.Path(exists=True), required=True)
def equalize(image):
'''equalize image'''
im = Image.open(image)
im = ImageOps.equalize(im)
save(im)
@cli.command()
@click.argument('image1', type=click.Path(exists=True), required=True)
@click.argument('image2', type=click.Path(exists=True), required=True)
def check_similarity(image1, image2):
im1 = Image.open(image1)
im2 = Image.open(image2)
click.echo(ImageChops.difference(im1, im2).getbbox() is None)
@cli.command()
@click.argument('image1', type=click.Path(exists=True), required=True)
@click.argument('image2', type=click.Path(exists=True), required=True)
def difference(image1, image2):
im1 = Image.open(image1)
im2 = Image.open(image2)
im = ImageChops.difference(im1, im2)
save(im)
@cli.group()
def filter():
'''several effects'''
pass
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
def blur(image):
im = Image.open(image)
im = im.filter(ImageFilter.BLUR)
save(im)
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
def contour(image):
im = Image.open(image)
im = im.filter(ImageFilter.CONTOUR)
save(im)
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
def detail(image):
im = Image.open(image)
im = im.filter(ImageFilter.DETAIL)
save(im)
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
def edge_enhance(image):
im = Image.open(image)
im = im.filter(ImageFilter.EDGE_ENHANCE)
save(im)
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
def edge_enhance_more(image):
im = Image.open(image)
im = im.filter(ImageFilter.EDGE_ENHANCE_MORE)
save(im)
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
def emboss(image):
im = Image.open(image)
im = im.filter(ImageFilter.EMBOSS)
save(im)
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
def find_edges(image):
im = Image.open(image)
im = im.filter(ImageFilter.FIND_EDGES)
save(im)
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
@click.option('--radius', '-r', default=2.0)
def gaussian_blur(image, radius):
im = Image.open(image)
im = im.filter(ImageFilter.GaussianBlur(radius))
save(im)
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
def smooth(image):
im = Image.open(image)
im = im.filter(ImageFilter.SMOOTH)
save(im)
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
def smooth_more(image):
im = Image.open(image)
im = im.filter(ImageFilter.SMOOTH_MORE)
save(im)
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
def sharpen(image):
im = Image.open(image)
im = im.filter(ImageFilter.SHARPEN)
save(im)
@filter.command(short_help='dilation')
@click.argument('image', type=click.Path(exists=True), required=True)
@click.option('--size', '-s', type=int, default=3)
def max(image, size):
im = Image.open(image)
im = im.filter(ImageFilter.MaxFilter(size))
save(im)
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
@click.option('--size', '-s', type=int, default=3)
def median(image, size):
im = Image.open(image)
im = im.filter(ImageFilter.MedianFilter(size))
save(im)
@filter.command(short_help='erosion')
@click.argument('image', type=click.Path(exists=True), required=True)
@click.option('--size', '-s', type=int, default=3)
def min(image, size):
im = Image.open(image)
im = im.filter(ImageFilter.MinFilter(size))
save(im)
@filter.command()
@click.argument('image', type=click.Path(exists=True), required=True)
@click.option('--size', '-s', type=int, default=3)
def mod(image, size):
im = Image.open(image)
im = im.filter(ImageFilter.ModeFilter(size))
save(im)
@filter.command(short_help='closing test')
@click.argument('image', type=click.Path(exists=True), required=True)
@click.option('--size', '-s', type=int, default=3)
def closing(image, size):
im = Image.open(image)
im = im.convert("RGB")
im = im.filter(ImageFilter.MinFilter(size))\
.filter(ImageFilter.MinFilter(size))\
.filter(ImageFilter.MinFilter(size))\
.filter(ImageFilter.MaxFilter(size))\
.filter(ImageFilter.MaxFilter(size))\
.filter(ImageFilter.MaxFilter(size))\
.filter(ImageFilter.MaxFilter(size))\
.filter(ImageFilter.MaxFilter(size))\
.filter(ImageFilter.MaxFilter(size))\
.filter(ImageFilter.MinFilter(size))\
.filter(ImageFilter.MinFilter(size))\
.filter(ImageFilter.MinFilter(size))
save(im)
@filter.command(short_help='opening test')
@click.argument('image', type=click.Path(exists=True), required=True)
@click.option('--size', '-s', type=int, default=3)
def opening(image, size):
im = Image.open(image)
im = im.convert("RGB")
im = im.filter(ImageFilter.MaxFilter(size))\
.filter(ImageFilter.MaxFilter(size))\
.filter(ImageFilter.MaxFilter(size))\
.filter(ImageFilter.MinFilter(size))\
.filter(ImageFilter.MinFilter(size))\
.filter(ImageFilter.MinFilter(size))\
.filter(ImageFilter.MinFilter(size))\
.filter(ImageFilter.MinFilter(size))\
.filter(ImageFilter.MinFilter(size))\
.filter(ImageFilter.MinFilter(size))\
.filter(ImageFilter.MaxFilter(size))\
.filter(ImageFilter.MaxFilter(size))\
.filter(ImageFilter.MaxFilter(size))
save(im)
@filter.command(short_help='opening test')
@click.argument('image', type=click.Path(exists=True), required=True)
@click.option('--threshold', '-t', type=int, default=0)
def line_drawing(image, threshold):
im_org = Image.open(image)
gray = im_org.convert("L")
gray2 = gray.filter(ImageFilter.MaxFilter(5))
im_inv = ImageChops.difference(gray, gray2)
im = ImageOps.invert(im_inv)
if threshold > 0:
im = im.point(lambda x: 0 if x < threshold else 255)
save(im)
def main():
cli(obj={})
if __name__ == '__main__':
main()
| 28.404255
| 84
| 0.672659
| 1,262
| 9,345
| 4.940571
| 0.113312
| 0.111788
| 0.064635
| 0.094467
| 0.739214
| 0.724779
| 0.71243
| 0.702165
| 0.686929
| 0.645229
| 0
| 0.009634
| 0.155805
| 9,345
| 328
| 85
| 28.490854
| 0.780707
| 0.020011
| 0
| 0.577689
| 0
| 0
| 0.050428
| 0.003289
| 0
| 0
| 0
| 0
| 0
| 1
| 0.135458
| false
| 0.011952
| 0.023904
| 0.007968
| 0.167331
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c4411aaea8d5c798c562124f78c7175f4ee47efb
| 96
|
py
|
Python
|
apps.py
|
isjjhang/A-Simple-Image-Classification-based-on-CNN
|
8175aa6d0ef49c48df482b36fb6b0692d0f5a982
|
[
"MIT"
] | 1
|
2021-06-03T14:14:29.000Z
|
2021-06-03T14:14:29.000Z
|
apps.py
|
isjjhang/A-Simple-Image-Classification-based-on-CNN
|
8175aa6d0ef49c48df482b36fb6b0692d0f5a982
|
[
"MIT"
] | null | null | null |
apps.py
|
isjjhang/A-Simple-Image-Classification-based-on-CNN
|
8175aa6d0ef49c48df482b36fb6b0692d0f5a982
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class MysystemConfig(AppConfig):
name = 'mySystem'
| 16
| 34
| 0.71875
| 10
| 96
| 6.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208333
| 96
| 5
| 35
| 19.2
| 0.907895
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c448cad8af721ca46c803028b65690eaa5b6e320
| 95
|
py
|
Python
|
GalleryApp/apps.py
|
ruthjomo/My-Gallery-App
|
c49eed8d996c088813d07d51d65da77ff69582f1
|
[
"MIT",
"Unlicense"
] | null | null | null |
GalleryApp/apps.py
|
ruthjomo/My-Gallery-App
|
c49eed8d996c088813d07d51d65da77ff69582f1
|
[
"MIT",
"Unlicense"
] | null | null | null |
GalleryApp/apps.py
|
ruthjomo/My-Gallery-App
|
c49eed8d996c088813d07d51d65da77ff69582f1
|
[
"MIT",
"Unlicense"
] | null | null | null |
from django.apps import AppConfig
class GalleryappConfig(AppConfig):
name = 'GalleryApp'
| 15.833333
| 34
| 0.768421
| 10
| 95
| 7.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 95
| 5
| 35
| 19
| 0.9125
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c454227c18811d842bdb698eaefb4de3ee8fc849
| 87
|
py
|
Python
|
sub.py
|
dishankkalra23/SE-LAB
|
ae75266ac9e743e19ea8070b16afa659e718b52a
|
[
"MIT"
] | null | null | null |
sub.py
|
dishankkalra23/SE-LAB
|
ae75266ac9e743e19ea8070b16afa659e718b52a
|
[
"MIT"
] | null | null | null |
sub.py
|
dishankkalra23/SE-LAB
|
ae75266ac9e743e19ea8070b16afa659e718b52a
|
[
"MIT"
] | null | null | null |
def subtraction(x,y): #function definifion for subtraction
sub=x-y
return sub
| 21.75
| 59
| 0.712644
| 13
| 87
| 4.769231
| 0.692308
| 0.064516
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206897
| 87
| 3
| 60
| 29
| 0.898551
| 0.402299
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
c47947759421ec15b8197ed8b278a003cec042c8
| 108
|
py
|
Python
|
remotecsvauthenticator/__init__.py
|
aculich/jupyterhub-remotecsv-authenticator
|
c3ac44ab1baa75efe71ff430c21dc74f65e63e1d
|
[
"BSD-3-Clause"
] | null | null | null |
remotecsvauthenticator/__init__.py
|
aculich/jupyterhub-remotecsv-authenticator
|
c3ac44ab1baa75efe71ff430c21dc74f65e63e1d
|
[
"BSD-3-Clause"
] | null | null | null |
remotecsvauthenticator/__init__.py
|
aculich/jupyterhub-remotecsv-authenticator
|
c3ac44ab1baa75efe71ff430c21dc74f65e63e1d
|
[
"BSD-3-Clause"
] | null | null | null |
from remotecsvauthenticator.authenticator import RemoteCSVAuthenticator
__all__ = [RemoteCSVAuthenticator]
| 27
| 71
| 0.888889
| 7
| 108
| 13.142857
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 108
| 3
| 72
| 36
| 0.92
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
67028b58f7edc05f1cbe0bd05af834361cca4a73
| 171
|
py
|
Python
|
bmimetric.py
|
BjornChrisnach/Basics_of_Computing_and_Programming
|
45cb99d2b5060b23db20b84384f7b35b72ef8029
|
[
"MIT"
] | null | null | null |
bmimetric.py
|
BjornChrisnach/Basics_of_Computing_and_Programming
|
45cb99d2b5060b23db20b84384f7b35b72ef8029
|
[
"MIT"
] | null | null | null |
bmimetric.py
|
BjornChrisnach/Basics_of_Computing_and_Programming
|
45cb99d2b5060b23db20b84384f7b35b72ef8029
|
[
"MIT"
] | null | null | null |
weight = float(input("Please enter weight in kilograms: "))
height = float(input("Please enter height in meters: "))
bmi = weight/(height * height)
print("BMI is: ",bmi)
| 28.5
| 59
| 0.695906
| 24
| 171
| 4.958333
| 0.5
| 0.168067
| 0.268908
| 0.352941
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146199
| 171
| 6
| 60
| 28.5
| 0.815068
| 0
| 0
| 0
| 0
| 0
| 0.424419
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
670f3a5d09aeefbe4d0c885078a40a5b8b988124
| 18,159
|
py
|
Python
|
mmtbx/regression/model_idealization/tst_withmap_04.py
|
dperl-sol/cctbx_project
|
b9e390221a2bc4fd00b9122e97c3b79c632c6664
|
[
"BSD-3-Clause-LBNL"
] | 155
|
2016-11-23T12:52:16.000Z
|
2022-03-31T15:35:44.000Z
|
mmtbx/regression/model_idealization/tst_withmap_04.py
|
dperl-sol/cctbx_project
|
b9e390221a2bc4fd00b9122e97c3b79c632c6664
|
[
"BSD-3-Clause-LBNL"
] | 590
|
2016-12-10T11:31:18.000Z
|
2022-03-30T23:10:09.000Z
|
mmtbx/regression/model_idealization/tst_withmap_04.py
|
dperl-sol/cctbx_project
|
b9e390221a2bc4fd00b9122e97c3b79c632c6664
|
[
"BSD-3-Clause-LBNL"
] | 115
|
2016-11-15T08:17:28.000Z
|
2022-02-09T15:30:14.000Z
|
from __future__ import absolute_import, division, print_function
from libtbx import easy_run
import libtbx.load_env
import os.path
import time
# taken from phenix_regression/refinement/ncs/tst_ncs_0.py
pdb_str = """\
CRYST1 100.000 100.000 100.000 90.00 90.00 90.00 P 1
ATOM 1 N ALA A 1 27.344 16.348 30.784 1.00 10.00 N
ATOM 2 CA ALA A 1 26.429 15.281 31.335 1.00 10.00 C
ATOM 3 C ALA A 1 26.610 14.025 30.603 1.00 10.00 C
ATOM 4 O ALA A 1 26.479 13.979 29.356 1.00 10.00 O
ATOM 5 CB ALA A 1 24.874 15.800 31.300 1.00 10.00 C
ATOM 1 N ALA A 2 26.812 12.925 31.345 1.00 10.00 N
ATOM 2 CA ALA A 2 27.084 11.577 30.797 1.00 10.00 C
ATOM 3 C ALA A 2 25.856 10.737 30.707 1.00 10.00 C
ATOM 4 O ALA A 2 25.741 9.860 29.891 1.00 10.00 O
ATOM 5 CB ALA A 2 28.151 10.950 31.721 1.00 10.00 C
ATOM 1 N ALA A 3 25.009 10.973 31.714 1.00 10.00 N
ATOM 2 CA ALA A 3 23.621 10.543 31.560 1.00 10.00 C
ATOM 3 C ALA A 3 23.023 11.008 30.214 1.00 10.00 C
ATOM 4 O ALA A 3 22.786 10.233 29.249 1.00 10.00 O
ATOM 5 CB ALA A 3 22.760 11.040 32.654 1.00 10.00 C
ATOM 1 N ALA A 4 22.798 12.304 30.175 1.00 10.00 N
ATOM 2 CA ALA A 4 22.329 13.084 28.981 1.00 10.00 C
ATOM 3 C ALA A 4 23.116 12.816 27.721 1.00 10.00 C
ATOM 4 O ALA A 4 22.533 12.805 26.670 1.00 10.00 O
ATOM 5 CB ALA A 4 22.372 14.607 29.318 1.00 10.00 C
ATOM 1 N ALA A 5 24.448 12.622 27.823 1.00 10.00 N
ATOM 2 CA ALA A 5 25.228 12.407 26.573 1.00 10.00 C
ATOM 3 C ALA A 5 25.222 10.947 26.143 1.00 10.00 C
ATOM 4 O ALA A 5 25.386 10.664 24.983 1.00 10.00 O
ATOM 5 CB ALA A 5 26.634 12.906 26.746 1.00 10.00 C
ATOM 1 N ALA A 6 24.976 10.048 27.071 1.00 10.00 N
ATOM 2 CA ALA A 6 24.857 8.614 26.805 1.00 10.00 C
ATOM 3 C ALA A 6 23.537 8.349 26.054 1.00 10.00 C
ATOM 4 O ALA A 6 23.439 7.570 25.057 1.00 10.00 O
ATOM 5 CB ALA A 6 24.874 7.845 28.114 1.00 10.00 C
ATOM 1 N ALA A 7 22.542 9.039 26.580 1.00 10.00 N
ATOM 2 CA ALA A 7 21.228 8.903 25.942 1.00 10.00 C
ATOM 3 C ALA A 7 21.329 9.698 24.628 1.00 10.00 C
ATOM 4 O ALA A 7 20.707 9.383 23.632 1.00 10.00 O
ATOM 5 CB ALA A 7 20.146 9.465 26.862 1.00 10.00 C
ATOM 1 N ALA A 8 22.181 10.696 24.613 1.00 10.00 N
ATOM 2 CA ALA A 8 22.526 11.372 23.378 1.00 10.00 C
ATOM 3 C ALA A 8 23.351 10.555 22.448 1.00 10.00 C
ATOM 4 O ALA A 8 23.618 10.883 21.252 1.00 10.00 O
ATOM 5 CB ALA A 8 23.168 12.697 23.693 1.00 10.00 C
ATOM 1 N ALA A 9 23.864 9.423 22.961 1.00 10.00 N
ATOM 2 CA ALA A 9 24.785 8.541 22.264 1.00 10.00 C
ATOM 3 C ALA A 9 24.057 7.451 21.484 1.00 10.00 C
ATOM 4 O ALA A 9 24.127 7.381 20.257 1.00 10.00 O
ATOM 5 CB ALA A 9 25.815 7.975 23.249 1.00 10.00 C
ATOM 1 N ALA A 10 23.518 6.548 22.264 1.00 10.00 N
ATOM 2 CA ALA A 10 22.629 5.525 21.690 1.00 10.00 C
ATOM 3 C ALA A 10 21.549 6.308 21.009 1.00 10.00 C
ATOM 4 O ALA A 10 21.114 5.933 19.930 1.00 10.00 O
ATOM 5 CB ALA A 10 22.057 4.714 22.784 1.00 10.00 C
ATOM 1 N ALA A 11 21.120 7.452 21.541 1.00 10.00 N
ATOM 2 CA ALA A 11 20.186 8.260 20.874 1.00 10.00 C
ATOM 3 C ALA A 11 20.978 9.215 19.937 1.00 10.00 C
ATOM 4 O ALA A 11 20.386 10.177 19.507 1.00 10.00 O
ATOM 5 CB ALA A 11 19.295 9.031 21.867 1.00 10.00 C
ATOM 1 N ALA A 12 22.222 8.932 19.598 1.00 10.00 N
ATOM 2 CA ALA A 12 22.896 9.709 18.563 1.00 10.00 C
ATOM 3 C ALA A 12 22.924 8.925 17.308 1.00 10.00 C
ATOM 4 O ALA A 12 22.982 9.445 16.193 1.00 10.00 O
ATOM 5 CB ALA A 12 24.294 10.138 18.994 1.00 10.00 C
ATOM 1 N ALA A 13 22.951 7.633 17.508 1.00 10.00 N
ATOM 2 CA ALA A 13 22.709 6.629 16.554 1.00 10.00 C
ATOM 3 C ALA A 13 21.275 6.673 16.206 1.00 10.00 C
ATOM 4 O ALA A 13 20.870 6.521 15.092 1.00 10.00 O
ATOM 5 CB ALA A 13 23.077 5.254 17.025 1.00 10.00 C
ATOM 1 N ALA A 14 20.471 6.929 17.226 1.00 10.00 N
ATOM 2 CA ALA A 14 19.039 6.992 17.025 1.00 10.00 C
ATOM 3 C ALA A 14 18.676 8.380 16.528 1.00 10.00 C
ATOM 4 O ALA A 14 17.748 8.556 15.761 1.00 10.00 O
ATOM 5 CB ALA A 14 18.240 6.715 18.272 1.00 10.00 C
ATOM 1 N ALA A 15 19.381 9.390 17.055 1.00 10.00 N
ATOM 2 CA ALA A 15 19.204 10.743 16.669 1.00 10.00 C
ATOM 3 C ALA A 15 19.407 10.807 15.174 1.00 10.00 C
ATOM 4 O ALA A 15 18.402 10.987 14.424 1.00 10.00 O
ATOM 5 CB ALA A 15 20.190 11.665 17.493 1.00 10.00 C
ATOM 1 N ALA A 16 20.702 10.653 14.831 1.00 10.00 N
ATOM 2 CA ALA A 16 21.206 10.546 13.480 1.00 10.00 C
ATOM 3 C ALA A 16 20.484 9.612 12.585 1.00 10.00 C
ATOM 4 O ALA A 16 20.380 9.918 11.386 1.00 10.00 O
ATOM 5 CB ALA A 16 22.631 10.174 13.475 1.00 10.00 C
ATOM 1 N ALA A 17 20.064 8.475 13.175 1.00 10.00 N
ATOM 2 CA ALA A 17 19.355 7.473 12.426 1.00 10.00 C
ATOM 3 C ALA A 17 17.924 7.807 12.064 1.00 10.00 C
ATOM 4 O ALA A 17 17.535 7.721 10.871 1.00 10.00 O
ATOM 5 CB ALA A 17 19.359 6.123 13.216 1.00 10.00 C
ATOM 1 N ALA A 18 17.152 8.115 13.031 1.00 10.00 N
ATOM 2 CA ALA A 18 15.835 8.594 12.861 1.00 10.00 C
ATOM 3 C ALA A 18 15.811 9.835 11.861 1.00 10.00 C
ATOM 4 O ALA A 18 15.020 9.889 10.868 1.00 10.00 O
ATOM 5 CB ALA A 18 15.272 8.918 14.234 1.00 10.00 C
ATOM 1 N ALA A 19 16.661 10.845 12.100 1.00 10.00 N
ATOM 2 CA ALA A 19 16.435 12.061 11.275 1.00 10.00 C
ATOM 3 C ALA A 19 17.004 11.815 9.833 1.00 10.00 C
ATOM 4 O ALA A 19 16.334 12.117 8.857 1.00 10.00 O
ATOM 5 CB ALA A 19 17.059 13.242 11.866 1.00 10.00 C
ATOM 1 N ALA A 20 18.191 11.200 9.841 1.00 10.00 N
ATOM 2 CA ALA A 20 19.091 11.247 8.697 1.00 10.00 C
ATOM 3 C ALA A 20 19.549 9.835 8.231 1.00 10.00 C
ATOM 4 O ALA A 20 20.670 9.692 7.663 1.00 10.00 O
ATOM 5 CB ALA A 20 20.326 12.105 9.035 1.00 10.00 C
ATOM 1 N ALA A 21 18.654 8.850 8.523 1.00 10.00 N
ATOM 2 CA ALA A 21 18.827 7.437 8.168 1.00 10.00 C
ATOM 3 C ALA A 21 17.565 6.607 8.282 1.00 10.00 C
ATOM 4 O ALA A 21 16.485 6.992 7.820 1.00 10.00 O
ATOM 5 CB ALA A 21 19.888 6.838 8.983 1.00 10.00 C
TER
ATOM 1 N ALA B 1 16.348 17.420 35.897 1.00 50.00 N
ATOM 2 CA ALA B 1 16.783 16.083 36.351 1.00 50.00 C
ATOM 3 C ALA B 1 16.794 15.172 35.139 1.00 50.00 C
ATOM 4 O ALA B 1 16.167 15.477 34.133 1.00 50.00 O
ATOM 5 CB ALA B 1 15.785 15.534 37.468 1.00 50.00 C
ATOM 1 N ALA B 2 17.491 14.058 35.255 1.00 50.00 N
ATOM 2 CA ALA B 2 17.790 13.267 34.127 1.00 50.00 C
ATOM 3 C ALA B 2 16.716 12.232 33.688 1.00 50.00 C
ATOM 4 O ALA B 2 16.676 11.869 32.543 1.00 50.00 O
ATOM 5 CB ALA B 2 19.125 12.656 34.415 1.00 50.00 C
ATOM 1 N ALA B 3 15.904 11.687 34.605 1.00 50.00 N
ATOM 2 CA ALA B 3 14.798 10.901 34.173 1.00 50.00 C
ATOM 3 C ALA B 3 13.740 11.723 33.536 1.00 50.00 C
ATOM 4 O ALA B 3 13.398 11.501 32.356 1.00 50.00 O
ATOM 5 CB ALA B 3 14.148 10.176 35.403 1.00 50.00 C
ATOM 1 N ALA B 4 13.239 12.708 34.247 1.00 50.00 N
ATOM 2 CA ALA B 4 12.158 13.487 33.709 1.00 50.00 C
ATOM 3 C ALA B 4 12.674 14.248 32.495 1.00 50.00 C
ATOM 4 O ALA B 4 11.935 14.376 31.526 1.00 50.00 O
ATOM 5 CB ALA B 4 11.553 14.432 34.712 1.00 50.00 C
ATOM 1 N ALA B 5 13.947 14.627 32.479 1.00 50.00 N
ATOM 2 CA ALA B 5 14.416 15.490 31.405 1.00 50.00 C
ATOM 3 C ALA B 5 14.960 14.730 30.186 1.00 50.00 C
ATOM 4 O ALA B 5 14.575 14.940 29.054 1.00 50.00 O
ATOM 5 CB ALA B 5 15.464 16.431 31.928 1.00 50.00 C
ATOM 1 N ALA B 6 15.867 13.827 30.546 1.00 50.00 N
ATOM 2 CA ALA B 6 16.575 12.918 29.615 1.00 50.00 C
ATOM 3 C ALA B 6 15.465 12.002 28.975 1.00 50.00 C
ATOM 4 O ALA B 6 15.450 11.709 27.742 1.00 50.00 O
ATOM 5 CB ALA B 6 17.632 12.157 30.362 1.00 50.00 C
ATOM 1 N ALA B 7 14.542 11.597 29.783 1.00 50.00 N
ATOM 2 CA ALA B 7 13.529 10.701 29.277 1.00 50.00 C
ATOM 3 C ALA B 7 12.175 11.364 28.835 1.00 50.00 C
ATOM 4 O ALA B 7 11.466 10.770 27.969 1.00 50.00 O
ATOM 5 CB ALA B 7 13.161 9.644 30.376 1.00 50.00 C
ATOM 1 N ALA B 8 11.753 12.455 29.452 1.00 50.00 N
ATOM 2 CA ALA B 8 10.536 13.193 28.972 1.00 50.00 C
ATOM 3 C ALA B 8 10.919 13.923 27.670 1.00 50.00 C
ATOM 4 O ALA B 8 10.171 14.036 26.729 1.00 50.00 O
ATOM 5 CB ALA B 8 10.032 14.139 30.014 1.00 50.00 C
ATOM 1 N ALA B 9 12.185 14.247 27.579 1.00 50.00 N
ATOM 2 CA ALA B 9 12.754 14.849 26.385 1.00 50.00 C
ATOM 3 C ALA B 9 12.892 13.859 25.320 1.00 50.00 C
ATOM 4 O ALA B 9 12.234 13.980 24.290 1.00 50.00 O
ATOM 5 CB ALA B 9 14.108 15.448 26.695 1.00 50.00 C
ATOM 1 N ALA B 10 13.655 12.794 25.566 1.00 50.00 N
ATOM 2 CA ALA B 10 13.831 11.803 24.529 1.00 50.00 C
ATOM 3 C ALA B 10 12.551 10.987 24.319 1.00 50.00 C
ATOM 4 O ALA B 10 12.514 10.237 23.390 1.00 50.00 O
ATOM 5 CB ALA B 10 15.024 10.750 24.992 1.00 50.00 C
ATOM 1 N ALA B 11 11.558 11.184 25.126 1.00 50.00 N
ATOM 2 CA ALA B 11 10.334 10.457 24.931 1.00 50.00 C
ATOM 3 C ALA B 11 9.326 11.284 24.168 1.00 50.00 C
ATOM 4 O ALA B 11 8.566 10.707 23.476 1.00 50.00 O
ATOM 5 CB ALA B 11 9.644 10.042 26.251 1.00 50.00 C
ATOM 1 N ALA B 12 9.277 12.611 24.334 1.00 50.00 N
ATOM 2 CA ALA B 12 8.354 13.375 23.644 1.00 50.00 C
ATOM 3 C ALA B 12 9.019 13.546 22.264 1.00 50.00 C
ATOM 4 O ALA B 12 8.400 13.891 21.317 1.00 50.00 O
ATOM 5 CB ALA B 12 8.056 14.678 24.287 1.00 50.00 C
ATOM 1 N ALA B 13 10.333 13.339 22.264 1.00 50.00 N
ATOM 2 CA ALA B 13 11.239 13.471 21.127 1.00 50.00 C
ATOM 3 C ALA B 13 11.096 12.161 20.325 1.00 50.00 C
ATOM 4 O ALA B 13 11.145 12.175 19.123 1.00 50.00 O
ATOM 5 CB ALA B 13 12.584 13.665 21.596 1.00 50.00 C
ATOM 1 N ALA B 14 11.051 11.078 21.086 1.00 50.00 N
ATOM 2 CA ALA B 14 10.953 9.771 20.454 1.00 50.00 C
ATOM 3 C ALA B 14 9.550 9.463 20.117 1.00 50.00 C
ATOM 4 O ALA B 14 9.233 8.571 19.367 1.00 50.00 O
ATOM 5 CB ALA B 14 11.461 8.697 21.413 1.00 50.00 C
ATOM 1 N ALA B 15 8.669 10.215 20.743 1.00 50.00 N
ATOM 2 CA ALA B 15 7.282 10.010 20.486 1.00 50.00 C
ATOM 3 C ALA B 15 6.825 10.982 19.376 1.00 50.00 C
ATOM 4 O ALA B 15 5.855 10.783 18.619 1.00 50.00 O
ATOM 5 CB ALA B 15 6.367 10.306 21.797 1.00 50.00 C
ATOM 1 N ALA B 16 7.511 12.143 19.430 1.00 50.00 N
ATOM 2 CA ALA B 16 7.233 13.302 18.551 1.00 50.00 C
ATOM 3 C ALA B 16 7.912 13.082 17.205 1.00 50.00 C
ATOM 4 O ALA B 16 7.492 13.573 16.111 1.00 50.00 O
ATOM 5 CB ALA B 16 7.762 14.594 19.165 1.00 50.00 C
ATOM 1 N ALA B 17 9.071 12.427 17.269 1.00 50.00 N
ATOM 2 CA ALA B 17 9.595 11.771 16.091 1.00 50.00 C
ATOM 3 C ALA B 17 8.883 10.519 15.763 1.00 50.00 C
ATOM 4 O ALA B 17 8.890 10.193 14.597 1.00 50.00 O
ATOM 5 CB ALA B 17 11.046 11.518 16.265 1.00 50.00 C
ATOM 1 N ALA B 18 8.315 9.809 16.722 1.00 50.00 N
ATOM 2 CA ALA B 18 7.515 8.647 16.448 1.00 50.00 C
ATOM 3 C ALA B 18 6.253 9.063 15.707 1.00 50.00 C
ATOM 4 O ALA B 18 5.559 8.173 15.198 1.00 50.00 O
ATOM 5 CB ALA B 18 7.129 7.915 17.695 1.00 50.00 C
ATOM 1 N ALA B 19 5.866 10.332 15.772 1.00 50.00 N
ATOM 2 CA ALA B 19 4.686 10.808 15.089 1.00 50.00 C
ATOM 3 C ALA B 19 5.011 11.578 13.803 1.00 50.00 C
ATOM 4 O ALA B 19 4.291 11.514 12.837 1.00 50.00 O
ATOM 5 CB ALA B 19 3.854 11.710 15.960 1.00 50.00 C
ATOM 1 N ALA B 20 6.176 12.195 13.822 1.00 50.00 N
ATOM 2 CA ALA B 20 6.614 13.121 12.789 1.00 50.00 C
ATOM 3 C ALA B 20 7.933 12.759 12.098 1.00 50.00 C
ATOM 4 O ALA B 20 8.620 13.613 11.585 1.00 50.00 O
ATOM 5 CB ALA B 20 6.823 14.498 13.449 1.00 50.00 C
ATOM 1 N ALA B 21 8.284 11.511 12.050 1.00 50.00 N
ATOM 2 CA ALA B 21 9.513 11.117 11.323 1.00 50.00 C
ATOM 3 C ALA B 21 9.313 9.628 11.029 1.00 50.00 C
ATOM 4 O ALA B 21 9.731 8.751 11.795 1.00 50.00 O
ATOM 5 CB ALA B 21 10.799 11.332 12.178 1.00 50.00 C
TER
"""
def exercise_04(prefix="tst_mi_map_test_04"):
"""
Run with reference map.
Check if working with NCS in the model. Without symmetry.
"""
# without cryst
pdb_file = open("%s_start.pdb" % prefix, "w")
pdb_file.write(pdb_str)
pdb_file.close()
cmd = " ".join([
"phenix.model_idealization",
"%s_start.pdb" % prefix,
"use_map_for_reference=True",
"loop_idealization.number_of_ccd_trials=1",
"number_of_refinement_cycles=1",
"n_macro=1",
"debug=True",
">%s.log" % prefix])
print(cmd)
assert not easy_run.call(cmd)
assert os.path.isfile("%s_start.pdb_all_idealized.pdb" % prefix)
res_log = open("%s.log" % prefix, "r")
log_lines = res_log.readlines()
# NCS constraints with map are not implemented yet
for l in [
# "Using ncs\n",
"Using map as reference\n",
" Minimizing... (NCS)\n",
# "Ramachandran outliers: 0.00 0.00 0.00 0.00 0.00\n",
"All done.\n"]:
assert l in log_lines, "'%s' not in log file." % l
res_log.close()
if (__name__ == "__main__"):
t0 = time.time()
if (not libtbx.env.has_module(name="probe")):
print("Skipping: probe not configured")
else:
exercise_04()
print("Time: %.2f" % (time.time() - t0))
print("OK")
| 68.524528
| 85
| 0.453109
| 3,809
| 18,159
| 2.14597
| 0.16146
| 0.077074
| 0.10619
| 0.089919
| 0.48483
| 0.478224
| 0.475777
| 0.473575
| 0.470516
| 0.470516
| 0
| 0.53609
| 0.476623
| 18,159
| 264
| 86
| 68.784091
| 0.323969
| 0.016245
| 0
| 0.007937
| 0
| 0.837302
| 0.953715
| 0.008405
| 0
| 0
| 0
| 0
| 0.011905
| 1
| 0.003968
| false
| 0
| 0.019841
| 0
| 0.02381
| 0.019841
| 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
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
675c435190ad8e4a2b05998f522a24840f91ff12
| 482
|
py
|
Python
|
resolwe/flow/managers/utils.py
|
plojyon/resolwe
|
1bee6f0860fdd087534adf1680e9350d79ab97cf
|
[
"Apache-2.0"
] | 27
|
2015-12-07T18:29:12.000Z
|
2022-03-16T08:01:47.000Z
|
resolwe/flow/managers/utils.py
|
plojyon/resolwe
|
1bee6f0860fdd087534adf1680e9350d79ab97cf
|
[
"Apache-2.0"
] | 681
|
2015-12-01T11:52:24.000Z
|
2022-03-21T07:43:37.000Z
|
resolwe/flow/managers/utils.py
|
plojyon/resolwe
|
1bee6f0860fdd087534adf1680e9350d79ab97cf
|
[
"Apache-2.0"
] | 28
|
2015-12-01T08:32:57.000Z
|
2021-12-14T00:04:16.000Z
|
""".. Ignore pydocstyle D400.
=========
Utilities
=========
Utilities for using global manager features.
"""
from django.test import override_settings
def disable_auto_calls():
"""Decorator/context manager which stops automatic manager calls.
When entered, automatic
:meth:`~resolwe.flow.managers.dispatcher.Manager.communicate` calls
from the Django transaction signal are not done.
"""
return override_settings(FLOW_MANAGER_DISABLE_AUTO_CALLS=True)
| 21.909091
| 71
| 0.732365
| 56
| 482
| 6.160714
| 0.714286
| 0.092754
| 0.092754
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007353
| 0.153527
| 482
| 21
| 72
| 22.952381
| 0.838235
| 0.639004
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
67636c7de34fa447a4d398c48376474b1b02e408
| 134
|
py
|
Python
|
mysite/bookstore/apps.py
|
schinckel/robotframework-djangolibrary
|
fda7454482b889a90b727adf7444929c3b597fa3
|
[
"Apache-2.0"
] | 31
|
2015-06-25T00:23:13.000Z
|
2020-10-30T19:08:00.000Z
|
mysite/bookstore/apps.py
|
schinckel/robotframework-djangolibrary
|
fda7454482b889a90b727adf7444929c3b597fa3
|
[
"Apache-2.0"
] | 163
|
2015-06-24T08:54:50.000Z
|
2022-03-16T17:37:21.000Z
|
mysite/bookstore/apps.py
|
schinckel/robotframework-djangolibrary
|
fda7454482b889a90b727adf7444929c3b597fa3
|
[
"Apache-2.0"
] | 24
|
2015-07-29T09:25:14.000Z
|
2020-12-08T04:15:16.000Z
|
from __future__ import unicode_literals
from django.apps import AppConfig
class BookstoreConfig(AppConfig):
name = 'bookstore'
| 16.75
| 39
| 0.798507
| 15
| 134
| 6.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.149254
| 134
| 7
| 40
| 19.142857
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0.067164
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
67642a17279e1ed2c8f90dfab7d350cbbab8fd0b
| 151
|
py
|
Python
|
tarn/cache/__init__.py
|
neuro-ml/tarn
|
07bf61d5ebec69cd5f44ef4766b774769281613f
|
[
"Apache-2.0"
] | null | null | null |
tarn/cache/__init__.py
|
neuro-ml/tarn
|
07bf61d5ebec69cd5f44ef4766b774769281613f
|
[
"Apache-2.0"
] | null | null | null |
tarn/cache/__init__.py
|
neuro-ml/tarn
|
07bf61d5ebec69cd5f44ef4766b774769281613f
|
[
"Apache-2.0"
] | null | null | null |
from .index import CacheIndex
from .storage import CacheStorage
from .serializers import *
from .compat import is_stable, is_unstable, unstable_module
| 30.2
| 59
| 0.834437
| 20
| 151
| 6.15
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119205
| 151
| 4
| 60
| 37.75
| 0.924812
| 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
| 0
| 0
|
0
| 4
|
678ec5d9d16f1bc21f437e9ea7b19a01d53398f5
| 70
|
py
|
Python
|
Python/13.define function.py
|
idesign0/Programming-Repo
|
b38ef4cc498da764b4f04c8483f5b6c3e49e249c
|
[
"MIT"
] | 1
|
2019-10-09T17:03:59.000Z
|
2019-10-09T17:03:59.000Z
|
Python/13.define function.py
|
idesign0/dhruv.github.io
|
b38ef4cc498da764b4f04c8483f5b6c3e49e249c
|
[
"MIT"
] | null | null | null |
Python/13.define function.py
|
idesign0/dhruv.github.io
|
b38ef4cc498da764b4f04c8483f5b6c3e49e249c
|
[
"MIT"
] | null | null | null |
def score(name=tom,score=0):
print(name," scored ", score )
| 14
| 34
| 0.585714
| 10
| 70
| 4.1
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018868
| 0.242857
| 70
| 4
| 35
| 17.5
| 0.754717
| 0
| 0
| 0
| 0
| 0
| 0.115942
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
67bc86f75d022779c95bf01f587a3a3fcbfc1704
| 261
|
py
|
Python
|
rest_test/attendance/serializers.py
|
Fanner487/fyp_django_demo
|
fb046363a0fe491dfc111b390306cea2afcd2343
|
[
"MIT"
] | null | null | null |
rest_test/attendance/serializers.py
|
Fanner487/fyp_django_demo
|
fb046363a0fe491dfc111b390306cea2afcd2343
|
[
"MIT"
] | null | null | null |
rest_test/attendance/serializers.py
|
Fanner487/fyp_django_demo
|
fb046363a0fe491dfc111b390306cea2afcd2343
|
[
"MIT"
] | null | null | null |
from attendance.models import Attendance
from rest_framework import serializers
class AttendanceSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Attendance
fields = ('event_name', 'created', 'organiser', 'scheduled')
| 32.625
| 68
| 0.758621
| 24
| 261
| 8.166667
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16092
| 261
| 7
| 69
| 37.285714
| 0.894977
| 0
| 0
| 0
| 0
| 0
| 0.1341
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
67d46fb6e2d8e6992b9fdedfdca8843a60031590
| 194
|
py
|
Python
|
oop-cats/2encapsulation.py
|
Capwell/oop-cats
|
97baed15d7eeb3a0dffd383441fa5eedf27f5138
|
[
"Apache-2.0"
] | 1
|
2021-02-21T19:51:59.000Z
|
2021-02-21T19:51:59.000Z
|
oop-cats/2encapsulation.py
|
Capwell/oop-cats
|
97baed15d7eeb3a0dffd383441fa5eedf27f5138
|
[
"Apache-2.0"
] | null | null | null |
oop-cats/2encapsulation.py
|
Capwell/oop-cats
|
97baed15d7eeb3a0dffd383441fa5eedf27f5138
|
[
"Apache-2.0"
] | null | null | null |
class Cat:
__mew: str = 'муурр'*4
def make_happy(self) -> str:
return self.__mew
kuzya = Cat()
print(kuzya.__mew) # Не сработает
# print(kuzya.mew)
print(kuzya.make_happy())
| 16.166667
| 34
| 0.639175
| 28
| 194
| 4.142857
| 0.535714
| 0.258621
| 0.224138
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006579
| 0.216495
| 194
| 11
| 35
| 17.636364
| 0.756579
| 0.149485
| 0
| 0
| 0
| 0
| 0.030864
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0
| 0.142857
| 0.571429
| 0.285714
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
67f2b836c7f32c9e8797a3de526699ccf2f876aa
| 13,948
|
py
|
Python
|
rdbtools/callbacks.py
|
php-cpm/redis-rdb-tools
|
9dd1902fe48265ca05bce0e81681c23c33dddb07
|
[
"MIT"
] | 3
|
2019-02-12T08:28:38.000Z
|
2021-09-03T02:52:34.000Z
|
rdbtools/callbacks.py
|
ding-guohang/redis-rdb-tools
|
543a73e84702e911ddcd31325ecfde77d7fd230b
|
[
"MIT"
] | null | null | null |
rdbtools/callbacks.py
|
ding-guohang/redis-rdb-tools
|
543a73e84702e911ddcd31325ecfde77d7fd230b
|
[
"MIT"
] | 2
|
2019-12-05T02:45:29.000Z
|
2020-06-18T16:29:23.000Z
|
import calendar
import codecs
import json
from rdbtools.parser import RdbCallback
from rdbtools import encodehelpers
class JSONCallback(RdbCallback):
def __init__(self, out, string_escape=None):
if string_escape is None:
string_escape = encodehelpers.STRING_ESCAPE_UTF8
super(JSONCallback, self).__init__(string_escape)
self._out = out
self._is_first_db = True
self._has_databases = False
self._is_first_key_in_db = True
self._elements_in_key = 0
self._element_index = 0
def encode_key(self, key):
key = encodehelpers.bytes_to_unicode(key, self._escape, skip_printable=True)
return codecs.encode(json.dumps(key), 'utf-8')
def encode_value(self, val):
val = encodehelpers.bytes_to_unicode(val, self._escape)
return codecs.encode(json.dumps(val), 'utf-8')
def start_rdb(self):
self._out.write(b'[')
def start_database(self, db_number):
if not self._is_first_db:
self._out.write(b'},')
self._out.write(b'{')
self._is_first_db = False
self._has_databases = True
self._is_first_key_in_db = True
def end_database(self, db_number):
pass
def end_rdb(self):
if self._has_databases:
self._out.write(b'}')
self._out.write(b']')
def _start_key(self, key, length):
if not self._is_first_key_in_db:
self._out.write(b',')
self._out.write(b'\r\n')
self._is_first_key_in_db = False
self._elements_in_key = length
self._element_index = 0
def _end_key(self, key):
pass
def _write_comma(self):
if self._element_index > 0 and self._element_index < self._elements_in_key :
self._out.write(b',')
self._element_index = self._element_index + 1
def set(self, key, value, expiry, info):
self._start_key(key, 0)
self._out.write(self.encode_key(key) + b':' + self.encode_value(value))
self._end_key(key)
def start_hash(self, key, length, expiry, info):
self._start_key(key, length)
self._out.write(self.encode_key(key) + b':{')
def hset(self, key, field, value):
self._write_comma()
self._out.write(self.encode_key(field) + b':' + self.encode_value(value))
def end_hash(self, key):
self._end_key(key)
self._out.write(b'}')
def start_set(self, key, cardinality, expiry, info):
self._start_key(key, cardinality)
self._out.write(self.encode_key(key) + b':[')
def sadd(self, key, member):
self._write_comma()
self._out.write(self.encode_value(member))
def end_set(self, key):
self._end_key(key)
self._out.write(b']')
def start_list(self, key, expiry, info):
self._start_key(key, 0)
self._out.write(self.encode_key(key) + b':[')
def rpush(self, key, value) :
self._elements_in_key += 1
self._write_comma()
self._out.write(self.encode_value(value))
def end_list(self, key, info):
self._end_key(key)
self._out.write(b']')
def start_sorted_set(self, key, length, expiry, info):
self._start_key(key, length)
self._out.write(self.encode_key(key) + b':{')
def zadd(self, key, score, member):
self._write_comma()
self._out.write(self.encode_key(member) + b':' + self.encode_value(score))
def end_sorted_set(self, key):
self._end_key(key)
self._out.write(b'}')
def start_stream(self, key, listpacks_count, expiry, info):
self._start_key(key, 0)
self._out.write(self.encode_key(key) + b':{')
def end_stream(self, key, items, last_entry_id, cgroups):
self._end_key(key)
self._out.write(b'}')
def start_module(self, key, module_name, expiry, info):
self._start_key(key, 0)
self._out.write(self.encode_key(key) + b':{')
return False
def end_module(self, key, buffer_size, buffer=None):
self._end_key(key)
self._out.write(b'}')
class KeysOnlyCallback(RdbCallback):
def __init__(self, out, string_escape=None):
super(KeysOnlyCallback, self).__init__(string_escape)
self._out = out
def _keyout(self, key):
self._out.write(self.encode_key(key) + b'\n')
def set(self, key, value, expiry, info):
self._keyout(key)
def start_hash(self, key, length, expiry, info):
self._keyout(key)
def hset(self, key, field, value):
self._keyout(key)
def start_set(self, key, cardinality, expiry, info):
self._keyout(key)
def sadd(self, key, member):
self._keyout(key)
def start_list(self, key, expiry, info):
self._keyout(key)
def rpush(self, key, value) :
self._keyout(key)
def start_sorted_set(self, key, length, expiry, info):
self._keyout(key)
def zadd(self, key, score, member):
self._keyout(key)
def start_stream(self, key, listpacks_count, expiry, info):
self._keyout(key)
def start_module(self, key, module_name, expiry, info):
self._keyout(key)
return False
class KeyValsOnlyCallback(RdbCallback):
def __init__(self, out, string_escape=None):
super(KeyValsOnlyCallback, self).__init__(string_escape)
self._out = out
self._is_first_db = True
self._has_databases = False
self._is_first_key_in_db = True
self._elements_in_key = 0
self._element_index = 0
def _start_key(self, key, length):
if not self._is_first_key_in_db:
self._out.write(b',')
self._out.write(b'\r\n')
self._is_first_key_in_db = False
self._elements_in_key = length
self._element_index = 0
def _end_key(self, key):
pass
def _write_comma(self):
if self._element_index > 0 and self._element_index < self._elements_in_key :
self._out.write(b',')
self._element_index = self._element_index + 1
def set(self, key, value, expiry, info):
self._start_key(key, 0)
self._out.write(self.encode_key(key) + b' ' + self.encode_value(value))
def start_hash(self, key, length, expiry, info):
self._start_key(key, length)
self._out.write(self.encode_key(key) + b' ')
def hset(self, key, field, value):
self._write_comma()
self._out.write(self.encode_key(field) + b' ' + self.encode_value(value))
def end_hash(self, key):
self._end_key(key)
def start_set(self, key, cardinality, expiry, info):
self._start_key(key, cardinality)
self._out.write(self.encode_key(key) + b' ')
def sadd(self, key, member):
self._write_comma()
self._out.write(self.encode_value(member))
def end_set(self, key):
self._end_key(key)
def start_list(self, key, expiry, info):
self._start_key(key, 0)
self._out.write(self.encode_key(key) + b' ')
def rpush(self, key, value) :
self._elements_in_key += 1
self._write_comma()
self._out.write(self.encode_value(value))
def end_list(self, key, info):
self._end_key(key)
def start_sorted_set(self, key, length, expiry, info):
self._start_key(key, length)
self._out.write(self.encode_key(key) + b' ')
def zadd(self, key, score, member):
self._write_comma()
self._out.write(self.encode_key(member) + b' ' + self.encode_value(score))
def end_sorted_set(self, key):
self._end_key(key)
def start_stream(self, key, listpacks_count, expiry, info):
self._start_key(key, 0)
self._out.write(self.encode_key(key) + b' ')
def end_stream(self, key, items, last_entry_id, cgroups):
self._end_key(key)
def start_module(self, key, module_name, expiry, info):
self._start_key(key, 0)
self._out.write(self.encode_key(key) + b' ')
return False
def end_module(self, key, buffer_size, buffer=None):
self._end_key(key)
class DiffCallback(RdbCallback):
'''Prints the contents of RDB in a format that is unix sort friendly,
so that two rdb files can be diffed easily'''
def __init__(self, out, string_escape=None):
if string_escape is None:
string_escape = encodehelpers.STRING_ESCAPE_PRINT
super(DiffCallback, self).__init__(string_escape)
self._out = out
self._index = 0
self._dbnum = 0
def dbstr(self):
return b'db=' + encodehelpers.num2bytes(self._dbnum) + b' '
def start_rdb(self):
pass
def start_database(self, db_number):
self._dbnum = db_number
def end_database(self, db_number):
pass
def end_rdb(self):
pass
def set(self, key, value, expiry, info):
self._out.write(self.dbstr() + self.encode_key(key) + b' -> ' + self.encode_value(value))
self.newline()
def start_hash(self, key, length, expiry, info):
pass
def hset(self, key, field, value):
self._out.write(
self.dbstr() + self.encode_key(key) + b' . ' + self.encode_key(field) + b' -> ' + self.encode_value(value))
self.newline()
def end_hash(self, key):
pass
def start_set(self, key, cardinality, expiry, info):
pass
def sadd(self, key, member):
self._out.write(self.dbstr() + self.encode_key(key) + b' { ' + self.encode_value(member) + b' }')
self.newline()
def end_set(self, key):
pass
def start_list(self, key, expiry, info):
self._index = 0
def rpush(self, key, value) :
istr = encodehelpers.num2bytes(self._index)
self._out.write(self.dbstr() + self.encode_key(key) + b'[' + istr + b'] -> ' + self.encode_value(value))
self.newline()
self._index = self._index + 1
def end_list(self, key, info):
pass
def start_sorted_set(self, key, length, expiry, info):
pass
def zadd(self, key, score, member):
self._out.write(self.dbstr() + self.encode_key(key) +
b' -> {' + self.encode_key(member) + b', score=' + self.encode_value(score) + b'}')
self.newline()
def end_sorted_set(self, key):
pass
def end_stream(self, key, items, last_entry_id, cgroups):
self._out.write(self.dbstr() + self.encode_key(key) + b' -> stream-items=' + encodehelpers.num2bytes(items))
self.newline()
def start_module(self, key, module_name, expiry, info):
self._out.write(self.dbstr() + self.encode_key(key) + b' -> module-name=' + codecs.encode(module_name, 'ascii'))
self.newline()
return False
def newline(self):
self._out.write(b'\r\n')
def _unix_timestamp(dt):
return calendar.timegm(dt.utctimetuple())
class ProtocolCallback(RdbCallback):
def __init__(self, out, string_escape=None):
super(ProtocolCallback, self).__init__(string_escape)
self._out = out
self.reset()
def reset(self):
self._expires = {}
def set_expiry(self, key, dt):
self._expires[key] = dt
def get_expiry_seconds(self, key):
if key in self._expires:
return _unix_timestamp(self._expires[key])
return None
def expires(self, key):
return key in self._expires
def pre_expiry(self, key, expiry):
if expiry is not None:
self.set_expiry(key, expiry)
def post_expiry(self, key):
if self.expires(key):
self.expireat(key, self.get_expiry_seconds(key))
def emit(self, *args):
self._out.write(codecs.encode("*%s\r\n" % len(args), 'ascii'))
for arg in args:
val = encodehelpers.apply_escape_bytes(arg, self._escape)
self._out.write(codecs.encode("$%s\r\n" % len(val), 'ascii'))
self._out.write(val + b"\r\n")
def start_database(self, db_number):
self.reset()
self.select(db_number)
# String handling
def set(self, key, value, expiry, info):
self.pre_expiry(key, expiry)
self.emit(b'SET', key, value)
self.post_expiry(key)
# Hash handling
def start_hash(self, key, length, expiry, info):
self.pre_expiry(key, expiry)
def hset(self, key, field, value):
self.emit(b'HSET', key, field, value)
def end_hash(self, key):
self.post_expiry(key)
# Set handling
def start_set(self, key, cardinality, expiry, info):
self.pre_expiry(key, expiry)
def sadd(self, key, member):
self.emit(b'SADD', key, member)
def end_set(self, key):
self.post_expiry(key)
# List handling
def start_list(self, key, expiry, info):
self.pre_expiry(key, expiry)
def rpush(self, key, value):
self.emit(b'RPUSH', key, value)
def end_list(self, key, info):
self.post_expiry(key)
# Sorted set handling
def start_sorted_set(self, key, length, expiry, info):
self.pre_expiry(key, expiry)
def zadd(self, key, score, member):
self.emit(b'ZADD', key, score, member)
def end_sorted_set(self, key):
self.post_expiry(key)
# streams and modules, not currently supported
def start_stream(self, key, listpacks_count, expiry, info):
# TODO send RESTORE command
pass
def start_module(self, key, module_name, expiry, info):
# TODO send RESTORE command
return False
# Other misc commands
def select(self, db_number):
self.emit(b'SELECT', db_number)
def expireat(self, key, timestamp):
self.emit(b'EXPIREAT', key, timestamp)
| 29.995699
| 120
| 0.609693
| 1,894
| 13,948
| 4.228089
| 0.077614
| 0.076049
| 0.076424
| 0.05994
| 0.771853
| 0.748876
| 0.710415
| 0.656094
| 0.598402
| 0.536838
| 0
| 0.002931
| 0.266275
| 13,948
| 464
| 121
| 30.060345
| 0.779558
| 0.021867
| 0
| 0.73494
| 0
| 0
| 0.014977
| 0
| 0
| 0
| 0
| 0.002155
| 0
| 1
| 0.331325
| false
| 0.042169
| 0.01506
| 0.012048
| 0.39759
| 0.003012
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
67f362bd2993cba7662da63dfa96527c3a99c1ef
| 88
|
py
|
Python
|
apps/tess/apps.py
|
OpenAdaptronik/Rattler
|
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
|
[
"MIT"
] | 2
|
2018-05-18T08:38:29.000Z
|
2018-05-22T08:26:09.000Z
|
apps/tess/apps.py
|
IT-PM-OpenAdaptronik/Webapp
|
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
|
[
"MIT"
] | 118
|
2017-10-31T13:45:09.000Z
|
2018-02-24T20:51:42.000Z
|
apps/tess/apps.py
|
OpenAdaptronik/Rattler
|
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class TessConfig(AppConfig):
name = 'apps.tess'
| 14.666667
| 33
| 0.738636
| 11
| 88
| 5.909091
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170455
| 88
| 5
| 34
| 17.6
| 0.890411
| 0
| 0
| 0
| 0
| 0
| 0.102273
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
db1464a3c268d866b8ca99776d2eec1cea6286ff
| 2,456
|
py
|
Python
|
Bioinformatics_textbook/volumen_I/chapter_I/HammingDistance.py
|
ugis22/bioinformatics_algorithm_text_book_problems
|
a0a5b24fca44aae8cb1cc3b0bd3b69bb76e1a09b
|
[
"MIT"
] | 1
|
2018-05-07T08:38:27.000Z
|
2018-05-07T08:38:27.000Z
|
Bioinformatics_textbook/volumen_I/chapter_I/HammingDistance.py
|
ugis22/bioinformatics_algorithm_text_book_problems
|
a0a5b24fca44aae8cb1cc3b0bd3b69bb76e1a09b
|
[
"MIT"
] | null | null | null |
Bioinformatics_textbook/volumen_I/chapter_I/HammingDistance.py
|
ugis22/bioinformatics_algorithm_text_book_problems
|
a0a5b24fca44aae8cb1cc3b0bd3b69bb76e1a09b
|
[
"MIT"
] | null | null | null |
def hamming_distance(string1, string2):
assert len(string1) == len(string2)
distance = 0
for i in range(len(string1)):
if string1[i] != string2[i]:
distance += 1
return distance
'''def results(string1, string2):
print(hamming_distance(string1, string2))
results('CGTGAGATAGCATATGGTAAATGTTCCGCAATCGCTACCGCCAACAACTCGTTCATCCCAATAATGTGCCCGGAGGGACAGTAACAGACTACGTGTACGGACGAGCCTGACCCAGCAAGGGTGGGAGTGACTCCATGCCATCTCCAATAACAAGCACCAACCAATGTCGCCGGCCTAAGGTAGCGCAGATCTAGTTTCATGTCCGAAGTTGGCTAGCCCTCTCTGCCGCGGTTAGGGAGGAAAAGCATGGCTAGTGTCGAGACGTACAACTAATCCGTGGCGTCAATCTCCCCTGCACTCGAGTACGCATATTGGTCCGCCACTCAGCGAATTATCTTATTGGAATGCCTCTTACAACACGGTATTGATTTAAACAGGATTAGAAGATTACTATACCTTTAGTAATTGGAGTGTTGAGTTTACGGAATCCTAATAATCAATCAGATACGCAGGTAAAGTATGTCACGTTACTGAGAAGTGGGTCGTCTATACATGAGGTCGTGTTCTTGCCTATTATATAGCAACCCTGTCAAGGCTTCTCTCCGAGCAAGCCGGACTCTGTCGCTTAGAGTCATGTGGGCACGTGTTACGTCGTCGTCAGCACGGGCTCAGGCCAATAGGGTATATAAATTGGAATGCTCCACGGTGAAAAGACTGGCTGCCGAATCCTGCCGCTGGGTACCCGTATTGCCGGCAATACAGGCCTAGTCGGTAGCTGCAGGAGAATACCGATTAACGGCGAAGGCGCCAGCCTCCGTAGTACCTGAGTTGTCGATCTACGGCGGAACCCGTGTACGCTTCATCAGCCCCTAACGGTTCGTTATTCATGATCCTGTTGCAAGTTCACGAACTCTAGCCCGGCGCACCAATAGCTTAATGTCGAAGTGTTCGTCATCTGGTGGAGCCCGTGCCCCGGAAGTCGGGGTAGTGATGTTCTACTTTCTATAAGTTGAGCGCCACCAGGAAGAGCTTCATCTTAAGCACCTGTTCCATTCAGAGAGCAGGTTCCTTTCGAAGTTTGGATACAGTCTGGAATGAGAGGCCAGTGTCACTGAATCGCTTTTTCAGCCTCCCATACGAATGC', 'GTTTCGCAAATATCGGGAACATATGGCTTTTGGCCTCTCCCTGGTCGGACGCTCGGATACAAAAGATCGCCCGAGCGTGCCATAGAACAACCAGTATGATTTTCAAGGATCGCGTATCAGCAGAGCAACTTCGTCGGACACGCGTATACCAGACTCACTGGTTTCGGGGCACGCTAAGAGGACTGAGTGTAACACTTCCTAATCATTGCCGATTAAGTCGGCGGAACAGGTTTTTCTGGCGGGACTCACTGTACGCGCGCGTTCGCCGCGGCTGCTGCCGACCTTAGTTGGCGGGGACGCCTCGGACATATAAGATGAAACTTGTTGAGCACTCCAGCGTAATGAGACGATTACCCAGCGTGCGTGACCACGGAAAACCTGCTAGTGCTTACTATTCCTTTTCCAGCCCATGCAACTACTTAGGGGCCGCCGGCGACAAGCGGACTTCATATCATCTGGTCTTAGTAAAGCTTTACGTATTATTGATAGATGGGAGGAATTAACAGCAGTTCCTACCGCACTTGGGTTTATCCGGATATAGGGATTAACTCGTTGGGATTATGCGTCTGCCTACTATCGACTTGCGCGTAGACCTGTGTGCGGAACACCCGATCCCTATTAACTTTAACCAGGGTCATGCCGGATTGACCTGAACTACGCCAAAATAAGGGAACCAAATGGTGTGCGGCGTTTGTATCCAAAGCCGGAAACTATTGGCCTACAACCCGATGACTCCTTTCAATCGGGACGTCCCTATACACTAGGTACATGATCGAAAGGTCTTGCTGGATGGATGCCGACAACATTGTAAGACAGCCTTGATAATGCGAATGTCTGACCCCGCGGCTGTGTCACGAGCTCAATCTCGGTCCTAGCGCCCAAACATCAGAGGATATCTCGACGGGTGAACATTATAACCCTTGATCGGTTGGTAGAAGTAAATCTACTTATCACTTCCCTTGGTGTGGATAATCACAGGGATGTTGAAGTTAGCGGTCCACCAACAGGCGAGTACGGGACTTCACACTCCGCAAGGTTACTCTTAATATCACATATCGCTGTCCCTAGTATTAAGTTGATGCGC')
'''
| 163.733333
| 2,183
| 0.962541
| 39
| 2,456
| 60.564103
| 0.487179
| 0.017782
| 0.018628
| 0.024555
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005392
| 0.018322
| 2,456
| 15
| 2,184
| 163.733333
| 0.974285
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0.142857
| 1
| 0.142857
| false
| 0
| 0
| 0
| 0.285714
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
db2ae2c71b6a4c8665c133b15d53dd65c7d6bb12
| 9,586
|
py
|
Python
|
optimizer/myFunction.py
|
WilliamLiPro/LpSS_demo
|
3f53a2a9c44a3857a8eb95e6fc44b8409ce363f4
|
[
"Apache-2.0"
] | 2
|
2020-10-30T00:47:17.000Z
|
2021-08-21T09:36:02.000Z
|
optimizer/myFunction.py
|
WilliamLiPro/LpSS
|
9c8cbc17f2662b244f8764508bb2f3b6f077c34f
|
[
"Apache-2.0"
] | null | null | null |
optimizer/myFunction.py
|
WilliamLiPro/LpSS
|
9c8cbc17f2662b244f8764508bb2f3b6f077c34f
|
[
"Apache-2.0"
] | null | null | null |
import os
import torch
import torch.nn.functional as F
import numpy as np
from collections import namedtuple
import time
import matplotlib.pyplot as plt
# 定义是否使用GPU
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
def LpNormalize_cnn(input, p=2, cp=1, eps=1e-6):
r'''Calculate the unit vector on Lp sphere
:param input: tensor of weight, dims should be >= 2
:param p: the Lp parameter of weight
:param cp: the p power of current input, that means input = c*w^cp
:param eps:
:return: output = input/norm_d, norm_d = norm(input, p/cp)
'''
dim = input.dim()
norm_d = LpNorm_cnn(input, p, cp, eps)
inv_norm_d = 1 / norm_d
if dim == 2:
output = input.mul(inv_norm_d.view(input.size(0), 1))
elif dim == 3:
output = input.mul(inv_norm_d.view(input.size(0), 1, 1))
elif dim == 4:
output = input.mul(inv_norm_d.view(input.size(0), 1, 1, 1))
else:
raise ValueError('Expected input 2 <= dims <=4, got {}'.format(dim))
return output, norm_d
def LpNorm_cnn(input, p=2, cp=1, eps=1e-6):
r'''Calculate the Lp norm of weights
:param input: tensor of weight, dims should be >= 2, and the dim 0 is channels
:param p: the Lp parameter of weight
:param cp: the p power of current input, that means input = c*w^cp
:param eps:
:return: output = input/norm_d, norm_d = norm(input, p/cp)
'''
dim = input.dim()
if dim == 2:
norm_d = input.abs().pow(p / cp).sum(1).pow(cp / p).add(eps)
elif dim == 3:
norm_d = input.abs().pow(p / cp).sum(2).sum(1).pow(cp / p).add(eps)
elif dim == 4:
norm_d = input.abs().pow(p / cp).sum(3).sum(2).sum(1).pow(cp / p).add(eps)
else:
raise ValueError('Expected input 2 <= dims <=4, got {}'.format(dim))
return norm_d
def LpNormalize_layer(input, p=2, cp=1, eps=1e-6):
r'''Calculate the unit vector on Lp sphere (layer as a single vector)
:param input: tensor of weight, dims should be >= 2
:param p: the Lp parameter of weight
:param cp: the p power of current input, that means input = c*w^cp
:param eps:
:return: output = input/norm_d, norm_d = norm(input, p/cp)
'''
dim = input.dim()
if dim >= 2 and dim <= 4:
norm_d = input.abs().pow(p/cp).sum().pow(cp/p).add(eps)
inv_norm_d = 1/norm_d
output = input.mul(inv_norm_d)
else:
raise ValueError('Expected input 2 <= dims <=4, got {}'.format(dim))
return output, inv_norm_d
def Hoyer_layer_sparsity(input, eps=1e-8):
# Hoyer’s sparsity of a layer's weight
# the average sparsity of weight in a layer
dim = input.dim()
abs_in = input.abs()
d = np.prod(input.size()[1:])
sqrt_d = np.sqrt(d)
if dim == 2:
output = abs_in.sum(1).div(abs_in.pow(2).sum(1).pow(0.5).add(eps)).sub(sqrt_d).div(1-sqrt_d).mean(0)
elif dim == 3:
output = abs_in.sum(2).sum(1).div(abs_in.pow(2).sum(2).sum(1).pow(0.5).add(eps)).sub(sqrt_d).div(1-sqrt_d).mean(0)
elif dim == 4:
output = abs_in.sum(3).sum(2).sum(1).div(abs_in.pow(2).sum(3).sum(2).sum(1).pow(0.5).add(eps)).sub(sqrt_d).div(1-sqrt_d).mean(0)
else:
raise ValueError('Expected input 2 <= dims <=4, got {}'.format(dim))
return output
def Hoyer_layervec_sparsity(input, eps=1e-8):
# Hoyer’s sparsity of a layer's weight
# the average sparsity of weight in a layer
dim = input.dim()
abs_in = input.abs()
d = np.prod(input.size())
sqrt_d = np.sqrt(d)
if dim >= 2 and dim <= 4:
output = abs_in.div(abs_in.pow(2).pow(0.5).add(eps)).sub(sqrt_d).div(1-sqrt_d)
else:
raise ValueError('Expected input 2 <= dims <=4, got {}'.format(dim))
return output
def Hoyer_net_sparsity(model):
# Hoyer’s sparsity of whole network
# the average sparsity of weight in whole network
weight_list = get_weight(model)
w_sparsity = []
num_w = [] # number of weight in each layer
for name, weight in weight_list:
if weight.dim() < 2:
continue
# sparsity
c_sparse = Hoyer_layer_sparsity(weight.data).item()
w_sparsity.append(c_sparse)
num_w.append(np.prod(weight.data.size()))
return np.average(w_sparsity, weights=num_w)
def Hoyer_net_ll_sparsity(model):
# Hoyer’s sparsity of whole network
# the average sparsity of weight in whole network
weight_list = get_weight(model)
w_sparsity = []
num_w = [] # number of weight in each layer
for name, weight in weight_list:
if weight.dim() < 2:
continue
# sparsity
c_sparse = Hoyer_layervec_sparsity(weight.data).item()
w_sparsity.append(c_sparse)
num_w.append(np.prod(weight.data.size()))
return np.average(w_sparsity, weights=num_w)
def Hoyer_activation_sparsity(input):
# Hoyer’s sparsity of a layer's activation
# the average sparsity of activation in a layer
return Hoyer_layer_sparsity(input)
def sparsify_weight(w, mask, h=0.1, eps=1e-8):
'''Weight sparsification by setting the small element to zero
Args:
w (torch.tensor): the weight for sparsification
mask (torch.tensor): the mask of no activated weight
h (torch.tensor/float, optional): the weight for sparsification (default: 0.1)
:return: w (sparse), mask
'''
wa = w.abs()
nmask_f = (~mask).float()
dim = wa.dim()
if dim == 2:
hh = wa.mul(nmask_f).sum(1).div(nmask_f.sum(1).add(eps)).mul(h)
mask = wa < hh.view(wa.size(0), 1)
w.masked_fill_(mask, 0)
elif dim == 3:
hh = wa.mul(nmask_f).sum(2).sum(1).div(nmask_f.sum(2).sum(1).add(eps)).mul(h)
mask = wa < hh.view(wa.size(0), 1, 1)
w.masked_fill_(mask, 0)
elif dim == 4:
hh = wa.mul(nmask_f).sum(3).sum(2).sum(1).div(nmask_f.sum(3).sum(2).sum(1).add(eps)).mul(h)
mask = wa < hh.view(wa.size(0), 1, 1, 1)
w.masked_fill_(mask, 0)
else:
raise ValueError('Expected dimension of input 2 <= dims <=4, got {}'.format(dim))
return w, mask
def sparsify_weight_ll(w, h=0.1):
'''Weight sparsification by setting the small element to zero
Args:
w (torch.tensor): the weight for sparsification
h (torch.tensor/float, optional): the weight for sparsification (default: 0.1)
:return: mask
'''
wa = w.abs()
ws = wa.mul(wa)
dim = ws.dim()
if dim >= 2 and dim <= 4:
hh = ws.mean().sqrt().mul(h)
mask = wa < hh
w.masked_fill_(mask, 0)
else:
raise ValueError('Expected input 2 <= dims <=4, got {}'.format(dim))
return w, mask
def sparsify_grad(g, mask, h=0.1, eps=1e-10):
'''grow connection by activate large gradient
Args:
g (torch.tensor): the gradient of weight
mask (torch.tensor): the mask of no activated weight
h (torch.tensor/float, optional): the weight for sparsification (default: 0.1)
:return: mask
'''
ga = g.abs()
nmask_f = (~mask).float()
dim = ga.dim()
if dim == 2:
hh = ga.mul(nmask_f).sum(1).div(nmask_f.sum(1).add(eps)).mul(h)
mask = (ga < hh.view(ga.size(0), 1)) & mask
elif dim == 3:
hh = ga.mul(nmask_f).sum(2).sum(1).div(nmask_f.sum(2).sum(1).add(eps)).mul(h)
mask = (ga < hh.view(ga.size(0), 1, 1)) & mask
elif dim == 4:
hh = ga.mul(nmask_f).sum(3).sum(2).sum(1).div(nmask_f.sum(3).sum(2).sum(1).add(eps)).mul(h)
mask = (ga < hh.view(ga.size(0), 1, 1, 1)) & mask
else:
raise ValueError('Expected dimension of input 2 <= dims <=4, got {}'.format(dim))
return mask
def sparsify_grad_ll(g, mask, h=0.1, eps=1e-8):
'''grow connection by activate large gradient
Args:
g (torch.tensor): the gradient of weight
mask (torch.tensor): the mask of no activated weight
h (torch.tensor/float, optional): the weight for sparsification (default: 0.1)
:return: output = input(input.abs()<h*input.abs().mean())=0
'''
ga = g.abs()
mask_f = mask.float()
nmask_f = 1 - mask_f
dim = ga.dim()
if dim >= 2 and dim <= 4:
hh = ga.mul(nmask_f).sum().div(nmask_f.sum().add(eps)).mul(h)
mask = (ga < hh) & mask
else:
raise ValueError('Expected input 2 <= dims <=4, got {}'.format(dim))
return mask
def orthogonalProjection(w, x):
# the projection of x orthogonal to the w
size_w = w.size()
size_x = x.size()
if size_w != size_x:
raise ValueError('Expected size of x should be same as w {}, got {}'.format(size_w, size_x))
dim = w.dim()
if dim == 2:
r = w.mul(x).sum(1)
p = x.sub(w.mul(r.view(size_w[0], 1)))
elif dim == 3:
r = w.mul(x).sum(2).sum(1)
elif dim == 4:
r = w.mul(x).sum(3).sum(2).sum(1)
else:
raise ValueError('Expected input 2 <= dims <=4, got {}'.format(dim))
return r
def get_weight(model):
'''
获得模型的权重列表
:param model:
:return:
'''
weight_list = []
for name, param in model.named_parameters():
if 'weight' in name:
weight = (name, param)
weight_list.append(weight)
return weight_list
def saveLists(lists, textname):
# save the lists to certain text
file = open(textname,'w')
for data in lists:
m = len(data)
for i, p in enumerate(data):
file.write(str(p))
if i<m-1:
file.write(',')
file.write('\n')
file.close()
| 31.022654
| 136
| 0.594617
| 1,574
| 9,586
| 3.533672
| 0.109911
| 0.01726
| 0.015282
| 0.023013
| 0.784969
| 0.761956
| 0.740921
| 0.718447
| 0.683747
| 0.659475
| 0
| 0.027576
| 0.254747
| 9,586
| 309
| 137
| 31.022654
| 0.75098
| 0.262362
| 0
| 0.489011
| 0
| 0
| 0.066412
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.082418
| false
| 0
| 0.038462
| 0.005495
| 0.197802
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
db355b01d37476d308095cc1fba3cb7c7b5af51d
| 129
|
py
|
Python
|
python/Temp/sandboxSubprocess.py
|
Schizo/MediaBrowser
|
a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0
|
[
"MIT"
] | 3
|
2016-01-19T10:36:09.000Z
|
2021-01-29T01:14:45.000Z
|
python/Temp/sandboxSubprocess.py
|
Schizo/MediaBrowser
|
a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0
|
[
"MIT"
] | 2
|
2016-02-20T13:09:38.000Z
|
2016-03-08T06:47:47.000Z
|
python/Temp/sandboxSubprocess.py
|
Schizo/MediaBrowser
|
a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0
|
[
"MIT"
] | 3
|
2016-02-19T16:52:57.000Z
|
2017-05-16T03:06:43.000Z
|
import subprocess
#subprocess.call("explorer C:\\temp\\yourpath", shell=True)
subprocess.Popen(r'explorer /select,"C:\\users\\"')
| 43
| 59
| 0.744186
| 17
| 129
| 5.647059
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.046512
| 129
| 3
| 60
| 43
| 0.780488
| 0.449612
| 0
| 0
| 0
| 0
| 0.422535
| 0.295775
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e1d22a6a24127e97bce5c5a907d0673c072e3e9a
| 111
|
py
|
Python
|
skplot/__init__.py
|
JohannesWiesner/skplot
|
b1aefd1747446028654519015237a35ee29c2457
|
[
"BSD-3-Clause"
] | null | null | null |
skplot/__init__.py
|
JohannesWiesner/skplot
|
b1aefd1747446028654519015237a35ee29c2457
|
[
"BSD-3-Clause"
] | null | null | null |
skplot/__init__.py
|
JohannesWiesner/skplot
|
b1aefd1747446028654519015237a35ee29c2457
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 25 14:05:46 2020
@author: jwiesner
"""
| 12.333333
| 35
| 0.603604
| 18
| 111
| 3.722222
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 0.18018
| 111
| 8
| 36
| 13.875
| 0.582418
| 0.882883
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e1d519ac2f549157cef8dba853dc6ee17774b292
| 133
|
py
|
Python
|
gcd_accelerator/part_7_web_page/gcd_accelerator/setup_sw_gcd.py
|
yohanes-erwin/handsonembedded
|
c621231c58ff0369e71382a7587c6c6189c562d0
|
[
"MIT"
] | 2
|
2020-02-22T10:15:09.000Z
|
2021-01-24T07:35:28.000Z
|
gcd_accelerator/part_8_web_server/gcd_accelerator/setup_sw_gcd.py
|
yohanes-erwin/handsonembedded
|
c621231c58ff0369e71382a7587c6c6189c562d0
|
[
"MIT"
] | null | null | null |
gcd_accelerator/part_8_web_server/gcd_accelerator/setup_sw_gcd.py
|
yohanes-erwin/handsonembedded
|
c621231c58ff0369e71382a7587c6c6189c562d0
|
[
"MIT"
] | null | null | null |
from distutils.core import setup, Extension
setup(name = 'swgcd', version = '1.0', ext_modules = [Extension('swgcd', ['sw_gcd.c'])])
| 44.333333
| 88
| 0.691729
| 19
| 133
| 4.736842
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016949
| 0.112782
| 133
| 2
| 89
| 66.5
| 0.745763
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e1e0c19f600fdd2e56d0805d0d97e128e9e3611b
| 834
|
py
|
Python
|
test/test_tools_projects_freshwall_bin_with_snippet.py
|
h4ck3rm1k3/pythoscope
|
0cefb34b86e2e81e29c0b93d27e3d4657db79912
|
[
"MIT"
] | null | null | null |
test/test_tools_projects_freshwall_bin_with_snippet.py
|
h4ck3rm1k3/pythoscope
|
0cefb34b86e2e81e29c0b93d27e3d4657db79912
|
[
"MIT"
] | null | null | null |
test/test_tools_projects_freshwall_bin_with_snippet.py
|
h4ck3rm1k3/pythoscope
|
0cefb34b86e2e81e29c0b93d27e3d4657db79912
|
[
"MIT"
] | null | null | null |
import unittest
class TestParseArgs(unittest.TestCase):
def test_parse_args(self):
# self.assertEqual(expected, parse_args(argv, parser))
assert False # TODO: implement your test here
class TestRunPrefsGui(unittest.TestCase):
def test_run_prefs_gui(self):
# self.assertEqual(expected, run_prefs_gui(prefs))
assert False # TODO: implement your test here
class TestRunDaemon(unittest.TestCase):
def test_run_daemon(self):
# self.assertEqual(expected, run_daemon(prefs, period, spread, detach))
assert False # TODO: implement your test here
class TestExitDaemon(unittest.TestCase):
def test_exit_daemon(self):
# self.assertEqual(expected, exit_daemon())
assert False # TODO: implement your test here
if __name__ == '__main__':
unittest.main()
| 32.076923
| 79
| 0.711031
| 100
| 834
| 5.71
| 0.34
| 0.112084
| 0.1331
| 0.161121
| 0.542907
| 0.278459
| 0.278459
| 0.215412
| 0
| 0
| 0
| 0
| 0.197842
| 834
| 25
| 80
| 33.36
| 0.853513
| 0.404077
| 0
| 0.266667
| 0
| 0
| 0.016393
| 0
| 0
| 0
| 0
| 0.04
| 0.266667
| 1
| 0.266667
| false
| 0
| 0.066667
| 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
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
e1f03c0c1476762dc5f645a946171fa7b7338aa3
| 72
|
py
|
Python
|
astutor_flask/astutor/__init__.py
|
cfodonnell/Insight_Project_Framework
|
034fe3477c4a1120fde17804d189c3d21d8e0102
|
[
"MIT"
] | null | null | null |
astutor_flask/astutor/__init__.py
|
cfodonnell/Insight_Project_Framework
|
034fe3477c4a1120fde17804d189c3d21d8e0102
|
[
"MIT"
] | null | null | null |
astutor_flask/astutor/__init__.py
|
cfodonnell/Insight_Project_Framework
|
034fe3477c4a1120fde17804d189c3d21d8e0102
|
[
"MIT"
] | null | null | null |
from flask import Flask
app = Flask(__name__)
from astutor import views
| 18
| 25
| 0.805556
| 11
| 72
| 4.909091
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152778
| 72
| 3
| 26
| 24
| 0.885246
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.