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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
db249be3f893ded1bda4712cddefdef18c11570b
| 217
|
py
|
Python
|
modules/adapters/adapter/__init__.py
|
timfjord/sublime_debugger
|
3dae233f307264d103e687fb641275c38889d814
|
[
"MIT"
] | 225
|
2019-07-18T17:32:46.000Z
|
2022-03-20T02:21:03.000Z
|
modules/adapters/adapter/__init__.py
|
timfjord/sublime_debugger
|
3dae233f307264d103e687fb641275c38889d814
|
[
"MIT"
] | 134
|
2019-07-23T01:07:58.000Z
|
2022-03-31T15:37:08.000Z
|
modules/adapters/adapter/__init__.py
|
timfjord/sublime_debugger
|
3dae233f307264d103e687fb641275c38889d814
|
[
"MIT"
] | 39
|
2019-07-27T05:41:38.000Z
|
2022-03-28T04:39:06.000Z
|
from ...dap import AdapterConfiguration
from .transports import SocketTransport, StdioTransport, Process
from .dependencies import get_and_warn_require_node
from .import git
from .import openvsx
from .import vscode
| 24.111111
| 64
| 0.83871
| 27
| 217
| 6.592593
| 0.62963
| 0.168539
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115207
| 217
| 8
| 65
| 27.125
| 0.927083
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
e1f42a679d750432387c0e456d07bc56673835a7
| 87
|
py
|
Python
|
vlab_vlan/lib/views/__init__.py
|
willnx/vlab_vlan
|
9bb2617226e189c6787c72b3611837c0be9dc8cc
|
[
"Apache-2.0"
] | 1
|
2019-04-10T16:17:22.000Z
|
2019-04-10T16:17:22.000Z
|
vlab_vlan/lib/views/__init__.py
|
willnx/vlab_vlan
|
9bb2617226e189c6787c72b3611837c0be9dc8cc
|
[
"Apache-2.0"
] | 1
|
2019-01-04T16:53:14.000Z
|
2019-01-04T16:53:14.000Z
|
vlab_vlan/lib/views/__init__.py
|
willnx/vlab_vlan
|
9bb2617226e189c6787c72b3611837c0be9dc8cc
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: UTF-8 -*-
from .vlan import VlanView
from .healthcheck import HealthView
| 21.75
| 35
| 0.724138
| 11
| 87
| 5.727273
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013514
| 0.149425
| 87
| 3
| 36
| 29
| 0.837838
| 0.241379
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c00c2759ec2062b92fa6737bf819172d34051b9f
| 56
|
py
|
Python
|
ostinato/contentfilters/__init__.py
|
andrewebdev/django-ostinato
|
2c435dea23319be6e9011e7381afca2b4092b5a2
|
[
"MIT"
] | 5
|
2015-01-28T09:56:48.000Z
|
2020-05-22T21:07:30.000Z
|
ostinato/contentfilters/__init__.py
|
andrewebdev/django-ostinato
|
2c435dea23319be6e9011e7381afca2b4092b5a2
|
[
"MIT"
] | 18
|
2015-02-03T15:37:22.000Z
|
2020-06-05T16:41:15.000Z
|
ostinato/contentfilters/__init__.py
|
andrewebdev/django-ostinato
|
2c435dea23319be6e9011e7381afca2b4092b5a2
|
[
"MIT"
] | 2
|
2015-02-23T19:34:59.000Z
|
2017-01-22T02:10:12.000Z
|
from templatetags.content_filters import ContentFilter
| 18.666667
| 54
| 0.892857
| 6
| 56
| 8.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089286
| 56
| 2
| 55
| 28
| 0.960784
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2207f7c6a6f9b08aa3243b0de9ddcbc819bc5257
| 94
|
py
|
Python
|
utils/__init__.py
|
JasonZuu/Frame-Selection
|
3eb6ecdbf8e5695ba53752bdd8446def9c5cfbb9
|
[
"BSD-3-Clause"
] | 1
|
2022-03-29T03:11:24.000Z
|
2022-03-29T03:11:24.000Z
|
utils/__init__.py
|
JasonZuu/Frame-Selection
|
3eb6ecdbf8e5695ba53752bdd8446def9c5cfbb9
|
[
"BSD-3-Clause"
] | null | null | null |
utils/__init__.py
|
JasonZuu/Frame-Selection
|
3eb6ecdbf8e5695ba53752bdd8446def9c5cfbb9
|
[
"BSD-3-Clause"
] | null | null | null |
from .transforms import Transforms
from .normalize import norm
from .faces import PullFaceTool
| 31.333333
| 34
| 0.851064
| 12
| 94
| 6.666667
| 0.583333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117021
| 94
| 3
| 35
| 31.333333
| 0.963855
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2240ef05a9c95d91b17179245920ff7047383fc9
| 44
|
py
|
Python
|
Scripts/dk/point.py
|
hhg128/DKGL
|
c61bc6546ac5655da97462cc532a9034ba08516d
|
[
"PSF-2.0",
"BSD-3-Clause"
] | 14
|
2015-09-12T01:32:05.000Z
|
2021-10-13T02:52:53.000Z
|
Scripts/dk/point.py
|
hhg128/DKGL
|
c61bc6546ac5655da97462cc532a9034ba08516d
|
[
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null |
Scripts/dk/point.py
|
hhg128/DKGL
|
c61bc6546ac5655da97462cc532a9034ba08516d
|
[
"PSF-2.0",
"BSD-3-Clause"
] | 3
|
2015-11-10T03:12:49.000Z
|
2018-10-15T15:38:31.000Z
|
import _dk_core as core
Point = core.Point
| 11
| 23
| 0.772727
| 8
| 44
| 4
| 0.625
| 0.5625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 44
| 3
| 24
| 14.666667
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 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
| 5
|
226b3faad882436e446fb4e55204994e21bf1df6
| 4,114
|
py
|
Python
|
day_9.py
|
kurtrm/advent_of_code_2018
|
a3db9df31de730479c8c2b3f2869b274a0e024e9
|
[
"MIT"
] | null | null | null |
day_9.py
|
kurtrm/advent_of_code_2018
|
a3db9df31de730479c8c2b3f2869b274a0e024e9
|
[
"MIT"
] | null | null | null |
day_9.py
|
kurtrm/advent_of_code_2018
|
a3db9df31de730479c8c2b3f2869b274a0e024e9
|
[
"MIT"
] | null | null | null |
"""
"""
from itertools import cycle
from collections import defaultdict
# if __name__ == '__main__':
"""
466 players; last marble is worth 71436
"""
# import sys
# i = 3
# idx = 1
# players = cycle(range(1, int(sys.argv[1])+1))
# next(players)
# next(players)
# listy = [0, 2, 1]
# scores = defaultdict(int)
# while i < (int(sys.argv[2])+1):
# curr_player = next(players)
# next_idx = idx + 2
# if i % 23 == 0:
# scores[curr_player] += i
# back_idx = idx - 7
# if back_idx < 0:
# back_idx = len(listy) + back_idx
# back_marble = listy.pop(back_idx)
# scores[curr_player] += back_marble
# idx = back_idx
# elif next_idx == len(listy):
# listy.append(i)
# idx = next_idx # [0, 2, 1, 3]
# elif next_idx > len(listy):
# idx = 1
# listy.insert(idx, i)
# else:
# listy.insert(next_idx, i)
# idx = next_idx
# i += 1
# print(max(scores.items(), key=lambda x: x[1])[1])
# import sys
# def scores():
# i = 3
# idx = 1
# players = cycle(range(1, 467))
# next(players)
# next(players)
# listy = [0, 2, 1]
# scores = defaultdict(int)
# top_scores = []
# while i < 71437:
# curr_player = next(players)
# next_idx = idx + 2
# if i % 23 == 0:
# scores[curr_player] += i
# back_idx = idx - 7
# if back_idx < 0:
# back_idx = len(listy) + back_idx
# back_marble = listy.pop(back_idx)
# scores[curr_player] += back_marble
# idx = back_idx
# elif next_idx == len(listy):
# listy.append(i)
# idx = next_idx # [0, 2, 1, 3]
# elif next_idx > len(listy):
# idx = 1
# listy.insert(idx, i)
# else:
# listy.insert(next_idx, i)
# idx = next_idx
# i += 1
# if i > 23:
# top_scores.append((i, max(scores.items(), key=lambda x: x[1])[1]))
# return top_scores
# def mod_scores():
# i = 3
# idx = 1
# players = cycle(range(1, 467))
# next(players)
# next(players)
# listy = [0, 2, 1]
# scores = defaultdict(int)
# top_scores = []
# while i < 71437:
# curr_player = next(players)
# next_idx = idx + 2
# if i % 23 == 0:
# scores[curr_player] += i
# back_idx = idx - 7
# if back_idx < 0:
# back_idx = len(listy) + back_idx
# back_marble = listy.pop(back_idx)
# scores[curr_player] += back_marble
# idx = back_idx
# elif next_idx == len(listy):
# listy.append(i)
# idx = next_idx # [0, 2, 1, 3]
# elif next_idx > len(listy):
# idx = 1
# listy.insert(idx, i)
# else:
# listy.insert(next_idx, i)
# idx = next_idx
# i += 1
# if i > 23:
# try:
# top_scores.append(scores[94])
# except IndexError:
# top_scores.append(0)
# return top_scores
class Node:
"""
"""
def __init__(self, value):
self.value = value
self.left = None
self.right = None
if __name__ == '__main__':
"""
466 players; last marble is worth 71436
"""
import sys
i = 3
idx = 1
# players = cycle(range(1, int(sys.argv[1])+1))
node = Node(0)
node.right = Node(2)
node.right.right = Node(1)
node.right.left = node
node.right.right.left = node.right
node.left = node.right.right
curr_node = node
for _ in range(3):
print(curr_node.value)
curr_node = curr_node.right
curr_node = node
for _ in range(3):
print(curr_node.value)
curr_node = curr_node.left
| 28.569444
| 81
| 0.464268
| 497
| 4,114
| 3.663984
| 0.134809
| 0.069193
| 0.054366
| 0.046129
| 0.795717
| 0.795717
| 0.795717
| 0.795717
| 0.795717
| 0.766063
| 0
| 0.04551
| 0.407146
| 4,114
| 143
| 82
| 28.769231
| 0.701107
| 0.693486
| 0
| 0.24
| 0
| 0
| 0.008969
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.04
| false
| 0
| 0.12
| 0
| 0.2
| 0.08
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
22778d2684755b5274c931b4ce1b8607a579c3e8
| 270
|
py
|
Python
|
app/apirest/apirest.py
|
Phyton-es-mi-typo/tyempo
|
a7f98a3f84d4fca6e80ccdbfd86060204a32f31c
|
[
"MIT"
] | null | null | null |
app/apirest/apirest.py
|
Phyton-es-mi-typo/tyempo
|
a7f98a3f84d4fca6e80ccdbfd86060204a32f31c
|
[
"MIT"
] | 28
|
2021-02-27T17:10:28.000Z
|
2021-03-18T11:18:05.000Z
|
app/apirest/apirest.py
|
Phyton-es-mi-typo/tyempo
|
a7f98a3f84d4fca6e80ccdbfd86060204a32f31c
|
[
"MIT"
] | 1
|
2021-02-22T16:04:41.000Z
|
2021-02-22T16:04:41.000Z
|
from fastapi import FastAPI
from .notion.routes import router as notion
from .weather.routes import router as weather
app = FastAPI(title='Tyempo')
app.include_router(notion)
app.include_router(weather)
@app.get('/')
def hello_world():
return {'hello': 'world'}
| 19.285714
| 45
| 0.748148
| 38
| 270
| 5.236842
| 0.447368
| 0.120603
| 0.180905
| 0.201005
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12963
| 270
| 13
| 46
| 20.769231
| 0.846809
| 0
| 0
| 0
| 0
| 0
| 0.062963
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0
| 0.333333
| 0.111111
| 0.555556
| 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
| 1
| 1
| 0
|
0
| 5
|
227c5caa80b08da76360362aaa3e4582b8dc1523
| 247
|
py
|
Python
|
pynars/NAL/Functions/__init__.py
|
AIxer/PyNARS
|
443b6a5e1c9779a1b861df1ca51ce5a190998d2e
|
[
"MIT"
] | null | null | null |
pynars/NAL/Functions/__init__.py
|
AIxer/PyNARS
|
443b6a5e1c9779a1b861df1ca51ce5a190998d2e
|
[
"MIT"
] | null | null | null |
pynars/NAL/Functions/__init__.py
|
AIxer/PyNARS
|
443b6a5e1c9779a1b861df1ca51ce5a190998d2e
|
[
"MIT"
] | null | null | null |
from .ExtendedBooleanFunctions import *
from .TruthValueFunctions import *
from .UncertaintyMappingFunctions import *
from .BudgetFunctions import *
from .TemporalFunctions import *
from .StampFunctions import *
from .DesireValueFunctions import *
| 35.285714
| 42
| 0.834008
| 21
| 247
| 9.809524
| 0.428571
| 0.291262
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109312
| 247
| 7
| 43
| 35.285714
| 0.936364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
97f2368f804b71ac5351862d7c02d6637078cc76
| 140
|
py
|
Python
|
plans/admin.py
|
skupriienko/nickfitness
|
3104ce0a61760222015ca55e6087591fcdfb6b71
|
[
"MIT"
] | null | null | null |
plans/admin.py
|
skupriienko/nickfitness
|
3104ce0a61760222015ca55e6087591fcdfb6b71
|
[
"MIT"
] | null | null | null |
plans/admin.py
|
skupriienko/nickfitness
|
3104ce0a61760222015ca55e6087591fcdfb6b71
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import FitnessPlan, Customer
admin.site.register(FitnessPlan)
admin.site.register(Customer)
| 20
| 41
| 0.828571
| 18
| 140
| 6.444444
| 0.555556
| 0.155172
| 0.293103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092857
| 140
| 6
| 42
| 23.333333
| 0.913386
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
3f3658dd323b8b0c2ea411e776fe5708e57f9b45
| 152
|
py
|
Python
|
src/python/binary/binary/__init__.py
|
anglofox/bazel-pex-rule
|
a08606baf573a6f14e0a5eb858377a6474df92cb
|
[
"Apache-2.0"
] | 1
|
2021-05-10T22:14:23.000Z
|
2021-05-10T22:14:23.000Z
|
src/python/binary/binary/__init__.py
|
anglofox/bazel-pex-rule
|
a08606baf573a6f14e0a5eb858377a6474df92cb
|
[
"Apache-2.0"
] | null | null | null |
src/python/binary/binary/__init__.py
|
anglofox/bazel-pex-rule
|
a08606baf573a6f14e0a5eb858377a6474df92cb
|
[
"Apache-2.0"
] | null | null | null |
from library import Library
class Binary:
def __init__(self):
self._lib = Library()
def value(self):
return self._lib.output
| 15.2
| 31
| 0.638158
| 19
| 152
| 4.789474
| 0.631579
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.276316
| 152
| 9
| 32
| 16.888889
| 0.827273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0.166667
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
58c0e06ad60cfdf592dd16e8a82644f296f61581
| 103
|
py
|
Python
|
examples/3-foreach/2-1-set.py
|
muzi131313/pythonLearn
|
705ae6e3e4e1480e4ac541efc9c4065e08befc7b
|
[
"MIT"
] | null | null | null |
examples/3-foreach/2-1-set.py
|
muzi131313/pythonLearn
|
705ae6e3e4e1480e4ac541efc9c4065e08befc7b
|
[
"MIT"
] | null | null | null |
examples/3-foreach/2-1-set.py
|
muzi131313/pythonLearn
|
705ae6e3e4e1480e4ac541efc9c4065e08befc7b
|
[
"MIT"
] | null | null | null |
# set: https://eastlakeside.gitbooks.io/interpy-zh/content/set_data_structure/set_data_structure.html
| 34.333333
| 101
| 0.834951
| 15
| 103
| 5.466667
| 0.733333
| 0.170732
| 0.390244
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038835
| 103
| 2
| 102
| 51.5
| 0.828283
| 0.961165
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
58c3d3c4195953772ab3e8de1d395f2b998c2c9b
| 1,896
|
py
|
Python
|
ltc/base/utils/confluence/helpers.py
|
v0devil/jltom
|
b302a39a187b8e1154c6deda636a4db8b30bb40b
|
[
"MIT"
] | 4
|
2016-12-30T13:26:59.000Z
|
2017-04-26T12:07:36.000Z
|
ltc/base/utils/confluence/helpers.py
|
v0devil/jltom
|
b302a39a187b8e1154c6deda636a4db8b30bb40b
|
[
"MIT"
] | null | null | null |
ltc/base/utils/confluence/helpers.py
|
v0devil/jltom
|
b302a39a187b8e1154c6deda636a4db8b30bb40b
|
[
"MIT"
] | null | null | null |
def generate_confluence_graph(
project, data, type='bar', x_axis='name',
exclude_metrics=['started_at'],
):
exclude_metrics.append(x_axis)
metric_names = []
for k in data[0]:
if k not in exclude_metrics:
metric_names.append(k)
html = ""
html += '''
<ac:structured-macro ac:macro-id="f16ff7f1-2469-49cb-ad18-d9ed551fe985" ac:name="chart" ac:schema-version="1">
<ac:parameter ac:name="subTitle">Aggregate average/median response times</ac:parameter>
<ac:parameter ac:name="xtitle">display_name</ac:parameter>
<ac:parameter ac:name="aggregation">average,median</ac:parameter>
<ac:parameter ac:name="type">{0}</ac:parameter>
<ac:parameter ac:name="width">1200</ac:parameter>
<ac:parameter ac:name="height">300</ac:parameter>
<ac:parameter ac:name="column">display_name</ac:parameter>
<ac:parameter ac:name="pieKeys">display_name</ac:parameter>
<ac:parameter ac:name="minvalue">0</ac:parameter>
<ac:parameter ac:name="yLabel">response times (ms)</ac:parameter>
<ac:parameter ac:name="xLabel">release name</ac:parameter>
<ac:parameter ac:name="categoryLabelPosition">up90</ac:parameter>
<ac:rich-text-body>
<table class="wrapped">
<colgroup>
<col/>
<col/>
</colgroup>
<tbody>
<tr>
<th></th>
'''.format(type)
for row in reversed(data):
html += "<th>{0}</th>".format(row['name'])
html += "</tr>"
for metric_name in metric_names:
html += "<tr>"
html += "<td>{0}</td>".format(metric_name)
for row in reversed(data):
html += "<td>{0}</td>".format(row[metric_name])
html += "</tr>"
html += '''
</tbody>
</table>
</ac:rich-text-body>
</ac:structured-macro>
'''
return html
| 37.176471
| 118
| 0.58597
| 237
| 1,896
| 4.616034
| 0.324895
| 0.241316
| 0.285192
| 0.186472
| 0.384826
| 0.36106
| 0.189214
| 0.106947
| 0
| 0
| 0
| 0.024188
| 0.236814
| 1,896
| 50
| 119
| 37.92
| 0.731859
| 0
| 0
| 0.16
| 1
| 0.04
| 0.678797
| 0.28692
| 0
| 0
| 0
| 0
| 0
| 1
| 0.02
| false
| 0
| 0
| 0
| 0.04
| 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
| 1
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
58c671f5b2080c1748e95ac87ce72ccd2535a4c7
| 1,027
|
py
|
Python
|
test/test_input_cons3rt_template_data_for_binding.py
|
cons3rt/cons3rt-python-sdk
|
f0bcb295735ac55bbe47448fcbd95d2c7beb3ec0
|
[
"RSA-MD"
] | null | null | null |
test/test_input_cons3rt_template_data_for_binding.py
|
cons3rt/cons3rt-python-sdk
|
f0bcb295735ac55bbe47448fcbd95d2c7beb3ec0
|
[
"RSA-MD"
] | null | null | null |
test/test_input_cons3rt_template_data_for_binding.py
|
cons3rt/cons3rt-python-sdk
|
f0bcb295735ac55bbe47448fcbd95d2c7beb3ec0
|
[
"RSA-MD"
] | null | null | null |
# coding: utf-8
"""
CONS3RT Web API
A CONS3RT ReSTful API # noqa: E501
The version of the OpenAPI document: 1.0.0
Contact: Fred@gigagantic-server.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import cons3rt
from cons3rt.models.input_cons3rt_template_data_for_binding import InputCons3rtTemplateDataForBinding # noqa: E501
from cons3rt.rest import ApiException
class TestInputCons3rtTemplateDataForBinding(unittest.TestCase):
"""InputCons3rtTemplateDataForBinding unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testInputCons3rtTemplateDataForBinding(self):
"""Test InputCons3rtTemplateDataForBinding"""
# FIXME: construct object with mandatory attributes with example values
# model = cons3rt.models.input_cons3rt_template_data_for_binding.InputCons3rtTemplateDataForBinding() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()
| 25.04878
| 123
| 0.743914
| 107
| 1,027
| 6.925234
| 0.598131
| 0.032389
| 0.048583
| 0.067476
| 0.126856
| 0.126856
| 0.126856
| 0.126856
| 0
| 0
| 0
| 0.032258
| 0.185005
| 1,027
| 40
| 124
| 25.675
| 0.853047
| 0.46446
| 0
| 0.214286
| 1
| 0
| 0.015748
| 0
| 0
| 0
| 0
| 0.025
| 0
| 1
| 0.214286
| false
| 0.214286
| 0.357143
| 0
| 0.642857
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
450a1eb848670630a5e03222ba1663ba362bbf37
| 196
|
py
|
Python
|
Robomak - Sphero/Final Solution/sphero/connection/exceptions/__init__.py
|
dimitrov9/my-projects
|
dfd6b38b24a1faf179517e74e8b466962fe342c7
|
[
"MIT"
] | null | null | null |
Robomak - Sphero/Final Solution/sphero/connection/exceptions/__init__.py
|
dimitrov9/my-projects
|
dfd6b38b24a1faf179517e74e8b466962fe342c7
|
[
"MIT"
] | null | null | null |
Robomak - Sphero/Final Solution/sphero/connection/exceptions/__init__.py
|
dimitrov9/my-projects
|
dfd6b38b24a1faf179517e74e8b466962fe342c7
|
[
"MIT"
] | null | null | null |
from sphero.connection.exceptions.connectionfailed import ConnectionFailed
from sphero.connection.exceptions.connectionlost import ConnectionLost
__all__ = ['ConnectionFailed', 'ConnectionLost']
| 39.2
| 74
| 0.862245
| 17
| 196
| 9.705882
| 0.470588
| 0.121212
| 0.242424
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066327
| 196
| 4
| 75
| 49
| 0.901639
| 0
| 0
| 0
| 0
| 0
| 0.153061
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
4533043e57d7fe0adf8e653f8643bfc30d02d550
| 1,377
|
py
|
Python
|
quspin/tools/__init__.py
|
Alehud/QuSpin
|
c72d5fb2b2e9cd9a37d6917bba0337faf3b6c201
|
[
"BSD-3-Clause"
] | 195
|
2016-10-24T18:05:31.000Z
|
2022-03-29T10:11:56.000Z
|
quspin/tools/__init__.py
|
markusschmitt/QuSpin
|
c239d01e6ce76253b03440cda3c8819a9f63e288
|
[
"BSD-3-Clause"
] | 303
|
2016-10-25T20:08:11.000Z
|
2022-03-31T16:52:09.000Z
|
quspin/tools/__init__.py
|
markusschmitt/QuSpin
|
c239d01e6ce76253b03440cda3c8819a9f63e288
|
[
"BSD-3-Clause"
] | 54
|
2017-01-03T18:47:52.000Z
|
2022-03-16T06:54:33.000Z
|
"""
==================================
Tools module (:mod:`quspin.tools`)
==================================
.. currentmodule:: quspin.tools
Classes and functions to manipulate quantum states and do calculations.
evolution
----------
.. currentmodule:: quspin.tools.evolution
.. autosummary::
:toctree: generated/
ED_state_vs_time
evolve
expm_multiply_parallel
Lanczos
-------
.. currentmodule:: quspin.tools.lanczos
.. autosummary::
:toctree: generated/
lanczos_full
lanczos_iter
expm_lanczos
lin_comb_Q_T
LTLM_static_iteration
FTLM_static_iteration
Floquet
--------
.. currentmodule:: quspin.tools.Floquet
.. autosummary::
:toctree: generated/
Floquet
Floquet_t_vec
measurements
-------------
.. currentmodule:: quspin.tools.measurements
.. autosummary::
:toctree: generated/
ent_entropy
diag_ensemble
obs_vs_time
block_tools
------------
.. currentmodule:: quspin.tools.block_tools
.. autosummary::
:toctree: generated/
block_ops
block_diag_hamiltonian
misc
----
.. currentmodule:: quspin.tools.misc
.. autosummary::
:toctree: generated/
matvec
get_matvec_function
mean_level_spacing
project_op
KL_div
csr_matvec
"""
from . import evolution
from . import Floquet
from . import measurements
from . import block_tools
from . import misc
from . import lanczos
| 14.967391
| 71
| 0.664488
| 140
| 1,377
| 6.292857
| 0.442857
| 0.099886
| 0.190692
| 0.065834
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172113
| 1,377
| 91
| 72
| 15.131868
| 0.772807
| 0.891068
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
188a248fc1a8d3a9e67d0e79abe7b5945a5f7d74
| 47
|
py
|
Python
|
tf_core/nltoolkit/views.py
|
xflows/tf_core
|
0b8ce80e6d8e38dcec17ec4c2f2100ba30e183fa
|
[
"MIT"
] | 1
|
2017-02-21T13:52:22.000Z
|
2017-02-21T13:52:22.000Z
|
tf_core/nltoolkit/views.py
|
xflows/tf_core
|
0b8ce80e6d8e38dcec17ec4c2f2100ba30e183fa
|
[
"MIT"
] | 10
|
2019-12-08T18:57:32.000Z
|
2021-12-13T20:39:31.000Z
|
tf_core/nltoolkit/views.py
|
xflows/tf_core
|
0b8ce80e6d8e38dcec17ec4c2f2100ba30e183fa
|
[
"MIT"
] | 1
|
2017-03-17T04:13:59.000Z
|
2017-03-17T04:13:59.000Z
|
#view are implemented in visualization_views.py
| 47
| 47
| 0.87234
| 7
| 47
| 5.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085106
| 47
| 1
| 47
| 47
| 0.930233
| 0.978723
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
18bba66f49068e39387682a5f8ae046c295f3b6a
| 14,746
|
py
|
Python
|
maxfw/tests/test_image_utils.py
|
MillerMedia/MAX-Framework
|
220c52681a6c85672290b4698228399326233b15
|
[
"Apache-2.0"
] | 24
|
2018-12-04T19:47:09.000Z
|
2021-07-30T07:36:01.000Z
|
maxfw/tests/test_image_utils.py
|
MillerMedia/MAX-Framework
|
220c52681a6c85672290b4698228399326233b15
|
[
"Apache-2.0"
] | 26
|
2018-12-06T12:55:54.000Z
|
2021-04-01T19:58:31.000Z
|
maxfw/tests/test_image_utils.py
|
MillerMedia/MAX-Framework
|
220c52681a6c85672290b4698228399326233b15
|
[
"Apache-2.0"
] | 18
|
2018-12-04T11:20:13.000Z
|
2021-06-06T02:30:53.000Z
|
#
# Copyright 2018-2019 IBM Corp. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Standard libs
import io
# Dependencies
import nose
import numpy as np
from PIL import Image
# The module to test
from maxfw.utils.image_utils import ImageProcessor, ToPILImage, Resize, Grayscale, Normalize, Standardize, Rotate, \
PILtoarray
from maxfw.core.utils import MAXImageProcessor
# Initialize a test input file
stream = io.BytesIO()
Image.open('maxfw/tests/test_image.jpg').convert('RGBA').save(stream, 'PNG')
test_input = stream.getvalue()
def test_imageprocessor_read():
"""Test the Imageprocessor."""
# Test with 4 channels
transform_sequence = [ToPILImage('RGBA')]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.array(img_out).shape == (678, 1024, 4)
# Test with 3 channels
transform_sequence = [ToPILImage('RGB')]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.array(img_out).shape == (678, 1024, 3)
# Test the values of the image
transform_sequence = [ToPILImage('RGBA'), PILtoarray()]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.min(img_out) >= 0
assert np.max(img_out) <= 255
# Test the values of the image
transform_sequence = [ToPILImage('L'), PILtoarray()]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.min(img_out) >= 0
assert np.max(img_out) <= 255
def test_imageprocessor_resize():
"""Test the Imageprocessor's resize function."""
# Resize to 200x200
transform_sequence = [ToPILImage('RGBA'), Resize(size=(200, 200))]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.array(img_out).shape == (200, 200, 4)
# Resize to 2000x2000
transform_sequence = [ToPILImage('RGBA'), Resize(size=(2000, 2000))]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.array(img_out).shape == (2000, 2000, 4)
def test_imageprocessor_grayscale():
"""Test the Imageprocessor's grayscale function."""
# Using the standard 1 output channel
transform_sequence = [ToPILImage('RGBA'), Resize(size=(200, 200)), Grayscale()]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.array(img_out).shape == (200, 200)
# Using 3 output channels
transform_sequence = [ToPILImage('RGBA'), Resize(size=(200, 200)), Grayscale(num_output_channels=3)]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.array(img_out).shape == (200, 200, 3)
# Using 4 output channels
transform_sequence = [ToPILImage('RGBA'), Resize(size=(200, 200)), Grayscale(num_output_channels=4), PILtoarray()]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert img_out.shape == (200, 200, 4)
# Test that the values in all 4 output channels are identical
assert img_out[..., 0].all() == img_out[..., 1].all() == img_out[..., 2].all() == img_out[..., 3].all()
def test_imageprocessor_normalize():
"""Test the Imageprocessor's normalize function."""
# Test normalize
transform_sequence = [ToPILImage('RGBA'), Normalize()]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.max(img_out) <= 1 and np.min(img_out) >= 0
# Test normalize
transform_sequence = [ToPILImage('RGB'), Normalize()]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.max(img_out) <= 1 and np.min(img_out) >= 0
# Test normalize
transform_sequence = [ToPILImage('L'), Normalize()]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.max(img_out) <= 1 and np.min(img_out) >= 0
# Test for wrong use
transform_sequence = [ToPILImage('L'), Normalize(), Resize(size=(200, 200))]
p = ImageProcessor(transform_sequence)
with nose.tools.assert_raises(Exception):
p.apply_transforms(test_input)
# Test for wrong use
transform_sequence = [ToPILImage('RGBA'), Normalize(), Normalize()]
p = ImageProcessor(transform_sequence)
with nose.tools.assert_raises(Exception):
p.apply_transforms(test_input)
def test_imageprocessor_standardize():
"""Test the Imageprocessor's standardize function."""
# Test standardize (RGBA)
# The `A` channel cannot be standardized, and will therefore prompt an error message when attempted.
transform_sequence = [ToPILImage('RGBA'), Standardize()]
with nose.tools.assert_raises_regexp(ValueError, r".*must be converted to an image with 3 or fewer channels*"):
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize (RGB)
transform_sequence = [ToPILImage('RGB'), Standardize()]
p = ImageProcessor(transform_sequence)
img_out = np.array(p.apply_transforms(test_input))
nose.tools.assert_almost_equal(np.std(img_out), 1)
nose.tools.assert_almost_equal(np.mean(img_out), 0)
# Test standardize (RGB) - check whether the mean centering works
transform_sequence = [ToPILImage('RGB'), Standardize(std=0)]
p = ImageProcessor(transform_sequence)
img_out = np.array(p.apply_transforms(test_input))
nose.tools.assert_almost_equal(np.mean(img_out), 0)
# Test standardize (RGB) - check whether the std division works
transform_sequence = [ToPILImage('RGB'), Standardize(mean=0)]
p = ImageProcessor(transform_sequence)
img_out = np.array(p.apply_transforms(test_input))
nose.tools.assert_almost_equal(np.std(img_out[..., 0]), 1)
nose.tools.assert_almost_equal(np.std(img_out[..., 1]), 1)
nose.tools.assert_almost_equal(np.std(img_out[..., 2]), 1)
# generate an image array
pil_img = ImageProcessor([ToPILImage('RGB'), PILtoarray()]).apply_transforms(test_input)
# Test standardize (RGB) with 3 channel-wise values
transform_sequence = [ToPILImage('RGB'), Standardize(mean=[x for x in np.mean(pil_img, axis=(0, 1))],
std=[x for x in np.std(pil_img, axis=(0, 1))])]
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize (RGB) with 3 channel-wise values for the mean
transform_sequence = [ToPILImage('RGB'), Standardize(mean=[x for x in np.mean(pil_img, axis=(0, 1))])]
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize (RGB) with 3 channel-wise values for the std
transform_sequence = [ToPILImage('RGB'), Standardize(std=[x for x in np.std(pil_img, axis=(0, 1))])]
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize (RGB)
transform_sequence = [ToPILImage('RGB'), Standardize(mean=np.mean(pil_img))]
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize (RGB)
transform_sequence = [ToPILImage('RGB'), Standardize(mean=np.mean(pil_img), std=np.std(pil_img))]
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize (RGB)
transform_sequence = [ToPILImage('RGB'), Standardize(std=np.std(pil_img))]
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize (RGB)
transform_sequence = [ToPILImage('RGB'), Standardize(mean=127, std=5)]
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize error (RGB)
transform_sequence = [ToPILImage('RGB'), Standardize(mean=[127, 127], std=5)]
with nose.tools.assert_raises_regexp(ValueError, r".*must correspond to the number of channels.*"):
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize error (RGB)
transform_sequence = [ToPILImage('RGB'), Standardize(std=[5, 5, 5, 5])]
with nose.tools.assert_raises_regexp(ValueError, r".*must correspond to the number of channels.*"):
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize (L)
transform_sequence = [ToPILImage('L'), Standardize()]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
nose.tools.assert_almost_equal(np.std(img_out), 1)
# Test standardize (L)
transform_sequence = [ToPILImage('L'), Standardize(mean=np.mean(pil_img))]
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize (L)
transform_sequence = [ToPILImage('L'), Standardize(mean=np.mean(pil_img), std=np.std(pil_img))]
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize (L)
transform_sequence = [ToPILImage('L'), Standardize(std=np.std(pil_img))]
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize (L)
transform_sequence = [ToPILImage('L'), Standardize(mean=127, std=5)]
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize (L) - check whether the mean centering works
transform_sequence = [ToPILImage('L'), Standardize(std=0)]
p = ImageProcessor(transform_sequence)
img_out = np.array(p.apply_transforms(test_input))
nose.tools.assert_almost_equal(np.mean(img_out), 0)
# Test standardize (L) - check whether the std division works
transform_sequence = [ToPILImage('L'), Standardize(mean=0)]
p = ImageProcessor(transform_sequence)
img_out = np.array(p.apply_transforms(test_input))
nose.tools.assert_almost_equal(np.std(img_out), 1)
# Test standardize error (L)
transform_sequence = [ToPILImage('L'), Standardize(mean=[127, 127], std=5)]
with nose.tools.assert_raises(ValueError):
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test standardize error (L)
transform_sequence = [ToPILImage('L'), Standardize(std=[5, 5, 5, 5])]
with nose.tools.assert_raises(ValueError):
ImageProcessor(transform_sequence).apply_transforms(test_input)
# Test for wrong use (L)
transform_sequence = [ToPILImage('L'), Standardize(), Resize(size=(200, 200))]
p = ImageProcessor(transform_sequence)
with nose.tools.assert_raises(Exception):
p.apply_transforms(test_input)
# Test for wrong use (RGBA)
transform_sequence = [ToPILImage('RGBA'), Standardize(), Standardize()]
p = ImageProcessor(transform_sequence)
with nose.tools.assert_raises(Exception):
p.apply_transforms(test_input)
def test_imageprocessor_rotate():
"""Test the Imageprocessor's rotate function."""
# Test rotate (int)
transform_sequence = [ToPILImage('RGBA'), Resize((200, 200)), Rotate(5)]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.array(img_out).shape == (200, 200, 4)
# Test rotate vs Pillow rotate
transform_sequence = [ToPILImage('RGBA'), Resize((200, 200))]
p = ImageProcessor(transform_sequence)
img_in = p.apply_transforms(test_input)
transform_sequence = [Rotate(5)]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(img_in)
assert img_in.rotate(5) == img_out
# Test rotate (negative int)
transform_sequence = [ToPILImage('RGBA'), Resize((200, 200)), Rotate(-5)]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.array(img_out).shape == (200, 200, 4)
# Test rotate (float)
transform_sequence = [ToPILImage('RGBA'), Resize((200, 200)), Rotate(499.99)]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.array(img_out).shape == (200, 200, 4)
def test_imageprocessor_combinations():
"""Test various combinations of the Imageprocessor's functionality."""
# Combination 1
transform_sequence = [
ToPILImage('RGB'),
Resize((2000, 2000)),
Rotate(5),
Grayscale(num_output_channels=4),
Resize((200, 200)),
Normalize()
]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.array(img_out).shape == (200, 200, 4)
# Combination 2
transform_sequence = [
ToPILImage('RGB'),
Resize((200, 200)),
Normalize()
]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.array(img_out).shape == (200, 200, 3)
# Combination 3
transform_sequence = [
ToPILImage('RGB'),
Resize((200, 200)),
Standardize()
]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert np.array(img_out).shape == (200, 200, 3)
# Combination 5 - including pixel value tests
transform_sequence = [
ToPILImage('RGB'),
Resize((2000, 2000)),
Rotate(5),
Grayscale(num_output_channels=4),
Resize((200, 200)),
PILtoarray()
]
p = ImageProcessor(transform_sequence)
img_out = p.apply_transforms(test_input)
assert img_out.shape == (200, 200, 4)
assert np.min(img_out) >= 0
assert np.max(img_out) <= 255
# Combination 6 - utilize the pipeline multiple times
transform_sequence = [
ToPILImage('RGB'),
Resize((2000, 2000)),
Rotate(5),
Grayscale(num_output_channels=4),
Resize((200, 200)),
PILtoarray()
]
p = ImageProcessor(transform_sequence)
p.apply_transforms(test_input)
p.apply_transforms(test_input)
def test_flask_error():
# Test invalid input format
transform_sequence = [ToPILImage('RGB')]
p = MAXImageProcessor(transform_sequence)
with nose.tools.assert_raises_regexp(Exception, r".*Invalid input format*"):
p.apply_transforms("")
# Test invalid input dimensions
transform_sequence = [ToPILImage('RGB')]
p = MAXImageProcessor(transform_sequence)
with nose.tools.assert_raises_regexp(Exception, r".*grayscale or a colour image*"):
p.apply_transforms(np.random.rand(10, 10, 10, 10))
if __name__ == '__main__':
nose.main()
| 38.501305
| 118
| 0.701614
| 1,871
| 14,746
| 5.34046
| 0.111705
| 0.170136
| 0.095076
| 0.117694
| 0.796938
| 0.767714
| 0.754604
| 0.729484
| 0.718775
| 0.671637
| 0
| 0.030044
| 0.176116
| 14,746
| 382
| 119
| 38.602094
| 0.792411
| 0.174149
| 0
| 0.627706
| 0
| 0
| 0.031478
| 0.002154
| 0
| 0
| 0
| 0
| 0.194805
| 1
| 0.034632
| false
| 0
| 0.025974
| 0
| 0.060606
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
18e488970cecfbe507c08c30a1fc4c9d9a70f5d7
| 11,068
|
py
|
Python
|
smartscript_web/py_checker/GenerateCurve.py
|
jncsw/Smart-Script
|
a4353c6a8363b8531a6edd278ce09e1fec1fbfde
|
[
"MIT"
] | 2
|
2021-07-08T14:26:02.000Z
|
2021-07-08T16:14:58.000Z
|
smartscript_web/py_checker/GenerateCurve.py
|
jncsw/Smart-Script
|
a4353c6a8363b8531a6edd278ce09e1fec1fbfde
|
[
"MIT"
] | null | null | null |
smartscript_web/py_checker/GenerateCurve.py
|
jncsw/Smart-Script
|
a4353c6a8363b8531a6edd278ce09e1fec1fbfde
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import os
def updateWeb():
DIR = "./coll_stat/"
print("Updating")
# def compare(x, y):
# stat_x = os.stat(DIR + "/" + x)
# stat_y = os.stat(DIR + "/" + y)
# if stat_x.st_ctime < stat_y.st_ctime:
# return -1
# elif stat_x.st_ctime > stat_y.st_ctime:
# return 1
# else:
# return 0
# In[2]:
iterms = os.listdir(DIR)
# In[3]:
iterms.sort()
# In[4]:
# iterms[1]
# In[5]:
MaxDB = 100
MaxCol = 100000
# In[6]:
dbName = []
CollectData = []
data = [[0 for i in range(MaxCol)] for j in range(MaxDB)]
cur = 0
banList = ['pkg_dependents','test','read_bug']
# In[7]:
# str(dbName)
# In[8]:
# data[10][1]
# In[9]:
for item in iterms:
if item[-1]=='v':# is a csv file
fdir = DIR+item
with open(fdir,"r") as f:
CollectData.append(item[10:24])
for line in f:
if line[0]=='b':# bug_db
dat = line.split(",")
name = dat[0].split(".")[-1]
count = dat[3]
# print(name,count)
if name in banList:
continue
if name not in dbName:
dbName.append(name)
data[dbName.index(name)][cur] = int(count)
cur += 1
# In[10]:
# item[10:24]
# https://echarts.apache.org/examples/en/editor.html?c=line-stack&theme=dark
# https://echarts.apache.org/examples/en/editor.html?c=area-stack&theme=dark
# In[11]:
# fdir = DIR+item
# with open(fdir,"r") as f:
# CollectData.append(item[10:24])
# for line in f:
# if line[0]=='b':# bug_db
# dat = line.split(",")
# name = dat[0].split(".")[-1]
# count = dat[3]
# # print(name,count)
# if name not in dbName:
# dbName.append(name)
# data[dbName.index(name)][cur] = int(count)
# cur += 1
# In[12]:
headstr= """
{% load static %}
{% load bootstrap4 %}
{% bootstrap_css %}
{% bootstrap_javascript jquery='full' %}
<!DOCTYPE html>
<html style="height: 100%">
<head>
<meta charset="utf-8">
</head>
<body style="height: 100%; margin: 0">
<input id="selectall" type="button" class="btn btn-primary" value="Select None" />
<div id="container" style="height: 100%"></div>
<script src="{% static 'py_checker/js/echarts.min.js' %}"></script>
<script src="{% static 'py_checker/js/dark.js' %}"></script>
<!-- <script src="{% static 'py_checker/js/shine.js' %}"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/echarts.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-gl/echarts-gl.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-stat/ecStat.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/extension/dataTool.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/map/js/china.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/map/js/world.js"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=xfhhaTThl11qYVrqLZii6w8qE5ggnhrY&__ec_v__=20190126"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/extension/bmap.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/simplex.js"></script> -->
<script type="text/javascript">
var dom = document.getElementById("container");
var myChart = echarts.init(dom,'dark');
var app = {};
option = null;
"""
tailstr = """
]
};
;
if (option && typeof option === "object") {
myChart.setOption(option, true);
}
var selectArr = myChart.getOption().legend[0].data;
$('#selectall').click(function(){
var flag = $(this).attr('flag');
if(flag == 1){
var val = true;
$(this).attr('flag',0);
$(this).val('Select None');
}else{
var val = false;
$(this).attr('flag',1);
$(this).val('Select All');
}
var obj = {};
for(var key in selectArr){
obj[selectArr[key]] = val;
}
option.legend.selected = obj;
myChart.setOption(option);
});
</script>
</body>
</html>
"""
# In[13]:
optionstr = """
option = {
title: {
text: 'Line-stack Graph'
},
tooltip: {
trigger: 'axis'
},
legend: {
type: 'scroll',
// orient: 'vertical',
left: 80,
right: 80,
top: 20,
bottom: 20,
data:[
"""
# In[14]:
# str(dbName)[1:-1]
# In[15]:
optionstr+=str(dbName)[1:-1]+"""
]
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ["""
# In[16]:
optionstr+=str(CollectData)[1:-1]+"""
]
},
yAxis: {
type: 'value'
},
series: [
"""
# In[17]:
allstrdb = ""
for db in dbName:
# db = dbName[0]
dbdata=str(data[dbName.index(db)][:cur])[1:-1]
strdb ="""
{
name:'%(name)s',
type:'line',
stack: 'total',
data:[%(data)s]
},
""" % {'name':db,'data':dbdata}
allstrdb += strdb
# allstrdb+=strdb.format(name=db,data=dbdata)
# In[18]:
# str(dbdata)[1:-1]
# In[19]:
finalstr = headstr + optionstr + allstrdb + tailstr
# In[20]:
# strdb
# In[21]:
with open("/home/smartscript/smartscript_web/py_checker/templates/py_checker/line-stack.html","w") as f:
f.write(finalstr)
f.flush()
# print(finalstr)
totalcnt = 0
for i in range(len(dbName)):
totalcnt+=data[i][cur-1]
with open("/home/smartscript/smartscript_web/py_checker/datacnt.txt",'w') as f:
f.write(str(totalcnt))
f.flush()
# In[ ]:
########### Echarts ###############
echartsstr = """
{% load static %}
{% load bootstrap4 %}
{% bootstrap_css %}
{% bootstrap_javascript jquery='full' %}
<!DOCTYPE html>
<html style="height: 100%">
<head>
<meta charset="utf-8">
</head>
<body style="height: 100%; margin: 0">
<input id="selectall" type="button" class="btn btn-primary" value="Select None" />
<div align="center" id="container" style="height: 100%"></div>
<script src="{% static 'py_checker/js/echarts.min.js' %}"></script>
<script src="{% static 'py_checker/js/dark.js' %}"></script>
<script src="{% static 'py_checker/js/shine.js' %}"></script>
<!-- <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/echarts.min.js"></script> -->
<!-- <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-gl/echarts-gl.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-stat/ecStat.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/extension/dataTool.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/map/js/china.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/map/js/world.js"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=xfhhaTThl11qYVrqLZii6w8qE5ggnhrY&__ec_v__=20190126"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/extension/bmap.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/simplex.js"></script> -->
<script type="text/javascript">
var dom = document.getElementById("container");
var myChart = echarts.init(dom,'dark');
var app = {};
option = null;
option = {
title : {
text: 'Database Information',
subtext: 'SmartScripts.org',
x:'center'
},
tooltip : {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
type: 'scroll',
orient: 'vertical',
// left: 'right',
right: 30,
top: 50,
bottom: 50,
data: ["""
echartsstr += str(dbName)[1:-1]+"""
]
},
series : [
{
name: 'Dataset Information',
type: 'pie',
radius : '55%',
center: ['50%', '60%'],
data:["""
for name in dbName:
num = data[dbName.index(name)][cur-1]
fstr = "{value: %(num)s , name:'%(name)s'},\n" % {'num':str(num),'name':name}
echartsstr+=fstr
echartsstr +="""
],
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
;
if (option && typeof option === "object") {
myChart.setOption(option, true);
}
var selectArr = myChart.getOption().legend[0].data;
$('#selectall').click(function(){
var flag = $(this).attr('flag');
if(flag == 1){
var val = true;
$(this).attr('flag',0);
$(this).val('Select None');
}else{
var val = false;
$(this).attr('flag',1);
$(this).val('Select All');
}
var obj = {};
for(var key in selectArr){
obj[selectArr[key]] = val;
}
option.legend.selected = obj;
myChart.setOption(option);
});
</script>
</body>
</html>
"""
with open("/home/smartscript/smartscript_web/py_checker/templates/py_checker/echarts.html","w") as f:
f.write(echartsstr)
f.flush()
if __name__=="__main__":
updateWeb()
| 25.920375
| 144
| 0.499458
| 1,219
| 11,068
| 4.493027
| 0.21411
| 0.052584
| 0.056235
| 0.073033
| 0.734709
| 0.724484
| 0.706956
| 0.706956
| 0.698558
| 0.683221
| 0
| 0.02454
| 0.322552
| 11,068
| 426
| 145
| 25.981221
| 0.705922
| 0.109143
| 0
| 0.455939
| 0
| 0.076628
| 0.771625
| 0.138295
| 0
| 0
| 0
| 0
| 0
| 1
| 0.003831
| false
| 0
| 0.003831
| 0
| 0.007663
| 0.003831
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
18fe82dbe92a6b757ce685f6d4fd0fa600185181
| 223
|
py
|
Python
|
main/PluginDemos/RandomFieldInitializer/Simulation/randomFieldInitializer.py
|
JulianoGianlupi/nh-cc3d-4x-base-tool
|
c0f4aceebd4c5bf3ec39e831ef851e419b161259
|
[
"CC0-1.0"
] | null | null | null |
main/PluginDemos/RandomFieldInitializer/Simulation/randomFieldInitializer.py
|
JulianoGianlupi/nh-cc3d-4x-base-tool
|
c0f4aceebd4c5bf3ec39e831ef851e419b161259
|
[
"CC0-1.0"
] | null | null | null |
main/PluginDemos/RandomFieldInitializer/Simulation/randomFieldInitializer.py
|
JulianoGianlupi/nh-cc3d-4x-base-tool
|
c0f4aceebd4c5bf3ec39e831ef851e419b161259
|
[
"CC0-1.0"
] | 1
|
2021-02-26T21:50:29.000Z
|
2021-02-26T21:50:29.000Z
|
from cc3d import CompuCellSetup
from randomFieldInitializerSteppables import randomFieldInitializerSteppable
CompuCellSetup.register_steppable(steppable=randomFieldInitializerSteppable(frequency=1))
CompuCellSetup.run()
| 27.875
| 89
| 0.896861
| 17
| 223
| 11.705882
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009524
| 0.058296
| 223
| 7
| 90
| 31.857143
| 0.938095
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7a13a4a65b79d45a78502dd6f5833af94d39a8bf
| 230
|
py
|
Python
|
integration/tests_failed/predicate.py
|
jleverenz/hurl
|
b81ca8ab7e0e409ec0c074fd8e118721ff4d3fb3
|
[
"Apache-2.0"
] | null | null | null |
integration/tests_failed/predicate.py
|
jleverenz/hurl
|
b81ca8ab7e0e409ec0c074fd8e118721ff4d3fb3
|
[
"Apache-2.0"
] | null | null | null |
integration/tests_failed/predicate.py
|
jleverenz/hurl
|
b81ca8ab7e0e409ec0c074fd8e118721ff4d3fb3
|
[
"Apache-2.0"
] | null | null | null |
from app import app
@app.route("/predicate/error/type")
def predicate_error_type():
return """{
"status": true,
"message": "0",
"count": 1,
"empty": "",
"number": 1.0,
"list": [1,2,3]
}"""
| 16.428571
| 35
| 0.5
| 28
| 230
| 4.035714
| 0.714286
| 0.247788
| 0.318584
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041916
| 0.273913
| 230
| 13
| 36
| 17.692308
| 0.634731
| 0
| 0
| 0
| 0
| 0
| 0.63913
| 0.091304
| 0
| 0
| 0
| 0
| 0
| 1
| 0.090909
| true
| 0
| 0.090909
| 0.090909
| 0.272727
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e1377053535c59c69d1cfb08052f0fa82034cd7d
| 164
|
py
|
Python
|
utils.py
|
Mathieu-R/tchernobyl-simulation
|
9861a43b4de75ef9966982b4f458b4e091bf3e92
|
[
"MIT"
] | null | null | null |
utils.py
|
Mathieu-R/tchernobyl-simulation
|
9861a43b4de75ef9966982b4f458b4e091bf3e92
|
[
"MIT"
] | 3
|
2021-09-08T01:32:36.000Z
|
2022-03-12T00:09:11.000Z
|
utils.py
|
Mathieu-R/tchernobyl-simulation
|
9861a43b4de75ef9966982b4f458b4e091bf3e92
|
[
"MIT"
] | null | null | null |
def day_to_seconds(day):
return day * 24 * 60 * 60
def hour_to_seconds(hour):
return hour * 60 * 60
def seconds_to_hour(seconds):
return seconds / (60 * 60)
| 20.5
| 29
| 0.689024
| 28
| 164
| 3.821429
| 0.285714
| 0.11215
| 0.130841
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10687
| 0.20122
| 164
| 8
| 30
| 20.5
| 0.709924
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
e1be0b41a642ff7279a144db45adec61e0013496
| 28,226
|
py
|
Python
|
crossproduct/line.py
|
stevenkfirth/crossproduct
|
292fdfffb8310a46b12893d5fc96f77213244a5e
|
[
"MIT"
] | 1
|
2021-02-02T20:14:39.000Z
|
2021-02-02T20:14:39.000Z
|
crossproduct/line.py
|
stevenkfirth/crossproduct
|
292fdfffb8310a46b12893d5fc96f77213244a5e
|
[
"MIT"
] | null | null | null |
crossproduct/line.py
|
stevenkfirth/crossproduct
|
292fdfffb8310a46b12893d5fc96f77213244a5e
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import math
from .point import Point
from .vector import Vector
ABS_TOL = 1e-7 # default value for math.isclose
class Line():
"""A line, as described by a Point and a Vector
Equation of the line is P(t) = P0 + vL*t where:
- P(t) is a point on the line;
- P0 is the start point of the line;
- vL is the line vector;
- t is any real number.
:param P0: The start point of the line.
:type P0: Point
:param vL: The line vector.
:type vL: Vector
:raises ValueError: If the length of vL is zero.
.. rubric:: Code Example
.. code-block:: python
>>> l = Line(Point(0,0), Vector(1,0))
>>> print(l)
Line(Point(0,0), Vector(1,0))
>>> l = Line(Point(0,0,0), Vector(1,0,0))
>>> print(l)
Line(Point(0,0,0), Vector(1,0,0))
.. seealso:: `<https://geomalgorithms.com/a02-_lines.html>`_
"""
def __eq__(self,line):
"""Tests if this line and the supplied line are equal.
:param line: A line.
:type line: Line
:return: True if the start point of supplied line lies on line (self),
and the vL of supplied line is collinear to the vL of line (self);
otherwise False.
:rtype: bool
.. rubric:: Code Example
.. code-block:: python
# 2D example
>>> l = Line(Point(0,0), Vector(1,0))
>>> result = l == l
>>> print(result)
True
# 3D example
>>> l1 = Line(Point(0,0,0), Vector(1,0,0))
>>> l2 = Line(Point(0,0,0), Vector(-1,0,0))
>>> result = l1 == l2
>>> print(result)
True
"""
return self.contains(line.P0) and self.vL.is_collinear(line.vL)
# if isinstance(line,Line):
# return line.P0 in self and line.vL.is_collinear(self.vL)
# else:
# return False
def __init__(self,P0,vL):
""
if math.isclose(vL.length, 0, abs_tol=ABS_TOL):
raise ValueError('length of vL must be greater than zero')
self._P0=P0
self._vL=vL
def calculate_point(self,t):
"""Returns a point on the line for a given t value.
:param t: The t value of the equation of the line.
:type t: float
:return: A point on the line calcualted using the t value.
:rtype: Point
.. rubric:: Code Example
.. code-block:: python
# 2D example
>>> l = Line(Point(0,0), Vector(1,0))
>>> result = l.calcuate_point(3)
>>> print(result)
Point(3,0)
# 3D example
>>> l = Line(Point(0,0,0), Vector(1,0,0))
>>> result = l.calcuate_point(-3)
>>> print(result)
Point(-3,0,0)
"""
return self.P0 + (self.vL * t)
def calculate_t_from_point(self,point):
"""Returns t for a given point.
:param point: A point on the line.
:type point: Point
:return: The calculated t value.
:rtype: float
:Example:
.. code-block:: python
>>> l = Line(Point(0,0), Vector(1,0))
>>> result = l.calculate_t_from_point(Point(3,0))
>>> print(result)
3
>>> l = Line(Point(0,0,0), Vector(1,0,0))
>>> result = l.calculate_t_from_point(Point(3,0,0))
>>> print(result)
3
"""
for P0,vL,point in zip(self.P0,self.vL,point): # loop through x, y, z components
if not math.isclose(vL, 0, abs_tol=ABS_TOL):
return (point-P0) / vL
raise Exception()
def contains(self,obj):
"""Tests if the line contains the object.
:param obj: A point, halfline or segment.
:type obj: Point, Halfline, Segment
:return: For point, True if the point lies on the line; otherwise False.
For halfline, True if the halfline startpoint is on the line and
the halfline vector is collinear to the line vector; otherwise False.
For segment, True if the segment start and endpoints are on the line; otherwise False.
:rtype: bool
.. rubric:: Code Example
.. code-block:: python
# 2D example
>>> l = Line(Point(0,0), Vector(1,0))
>>> result = Point(2,0) in l
>>> print(result)
True
# 3D example
>>> l = Line(Point(0,0,0), Vector(1,0,0))
>>> hl = Halfline(Point(0,0,0), Vector(-1,0,0))
>>> result = hl in l
>>> print(result)
True
"""
if obj.__class__.__name__=='Point':
t=self.calculate_t_from_point(obj)
pt=self.calculate_point(t)
return obj==pt
elif obj.__class__.__name__=='Halfline':
return obj.P0 in self and obj.vL.is_collinear(self.vL)
elif obj.__class__.__name__=='Segment':
return obj.P0 in self and obj.P1 in self
else:
raise TypeError
def distance_to_point(self,point):
"""Returns the distance from this line to the supplied point.
:param point: A point.
:type point: Point2D or Point3D
:return: The distance from the line to the point.
:rtype: float
.. rubric:: Code Example
.. code-block:: python
# 2D example
>>> l = Line(Point(0,0), Vector(1,0))
>>> result = l.distance_to_point(Point(0,10))
>>> print(result)
10
# 3D example
>>> l = Line(Point(0,0,0), Vector(1,0,0))
>>> result = l.distance_to_point(Point(10,0,0))
>>> print(result)
0
.. seealso:: `<https://geomalgorithms.com/a02-_lines.html>`_
"""
w=point-self.P0
b=w.dot(self.vL) / self.vL.dot(self.vL)
ptB=self.P0+self.vL*b
return (ptB-point).length
def intersect_line(self,line):
"""Returns the intersection of this line with the supplied line.
:param line: A line.
:type line: Line
:return: Returns a line (this line) if lines are collinear.
Returns None (i.e. no intersection) if lines are parallel.
For 2D, returns a point if lines are skew.
For 3D, returns either None or a point if lines are skew.
:rtype: None, Point, Line
.. rubric:: Code Example
.. code-block:: python
# 2D example
>>> l1 = Line(Point(0,0), Vector(1,0))
>>> l2 = Line(Point(0,0), Vector(0,1))
>>> result = l.intersect_line(l2)
>>> print(result)
Point(0,0)
# 3D example
>>> l1 = Line(Point(0,0,0), Vector(1,0,0))
>>> l2 = Line(Point(0,0,1), Vector(1,0,0))
>>> result = l1.intersect_line(l2)
>>> print(result)
None
.. seealso:: `<https://geomalgorithms.com/a05-_intersect-1.html>`_
"""
if self==line: # test for collinear lines
return self
elif self.is_parallel(line): # test for parallel lines
return None
else: # a skew line
return self._intersect_line_skew(line)
def is_parallel(self,line):
"""Tests if this line and the supplied line are parallel.
:param obj: A line.
:type obj: Line
:return: Returns True if the lines are parallel (this includes the
case of equal lines);
otherwise False.
:rtype: bool
.. rubric:: Code Example
.. code-block:: python
# 2D example
>>> l1 = Line(Point(0,0), Vector(1,0))
>>> l2 = Line(Point(0,0), Vector(0,1))
>>> result = l.is_parallel(l2)
>>> print(result)
False
# 3D example
>>> l1 = Line(Point3D(0,0,0), Vector(1,0,0))
>>> l2 = Line(Point3D(0,0,1), Vector(2,0,0))
>>> result = l1.is_parallel(l2)
>>> print(result)
True
"""
return self.vL.is_collinear(line.vL)
@property
def P0(self):
"""The starting point of the line.
:rtype: Point
"""
return self._P0
@property
def vL(self):
"""The vector of the line.
:rtype: Vector
"""
return self._vL
class Line_old():
"A n-D line"
classname='Line'
def __init__(self,P0,vL,validate=False):
""
if validate:
if vL.length<SMALL_NUM:
raise ValueError('length of vL must be greater than zero')
self._P0=P0
self._vL=vL
def __contains__(self,obj):
"""Tests if the line contains the object
:param obj: A point, halfline or segment.
:type obj: Point2D, Point3D, Halfline2D, Halfline3D, Segment2D or Segment3D
:return: For point, True if the point lies on the line; otherwise False.
For halfline, True if the halfline startpoint is on the line and
the halfline vector is collinear to the line vector; otherwise False.
For segment, True if the segment start and endpoints are on the line; otherwise False.
:rtype: bool
:Example:
.. code-block:: python
# 2D example
>>> l = Line2D(Point2D(0,0), Vector2D(1,0))
>>> result = Point2D(2,0) in l
>>> print(result)
True
# 3D example
>>> l = Line3D(Point3D(0,0,0), Vector3D(1,0,0))
>>> hl = Halfline3D(Point3D(0,0,0), Vector3D(-1,0,0))
>>> result = hl in l
>>> print(result)
True
"""
if obj.classname=='Point':
t=self.calculate_t_from_point(obj)
pt=self.calculate_point(t)
return obj==pt
elif obj.classname=='Halfline':
return obj.P0 in self and obj.vL.is_collinear(self.vL)
elif obj.classname=='Segment':
return obj.P0 in self and obj.P1 in self
else:
raise TypeError
def __eq__(self,line):
"""Tests if this line and the supplied line are equal.
:param line: A line.
:type line: Line2D or Line3D
:return: True if the start point of supplied line lies on line (self),
and the vL of supplied line is collinear to the vL of line (self);
otherwise False.
:rtype: bool
:Example:
.. code-block:: python
# 2D example
>>> l = Line2D(Point2D(0,0), Vector2D(1,0))
>>> result = l == l
>>> print(result)
True
# 3D example
>>> l1 = Line3D(Point3D(0,0,0), Vector3D(1,0,0))
>>> l2 = Line3D(Point3D(0,0,0), Vector3D(-1,0,0))
>>> result = l1 == l2
>>> print(result)
True
"""
if isinstance(line,Line):
return line.P0 in self and line.vL.is_collinear(self.vL)
else:
return False
def calculate_point(self,t):
"""Returns a point on the line for a given t value.
:param t: The t value of the equation of the line.
:type t: float
:return: A point on the line calcualted using the t value.
:rtype: Point2D or Point3D
:Example:
.. code-block:: python
# 2D example
>>> l = Line2D(Point2D(0,0), Vector2D(1,0))
>>> result = l.calcuate_point(3)
>>> print(result)
Point2D(3,0)
# 3D example
>>> l = Line3D(Point3D(0,0,0), Vector3D(1,0,0))
>>> result = l.calcuate_point(-3)
>>> print(result)
Point3D(-3,0,0)
"""
return self.P0 + (self.vL * t)
def calculate_t_from_x(self,x):
"""Returns t for a given x coordinate.
:param x: A x coordinate.
:type x: float
:return: The calculated t value.
:rtype: float
:Example:
.. code-block:: python
# 2D example
>>> l = Line2D(Point2D(0,0), Vector2D(1,0))
>>> result = l.calculate_t_from_x(3)
>>> print(result)
3
# 3D example
>>> l = Line3D(Point3D(0,0,0), Vector3D(1,0,0))
>>> result = l.calculate_t_from_x(3)
>>> print(result)
3
"""
try:
return (x-self.P0.x) / (self.vL.x)
except ZeroDivisionError:
raise ValueError('%s has a vector with an x component of 0' % self)
def calculate_t_from_y(self,y):
"""Returns t for a given y coordinate.
:param y: A y coordinate.
:type y: float
:return: The calculated t value.
:rtype: float
:Example:
.. code-block:: python
# 2D example
>>> l = Line2D(Point2D(0,0), Vector2D(0,1))
>>> result = l.calculate_t_from_y(3)
>>> print(result)
3
# 3D example
>>> l = Line3D(Point3D(0,0,0), Vector3D(0,1,0))
>>> result = l.calculate_t_from_y(3)
>>> print(result)
3
"""
try:
return (y-self.P0.y) / (self.vL.y)
except ZeroDivisionError:
raise ValueError('%s has a vector with an y component of 0' % self)
def distance_to_point(self,point):
"""Returns the distance from this line to the supplied point.
:param point: A point.
:type point: Point2D or Point3D
:return: The distance from the line to the point.
:rtype: float
:Example:
.. code-block:: python
# 2D example
>>> l = Line2D(Point2D(0,0), Vector2D(1,0))
>>> result = l.distance_to_point(Point2D(0,10))
>>> print(result)
10
# 3D example
>>> l = Line3D(Point3D(0,0,0), Vector3D(1,0,0))
>>> result = l.distance_to_point(Point3D(10,0,0))
>>> print(result)
0
.. seealso:: `<https://geomalgorithms.com/a02-_lines.html>`_
"""
w=point-self.P0
b=w.dot(self.vL) / self.vL.dot(self.vL)
ptB=self.P0+self.vL*b
return (ptB-point).length
def intersect_line(self,line):
"""Returns the intersection of this line with the supplied line.
:param line: A line.
:type line: Line2D or Line3D
:return: Returns a line (this line) if lines are collinear.
Returns None (i.e. no intersection) if lines are parallel.
For 2D, returns a point if lines are skew.
For 3D, returns either None or a point if lines are skew.
:rtype: None, Point2D, Point3D, Line2D, Line3D.
:Example:
.. code-block:: python
# 2D example
>>> l1 = Line2D(Point2D(0,0), Vector2D(1,0))
>>> l2 = Line2D(Point2D(0,0), Vector2D(0,1))
>>> result = l.intersect_line(l2)
>>> print(result)
Point2D(0,0)
# 3D example
>>> l1 = Line3D(Point3D(0,0,0), Vector3D(1,0,0))
>>> l2 = Line3D(Point3D(0,0,1), Vector3D(1,0,0))
>>> result = l1.intersect_line(l2)
>>> print(result)
None
.. seealso:: `<https://geomalgorithms.com/a05-_intersect-1.html>`_
"""
if self==line: # test for collinear lines
return self
elif self.is_parallel(line): # test for parallel lines
return None
else: # a skew line
return self._intersect_line_skew(line)
def is_parallel(self,line):
"""Tests if this line and the supplied line are parallel.
:param obj: A line.
:type obj: Line2D, Line3D
:return: Returns True if the lines are parallel;
otherwise False.
:rtype: bool
:Example:
.. code-block:: python
# 2D example
>>> l1 = Line2D(Point2D(0,0), Vector2D(1,0))
>>> l2 = Line2D(Point2D(0,0), Vector2D(0,1))
>>> result = l.is_parallel(l2)
>>> print(result)
False
# 3D example
>>> l1 = Line3D(Point3D(0,0,0), Vector3D(1,0,0))
>>> l2 = Line3D(Point3D(0,0,1), Vector3D(2,0,0))
>>> result = l1.is_parallel(l2)
>>> print(result)
True
"""
return self.vL.is_collinear(line.vL)
@property
def P0(self):
"""The starting point of the line.
:rtype: Point2D or Point3D
"""
return self._P0
@property
def vL(self):
"""The vector of the line.
:rtype: Vector2D or Vector3D
"""
return self._vL
class Line2D(Line):
"""A two dimensional line, situated on an x, y plane.
Equation of the line is P(t) = P0 + vL*t where:
- P(t) is a point on the line;
- P0 is the start point of the line;
- vL is the line vector;
- t is any real number.
:param P0: The start point of the line.
:type P0: Point2D
:param vL: The line vector.
:type vL: Vector2D
:Example:
.. code-block:: python
>>> l = Line2D(Point2D(0,0), Vector2D(1,0))
>>> print(l)
Line2D(Point2D(0,0), Vector2D(1,0))
.. seealso:: `<https://geomalgorithms.com/a02-_lines.html>`_
"""
def __repr__(self):
""
return 'Line2D(%s, %s)' % (self.P0,self.vL)
def calculate_t_from_point(self,point):
"""Returns t for a given point.
:param point: A point on the line.
:type point: Point2D
:return: The calculated t value.
:rtype: float
:Example:
.. code-block:: python
>>> l = Line2D(Point2D(0,0), Vector2D(1,0))
>>> result = l.calculate_t_from_point(Point2D(3,0))
>>> print(result)
3
"""
try:
return self.calculate_t_from_x(point.x)
except ValueError:
return self.calculate_t_from_y(point.y)
@property
def dimension(self):
"""The dimension of the line.
:return: '2D'
:rtype: str
:Example:
.. code-block:: python
>>> l = Line2D(Point2D(0,0), Vector2D(1,0))
>>> print(l.dimension)
'2D'
"""
return '2D'
def distance_to_line(self,line):
"""Returns the distance from this line to the supplied line.
:param line: A line.
:type line: Line2D
:return: The distance between the two lines.
:rtype: float
:Example:
.. code-block:: python
>>> l1 = Line2D(Point2D(0,0), Vector2D(1,0))
>>> l2 = Line2D(Point2D(0,1), Vector2D(1,0))
>>> result = l1.distance_to_line(l2)
>>> print(result)
1
.. seealso:: `<https://geomalgorithms.com/a07-_distance.html>`_
"""
if self.is_parallel(line):
return self.distance_to_point(line.P0)
else:
return 0 # as these are skew infinite 2D lines
def _intersect_line_skew(self,skew_line):
"""Returns the point of intersection of this line and the supplied skew line
"""
u=self.vL
v=skew_line.vL
w=self.P0-skew_line.P0
t=-v.perp_product(w) / v.perp_product(u)
return self.calculate_point(t)
class Line3D(Line):
"""A three dimensional line, situated on an x, y, z plane.
Equation of the line is P(t) = P0 + vL*t where:
- P(t) is a point on the line;
- P0 is the start point of the line;
- vL is the line vector;
- t is any real number.
:param P0: The start point of the line.
:type P0: Point3D
:param vL: The line vector.
:type vL: Vector3D
:Example:
.. code-block:: python
>>> l = Line3D(Point3D(0,0,0), Vector3D(1,0,0))
>>> print(l)
Line3D(Point3D(0,0,0), Vector3D(1,0,0))
.. seealso:: `<https://geomalgorithms.com/a02-_lines.html>`_
"""
def __repr__(self):
""
return 'Line3D(%s, %s)' % (self.P0,self.vL)
def calculate_t_from_point(self,point):
"""Returns t for a given point.
:param point: A point on the line.
:type point: Point3D
:return: The calculated t value.
:rtype: float
:Example:
.. code-block:: python
>>> l = Line3D(Point3D(0,0), Vector3D(1,0))
>>> result = l.calculate_t_from_point(Point3D(3,0))
>>> print(result)
3
"""
try:
return self.calculate_t_from_x(point.x)
except ValueError:
try:
return self.calculate_t_from_y(point.y)
except ValueError:
return self.calculate_t_from_z(point.z)
def calculate_t_from_z(self,z):
"""Returns t for a given z coordinate.
:param z: A z coordinate.
:type z: float
:return: The calculated t value.
:rtype: float
:Example:
.. code-block:: python
>>> l = Line3D(Point3D(0,0,0), Vector3D(0,0,1))
>>> result = l.calculate_t_from_z(3)
>>> print(result)
3
"""
try:
return (z-self.P0.z) / (self.vL.z)
except ZeroDivisionError:
raise ValueError('%s has a vector with an z component of 0' % self)
@property
def dimension(self):
"""The dimension of the line.
:return: '3D'
:rtype: str
:Example:
.. code-block:: python
>>> l = Line3D(Point3D(0,0,0), Vector3D(0,0,1))
>>> print(l.dimension)
'3D'
"""
return '3D'
def distance_to_line(self,line):
"""Returns the distance from this line to the supplied line.
:param line: A line.
:type line: Line3D
:return: The distance between the two lines.
:rtype: float
:Example:
.. code-block:: python
>>> l1 = Line3D(Point3D(0,0,0), Vector3D(1,0,0))
>>> l2 = Line3D(Point3D(0,1,0), Vector3D(0,0,1))
>>> result = l1.distance_to_line(l2)
>>> print(result)
1
.. seealso:: `<https://geomalgorithms.com/a07-_distance.html>`_
"""
if self.is_parallel(line):
return self.distance_to_point(line.P0)
else:
w0=self.P0-line.P0
u=self.vL
v=line.vL
a=u.dot(u)
b=u.dot(v)
c=v.dot(v)
d=u.dot(w0)
e=v.dot(w0)
sc=(b*e-c*d) / (a*c-b**2)
tc=(a*e-b*d) / (a*c-b**2)
Pc=self.calculate_point(sc)
Qc=line.calculate_point(tc)
return (Pc-Qc).length
def _intersect_line_skew(self,skew_line):
"""Returns the point of intersection of this line and the supplied (skew) line
- return value can be:
- None -> no intersection (for skew lines which do not intersect in 3D space)
- Point3D -> a point (for skew lines which intersect)
"""
if not self.is_parallel(skew_line):
# find the coordinate to ignore for the projection
cp=self.vL.cross_product(skew_line.vL)
absolute_coords=[abs(x) for x in cp.coordinates]
i=absolute_coords.index(max(absolute_coords)) % 3 # the coordinate to ignore for projection
#print('i',i)
# project 3D lines to 2D
self2D=self.project_2D(i)
skew_line2D=skew_line.project_2D(i)
#print('self2D', self2D)
#print('skew_line2D',skew_line2D)
# find intersection point for 2D lines
ipt=self2D._intersect_line_skew(skew_line2D)
# find t values for the intersection point on each 2D line
t1=self2D.calculate_t_from_point(ipt)
t2=skew_line2D.calculate_t_from_point(ipt)
# calculate the 3D intersection points from the t values
ipt1=self.calculate_point(t1)
ipt2=skew_line.calculate_point(t2)
#print(ipt1,ipt2)
if ipt1==ipt2: # test the two 3D intersection points are the same
return ipt1
else:
return None
else:
raise ValueError('%s and %s are not skew lines' % (self,skew_line))
def project_2D(self,coordinate_index):
"""Projection of the 3D line as a 2D line.
:param coordinate_index: The index of the coordinate to ignore.
Use coordinate_index=0 to ignore the x-coordinate, coordinate_index=1
for the y-coordinate and coordinate_index=2 for the z-coordinate.
:type coordinate_index: int
:return: A 2D line based on the projection of the 3D line.
:rtype: Line2D
:Example:
.. code-block:: python
>>> l = Line3D(Point3D(0,0,0), Vector3D(1,2,3))
>>> result = l.project_2D(0)
>>> print(result)
Line2D(Point2D(0,0), Vector2D(2,3))
"""
if coordinate_index==0:
return Line2D(Point2D(self.P0.y,self.P0.z),
Vector2D(self.vL.y,self.vL.z))
elif coordinate_index==1:
return Line2D(Point2D(self.P0.z,self.P0.x),
Vector2D(self.vL.z,self.vL.x))
elif coordinate_index==2:
return Line2D(Point2D(self.P0.x,self.P0.y),
Vector2D(self.vL.x,self.vL.y))
else:
raise ValueError
| 28.282565
| 103
| 0.478956
| 3,368
| 28,226
| 3.934976
| 0.065618
| 0.018562
| 0.006112
| 0.04316
| 0.797103
| 0.766015
| 0.758168
| 0.738172
| 0.716592
| 0.703992
| 0
| 0.045771
| 0.40941
| 28,226
| 997
| 104
| 28.310933
| 0.74925
| 0.534188
| 0
| 0.562814
| 0
| 0
| 0.037782
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.165829
| false
| 0
| 0.015075
| 0
| 0.447236
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e1cf7fc9b5534addbc7c56891b761ec90c4d55ff
| 90
|
py
|
Python
|
mysite/posts/admin.py
|
Lee-Geon-Yeong/py_pro
|
309e711992f9b8aaf41d0f18f3920c3b31533b9c
|
[
"MIT"
] | null | null | null |
mysite/posts/admin.py
|
Lee-Geon-Yeong/py_pro
|
309e711992f9b8aaf41d0f18f3920c3b31533b9c
|
[
"MIT"
] | null | null | null |
mysite/posts/admin.py
|
Lee-Geon-Yeong/py_pro
|
309e711992f9b8aaf41d0f18f3920c3b31533b9c
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from posts.models import Blog
admin.site.register(Blog)
| 18
| 32
| 0.822222
| 14
| 90
| 5.285714
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 90
| 4
| 33
| 22.5
| 0.925
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
bed082ab946e1c8b7db5542b0952b00619a4f6b1
| 2,681
|
py
|
Python
|
flaskBackend/test_alarm.py
|
PirateRoberts98/capstone-hygeine-managment
|
0efb41324c47c78acf03bc506294d5a7d0891ea9
|
[
"MIT"
] | 3
|
2020-03-25T19:44:21.000Z
|
2020-03-28T19:45:13.000Z
|
flaskBackend/test_alarm.py
|
PirateRoberts98/capstone-hygeine-managment
|
0efb41324c47c78acf03bc506294d5a7d0891ea9
|
[
"MIT"
] | 6
|
2020-03-28T12:24:28.000Z
|
2021-09-02T16:56:13.000Z
|
flaskBackend/test_alarm.py
|
PirateRoberts98/capstone-hygeine-managment
|
0efb41324c47c78acf03bc506294d5a7d0891ea9
|
[
"MIT"
] | null | null | null |
import unittest
from alarm import waterTemperature, humidityLevel, timesEntered, timesUsed
class TestAlarm(unittest.TestCase):
def test_waterTemperature(self):
waterTemperature(1, 1)
result = waterTemperature(1, 120000000)
self.assertEqual(result['status'], True)
waterTemperature(50, 1)
result = waterTemperature(50, 120000000)
self.assertEqual(result['status'], True)
waterTemperature(1, 1)
result = waterTemperature(50, 120000000)
self.assertEqual(result['status'], True)
waterTemperature(50, 1)
result = waterTemperature(1, 120000000)
self.assertEqual(result['status'], True)
waterTemperature(18, 1)
result = waterTemperature(19, 120000000)
self.assertEqual(result['status'], False)
waterTemperature(50, 1)
result = waterTemperature(19, 120000000)
self.assertEqual(result['status'], False)
waterTemperature(1, 1)
result = waterTemperature(19, 120000000)
self.assertEqual(result['status'], False)
def test_timesEntered(self):
timesEntered(True, 1)
result = timesEntered(True, 172800000000)
self.assertEqual(result['status'], True)
timesEntered(False, 1)
result = timesEntered(False, 172800000000)
self.assertEqual(result['status'], True)
timesEntered(True, 1)
timesEntered(True, 2)
timesEntered(True, 3)
timesEntered(True, 4)
timesEntered(True, 5)
result = timesEntered(True, 172800000000)
self.assertEqual(result['status'], False)
timesEntered(True, 1)
timesEntered(True, 2)
timesEntered(True, 3)
timesEntered(True, 4)
timesEntered(True, 5)
timesEntered(True, 6)
result = timesEntered(True, 172800000000)
self.assertEqual(result['status'], False)
def test_humidityLevel(self):
result = humidityLevel(34)
self.assertEqual(result['status'], True)
result = humidityLevel(76)
self.assertEqual(result['status'], True)
result = humidityLevel(44)
self.assertEqual(result['status'], False)
def test_timesUsed(self):
timesUsed(True, 1)
result = timesUsed(True, 172800000000)
self.assertEqual(result['status'], False)
timesUsed(False, 1)
result = timesUsed(False, 172800000000)
self.assertEqual(result['status'], False)
timesUsed(True, 1)
timesUsed(True, 2)
result = timesUsed(True, 172800000000)
self.assertEqual(result['status'], False)
if __name__ == '__main__':
unittest.main()
| 30.123596
| 74
| 0.635957
| 256
| 2,681
| 6.613281
| 0.140625
| 0.15062
| 0.210868
| 0.271116
| 0.797401
| 0.784997
| 0.77909
| 0.617247
| 0.581217
| 0.428825
| 0
| 0.099751
| 0.252145
| 2,681
| 88
| 75
| 30.465909
| 0.744638
| 0
| 0
| 0.716418
| 0
| 0
| 0.041029
| 0
| 0
| 0
| 0
| 0
| 0.253731
| 1
| 0.059701
| false
| 0
| 0.029851
| 0
| 0.104478
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
bedfbc367f5a3470494e89f63108978ba28769ce
| 120
|
py
|
Python
|
test/test_pyservice.py
|
adomokos/pyservice
|
e79b4aeacec84bea31b1f3492cdef7bec47d9f1a
|
[
"MIT"
] | 1
|
2021-01-06T01:50:44.000Z
|
2021-01-06T01:50:44.000Z
|
test/test_pyservice.py
|
adomokos/pyservice
|
e79b4aeacec84bea31b1f3492cdef7bec47d9f1a
|
[
"MIT"
] | null | null | null |
test/test_pyservice.py
|
adomokos/pyservice
|
e79b4aeacec84bea31b1f3492cdef7bec47d9f1a
|
[
"MIT"
] | null | null | null |
from pyservice import __version__
def test_verifies_the_package_version() -> None:
assert __version__ == "0.0.11"
| 20
| 48
| 0.758333
| 16
| 120
| 4.9375
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.039216
| 0.15
| 120
| 5
| 49
| 24
| 0.735294
| 0
| 0
| 0
| 0
| 0
| 0.05
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
bee09b2c9c08c3d7da31dedad45c7121c4fc7044
| 11,483
|
py
|
Python
|
pytorch_translate/research/test/test_unsupervised_morphology.py
|
dzhulgakov/translate
|
018d3eed8d93ff32e86c912e68045c7a3f4ed0b7
|
[
"BSD-3-Clause"
] | 1
|
2020-07-24T10:59:17.000Z
|
2020-07-24T10:59:17.000Z
|
pytorch_translate/research/test/test_unsupervised_morphology.py
|
dzhulgakov/translate
|
018d3eed8d93ff32e86c912e68045c7a3f4ed0b7
|
[
"BSD-3-Clause"
] | null | null | null |
pytorch_translate/research/test/test_unsupervised_morphology.py
|
dzhulgakov/translate
|
018d3eed8d93ff32e86c912e68045c7a3f4ed0b7
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/bin/env python3
import math
import random
import shutil
import tempfile
import unittest
from os import path
from unittest.mock import Mock, patch
from pytorch_translate.research.unsupervised_morphology import unsupervised_morphology
def get_all_substrings(string):
length = len(string)
for i in range(length):
for j in range(i + 1, length + 1):
yield (string[i:j])
class TestUnsupervisedMorphology(unittest.TestCase):
def test_morph_init(self):
morph_hmm_model = unsupervised_morphology.MorphologyHMMParams()
with patch("builtins.open") as mock_open:
txt_content = [
"123 124 234 345",
"112 122 123 345",
"123456789",
"123456 456789",
]
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
morph_hmm_model.init_params_from_data("no_exist_file.txt")
assert len(morph_hmm_model.morph_emit_probs) == 51
assert round(morph_hmm_model.morph_emit_probs["1234"], 3) == round(
0.014141414141414142, 3
)
def test_zero_out_params(self):
morph_hmm_model = unsupervised_morphology.MorphologyHMMParams()
with patch("builtins.open") as mock_open:
txt_content = [
"123 124 234 345",
"112 122 123 345",
"123456789",
"123456 456789",
]
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
morph_hmm_model.init_params_from_data("no_exist_file.txt")
for morph in morph_hmm_model.morph_emit_probs.keys():
assert morph_hmm_model.morph_emit_probs[morph] > 0
morph_hmm_model.zero_out_params()
for morph in morph_hmm_model.morph_emit_probs.keys():
assert morph_hmm_model.morph_emit_probs[morph] == 0
def test_emission_probs(self):
morph_hmm_model = unsupervised_morphology.MorphologyHMMParams()
with patch("builtins.open") as mock_open:
txt_content = [
"123 124 234 345",
"112 122 123 345",
"123456789",
"123456 456789",
]
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
morph_hmm_model.init_params_from_data("no_exist_file.txt")
# todo add more tests
e = 0.014141414141414142
e_r = e * math.exp(-9)
assert round(morph_hmm_model.emission_prob("1234"), 3) == round(e_r, 3)
def test_emission_log_prob(self):
morph_hmm_model = unsupervised_morphology.MorphologyHMMParams()
with patch("builtins.open") as mock_open:
txt_content = [
"123 124 234 345",
"112 122 123 345",
"123456789",
"123456 456789",
]
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
morph_hmm_model.init_params_from_data("no_exist_file.txt")
# todo add more tests
e = 0.014141414141414142
e_r = e * math.exp(-9)
assert round(morph_hmm_model.emission_log_prob("1234"), 3) == round(
math.log(e_r), 3
)
def test_segment_viterbi_no_smoothing(self):
morph_hmm_model = unsupervised_morphology.MorphologyHMMParams(
smoothing_const=0.0
)
with patch("builtins.open") as mock_open:
txt_content = [
"123 124 234 345",
"112 122 123 345",
"123456789",
"123456 456789",
]
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
morph_hmm_model.init_params_from_data("no_exist_file.txt")
segmentor = unsupervised_morphology.MorphologySegmentor(morph_hmm_model)
assert segmentor.segment_viterbi("123123789") == [0, 2, 3, 5, 6, 9]
def test_segment_viterbi_w_smoothing(self):
morph_hmm_model = unsupervised_morphology.MorphologyHMMParams()
with patch("builtins.open") as mock_open:
txt_content = [
"123 124 234 345",
"112 122 123 345",
"123456789",
"123456 456789",
]
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
morph_hmm_model.init_params_from_data("no_exist_file.txt")
segmentor = unsupervised_morphology.MorphologySegmentor(morph_hmm_model)
assert segmentor.segment_viterbi("123123789") == [0, 2, 3, 5, 6, 9]
def test_segment_word_no_smoothing(self):
morph_hmm_model = unsupervised_morphology.MorphologyHMMParams(
smoothing_const=0.0
)
with patch("builtins.open") as mock_open:
txt_content = [
"123 124 234 345",
"112 122 123 345",
"123456789",
"123456 456789",
]
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
morph_hmm_model.init_params_from_data("no_exist_file.txt")
segmentor = unsupervised_morphology.MorphologySegmentor(morph_hmm_model)
assert segmentor.segment_word("123123789789") == "12 3 12 3 789 789"
def check_emission_after_forward_backward(self, str, e, expected_morphemes):
for str in get_all_substrings(str):
if str in expected_morphemes:
assert e[str] > 0
else:
assert e[str] == 0
def test_forward_backward(self):
with patch("builtins.open") as mock_open:
txt_content = ["123 12123"]
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
unsupervised_model = unsupervised_morphology.UnsupervisedMorphology(
"no_exist_file.txt", smoothing_const=0.0
)
e = unsupervised_model.forward_backward("123")
# checking emission parameters
self.check_emission_after_forward_backward(
"123", e, get_all_substrings("123")
)
def test_forward_backward_long_str(self):
with patch("builtins.open") as mock_open:
txt_content = [
"123 124 234 345",
"112 122 123 345",
"123456789",
"123456 456789",
]
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
unsupervised_model = unsupervised_morphology.UnsupervisedMorphology(
"no_exist_file.txt", smoothing_const=0.0
)
e = unsupervised_model.forward_backward("1232345")
expected_morphs = {
"1",
"2",
"3",
"4",
"5",
"12",
"23",
"34",
"45",
"123",
"234",
"345",
"2345",
}
self.check_emission_after_forward_backward("1232345", e, expected_morphs)
def test_EM_alg(self):
txt_content = [
"work",
"works",
"worked",
"working",
"go",
"goes",
"gone",
"going",
"do",
"does",
"did",
"doing",
"see",
"saw",
"seen",
"seeing",
]
# Running with forward-backward.
with patch("builtins.open") as mock_open:
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
unsupervised_model = unsupervised_morphology.UnsupervisedMorphology(
"no_exist_file.txt", smoothing_const=0.0
)
unsupervised_model.expectation_maximization(10, 10)
# Running with Viterbi-EM.
with patch("builtins.open") as mock_open:
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
unsupervised_model = unsupervised_morphology.UnsupervisedMorphology(
"no_exist_file.txt", smoothing_const=0.0, use_hardEM=True
)
unsupervised_model.expectation_maximization(10, 10)
def test_get_expectations_from_viterbi(self):
with patch("builtins.open") as mock_open:
txt_content = [
"123 124 234 345",
"112 122 123 345",
"123456789",
"123456 456789",
]
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
um = unsupervised_morphology.UnsupervisedMorphology(
"no_exist_file.txt", smoothing_const=0.0, use_hardEM=True
)
assert um.segmentor.segment_viterbi("123123789") == [0, 2, 3, 5, 6, 9]
e = um.get_expectations_from_viterbi("123123789")
assert e["12"] == 2
assert e["789"] == 1
assert e["89"] == 0
def test_save_load(self):
with patch("builtins.open") as mock_open:
txt_content = [
"work",
"works",
"worked",
"working",
"go",
"goes",
"gone",
"going",
"do",
"does",
"did",
"doing",
"see",
"saw",
"seen",
"seeing",
]
mock_open.return_value.__enter__ = mock_open
mock_open.return_value.__iter__ = Mock(return_value=iter(txt_content))
unsupervised_model = unsupervised_morphology.UnsupervisedMorphology(
"no_exist_file.txt", smoothing_const=0.0
)
unsupervised_model.expectation_maximization(3, 2)
test_dir = tempfile.mkdtemp()
unsupervised_model.params.save(path.join(test_dir, "test.pickle"))
loaded_params = unsupervised_morphology.MorphologyHMMParams.load(
path.join(test_dir, "test.pickle")
)
assert (
unsupervised_model.params.morph_emit_probs == loaded_params.morph_emit_probs
)
assert unsupervised_model.params.word_counts == loaded_params.word_counts
assert (
unsupervised_model.params.smoothing_const == loaded_params.smoothing_const
)
assert unsupervised_model.params.SMALL_CONST == loaded_params.SMALL_CONST
assert unsupervised_model.params.len_cost_pow == loaded_params.len_cost_pow
shutil.rmtree(test_dir)
| 37.89769
| 88
| 0.574763
| 1,227
| 11,483
| 4.987775
| 0.136104
| 0.067974
| 0.055229
| 0.080719
| 0.76781
| 0.746242
| 0.709314
| 0.709314
| 0.707843
| 0.707843
| 0
| 0.086945
| 0.336933
| 11,483
| 302
| 89
| 38.023179
| 0.716837
| 0.012714
| 0
| 0.603774
| 0
| 0
| 0.102021
| 0
| 0
| 0
| 0
| 0.003311
| 0.075472
| 1
| 0.05283
| false
| 0
| 0.030189
| 0
| 0.086792
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
bef226bbdd9d90d6084c6d9a6e86c05efe346d4c
| 72
|
py
|
Python
|
CodeWars/8 Kyu/Fake Binary.py
|
anubhab-code/Competitive-Programming
|
de28cb7d44044b9e7d8bdb475da61e37c018ac35
|
[
"MIT"
] | null | null | null |
CodeWars/8 Kyu/Fake Binary.py
|
anubhab-code/Competitive-Programming
|
de28cb7d44044b9e7d8bdb475da61e37c018ac35
|
[
"MIT"
] | null | null | null |
CodeWars/8 Kyu/Fake Binary.py
|
anubhab-code/Competitive-Programming
|
de28cb7d44044b9e7d8bdb475da61e37c018ac35
|
[
"MIT"
] | null | null | null |
def fake_bin(x):
return "".join('0' if int(a)<5 else '1' for a in x)
| 36
| 55
| 0.583333
| 17
| 72
| 2.411765
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0.208333
| 72
| 2
| 55
| 36
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0.027397
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
830df8816d6d51de64a6027640a908c410d55970
| 232
|
py
|
Python
|
requirements/admin.py
|
georgiashay/fireroad-server2
|
fe6be11d3aaa6496c5464a764ef9a4cbfcba1bd7
|
[
"MIT"
] | 7
|
2019-01-22T07:30:58.000Z
|
2022-02-10T01:51:37.000Z
|
requirements/admin.py
|
georgiashay/fireroad-server2
|
fe6be11d3aaa6496c5464a764ef9a4cbfcba1bd7
|
[
"MIT"
] | 18
|
2019-05-08T21:08:01.000Z
|
2021-02-03T00:07:39.000Z
|
requirements/admin.py
|
georgiashay/fireroad-server2
|
fe6be11d3aaa6496c5464a764ef9a4cbfcba1bd7
|
[
"MIT"
] | 3
|
2019-01-29T04:09:03.000Z
|
2020-07-19T07:43:24.000Z
|
from django.contrib import admin
# Register your models here.
from .models import *
admin.site.register(RequirementsList)
admin.site.register(EditRequest)
admin.site.register(RequirementsStatement)
admin.site.register(Deployment)
| 23.2
| 42
| 0.827586
| 28
| 232
| 6.857143
| 0.5
| 0.1875
| 0.354167
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081897
| 232
| 9
| 43
| 25.777778
| 0.901408
| 0.112069
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
8317b3b79cdb24e1b3ef439b0d6e8e366222ea93
| 42
|
py
|
Python
|
tests/__init__.py
|
Alexplose/samsung-tv-ws-api
|
f92648cddc10f1263cb96281944b0c2c3978826a
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
Alexplose/samsung-tv-ws-api
|
f92648cddc10f1263cb96281944b0c2c3978826a
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
Alexplose/samsung-tv-ws-api
|
f92648cddc10f1263cb96281944b0c2c3978826a
|
[
"MIT"
] | null | null | null |
"""Test suite for samsungtvws package."""
| 21
| 41
| 0.714286
| 5
| 42
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119048
| 42
| 1
| 42
| 42
| 0.810811
| 0.833333
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
83208043002709d5b3613914e548c2cdbe9bf558
| 370
|
py
|
Python
|
tests/cosrlibtests/signals/test_wikidata.py
|
commonsearch/cosr-back
|
28ca0c1b938dde52bf4f59a835c98dd5ab22cad6
|
[
"Apache-2.0"
] | 141
|
2016-02-17T14:27:57.000Z
|
2021-12-27T02:56:48.000Z
|
tests/cosrlibtests/signals/test_wikidata.py
|
commonsearch/cosr-back
|
28ca0c1b938dde52bf4f59a835c98dd5ab22cad6
|
[
"Apache-2.0"
] | 69
|
2016-02-20T02:06:59.000Z
|
2017-01-29T22:23:46.000Z
|
tests/cosrlibtests/signals/test_wikidata.py
|
commonsearch/cosr-back
|
28ca0c1b938dde52bf4f59a835c98dd5ab22cad6
|
[
"Apache-2.0"
] | 38
|
2016-02-25T04:40:07.000Z
|
2020-06-11T07:22:44.000Z
|
def test_signal_wikidata_url(ranker):
rank = lambda url: ranker.client.get_signal_value_from_url("wikidata_url", url)
assert rank("http://www.douglasadams.com") > 0.5
assert rank("http://www.douglasadams.com/?a=b") > 0.5
assert rank("http://www.douglasadams.com/page2") == 0. # TODO, check domain?
assert rank("http://www.paulherbert.com/") == 0.
| 41.111111
| 83
| 0.683784
| 55
| 370
| 4.454545
| 0.472727
| 0.163265
| 0.228571
| 0.277551
| 0.408163
| 0.408163
| 0.277551
| 0.277551
| 0
| 0
| 0
| 0.021944
| 0.137838
| 370
| 8
| 84
| 46.25
| 0.746082
| 0.051351
| 0
| 0
| 0
| 0
| 0.376437
| 0
| 0
| 0
| 0
| 0.125
| 0.666667
| 1
| 0.166667
| false
| 0
| 0
| 0
| 0.166667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8321335b09b8d7feda6de2f50aa198b15283082c
| 37
|
py
|
Python
|
tests/__init__.py
|
the-wondersmith/sqlalchemy-dataflex
|
ef441ecb29645156070268f6bb41755dca7c8a6e
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
the-wondersmith/sqlalchemy-dataflex
|
ef441ecb29645156070268f6bb41755dca7c8a6e
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
the-wondersmith/sqlalchemy-dataflex
|
ef441ecb29645156070268f6bb41755dca7c8a6e
|
[
"MIT"
] | null | null | null |
"""Tests for SQLAlchemy-Dataflex."""
| 18.5
| 36
| 0.702703
| 4
| 37
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081081
| 37
| 1
| 37
| 37
| 0.764706
| 0.810811
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
832507367acf4aab571b904a0f9a0eb027eb0c3e
| 114
|
py
|
Python
|
linkapp/tests.py
|
Isaacg94/Neighbourhood-Watch
|
e448cfed099128288df733495d418f725dae7e9c
|
[
"MIT"
] | null | null | null |
linkapp/tests.py
|
Isaacg94/Neighbourhood-Watch
|
e448cfed099128288df733495d418f725dae7e9c
|
[
"MIT"
] | 1
|
2020-06-06T00:21:16.000Z
|
2020-06-06T00:21:16.000Z
|
linkapp/tests.py
|
Isaacg94/Neighbourhood-Watch
|
e448cfed099128288df733495d418f725dae7e9c
|
[
"MIT"
] | null | null | null |
from django.test import TestCase
from .models import Neighborhood,Profile,Business,Post
# Create your tests here.
| 28.5
| 54
| 0.824561
| 16
| 114
| 5.875
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114035
| 114
| 3
| 55
| 38
| 0.930693
| 0.201754
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
83539101224b4004fac5336949b76663994d09bf
| 302
|
py
|
Python
|
crypt.py
|
cyroilt/game
|
49dba23c8e361f8d870cb3260f3421ca9f9e16de
|
[
"BSD-3-Clause"
] | null | null | null |
crypt.py
|
cyroilt/game
|
49dba23c8e361f8d870cb3260f3421ca9f9e16de
|
[
"BSD-3-Clause"
] | null | null | null |
crypt.py
|
cyroilt/game
|
49dba23c8e361f8d870cb3260f3421ca9f9e16de
|
[
"BSD-3-Clause"
] | null | null | null |
from cryptography.fernet import Fernet
class crypto():
def gen_nkey():
return Fernet.generate_key()
def encrypt(data,key):
return Fernet(key).encrypt(data.encode())
def decrypt(data,key):
print(type(key))
return Fernet(key).decrypt(data).decode()
| 27.454545
| 50
| 0.629139
| 37
| 302
| 5.081081
| 0.513514
| 0.191489
| 0.159574
| 0.191489
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.245033
| 302
| 10
| 51
| 30.2
| 0.824561
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.111111
| 0.222222
| 0.888889
| 0.111111
| 0
| 0
| 0
| null | 0
| 0
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
83687547db611dbc2910625b1f4ea76f0f6092cb
| 2,185
|
py
|
Python
|
_assignments/design-patterns/decorator/decorator_func_e.py
|
sages-pl/2022-01-pythonsqlalchemy-aptiv
|
1d6d856608e9dbe25b139e8968c48b7f46753b84
|
[
"MIT"
] | null | null | null |
_assignments/design-patterns/decorator/decorator_func_e.py
|
sages-pl/2022-01-pythonsqlalchemy-aptiv
|
1d6d856608e9dbe25b139e8968c48b7f46753b84
|
[
"MIT"
] | null | null | null |
_assignments/design-patterns/decorator/decorator_func_e.py
|
sages-pl/2022-01-pythonsqlalchemy-aptiv
|
1d6d856608e9dbe25b139e8968c48b7f46753b84
|
[
"MIT"
] | null | null | null |
"""
* Assignment: Decorator Function Memoization
* Complexity: easy
* Lines of code: 3 lines
* Time: 8 min
English:
1. Create decorator `@cache`
2. Decorator must check before running function, if for given argument
the computation was already done:
a. if yes, return from `_cache`
b. if not, calculate new result, update cache and return computed value
3. Compare execution time using `timeit` (it might take around 30 seconds)
4. Last three tests will fail, this is only infomation about execution time
5. Run doctests - all must succeed
Polish:
1. Stwórz dekorator `@cache`
2. Decorator ma sprawdzać przed uruchomieniem funkcji, czy dla danego
argumentu wynik został już wcześniej obliczony:
a. jeżeli tak, to zwraca dane z `_cache`
b. jeżeli nie, to oblicza, aktualizuje `_cache`, a następnie zwraca wartość
3. Porównaj prędkość działania za pomocą `timeit` (może to trwać około 30 sekund)
4. Ostatnie trzy testy nie przejdą, to tylko informacja o czasie wykonywania
5. Uruchom doctesty - wszystkie muszą się powieść
Tests:
>>> import sys; sys.tracebacklimit = 0
>>> from timeit import timeit
>>> sys.setrecursionlimit(5000)
>>> @cache
... def fn1(n):
... if n == 0:
... return 1
... else:
... return n * fn1(n - 1)
>>> def fn2(n):
... if n == 0:
... return 1
... else:
... return n * fn2(n - 1)
>>> duration_cache = timeit(stmt='fn1(500); fn1(400); fn1(450); fn1(350)',
... globals=globals(), number=10_000)
>>> duration_nocache = timeit(stmt='fn2(500); fn2(400); fn2(450); fn2(350)',
... globals=globals(), number=10_000)
>>> duration_ratio = duration_nocache / duration_cache
>>> print(f'With Cache time: {duration_cache:.4f} seconds')
>>> print(f'Without Cache time: {duration_nocache:.3f} seconds')
>>> print(f'Cached solution is {duration_ratio:.1f} times faster')
TODO: Make tests faster
"""
_cache = {}
def cache(func):
def wrapper(n):
return func(n)
return wrapper
| 31.666667
| 85
| 0.618307
| 282
| 2,185
| 4.741135
| 0.567376
| 0.02917
| 0.022438
| 0.007479
| 0.088257
| 0.088257
| 0.088257
| 0.034405
| 0.034405
| 0
| 0
| 0.047559
| 0.26865
| 2,185
| 68
| 86
| 32.132353
| 0.789111
| 0.951945
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014706
| 0
| 1
| 0.4
| false
| 0
| 0
| 0.2
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
36197082622c9ddf956d1e4ea2afbf2fd266e95b
| 31,897
|
py
|
Python
|
lang/python/github/com/metaprov/modelaapi/services/conversation/v1/conversation_pb2.py
|
metaprov/modeldapi
|
ee05693832051dcd990ee4f061715d7ae0787340
|
[
"Apache-2.0"
] | 5
|
2022-02-18T03:40:10.000Z
|
2022-03-01T16:11:24.000Z
|
lang/python/github/com/metaprov/modelaapi/services/conversation/v1/conversation_pb2.py
|
metaprov/modeldapi
|
ee05693832051dcd990ee4f061715d7ae0787340
|
[
"Apache-2.0"
] | 1
|
2022-01-07T19:59:25.000Z
|
2022-02-04T01:21:14.000Z
|
lang/python/github/com/metaprov/modelaapi/services/conversation/v1/conversation_pb2.py
|
metaprov/modeldapi
|
ee05693832051dcd990ee4f061715d7ae0787340
|
[
"Apache-2.0"
] | 1
|
2022-03-25T10:21:43.000Z
|
2022-03-25T10:21:43.000Z
|
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: github.com/metaprov/modelaapi/services/review/v1/review.proto
"""Generated protocol buffer code."""
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
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from github.com.metaprov.modelaapi.pkg.apis.team.v1alpha1 import generated_pb2 as github_dot_com_dot_metaprov_dot_modelaapi_dot_pkg_dot_apis_dot_team_dot_v1alpha1_dot_generated__pb2
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='github.com/metaprov/modelaapi/services/review/v1/review.proto',
package='github.com.metaprov.modelaapi.services.review.v1',
syntax='proto3',
serialized_options=b'Z6github.com/metaprov/modelaapi/services/review/v1',
create_key=_descriptor._internal_create_key,
serialized_pb=b'\nIgithub.com/metaprov/modelaapi/services/review/v1/review.proto\x12\x36github.com.metaprov.modelaapi.services.review.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a\x44github.com/metaprov/modelaapi/pkg/apis/team/v1alpha1/generated.proto\x1a\x1cgoogle/api/annotations.proto\"\xd4\x01\n\x16GetReviewRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12j\n\x06labels\x18\x03 \x03(\x0b\x32Z.github.com.metaprov.modelaapi.services.review.v1.GetReviewRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"y\n\x17GetReviewResponse\x12P\n\x04item\x18\x01 \x01(\x0b\x32\x42.github.com.metaprov.modelaapi.pkg.apis.team.v1alpha1.Review\x12\x0c\n\x04yaml\x18\x02 \x01(\t\"m\n\x19\x43reateReviewRequest\x12P\n\x04item\x18\x01 \x01(\x0b\x32\x42.github.com.metaprov.modelaapi.pkg.apis.team.v1alpha1.Review\"\x1c\n\x1a\x43reateReviewResponse\"m\n\x19UpdateReviewRequest\x12P\n\x04item\x18\x01 \x01(\x0b\x32\x42.github.com.metaprov.modelaapi.pkg.apis.team.v1alpha1.Review\"\x1c\n\x1aUpdateReviewResponse\"\xda\x01\n\x19\x44\x65leteReviewRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12m\n\x06labels\x18\x03 \x03(\x0b\x32].github.com.metaprov.modelaapi.services.review.v1.DeleteReviewRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1c\n\x1a\x44\x65leteReviewResponse\"\xef\x01\n\x17ListReviewRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12k\n\x06labels\x18\x02 \x03(\x0b\x32[.github.com.metaprov.modelaapi.services.review.v1.ListReviewRequest.LabelsEntry\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8a\x01\n\x18ListReviewResponse\x12U\n\x05items\x18\x01 \x01(\x0b\x32\x46.github.com.metaprov.modelaapi.pkg.apis.team.v1alpha1.ReviewList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe7\t\n\x13\x43onversationService\x12\xe7\x01\n\x11ListReviews\x12O.github.com.metaprov.modelaapi.services.review.v1.ListReviewRequest\x1aP.github.com.metaprov.modelaapi.services.review.v1.ListReviewResponse\"/\x82\xd3\xe4\x93\x02)\x12\'/api/v1alpha1/reviews/{namespace}\x12\xe3\x01\n\x12\x43reateReview\x12Q.github.com.metaprov.modelaapi.services.review.v1.CreateReviewRequest\x1aR.github.com.metaprov.modelaapi.services.review.v1.CreateReviewResponse\"&\x82\xd3\xe4\x93\x02 \"\x1b/api/v1alpha1/reviews:\x01*\x12\xea\x01\n\x0fGetReview\x12N.github.com.metaprov.modelaapi.services.review.v1.GetReviewRequest\x1aO.github.com.metaprov.modelaapi.services.review.v1.GetReviewResponse\"6\x82\xd3\xe4\x93\x02\x30\x12./api/v1alpha1/reviews/{namespace}/{name}\x12\xa2\x02\n\x12UpdateReview\x12Q.github.com.metaprov.modelaapi.services.review.v1.UpdateReviewRequest\x1aR.github.com.metaprov.modelaapi.services.review.v1.UpdateReviewResponse\"e\x82\xd3\xe4\x93\x02_\x1aZ/api/v1alpha1/reviews/{review.metadata.namespace}/{review.metadata.name}:\x01*\x12\xed\x01\n\x12\x44\x65leteReview\x12Q.github.com.metaprov.modelaapi.services.review.v1.DeleteReviewRequest\x1aR.github.com.metaprov.modelaapi.services.review.v1.DeleteReviewResponse\"0\x82\xd3\xe4\x93\x02**(/api/v1/reviews/{namespace}/{name}B8Z6github.com/metaprov/modelaapi/services/review/v1b\x06proto3'
,
dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,github_dot_com_dot_metaprov_dot_modelaapi_dot_pkg_dot_apis_dot_team_dot_v1alpha1_dot_generated__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,])
_GETCONVERSATIONREQUEST_LABELSENTRY = _descriptor.Descriptor(
name='LabelsEntry',
full_name='github.com.metaprov.modelaapi.services.review.v1.GetReviewRequest.LabelsEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='github.com.metaprov.modelaapi.services.review.v1.GetReviewRequest.LabelsEntry.key', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='value', full_name='github.com.metaprov.modelaapi.services.review.v1.GetReviewRequest.LabelsEntry.value', index=1,
number=2, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=b'8\001',
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=430,
serialized_end=475,
)
_GETCONVERSATIONREQUEST = _descriptor.Descriptor(
name='GetReviewRequest',
full_name='github.com.metaprov.modelaapi.services.review.v1.GetReviewRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='namespace', full_name='github.com.metaprov.modelaapi.services.review.v1.GetReviewRequest.namespace', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='github.com.metaprov.modelaapi.services.review.v1.GetReviewRequest.name', index=1,
number=2, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='labels', full_name='github.com.metaprov.modelaapi.services.review.v1.GetReviewRequest.labels', index=2,
number=3, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[_GETCONVERSATIONREQUEST_LABELSENTRY, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=263,
serialized_end=475,
)
_GETCONVERSATIONRESPONSE = _descriptor.Descriptor(
name='GetReviewResponse',
full_name='github.com.metaprov.modelaapi.services.review.v1.GetReviewResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='item', full_name='github.com.metaprov.modelaapi.services.review.v1.GetReviewResponse.item', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='yaml', full_name='github.com.metaprov.modelaapi.services.review.v1.GetReviewResponse.yaml', index=1,
number=2, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=477,
serialized_end=598,
)
_CREATECONVERSATIONREQUEST = _descriptor.Descriptor(
name='CreateReviewRequest',
full_name='github.com.metaprov.modelaapi.services.review.v1.CreateReviewRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='item', full_name='github.com.metaprov.modelaapi.services.review.v1.CreateReviewRequest.item', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=600,
serialized_end=709,
)
_CREATECONVERSATIONRESPONSE = _descriptor.Descriptor(
name='CreateReviewResponse',
full_name='github.com.metaprov.modelaapi.services.review.v1.CreateReviewResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=711,
serialized_end=739,
)
_UPDATECONVERSATIONREQUEST = _descriptor.Descriptor(
name='UpdateReviewRequest',
full_name='github.com.metaprov.modelaapi.services.review.v1.UpdateReviewRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='item', full_name='github.com.metaprov.modelaapi.services.review.v1.UpdateReviewRequest.item', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=741,
serialized_end=850,
)
_UPDATECONVERSATIONRESPONSE = _descriptor.Descriptor(
name='UpdateReviewResponse',
full_name='github.com.metaprov.modelaapi.services.review.v1.UpdateReviewResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=852,
serialized_end=880,
)
_DELETECONVERSATIONREQUEST_LABELSENTRY = _descriptor.Descriptor(
name='LabelsEntry',
full_name='github.com.metaprov.modelaapi.services.review.v1.DeleteReviewRequest.LabelsEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='github.com.metaprov.modelaapi.services.review.v1.DeleteReviewRequest.LabelsEntry.key', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='value', full_name='github.com.metaprov.modelaapi.services.review.v1.DeleteReviewRequest.LabelsEntry.value', index=1,
number=2, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=b'8\001',
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=430,
serialized_end=475,
)
_DELETECONVERSATIONREQUEST = _descriptor.Descriptor(
name='DeleteReviewRequest',
full_name='github.com.metaprov.modelaapi.services.review.v1.DeleteReviewRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='namespace', full_name='github.com.metaprov.modelaapi.services.review.v1.DeleteReviewRequest.namespace', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='github.com.metaprov.modelaapi.services.review.v1.DeleteReviewRequest.name', index=1,
number=2, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='labels', full_name='github.com.metaprov.modelaapi.services.review.v1.DeleteReviewRequest.labels', index=2,
number=3, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[_DELETECONVERSATIONREQUEST_LABELSENTRY, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=883,
serialized_end=1101,
)
_DELETECONVERSATIONRESPONSE = _descriptor.Descriptor(
name='DeleteReviewResponse',
full_name='github.com.metaprov.modelaapi.services.review.v1.DeleteReviewResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1103,
serialized_end=1131,
)
_LISTCONVERSATIONREQUEST_LABELSENTRY = _descriptor.Descriptor(
name='LabelsEntry',
full_name='github.com.metaprov.modelaapi.services.review.v1.ListReviewRequest.LabelsEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='github.com.metaprov.modelaapi.services.review.v1.ListReviewRequest.LabelsEntry.key', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='value', full_name='github.com.metaprov.modelaapi.services.review.v1.ListReviewRequest.LabelsEntry.value', index=1,
number=2, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=b'8\001',
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=430,
serialized_end=475,
)
_LISTCONVERSATIONREQUEST = _descriptor.Descriptor(
name='ListReviewRequest',
full_name='github.com.metaprov.modelaapi.services.review.v1.ListReviewRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='namespace', full_name='github.com.metaprov.modelaapi.services.review.v1.ListReviewRequest.namespace', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='labels', full_name='github.com.metaprov.modelaapi.services.review.v1.ListReviewRequest.labels', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='page_size', full_name='github.com.metaprov.modelaapi.services.review.v1.ListReviewRequest.page_size', index=2,
number=3, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='page_token', full_name='github.com.metaprov.modelaapi.services.review.v1.ListReviewRequest.page_token', index=3,
number=4, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[_LISTCONVERSATIONREQUEST_LABELSENTRY, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1134,
serialized_end=1373,
)
_LISTCONVERSATIONRESPONSE = _descriptor.Descriptor(
name='ListReviewResponse',
full_name='github.com.metaprov.modelaapi.services.review.v1.ListReviewResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='items', full_name='github.com.metaprov.modelaapi.services.review.v1.ListReviewResponse.items', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='next_page_token', full_name='github.com.metaprov.modelaapi.services.review.v1.ListReviewResponse.next_page_token', index=1,
number=2, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1376,
serialized_end=1514,
)
_GETCONVERSATIONREQUEST_LABELSENTRY.containing_type = _GETCONVERSATIONREQUEST
_GETCONVERSATIONREQUEST.fields_by_name['labels'].message_type = _GETCONVERSATIONREQUEST_LABELSENTRY
_GETCONVERSATIONRESPONSE.fields_by_name['item'].message_type = github_dot_com_dot_metaprov_dot_modelaapi_dot_pkg_dot_apis_dot_team_dot_v1alpha1_dot_generated__pb2._CONVERSATION
_CREATECONVERSATIONREQUEST.fields_by_name['item'].message_type = github_dot_com_dot_metaprov_dot_modelaapi_dot_pkg_dot_apis_dot_team_dot_v1alpha1_dot_generated__pb2._CONVERSATION
_UPDATECONVERSATIONREQUEST.fields_by_name['item'].message_type = github_dot_com_dot_metaprov_dot_modelaapi_dot_pkg_dot_apis_dot_team_dot_v1alpha1_dot_generated__pb2._CONVERSATION
_DELETECONVERSATIONREQUEST_LABELSENTRY.containing_type = _DELETECONVERSATIONREQUEST
_DELETECONVERSATIONREQUEST.fields_by_name['labels'].message_type = _DELETECONVERSATIONREQUEST_LABELSENTRY
_LISTCONVERSATIONREQUEST_LABELSENTRY.containing_type = _LISTCONVERSATIONREQUEST
_LISTCONVERSATIONREQUEST.fields_by_name['labels'].message_type = _LISTCONVERSATIONREQUEST_LABELSENTRY
_LISTCONVERSATIONRESPONSE.fields_by_name['items'].message_type = github_dot_com_dot_metaprov_dot_modelaapi_dot_pkg_dot_apis_dot_team_dot_v1alpha1_dot_generated__pb2._CONVERSATIONLIST
DESCRIPTOR.message_types_by_name['GetReviewRequest'] = _GETCONVERSATIONREQUEST
DESCRIPTOR.message_types_by_name['GetReviewResponse'] = _GETCONVERSATIONRESPONSE
DESCRIPTOR.message_types_by_name['CreateReviewRequest'] = _CREATECONVERSATIONREQUEST
DESCRIPTOR.message_types_by_name['CreateReviewResponse'] = _CREATECONVERSATIONRESPONSE
DESCRIPTOR.message_types_by_name['UpdateReviewRequest'] = _UPDATECONVERSATIONREQUEST
DESCRIPTOR.message_types_by_name['UpdateReviewResponse'] = _UPDATECONVERSATIONRESPONSE
DESCRIPTOR.message_types_by_name['DeleteReviewRequest'] = _DELETECONVERSATIONREQUEST
DESCRIPTOR.message_types_by_name['DeleteReviewResponse'] = _DELETECONVERSATIONRESPONSE
DESCRIPTOR.message_types_by_name['ListReviewRequest'] = _LISTCONVERSATIONREQUEST
DESCRIPTOR.message_types_by_name['ListReviewResponse'] = _LISTCONVERSATIONRESPONSE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
GetReviewRequest = _reflection.GeneratedProtocolMessageType('GetReviewRequest', (_message.Message,), {
'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), {
'DESCRIPTOR' : _GETCONVERSATIONREQUEST_LABELSENTRY,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.GetReviewRequest.LabelsEntry)
})
,
'DESCRIPTOR' : _GETCONVERSATIONREQUEST,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.GetReviewRequest)
})
_sym_db.RegisterMessage(GetReviewRequest)
_sym_db.RegisterMessage(GetReviewRequest.LabelsEntry)
GetReviewResponse = _reflection.GeneratedProtocolMessageType('GetReviewResponse', (_message.Message,), {
'DESCRIPTOR' : _GETCONVERSATIONRESPONSE,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.GetReviewResponse)
})
_sym_db.RegisterMessage(GetReviewResponse)
CreateReviewRequest = _reflection.GeneratedProtocolMessageType('CreateReviewRequest', (_message.Message,), {
'DESCRIPTOR' : _CREATECONVERSATIONREQUEST,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.CreateReviewRequest)
})
_sym_db.RegisterMessage(CreateReviewRequest)
CreateReviewResponse = _reflection.GeneratedProtocolMessageType('CreateReviewResponse', (_message.Message,), {
'DESCRIPTOR' : _CREATECONVERSATIONRESPONSE,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.CreateReviewResponse)
})
_sym_db.RegisterMessage(CreateReviewResponse)
UpdateReviewRequest = _reflection.GeneratedProtocolMessageType('UpdateReviewRequest', (_message.Message,), {
'DESCRIPTOR' : _UPDATECONVERSATIONREQUEST,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.UpdateReviewRequest)
})
_sym_db.RegisterMessage(UpdateReviewRequest)
UpdateReviewResponse = _reflection.GeneratedProtocolMessageType('UpdateReviewResponse', (_message.Message,), {
'DESCRIPTOR' : _UPDATECONVERSATIONRESPONSE,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.UpdateReviewResponse)
})
_sym_db.RegisterMessage(UpdateReviewResponse)
DeleteReviewRequest = _reflection.GeneratedProtocolMessageType('DeleteReviewRequest', (_message.Message,), {
'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), {
'DESCRIPTOR' : _DELETECONVERSATIONREQUEST_LABELSENTRY,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.DeleteReviewRequest.LabelsEntry)
})
,
'DESCRIPTOR' : _DELETECONVERSATIONREQUEST,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.DeleteReviewRequest)
})
_sym_db.RegisterMessage(DeleteReviewRequest)
_sym_db.RegisterMessage(DeleteReviewRequest.LabelsEntry)
DeleteReviewResponse = _reflection.GeneratedProtocolMessageType('DeleteReviewResponse', (_message.Message,), {
'DESCRIPTOR' : _DELETECONVERSATIONRESPONSE,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.DeleteReviewResponse)
})
_sym_db.RegisterMessage(DeleteReviewResponse)
ListReviewRequest = _reflection.GeneratedProtocolMessageType('ListReviewRequest', (_message.Message,), {
'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), {
'DESCRIPTOR' : _LISTCONVERSATIONREQUEST_LABELSENTRY,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.ListReviewRequest.LabelsEntry)
})
,
'DESCRIPTOR' : _LISTCONVERSATIONREQUEST,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.ListReviewRequest)
})
_sym_db.RegisterMessage(ListReviewRequest)
_sym_db.RegisterMessage(ListReviewRequest.LabelsEntry)
ListReviewResponse = _reflection.GeneratedProtocolMessageType('ListReviewResponse', (_message.Message,), {
'DESCRIPTOR' : _LISTCONVERSATIONRESPONSE,
'__module__' : 'github.com.metaprov.modelaapi.services.review.v1.review_pb2'
# @@protoc_insertion_point(class_scope:github.com.metaprov.modelaapi.services.review.v1.ListReviewResponse)
})
_sym_db.RegisterMessage(ListReviewResponse)
DESCRIPTOR._options = None
_GETCONVERSATIONREQUEST_LABELSENTRY._options = None
_DELETECONVERSATIONREQUEST_LABELSENTRY._options = None
_LISTCONVERSATIONREQUEST_LABELSENTRY._options = None
_CONVERSATIONSERVICE = _descriptor.ServiceDescriptor(
name='ReviewService',
full_name='github.com.metaprov.modelaapi.services.review.v1.ReviewService',
file=DESCRIPTOR,
index=0,
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_start=1517,
serialized_end=2772,
methods=[
_descriptor.MethodDescriptor(
name='ListReviews',
full_name='github.com.metaprov.modelaapi.services.review.v1.ReviewService.ListReviews',
index=0,
containing_service=None,
input_type=_LISTCONVERSATIONREQUEST,
output_type=_LISTCONVERSATIONRESPONSE,
serialized_options=b'\202\323\344\223\002)\022\'/api/v1alpha1/reviews/{namespace}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='CreateReview',
full_name='github.com.metaprov.modelaapi.services.review.v1.ReviewService.CreateReview',
index=1,
containing_service=None,
input_type=_CREATECONVERSATIONREQUEST,
output_type=_CREATECONVERSATIONRESPONSE,
serialized_options=b'\202\323\344\223\002 \"\033/api/v1alpha1/reviews:\001*',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='GetReview',
full_name='github.com.metaprov.modelaapi.services.review.v1.ReviewService.GetReview',
index=2,
containing_service=None,
input_type=_GETCONVERSATIONREQUEST,
output_type=_GETCONVERSATIONRESPONSE,
serialized_options=b'\202\323\344\223\0020\022./api/v1alpha1/reviews/{namespace}/{name}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='UpdateReview',
full_name='github.com.metaprov.modelaapi.services.review.v1.ReviewService.UpdateReview',
index=3,
containing_service=None,
input_type=_UPDATECONVERSATIONREQUEST,
output_type=_UPDATECONVERSATIONRESPONSE,
serialized_options=b'\202\323\344\223\002_\032Z/api/v1alpha1/reviews/{review.metadata.namespace}/{review.metadata.name}:\001*',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='DeleteReview',
full_name='github.com.metaprov.modelaapi.services.review.v1.ReviewService.DeleteReview',
index=4,
containing_service=None,
input_type=_DELETECONVERSATIONREQUEST,
output_type=_DELETECONVERSATIONRESPONSE,
serialized_options=b'\202\323\344\223\002**(/api/v1/reviews/{namespace}/{name}',
create_key=_descriptor._internal_create_key,
),
])
_sym_db.RegisterServiceDescriptor(_CONVERSATIONSERVICE)
DESCRIPTOR.services_by_name['ReviewService'] = _CONVERSATIONSERVICE
# @@protoc_insertion_point(module_scope)
| 45.894964
| 3,368
| 0.78487
| 3,746
| 31,897
| 6.38441
| 0.074212
| 0.042775
| 0.077772
| 0.095668
| 0.755059
| 0.715504
| 0.704926
| 0.693009
| 0.644506
| 0.602107
| 0
| 0.033521
| 0.09468
| 31,897
| 694
| 3,369
| 45.961095
| 0.794681
| 0.052387
| 0
| 0.658147
| 1
| 0.0623
| 0.268516
| 0.222925
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.011182
| 0
| 0.011182
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 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
| 5
|
361aae7fc24fa20a774d0d171dd2c81b0a0a785a
| 39
|
py
|
Python
|
test/login.py
|
blackcat168/test21
|
b13cf5c41f12b375dc4a1cf4326b2597e2362243
|
[
"MIT"
] | null | null | null |
test/login.py
|
blackcat168/test21
|
b13cf5c41f12b375dc4a1cf4326b2597e2362243
|
[
"MIT"
] | null | null | null |
test/login.py
|
blackcat168/test21
|
b13cf5c41f12b375dc4a1cf4326b2597e2362243
|
[
"MIT"
] | null | null | null |
num1 = 1
num2 = 2
num3 = 45
num4 = 23
| 6.5
| 9
| 0.564103
| 8
| 39
| 2.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.384615
| 0.333333
| 39
| 5
| 10
| 7.8
| 0.461538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3633a65af9c66b0e74d4391b2e624c1369c39503
| 162
|
py
|
Python
|
main.py
|
SambhavBhurtel/ShareMunshi
|
0e82792c2d26afa6acc4b3fffb339a258b782530
|
[
"MIT"
] | 1
|
2021-05-21T11:07:48.000Z
|
2021-05-21T11:07:48.000Z
|
main.py
|
SambhavBhurtel/ShareMunshi
|
0e82792c2d26afa6acc4b3fffb339a258b782530
|
[
"MIT"
] | 1
|
2021-01-31T17:46:20.000Z
|
2021-02-02T16:22:29.000Z
|
main.py
|
SambhavBhurtel/ShareMunshi
|
0e82792c2d26afa6acc4b3fffb339a258b782530
|
[
"MIT"
] | null | null | null |
#! .\\venv\\Scripts\\python.exe
from Scrapper.ScrapeName import scrip_info
from Scrapper.ScrapeMD import md_printer
md_printer(False)
print(scrip_info('PLI'))
| 18
| 42
| 0.783951
| 23
| 162
| 5.347826
| 0.695652
| 0.195122
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092593
| 162
| 9
| 43
| 18
| 0.836735
| 0.185185
| 0
| 0
| 0
| 0
| 0.022727
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.75
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
3688aff4a2012966580b4573c580aa34f3cddfad
| 169
|
py
|
Python
|
text2qdmr/model/modules/__init__.py
|
guoyi118/sparqling-queries
|
8c9b9f517d6e05ac465a84df79f40484bc852c26
|
[
"MIT"
] | 21
|
2021-09-14T11:33:05.000Z
|
2022-03-29T13:22:19.000Z
|
text2qdmr/model/modules/__init__.py
|
guoyi118/sparqling-queries
|
8c9b9f517d6e05ac465a84df79f40484bc852c26
|
[
"MIT"
] | 1
|
2022-02-14T21:13:15.000Z
|
2022-02-18T20:23:36.000Z
|
text2qdmr/model/modules/__init__.py
|
guoyi118/sparqling-queries
|
8c9b9f517d6e05ac465a84df79f40484bc852c26
|
[
"MIT"
] | 5
|
2021-09-20T08:54:55.000Z
|
2022-02-10T00:59:54.000Z
|
from . import abstract_preproc
from . import attention
from . import decoder_utils
from . import encoder_modules
from . import transformer
from . import variational_lstm
| 28.166667
| 30
| 0.828402
| 22
| 169
| 6.181818
| 0.545455
| 0.441176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136095
| 169
| 6
| 31
| 28.166667
| 0.931507
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
3699c6802ee13533e98c48b902be73fe0bd7cfc6
| 1,077
|
py
|
Python
|
src/HafrenHaver/pattern.py
|
InnovAnon-Inc/HafrenHaver
|
5283ae3817c500f2365d1c8108dd3270aceb28fa
|
[
"Unlicense"
] | 2
|
2020-11-09T19:30:26.000Z
|
2020-12-29T21:38:40.000Z
|
src/HafrenHaver/pattern.py
|
InnovAnon-Inc/HafrenHaver
|
5283ae3817c500f2365d1c8108dd3270aceb28fa
|
[
"Unlicense"
] | null | null | null |
src/HafrenHaver/pattern.py
|
InnovAnon-Inc/HafrenHaver
|
5283ae3817c500f2365d1c8108dd3270aceb28fa
|
[
"Unlicense"
] | null | null | null |
#! /usr/bin/env python3
class Pattern:
def __init__ (self, order):
#rev = {}
#I = range (0, len (order))
#for i, v in zip (I, order):
# if v in rev: temp = rev[v]
# else: temp = []
# rev[v] = tuple (temp + [i])
self.order = order
#self.rev = rev
def __repr__ (self): return "Pattern [order=%s]" % (self.order,)
# TODO __str__
def __len__ (self): return len (self.order)
def __getitem__ (self, key): return self.order[key]
def __iter__ (self): return iter (self.order)
def __reversed__ (self): return reversed (self.order)
def __contains__ (self, item): return item in self.order
def uniq_elements (self): return tuple (set (self.order))
def nuniq (self): return len (self.uniq_elements ())
"""
##@jit
def elem (self, i): return self.order[i]
##@jit
def all (self): return self.order
# @jit
def indices (self, k):
I = range (0, len (self.order))
#for i, v in zip (I, self.order):
# if v == k: yield i
I = zip (I, self.order)
I = filter (lambda iv: v == k, I)
return (i for i, v in I)
"""
| 28.342105
| 65
| 0.597029
| 168
| 1,077
| 3.625
| 0.279762
| 0.206897
| 0.098522
| 0.034483
| 0.052545
| 0.052545
| 0.052545
| 0
| 0
| 0
| 0
| 0.003672
| 0.241411
| 1,077
| 37
| 66
| 29.108108
| 0.741738
| 0.178273
| 0
| 0
| 0
| 0
| 0.032028
| 0
| 0
| 0
| 0
| 0.027027
| 0
| 1
| 0.818182
| false
| 0
| 0
| 0.727273
| 0.909091
| 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
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
36ac6b11fcc86936a072fcccc4b9689ebc4a7107
| 623
|
py
|
Python
|
colour/constants/__init__.py
|
aurelienpierre/colour
|
3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47
|
[
"BSD-3-Clause"
] | null | null | null |
colour/constants/__init__.py
|
aurelienpierre/colour
|
3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47
|
[
"BSD-3-Clause"
] | null | null | null |
colour/constants/__init__.py
|
aurelienpierre/colour
|
3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47
|
[
"BSD-3-Clause"
] | null | null | null |
from .cie import CONSTANT_K_M, CONSTANT_KP_M
from .codata import (
CONSTANT_AVOGADRO,
CONSTANT_BOLTZMANN,
CONSTANT_LIGHT_SPEED,
CONSTANT_PLANCK,
)
from .common import (
FLOATING_POINT_NUMBER_PATTERN,
INTEGER_THRESHOLD,
EPSILON,
DEFAULT_INT_DTYPE,
DEFAULT_FLOAT_DTYPE,
)
__all__ = [
"CONSTANT_K_M",
"CONSTANT_KP_M",
]
__all__ += [
"CONSTANT_AVOGADRO",
"CONSTANT_BOLTZMANN",
"CONSTANT_LIGHT_SPEED",
"CONSTANT_PLANCK",
]
__all__ += [
"FLOATING_POINT_NUMBER_PATTERN",
"INTEGER_THRESHOLD",
"EPSILON",
"DEFAULT_INT_DTYPE",
"DEFAULT_FLOAT_DTYPE",
]
| 18.878788
| 44
| 0.696629
| 68
| 623
| 5.705882
| 0.382353
| 0.072165
| 0.051546
| 0.092784
| 0.860825
| 0.860825
| 0.752577
| 0.752577
| 0.752577
| 0.417526
| 0
| 0
| 0.205457
| 623
| 32
| 45
| 19.46875
| 0.783838
| 0
| 0
| 0.064516
| 0
| 0
| 0.295345
| 0.046549
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.096774
| 0
| 0.096774
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
36cd272629ee7945ebf458cd3d261a5b51d9d605
| 1,492
|
py
|
Python
|
Ordered-Collection-Data-Types.py
|
thejacobhardman/Ordered-Collection-Data-Types
|
bedec6151427a30a7e16483c2fcebb41cb10f31d
|
[
"MIT"
] | null | null | null |
Ordered-Collection-Data-Types.py
|
thejacobhardman/Ordered-Collection-Data-Types
|
bedec6151427a30a7e16483c2fcebb41cb10f31d
|
[
"MIT"
] | null | null | null |
Ordered-Collection-Data-Types.py
|
thejacobhardman/Ordered-Collection-Data-Types
|
bedec6151427a30a7e16483c2fcebb41cb10f31d
|
[
"MIT"
] | null | null | null |
#Jacob Hardman
#CS301 Algorithms and Data Structures
#Dr. Nathaniel Miller
#Stack
class Stack:
def __init__(self):
self.items = []
def push(self, item):
self.items.append(item)
def pop(self):
return self.items.pop()
def peek(self):
return self.items[len(self.items)-1]
def isEmpty(self):
return self.items == []
def size(self):
return len(self.items)
#Queue
class Queue:
def __init__(self):
self.items = []
def enqueue(self, item):
self.items.insert(0, item)
def dequeue(self):
return self.items.pop()
def isEmpty(self):
return self.items == []
def size(self):
return len(self.items)
#Deque
class Deque:
def __init__(self):
self.items = []
def addFront(self, item):
self.items.append(item)
def addRear(self, item):
self.items.insert(0, item)
def removeFront(self):
return self.items.pop(0)
def removeRear(self):
return self.items.pop(0)
def isEmpty(self):
return self.items == []
def size(self):
return len(self.items)
#Node
class Node:
def __init__(self, initData):
self.data = initData
self.next = None
def getData(self):
return self.data
def getNext(self):
return self.next
def setData(self, newData):
self.data = newData
def setNext(self, newNext):
self.next = newNext
| 18.195122
| 44
| 0.579088
| 186
| 1,492
| 4.55914
| 0.247312
| 0.201651
| 0.165094
| 0.179245
| 0.543632
| 0.543632
| 0.40684
| 0.278302
| 0.205189
| 0.205189
| 0
| 0.0077
| 0.303619
| 1,492
| 81
| 45
| 18.419753
| 0.80847
| 0.058981
| 0
| 0.509804
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.45098
| false
| 0
| 0
| 0.254902
| 0.784314
| 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
| 1
| 0
|
0
| 5
|
36d6f5b03374d2cb20bc0b0f25d99f6acfec8445
| 9,440
|
py
|
Python
|
froide/tests/live/test_request.py
|
rufuspollock/froide
|
8ef4dbdd54a74f8c986d59e90348dfdbd85c5da4
|
[
"MIT"
] | null | null | null |
froide/tests/live/test_request.py
|
rufuspollock/froide
|
8ef4dbdd54a74f8c986d59e90348dfdbd85c5da4
|
[
"MIT"
] | null | null | null |
froide/tests/live/test_request.py
|
rufuspollock/froide
|
8ef4dbdd54a74f8c986d59e90348dfdbd85c5da4
|
[
"MIT"
] | null | null | null |
import time
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test import LiveServerTestCase
from django.contrib.auth.models import User
from selenium.webdriver.support.wait import WebDriverWait
from froide.foirequest.tests import factories
from froide.foirequest.models import FoiRequest
from froide.publicbody.models import PublicBody
def get_selenium():
driver = getattr(settings, 'TEST_SELENIUM_DRIVER', 'firefox')
if driver == 'chrome':
from selenium.webdriver.chrome.webdriver import WebDriver as ChromeDriver
return ChromeDriver()
elif driver == 'phantomjs':
from selenium.webdriver import PhantomJS
return PhantomJS()
else:
from selenium.webdriver.firefox.webdriver import WebDriver as FirefoxDriver
return FirefoxDriver()
class TestMakingRequest(LiveServerTestCase):
@classmethod
def setUpClass(cls):
cls.selenium = get_selenium()
cls.selenium.implicitly_wait(10)
super(TestMakingRequest, cls).setUpClass()
@classmethod
def tearDownClass(cls):
cls.selenium.quit()
super(TestMakingRequest, cls).tearDownClass()
def setUp(self):
factories.make_world()
factories.rebuild_index()
self.do_logout()
self.user = User.objects.all()[0]
self.pb = PublicBody.objects.all()[0]
def do_login(self, navigate=True):
if navigate:
self.selenium.get('%s%s' % (self.live_server_url, reverse('account-login')))
email_input = self.selenium.find_element_by_id("id_email")
email_input.send_keys(self.user.email)
password_input = self.selenium.find_element_by_id("id_password")
password_input.send_keys('froide')
self.selenium.find_element_by_xpath(
'//form/button[.="Log In"]').click()
def do_logout(self):
self.selenium.get('%s%s' % (self.live_server_url, reverse('account-logout')))
def test_make_not_logged_in_request(self):
self.selenium.get('%s%s' % (self.live_server_url,
reverse('foirequest-make_request')))
search_pbs = self.selenium.find_element_by_id('id_public_body')
search_pbs.send_keys(self.pb.name)
self.selenium.find_element_by_class_name('search-public_bodies-submit').click()
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_css_selector('.search-results .result'))
self.selenium.find_element_by_css_selector('.search-results .result label').click()
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_id('option-check_foi').is_displayed())
self.selenium.find_element_by_id('option-check_foi').click()
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_id('continue-foicheck'))
self.selenium.find_element_by_id('continue-foicheck').click()
req_title = 'FoiRequest Number'
self.selenium.find_element_by_id('id_subject').send_keys(req_title)
self.selenium.find_element_by_id('id_body').send_keys('Documents describing something...')
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_elements_by_css_selector('#similar-requests li'))
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_id('review-button').is_displayed()
)
self.selenium.find_element_by_id('id_first_name')\
.send_keys('Peter')
self.selenium.find_element_by_id('id_last_name')\
.send_keys('Parker')
user_email = 'peter.parker@example.com'
self.selenium.find_element_by_id('id_user_email')\
.send_keys(user_email)
self.selenium.find_element_by_id('id_terms').click()
self.selenium.find_element_by_id('review-button').click()
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_css_selector('#review-text .highlight'))
time.sleep(0.5)
self.selenium.find_element_by_id('send-request-button').click()
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_css_selector('.heroine-unit'))
new_user = User.objects.get(email=user_email)
self.assertEqual(new_user.get_profile().private, False)
req = FoiRequest.objects.get(user=new_user)
self.assertEqual(req.title, req_title)
self.assertEqual(req.public, True)
self.assertEqual(req.public_body, self.pb)
self.assertEqual(req.status, 'awaiting_user_confirmation')
def test_make_not_logged_in_request_to_public_body(self):
self.selenium.get('%s%s' % (self.live_server_url,
reverse('foirequest-make_request',
kwargs={'public_body': self.pb.slug})))
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_id('option-check_foi').is_displayed())
self.selenium.find_element_by_id('option-check_foi').click()
self.selenium.find_element_by_id('continue-foicheck').click()
req_title = 'FoiRequest Number'
self.selenium.find_element_by_id('id_subject').send_keys(req_title)
self.selenium.find_element_by_id('id_body').send_keys('Documents describing something...')
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_elements_by_css_selector('#similar-requests li'))
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_id('review-button').is_displayed()
)
user_first_name = 'Peter'
user_last_name = 'Parker'
self.selenium.find_element_by_id('id_first_name')\
.send_keys(user_first_name)
self.selenium.find_element_by_id('id_last_name')\
.send_keys(user_last_name)
user_email = 'peter.parker@example.com'
self.selenium.find_element_by_id('id_user_email')\
.send_keys(user_email)
self.selenium.find_element_by_id('id_terms').click()
self.selenium.find_element_by_id('id_public').click()
self.selenium.find_element_by_id('id_private').click()
self.selenium.find_element_by_id('review-button').click()
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_css_selector('#review-text .highlight'))
time.sleep(0.5)
self.selenium.find_element_by_id('send-request-button').click()
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_css_selector('.heroine-unit'))
new_user = User.objects.get(email=user_email)
self.assertEqual(new_user.first_name, user_first_name)
self.assertEqual(new_user.last_name, user_last_name)
self.assertEqual(new_user.get_profile().private, True)
req = FoiRequest.objects.get(user=new_user)
self.assertEqual(req.title, req_title)
self.assertEqual(req.public, False)
self.assertEqual(req.public_body, self.pb)
self.assertEqual(req.status, 'awaiting_user_confirmation')
def test_make_logged_in_request(self):
self.do_login()
self.selenium.get('%s%s' % (self.live_server_url,
reverse('foirequest-make_request')))
search_pbs = self.selenium.find_element_by_id('id_public_body')
search_pbs.send_keys(self.pb.name)
self.selenium.find_element_by_class_name('search-public_bodies-submit').click()
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_css_selector('.search-results .result'))
self.selenium.find_element_by_css_selector('.search-results .result label').click()
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_id('option-check_foi').is_displayed())
self.selenium.find_element_by_id('option-check_foi').click()
self.selenium.find_element_by_id('continue-foicheck').click()
req_title = 'FoiRequest Number'
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_id('id_body').is_displayed()
)
self.selenium.find_element_by_id('id_subject').send_keys(req_title)
self.selenium.find_element_by_id('id_body').send_keys('Documents describing something...')
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_elements_by_css_selector('#similar-requests li'))
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_id('review-button').is_displayed()
)
self.selenium.find_element_by_id('review-button').click()
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_css_selector('#review-text .highlight'))
time.sleep(0.5)
self.selenium.find_element_by_id('send-request-button').click()
WebDriverWait(self.selenium, 5).until(
lambda driver: driver.find_element_by_css_selector('#messages'))
req = FoiRequest.objects.filter(user=self.user).order_by('-id')[0]
self.assertIn(req.get_absolute_url(), self.selenium.current_url)
self.assertEqual(req.title, req_title)
self.assertEqual(req.public, True)
self.assertEqual(req.public_body, self.pb)
self.assertEqual(req.status, 'awaiting_response')
| 49.684211
| 98
| 0.692903
| 1,195
| 9,440
| 5.185774
| 0.12636
| 0.120058
| 0.111183
| 0.096821
| 0.767468
| 0.754881
| 0.750686
| 0.734065
| 0.716314
| 0.714539
| 0
| 0.003915
| 0.188242
| 9,440
| 189
| 99
| 49.94709
| 0.804776
| 0
| 0
| 0.574713
| 0
| 0
| 0.140784
| 0.023623
| 0
| 0
| 0
| 0
| 0.097701
| 1
| 0.051724
| false
| 0.011494
| 0.068966
| 0
| 0.143678
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3d4901c32cce4343e035e945d5cfab485c4236e9
| 422
|
py
|
Python
|
zoho_subscriptions/tests/subscription_test.py
|
st8st8/django-zoho-subscriptions
|
d788a6c8305d61907b1772e698c41234d4c26e98
|
[
"MIT"
] | null | null | null |
zoho_subscriptions/tests/subscription_test.py
|
st8st8/django-zoho-subscriptions
|
d788a6c8305d61907b1772e698c41234d4c26e98
|
[
"MIT"
] | null | null | null |
zoho_subscriptions/tests/subscription_test.py
|
st8st8/django-zoho-subscriptions
|
d788a6c8305d61907b1772e698c41234d4c26e98
|
[
"MIT"
] | null | null | null |
from django.test import TestCase
from zoho_subscriptions.subscriptions.subscription import Subscription
class SubscriptionTest(TestCase):
def get_list(self):
subscriptions = Subscription()
print(subscriptions.list_subscriptions_by_customer("112407000000035015"))
def get_details(self):
subscriptions = Subscription()
print(subscriptions.get_subscriptions("112407000000238188"))
| 30.142857
| 81
| 0.767773
| 39
| 422
| 8.128205
| 0.512821
| 0.236593
| 0.182965
| 0.214511
| 0.29653
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101124
| 0.156398
| 422
| 13
| 82
| 32.461538
| 0.789326
| 0
| 0
| 0.222222
| 0
| 0
| 0.085511
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.222222
| 0
| 0.555556
| 0.222222
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
3d490364411b379dd317310b787bf25362efe3fa
| 127
|
py
|
Python
|
axf_project/axf_project/__init__.py
|
General-ITer/Django-Introduction
|
e88b12682f9abc46a90a0fc79e7443537230a506
|
[
"Apache-2.0"
] | null | null | null |
axf_project/axf_project/__init__.py
|
General-ITer/Django-Introduction
|
e88b12682f9abc46a90a0fc79e7443537230a506
|
[
"Apache-2.0"
] | 1
|
2020-12-09T18:26:36.000Z
|
2020-12-09T18:26:36.000Z
|
axf_project/axf_project/__init__.py
|
General-ITer/Django-Introduction
|
e88b12682f9abc46a90a0fc79e7443537230a506
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import
from .celery import app as celery_app
import pymysql
pymysql.install_as_MySQLdb()
| 25.4
| 40
| 0.818898
| 18
| 127
| 5.333333
| 0.555556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.149606
| 127
| 5
| 41
| 25.4
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
e9e5d9a3ae0bebc1ce4244eb8c1ccb7d501dedd0
| 89
|
py
|
Python
|
ucp/__init__.py
|
MattBBaker/ucx-py
|
c94a7400cf0df0fdf7a9e48e8a09c8231c194385
|
[
"BSD-3-Clause"
] | null | null | null |
ucp/__init__.py
|
MattBBaker/ucx-py
|
c94a7400cf0df0fdf7a9e48e8a09c8231c194385
|
[
"BSD-3-Clause"
] | null | null | null |
ucp/__init__.py
|
MattBBaker/ucx-py
|
c94a7400cf0df0fdf7a9e48e8a09c8231c194385
|
[
"BSD-3-Clause"
] | null | null | null |
from ._utils import get_address, make_server # noqa
from ._libs.ucp_py import * # noqa
| 29.666667
| 52
| 0.752809
| 14
| 89
| 4.428571
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168539
| 89
| 2
| 53
| 44.5
| 0.837838
| 0.101124
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
18039dbaf78bdc80fe8bc0d584c7c57dd2640dfb
| 23,206
|
py
|
Python
|
pcdet/models/rpn/rpn_unet.py
|
charlesyz/PCDet
|
1eb6b1dc5a3d563d7532b1c8ee3be007cbeafc80
|
[
"Apache-2.0"
] | null | null | null |
pcdet/models/rpn/rpn_unet.py
|
charlesyz/PCDet
|
1eb6b1dc5a3d563d7532b1c8ee3be007cbeafc80
|
[
"Apache-2.0"
] | null | null | null |
pcdet/models/rpn/rpn_unet.py
|
charlesyz/PCDet
|
1eb6b1dc5a3d563d7532b1c8ee3be007cbeafc80
|
[
"Apache-2.0"
] | null | null | null |
import torch
import torch.nn as nn
import torch.nn.functional as F
import spconv
from functools import partial
from ..model_utils.resnet_utils import SparseBasicBlock
from ...config import cfg
from ...utils import common_utils, loss_utils
from ...ops.roiaware_pool3d import roiaware_pool3d_utils
class UNetHead(nn.Module):
def __init__(self, unet_target_cfg):
super().__init__()
self.gt_extend_width = unet_target_cfg.GT_EXTEND_WIDTH
if 'MEAN_SIZE' in unet_target_cfg:
self.mean_size = unet_target_cfg.MEAN_SIZE
self.target_generated_on = unet_target_cfg.GENERATED_ON
self.cls_loss_func = loss_utils.SigmoidFocalClassificationLoss(alpha=0.25, gamma=2.0)
self.forward_ret_dict = None
def assign_targets(self, batch_points, gt_boxes, generate_bbox_reg_labels=False):
"""
:param points: [(N1, 3), (N2, 3), ...]
:param gt_boxes: (B, M, 8)
:param gt_classes: (B, M)
:param gt_names: (B, M)
:return:
"""
batch_size = gt_boxes.shape[0]
cls_labels_list, part_reg_labels_list, bbox_reg_labels_list = [], [], []
for k in range(batch_size):
if True or self.target_generated_on == 'head_cpu':
cur_cls_labels, cur_part_reg_labels, cur_bbox_reg_labels = self.generate_part_targets_cpu(
points=batch_points[k],
gt_boxes=gt_boxes[k][:, 0:-1],
gt_classes=gt_boxes[k][:, -1],
generate_bbox_reg_labels=generate_bbox_reg_labels
)
else:
raise NotImplementedError
cls_labels_list.append(cur_cls_labels)
part_reg_labels_list.append(cur_part_reg_labels)
bbox_reg_labels_list.append(cur_bbox_reg_labels)
cls_labels = torch.cat(cls_labels_list, dim=0).cuda()
part_reg_labels = torch.cat(part_reg_labels_list, dim=0).cuda()
bbox_reg_labels = torch.cat(bbox_reg_labels_list, dim=0).cuda() if generate_bbox_reg_labels else None
targets_dict = {
'seg_labels': cls_labels,
'part_labels': part_reg_labels,
'bbox_reg_labels': bbox_reg_labels
}
return targets_dict
def generate_part_targets_cpu(self, points, gt_boxes, gt_classes, generate_bbox_reg_labels=False):
"""
:param voxel_centers: (N, 3) [x, y, z]
:param gt_boxes: (M, 7) [x, y, z, w, l, h, ry] in LiDAR coords
:return:
"""
k = gt_boxes.__len__() - 1
while k > 0 and gt_boxes[k].sum() == 0:
k -= 1
gt_boxes = gt_boxes[:k + 1]
gt_classes = gt_classes[:k + 1]
extend_gt_boxes = common_utils.enlarge_box3d(gt_boxes, extra_width=self.gt_extend_width)
cls_labels = torch.zeros(points.shape[0]).int()
part_reg_labels = torch.zeros((points.shape[0], 3)).float()
bbox_reg_labels = torch.zeros((points.shape[0], len(gt_boxes[0]))).float() if generate_bbox_reg_labels else None
point_indices = roiaware_pool3d_utils.points_in_boxes_cpu(points, gt_boxes).long()
extend_point_indices = roiaware_pool3d_utils.points_in_boxes_cpu(points, extend_gt_boxes).long()
for k in range(gt_boxes.shape[0]):
fg_pt_flag = point_indices[k] > 0
fg_points = points[fg_pt_flag]
cls_labels[fg_pt_flag] = gt_classes[k]
# enlarge the bbox3d, ignore nearby points
fg_enlarge_flag = extend_point_indices[k] > 0
ignore_flag = fg_pt_flag ^ fg_enlarge_flag
cls_labels[ignore_flag] = -1
# part offset labels
transformed_points = fg_points - gt_boxes[k, 0:3]
transformed_points = common_utils.rotate_pc_along_z_torch(
transformed_points.view(1, -1, 3), -gt_boxes[k, 6]
)
part_reg_labels[fg_pt_flag] = (transformed_points / gt_boxes[k, 3:6]) + torch.tensor([0.5, 0.5, 0]).float()
if generate_bbox_reg_labels:
# rpn bbox regression target
center3d = gt_boxes[k, 0:3].clone()
center3d[2] += gt_boxes[k][5] / 2 # shift to center of 3D boxes
bbox_reg_labels[fg_pt_flag, 0:3] = center3d - fg_points
bbox_reg_labels[fg_pt_flag, 6] = gt_boxes[k, 6] # dy
cur_mean_size = torch.tensor(self.mean_size[cfg.CLASS_NAMES[gt_classes[k] - 1]])
bbox_reg_labels[fg_pt_flag, 3:6] = (gt_boxes[k, 3:6] - cur_mean_size) / cur_mean_size
return cls_labels, part_reg_labels, bbox_reg_labels
def get_loss(self, forward_ret_dict=None):
forward_ret_dict = self.forward_ret_dict if forward_ret_dict is None else forward_ret_dict
tb_dict = {}
u_seg_preds = forward_ret_dict['u_seg_preds'].squeeze(dim=-1)
u_reg_preds = forward_ret_dict['u_reg_preds']
# segmentation and part prediction losses
u_cls_labels, u_reg_labels = forward_ret_dict['seg_labels'], forward_ret_dict['part_labels']
u_cls_target = (u_cls_labels > 0).float()
pos_mask = u_cls_labels > 0
pos = pos_mask.float()
neg = (u_cls_labels == 0).float()
u_cls_weights = pos + neg
pos_normalizer = pos.sum()
u_cls_weights = u_cls_weights / torch.clamp(pos_normalizer, min=1.0)
u_loss_cls = self.cls_loss_func(u_seg_preds, u_cls_target, weights=u_cls_weights)
u_loss_cls_pos = (u_loss_cls * pos).sum()
u_loss_cls_neg = (u_loss_cls * neg).sum()
u_loss_cls = u_loss_cls.sum()
loss_unet = u_loss_cls
if pos_normalizer > 0:
u_loss_reg = F.binary_cross_entropy(torch.sigmoid(u_reg_preds[pos_mask]), u_reg_labels[pos_mask])
loss_unet += u_loss_reg
tb_dict['rpn_u_loss_reg'] = u_loss_reg.item()
tb_dict['rpn_loss_u_cls'] = u_loss_cls.item()
tb_dict['rpn_loss_u_cls_pos'] = u_loss_cls_pos.item()
tb_dict['rpn_loss_u_cls_neg'] = u_loss_cls_neg.item()
tb_dict['rpn_loss_unet'] = loss_unet.item()
tb_dict['rpn_pos_num'] = pos_normalizer.item()
return loss_unet, tb_dict
class UNetV0(UNetHead):
def __init__(self, input_channels, **kwargs):
super().__init__(unet_target_cfg=cfg.MODEL.RPN.BACKBONE.TARGET_CONFIG)
norm_fn = partial(nn.BatchNorm1d, eps=1e-3, momentum=0.01)
self.conv_input = spconv.SparseSequential(
spconv.SubMConv3d(input_channels, 16, 3, padding=1, bias=False, indice_key='subm1'),
norm_fn(16),
nn.ReLU(),
)
block = self.post_act_block
self.conv1 = spconv.SparseSequential(
block(16, 16, 3, norm_fn=norm_fn, padding=1, indice_key='subm1'),
)
self.conv2 = spconv.SparseSequential(
# [1600, 1408, 41] <- [800, 704, 21]
block(16, 32, 3, norm_fn=norm_fn, stride=2, padding=1, indice_key='spconv2', conv_type='spconv'),
block(32, 32, 3, norm_fn=norm_fn, padding=1, indice_key='subm2'),
block(32, 32, 3, norm_fn=norm_fn, padding=1, indice_key='subm2'),
)
self.conv3 = spconv.SparseSequential(
# [800, 704, 21] <- [400, 352, 11]
block(32, 64, 3, norm_fn=norm_fn, stride=2, padding=1, indice_key='spconv3', conv_type='spconv'),
block(64, 64, 3, norm_fn=norm_fn, padding=1, indice_key='subm3'),
block(64, 64, 3, norm_fn=norm_fn, padding=1, indice_key='subm3'),
)
self.conv4 = spconv.SparseSequential(
# [400, 352, 11] <- [200, 176, 5]
block(64, 64, 3, norm_fn=norm_fn, stride=2, padding=(0, 1, 1), indice_key='spconv4', conv_type='spconv'),
block(64, 64, 3, norm_fn=norm_fn, padding=1, indice_key='subm4'),
block(64, 64, 3, norm_fn=norm_fn, padding=1, indice_key='subm4'),
)
last_pad = 0 if cfg.DATA_CONFIG.VOXEL_GENERATOR.VOXEL_SIZE[-1] in [0.1, 0.2] else (1, 0, 0)
self.conv_out = spconv.SparseSequential(
# [200, 150, 5] -> [200, 150, 2]
spconv.SparseConv3d(128, 128, (3, 1, 1), stride=(2, 1, 1), padding=last_pad,
bias=False, indice_key='spconv_down2'),
norm_fn(128),
nn.ReLU(),
)
# decoder
# [400, 352, 11] <- [200, 176, 5]
self.conv_up_t4 = SparseBasicBlock(64, 64, indice_key='subm4', norm_fn=norm_fn)
self.conv_up_m4 = block(128, 64, 3, norm_fn=norm_fn, padding=1, indice_key='subm4')
self.inv_conv4 = block(64, 64, 3, norm_fn=norm_fn, indice_key='spconv4', conv_type='inverseconv')
# [800, 704, 21] <- [400, 352, 11]
self.conv_up_t3 = SparseBasicBlock(64, 64, indice_key='subm3', norm_fn=norm_fn)
self.conv_up_m3 = block(128, 64, 3, norm_fn=norm_fn, padding=1, indice_key='subm3')
self.inv_conv3 = block(64, 32, 3, norm_fn=norm_fn, indice_key='spconv3', conv_type='inverseconv')
# [1600, 1408, 41] <- [800, 704, 21]
self.conv_up_t2 = SparseBasicBlock(32, 32, indice_key='subm2', norm_fn=norm_fn)
self.conv_up_m2 = block(64, 32, 3, norm_fn=norm_fn, indice_key='subm2')
self.inv_conv2 = block(32, 16, 3, norm_fn=norm_fn, indice_key='spconv2', conv_type='inverseconv')
# [1600, 1408, 41] <- [1600, 1408, 41]
self.conv_up_t1 = SparseBasicBlock(16, 16, indice_key='subm1', norm_fn=norm_fn)
self.conv_up_m1 = block(32, 16, 3, norm_fn=norm_fn, indice_key='subm1')
self.conv5 = spconv.SparseSequential(
block(16, 16, 3, norm_fn=norm_fn, padding=1, indice_key='subm1')
)
self.seg_cls_layer = nn.Linear(16, 1, bias=True)
self.seg_reg_layer = nn.Linear(16, 3, bias=True)
def UR_block_forward(self, x_lateral, x_bottom, conv_t, conv_m, conv_inv):
x_trans = conv_t(x_lateral)
x = x_trans
x.features = torch.cat((x_bottom.features, x_trans.features), dim=1)
x_m = conv_m(x)
x = self.channel_reduction(x, x_m.features.shape[1])
x.features = x_m.features + x.features
x = conv_inv(x)
return x
@staticmethod
def channel_reduction(x, out_channels):
"""
:param x: x.features (N, C1)
:param out_channels: C2
:return:
"""
features = x.features
n, in_channels = features.shape
assert (in_channels % out_channels == 0) and (in_channels >= out_channels)
x.features = features.view(n, out_channels, -1).sum(dim=2)
return x
def post_act_block(self, in_channels, out_channels, kernel_size, indice_key, stride=1, padding=0,
conv_type='subm', norm_fn=None):
if conv_type == 'subm':
m = spconv.SparseSequential(
spconv.SubMConv3d(in_channels, out_channels, kernel_size, bias=False, indice_key=indice_key),
norm_fn(out_channels),
nn.ReLU(),
)
elif conv_type == 'spconv':
m = spconv.SparseSequential(
spconv.SparseConv3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding,
bias=False, indice_key=indice_key),
norm_fn(out_channels),
nn.ReLU(),
)
elif conv_type == 'inverseconv':
m = spconv.SparseSequential(
spconv.SparseInverseConv3d(in_channels, out_channels, kernel_size,
indice_key=indice_key, bias=False),
norm_fn(out_channels),
nn.ReLU(),
)
else:
raise NotImplementedError
return m
def forward(self, input_sp_tensor, **kwargs):
"""
:param voxel_features: (N, C)
:param coors: (N, 4) [batch_idx, z_idx, y_idx, x_idx], sparse_shape: (z_size, y_size, x_size)
:param batch_size:
:return:
"""
x = self.conv_input(input_sp_tensor)
x_conv1 = self.conv1(x)
x_conv2 = self.conv2(x_conv1)
x_conv3 = self.conv3(x_conv2)
x_conv4 = self.conv4(x_conv3)
# for detection head
# [200, 176, 5] -> [200, 176, 2]
out = self.conv_out(x_conv4)
spatial_features = out.dense()
N, C, D, H, W = spatial_features.shape
spatial_features = spatial_features.view(N, C * D, H, W)
ret_dict = {'spatial_features': spatial_features}
# for segmentation head
# [400, 352, 11] <- [200, 176, 5]
x_up4 = self.UR_block_forward(x_conv4, x_conv4, self.conv_up_t4, self.conv_up_m4, self.inv_conv4)
# [800, 704, 21] <- [400, 352, 11]
x_up3 = self.UR_block_forward(x_conv3, x_up4, self.conv_up_t3, self.conv_up_m3, self.inv_conv3)
# [1600, 1408, 41] <- [800, 704, 21]
x_up2 = self.UR_block_forward(x_conv2, x_up3, self.conv_up_t2, self.conv_up_m2, self.inv_conv2)
# [1600, 1408, 41] <- [1600, 1408, 41]
x_up1 = self.UR_block_forward(x_conv1, x_up2, self.conv_up_t1, self.conv_up_m1, self.conv5)
seg_features = x_up1.features
seg_cls_preds = self.seg_cls_layer(seg_features) # (N, 1)
seg_reg_preds = self.seg_reg_layer(seg_features) # (N, 3)
ret_dict.update({'u_seg_preds': seg_cls_preds, 'u_reg_preds': seg_reg_preds, 'seg_features': seg_features})
if self.training:
if self.target_generated_on == 'dataset':
targets_dict = {
'seg_labels': kwargs['seg_labels'],
'part_labels': kwargs['part_labels'],
'bbox_reg_labels': kwargs.get('bbox_reg_labels', None)
}
else:
batch_size = x_up1.batch_size
bs_idx, coords = x_up1.indices[:, 0].cpu(), x_up1.indices[:, 1:].cpu()
voxel_size = torch.tensor(cfg.DATA_CONFIG.VOXEL_GENERATOR.VOXEL_SIZE)
pc_range = torch.tensor(cfg.DATA_CONFIG.POINT_CLOUD_RANGE)
voxel_centers = (coords[:, [2, 1, 0]].float() + 0.5) * voxel_size + pc_range[0:3]
batch_points = [voxel_centers[bs_idx == k] for k in range(batch_size)]
targets_dict = self.assign_targets(
batch_points=batch_points,
gt_boxes=kwargs['gt_boxes'].cpu()
)
ret_dict['seg_labels'] = targets_dict['seg_labels']
ret_dict['part_labels'] = targets_dict['part_labels']
ret_dict['bbox_reg_labels'] = targets_dict.get('bbox_reg_labels', None)
self.forward_ret_dict = ret_dict
return ret_dict
class UNetV2(UNetHead):
def __init__(self, input_channels, **kwargs):
super().__init__(unet_target_cfg=cfg.MODEL.RPN.BACKBONE.TARGET_CONFIG)
norm_fn = partial(nn.BatchNorm1d, eps=1e-3, momentum=0.01)
self.conv_input = spconv.SparseSequential(
spconv.SubMConv3d(input_channels, 16, 3, padding=1, bias=False, indice_key='subm1'),
norm_fn(16),
nn.ReLU(),
)
block = self.post_act_block
self.conv1 = spconv.SparseSequential(
block(16, 16, 3, norm_fn=norm_fn, padding=1, indice_key='subm1'),
)
self.conv2 = spconv.SparseSequential(
# [1600, 1408, 41] <- [800, 704, 21]
block(16, 32, 3, norm_fn=norm_fn, stride=2, padding=1, indice_key='spconv2', conv_type='spconv'),
block(32, 32, 3, norm_fn=norm_fn, padding=1, indice_key='subm2'),
block(32, 32, 3, norm_fn=norm_fn, padding=1, indice_key='subm2'),
)
self.conv3 = spconv.SparseSequential(
# [800, 704, 21] <- [400, 352, 11]
block(32, 64, 3, norm_fn=norm_fn, stride=2, padding=1, indice_key='spconv3', conv_type='spconv'),
block(64, 64, 3, norm_fn=norm_fn, padding=1, indice_key='subm3'),
block(64, 64, 3, norm_fn=norm_fn, padding=1, indice_key='subm3'),
)
self.conv4 = spconv.SparseSequential(
# [400, 352, 11] <- [200, 176, 5]
block(64, 64, 3, norm_fn=norm_fn, stride=2, padding=(0, 1, 1), indice_key='spconv4', conv_type='spconv'),
block(64, 64, 3, norm_fn=norm_fn, padding=1, indice_key='subm4'),
block(64, 64, 3, norm_fn=norm_fn, padding=1, indice_key='subm4'),
)
last_pad = 0 if cfg.DATA_CONFIG.VOXEL_GENERATOR.VOXEL_SIZE[-1] in [0.1, 0.2] else (1, 0, 0)
self.conv_out = spconv.SparseSequential(
# [200, 150, 5] -> [200, 150, 2]
spconv.SparseConv3d(64, 128, (3, 1, 1), stride=(2, 1, 1), padding=last_pad,
bias=False, indice_key='spconv_down2'),
norm_fn(128),
nn.ReLU(),
)
# decoder
# [400, 352, 11] <- [200, 176, 5]
self.conv_up_t4 = SparseBasicBlock(64, 64, indice_key='subm4', norm_fn=norm_fn)
self.conv_up_m4 = block(128, 64, 3, norm_fn=norm_fn, padding=1, indice_key='subm4')
self.inv_conv4 = block(64, 64, 3, norm_fn=norm_fn, indice_key='spconv4', conv_type='inverseconv')
# [800, 704, 21] <- [400, 352, 11]
self.conv_up_t3 = SparseBasicBlock(64, 64, indice_key='subm3', norm_fn=norm_fn)
self.conv_up_m3 = block(128, 64, 3, norm_fn=norm_fn, padding=1, indice_key='subm3')
self.inv_conv3 = block(64, 32, 3, norm_fn=norm_fn, indice_key='spconv3', conv_type='inverseconv')
# [1600, 1408, 41] <- [800, 704, 21]
self.conv_up_t2 = SparseBasicBlock(32, 32, indice_key='subm2', norm_fn=norm_fn)
self.conv_up_m2 = block(64, 32, 3, norm_fn=norm_fn, indice_key='subm2')
self.inv_conv2 = block(32, 16, 3, norm_fn=norm_fn, indice_key='spconv2', conv_type='inverseconv')
# [1600, 1408, 41] <- [1600, 1408, 41]
self.conv_up_t1 = SparseBasicBlock(16, 16, indice_key='subm1', norm_fn=norm_fn)
self.conv_up_m1 = block(32, 16, 3, norm_fn=norm_fn, indice_key='subm1')
self.conv5 = spconv.SparseSequential(
block(16, 16, 3, norm_fn=norm_fn, padding=1, indice_key='subm1')
)
self.seg_cls_layer = nn.Linear(16, 1, bias=True)
self.seg_reg_layer = nn.Linear(16, 3, bias=True)
def UR_block_forward(self, x_lateral, x_bottom, conv_t, conv_m, conv_inv):
x_trans = conv_t(x_lateral)
x = x_trans
x.features = torch.cat((x_bottom.features, x_trans.features), dim=1)
x_m = conv_m(x)
x = self.channel_reduction(x, x_m.features.shape[1])
x.features = x_m.features + x.features
x = conv_inv(x)
return x
@staticmethod
def channel_reduction(x, out_channels):
"""
:param x: x.features (N, C1)
:param out_channels: C2
:return:
"""
features = x.features
n, in_channels = features.shape
assert (in_channels % out_channels == 0) and (in_channels >= out_channels)
x.features = features.view(n, out_channels, -1).sum(dim=2)
return x
def post_act_block(self, in_channels, out_channels, kernel_size, indice_key, stride=1, padding=0,
conv_type='subm', norm_fn=None):
if conv_type == 'subm':
m = spconv.SparseSequential(
spconv.SubMConv3d(in_channels, out_channels, kernel_size, bias=False, indice_key=indice_key),
norm_fn(out_channels),
nn.ReLU(),
)
elif conv_type == 'spconv':
m = spconv.SparseSequential(
spconv.SparseConv3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding,
bias=False, indice_key=indice_key),
norm_fn(out_channels),
nn.ReLU(),
)
elif conv_type == 'inverseconv':
m = spconv.SparseSequential(
spconv.SparseInverseConv3d(in_channels, out_channels, kernel_size,
indice_key=indice_key, bias=False),
norm_fn(out_channels),
nn.ReLU(),
)
else:
raise NotImplementedError
return m
def forward(self, input_sp_tensor, **kwargs):
"""
:param voxel_features: (N, C)
:param coors: (N, 4) [batch_idx, z_idx, y_idx, x_idx], sparse_shape: (z_size, y_size, x_size)
:param batch_size:
:return:
"""
x = self.conv_input(input_sp_tensor)
x_conv1 = self.conv1(x)
x_conv2 = self.conv2(x_conv1)
x_conv3 = self.conv3(x_conv2)
x_conv4 = self.conv4(x_conv3)
# for detection head
# [200, 176, 5] -> [200, 176, 2]
out = self.conv_out(x_conv4)
spatial_features = out.dense()
N, C, D, H, W = spatial_features.shape
spatial_features = spatial_features.view(N, C * D, H, W)
ret_dict = {'spatial_features': spatial_features}
# for segmentation head
# [400, 352, 11] <- [200, 176, 5]
x_up4 = self.UR_block_forward(x_conv4, x_conv4, self.conv_up_t4, self.conv_up_m4, self.inv_conv4)
# [800, 704, 21] <- [400, 352, 11]
x_up3 = self.UR_block_forward(x_conv3, x_up4, self.conv_up_t3, self.conv_up_m3, self.inv_conv3)
# [1600, 1408, 41] <- [800, 704, 21]
x_up2 = self.UR_block_forward(x_conv2, x_up3, self.conv_up_t2, self.conv_up_m2, self.inv_conv2)
# [1600, 1408, 41] <- [1600, 1408, 41]
x_up1 = self.UR_block_forward(x_conv1, x_up2, self.conv_up_t1, self.conv_up_m1, self.conv5)
seg_features = x_up1.features
seg_cls_preds = self.seg_cls_layer(seg_features) # (N, 1)
seg_reg_preds = self.seg_reg_layer(seg_features) # (N, 3)
ret_dict.update({'u_seg_preds': seg_cls_preds, 'u_reg_preds': seg_reg_preds, 'seg_features': seg_features})
if self.training:
if self.target_generated_on == 'dataset':
targets_dict = {
'seg_labels': kwargs['seg_labels'],
'part_labels': kwargs['part_labels'],
'bbox_reg_labels': kwargs.get('bbox_reg_labels', None)
}
else:
batch_size = x_up1.batch_size
bs_idx, coords = x_up1.indices[:, 0].cpu(), x_up1.indices[:, 1:].cpu()
voxel_size = torch.tensor(cfg.DATA_CONFIG.VOXEL_GENERATOR.VOXEL_SIZE)
pc_range = torch.tensor(cfg.DATA_CONFIG.POINT_CLOUD_RANGE)
voxel_centers = (coords[:, [2, 1, 0]].float() + 0.5) * voxel_size + pc_range[0:3]
batch_points = [voxel_centers[bs_idx == k] for k in range(batch_size)]
targets_dict2 = self.assign_targets(
batch_points=batch_points,
gt_boxes=kwargs['gt_boxes'].cpu()
)
ret_dict['seg_labels'] = targets_dict['seg_labels']
ret_dict['part_labels'] = targets_dict['part_labels']
ret_dict['bbox_reg_labels'] = targets_dict.get('bbox_reg_labels', None)
self.forward_ret_dict = ret_dict
return ret_dict
| 43.784906
| 120
| 0.600233
| 3,260
| 23,206
| 3.95092
| 0.084663
| 0.047516
| 0.034161
| 0.040994
| 0.798447
| 0.773059
| 0.749534
| 0.727329
| 0.727329
| 0.727329
| 0
| 0.06307
| 0.277127
| 23,206
| 529
| 121
| 43.867675
| 0.704739
| 0.078859
| 0
| 0.649596
| 0
| 0
| 0.048984
| 0
| 0
| 0
| 0
| 0
| 0.005391
| 1
| 0.037736
| false
| 0
| 0.024259
| 0
| 0.09973
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
18049abde6a8ada0b5d08dea6245e157b181230d
| 102
|
py
|
Python
|
custom_components/eko_karta_zagreb/__init__.py
|
kpisacic/EkoKartaZg-home-assistant-custom-component
|
7c6150a156033d884e9aa9cf14a08cdae32d078e
|
[
"MIT"
] | null | null | null |
custom_components/eko_karta_zagreb/__init__.py
|
kpisacic/EkoKartaZg-home-assistant-custom-component
|
7c6150a156033d884e9aa9cf14a08cdae32d078e
|
[
"MIT"
] | 1
|
2020-05-13T13:54:47.000Z
|
2020-05-22T13:46:18.000Z
|
custom_components/eko_karta_zagreb/__init__.py
|
kpisacic/EkoKartaZg-home-assistant-custom-component
|
7c6150a156033d884e9aa9cf14a08cdae32d078e
|
[
"MIT"
] | null | null | null |
"""A component for EKO KARTA ZAGREB (https://ekokartazagreb.stampar.hr/) weather and air-quality."""
| 51
| 101
| 0.735294
| 14
| 102
| 5.357143
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107843
| 102
| 1
| 102
| 102
| 0.824176
| 0.921569
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1848291172cb40b1cec8f0a50fd1ff3bdc01ef65
| 272
|
py
|
Python
|
python/testData/quickFixes/PyAddFieldQuickFixTest/addFieldAddConstructorWithTypeAnnotation_after.py
|
alexey-anufriev/intellij-community
|
ffcd46f14e630acdefcc76e2bfc7c43d2449013a
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/quickFixes/PyAddFieldQuickFixTest/addFieldAddConstructorWithTypeAnnotation_after.py
|
alexey-anufriev/intellij-community
|
ffcd46f14e630acdefcc76e2bfc7c43d2449013a
|
[
"Apache-2.0"
] | 1
|
2020-07-30T19:04:47.000Z
|
2020-07-30T19:04:47.000Z
|
python/testData/quickFixes/PyAddFieldQuickFixTest/addFieldAddConstructorWithTypeAnnotation_after.py
|
bradleesand/intellij-community
|
750ff9c10333c9c1278c00dbe8d88c877b1b9749
|
[
"Apache-2.0"
] | 1
|
2020-10-15T05:56:42.000Z
|
2020-10-15T05:56:42.000Z
|
class BaseClassAnnotated:
def __init__(self, name: str):
self.name = name
class DerivedClass(BaseClassAnnotated):
def __init__(self, name: str):
super().__init__(name)
self.param = None
def get_param(self):
return self.param
| 20.923077
| 39
| 0.643382
| 31
| 272
| 5.225806
| 0.419355
| 0.148148
| 0.308642
| 0.358025
| 0.444444
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0.257353
| 272
| 12
| 40
| 22.666667
| 0.80198
| 0
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.111111
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
1865ae0663466e957faaceb95fdd18cabe70f527
| 26,521
|
py
|
Python
|
src/models/model_builder.py
|
guowenying111/SEKE
|
a913a19090eb690c3188036795559210a5262f2b
|
[
"Apache-2.0"
] | null | null | null |
src/models/model_builder.py
|
guowenying111/SEKE
|
a913a19090eb690c3188036795559210a5262f2b
|
[
"Apache-2.0"
] | null | null | null |
src/models/model_builder.py
|
guowenying111/SEKE
|
a913a19090eb690c3188036795559210a5262f2b
|
[
"Apache-2.0"
] | null | null | null |
import copy
from collections import OrderedDict
import torch
from models.layer_attention import Layer_Attention
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity
from sklearn.preprocessing import normalize
import torch.nn as nn
from transformers import BertModel, BertConfig
from torch.nn.init import xavier_uniform_,uniform_
from transformers import AlbertModel,AlbertTokenizer,AlbertConfig,ElectraModel,ElectraConfig, RobertaModel,RobertaConfig
from torch_geometric.data import Batch
import sys
sys.path.append('../')
torch.backends.cudnn.enabled = False
from models.encoder import TransformerInterEncoder, Classifier, RNNEncoder,GCN,TransformerInterDecoder,RNNEncoder_attn
from models.optimizers import Optimizer
def build_optim(args, model, checkpoint):
""" Build optimizer """
saved_optimizer_state_dict = None
if args.train_from != '':
optim = checkpoint['optim']
saved_optimizer_state_dict = optim.optimizer.state_dict()
else:
optim = Optimizer(
args.optim, args.lr, args.max_grad_norm,
beta1=args.beta1, beta2=args.beta2,
decay_method=args.decay_method,
warmup_steps=args.warmup_steps)
optim.set_parameters(list(model.named_parameters()))
if args.train_from != '':
optim.optimizer.load_state_dict(saved_optimizer_state_dict)
if args.visible_gpus != '-1':
for state in optim.optimizer.state.values():
for k, v in state.items():
if torch.is_tensor(v):
state[k] = v.cuda()
if (optim.method == 'adam') and (len(optim.optimizer.state) < 1):
raise RuntimeError(
"Error: loaded Adam optimizer from existing model" +
" but optimizer state is empty")
return optim
class Bert(nn.Module):
def __init__(self, temp_dir, load_pretrained_bert, bert_config):
super(Bert, self).__init__()
if(load_pretrained_bert):
self.model = BertModel.from_pretrained('bert-base-uncased', cache_dir=temp_dir)# ,config=bert_config)
else:
bert_config= BertConfig.from_pretrained('bert-base-uncased')
self.model = BertModel(bert_config)
def forward(self, x, segs, mask):
output = self.model(input_ids=x, token_type_ids=segs, attention_mask=mask)
return output[0]
class Albert_unshared_attn(nn.Module):
def __init__(self, temp_dir, load_pretrained_bert, Albert_config):
super(Albert_unshared_attn, self).__init__()
if (load_pretrained_bert):
self.config = AlbertConfig.from_pretrained('albert-base-v2')
self.config.num_hidden_groups = self.config.num_hidden_layers
self.config.output_hidden_states = True
self.model = AlbertModel(self.config)
loaded_dict = torch.load('../../PreSumm/src/albert-base-v2/pytorch_model.bin',map_location='cpu')
new_dict = OrderedDict()
for k, v in loaded_dict.items():
if k.startswith('albert.'):
if not k.startswith('albert.encoder.albert'):
new_dict[k[7:]] = copy.deepcopy(v)
else:
for i in range(0, self.model.config.num_hidden_groups):
new_dict[k[7:35] + str(i) + k[36:]] = copy.deepcopy(v)
self.model.load_state_dict(new_dict, strict=False)
else:
self.config = AlbertConfig.from_pretrained('albert-base-v2')
self.config.output_hidden_states = True
self.config.num_hidden_groups = self.config.num_hidden_layers
self.model = AlbertModel(self.config)
def forward(self, x, segs, mask):
output = self.model(input_ids=x, token_type_ids=segs, attention_mask=mask)
all_layer = torch.cat((
output[2][1].unsqueeze(dim=2), output[2][2].unsqueeze(dim=2),
output[2][3].unsqueeze(dim=2), output[2][4].unsqueeze(dim=2),
output[2][5].unsqueeze(dim=2), output[2][6].unsqueeze(dim=2),
output[2][7].unsqueeze(dim=2), output[2][8].unsqueeze(dim=2),
output[2][9].unsqueeze(dim=2), output[2][10].unsqueeze(dim=2),
output[2][11].unsqueeze(dim=2), output[2][12].unsqueeze(dim=2)), dim=-2)
return output[0],all_layer
# output = self.model(input_ids=x, token_type_ids=segs, attention_mask=mask)
# return output[0]
class Albert_unshared(nn.Module):
def __init__(self, temp_dir, load_pretrained_bert, Albert_config):
super(Albert_unshared, self).__init__()
if (load_pretrained_bert):
self.config = AlbertConfig.from_pretrained('albert-base-v2')
# self.config.num_hidden_layers=6
# self.config.hidden_dropout_prob=0.1
# self.config.attention_probs_dropout_prob=0.1
self.config.num_hidden_groups = self.config.num_hidden_layers
self.model = AlbertModel(self.config)
loaded_dict = torch.load('../../PreSumm/src/albert-base-v2/pytorch_model.bin',map_location='cpu')
new_dict = OrderedDict()
for k, v in loaded_dict.items():
if k.startswith('albert.'):
if not k.startswith('albert.encoder.albert'):
new_dict[k[7:]] = copy.deepcopy(v)
else:
for i in range(0, self.model.config.num_hidden_groups):
new_dict[k[7:35] + str(i) + k[36:]] = copy.deepcopy(v)
self.model.load_state_dict(new_dict, strict=False)
else:
print('thisi is i exec')
self.config = AlbertConfig.from_pretrained('albert-base-v2')
# self.config.num_hidden_layers = 6
# self.config.hidden_dropout_prob = 0.1
# self.config.attention_probs_dropout_prob = 0.1
self.config.num_hidden_groups = self.config.num_hidden_layers
self.model = AlbertModel(self.config)
def forward(self, x, segs, mask):
output = self.model(input_ids=x, token_type_ids=segs, attention_mask=mask)
return output[0]
class Albert(nn.Module):
def __init__(self, temp_dir, load_pretrained_bert, Albert_config):
super(Albert, self).__init__()
if(load_pretrained_bert):
self.model = AlbertModel.from_pretrained('albert-base-v2', cache_dir=temp_dir)
self.model.config.output_hidden_states=True
else:
Albert_config=AlbertConfig.from_pretrained('albert-base-v2')
self.model = AlbertModel(Albert_config)
self.model.config.output_hidden_states = True
def forward(self, x, segs, mask):
output = self.model(input_ids=x, token_type_ids=segs, attention_mask=mask)
return output[0]
class Albert_mean(nn.Module):
def __init__(self, temp_dir, load_pretrained_bert, Albert_config):
super(Albert_mean, self).__init__()
if(load_pretrained_bert):
self.model = AlbertModel.from_pretrained('albert-base-v2', cache_dir=temp_dir)
self.model.config.output_hidden_states=True
else:
Albert_config=AlbertConfig.from_pretrained('albert-base-v2')
self.model = AlbertModel(Albert_config)
self.model.config.output_hidden_states = True
def forward(self, x, segs, mask):
output = self.model(input_ids=x, token_type_ids=segs, attention_mask=mask)
all_layer = torch.cat((
output[2][1].unsqueeze(dim=2), output[2][2].unsqueeze(dim=2),
output[2][3].unsqueeze(dim=2), output[2][4].unsqueeze(dim=2),
output[2][5].unsqueeze(dim=2), output[2][6].unsqueeze(dim=2),
output[2][7].unsqueeze(dim=2), output[2][8].unsqueeze(dim=2),
output[2][9].unsqueeze(dim=2), output[2][10].unsqueeze(dim=2),
output[2][11].unsqueeze(dim=2), output[2][12].unsqueeze(dim=2)), dim=2)
return torch.mean(all_layer,dim=-2)
class Albert_attn(nn.Module):
def __init__(self, temp_dir, load_pretrained_bert, Albert_config):
super(Albert_attn, self).__init__()
if(load_pretrained_bert):
self.model = AlbertModel.from_pretrained('albert-base-v2', cache_dir=temp_dir)
self.model.config.output_hidden_states=True
else:
Albert_config=AlbertConfig.from_pretrained('albert-base-v2')
self.model = AlbertModel(Albert_config)
self.model.config.output_hidden_states = True
def forward(self, x, segs, mask):
output = self.model(input_ids=x, token_type_ids=segs, attention_mask=mask)
all_layer = torch.cat((
output[2][1].unsqueeze(dim=0), output[2][2].unsqueeze(dim=0),
output[2][3].unsqueeze(dim=0), output[2][4].unsqueeze(dim=0),
output[2][5].unsqueeze(dim=0), output[2][6].unsqueeze(dim=0),
output[2][7].unsqueeze(dim=0), output[2][8].unsqueeze(dim=0),
output[2][9].unsqueeze(dim=0), output[2][10].unsqueeze(dim=0),
output[2][11].unsqueeze(dim=0), output[2][12].unsqueeze(dim=0)
), dim=0).transpose(0,1)
return output[0], all_layer
class AlbertSummarizer_mean(nn.Module):
def __init__(self, args, device, load_pretrained_bert = False, Albert_config = None):
super(AlbertSummarizer_mean, self).__init__()
self.args = args
self.device = device
self.bert = Albert_attn(args.temp_dir, load_pretrained_bert, Albert_config)
# self.bert = Albert(args.temp_dir, load_pretrained_bert, Albert_config)
if (args.encoder == 'classifier'):
self.encoder = Classifier(self.bert.model.config.hidden_size)
elif(args.encoder=='transformer'):
self.encoder = TransformerInterEncoder(self.bert.model.config.hidden_size, args.ff_size, args.heads,
args.dropout, args.inter_layers)
elif(args.encoder=='rnn'):
self.encoder = RNNEncoder_attn(bidirectional=True, num_layers=1,
input_size=self.bert.model.config.hidden_size, hidden_size=args.rnn_size,
dropout=args.dropout)
self.score = nn.Linear(self.bert.model.config.hidden_size*2,1,bias=True)
self.sigmoid = nn.Sigmoid()
elif (args.encoder == 'baseline'):
bert_config = AlbertConfig.from_pretrained('albert-base-v2')
self.bert.model = AlbertModel(bert_config)
self.encoder = Classifier(self.bert.model.config.hidden_size)
if args.param_init != 0.0:
for p in self.encoder.parameters():
p.data.uniform_(-args.param_init, args.param_init)
if args.param_init_glorot:
for p in self.encoder.parameters():
if p.dim() > 1:
xavier_uniform_(p)
self.to(device)
def load_cp(self, pt):
self.load_state_dict(pt['model'], strict=True)
def forward(self, x, segs, clss, mask, mask_cls, sentence_range=None):
top_vec = self.bert(x, segs, mask)
sents_vec = top_vec[torch.arange(top_vec.size(0)).unsqueeze(1), clss]
sents_vec = sents_vec * mask_cls[:, :, None].float()
sent_scores = self.encoder(sents_vec, mask_cls).squeeze(-1)
return sent_scores, mask_cls
class Summarizer(nn.Module):
def __init__(self, args, device, load_pretrained_bert = False, bert_config = None):
super(Summarizer, self).__init__()
self.args = args
self.device = device
self.bert = Bert(args.temp_dir, load_pretrained_bert, bert_config)
if (args.encoder == 'classifier'):
self.encoder = Classifier(self.bert.model.config.hidden_size)
elif(args.encoder=='transformer'):
self.encoder = TransformerInterEncoder(self.bert.model.config.hidden_size, args.ff_size, args.heads,
args.dropout, args.inter_layers)
elif(args.encoder=='rnn'):
self.encoder = RNNEncoder(bidirectional=True, num_layers=1,
input_size=self.bert.model.config.hidden_size, hidden_size=args.rnn_size,
dropout=args.dropout)
elif (args.encoder == 'baseline'):
bert_config = BertConfig.from_pretrained('bert-base-uncased')
self.bert.model = BertModel(bert_config)
self.encoder = Classifier(self.bert.model.config.hidden_size)
if args.param_init != 0.0:
for p in self.encoder.parameters():
p.data.uniform_(-args.param_init, args.param_init)
if args.param_init_glorot:
for p in self.encoder.parameters():
if p.dim() > 1:
xavier_uniform_(p)
self.to(device)
def load_cp(self, pt):
self.load_state_dict(pt['model'], strict=True)
def forward(self, x, segs, clss, mask, mask_cls, sentence_range=None):
top_vec = self.bert(x, segs, mask)
sents_vec = top_vec[torch.arange(top_vec.size(0)).unsqueeze(1), clss]
sents_vec = sents_vec * mask_cls[:, :, None].float()
sent_scores = self.encoder(sents_vec, mask_cls).squeeze(-1)
return sent_scores, mask_cls
class GCNSummarizer(nn.Module):
def __init__(self, args, device, load_pretrained_bert = False, Albert_config = None):
super(GCNSummarizer, self).__init__()
self.args = args
self.device = device
self.sigmoid = nn.Sigmoid()
self.bert = Albert(args.temp_dir, load_pretrained_bert, Albert_config)
self.encoder = GCN(in_channel=self.bert.model.config.hidden_size,hidden_dim=args.hidden_dim,out_channel=args.out_channel,drop=args.dropout)
self.classifier=nn.Linear(args.out_channel,1)
if args.param_init != 0.0:
for p in self.encoder.parameters():
p.data.uniform_(-args.param_init, args.param_init)
for p in self.classifier.parameters():
p.data.uniform_(-args.param_init, args.param_init)
if args.param_init_glorot:
for p in self.encoder.parameters():
if p.dim() > 1:
xavier_uniform_(p)
for p in self.classifier.parameters():
if p.dim() > 1:
xavier_uniform_(p)
self.to(device)
def load_cp(self, pt):
print(pt['opt'])
self.load_state_dict(pt['model'], strict=True)
def forward(self, x, segs, clss, mask, mask_cls, graph, sentence_range=None):
top_vec = self.bert(x, segs, mask)
for i,gr in enumerate(graph):
gr.x_s=top_vec[i]
batch = Batch.from_data_list(graph)
top_ve=self.encoder(x_1=batch.x_s, edge_index_1=batch.edge_index_s,edge_weight_1=batch.edge_weight_s)#,edge_weight_2=batch.edge_weight_t, edge_index_2=batch.edge_index_t,x_1, edge_index_1, x_2, edge_index_2,edge_weight_1=None,edge_weight_2=None
top_ve=top_ve.view(top_vec.size(0),top_vec.size(1),self.args.out_channel)
sents_vec = top_ve[torch.arange(top_vec.size(0)).unsqueeze(1), clss]
sents_vec = sents_vec * mask_cls[:, :, None].float()
sent_scores = self.classifier(sents_vec).squeeze(-1)
sent_scores = self.sigmoid(sent_scores) * mask_cls.float()
torch.cuda.empty_cache()
return sent_scores, mask_cls
class AlbertSummarizer(nn.Module):
def __init__(self, args, device, load_pretrained_bert = False, Albert_config = None):
super(AlbertSummarizer, self).__init__()
self.args = args
self.device = device
# self.bert = Albert_unshared(args.temp_dir, load_pretrained_bert, Albert_config)
self.bert = Albert_attn(args.temp_dir, load_pretrained_bert, Albert_config)
if (args.encoder == 'classifier'):
self.encoder = Classifier(self.bert.model.config.hidden_size)
elif(args.encoder=='transformer'):
self.encoder = TransformerInterEncoder(self.bert.model.config.hidden_size, args.ff_size, args.heads,
args.dropout, args.inter_layers)
elif(args.encoder=='rnn'):
self.encoder = RNNEncoder_attn(bidirectional=True, num_layers=1,
input_size=self.bert.model.config.hidden_size, hidden_size=args.rnn_size,
dropout=args.dropout)
self.score = nn.Linear(self.bert.model.config.hidden_size * 2, 1, bias=True)
self.sigmoid = nn.Sigmoid()
elif (args.encoder == 'baseline'):
bert_config = AlbertConfig.from_pretrained('albert-base-v2')
self.bert.model = AlbertModel(bert_config)
self.encoder = Classifier(self.bert.model.config.hidden_size)
if args.param_init != 0.0:
for p in self.encoder.parameters():
p.data.uniform_(-args.param_init, args.param_init)
if args.param_init_glorot:
for p in self.encoder.parameters():
if p.dim() > 1:
xavier_uniform_(p)
self.to(device)
def load_cp(self, pt):
self.load_state_dict(pt['model'], strict=True)
def forward(self, x, segs, clss, mask, mask_cls, sentence_range=None):
# top_vec = self.bert(x, segs, mask)
# sents_vec = top_vec[torch.arange(top_vec.size(0)).unsqueeze(1), clss]
# sents_vec = sents_vec * mask_cls[:, :, None].float()
# sent_scores = self.encoder(sents_vec, mask_cls).squeeze(-1)
# return sent_scores, mask_cls
last,top_vec = self.bert(x, segs, mask)
sents_vec = top_vec.transpose(1,2)[torch.arange(top_vec.size(0)).unsqueeze(1), clss].transpose(1,2)
last = last[torch.arange(last.size(0)).unsqueeze(1), clss]
batch,layer,seq,hidden=top_vec.size()
sents_vec = self.encoder(sents_vec, mask_cls)#encoder应该加入mask_cls
sents_vec = sents_vec.view(batch,-1,hidden)
sents_vec = torch.cat((sents_vec, last), dim=-1)#第一次效果有提升
sents_vec = sents_vec * mask_cls[:, :, None].float()
score = self.score(sents_vec)
sent_scores = self.sigmoid(score)* mask_cls[:, :, None].float()
return sent_scores.squeeze(-1), mask_cls
# last, top_vec = self.bert(x, segs, mask)
# sents_vec = top_vec#.transpose(1, 2)[torch.arange(top_vec.size(0)).unsqueeze(1), clss].transpose(1, 2)
# # last = last[torch.arange(last.size(0)).unsqueeze(1), clss]
# batch, layer, seq, hidden = top_vec.size()
#
# sents_vec = self.encoder(sents_vec, mask_cls) # encoder应该加入mask_cls
# sents_vec = sents_vec.view(batch, -1, hidden)
#
# sents_vec = torch.cat((sents_vec, last), dim=-1) # 第一次效果有提升
# sents_vec = sents_vec[torch.arange(sents_vec.size(0)).unsqueeze(1), clss]
# sents_vec = sents_vec * mask_cls[:, :, None].float()
#
# score = self.score(sents_vec)
# sent_scores = self.sigmoid(score) * mask_cls[:, :, None].float()
# return sent_scores.squeeze(-1), mask_cls
class PointerSummarizer(nn.Module):
def __init__(self, args, device, load_pretrained_bert = False, Albert_config = None):
super(PointerSummarizer, self).__init__()
self.args = args
self.device = device
self.bert = Albert(args.temp_dir, load_pretrained_bert, Albert_config)
self.init = nn.Parameter(torch.Tensor(self.bert.model.config.hidden_size))
self.encoder = TransformerInterDecoder(self.bert.model.config.hidden_size, args.ff_size, args.heads,
args.dropout, args.hidden_dim, args.inter_layers)
if args.param_init != 0.0:
for p in self.encoder.parameters():
p.data.uniform_(-args.param_init, args.param_init)
if args.param_init_glorot:
for p in self.encoder.parameters():
if p.dim() > 1:
xavier_uniform_(p)
uniform_(self.init)
self.to(device)
def load_cp(self, pt):
print('this is the parameters: ',pt['opt'])
self.load_state_dict(pt['model'], strict=True)
def forward(self, x, segs, clss, mask, mask_cls, mask_out_cls, out_cls, mask_target_cls, sentence_range=None):
if self.args.train:
top_vec = self.bert(x, segs, mask)
sents_vec = top_vec[torch.arange(top_vec.size(0)).unsqueeze(1), clss]
if out_cls.size(1)!=0:
output = top_vec[torch.arange(top_vec.size(0)).unsqueeze(1), out_cls]
output = output * mask_out_cls[:, :, None].float()
init_i = self.init.unsqueeze(0).unsqueeze(1).expand(x.size(0), 1, top_vec.size(-1))
sents_vec = sents_vec * mask_cls[:, :, None].float()
if out_cls.size(1) != 0:
output=torch.cat([init_i,output],dim=1)
else:
output=init_i
sent_scores = self.encoder(sents_vec, output, mask_cls, mask_target_cls).squeeze(-1)
return sent_scores,mask_target_cls
else:
preds = None
top_vec = self.bert(x, segs, mask)
sents_vec = top_vec[torch.arange(top_vec.size(0)).unsqueeze(1), clss]
init_i = self.init.unsqueeze(0).unsqueeze(1).expand(x.size(0), 1, top_vec.size(-1))
sents_vec = sents_vec * mask_cls[:, :, None].float()
output = init_i
mask_out_cls = (torch.ones([x.size(0), 1])==1).to(init_i.device)
scores=None
for j in range(3):
sent_scores = self.encoder(sents_vec, output, mask_cls, mask_out_cls)
sent_scores=sent_scores[:,-1,:]*mask_cls.float()
indices=torch.max(sent_scores, dim=-1)[1]
if j==0:
mask_out_cls = torch.cat([mask_out_cls, mask_out_cls],dim=-1)
scores=sent_scores.unsqueeze(dim=1)
else:
mask_out_cls = torch.cat([mask_out_cls,(torch.ones([x.size(0), 1])==1).to(mask_out_cls.device)],dim=-1)#~((( mask_out_cls[:,-1] == 0).unsqueeze(-1)) + ((torch.sum(indices.unsqueeze(-1) == preds,dim=-1)>0).unsqueeze(-1)))
scores = torch.cat([scores,sent_scores.unsqueeze(dim=1)],dim=1)#
if preds is None:
preds = indices.unsqueeze(-1)
else:
indices[~(mask_out_cls[:,-1])] = -1
preds = torch.cat([preds,indices.unsqueeze(-1)],dim = -1)
output = torch.cat([output, sents_vec[torch.arange(top_vec.size(0)).unsqueeze(1), indices.unsqueeze(-1)]], dim=1)
return scores,preds
class ComSummarizer(nn.Module):
def __init__(self, args, device, load_pretrained_bert = False, Albert_config = None):
super(ComSummarizer, self).__init__()
self.args = args
self.device = device
self.bert = Albert_unshared(args.temp_dir, load_pretrained_bert, Albert_config)
if (args.encoder == 'classifier'):
self.encoder = Classifier(self.bert.model.config.hidden_size)
elif(args.encoder=='transformer'):
self.encoder = TransformerInterEncoder(self.bert.model.config.hidden_size, args.ff_size, args.heads,
args.dropout, args.inter_layers)
elif(args.encoder=='rnn'):
self.encoder = RNNEncoder(bidirectional=True, num_layers=1,
input_size=self.bert.model.config.hidden_size, hidden_size=args.rnn_size,
dropout=args.dropout)
elif (args.encoder == 'baseline'):
bert_config = AlbertConfig.from_pretrained('albert-base-v2')
self.bert.model = AlbertModel(bert_config)
self.encoder = Classifier(self.bert.model.config.hidden_size)
if args.param_init != 0.0:
for p in self.encoder.parameters():
p.data.uniform_(-args.param_init, args.param_init)
if args.param_init_glorot:
for p in self.encoder.parameters():
if p.dim() > 1:
xavier_uniform_(p)
self.to(device)
def load_cp(self, pt):
self.load_state_dict(pt['model'], strict=True)
def forward(self, x, segs, clss, mask, mask_cls, com_mask, com_ids, com_segs, com_cls, sentence_range=None):
top_vec = self.bert(x, segs, mask)
with torch.no_grad():
com_vec = self.bert(com_ids, com_segs, com_mask)
sents_vec = top_vec[torch.arange(top_vec.size(0)).unsqueeze(1), clss]
coms_vec = com_vec[torch.arange(com_vec.size(0)).unsqueeze(1), com_cls]
sents_vec = sents_vec * mask_cls[:, :, None].float()
coms_vec = coms_vec * mask_cls[:, :, None].float()
sents_vec = (1-self.args.rate)*sents_vec + self.args.rate * coms_vec
sent_scores = self.encoder(sents_vec, mask_cls).squeeze(-1)
return sent_scores, mask_cls
class ClfSummarizer(nn.Module):
def __init__(self, args, device, load_pretrained_bert = False, Albert_config = None):
super(ClfSummarizer, self).__init__()
self.args = args
self.device = device
self.bert = Bert(args.temp_dir, load_pretrained_bert, Albert_config)
self.to(device)
def load_cp(self, pt):
self.load_state_dict(pt['model'], strict=True)
def forward(self, tgt_ids, tgt_segs, mask, pred_sent, pred_segs,pred_mask,pred_labels,lables_mask, sentence_range=None):# tgt_src, tgt_segs, tgt_mask
top_vec = self.bert(tgt_ids, tgt_segs, mask)
sent_vec=self.bert(pred_sent.view(-1, pred_sent.size(-1)),pred_segs.view(-1, pred_sent.size(-1)) , pred_mask.view(-1, pred_sent.size(-1)))#
sent_vec = sent_vec.view(tgt_segs.size(0), pred_sent.size(1), self.bert.model.config.hidden_size)#[:, 0, :]
top_vec = top_vec.unsqueeze(1).expand_as(sent_vec)
sent_scores = torch.cosine_similarity(sent_vec, top_vec, dim=-1)
return sent_scores, lables_mask#
| 50.51619
| 253
| 0.615324
| 3,466
| 26,521
| 4.475188
| 0.071552
| 0.027851
| 0.032493
| 0.026949
| 0.796467
| 0.764038
| 0.7505
| 0.736703
| 0.728773
| 0.71459
| 0
| 0.016416
| 0.260397
| 26,521
| 524
| 254
| 50.612595
| 0.774356
| 0.066626
| 0
| 0.657471
| 0
| 0
| 0.028094
| 0.005748
| 0
| 0
| 0
| 0
| 0
| 1
| 0.078161
| false
| 0
| 0.034483
| 0
| 0.177011
| 0.006897
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
18798ef7c33947468d03fb9d33b777bd5ce0ddf7
| 1,451
|
py
|
Python
|
tests/test_a0063uniquepathsii.py
|
nirofang/pyleet
|
600d58ad97028c9a14148af4ef468683a011a515
|
[
"MIT"
] | 3
|
2019-11-06T13:10:38.000Z
|
2021-11-17T07:29:54.000Z
|
tests/test_a0063uniquepathsii.py
|
nirofang/pyleet
|
600d58ad97028c9a14148af4ef468683a011a515
|
[
"MIT"
] | 1
|
2020-12-17T22:18:05.000Z
|
2020-12-17T22:18:05.000Z
|
tests/test_a0063uniquepathsii.py
|
nirofang/pyleet
|
600d58ad97028c9a14148af4ef468683a011a515
|
[
"MIT"
] | 1
|
2019-11-06T13:10:45.000Z
|
2019-11-06T13:10:45.000Z
|
from solutions.a0063uniquepathsii import Solution
import json
solution = Solution()
def test_uniquePaths1():
obstacleGrid = json.loads("""
[
[0,0,0],
[0,1,0],
[0,0,0]
]
""")
expect = 2
actual = solution.uniquePathsWithObstacles(obstacleGrid)
assert actual == expect
def test_uniquePaths2():
obstacleGrid = json.loads("""
[
[0,0],
[0,1],
[0,0]
]
""")
expect = 1
actual = solution.uniquePathsWithObstacles(obstacleGrid)
assert actual == expect
def test_uniquePaths3():
obstacleGrid = json.loads("""
[
[1]
]
""")
expect = 0
actual = solution.uniquePathsWithObstacles(obstacleGrid)
assert actual == expect
def test_uniquePaths4():
obstacleGrid = json.loads("""
[
[1,0]
]
""")
expect = 0
actual = solution.uniquePathsWithObstacles(obstacleGrid)
assert actual == expect
def test_uniquePaths5():
obstacleGrid = json.loads("""
[
[1],
[0]
]
""")
expect = 0
actual = solution.uniquePathsWithObstacles(obstacleGrid)
assert actual == expect
def test_uniquePaths6():
obstacleGrid = json.loads("""
[
]
""")
expect = 0
actual = solution.uniquePathsWithObstacles(obstacleGrid)
assert actual == expect
def test_uniquePaths7():
obstacleGrid = json.loads("""
[
[]
]
""")
expect = 0
actual = solution.uniquePathsWithObstacles(obstacleGrid)
assert actual == expect
| 16.872093
| 58
| 0.622329
| 134
| 1,451
| 6.686567
| 0.179104
| 0.020089
| 0.164063
| 0.390625
| 0.776786
| 0.776786
| 0.715402
| 0.715402
| 0.715402
| 0.547991
| 0
| 0.034608
| 0.243281
| 1,451
| 85
| 59
| 17.070588
| 0.781421
| 0
| 0
| 0.471429
| 0
| 0
| 0.164714
| 0
| 0
| 0
| 0
| 0
| 0.1
| 1
| 0.1
| false
| 0
| 0.028571
| 0
| 0.128571
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
187b5497c5988c695c1c8e77fa09f1278091053f
| 127
|
py
|
Python
|
Software/PokemonDataObtainer/models/pokedex.py
|
goodguyplayer/UniProject-AlolaPokedex
|
44a20fa08feb8ba57fdd4ca9319a07d35b3f459a
|
[
"MIT"
] | null | null | null |
Software/PokemonDataObtainer/models/pokedex.py
|
goodguyplayer/UniProject-AlolaPokedex
|
44a20fa08feb8ba57fdd4ca9319a07d35b3f459a
|
[
"MIT"
] | null | null | null |
Software/PokemonDataObtainer/models/pokedex.py
|
goodguyplayer/UniProject-AlolaPokedex
|
44a20fa08feb8ba57fdd4ca9319a07d35b3f459a
|
[
"MIT"
] | null | null | null |
import pokebase as pb
class Pokedex:
def __init__(self, id):
self.pokemon_entries = pb.pokedex(id).pokemon_entries
| 25.4
| 61
| 0.724409
| 18
| 127
| 4.777778
| 0.666667
| 0.325581
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.188976
| 127
| 5
| 61
| 25.4
| 0.834951
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
a10594f7a29d6b19f3fdb23aa2e074b3963f31f1
| 17,714
|
py
|
Python
|
pytition/petition/tests/tests_PetitionTemplateViews.py
|
lpoujade/Pytition
|
b66a4b358dc4e7dc368ec30e34e124f21920371e
|
[
"BSD-3-Clause"
] | 64
|
2019-03-07T15:32:37.000Z
|
2022-03-13T19:05:44.000Z
|
pytition/petition/tests/tests_PetitionTemplateViews.py
|
lpoujade/Pytition
|
b66a4b358dc4e7dc368ec30e34e124f21920371e
|
[
"BSD-3-Clause"
] | 157
|
2019-02-28T07:32:03.000Z
|
2021-09-24T07:07:09.000Z
|
pytition/petition/tests/tests_PetitionTemplateViews.py
|
lpoujade/Pytition
|
b66a4b358dc4e7dc368ec30e34e124f21920371e
|
[
"BSD-3-Clause"
] | 33
|
2019-04-14T23:40:33.000Z
|
2022-03-25T11:11:05.000Z
|
from django.test import TestCase
from django.urls import reverse
from django.conf import settings
from django.contrib.auth import get_user_model
from petition.models import Organization, Petition, PytitionUser, PetitionTemplate
from petition.models import Permission
from .utils import add_default_data
import os
class PetitionViewTest(TestCase):
"""Test index view"""
@classmethod
def setUpTestData(cls):
add_default_data()
def tearDown(self):
# Clean up run after every test method.
pass
def login(self, name, password=None):
self.client.login(username=name, password=password if password else name)
self.pu = PytitionUser.objects.get(user__username=name)
return self.pu
def logout(self):
self.client.logout()
def test_org_new_template_get(self):
# GET request just shows the page
# Not logged
org = Organization.objects.get(name='RAP')
response = self.client.get(reverse("org_new_template", args=[org.slugname]))
self.assertEqual(response.status_code, 302)
# Logged
self.login('julia')
response = self.client.get(reverse("org_new_template", args=[org.slugname]))
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "petition/new_template.html")
def test_org_new_template_post(self):
self.login('julia')
org = Organization.objects.get(name='RAP')
self.assertEqual(org.petitiontemplate_set.count(), 0)
data = {'template_name': 'This is a default template'}
response = self.client.post(reverse("org_new_template", args=[org.slugname]), data)
self.assertEqual(org.petitiontemplate_set.count(), 1)
self.assertEqual(response.status_code, 302)
pt = org.petitiontemplate_set.first()
self.assertRedirects(response, reverse("edit_template", args=[pt.id]))
def test_user_new_template_post(self):
julia = self.login('julia')
data = {'template_name': 'This is a default template'}
response = self.client.post(reverse("user_new_template"), data)
self.assertEqual(julia.petitiontemplate_set.count(), 1)
self.assertEqual(response.status_code, 302)
pt = julia.petitiontemplate_set.first()
self.assertRedirects(response, reverse("edit_template", args=[pt.id]))
def test_user_new_template_get(self):
julia = self.login('julia')
response = self.client.get(reverse("user_new_template"))
self.assertEqual(julia.petitiontemplate_set.count(), 0)
self.assertEqual(response.status_code, 200)
def test_edit_template(self):
julia = self.login('julia')
org = Organization.objects.get(name='RAP')
# For an org template
pt = PetitionTemplate.objects.create(name="Default template", org=org)
response = self.client.get(reverse("edit_template", args=[pt.id]))
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "petition/edit_template.html")
# For an user template
pt2 = PetitionTemplate.objects.create(name="Default template", user=julia)
response = self.client.get(reverse("edit_template", args=[pt2.id]))
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "petition/edit_template.html")
def test_template_fav_toggle(self):
julia = self.login('julia')
org = Organization.objects.get(name='RAP')
# For an org template
pt = PetitionTemplate.objects.create(name="Default template", org=org)
response = self.client.get(reverse("template_fav_toggle", args=[pt.id]))
self.assertEqual(response.status_code, 200)
org.refresh_from_db()
self.assertEqual(org.default_template, pt)
# For an user template
pt2 = PetitionTemplate.objects.create(name="Default template", user=julia)
response = self.client.get(reverse("template_fav_toggle", args=[pt2.id]))
self.assertEqual(response.status_code, 200)
julia.refresh_from_db()
self.assertEqual(julia.default_template, pt2)
def test_template_fav_toggletwice(self):
julia = self.login('julia')
org = Organization.objects.get(name='RAP')
# For an org template
pt = PetitionTemplate.objects.create(name="Default template", org=org)
response = self.client.get(reverse("template_fav_toggle", args=[pt.id]))
self.assertEqual(response.status_code, 200)
org.refresh_from_db()
self.assertEqual(org.default_template, pt)
response = self.client.get(reverse("template_fav_toggle", args=[pt.id]))
self.assertEqual(response.status_code, 200)
org.refresh_from_db()
self.assertEqual(org.default_template, None)
# For an user template
pt2 = PetitionTemplate.objects.create(name="Default template", user=julia)
response = self.client.get(reverse("template_fav_toggle", args=[pt2.id]))
self.assertEqual(response.status_code, 200)
julia.refresh_from_db()
self.assertEqual(julia.default_template, pt2)
response = self.client.get(reverse("template_fav_toggle", args=[pt2.id]))
self.assertEqual(response.status_code, 200)
julia.refresh_from_db()
self.assertEqual(julia.default_template, None)
def test_org_template_delete(self):
max = self.login('max')
org = Organization.objects.get(name='Les Amis de la Terre')
# For an org template
pt = PetitionTemplate.objects.create(name="Default template", org=org)
self.assertEqual(PetitionTemplate.objects.count(), 1)
response = self.client.get(reverse("template_delete", args=[pt.id]))
self.assertEqual(response.status_code, 403)
self.assertEqual(PetitionTemplate.objects.count(), 1)
# Ah yes, Max does not have access rights for that
p = Permission.objects.get(organization=org, user=max)
p.can_delete_templates = True
p.save()
response = self.client.get(reverse("template_delete", args=[pt.id]))
self.assertEqual(response.status_code, 200)
self.assertEqual(PetitionTemplate.objects.count(), 0)
# For an user template
pt2 = PetitionTemplate.objects.create(name="Default template", user=max)
self.assertEqual(PetitionTemplate.objects.count(), 1)
response = self.client.get(reverse("template_delete", args=[pt2.id]))
self.assertEqual(response.status_code, 200)
self.assertEqual(PetitionTemplate.objects.count(), 0)
def test_edit_template_POST_content_form(self):
julia = self.login('julia')
org = Organization.objects.get(name='RAP')
content_form_data = {
'content_form_submitted': 1,
'name': 'toto',
'text': 'tata',
'side_text': 'titi',
'footer_text': 'tutu',
'footer_links': 'tyty',
'sign_form_footer': 'lorem',
}
# For an org template
pt = PetitionTemplate.objects.create(name="Default template", org=org)
response = self.client.post(reverse("edit_template", args=[pt.id]), content_form_data)
self.assertEqual(response.status_code, 200)
pt.refresh_from_db()
self.assertTemplateUsed(response, "petition/edit_template.html")
self.assertEquals(response.context['content_form'].is_valid(), True)
self.assertEquals(response.context['content_form'].is_bound, True)
self.assertEquals(response.context['content_form_submitted'], True)
self.assertEquals(response.context['email_form_submitted'], False)
self.assertEquals(response.context['social_network_form_submitted'], False)
self.assertEquals(response.context['newsletter_form_submitted'], False)
# For an user template
pt2 = PetitionTemplate.objects.create(name="Default template", user=julia)
response = self.client.post(reverse("edit_template", args=[pt2.id]), content_form_data)
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "petition/edit_template.html")
pt2.refresh_from_db()
for key, value in content_form_data.items():
if key == "content_form_submitted":
continue
self.assertEquals(getattr(pt2, key), value)
self.assertEquals(getattr(pt, key), value)
self.assertEquals(response.context['content_form'].is_valid(), True)
self.assertEquals(response.context['content_form'].is_bound, True)
self.assertEquals(response.context['content_form_submitted'], True)
self.assertEquals(response.context['email_form_submitted'], False)
self.assertEquals(response.context['social_network_form_submitted'], False)
self.assertEquals(response.context['newsletter_form_submitted'], False)
def test_edit_template_POST_email_form(self):
julia = self.login('julia')
org = Organization.objects.get(name='RAP')
email_form_data = {
'email_form_submitted': 'yes',
'confirmation_email_reply': 'toto@tata.com',
}
# For an org template
pt = PetitionTemplate.objects.create(name="Default template", org=org)
response = self.client.post(reverse("edit_template", args=[pt.id]), email_form_data)
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "petition/edit_template.html")
self.assertEquals(response.context['email_form'].is_valid(), True)
self.assertEquals(response.context['email_form'].is_bound, True)
self.assertEquals(response.context['content_form_submitted'], False)
self.assertEquals(response.context['email_form_submitted'], True)
self.assertEquals(response.context['social_network_form_submitted'], False)
self.assertEquals(response.context['newsletter_form_submitted'], False)
pt.refresh_from_db()
# For an user template
pt2 = PetitionTemplate.objects.create(name="Default template", user=julia)
response = self.client.post(reverse("edit_template", args=[pt2.id]), email_form_data)
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "petition/edit_template.html")
self.assertEquals(response.context['email_form'].is_valid(), True)
self.assertEquals(response.context['email_form'].is_bound, True)
self.assertEquals(response.context['content_form_submitted'], False)
self.assertEquals(response.context['email_form_submitted'], True)
self.assertEquals(response.context['social_network_form_submitted'], False)
self.assertEquals(response.context['newsletter_form_submitted'], False)
pt2.refresh_from_db()
for key, value in email_form_data.items():
if key == "email_form_submitted":
continue
self.assertEquals(getattr(pt2, key), value)
self.assertEquals(getattr(pt, key), value)
def test_edit_template_POST_social_network_form(self):
julia = self.login('julia')
org = Organization.objects.get(name='RAP')
thispath = os.path.join(os.path.dirname(__file__))
logo = os.path.join(thispath, '..', '..', '..', 'logo.png')
fp = open(logo, "rb")
social_network_form_data = {
'social_network_form_submitted': 'yes',
'twitter_description': 'This is my twitter desc!',
'twitter_image': fp,
'org_twitter_handle': '@Rap_Asso',
}
# For an org template
pt = PetitionTemplate.objects.create(name="Default template", org=org)
response = self.client.post(reverse("edit_template", args=[pt.id]), social_network_form_data)
fp.close()
self.assertEqual(response.status_code, 200)
pt.refresh_from_db()
self.assertTemplateUsed(response, "petition/edit_template.html")
self.assertEquals(response.context['social_network_form'].is_valid(), True)
self.assertEquals(response.context['social_network_form'].is_bound, True)
self.assertEquals(response.context['content_form_submitted'], False)
self.assertEquals(response.context['email_form_submitted'], False)
self.assertEquals(response.context['social_network_form_submitted'], True)
self.assertEquals(response.context['newsletter_form_submitted'], False)
fp = open(logo, "rb")
social_network_form_data.update({'twitter_image': fp})
# For an user template
pt2 = PetitionTemplate.objects.create(name="Default template 2", user=julia)
response2 = self.client.post(reverse("edit_template", args=[pt2.id]), social_network_form_data)
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "petition/edit_template.html")
pt2.refresh_from_db()
for key, value in social_network_form_data.items():
if key == "social_network_form_submitted":
continue
if key == "twitter_image":
self.assertTrue(pt.twitter_image.startswith(settings.MEDIA_URL))
self.assertTrue(pt2.twitter_image.startswith(settings.MEDIA_URL))
petition_path = settings.MEDIA_ROOT + '/' + pt.twitter_image[len(settings.MEDIA_URL):]
petition2_path = settings.MEDIA_ROOT + '/' + pt2.twitter_image[len(settings.MEDIA_URL):]
with open(petition_path, "rb") as img:
with open(petition2_path, "rb") as img2:
with open(logo, "rb") as logofp:
logocontent = logofp.read()
self.assertEquals(img.read(), logocontent)
self.assertEquals(img2.read(), logocontent)
continue
self.assertEquals(getattr(pt2, key), value)
self.assertEquals(getattr(pt, key), value)
self.assertEquals(response2.context['social_network_form'].is_valid(), True)
self.assertEquals(response2.context['social_network_form'].is_bound, True)
self.assertEquals(response2.context['content_form_submitted'], False)
self.assertEquals(response2.context['email_form_submitted'], False)
self.assertEquals(response2.context['social_network_form_submitted'], True)
self.assertEquals(response2.context['newsletter_form_submitted'], False)
def test_edit_template_POST_newsletter_form(self):
julia = self.login('julia')
org = Organization.objects.get(name='RAP')
newsletter_form_data = {
'newsletter_form_submitted': 'yes',
'has_newsletter': 'on',
'newsletter_subscribe_http_data': 'blah',
'newsletter_subscribe_http_mailfield': 'blih',
'newsletter_subscribe_http_mailfield': 'bluh',
'newsletter_subscribe_mail_subject': 'bloh',
'newsletter_subscribe_mail_from': 'toto@titi.com',
'newsletter_subscribe_mail_to': 'titi@toto.com',
'newsletter_subscribe_method': 'POST',
'newsletter_subscribe_mail_smtp_host': 'localhost',
'newsletter_subscribe_mail_smtp_port': 1234,
'newsletter_subscribe_mail_smtp_user': 'root',
'newsletter_subscribe_mail_smtp_password': 'rootpassword',
'newsletter_subscribe_mail_smtp_tls': 'on',
'newsletter_subscribe_mail_smtp_starttls': '',
}
# For an org template
pt = PetitionTemplate.objects.create(name="Default template", org=org)
response = self.client.post(reverse("edit_template", args=[pt.id]), newsletter_form_data)
self.assertEqual(response.status_code, 200)
pt.refresh_from_db()
self.assertTemplateUsed(response, "petition/edit_template.html")
self.assertEquals(response.context['newsletter_form'].is_valid(), True)
self.assertEquals(response.context['newsletter_form'].is_bound, True)
self.assertEquals(response.context['content_form_submitted'], False)
self.assertEquals(response.context['email_form_submitted'], False)
self.assertEquals(response.context['social_network_form_submitted'], False)
self.assertEquals(response.context['newsletter_form_submitted'], True)
# For an user template
pt2 = PetitionTemplate.objects.create(name="Default template 2", user=julia)
response2 = self.client.post(reverse("edit_template", args=[pt2.id]), newsletter_form_data)
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "petition/edit_template.html")
pt2.refresh_from_db()
newsletter_form_data['has_newsletter'] = True
newsletter_form_data['newsletter_subscribe_mail_smtp_tls'] = True
newsletter_form_data['newsletter_subscribe_mail_smtp_starttls'] = False
for key, value in newsletter_form_data.items():
if key == "newsletter_form_submitted":
continue
self.assertEquals(getattr(pt2, key), value)
self.assertEquals(getattr(pt, key), value)
self.assertEquals(response2.context['newsletter_form'].is_valid(), True)
self.assertEquals(response2.context['newsletter_form'].is_bound, True)
self.assertEquals(response2.context['content_form_submitted'], False)
self.assertEquals(response2.context['email_form_submitted'], False)
self.assertEquals(response2.context['social_network_form_submitted'], False)
self.assertEquals(response2.context['newsletter_form_submitted'], True)
| 51.795322
| 104
| 0.677487
| 2,027
| 17,714
| 5.708929
| 0.101135
| 0.080194
| 0.074663
| 0.09644
| 0.80496
| 0.775665
| 0.743087
| 0.736433
| 0.690892
| 0.675856
| 0
| 0.009589
| 0.205261
| 17,714
| 341
| 105
| 51.947214
| 0.812402
| 0.027154
| 0
| 0.527397
| 0
| 0
| 0.185564
| 0.092288
| 0
| 0
| 0
| 0
| 0.383562
| 1
| 0.054795
| false
| 0.013699
| 0.027397
| 0
| 0.089041
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a12861ca78d56b718d42fa8127d316b4d9bc4411
| 297
|
py
|
Python
|
src/whoishistory/exceptions/__init__.py
|
whois-api-llc/whois-history-py
|
4f65596be52d844f7d49937390db6c53052f556f
|
[
"MIT"
] | null | null | null |
src/whoishistory/exceptions/__init__.py
|
whois-api-llc/whois-history-py
|
4f65596be52d844f7d49937390db6c53052f556f
|
[
"MIT"
] | null | null | null |
src/whoishistory/exceptions/__init__.py
|
whois-api-llc/whois-history-py
|
4f65596be52d844f7d49937390db6c53052f556f
|
[
"MIT"
] | null | null | null |
__all__ = [
'EmptyResponseException',
'ServerErrorException',
'UnparsableResponseException',
]
from .empty_response_exception import EmptyResponseException
from .server_error_exception import ServerErrorException
from .unparsable_response_exception import UnparsableResponseException
| 29.7
| 70
| 0.841751
| 22
| 297
| 10.909091
| 0.545455
| 0.1875
| 0.191667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107744
| 297
| 9
| 71
| 33
| 0.90566
| 0
| 0
| 0
| 0
| 0
| 0.232323
| 0.164983
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.375
| 0
| 0.375
| 0
| 1
| 0
| 1
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a12903695b353c09bc09f10ccff6be5e38d4ff6d
| 180
|
py
|
Python
|
compiler/__init__.py
|
zr40/scc
|
56166c85a69a8ec408c38d2c6d12417d83fc3aae
|
[
"MIT"
] | 1
|
2022-03-17T03:55:41.000Z
|
2022-03-17T03:55:41.000Z
|
compiler/__init__.py
|
Excloudx6/scc
|
56166c85a69a8ec408c38d2c6d12417d83fc3aae
|
[
"MIT"
] | null | null | null |
compiler/__init__.py
|
Excloudx6/scc
|
56166c85a69a8ec408c38d2c6d12417d83fc3aae
|
[
"MIT"
] | 1
|
2022-03-17T03:54:36.000Z
|
2022-03-17T03:54:36.000Z
|
from asmgenerator import Asm, nextlabel
from compilererror import CompilerError
from sccompiler import SCCompiler
from scparser import SCParser
from sctokenizer import SCTokenizer
| 30
| 39
| 0.877778
| 21
| 180
| 7.52381
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116667
| 180
| 5
| 40
| 36
| 0.993711
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a147648d267dab2f6d8cd4c15e4d3a5ad7cf7be6
| 110
|
py
|
Python
|
nipype/interfaces/dipy/__init__.py
|
nicholsn/nipype
|
6601b00aac39d17bb9fb3a6801f5a740a6ebb1e3
|
[
"BSD-3-Clause"
] | null | null | null |
nipype/interfaces/dipy/__init__.py
|
nicholsn/nipype
|
6601b00aac39d17bb9fb3a6801f5a740a6ebb1e3
|
[
"BSD-3-Clause"
] | null | null | null |
nipype/interfaces/dipy/__init__.py
|
nicholsn/nipype
|
6601b00aac39d17bb9fb3a6801f5a740a6ebb1e3
|
[
"BSD-3-Clause"
] | null | null | null |
from .tracks import TrackDensityMap
from .tensors import TensorMode
from .preprocess import Resample, Denoise
| 27.5
| 41
| 0.845455
| 13
| 110
| 7.153846
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118182
| 110
| 3
| 42
| 36.666667
| 0.958763
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a1481cb9055aa8e8bdfe7b08ee09d42702391a59
| 201
|
py
|
Python
|
airmail/utils/config.py
|
nymag/leviosa
|
6dabbb417a6a54fec956c132dd89b2e7117bd9de
|
[
"MIT"
] | null | null | null |
airmail/utils/config.py
|
nymag/leviosa
|
6dabbb417a6a54fec956c132dd89b2e7117bd9de
|
[
"MIT"
] | 10
|
2019-02-07T13:59:16.000Z
|
2019-03-28T13:16:16.000Z
|
airmail/utils/config.py
|
nymag/leviosa
|
6dabbb417a6a54fec956c132dd89b2e7117bd9de
|
[
"MIT"
] | 1
|
2019-02-09T18:35:41.000Z
|
2019-02-09T18:35:41.000Z
|
from functools import reduce
def build_config(transforms, config):
"""Reduces a dictionary through functions to modify the dictionary"""
return reduce(lambda c, fn: fn(c), transforms, config)
| 33.5
| 73
| 0.751244
| 27
| 201
| 5.555556
| 0.740741
| 0.213333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159204
| 201
| 5
| 74
| 40.2
| 0.887574
| 0.313433
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 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
| 1
| 0
| 0
| 0
|
0
| 5
|
a16c375b950329781d4ec13ae4dfb2441e365e86
| 22
|
py
|
Python
|
src/connect.py
|
CoolTechOrganisation/raspberry-api
|
704d4c5ccef21cf0ea7667b98d07547578e17f51
|
[
"MIT"
] | null | null | null |
src/connect.py
|
CoolTechOrganisation/raspberry-api
|
704d4c5ccef21cf0ea7667b98d07547578e17f51
|
[
"MIT"
] | null | null | null |
src/connect.py
|
CoolTechOrganisation/raspberry-api
|
704d4c5ccef21cf0ea7667b98d07547578e17f51
|
[
"MIT"
] | null | null | null |
#Connect to database
| 11
| 21
| 0.772727
| 3
| 22
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 22
| 1
| 22
| 22
| 0.944444
| 0.863636
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a178700dba45a0988f3e2c26004fec43e69012da
| 212
|
py
|
Python
|
image_gallery/image_gallery/storage_backends.py
|
rqroz/django_image_gallery
|
95ecd154d46e0439997b4ddb9cc440a33cd6563e
|
[
"MIT"
] | null | null | null |
image_gallery/image_gallery/storage_backends.py
|
rqroz/django_image_gallery
|
95ecd154d46e0439997b4ddb9cc440a33cd6563e
|
[
"MIT"
] | null | null | null |
image_gallery/image_gallery/storage_backends.py
|
rqroz/django_image_gallery
|
95ecd154d46e0439997b4ddb9cc440a33cd6563e
|
[
"MIT"
] | null | null | null |
from storages.backends.s3boto3 import S3Boto3Storage
from .settings import AWS_PUBLIC_MEDIA_LOCATION
class PublicMediaStorage(S3Boto3Storage):
location = AWS_PUBLIC_MEDIA_LOCATION
file_overwrite = False
| 30.285714
| 52
| 0.84434
| 24
| 212
| 7.166667
| 0.666667
| 0.104651
| 0.162791
| 0.255814
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032086
| 0.117925
| 212
| 6
| 53
| 35.333333
| 0.887701
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a179bc934efb416310021c3c66e125e5930ac6a5
| 62
|
py
|
Python
|
pdsa/helpers/hashing/__init__.py
|
victox5/pdsa
|
cfac2b02bcbcfdabc3c758b8ad4fe895e58c5cb1
|
[
"MIT"
] | 86
|
2017-10-27T06:48:48.000Z
|
2022-03-27T15:46:05.000Z
|
pdsa/helpers/hashing/__init__.py
|
victox5/pdsa
|
cfac2b02bcbcfdabc3c758b8ad4fe895e58c5cb1
|
[
"MIT"
] | 8
|
2019-09-28T08:54:20.000Z
|
2020-02-24T09:49:34.000Z
|
pdsa/helpers/hashing/__init__.py
|
victox5/pdsa
|
cfac2b02bcbcfdabc3c758b8ad4fe895e58c5cb1
|
[
"MIT"
] | 20
|
2017-08-18T09:07:04.000Z
|
2022-03-27T15:46:00.000Z
|
from .mmh import mmh3_x86_32bit
__all__ = ["mmh3_x86_32bit"]
| 15.5
| 31
| 0.774194
| 10
| 62
| 4
| 0.7
| 0.35
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185185
| 0.129032
| 62
| 3
| 32
| 20.666667
| 0.555556
| 0
| 0
| 0
| 0
| 0
| 0.225806
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a18846b7a869ba08475dcfe827e4dd03bb6742f3
| 5,840
|
py
|
Python
|
softwares/socket_utils.py
|
Wizard-collab/wizard_2
|
a2cb23362e178a0205f6dd0b9b4328c329b5b142
|
[
"MIT"
] | 1
|
2021-10-13T15:07:32.000Z
|
2021-10-13T15:07:32.000Z
|
softwares/socket_utils.py
|
Wizard-collab/wizard_2
|
a2cb23362e178a0205f6dd0b9b4328c329b5b142
|
[
"MIT"
] | null | null | null |
softwares/socket_utils.py
|
Wizard-collab/wizard_2
|
a2cb23362e178a0205f6dd0b9b4328c329b5b142
|
[
"MIT"
] | null | null | null |
# coding: utf-8
# Author: Leo BRUNEL
# Contact: contact@leobrunel.com
# Python modules
import socket
import json
import traceback
import struct
import sys
import logging
logger = logging.getLogger(__name__)
# Handle ConnectionRefusedError in python 2
if sys.version_info[0] == 2:
from socket import error as ConnectionRefusedError
def get_connection(DNS, timeout=5.0, only_debug=False):
connection = None
try:
connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connection.connect((DNS[0], DNS[1]))
return connection
except ConnectionRefusedError:
if only_debug:
logger.debug("Socket connection refused : host={}, port={}".format(DNS[0], DNS[1]))
else:
logger.error("Socket connection refused : host={}, port={}".format(DNS[0], DNS[1]))
return None
except socket.timeout:
if only_debug:
logger.debug("Socket timeout : host={}, port={}".format(DNS[0], DNS[1]))
else:
logger.error("Socket timeout : host={}, port={}".format(DNS[0], DNS[1]))
return None
except:
if only_debug:
logger.debug(str(traceback.format_exc()))
else:
logger.error(str(traceback.format_exc()))
return None
def get_server(DNS):
server = None
server_address = None
try:
server_address = socket.gethostbyname(DNS[0])
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server.bind(DNS)
server.listen(100)
except ConnectionRefusedError:
logger.debug("Socket connection refused : host={}, port={}".format(DNS[0], DNS[1]))
return None
except socket.timeout:
logger.debug("Socket timeout : host={}, port={}".format(DNS[0], DNS[1]))
return None
except:
logger.debug(str(traceback.format_exc()))
return None
return server, server_address
def send_bottle(DNS, msg_raw, timeout=0.01):
server = None
try:
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.settimeout(timeout)
server.connect(DNS)
msg = json.dumps(msg_raw).encode('utf8')
msg = struct.pack('>I', len(msg)) + msg
server.sendall(msg)
return 1
except ConnectionRefusedError:
logger.debug("Socket connection refused : host={}, port={}".format(DNS[0], DNS[1]))
return None
except socket.timeout:
logger.debug("Socket timeout : host={}, port={}".format(DNS[0], DNS[1]))
return None
except:
logger.debug(str(traceback.format_exc()))
return None
finally:
if server is not None:
server.close()
def send_signal(DNS, msg_raw, timeout=5.0):
server = None
try:
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.settimeout(timeout)
server.connect(DNS)
msg = json.dumps(msg_raw).encode('utf8')
msg = struct.pack('>I', len(msg)) + msg
server.sendall(msg)
returned = recvall(server).decode('utf8')
return json.loads(returned)
except ConnectionRefusedError:
logger.info("Socket connection refused : host={}, port={}".format(DNS[0], DNS[1]))
return None
except socket.timeout:
logger.info("Socket timeout : host={}, port={}".format(DNS[0], DNS[1]))
return None
except:
logger.error(str(traceback.format_exc()))
return None
finally:
if server is not None:
server.close()
def send_signal_with_conn(conn, msg_raw, only_debug = False):
try:
msg = json.dumps(msg_raw).encode('utf8')
msg = struct.pack('>I', len(msg)) + msg
conn.sendall(msg)
return 1
except ConnectionRefusedError:
if only_debug:
logger.debug("Socket connection refused : host={}, port={}".format(DNS[0], DNS[1]))
else:
logger.error("Socket connection refused : host={}, port={}".format(DNS[0], DNS[1]))
return None
except socket.timeout:
if only_debug:
logger.debug("Socket timeout : host={}, port={}".format(DNS[0], DNS[1]))
else:
logger.error("Socket timeout : host={}, port={}".format(DNS[0], DNS[1]))
return None
except:
if only_debug:
logger.debug(str(traceback.format_exc()))
else:
logger.error(str(traceback.format_exc()))
return None
def recvall(sock):
try:
raw_msglen = recvall_with_given_len(sock, 4)
if not raw_msglen:
return None
if sys.version_info[0] == 2:
raw_msglen = str(raw_msglen)
msglen = struct.unpack('>I', raw_msglen)[0]
return recvall_with_given_len(sock, msglen)
except ConnectionRefusedError:
logger.debug("Socket connection refused : host={}, port={}".format(DNS[0], DNS[1]))
return None
except socket.timeout:
logger.debug("Socket timeout : host={}, port={}".format(DNS[0], DNS[1]))
return None
except:
logger.debug(str(traceback.format_exc()))
return None
def recvall_with_given_len(sock, n):
try:
data = bytearray()
while len(data) < n:
packet = sock.recv(n - len(data))
if not packet:
return None
data.extend(packet)
return data
except ConnectionRefusedError:
logger.debug("Socket connection refused : host={}, port={}".format(DNS[0], DNS[1]))
return None
except socket.timeout:
logger.debug("Socket timeout : host={}, port={}".format(DNS[0], DNS[1]))
return None
except:
logger.debug(str(traceback.format_exc()))
return None
return data
| 33.757225
| 95
| 0.605137
| 709
| 5,840
| 4.895628
| 0.145275
| 0.066263
| 0.038317
| 0.043791
| 0.741285
| 0.719389
| 0.702103
| 0.702103
| 0.684241
| 0.684241
| 0
| 0.014884
| 0.263699
| 5,840
| 173
| 96
| 33.757225
| 0.792326
| 0.020548
| 0
| 0.746835
| 0
| 0
| 0.125459
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.044304
| false
| 0
| 0.044304
| 0
| 0.28481
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a19e06c7a1a486af4e2d3e4c30c3febce96732e8
| 7,186
|
py
|
Python
|
runtime/bindings/python/src/compatibility/ngraph/__init__.py
|
omartiny/openvino
|
4d27590fa19f7eecd5a1043c22307e7c7d01061e
|
[
"Apache-2.0"
] | null | null | null |
runtime/bindings/python/src/compatibility/ngraph/__init__.py
|
omartiny/openvino
|
4d27590fa19f7eecd5a1043c22307e7c7d01061e
|
[
"Apache-2.0"
] | 40
|
2020-11-17T10:09:20.000Z
|
2022-02-21T13:14:20.000Z
|
runtime/bindings/python/src/compatibility/ngraph/__init__.py
|
antonvor/openvino
|
af19b26980da566b422282ae958151ef2b0e5f83
|
[
"Apache-2.0"
] | 1
|
2021-09-08T02:47:44.000Z
|
2021-09-08T02:47:44.000Z
|
# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
"""ngraph module namespace, exposing factory functions for all ops and other classes."""
# noqa: F401
try:
from ngraph.impl import util
__version__ = util.get_ngraph_version_string()
except ImportError:
__version__ = "0.0.0.dev0"
from ngraph.impl import Dimension
from ngraph.impl import Function
from ngraph.impl import Node
from ngraph.impl import PartialShape
from ngraph.frontend import FrontEnd
from ngraph.frontend import FrontEndManager
from ngraph.frontend import GeneralFailure
from ngraph.frontend import NotImplementedFailure
from ngraph.frontend import InitializationFailure
from ngraph.frontend import InputModel
from ngraph.frontend import OpConversionFailure
from ngraph.frontend import OpValidationFailure
from ngraph.frontend import Place
from ngraph.helpers import function_from_cnn
from ngraph.helpers import function_to_cnn
from ngraph.helpers import partial_shape_from_data
from ngraph.opset7 import absolute
from ngraph.opset7 import absolute as abs
from ngraph.opset7 import acos
from ngraph.opset7 import acosh
from ngraph.opset7 import add
from ngraph.opset7 import asin
from ngraph.opset7 import asinh
from ngraph.opset7 import assign
from ngraph.opset7 import atan
from ngraph.opset7 import atanh
from ngraph.opset7 import avg_pool
from ngraph.opset7 import batch_norm_inference
from ngraph.opset7 import batch_to_space
from ngraph.opset7 import binary_convolution
from ngraph.opset7 import broadcast
from ngraph.opset7 import bucketize
from ngraph.opset7 import ceiling
from ngraph.opset7 import ceiling as ceil
from ngraph.opset7 import clamp
from ngraph.opset7 import concat
from ngraph.opset7 import constant
from ngraph.opset7 import convert
from ngraph.opset7 import convert_like
from ngraph.opset7 import convolution
from ngraph.opset7 import convolution_backprop_data
from ngraph.opset7 import cos
from ngraph.opset7 import cosh
from ngraph.opset7 import ctc_greedy_decoder
from ngraph.opset7 import ctc_greedy_decoder_seq_len
from ngraph.opset7 import ctc_loss
from ngraph.opset7 import cum_sum
from ngraph.opset7 import cum_sum as cumsum
from ngraph.opset7 import deformable_convolution
from ngraph.opset7 import deformable_psroi_pooling
from ngraph.opset7 import depth_to_space
from ngraph.opset7 import detection_output
from ngraph.opset7 import dft
from ngraph.opset7 import divide
from ngraph.opset7 import einsum
from ngraph.opset7 import elu
from ngraph.opset7 import embedding_bag_offsets_sum
from ngraph.opset7 import embedding_bag_packed_sum
from ngraph.opset7 import embedding_segments_sum
from ngraph.opset7 import extract_image_patches
from ngraph.opset7 import equal
from ngraph.opset7 import erf
from ngraph.opset7 import exp
from ngraph.opset7 import fake_quantize
from ngraph.opset7 import floor
from ngraph.opset7 import floor_mod
from ngraph.opset7 import gather
from ngraph.opset7 import gather_elements
from ngraph.opset7 import gather_nd
from ngraph.opset7 import gather_tree
from ngraph.opset7 import gelu
from ngraph.opset7 import greater
from ngraph.opset7 import greater_equal
from ngraph.opset7 import grn
from ngraph.opset7 import group_convolution
from ngraph.opset7 import group_convolution_backprop_data
from ngraph.opset7 import gru_cell
from ngraph.opset7 import gru_sequence
from ngraph.opset7 import hard_sigmoid
from ngraph.opset7 import hsigmoid
from ngraph.opset7 import hswish
from ngraph.opset7 import idft
from ngraph.opset7 import interpolate
from ngraph.opset7 import less
from ngraph.opset7 import less_equal
from ngraph.opset7 import log
from ngraph.opset7 import logical_and
from ngraph.opset7 import logical_not
from ngraph.opset7 import logical_or
from ngraph.opset7 import logical_xor
from ngraph.opset7 import log_softmax
from ngraph.opset7 import loop
from ngraph.opset7 import lrn
from ngraph.opset7 import lstm_cell
from ngraph.opset7 import lstm_sequence
from ngraph.opset7 import matmul
from ngraph.opset7 import max_pool
from ngraph.opset7 import maximum
from ngraph.opset7 import minimum
from ngraph.opset7 import mish
from ngraph.opset7 import mod
from ngraph.opset7 import multiply
from ngraph.opset7 import mvn
from ngraph.opset7 import negative
from ngraph.opset7 import non_max_suppression
from ngraph.opset7 import non_zero
from ngraph.opset7 import normalize_l2
from ngraph.opset7 import not_equal
from ngraph.opset7 import one_hot
from ngraph.opset7 import pad
from ngraph.opset7 import parameter
from ngraph.opset7 import power
from ngraph.opset7 import prelu
from ngraph.opset7 import prior_box
from ngraph.opset7 import prior_box_clustered
from ngraph.opset7 import psroi_pooling
from ngraph.opset7 import proposal
from ngraph.opset7 import range
from ngraph.opset7 import read_value
from ngraph.opset7 import reduce_l1
from ngraph.opset7 import reduce_l2
from ngraph.opset7 import reduce_logical_and
from ngraph.opset7 import reduce_logical_or
from ngraph.opset7 import reduce_max
from ngraph.opset7 import reduce_mean
from ngraph.opset7 import reduce_min
from ngraph.opset7 import reduce_prod
from ngraph.opset7 import reduce_sum
from ngraph.opset7 import region_yolo
from ngraph.opset7 import reorg_yolo
from ngraph.opset7 import relu
from ngraph.opset7 import reshape
from ngraph.opset7 import result
from ngraph.opset7 import reverse_sequence
from ngraph.opset7 import rnn_cell
from ngraph.opset7 import rnn_sequence
from ngraph.opset7 import roi_align
from ngraph.opset7 import roi_pooling
from ngraph.opset7 import roll
from ngraph.opset7 import round
from ngraph.opset7 import scatter_elements_update
from ngraph.opset7 import scatter_update
from ngraph.opset7 import select
from ngraph.opset7 import selu
from ngraph.opset7 import shape_of
from ngraph.opset7 import shuffle_channels
from ngraph.opset7 import sigmoid
from ngraph.opset7 import sign
from ngraph.opset7 import sin
from ngraph.opset7 import sinh
from ngraph.opset7 import softmax
from ngraph.opset7 import softplus
from ngraph.opset7 import space_to_batch
from ngraph.opset7 import space_to_depth
from ngraph.opset7 import split
from ngraph.opset7 import sqrt
from ngraph.opset7 import squared_difference
from ngraph.opset7 import squeeze
from ngraph.opset7 import strided_slice
from ngraph.opset7 import subtract
from ngraph.opset7 import swish
from ngraph.opset7 import tan
from ngraph.opset7 import tanh
from ngraph.opset7 import tensor_iterator
from ngraph.opset7 import tile
from ngraph.opset7 import topk
from ngraph.opset7 import transpose
from ngraph.opset7 import unsqueeze
from ngraph.opset7 import variadic_split
# Extend Node class to support binary operators
Node.__add__ = add
Node.__sub__ = subtract
Node.__mul__ = multiply
Node.__div__ = divide
Node.__truediv__ = divide
Node.__radd__ = lambda left, right: add(right, left)
Node.__rsub__ = lambda left, right: subtract(right, left)
Node.__rmul__ = lambda left, right: multiply(right, left)
Node.__rdiv__ = lambda left, right: divide(right, left)
Node.__rtruediv__ = lambda left, right: divide(right, left)
Node.__eq__ = equal
Node.__ne__ = not_equal
Node.__lt__ = less
Node.__le__ = less_equal
Node.__gt__ = greater
Node.__ge__ = greater_equal
| 35.574257
| 88
| 0.850682
| 1,084
| 7,186
| 5.47048
| 0.22417
| 0.286678
| 0.412816
| 0.567622
| 0.465767
| 0.1457
| 0.03946
| 0
| 0
| 0
| 0
| 0.027146
| 0.113137
| 7,186
| 201
| 89
| 35.751244
| 0.903342
| 0.030337
| 0
| 0
| 0
| 0
| 0.001437
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.9
| 0
| 0.9
| 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
| 1
| 0
| 1
| 0
|
0
| 5
|
a1bfd5343039d3e144afaf1ff06259bc34ef6f87
| 321
|
py
|
Python
|
website/views.py
|
alidastjani/mysite
|
23f2e76dda5397e75f29ff1af092602aad7dfa4a
|
[
"MIT"
] | null | null | null |
website/views.py
|
alidastjani/mysite
|
23f2e76dda5397e75f29ff1af092602aad7dfa4a
|
[
"MIT"
] | null | null | null |
website/views.py
|
alidastjani/mysite
|
23f2e76dda5397e75f29ff1af092602aad7dfa4a
|
[
"MIT"
] | null | null | null |
from django.shortcuts import render
from django.http import HttpResponse, JsonResponse
def index_view(request):
return render(request, 'website/index.html')
def about_view(request):
return render(request, 'website/about.html')
def contact_view(request):
return render(request, 'website/contact.html')
| 18.882353
| 50
| 0.760125
| 41
| 321
| 5.878049
| 0.414634
| 0.136929
| 0.211618
| 0.286307
| 0.460581
| 0.460581
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137072
| 321
| 16
| 51
| 20.0625
| 0.870036
| 0
| 0
| 0
| 0
| 0
| 0.175
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0.25
| 0.375
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
a1cb34dc6150390bbc764c84e2c019ecd20025dc
| 314
|
py
|
Python
|
shangmi_v1/serializers.py
|
wd-idonan/share_item
|
80b222f139a5f97d37bda9625012c838d9ccd655
|
[
"MIT"
] | null | null | null |
shangmi_v1/serializers.py
|
wd-idonan/share_item
|
80b222f139a5f97d37bda9625012c838d9ccd655
|
[
"MIT"
] | null | null | null |
shangmi_v1/serializers.py
|
wd-idonan/share_item
|
80b222f139a5f97d37bda9625012c838d9ccd655
|
[
"MIT"
] | null | null | null |
from rest_framework import serializers
from .models import *
class AdvertiseSerializer(serializers.ModelSerializer):
class Meta:
model = Advertise
fields = ["name","icon"]
class ActiveSerializer(serializers.ModelSerializer):
class Meta:
model = Active
fields = "__all__"
| 22.428571
| 55
| 0.694268
| 29
| 314
| 7.344828
| 0.62069
| 0.244131
| 0.29108
| 0.328639
| 0.375587
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.226115
| 314
| 14
| 56
| 22.428571
| 0.876543
| 0
| 0
| 0.2
| 0
| 0
| 0.047619
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 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
| 5
|
b82295dbc37722160441e303142f7cc59a84823b
| 168
|
py
|
Python
|
pymls/__init__.py
|
OlivierDAZEL/pymls
|
cd0e149f97f9c17f59125c827db5ca1b5b1d8630
|
[
"MIT"
] | 1
|
2019-06-27T07:01:18.000Z
|
2019-06-27T07:01:18.000Z
|
pymls/__init__.py
|
OlivierDAZEL/pymls
|
cd0e149f97f9c17f59125c827db5ca1b5b1d8630
|
[
"MIT"
] | null | null | null |
pymls/__init__.py
|
OlivierDAZEL/pymls
|
cd0e149f97f9c17f59125c827db5ca1b5b1d8630
|
[
"MIT"
] | null | null | null |
__VERSION__ = '1.4'
from pymls.solver import Solver
from pymls.layers import Layer, StochasticLayer
from pymls.media import from_yaml
import pymls.backing as backing
| 21
| 47
| 0.815476
| 25
| 168
| 5.28
| 0.56
| 0.204545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013699
| 0.130952
| 168
| 7
| 48
| 24
| 0.890411
| 0
| 0
| 0
| 0
| 0
| 0.017857
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
62a0fe805c0c5a5e4bdb08cfe907d49b6878260c
| 228
|
py
|
Python
|
tests/conftest.py
|
admdev8/git-portfolio
|
4269923bac2d31c9058b76bb6facfdadd4045603
|
[
"MIT"
] | 3
|
2020-07-28T05:02:40.000Z
|
2021-10-17T17:12:46.000Z
|
tests/conftest.py
|
staticdev/git-portfolio
|
3ec1aa1d98324068b6019274ed2b099b744e14a0
|
[
"MIT"
] | 218
|
2020-06-20T18:19:16.000Z
|
2022-03-31T11:58:24.000Z
|
tests/conftest.py
|
admdev8/git-portfolio
|
4269923bac2d31c9058b76bb6facfdadd4045603
|
[
"MIT"
] | 2
|
2020-10-17T13:03:24.000Z
|
2021-02-11T07:11:19.000Z
|
"""Package-wide test fixtures."""
import _pytest.config
def pytest_configure(config: _pytest.config.Config) -> None:
"""Pytest configuration hook."""
config.addinivalue_line("markers", "e2e: mark as end-to-end test.")
| 28.5
| 71
| 0.714912
| 29
| 228
| 5.482759
| 0.689655
| 0.150943
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005025
| 0.127193
| 228
| 7
| 72
| 32.571429
| 0.79397
| 0.236842
| 0
| 0
| 0
| 0
| 0.220859
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
62ad9506447e1a68c7c385b4cd796bfc34dde9d9
| 237
|
py
|
Python
|
source/placentagen/__init__.py
|
stephleighton/placentagen
|
968685955fce7ca5503a85713113f62c1e5c74a4
|
[
"Apache-2.0"
] | 2
|
2019-06-11T21:35:54.000Z
|
2022-03-10T01:53:43.000Z
|
source/placentagen/__init__.py
|
stephleighton/placentagen
|
968685955fce7ca5503a85713113f62c1e5c74a4
|
[
"Apache-2.0"
] | 31
|
2018-03-14T01:43:19.000Z
|
2020-07-23T21:23:27.000Z
|
source/placentagen/__init__.py
|
stephleighton/placentagen
|
968685955fce7ca5503a85713113f62c1e5c74a4
|
[
"Apache-2.0"
] | 6
|
2018-04-29T23:42:48.000Z
|
2021-09-14T01:33:53.000Z
|
from .generate_shapes import *
from .imports_and_exports import *
from .grow_tree import *
from .analyse_tree import *
from .pg_utilities import *
from .flow_models import *
from .visualisation import *
from .skeleton_to_tree import *
| 21.545455
| 34
| 0.78903
| 33
| 237
| 5.393939
| 0.515152
| 0.393258
| 0.157303
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14346
| 237
| 10
| 35
| 23.7
| 0.876847
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
62adeb471e097f7a5d764705e6a14921d8f90408
| 34
|
py
|
Python
|
multitool/__init__.py
|
alexpdev/multitool
|
8a635410d5010d9be2e5118b887e26244589a5df
|
[
"MIT"
] | null | null | null |
multitool/__init__.py
|
alexpdev/multitool
|
8a635410d5010d9be2e5118b887e26244589a5df
|
[
"MIT"
] | null | null | null |
multitool/__init__.py
|
alexpdev/multitool
|
8a635410d5010d9be2e5118b887e26244589a5df
|
[
"MIT"
] | null | null | null |
from multitool.cli import execute
| 17
| 33
| 0.852941
| 5
| 34
| 5.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 34
| 1
| 34
| 34
| 0.966667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
62bdbb44fc34451e205c51fd49138444b893a285
| 161
|
py
|
Python
|
0x04-python-more_data_structures/3-common_elements.py
|
oluwaseun-ebenezer/holbertonschool-higher_level_programming
|
e830f969d3ca71abf0a2f6d4f7c64a82337eccd7
|
[
"MIT"
] | null | null | null |
0x04-python-more_data_structures/3-common_elements.py
|
oluwaseun-ebenezer/holbertonschool-higher_level_programming
|
e830f969d3ca71abf0a2f6d4f7c64a82337eccd7
|
[
"MIT"
] | null | null | null |
0x04-python-more_data_structures/3-common_elements.py
|
oluwaseun-ebenezer/holbertonschool-higher_level_programming
|
e830f969d3ca71abf0a2f6d4f7c64a82337eccd7
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python3
# 3-common_elements.py
def common_elements(set_1, set_2):
"""Return a set of common elements in two sets."""
return (set_1 & set_2)
| 20.125
| 54
| 0.68323
| 28
| 161
| 3.714286
| 0.607143
| 0.403846
| 0.134615
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045455
| 0.180124
| 161
| 7
| 55
| 23
| 0.742424
| 0.515528
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
62c6dc583017e554ae683f4355ec76fb9f24cba4
| 123
|
py
|
Python
|
run_codemod.py
|
anthony2025/jstranslate
|
e92db84ac1a93b79381762f8dd9a651918b113ae
|
[
"CC0-1.0"
] | null | null | null |
run_codemod.py
|
anthony2025/jstranslate
|
e92db84ac1a93b79381762f8dd9a651918b113ae
|
[
"CC0-1.0"
] | null | null | null |
run_codemod.py
|
anthony2025/jstranslate
|
e92db84ac1a93b79381762f8dd9a651918b113ae
|
[
"CC0-1.0"
] | null | null | null |
#!/usr/bin/python3
import os
import codemod
# iterate over all keywords in csv
# codemod.Query(...).run_interactive()
| 17.571429
| 42
| 0.715447
| 17
| 123
| 5.117647
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009615
| 0.154472
| 123
| 6
| 43
| 20.5
| 0.826923
| 0.707317
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1a0d19c64f92306f05f67f2642fb2ea40518e63f
| 19
|
py
|
Python
|
cloudmesh/common/__version__.py
|
dkkolli/cloudmesh-common
|
a37a8960baf967362be3db91542ad98abc41b388
|
[
"Apache-2.0"
] | null | null | null |
cloudmesh/common/__version__.py
|
dkkolli/cloudmesh-common
|
a37a8960baf967362be3db91542ad98abc41b388
|
[
"Apache-2.0"
] | null | null | null |
cloudmesh/common/__version__.py
|
dkkolli/cloudmesh-common
|
a37a8960baf967362be3db91542ad98abc41b388
|
[
"Apache-2.0"
] | null | null | null |
version = "4.3.58"
| 9.5
| 18
| 0.578947
| 4
| 19
| 2.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0.157895
| 19
| 1
| 19
| 19
| 0.4375
| 0
| 0
| 0
| 0
| 0
| 0.315789
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a7e55ee80a4e696b2750a33c5e37c3da767c32ae
| 107
|
py
|
Python
|
services/web/project/api/v1/user/__init__.py
|
arsalasif/flask-rest-api
|
7e86cf69440f53a57cd49819825e20b0e94f6624
|
[
"MIT"
] | 8
|
2020-07-17T16:23:31.000Z
|
2022-01-05T01:52:06.000Z
|
services/web/project/api/v1/user/__init__.py
|
arsalasif/flask-rest-api
|
7e86cf69440f53a57cd49819825e20b0e94f6624
|
[
"MIT"
] | null | null | null |
services/web/project/api/v1/user/__init__.py
|
arsalasif/flask-rest-api
|
7e86cf69440f53a57cd49819825e20b0e94f6624
|
[
"MIT"
] | 3
|
2020-12-24T03:45:29.000Z
|
2021-12-09T15:04:30.000Z
|
from .user import user_blueprint
"""
Add your user blueprints here
"""
user_blueprints = [user_blueprint]
| 15.285714
| 34
| 0.766355
| 14
| 107
| 5.642857
| 0.571429
| 0.329114
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140187
| 107
| 6
| 35
| 17.833333
| 0.858696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 1
| 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
| 1
|
0
| 5
|
a7e70fe46a88bcc5077429b7a1d5824d7bb64e18
| 21,632
|
py
|
Python
|
tests/unit/MoranProcess3D.py
|
AngryMaciek/angry-moran-simulator
|
a76dab43a511640a8fa474c1da4f54f36f39db66
|
[
"MIT"
] | 5
|
2020-09-01T06:06:37.000Z
|
2022-01-17T23:34:41.000Z
|
tests/unit/MoranProcess3D.py
|
AngryMaciek/angry-moran-simulator
|
a76dab43a511640a8fa474c1da4f54f36f39db66
|
[
"MIT"
] | 24
|
2020-07-25T21:05:56.000Z
|
2021-05-28T22:29:23.000Z
|
tests/unit/MoranProcess3D.py
|
AngryMaciek/angry-moran-simulator
|
a76dab43a511640a8fa474c1da4f54f36f39db66
|
[
"MIT"
] | 5
|
2020-08-24T19:29:29.000Z
|
2022-02-05T00:43:36.000Z
|
"""
##############################################################################
#
# Unit tests for the 3D population evolution
#
# AUTHOR: Maciej_Bak
# AFFILIATION: University_of_Basel
# AFFILIATION: Swiss_Institute_of_Bioinformatics
# CONTACT: wsciekly.maciek@gmail.com
# CREATED: 15-08-2020
# LICENSE: MIT
#
##############################################################################
"""
# imports
import numpy as np
import pytest
import random
from .context import moranpycess
class TestClass:
"""Test class for pytest package."""
def test_classMoranProcess3DInit(self):
"""Test the initializer."""
# initialize an instance of MoranProcess3D:
size_list = [7, 1]
label_list = ["A", "B"]
grid = np.array([[["A", "A"], ["A", "B"]], [["A", "A"], ["A", "A"]]])
BirthPayoffMatrix = np.array([[10, 20], [30, 40]])
DeathPayoffMatrix = np.array([[1, 2], [3, 4]])
mp = moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
# test all the attributes:
assert mp.init_size_list == size_list
assert mp.curr_size_list == size_list
assert mp.init_label_list == label_list
assert mp.population.shape == grid.shape
assert mp.w == 0.5
assert mp.TransitionMatrix is None
comparison = mp.init_grid == grid
assert comparison.all()
comparison = mp.curr_grid == grid
assert comparison.all()
comparison = mp.BirthPayoffMatrix == BirthPayoffMatrix
assert comparison.all()
comparison = mp.DeathPayoffMatrix == DeathPayoffMatrix
assert comparison.all()
def test_classMoranProcess3DWrongInit(self):
"""Test assertion errors in the initializer."""
# test improper lists error
size_list = [7, 1]
label_list = ["A", "B", "C"]
grid = np.array([[["A", "A"], ["A", "B"]], [["A", "A"], ["A", "A"]]])
BirthPayoffMatrix = np.array([[10, 20], [30, 40]])
DeathPayoffMatrix = np.array([[1, 2], [3, 4]])
with pytest.raises(AssertionError):
moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
# test improper Birth Payoff Matrix
size_list = [7, 1]
label_list = ["A", "B"]
grid = np.array([[["A", "A"], ["A", "B"]], [["A", "A"], ["A", "A"]]])
BirthPayoffMatrix = np.array([[10, 20, 20], [30, 40, 40], [1, 1, 1]])
DeathPayoffMatrix = np.array([[1, 2], [3, 4]])
with pytest.raises(AssertionError):
moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
# test improper Death Payoff Matrix
size_list = [7, 1]
label_list = ["A", "B"]
grid = np.array([[["A", "A"], ["A", "B"]], [["A", "A"], ["A", "A"]]])
BirthPayoffMatrix = np.array([[1, 2], [3, 4]])
DeathPayoffMatrix = np.array([[10, 20, 20], [30, 40, 40], [1, 1, 1]])
with pytest.raises(AssertionError):
moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
# test improper population grid 1
size_list = [7, 1]
label_list = ["A", "B"]
grid = np.array([[["A", "A"], ["C", "B"]], [["A", "A"], ["A", "A"]]])
BirthPayoffMatrix = np.array([[10, 20], [30, 40]])
DeathPayoffMatrix = np.array([[1, 2], [3, 4]])
with pytest.raises(AssertionError):
moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
# test improper population grid 2
size_list = [7, 1]
label_list = ["A", "B"]
grid = np.array([[["A", "A"], ["B", "B"]], [["A", "A"], ["A", "A"]]])
BirthPayoffMatrix = np.array([[10, 20], [30, 40]])
DeathPayoffMatrix = np.array([[1, 2], [3, 4]])
with pytest.raises(AssertionError):
moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
# test improper Transition Matrix
size_list = [7, 1]
label_list = ["A", "B"]
grid = np.array([[["A", "A"], ["A", "B"]], [["A", "A"], ["A", "A"]]])
BirthPayoffMatrix = np.array([[1, 2], [3, 4]])
DeathPayoffMatrix = np.array([[10, 20], [30, 40]])
TransitionMatrix = np.array([[0.0], [0.0]])
with pytest.raises(AssertionError):
moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
TransitionMatrix=TransitionMatrix,
)
# test improper values in Transition Matrix
size_list = [7, 1]
label_list = ["A", "B"]
grid = np.array([[["A", "A"], ["A", "B"]], [["A", "A"], ["A", "A"]]])
BirthPayoffMatrix = np.array([[1, 2], [3, 4]])
DeathPayoffMatrix = np.array([[10, 20], [30, 40]])
TransitionMatrix = np.array([[0.5, 0.4], [0.5, 0.5]])
expected_error_msg = "Incorrect value for Transition Matrix."
expected_error_msg += " "
expected_error_msg += "Transition probabilities need to add up to 1.0."
with pytest.raises(
moranpycess.CustomExceptions.IncorrectValueError, match=expected_error_msg
):
moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
TransitionMatrix=TransitionMatrix,
)
def test_classMoranProcess3DUpdateBirthPayoff(self):
"""Test the UpdateBirthPayoff function."""
# initialize an instance of MoranProcess3D:
size_list = [47, 11, 5, 1]
label_list = ["A", "B", "C", "D"]
grid = np.array(
[
[
["A", "B", "A", "B"],
["B", "A", "C", "C"],
["C", "D", "A", "A"],
["A", "A", "A", "A"],
],
[
["A", "B", "A", "A"],
["A", "A", "B", "A"],
["A", "A", "A", "A"],
["A", "A", "A", "A"],
],
[
["A", "B", "A", "B"],
["A", "B", "A", "A"],
["A", "A", "A", "A"],
["A", "A", "B", "A"],
],
[
["A", "B", "A", "B"],
["C", "A", "A", "A"],
["A", "A", "A", "A"],
["A", "C", "A", "A"],
],
]
)
BirthPayoffMatrix = np.array(
[
[1, 7, 11, 29],
[0.1, 0.5, 0.22, 0.99],
[0.001, 0.005, 0.0022, 0.0099],
[1000, 7000, 1234, 0],
]
)
DeathPayoffMatrix = np.array(
[[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]
)
mp = moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
assert round(mp.population[3, 0, 3].AvgBirthPayoff, 3) == 0.175
assert round(mp.population[1, 1, 3].AvgBirthPayoff, 3) == 3.077
assert round(mp.population[1, 2, 1].AvgBirthPayoff, 3) == 3.769
def test_classMoranProcess3DUpdateDeathPayoff(self):
"""Test the UpdateDeathPayoff function."""
# initialize an instance of MoranProcess3D:
size_list = [47, 11, 5, 1]
label_list = ["A", "B", "C", "D"]
grid = np.array(
[
[
["A", "B", "A", "B"],
["B", "A", "C", "C"],
["C", "D", "A", "A"],
["A", "A", "A", "A"],
],
[
["A", "B", "A", "A"],
["A", "A", "B", "A"],
["A", "A", "A", "A"],
["A", "A", "A", "A"],
],
[
["A", "B", "A", "B"],
["A", "B", "A", "A"],
["A", "A", "A", "A"],
["A", "A", "B", "A"],
],
[
["A", "B", "A", "B"],
["C", "A", "A", "A"],
["A", "A", "A", "A"],
["A", "C", "A", "A"],
],
]
)
BirthPayoffMatrix = np.array(
[[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]
)
DeathPayoffMatrix = np.array(
[
[1, 7, 11, 29],
[0.1, 0.5, 0.22, 0.99],
[0.001, 0.005, 0.0022, 0.0099],
[1000, 7000, 1234, 0],
]
)
mp = moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
assert round(mp.population[3, 0, 3].AvgDeathPayoff, 3) == 0.175
assert round(mp.population[1, 1, 3].AvgDeathPayoff, 3) == 3.077
assert round(mp.population[1, 2, 1].AvgDeathPayoff, 3) == 3.769
def test_classMoranProcess3DUpdateBirthFitness(self):
"""Test the UpdateBirthFitness function."""
# initialize an instance of MoranProcess3D:
size_list = [47, 11, 5, 1]
label_list = ["A", "B", "C", "D"]
grid = np.array(
[
[
["A", "B", "A", "B"],
["B", "A", "C", "C"],
["C", "D", "A", "A"],
["A", "A", "A", "A"],
],
[
["A", "B", "A", "A"],
["A", "A", "B", "A"],
["A", "A", "A", "A"],
["A", "A", "A", "A"],
],
[
["A", "B", "A", "B"],
["A", "B", "A", "A"],
["A", "A", "A", "A"],
["A", "A", "B", "A"],
],
[
["A", "B", "A", "B"],
["C", "A", "A", "A"],
["A", "A", "A", "A"],
["A", "C", "A", "A"],
],
]
)
BirthPayoffMatrix = np.array(
[
[1, 7, 11, 29],
[0.1, 0.5, 0.22, 0.99],
[0.001, 0.005, 0.0022, 0.0099],
[1000, 7000, 1234, 0],
]
)
DeathPayoffMatrix = np.array(
[[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]
)
mp = moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
assert round(mp.population[3, 0, 3].BirthFitness, 3) == 0.588
assert round(mp.population[1, 1, 3].BirthFitness, 3) == 2.038
assert round(mp.population[1, 2, 1].BirthFitness, 3) == 2.385
def test_classMoranProcess3DUpdateDeathFitness(self):
"""Test the UpdateDeathFitness function."""
# initialize an instance of MoranProcess3D:
size_list = [47, 11, 5, 1]
label_list = ["A", "B", "C", "D"]
grid = np.array(
[
[
["A", "B", "A", "B"],
["B", "A", "C", "C"],
["C", "D", "A", "A"],
["A", "A", "A", "A"],
],
[
["A", "B", "A", "A"],
["A", "A", "B", "A"],
["A", "A", "A", "A"],
["A", "A", "A", "A"],
],
[
["A", "B", "A", "B"],
["A", "B", "A", "A"],
["A", "A", "A", "A"],
["A", "A", "B", "A"],
],
[
["A", "B", "A", "B"],
["C", "A", "A", "A"],
["A", "A", "A", "A"],
["A", "C", "A", "A"],
],
]
)
BirthPayoffMatrix = np.array(
[[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]
)
DeathPayoffMatrix = np.array(
[
[1, 7, 11, 29],
[0.1, 0.5, 0.22, 0.99],
[0.001, 0.005, 0.0022, 0.0099],
[1000, 7000, 1234, 0],
]
)
mp = moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
assert round(mp.population[3, 0, 3].DeathFitness, 3) == 0.588
assert round(mp.population[1, 1, 3].DeathFitness, 3) == 2.038
assert round(mp.population[1, 2, 1].DeathFitness, 3) == 2.385
def test_classMoranProcess3D_roulette_wheel_selection_Birth(self):
"""Test the roulette wheel selection method for Birth."""
# initialize an instance of MoranProcess3D:
size_list = [26, 1]
label_list = ["A", "B"]
grid = np.array(
[
[["A", "A", "A"], ["A", "A", "A"], ["A", "A", "A"],],
[["A", "A", "A"], ["A", "B", "A"], ["A", "A", "A"],],
[["A", "A", "A"], ["A", "A", "A"], ["A", "A", "A"],],
]
)
BirthPayoffMatrix = np.array([[1, 1], [1000, 1]])
DeathPayoffMatrix = np.array([[1, 1], [1, 1]])
mp = moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
# test the selection:
random.seed(0)
(x, y, z) = mp._roulette_wheel_selection_Birth()
ind = mp.population[x, y, z]
assert ind.ID == 13
assert ind.label == "B"
def test_classMoranProcess3D_roulette_wheel_selection_Death(self):
"""Test the roulette wheel selection method for Death."""
# initialize an instance of MoranProcess3D:
size_list = [26, 1]
label_list = ["A", "B"]
grid = np.array(
[
[["A", "A", "A"], ["A", "A", "A"], ["A", "A", "A"],],
[["A", "A", "A"], ["A", "B", "A"], ["A", "A", "A"],],
[["A", "A", "A"], ["A", "A", "A"], ["A", "A", "A"],],
]
)
BirthPayoffMatrix = np.array([[1, 1], [1, 1]])
DeathPayoffMatrix = np.array([[1, 1], [1000, 1]])
mp = moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
# test the selection:
random.seed(0)
(x, y, z) = mp._roulette_wheel_selection_Death(0, 0, 0)
ind = mp.population[x, y, z]
assert ind.ID == 13
assert ind.label == "B"
def test_classMoranProcess3D_simulate(self):
"""Test the simulation process."""
# initialize an instance of MoranProcess3D:
size_list = [47, 11, 5, 1]
label_list = ["A", "B", "C", "D"]
grid = np.array(
[
[
["A", "B", "A", "B"],
["B", "A", "C", "C"],
["C", "D", "A", "A"],
["A", "A", "A", "A"],
],
[
["A", "B", "A", "A"],
["A", "A", "B", "A"],
["A", "A", "A", "A"],
["A", "A", "A", "A"],
],
[
["A", "B", "A", "B"],
["A", "B", "A", "A"],
["A", "A", "A", "A"],
["A", "A", "B", "A"],
],
[
["A", "B", "A", "B"],
["C", "A", "A", "A"],
["A", "A", "A", "A"],
["A", "C", "A", "A"],
],
]
)
BirthPayoffMatrix = np.array(
[
[1, 7, 11, 29],
[0.1, 0.5, 0.22, 0.99],
[0.001, 0.005, 0.0022, 0.0099],
[1000, 7000, 1234, 0],
]
)
DeathPayoffMatrix = np.array(
[[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]
)
mp = moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
# test the simulation:
random.seed(0)
simulation = mp.simulate(generations=10)
assert mp.curr_size_list == [42, 10, 4, 8]
assert simulation.shape == (11, 5)
def test_plots3D(self):
"""Test the plotting functions."""
# initialize an instance of MoranProcess3D:
size_list = [47, 11, 5, 1]
label_list = ["A", "B", "C", "D"]
grid = np.array(
[
[
["A", "B", "A", "B"],
["B", "A", "C", "C"],
["C", "D", "A", "A"],
["A", "A", "A", "A"],
],
[
["A", "B", "A", "A"],
["A", "A", "B", "A"],
["A", "A", "A", "A"],
["A", "A", "A", "A"],
],
[
["A", "B", "A", "B"],
["A", "B", "A", "A"],
["A", "A", "A", "A"],
["A", "A", "B", "A"],
],
[
["A", "B", "A", "B"],
["C", "A", "A", "A"],
["A", "A", "A", "A"],
["A", "C", "A", "A"],
],
]
)
BirthPayoffMatrix = np.array(
[
[1, 7, 11, 29],
[0.1, 0.5, 0.22, 0.99],
[0.001, 0.005, 0.0022, 0.0099],
[1000, 7000, 1234, 0],
]
)
DeathPayoffMatrix = np.array(
[[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]
)
mp = moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
)
# test the simulation:
random.seed(0)
simulation = mp.simulate(generations=10)
# test the plotting:
mp.PlotSize3D(simulation, "./tests/output/3D_size.png")
mp.PlotEntropy3D(simulation, "./tests/output/3D_Entropy.png")
assert True # mark that no error was raised before
def test_MoranProcess3DWithTransitionMatrix(self):
"""Test the 3D simulation with a Transition Matrix."""
# initialize an instance of MoranProcess3D:
size_list = [27, 0]
label_list = ["A", "B"]
grid = np.array(
[
[["A", "A", "A"], ["A", "A", "A"], ["A", "A", "A"],],
[["A", "A", "A"], ["A", "A", "A"], ["A", "A", "A"],],
[["A", "A", "A"], ["A", "A", "A"], ["A", "A", "A"],],
]
)
BirthPayoffMatrix = np.array([[1, 1], [1, 1]])
DeathPayoffMatrix = np.array([[1, 1], [1, 1]])
TransitionMatrix = np.array([[0.0, 1.0], [0.0, 1.0]])
mp = moranpycess.MoranProcess3D(
size_list=size_list,
label_list=label_list,
grid=grid,
BirthPayoffMatrix=BirthPayoffMatrix,
DeathPayoffMatrix=DeathPayoffMatrix,
TransitionMatrix=TransitionMatrix,
)
comparison = mp.TransitionMatrix == TransitionMatrix
assert comparison.all()
# run the simulation:
random.seed(0)
mp.simulate(generations=1)
assert mp.curr_size_list == [0, 27]
| 36.113523
| 86
| 0.404863
| 2,149
| 21,632
| 4.000465
| 0.084225
| 0.073514
| 0.088287
| 0.094917
| 0.790276
| 0.770967
| 0.756194
| 0.737816
| 0.722461
| 0.722461
| 0
| 0.060965
| 0.407036
| 21,632
| 598
| 87
| 36.173913
| 0.609262
| 0.078634
| 0
| 0.699234
| 0
| 0
| 0.036244
| 0.002772
| 0
| 0
| 0
| 0
| 0.070881
| 1
| 0.021073
| false
| 0
| 0.007663
| 0
| 0.030651
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a7f87f0d4e9ba65078dce1de68a4ca58fb2420f6
| 21
|
py
|
Python
|
lib/dice/__init__.py
|
tunityy/Neon8-Discord-Bot
|
3cea7a05356ae5dadd2d7adabbf932bebfb849d8
|
[
"MIT"
] | null | null | null |
lib/dice/__init__.py
|
tunityy/Neon8-Discord-Bot
|
3cea7a05356ae5dadd2d7adabbf932bebfb849d8
|
[
"MIT"
] | null | null | null |
lib/dice/__init__.py
|
tunityy/Neon8-Discord-Bot
|
3cea7a05356ae5dadd2d7adabbf932bebfb849d8
|
[
"MIT"
] | null | null | null |
# from . import rolls
| 21
| 21
| 0.714286
| 3
| 21
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.190476
| 21
| 1
| 21
| 21
| 0.882353
| 0.904762
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c50bdefdbe0e4052ef1143304d74902411237077
| 2,194
|
py
|
Python
|
tests/validators/ndarray/test_shape.py
|
tfiers/parachute
|
7a88c0708274670d8b381282cae829c928a7c344
|
[
"MIT"
] | null | null | null |
tests/validators/ndarray/test_shape.py
|
tfiers/parachute
|
7a88c0708274670d8b381282cae829c928a7c344
|
[
"MIT"
] | 9
|
2018-09-12T17:58:07.000Z
|
2018-09-16T21:26:31.000Z
|
tests/validators/ndarray/test_shape.py
|
tfiers/parachute
|
7a88c0708274670d8b381282cae829c928a7c344
|
[
"MIT"
] | null | null | null |
import numpy as np
from parachute import shape
def test_shapespec_any():
Shape = shape(None)
assert not Shape("not a shapespec").is_valid()
assert not Shape((4, "4")).is_valid()
assert not Shape((4, None)).is_valid()
assert not Shape((None,)).is_valid()
assert Shape(()).is_valid()
assert Shape((4,)).is_valid()
assert Shape((5, 4)).is_valid()
assert Shape((5, 0)).is_valid()
assert Shape((5, False)).is_valid()
assert Shape((5, 42098507180)).is_valid()
assert Shape((5, 4, 0, 9)).is_valid()
def test_shapespec_fix():
Shape = shape((5, 4))
assert not Shape("not a shapespec").is_valid()
assert not Shape((4, "4")).is_valid()
assert not Shape((4, None)).is_valid()
assert not Shape((None,)).is_valid()
assert not Shape(()).is_valid()
assert not Shape((4,)).is_valid()
assert Shape((5, 4)).is_valid()
assert not Shape((5, 0)).is_valid()
assert not Shape((5, False)).is_valid()
assert not Shape((5, 42098507180)).is_valid()
assert not Shape((5, 4, 0, 9)).is_valid()
def test_shapespec_wildcard():
Shape = shape((5, None))
assert not Shape("not a shapespec").is_valid()
assert not Shape((4, "4")).is_valid()
assert not Shape((4, None)).is_valid()
assert not Shape((None,)).is_valid()
assert not Shape(()).is_valid()
assert not Shape((4,)).is_valid()
assert Shape((5, 4)).is_valid()
assert Shape((5, 0)).is_valid()
assert Shape((5, False)).is_valid()
assert Shape((5, 42098507180)).is_valid()
assert not Shape((5, 4, 0, 9)).is_valid()
def test_non_tuple_iterable():
Shape = shape()
assert not Shape(["one", "love"]).is_valid()
assert Shape([1, 3]).is_valid()
assert Shape(np.array([1, 3])).is_valid()
assert Shape((i for i in range(3))).is_valid()
def test_repr():
pairs = {
None: "Array shape arbitrary.",
(): "Array shape ().",
(0,): "Array shape (0,).",
(None,): "Array shape (arbitrary,).",
(5, 4): "Array shape (5, 4).",
(5, None): "Array shape (5, arbitrary).",
}
for spec, string in pairs.items():
assert shape(spec).get_annotation_str() == string
| 30.901408
| 57
| 0.60392
| 328
| 2,194
| 3.890244
| 0.140244
| 0.202978
| 0.336207
| 0.225705
| 0.688871
| 0.688871
| 0.615987
| 0.615987
| 0.615987
| 0.615987
| 0
| 0.052269
| 0.206472
| 2,194
| 70
| 58
| 31.342857
| 0.680643
| 0
| 0
| 0.465517
| 0
| 0
| 0.082042
| 0
| 0
| 0
| 0
| 0
| 0.655172
| 1
| 0.086207
| false
| 0
| 0.034483
| 0
| 0.12069
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c51c1a241d148c1e765b3f2533e04f3efa32fff2
| 41
|
py
|
Python
|
test.py
|
ritzgeorge/Salient-codes
|
83fa614a55dd3ab798ba86fd64362fd5d1f28b6b
|
[
"Apache-2.0"
] | null | null | null |
test.py
|
ritzgeorge/Salient-codes
|
83fa614a55dd3ab798ba86fd64362fd5d1f28b6b
|
[
"Apache-2.0"
] | null | null | null |
test.py
|
ritzgeorge/Salient-codes
|
83fa614a55dd3ab798ba86fd64362fd5d1f28b6b
|
[
"Apache-2.0"
] | null | null | null |
print('abc')
print('bgf')
print(chr(27))
| 13.666667
| 15
| 0.634146
| 7
| 41
| 3.714286
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0.073171
| 41
| 3
| 15
| 13.666667
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
3daa27e697120994562c725246e249b9ee6166f7
| 126
|
py
|
Python
|
views.py
|
xelnod/otus_web_04
|
1545b61447cd90c63fa4016c9ff2c85385abe10a
|
[
"MIT"
] | null | null | null |
views.py
|
xelnod/otus_web_04
|
1545b61447cd90c63fa4016c9ff2c85385abe10a
|
[
"MIT"
] | null | null | null |
views.py
|
xelnod/otus_web_04
|
1545b61447cd90c63fa4016c9ff2c85385abe10a
|
[
"MIT"
] | null | null | null |
from otus04.renderer import render
# Write your views here
def index(request):
return render('templates/index.html')
| 15.75
| 41
| 0.738095
| 17
| 126
| 5.470588
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019231
| 0.174603
| 126
| 7
| 42
| 18
| 0.875
| 0.166667
| 0
| 0
| 0
| 0
| 0.19802
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
|
0
| 5
|
3dba777915b6e95ad8b0fc4b22d67f8135c57b7d
| 382
|
py
|
Python
|
octicons16px/plus_circle.py
|
andrewp-as-is/octicons16px.py
|
1272dc9f290619d83bd881e87dbd723b0c48844c
|
[
"Unlicense"
] | 1
|
2021-01-28T06:47:39.000Z
|
2021-01-28T06:47:39.000Z
|
octicons16px/plus_circle.py
|
andrewp-as-is/octicons16px.py
|
1272dc9f290619d83bd881e87dbd723b0c48844c
|
[
"Unlicense"
] | null | null | null |
octicons16px/plus_circle.py
|
andrewp-as-is/octicons16px.py
|
1272dc9f290619d83bd881e87dbd723b0c48844c
|
[
"Unlicense"
] | null | null | null |
OCTICON_PLUS_CIRCLE = """
<svg class="octicon octicon-plus-circle" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.75 4.75a.75.75 0 00-1.5 0v2.5h-2.5a.75.75 0 000 1.5h2.5v2.5a.75.75 0 001.5 0v-2.5h2.5a.75.75 0 000-1.5h-2.5v-2.5z"></path></svg>
"""
| 76.4
| 350
| 0.659686
| 98
| 382
| 2.55102
| 0.520408
| 0.064
| 0.08
| 0.084
| 0.088
| 0.088
| 0
| 0
| 0
| 0
| 0
| 0.347305
| 0.125654
| 382
| 4
| 351
| 95.5
| 0.401198
| 0
| 0
| 0
| 0
| 0.333333
| 0.923885
| 0.086614
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3dd76324dd9917e1e5f7a2a349f1510cf8dd7942
| 17,333
|
py
|
Python
|
sdk/python/pulumi_ovh/iploadbalancing_http_route.py
|
legitbee/pulumi-ovh
|
23205a76a958edfbfcd96242d9663b3d7c81ccd9
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_ovh/iploadbalancing_http_route.py
|
legitbee/pulumi-ovh
|
23205a76a958edfbfcd96242d9663b3d7c81ccd9
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_ovh/iploadbalancing_http_route.py
|
legitbee/pulumi-ovh
|
23205a76a958edfbfcd96242d9663b3d7c81ccd9
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from . import outputs
from ._inputs import *
__all__ = ['IploadbalancingHttpRouteArgs', 'IploadbalancingHttpRoute']
@pulumi.input_type
class IploadbalancingHttpRouteArgs:
def __init__(__self__, *,
action: pulumi.Input['IploadbalancingHttpRouteActionArgs'],
service_name: pulumi.Input[str],
display_name: Optional[pulumi.Input[str]] = None,
frontend_id: Optional[pulumi.Input[int]] = None,
weight: Optional[pulumi.Input[int]] = None):
"""
The set of arguments for constructing a IploadbalancingHttpRoute resource.
:param pulumi.Input['IploadbalancingHttpRouteActionArgs'] action: Action triggered when all rules match
:param pulumi.Input[str] service_name: The internal name of your IP load balancing
:param pulumi.Input[str] display_name: Human readable name for your route, this field is for you
:param pulumi.Input[int] frontend_id: Route traffic for this frontend
:param pulumi.Input[int] weight: Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will
trigger an action
"""
pulumi.set(__self__, "action", action)
pulumi.set(__self__, "service_name", service_name)
if display_name is not None:
pulumi.set(__self__, "display_name", display_name)
if frontend_id is not None:
pulumi.set(__self__, "frontend_id", frontend_id)
if weight is not None:
pulumi.set(__self__, "weight", weight)
@property
@pulumi.getter
def action(self) -> pulumi.Input['IploadbalancingHttpRouteActionArgs']:
"""
Action triggered when all rules match
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: pulumi.Input['IploadbalancingHttpRouteActionArgs']):
pulumi.set(self, "action", value)
@property
@pulumi.getter(name="serviceName")
def service_name(self) -> pulumi.Input[str]:
"""
The internal name of your IP load balancing
"""
return pulumi.get(self, "service_name")
@service_name.setter
def service_name(self, value: pulumi.Input[str]):
pulumi.set(self, "service_name", value)
@property
@pulumi.getter(name="displayName")
def display_name(self) -> Optional[pulumi.Input[str]]:
"""
Human readable name for your route, this field is for you
"""
return pulumi.get(self, "display_name")
@display_name.setter
def display_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "display_name", value)
@property
@pulumi.getter(name="frontendId")
def frontend_id(self) -> Optional[pulumi.Input[int]]:
"""
Route traffic for this frontend
"""
return pulumi.get(self, "frontend_id")
@frontend_id.setter
def frontend_id(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "frontend_id", value)
@property
@pulumi.getter
def weight(self) -> Optional[pulumi.Input[int]]:
"""
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will
trigger an action
"""
return pulumi.get(self, "weight")
@weight.setter
def weight(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "weight", value)
@pulumi.input_type
class _IploadbalancingHttpRouteState:
def __init__(__self__, *,
action: Optional[pulumi.Input['IploadbalancingHttpRouteActionArgs']] = None,
display_name: Optional[pulumi.Input[str]] = None,
frontend_id: Optional[pulumi.Input[int]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input['IploadbalancingHttpRouteRuleArgs']]]] = None,
service_name: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
weight: Optional[pulumi.Input[int]] = None):
"""
Input properties used for looking up and filtering IploadbalancingHttpRoute resources.
:param pulumi.Input['IploadbalancingHttpRouteActionArgs'] action: Action triggered when all rules match
:param pulumi.Input[str] display_name: Human readable name for your route, this field is for you
:param pulumi.Input[int] frontend_id: Route traffic for this frontend
:param pulumi.Input[Sequence[pulumi.Input['IploadbalancingHttpRouteRuleArgs']]] rules: List of rules to match to trigger action
:param pulumi.Input[str] service_name: The internal name of your IP load balancing
:param pulumi.Input[str] status: Route status. Routes in "ok" state are ready to operate
:param pulumi.Input[int] weight: Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will
trigger an action
"""
if action is not None:
pulumi.set(__self__, "action", action)
if display_name is not None:
pulumi.set(__self__, "display_name", display_name)
if frontend_id is not None:
pulumi.set(__self__, "frontend_id", frontend_id)
if rules is not None:
pulumi.set(__self__, "rules", rules)
if service_name is not None:
pulumi.set(__self__, "service_name", service_name)
if status is not None:
pulumi.set(__self__, "status", status)
if weight is not None:
pulumi.set(__self__, "weight", weight)
@property
@pulumi.getter
def action(self) -> Optional[pulumi.Input['IploadbalancingHttpRouteActionArgs']]:
"""
Action triggered when all rules match
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: Optional[pulumi.Input['IploadbalancingHttpRouteActionArgs']]):
pulumi.set(self, "action", value)
@property
@pulumi.getter(name="displayName")
def display_name(self) -> Optional[pulumi.Input[str]]:
"""
Human readable name for your route, this field is for you
"""
return pulumi.get(self, "display_name")
@display_name.setter
def display_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "display_name", value)
@property
@pulumi.getter(name="frontendId")
def frontend_id(self) -> Optional[pulumi.Input[int]]:
"""
Route traffic for this frontend
"""
return pulumi.get(self, "frontend_id")
@frontend_id.setter
def frontend_id(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "frontend_id", value)
@property
@pulumi.getter
def rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IploadbalancingHttpRouteRuleArgs']]]]:
"""
List of rules to match to trigger action
"""
return pulumi.get(self, "rules")
@rules.setter
def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['IploadbalancingHttpRouteRuleArgs']]]]):
pulumi.set(self, "rules", value)
@property
@pulumi.getter(name="serviceName")
def service_name(self) -> Optional[pulumi.Input[str]]:
"""
The internal name of your IP load balancing
"""
return pulumi.get(self, "service_name")
@service_name.setter
def service_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "service_name", value)
@property
@pulumi.getter
def status(self) -> Optional[pulumi.Input[str]]:
"""
Route status. Routes in "ok" state are ready to operate
"""
return pulumi.get(self, "status")
@status.setter
def status(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "status", value)
@property
@pulumi.getter
def weight(self) -> Optional[pulumi.Input[int]]:
"""
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will
trigger an action
"""
return pulumi.get(self, "weight")
@weight.setter
def weight(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "weight", value)
class IploadbalancingHttpRoute(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[pulumi.InputType['IploadbalancingHttpRouteActionArgs']]] = None,
display_name: Optional[pulumi.Input[str]] = None,
frontend_id: Optional[pulumi.Input[int]] = None,
service_name: Optional[pulumi.Input[str]] = None,
weight: Optional[pulumi.Input[int]] = None,
__props__=None):
"""
Create a IploadbalancingHttpRoute resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['IploadbalancingHttpRouteActionArgs']] action: Action triggered when all rules match
:param pulumi.Input[str] display_name: Human readable name for your route, this field is for you
:param pulumi.Input[int] frontend_id: Route traffic for this frontend
:param pulumi.Input[str] service_name: The internal name of your IP load balancing
:param pulumi.Input[int] weight: Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will
trigger an action
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: IploadbalancingHttpRouteArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Create a IploadbalancingHttpRoute resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param IploadbalancingHttpRouteArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(IploadbalancingHttpRouteArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[pulumi.InputType['IploadbalancingHttpRouteActionArgs']]] = None,
display_name: Optional[pulumi.Input[str]] = None,
frontend_id: Optional[pulumi.Input[int]] = None,
service_name: Optional[pulumi.Input[str]] = None,
weight: Optional[pulumi.Input[int]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = IploadbalancingHttpRouteArgs.__new__(IploadbalancingHttpRouteArgs)
if action is None and not opts.urn:
raise TypeError("Missing required property 'action'")
__props__.__dict__["action"] = action
__props__.__dict__["display_name"] = display_name
__props__.__dict__["frontend_id"] = frontend_id
if service_name is None and not opts.urn:
raise TypeError("Missing required property 'service_name'")
__props__.__dict__["service_name"] = service_name
__props__.__dict__["weight"] = weight
__props__.__dict__["rules"] = None
__props__.__dict__["status"] = None
super(IploadbalancingHttpRoute, __self__).__init__(
'ovh:index/iploadbalancingHttpRoute:IploadbalancingHttpRoute',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[pulumi.InputType['IploadbalancingHttpRouteActionArgs']]] = None,
display_name: Optional[pulumi.Input[str]] = None,
frontend_id: Optional[pulumi.Input[int]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['IploadbalancingHttpRouteRuleArgs']]]]] = None,
service_name: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
weight: Optional[pulumi.Input[int]] = None) -> 'IploadbalancingHttpRoute':
"""
Get an existing IploadbalancingHttpRoute resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['IploadbalancingHttpRouteActionArgs']] action: Action triggered when all rules match
:param pulumi.Input[str] display_name: Human readable name for your route, this field is for you
:param pulumi.Input[int] frontend_id: Route traffic for this frontend
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['IploadbalancingHttpRouteRuleArgs']]]] rules: List of rules to match to trigger action
:param pulumi.Input[str] service_name: The internal name of your IP load balancing
:param pulumi.Input[str] status: Route status. Routes in "ok" state are ready to operate
:param pulumi.Input[int] weight: Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will
trigger an action
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _IploadbalancingHttpRouteState.__new__(_IploadbalancingHttpRouteState)
__props__.__dict__["action"] = action
__props__.__dict__["display_name"] = display_name
__props__.__dict__["frontend_id"] = frontend_id
__props__.__dict__["rules"] = rules
__props__.__dict__["service_name"] = service_name
__props__.__dict__["status"] = status
__props__.__dict__["weight"] = weight
return IploadbalancingHttpRoute(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def action(self) -> pulumi.Output['outputs.IploadbalancingHttpRouteAction']:
"""
Action triggered when all rules match
"""
return pulumi.get(self, "action")
@property
@pulumi.getter(name="displayName")
def display_name(self) -> pulumi.Output[Optional[str]]:
"""
Human readable name for your route, this field is for you
"""
return pulumi.get(self, "display_name")
@property
@pulumi.getter(name="frontendId")
def frontend_id(self) -> pulumi.Output[int]:
"""
Route traffic for this frontend
"""
return pulumi.get(self, "frontend_id")
@property
@pulumi.getter
def rules(self) -> pulumi.Output[Sequence['outputs.IploadbalancingHttpRouteRule']]:
"""
List of rules to match to trigger action
"""
return pulumi.get(self, "rules")
@property
@pulumi.getter(name="serviceName")
def service_name(self) -> pulumi.Output[str]:
"""
The internal name of your IP load balancing
"""
return pulumi.get(self, "service_name")
@property
@pulumi.getter
def status(self) -> pulumi.Output[str]:
"""
Route status. Routes in "ok" state are ready to operate
"""
return pulumi.get(self, "status")
@property
@pulumi.getter
def weight(self) -> pulumi.Output[int]:
"""
Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will
trigger an action
"""
return pulumi.get(self, "weight")
| 43.224439
| 157
| 0.649743
| 1,946
| 17,333
| 5.581706
| 0.087359
| 0.088105
| 0.082213
| 0.038483
| 0.781992
| 0.761278
| 0.743417
| 0.715522
| 0.694071
| 0.680446
| 0
| 0.002766
| 0.249005
| 17,333
| 400
| 158
| 43.3325
| 0.831682
| 0.284082
| 0
| 0.65
| 1
| 0
| 0.126507
| 0.055753
| 0
| 0
| 0
| 0
| 0
| 1
| 0.158333
| false
| 0.004167
| 0.029167
| 0
| 0.283333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3ddea911ba19a44668228cf27a59e140f2a081ff
| 49
|
py
|
Python
|
tests/__init__.py
|
Greenroom-Robotics/pyblaze
|
e45e27fbd400b6ae2365ad2347165c7b5154ac51
|
[
"MIT"
] | 20
|
2020-03-29T08:43:15.000Z
|
2021-12-17T21:38:17.000Z
|
tests/__init__.py
|
borchero/bxtorch
|
8d01568c8ee9fc05f5b3c84ca3ec68ea74eef9eb
|
[
"MIT"
] | 4
|
2020-10-27T20:43:40.000Z
|
2021-04-29T12:19:39.000Z
|
tests/__init__.py
|
borchero/bxtorch
|
8d01568c8ee9fc05f5b3c84ca3ec68ea74eef9eb
|
[
"MIT"
] | 2
|
2020-08-16T18:10:49.000Z
|
2021-03-31T23:17:28.000Z
|
from .multiprocessing import *
from .nn import *
| 16.333333
| 30
| 0.755102
| 6
| 49
| 6.166667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163265
| 49
| 2
| 31
| 24.5
| 0.902439
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
9a840342d23463b8711f9da41d184ee2073a493f
| 107
|
py
|
Python
|
modules/dials/array_family/shared.py
|
jorgediazjr/dials-dev20191018
|
77d66c719b5746f37af51ad593e2941ed6fbba17
|
[
"BSD-3-Clause"
] | null | null | null |
modules/dials/array_family/shared.py
|
jorgediazjr/dials-dev20191018
|
77d66c719b5746f37af51ad593e2941ed6fbba17
|
[
"BSD-3-Clause"
] | null | null | null |
modules/dials/array_family/shared.py
|
jorgediazjr/dials-dev20191018
|
77d66c719b5746f37af51ad593e2941ed6fbba17
|
[
"BSD-3-Clause"
] | 1
|
2020-02-04T15:39:06.000Z
|
2020-02-04T15:39:06.000Z
|
from __future__ import absolute_import, division, print_function
from scitbx.array_family.shared import *
| 26.75
| 64
| 0.850467
| 14
| 107
| 6
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102804
| 107
| 3
| 65
| 35.666667
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
9a98e6726238b633b893b9b38d189321dcb65c1e
| 4,311
|
py
|
Python
|
partial_date/tests.py
|
martijnbentum/partial_date
|
1edf0d8978d6e7f7b699a7d70400b79577bc311f
|
[
"MIT"
] | null | null | null |
partial_date/tests.py
|
martijnbentum/partial_date
|
1edf0d8978d6e7f7b699a7d70400b79577bc311f
|
[
"MIT"
] | null | null | null |
partial_date/tests.py
|
martijnbentum/partial_date
|
1edf0d8978d6e7f7b699a7d70400b79577bc311f
|
[
"MIT"
] | null | null | null |
from partial_date import PartialDate as pd
import unittest
from datetime import datetime as dt
class TestCreation(unittest.TestCase):
def test_year(self):
# check year partial date formats and output
for y in range(1,2200):
self.assertEqual(pd(str(y)).pretty_string(),dt(y,1,1).strftime('%Y'))
self.assertEqual(pd(str(y)+'y').pretty_string(),dt(y,1,1).strftime('%Y'))
self.assertEqual(pd(str(y)+'y').pretty_string(),pd(t=dt(y,1,1)).pretty_string())
#check whether the pretty string format generates the same partial date
self.assertEqual(pd('1999'),pd(pd('1999').pretty_string()))
self.assertEqual(pd('1999'),pd(pd('1999y').pretty_string()))
#check whether datetime input generate the same partial date (compared to string input)
self.assertEqual(pd('1999'),pd(t = pd('1999y').dt))
def test_year_month(self):
# check year-month partial date formats and output
self.assertEqual(pd('1981-03').pretty_string(),dt(1981,3,1).strftime('%B %Y'))
self.assertEqual(pd('181-11').pretty_string(),dt(181,11,1).strftime('%B %Y'))
self.assertEqual(pd('march 1981').pretty_string(),dt(1981,3,1).strftime('%B %Y'))
self.assertEqual(pd('March 1981').pretty_string(),dt(1981,3,1).strftime('%B %Y'))
for y in 1,100,1000,1500,1900,1818,1951,1960,2000,2004:
for m in range(1,13):
s = str(y) + '-' + str(m)
sl = dt(1999,m,1).strftime('%B') + ' ' + str(y)
self.assertEqual(pd(s).pretty_string(),dt(y,m,1).strftime('%B %Y'))
self.assertEqual(pd(sl).pretty_string(),dt(y,m,1).strftime('%B %Y'))
#check whether the pretty string format generates the same partial date
self.assertEqual(pd('1981-03'),pd(pd('1981-03').pretty_string()))
self.assertEqual(pd('1981-03'),pd(pd('march 1981').pretty_string()))
self.assertEqual(pd('1981-03'),pd(pd('March 1981').pretty_string()))
#check whether datetime input generate the same partial date (compared to string input)
self.assertEqual(pd('1981-03'),pd(t = pd('March 1981').dt))
def test_year_month_day(self):
# check year-month-day partial date formats and output
self.assertEqual(pd('1981-03-15').pretty_string(),dt(1981,3,15).strftime('%B %d, %Y'))
self.assertEqual(pd('181-11-1').pretty_string(),dt(181,11,1).strftime('%B %d, %Y'))
self.assertEqual(pd('march 2, 1981').pretty_string(),dt(1981,3,2).strftime('%B %d, %Y'))
self.assertEqual(pd('March 2, 1981').pretty_string(),dt(1981,3,2).strftime('%B %d, %Y'))
for y in 1,100,1000,1500,1900,1818,1951,1960,2000,2004:
for m in range(1,13):
for d in range(1,29):
s = str(y) + '-' + str(m) + '-' + str(d)
sl = dt(1999,m,d).strftime('%B') + ' ' + str(d) +', ' + str(y)
self.assertEqual(pd(s).pretty_string(),dt(y,m,d).strftime('%B %d, %Y'))
self.assertEqual(pd(sl).pretty_string(),dt(y,m,d).strftime('%B %d, %Y'))
#check whether the pretty string format generates the same partial date
self.assertEqual(pd('1981-03-01'),pd(pd('1981-03-01').pretty_string()))
self.assertEqual(pd('1981-03-01'),pd(pd('march 1, 1981').pretty_string()))
self.assertEqual(pd('1981-03-01'),pd(pd('March 1, 1981').pretty_string()))
#check whether datetime input generate the same partial date (compared to string input)
self.assertEqual(pd('1981-03-01'),pd(t = pd('March 1, 1981').dt))
def test_decade(self):
#check decade partial date format and output
self.assertEqual(pd('190d').pretty_string(),'190th decade')
self.assertEqual(pd('2d').pretty_string(),'2nd decade')
#check whether datetime input generate the same partial date (compared to string input)
self.assertEqual(pd('19d'),pd(t = pd('19d').dt))
def test_millenium(self):
#check century partial date format and output
self.assertEqual(pd('1c').pretty_string(),'1st century')
self.assertEqual(pd('3c').pretty_string(),'3rd century')
#check whether datetime input generate the same partial date (compared to string input)
self.assertEqual(pd('19c'),pd(t = pd('19c').dt))
def test_millenium(self):
#check millenium partial date format and output
self.assertEqual(pd('1m').pretty_string(),'1st millenium')
self.assertEqual(pd('2m').pretty_string(),'2nd millenium')
#check whether datetime input generate the same partial date (compared to string input)
self.assertEqual(pd('2m'),pd(t = pd('2m').dt))
if __name__ == '__main__':
unittest.main()
| 49.551724
| 90
| 0.688007
| 704
| 4,311
| 4.144886
| 0.12642
| 0.179918
| 0.203907
| 0.074023
| 0.783413
| 0.734064
| 0.700137
| 0.6878
| 0.62817
| 0.621316
| 0
| 0.089929
| 0.117838
| 4,311
| 86
| 91
| 50.127907
| 0.67736
| 0.232661
| 0
| 0.105263
| 0
| 0
| 0.141598
| 0
| 0
| 0
| 0
| 0
| 0.614035
| 1
| 0.105263
| false
| 0
| 0.052632
| 0
| 0.175439
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9a9ee0ca70af09c57941573f9204a46ad7914ec9
| 28
|
py
|
Python
|
robinhood/common/__init__.py
|
Marxvim/Robinhood-1
|
c3c83391dcb3eb1b1584bf83a0d965d82c4679ed
|
[
"MIT"
] | 17
|
2020-03-21T14:19:11.000Z
|
2021-12-29T07:16:01.000Z
|
robinhood/common/__init__.py
|
Marxvim/Robinhood-1
|
c3c83391dcb3eb1b1584bf83a0d965d82c4679ed
|
[
"MIT"
] | null | null | null |
robinhood/common/__init__.py
|
Marxvim/Robinhood-1
|
c3c83391dcb3eb1b1584bf83a0d965d82c4679ed
|
[
"MIT"
] | 5
|
2020-06-11T20:51:44.000Z
|
2022-01-10T06:35:25.000Z
|
# from .ticker import Ticker
| 28
| 28
| 0.785714
| 4
| 28
| 5.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 28
| 1
| 28
| 28
| 0.916667
| 0.928571
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9ad067bfbb901f646987e7b24a99ea336eca401c
| 464
|
gyp
|
Python
|
binding.gyp
|
foysavas/node-kexec
|
e34be47779a07de59996e0dd05d555907a9a8c1b
|
[
"MIT"
] | null | null | null |
binding.gyp
|
foysavas/node-kexec
|
e34be47779a07de59996e0dd05d555907a9a8c1b
|
[
"MIT"
] | null | null | null |
binding.gyp
|
foysavas/node-kexec
|
e34be47779a07de59996e0dd05d555907a9a8c1b
|
[
"MIT"
] | null | null | null |
{
'targets': [
{
'target_name': 'kexec',
'sources': [ 'src/kexec.cc' ],
'defines': [
'<!@(node -v |grep "v4" > /dev/null && echo "__NODE_V4__" || true)',
'<!@(node -v |grep "v0.1[12]" > /dev/null && echo "__NODE_V0_11_OR_12__" || true)',
'<!@(command -v iojs > /dev/null && echo "__NODE_V0_11_OR_12__" || true)',
'<!@(node -v |grep "v0.10" > /dev/null && echo "__NODE_V0_10__" || true)',
]
}
]
}
| 30.933333
| 91
| 0.478448
| 58
| 464
| 3.344828
| 0.413793
| 0.14433
| 0.226804
| 0.309278
| 0.5
| 0.278351
| 0.278351
| 0.278351
| 0.278351
| 0
| 0
| 0.065282
| 0.273707
| 464
| 14
| 92
| 33.142857
| 0.510386
| 0
| 0
| 0
| 0
| 0.214286
| 0.724138
| 0.094828
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 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
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9add4c996bc3c0a60ff6875e28dc7813ad8b3e3f
| 123
|
py
|
Python
|
ravel/app/base/__init__.py
|
gigaquads/pybiz
|
e9654592246be06a777934e889e03407c5c1673e
|
[
"MIT"
] | 2
|
2021-02-26T15:30:44.000Z
|
2021-05-22T14:06:17.000Z
|
ravel/app/base/__init__.py
|
gigaquads/ravel
|
e9654592246be06a777934e889e03407c5c1673e
|
[
"MIT"
] | null | null | null |
ravel/app/base/__init__.py
|
gigaquads/ravel
|
e9654592246be06a777934e889e03407c5c1673e
|
[
"MIT"
] | null | null | null |
from .application import Application
from .action_decorator import ActionDecorator
from .action import Action, AsyncAction
| 30.75
| 45
| 0.861789
| 14
| 123
| 7.5
| 0.5
| 0.190476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105691
| 123
| 3
| 46
| 41
| 0.954545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
492e4fcb3e7faff9d54c462b04c23ffdb0d354a8
| 191
|
py
|
Python
|
docker/d-streamon-master/d-streamon/streamon/daemon/tests/jsonrpc/mytest.py
|
ferrarimarco/open-scissor
|
d54718a1969701798f3e2d57f3db68d829da1cc0
|
[
"Apache-2.0"
] | 2
|
2017-12-02T10:38:05.000Z
|
2018-04-22T17:15:01.000Z
|
docker/d-streamon-master/d-streamon/streamon/daemon/tests/jsonrpc/mytest.py
|
scissor-project/open-scissor
|
d54718a1969701798f3e2d57f3db68d829da1cc0
|
[
"Apache-2.0"
] | 67
|
2017-11-11T15:22:34.000Z
|
2018-04-24T06:44:59.000Z
|
docker/d-streamon-master/d-streamon/streamon/daemon/tests/jsonrpc/mytest.py
|
ferrarimarco/open-scissor
|
d54718a1969701798f3e2d57f3db68d829da1cc0
|
[
"Apache-2.0"
] | 1
|
2017-12-07T08:18:49.000Z
|
2017-12-07T08:18:49.000Z
|
class MyTest:
def __init__(self):
self.__foo = 1
self.__bar = "hello"
def get_foo(self):
return self.__foo
def get_bar(self):
return self.__bar
| 15.916667
| 28
| 0.565445
| 25
| 191
| 3.76
| 0.44
| 0.148936
| 0.297872
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007937
| 0.340314
| 191
| 11
| 29
| 17.363636
| 0.738095
| 0
| 0
| 0
| 0
| 0
| 0.026178
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0
| 0.25
| 0.75
| 0
| 1
| 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
| 5
|
49481d908cfc6f748919bbb97b81c940c0977881
| 37
|
py
|
Python
|
wsgi.py
|
MaayanLab/IsItUp
|
19cab2d4688bd161f9cffb68643d86e070c4c3bc
|
[
"MIT"
] | null | null | null |
wsgi.py
|
MaayanLab/IsItUp
|
19cab2d4688bd161f9cffb68643d86e070c4c3bc
|
[
"MIT"
] | null | null | null |
wsgi.py
|
MaayanLab/IsItUp
|
19cab2d4688bd161f9cffb68643d86e070c4c3bc
|
[
"MIT"
] | null | null | null |
from IsItUp import app as application
| 37
| 37
| 0.864865
| 6
| 37
| 5.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135135
| 37
| 1
| 37
| 37
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
498d9a1f3c56d3e030dac486e946e3687ff05e93
| 117
|
py
|
Python
|
dao/scroll.py
|
BadSeedX/play_label-main
|
09048d0f08fb15e2e7102769ac8cec0f7b8dfba7
|
[
"Apache-2.0"
] | null | null | null |
dao/scroll.py
|
BadSeedX/play_label-main
|
09048d0f08fb15e2e7102769ac8cec0f7b8dfba7
|
[
"Apache-2.0"
] | null | null | null |
dao/scroll.py
|
BadSeedX/play_label-main
|
09048d0f08fb15e2e7102769ac8cec0f7b8dfba7
|
[
"Apache-2.0"
] | null | null | null |
from PyQt5.QtWidgets import QScrollArea
class MyScroll(QScrollArea):
def wheelEvent(self, event):
pass
| 16.714286
| 39
| 0.726496
| 13
| 117
| 6.538462
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010753
| 0.205128
| 117
| 7
| 40
| 16.714286
| 0.903226
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
b8e7502cbdedf52c71a4e492373e805a73ac7b5f
| 585,189
|
py
|
Python
|
stubs/System/ComponentModel/__init__.py
|
ricardyn/ironpython-stubs
|
4d2b405eda3ceed186e8adca55dd97c332c6f49d
|
[
"MIT"
] | 1
|
2021-02-02T13:39:16.000Z
|
2021-02-02T13:39:16.000Z
|
stubs/System/ComponentModel/__init__.py
|
hdm-dt-fb/ironpython-stubs
|
4d2b405eda3ceed186e8adca55dd97c332c6f49d
|
[
"MIT"
] | null | null | null |
stubs/System/ComponentModel/__init__.py
|
hdm-dt-fb/ironpython-stubs
|
4d2b405eda3ceed186e8adca55dd97c332c6f49d
|
[
"MIT"
] | null | null | null |
# encoding: utf-8
# module System.ComponentModel calls itself ComponentModel
# from System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
# by generator 1.145
# no doc
# no imports
# no functions
# classes
class AddingNewEventArgs(EventArgs):
"""
Provides data for the System.Windows.Forms.BindingSource.AddingNew event.
AddingNewEventArgs()
AddingNewEventArgs(newObject: object)
"""
@staticmethod # known case of __new__
def __new__(self, newObject=None):
"""
__new__(cls: type)
__new__(cls: type, newObject: object)
"""
pass
NewObject = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the object to be added to the binding list.
Get: NewObject(self: AddingNewEventArgs) -> object
Set: NewObject(self: AddingNewEventArgs) = value
"""
class AddingNewEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents the method that will handle the System.Windows.Forms.BindingSource.AddingNew event.
AddingNewEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, sender, e, callback, object):
""" BeginInvoke(self: AddingNewEventHandler, sender: object, e: AddingNewEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: AddingNewEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, sender, e):
""" Invoke(self: AddingNewEventHandler, sender: object, e: AddingNewEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class AmbientValueAttribute(Attribute, _Attribute):
"""
Specifies the value to pass to a property to cause the property to get its value from another source. This is known as ambience. This class cannot be inherited.
AmbientValueAttribute(type: Type, value: str)
AmbientValueAttribute(value: Char)
AmbientValueAttribute(value: Byte)
AmbientValueAttribute(value: Int16)
AmbientValueAttribute(value: int)
AmbientValueAttribute(value: Int64)
AmbientValueAttribute(value: Single)
AmbientValueAttribute(value: float)
AmbientValueAttribute(value: bool)
AmbientValueAttribute(value: str)
AmbientValueAttribute(value: object)
"""
def Equals(self, obj):
"""
Equals(self: AmbientValueAttribute, obj: object) -> bool
Determines whether the specified System.ComponentModel.AmbientValueAttribute is
equal to the current System.ComponentModel.AmbientValueAttribute.
obj: The System.ComponentModel.AmbientValueAttribute to compare with the current
System.ComponentModel.AmbientValueAttribute.
Returns: true if the specified System.ComponentModel.AmbientValueAttribute is equal to
the current System.ComponentModel.AmbientValueAttribute; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: AmbientValueAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current System.ComponentModel.AmbientValueAttribute.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type, type: Type, value: str)
__new__(cls: type, value: Char)
__new__(cls: type, value: Byte)
__new__(cls: type, value: Int16)
__new__(cls: type, value: int)
__new__(cls: type, value: Int64)
__new__(cls: type, value: Single)
__new__(cls: type, value: float)
__new__(cls: type, value: bool)
__new__(cls: type, value: str)
__new__(cls: type, value: object)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
Value = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the object that is the value of this System.ComponentModel.AmbientValueAttribute.
Get: Value(self: AmbientValueAttribute) -> object
"""
class TypeConverter(object):
"""
Provides a unified way of converting types of values to other types, as well as for accessing standard values and subproperties.
TypeConverter()
"""
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: TypeConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Returns whether this converter can convert an object of the given type to the
type of this converter, using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: A System.Type that represents the type you want to convert from.
Returns: true if this converter can perform the conversion; otherwise, false.
CanConvertFrom(self: TypeConverter, sourceType: Type) -> bool
Returns whether this converter can convert an object of the given type to the
type of this converter.
sourceType: A System.Type that represents the type you want to convert from.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def CanConvertTo(self, *__args):
"""
CanConvertTo(self: TypeConverter, context: ITypeDescriptorContext, destinationType: Type) -> bool
Returns whether this converter can convert the object to the specified type,
using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
destinationType: A System.Type that represents the type you want to convert to.
Returns: true if this converter can perform the conversion; otherwise, false.
CanConvertTo(self: TypeConverter, destinationType: Type) -> bool
Returns whether this converter can convert the object to the specified type.
destinationType: A System.Type that represents the type you want to convert to.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: TypeConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the given object to the type of this converter, using the specified
context and culture information.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: The System.Globalization.CultureInfo to use as the current culture.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
ConvertFrom(self: TypeConverter, value: object) -> object
Converts the given value to the type of this converter.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def ConvertFromInvariantString(self, *__args):
"""
ConvertFromInvariantString(self: TypeConverter, context: ITypeDescriptorContext, text: str) -> object
Converts the given string to the type of this converter, using the invariant
culture and the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
text: The System.String to convert.
Returns: An System.Object that represents the converted text.
ConvertFromInvariantString(self: TypeConverter, text: str) -> object
Converts the given string to the type of this converter, using the invariant
culture.
text: The System.String to convert.
Returns: An System.Object that represents the converted text.
"""
pass
def ConvertFromString(self, *__args):
"""
ConvertFromString(self: TypeConverter, context: ITypeDescriptorContext, culture: CultureInfo, text: str) -> object
Converts the given text to an object, using the specified context and culture
information.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: A System.Globalization.CultureInfo. If null is passed, the current culture is
assumed.
text: The System.String to convert.
Returns: An System.Object that represents the converted text.
ConvertFromString(self: TypeConverter, context: ITypeDescriptorContext, text: str) -> object
Converts the given text to an object, using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
text: The System.String to convert.
Returns: An System.Object that represents the converted text.
ConvertFromString(self: TypeConverter, text: str) -> object
Converts the specified text to an object.
text: The text representation of the object to convert.
Returns: An System.Object that represents the converted text.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: TypeConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given value object to the specified type, using the specified
context and culture information.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: A System.Globalization.CultureInfo. If null is passed, the current culture is
assumed.
value: The System.Object to convert.
destinationType: The System.Type to convert the value parameter to.
Returns: An System.Object that represents the converted value.
ConvertTo(self: TypeConverter, value: object, destinationType: Type) -> object
Converts the given value object to the specified type, using the arguments.
value: The System.Object to convert.
destinationType: The System.Type to convert the value parameter to.
Returns: An System.Object that represents the converted value.
"""
pass
def ConvertToInvariantString(self, *__args):
"""
ConvertToInvariantString(self: TypeConverter, context: ITypeDescriptorContext, value: object) -> str
Converts the specified value to a culture-invariant string representation,
using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: The System.Object to convert.
Returns: A System.String that represents the converted value.
ConvertToInvariantString(self: TypeConverter, value: object) -> str
Converts the specified value to a culture-invariant string representation.
value: The System.Object to convert.
Returns: A System.String that represents the converted value.
"""
pass
def ConvertToString(self, *__args):
"""
ConvertToString(self: TypeConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> str
Converts the given value to a string representation, using the specified
context and culture information.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: A System.Globalization.CultureInfo. If null is passed, the current culture is
assumed.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
ConvertToString(self: TypeConverter, context: ITypeDescriptorContext, value: object) -> str
Converts the given value to a string representation, using the given context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
ConvertToString(self: TypeConverter, value: object) -> str
Converts the specified value to a string representation.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def CreateInstance(self, *__args):
"""
CreateInstance(self: TypeConverter, context: ITypeDescriptorContext, propertyValues: IDictionary) -> object
Creates an instance of the type that this System.ComponentModel.TypeConverter
is associated with, using the specified context, given a set of property values
for the object.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
propertyValues: An System.Collections.IDictionary of new property values.
Returns: An System.Object representing the given System.Collections.IDictionary, or null
if the object cannot be created. This method always returns null.
CreateInstance(self: TypeConverter, propertyValues: IDictionary) -> object
Re-creates an System.Object given a set of property values for the object.
propertyValues: An System.Collections.IDictionary that represents a dictionary of new property
values.
Returns: An System.Object representing the given System.Collections.IDictionary, or null
if the object cannot be created. This method always returns null.
"""
pass
def GetConvertFromException(self, *args): #cannot find CLR method
"""
GetConvertFromException(self: TypeConverter, value: object) -> Exception
Returns an exception to throw when a conversion cannot be performed.
value: The System.Object to convert, or null if the object is not available.
Returns: An System.Exception that represents the exception to throw when a conversion
cannot be performed.
"""
pass
def GetConvertToException(self, *args): #cannot find CLR method
"""
GetConvertToException(self: TypeConverter, value: object, destinationType: Type) -> Exception
Returns an exception to throw when a conversion cannot be performed.
value: The System.Object to convert, or null if the object is not available.
destinationType: A System.Type that represents the type the conversion was trying to convert to.
Returns: An System.Exception that represents the exception to throw when a conversion
cannot be performed.
"""
pass
def GetCreateInstanceSupported(self, context=None):
"""
GetCreateInstanceSupported(self: TypeConverter, context: ITypeDescriptorContext) -> bool
Returns whether changing a value on this object requires a call to
System.ComponentModel.TypeConverter.CreateInstance(System.Collections.IDictionar
y) to create a new value, using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true if changing a property on this object requires a call to
System.ComponentModel.TypeConverter.CreateInstance(System.Collections.IDictionar
y) to create a new value; otherwise, false.
GetCreateInstanceSupported(self: TypeConverter) -> bool
Returns whether changing a value on this object requires a call to the
System.ComponentModel.TypeConverter.CreateInstance(System.Collections.IDictionar
y) method to create a new value.
Returns: true if changing a property on this object requires a call to
System.ComponentModel.TypeConverter.CreateInstance(System.Collections.IDictionar
y) to create a new value; otherwise, false.
"""
pass
def GetProperties(self, *__args):
"""
GetProperties(self: TypeConverter, context: ITypeDescriptorContext, value: object, attributes: Array[Attribute]) -> PropertyDescriptorCollection
Returns a collection of properties for the type of array specified by the value
parameter, using the specified context and attributes.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: An System.Object that specifies the type of array for which to get properties.
attributes: An array of type System.Attribute that is used as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
are exposed for this data type, or null if there are no properties.
GetProperties(self: TypeConverter, context: ITypeDescriptorContext, value: object) -> PropertyDescriptorCollection
Returns a collection of properties for the type of array specified by the value
parameter, using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: An System.Object that specifies the type of array for which to get properties.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
are exposed for this data type, or null if there are no properties.
GetProperties(self: TypeConverter, value: object) -> PropertyDescriptorCollection
Returns a collection of properties for the type of array specified by the value
parameter.
value: An System.Object that specifies the type of array for which to get properties.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
are exposed for this data type, or null if there are no properties.
"""
pass
def GetPropertiesSupported(self, context=None):
"""
GetPropertiesSupported(self: TypeConverter, context: ITypeDescriptorContext) -> bool
Returns whether this object supports properties, using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true if System.ComponentModel.TypeConverter.GetProperties(System.Object) should
be called to find the properties of this object; otherwise, false.
GetPropertiesSupported(self: TypeConverter) -> bool
Returns whether this object supports properties.
Returns: true if System.ComponentModel.TypeConverter.GetProperties(System.Object) should
be called to find the properties of this object; otherwise, false.
"""
pass
def GetStandardValues(self, context=None):
"""
GetStandardValues(self: TypeConverter, context: ITypeDescriptorContext) -> StandardValuesCollection
Returns a collection of standard values for the data type this type converter
is designed for when provided with a format context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context
that can be used to extract additional information about the environment from
which this converter is invoked. This parameter or properties of this parameter
can be null.
Returns: A System.ComponentModel.TypeConverter.StandardValuesCollection that holds a
standard set of valid values, or null if the data type does not support a
standard set of values.
GetStandardValues(self: TypeConverter) -> ICollection
Returns a collection of standard values from the default context for the data
type this type converter is designed for.
Returns: A System.ComponentModel.TypeConverter.StandardValuesCollection containing a
standard set of valid values, or null if the data type does not support a
standard set of values.
"""
pass
def GetStandardValuesExclusive(self, context=None):
"""
GetStandardValuesExclusive(self: TypeConverter, context: ITypeDescriptorContext) -> bool
Returns whether the collection of standard values returned from
System.ComponentModel.TypeConverter.GetStandardValues is an exclusive list of
possible values, using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true if the System.ComponentModel.TypeConverter.StandardValuesCollection
returned from System.ComponentModel.TypeConverter.GetStandardValues is an
exhaustive list of possible values; false if other values are possible.
GetStandardValuesExclusive(self: TypeConverter) -> bool
Returns whether the collection of standard values returned from
System.ComponentModel.TypeConverter.GetStandardValues is an exclusive list.
Returns: true if the System.ComponentModel.TypeConverter.StandardValuesCollection
returned from System.ComponentModel.TypeConverter.GetStandardValues is an
exhaustive list of possible values; false if other values are possible.
"""
pass
def GetStandardValuesSupported(self, context=None):
"""
GetStandardValuesSupported(self: TypeConverter, context: ITypeDescriptorContext) -> bool
Returns whether this object supports a standard set of values that can be
picked from a list, using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true if System.ComponentModel.TypeConverter.GetStandardValues should be called
to find a common set of values the object supports; otherwise, false.
GetStandardValuesSupported(self: TypeConverter) -> bool
Returns whether this object supports a standard set of values that can be
picked from a list.
Returns: true if System.ComponentModel.TypeConverter.GetStandardValues should be called
to find a common set of values the object supports; otherwise, false.
"""
pass
def IsValid(self, *__args):
"""
IsValid(self: TypeConverter, context: ITypeDescriptorContext, value: object) -> bool
Returns whether the given value object is valid for this type and for the
specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: The System.Object to test for validity.
Returns: true if the specified value is valid for this object; otherwise, false.
IsValid(self: TypeConverter, value: object) -> bool
Returns whether the given value object is valid for this type.
value: The object to test for validity.
Returns: true if the specified value is valid for this object; otherwise, false.
"""
pass
def SortProperties(self, *args): #cannot find CLR method
"""
SortProperties(self: TypeConverter, props: PropertyDescriptorCollection, names: Array[str]) -> PropertyDescriptorCollection
Sorts a collection of properties.
props: A System.ComponentModel.PropertyDescriptorCollection that has the properties to
sort.
names: An array of names in the order you want the properties to appear in the
collection.
Returns: A System.ComponentModel.PropertyDescriptorCollection that contains the sorted
properties.
"""
pass
SimplePropertyDescriptor = None
StandardValuesCollection = None
class CollectionConverter(TypeConverter):
"""
Provides a type converter to convert collection objects to and from various other representations.
CollectionConverter()
"""
def ConvertTo(self, *__args):
"""
ConvertTo(self: CollectionConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given value object to the specified destination type.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: The culture to which value will be converted.
value: The System.Object to convert. This parameter must inherit from
System.Collections.ICollection.
destinationType: The System.Type to convert the value to.
Returns: An System.Object that represents the converted value.
"""
pass
def GetProperties(self, *__args):
"""
GetProperties(self: CollectionConverter, context: ITypeDescriptorContext, value: object, attributes: Array[Attribute]) -> PropertyDescriptorCollection
Gets a collection of properties for the type of array specified by the value
parameter using the specified context and attributes.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: An System.Object that specifies the type of array to get the properties for.
attributes: An array of type System.Attribute that will be used as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
are exposed for this data type, or null if there are no properties. This method
always returns null.
"""
pass
def GetPropertiesSupported(self, context=None):
"""
GetPropertiesSupported(self: CollectionConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether this object supports properties.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: false because
System.ComponentModel.CollectionConverter.GetProperties(System.ComponentModel.IT
ypeDescriptorContext,System.Object,System.Attribute[]) should not be called to
find the properties of this object. This method never returns true.
"""
pass
class ArrayConverter(CollectionConverter):
"""
Provides a type converter to convert System.Array objects to and from various other representations.
ArrayConverter()
"""
def ConvertTo(self, *__args):
"""
ConvertTo(self: ArrayConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given value object to the specified destination type.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: The culture into which value will be converted.
value: The System.Object to convert.
destinationType: The System.Type to convert the value to.
Returns: An System.Object that represents the converted value.
"""
pass
def GetProperties(self, *__args):
"""
GetProperties(self: ArrayConverter, context: ITypeDescriptorContext, value: object, attributes: Array[Attribute]) -> PropertyDescriptorCollection
Gets a collection of properties for the type of array specified by the value
parameter.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: An System.Object that specifies the type of array to get the properties for.
attributes: An array of type System.Attribute that will be used as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
are exposed for an array, or null if there are no properties.
"""
pass
def GetPropertiesSupported(self, context=None):
"""
GetPropertiesSupported(self: ArrayConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether this object supports properties.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true because
System.ComponentModel.ArrayConverter.GetProperties(System.ComponentModel.ITypeDe
scriptorContext,System.Object,System.Attribute[]) should be called to find the
properties of this object. This method never returns false.
"""
pass
class AsyncCompletedEventArgs(EventArgs):
"""
Provides data for the MethodNameCompleted event.
AsyncCompletedEventArgs()
AsyncCompletedEventArgs(error: Exception, cancelled: bool, userState: object)
"""
def RaiseExceptionIfNecessary(self, *args): #cannot find CLR method
"""
RaiseExceptionIfNecessary(self: AsyncCompletedEventArgs)
Raises a user-supplied exception if an asynchronous operation failed.
"""
pass
@staticmethod # known case of __new__
def __new__(self, error=None, cancelled=None, userState=None):
"""
__new__(cls: type)
__new__(cls: type, error: Exception, cancelled: bool, userState: object)
"""
pass
Cancelled = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether an asynchronous operation has been canceled.
Get: Cancelled(self: AsyncCompletedEventArgs) -> bool
"""
Error = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating which error occurred during an asynchronous operation.
Get: Error(self: AsyncCompletedEventArgs) -> Exception
"""
UserState = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the unique identifier for the asynchronous task.
Get: UserState(self: AsyncCompletedEventArgs) -> object
"""
class AsyncCompletedEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents the method that will handle the MethodNameCompleted event of an asynchronous operation.
AsyncCompletedEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, sender, e, callback, object):
""" BeginInvoke(self: AsyncCompletedEventHandler, sender: object, e: AsyncCompletedEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: AsyncCompletedEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, sender, e):
""" Invoke(self: AsyncCompletedEventHandler, sender: object, e: AsyncCompletedEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class AsyncOperation(object):
""" Tracks the lifetime of an asynchronous operation. """
def OperationCompleted(self):
"""
OperationCompleted(self: AsyncOperation)
Ends the lifetime of an asynchronous operation.
"""
pass
def Post(self, d, arg):
"""
Post(self: AsyncOperation, d: SendOrPostCallback, arg: object)
Invokes a delegate on the thread or context appropriate for the application
model.
d: A System.Threading.SendOrPostCallback object that wraps the delegate to be
called when the operation ends.
arg: An argument for the delegate contained in the d parameter.
"""
pass
def PostOperationCompleted(self, d, arg):
"""
PostOperationCompleted(self: AsyncOperation, d: SendOrPostCallback, arg: object)
Ends the lifetime of an asynchronous operation.
d: A System.Threading.SendOrPostCallback object that wraps the delegate to be
called when the operation ends.
arg: An argument for the delegate contained in the d parameter.
"""
pass
SynchronizationContext = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the System.Threading.SynchronizationContext object that was passed to the constructor.
Get: SynchronizationContext(self: AsyncOperation) -> SynchronizationContext
"""
UserSuppliedState = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets an object used to uniquely identify an asynchronous operation.
Get: UserSuppliedState(self: AsyncOperation) -> object
"""
class AsyncOperationManager(object):
""" Provides concurrency management for classes that support asynchronous method calls. This class cannot be inherited. """
@staticmethod
def CreateOperation(userSuppliedState):
"""
CreateOperation(userSuppliedState: object) -> AsyncOperation
Returns an System.ComponentModel.AsyncOperation for tracking the duration of a
particular asynchronous operation.
userSuppliedState: An object used to associate a piece of client state, such as a task ID, with a
particular asynchronous operation.
Returns: An System.ComponentModel.AsyncOperation that you can use to track the duration
of an asynchronous method invocation.
"""
pass
SynchronizationContext = None
__all__ = [
'CreateOperation',
]
class AttributeCollection(object, ICollection, IEnumerable):
"""
Represents a collection of attributes.
AttributeCollection(*attributes: Array[Attribute])
"""
def Contains(self, *__args):
"""
Contains(self: AttributeCollection, attributes: Array[Attribute]) -> bool
Determines whether this attribute collection contains all the specified
attributes in the attribute array.
attributes: An array of type System.Attribute to find in the collection.
Returns: true if the collection contains all the attributes; otherwise, false.
Contains(self: AttributeCollection, attribute: Attribute) -> bool
Determines whether this collection of attributes has the specified attribute.
attribute: An System.Attribute to find in the collection.
Returns: true if the collection contains the attribute or is the default attribute for
the type of attribute; otherwise, false.
"""
pass
def CopyTo(self, array, index):
"""
CopyTo(self: AttributeCollection, array: Array, index: int)
Copies the collection to an array, starting at the specified index.
array: The System.Array to copy the collection to.
index: The index to start from.
"""
pass
@staticmethod
def FromExisting(existing, newAttributes):
"""
FromExisting(existing: AttributeCollection, *newAttributes: Array[Attribute]) -> AttributeCollection
Creates a new System.ComponentModel.AttributeCollection from an existing
System.ComponentModel.AttributeCollection.
existing: An System.ComponentModel.AttributeCollection from which to create the copy.
newAttributes: An array of type System.Attribute that provides the attributes for this
collection. Can be null.
Returns: A new System.ComponentModel.AttributeCollection that is a copy of existing.
"""
pass
def GetDefaultAttribute(self, *args): #cannot find CLR method
"""
GetDefaultAttribute(self: AttributeCollection, attributeType: Type) -> Attribute
Returns the default System.Attribute of a given System.Type.
attributeType: The System.Type of the attribute to retrieve.
Returns: An System.Attribute.
"""
pass
def GetEnumerator(self):
"""
GetEnumerator(self: AttributeCollection) -> IEnumerator
Gets an enumerator for this collection.
Returns: An enumerator of type System.Collections.IEnumerator.
"""
pass
def Matches(self, *__args):
"""
Matches(self: AttributeCollection, attributes: Array[Attribute]) -> bool
Determines whether the attributes in the specified array are the same as the
attributes in the collection.
attributes: An array of System.CodeDom.MemberAttributes to compare with the attributes in
this collection.
Returns: true if all the attributes in the array are contained in the collection and
have the same values as the attributes in the collection; otherwise, false.
Matches(self: AttributeCollection, attribute: Attribute) -> bool
Determines whether a specified attribute is the same as an attribute in the
collection.
attribute: An instance of System.Attribute to compare with the attributes in this
collection.
Returns: true if the attribute is contained within the collection and has the same value
as the attribute in the collection; otherwise, false.
"""
pass
def __getitem__(self, *args): #cannot find CLR method
""" x.__getitem__(y) <==> x[y]x.__getitem__(y) <==> x[y] """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __iter__(self, *args): #cannot find CLR method
""" __iter__(self: IEnumerable) -> object """
pass
def __len__(self, *args): #cannot find CLR method
""" x.__len__() <==> len(x) """
pass
@staticmethod # known case of __new__
def __new__(self, attributes):
"""
__new__(cls: type, *attributes: Array[Attribute])
__new__(cls: type)
"""
pass
def __repr__(self, *args): #cannot find CLR method
""" __repr__(self: object) -> str """
pass
Attributes = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the attribute collection.
"""
Count = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the number of attributes.
Get: Count(self: AttributeCollection) -> int
"""
Empty = None
class AttributeProviderAttribute(Attribute, _Attribute):
"""
Enables attribute redirection. This class cannot be inherited.
AttributeProviderAttribute(typeName: str)
AttributeProviderAttribute(typeName: str, propertyName: str)
AttributeProviderAttribute(type: Type)
"""
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type, typeName: str)
__new__(cls: type, typeName: str, propertyName: str)
__new__(cls: type, type: Type)
"""
pass
PropertyName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the property for which attributes will be retrieved.
Get: PropertyName(self: AttributeProviderAttribute) -> str
"""
TypeName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the assembly qualified type name passed into the constructor.
Get: TypeName(self: AttributeProviderAttribute) -> str
"""
class Component(MarshalByRefObject, IComponent, IDisposable):
"""
Provides the base implementation for the System.ComponentModel.IComponent interface and enables object sharing between applications.
Component()
"""
def Dispose(self):
"""
Dispose(self: Component)
Releases all resources used by the System.ComponentModel.Component.
"""
pass
def GetService(self, *args): #cannot find CLR method
"""
GetService(self: Component, service: Type) -> object
Returns an object that represents a service provided by the
System.ComponentModel.Component or by its System.ComponentModel.Container.
service: A service provided by the System.ComponentModel.Component.
Returns: An System.Object that represents a service provided by the
System.ComponentModel.Component, or null if the System.ComponentModel.Component
does not provide the specified service.
"""
pass
def MemberwiseClone(self, *args): #cannot find CLR method
"""
MemberwiseClone(self: MarshalByRefObject, cloneIdentity: bool) -> MarshalByRefObject
Creates a shallow copy of the current System.MarshalByRefObject object.
cloneIdentity: false to delete the current System.MarshalByRefObject object's identity, which
will cause the object to be assigned a new identity when it is marshaled across
a remoting boundary. A value of false is usually appropriate. true to copy the
current System.MarshalByRefObject object's identity to its clone, which will
cause remoting client calls to be routed to the remote server object.
Returns: A shallow copy of the current System.MarshalByRefObject object.
MemberwiseClone(self: object) -> object
Creates a shallow copy of the current System.Object.
Returns: A shallow copy of the current System.Object.
"""
pass
def ToString(self):
"""
ToString(self: Component) -> str
Returns a System.String containing the name of the
System.ComponentModel.Component, if any. This method should not be overridden.
Returns: A System.String containing the name of the System.ComponentModel.Component, if
any, or null if the System.ComponentModel.Component is unnamed.
"""
pass
def __enter__(self, *args): #cannot find CLR method
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args): #cannot find CLR method
""" __exit__(self: IDisposable, exc_type: object, exc_value: object, exc_back: object) """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __str__(self, *args): #cannot find CLR method
pass
CanRaiseEvents = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the component can raise an event.
"""
Container = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the System.ComponentModel.IContainer that contains the System.ComponentModel.Component.
Get: Container(self: Component) -> IContainer
"""
DesignMode = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether the System.ComponentModel.Component is currently in design mode.
"""
Events = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the list of event handlers that are attached to this System.ComponentModel.Component.
"""
Site = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the System.ComponentModel.ISite of the System.ComponentModel.Component.
Get: Site(self: Component) -> ISite
Set: Site(self: Component) = value
"""
Disposed = None
class BackgroundWorker(Component, IComponent, IDisposable):
"""
Executes an operation on a separate thread.
BackgroundWorker()
"""
def CancelAsync(self):
"""
CancelAsync(self: BackgroundWorker)
Requests cancellation of a pending background operation.
"""
pass
def Dispose(self):
"""
Dispose(self: Component, disposing: bool)
Releases the unmanaged resources used by the System.ComponentModel.Component
and optionally releases the managed resources.
disposing: true to release both managed and unmanaged resources; false to release only
unmanaged resources.
"""
pass
def GetService(self, *args): #cannot find CLR method
"""
GetService(self: Component, service: Type) -> object
Returns an object that represents a service provided by the
System.ComponentModel.Component or by its System.ComponentModel.Container.
service: A service provided by the System.ComponentModel.Component.
Returns: An System.Object that represents a service provided by the
System.ComponentModel.Component, or null if the System.ComponentModel.Component
does not provide the specified service.
"""
pass
def MemberwiseClone(self, *args): #cannot find CLR method
"""
MemberwiseClone(self: MarshalByRefObject, cloneIdentity: bool) -> MarshalByRefObject
Creates a shallow copy of the current System.MarshalByRefObject object.
cloneIdentity: false to delete the current System.MarshalByRefObject object's identity, which
will cause the object to be assigned a new identity when it is marshaled across
a remoting boundary. A value of false is usually appropriate. true to copy the
current System.MarshalByRefObject object's identity to its clone, which will
cause remoting client calls to be routed to the remote server object.
Returns: A shallow copy of the current System.MarshalByRefObject object.
MemberwiseClone(self: object) -> object
Creates a shallow copy of the current System.Object.
Returns: A shallow copy of the current System.Object.
"""
pass
def OnDoWork(self, *args): #cannot find CLR method
"""
OnDoWork(self: BackgroundWorker, e: DoWorkEventArgs)
Raises the System.ComponentModel.BackgroundWorker.DoWork event.
e: An System.EventArgs that contains the event data.
"""
pass
def OnProgressChanged(self, *args): #cannot find CLR method
"""
OnProgressChanged(self: BackgroundWorker, e: ProgressChangedEventArgs)
Raises the System.ComponentModel.BackgroundWorker.ProgressChanged event.
e: An System.EventArgs that contains the event data.
"""
pass
def OnRunWorkerCompleted(self, *args): #cannot find CLR method
"""
OnRunWorkerCompleted(self: BackgroundWorker, e: RunWorkerCompletedEventArgs)
Raises the System.ComponentModel.BackgroundWorker.RunWorkerCompleted event.
e: An System.EventArgs that contains the event data.
"""
pass
def ReportProgress(self, percentProgress, userState=None):
"""
ReportProgress(self: BackgroundWorker, percentProgress: int, userState: object)
Raises the System.ComponentModel.BackgroundWorker.ProgressChanged event.
percentProgress: The percentage, from 0 to 100, of the background operation that is complete.
userState: The state object passed to
System.ComponentModel.BackgroundWorker.RunWorkerAsync(System.Object).
ReportProgress(self: BackgroundWorker, percentProgress: int)
Raises the System.ComponentModel.BackgroundWorker.ProgressChanged event.
percentProgress: The percentage, from 0 to 100, of the background operation that is complete.
"""
pass
def RunWorkerAsync(self, argument=None):
"""
RunWorkerAsync(self: BackgroundWorker, argument: object)
Starts execution of a background operation.
argument: A parameter for use by the background operation to be executed in the
System.ComponentModel.BackgroundWorker.DoWork event handler.
RunWorkerAsync(self: BackgroundWorker)
Starts execution of a background operation.
"""
pass
def __enter__(self, *args): #cannot find CLR method
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args): #cannot find CLR method
""" __exit__(self: IDisposable, exc_type: object, exc_value: object, exc_back: object) """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __str__(self, *args): #cannot find CLR method
pass
CancellationPending = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the application has requested cancellation of a background operation.
Get: CancellationPending(self: BackgroundWorker) -> bool
"""
CanRaiseEvents = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the component can raise an event.
"""
DesignMode = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether the System.ComponentModel.Component is currently in design mode.
"""
Events = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the list of event handlers that are attached to this System.ComponentModel.Component.
"""
IsBusy = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the System.ComponentModel.BackgroundWorker is running an asynchronous operation.
Get: IsBusy(self: BackgroundWorker) -> bool
"""
WorkerReportsProgress = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value indicating whether the System.ComponentModel.BackgroundWorker can report progress updates.
Get: WorkerReportsProgress(self: BackgroundWorker) -> bool
Set: WorkerReportsProgress(self: BackgroundWorker) = value
"""
WorkerSupportsCancellation = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value indicating whether the System.ComponentModel.BackgroundWorker supports asynchronous cancellation.
Get: WorkerSupportsCancellation(self: BackgroundWorker) -> bool
Set: WorkerSupportsCancellation(self: BackgroundWorker) = value
"""
DoWork = None
ProgressChanged = None
RunWorkerCompleted = None
class BaseNumberConverter(TypeConverter):
""" Provides a base type converter for nonfloating-point numerical types. """
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: BaseNumberConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Determines if this converter can convert an object in the given source type to
the native type of the converter.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: A System.Type that represents the type from which you want to convert.
Returns: true if this converter can perform the operation; otherwise, false.
"""
pass
def CanConvertTo(self, *__args):
"""
CanConvertTo(self: BaseNumberConverter, context: ITypeDescriptorContext, t: Type) -> bool
Returns a value indicating whether this converter can convert an object to the
given destination type using the context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
t: A System.Type that represents the type to which you want to convert.
Returns: true if this converter can perform the operation; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: BaseNumberConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the given object to the converter's native type.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: A System.Globalization.CultureInfo that specifies the culture to represent the
number.
value: The object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: BaseNumberConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the specified object to another type.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: A System.Globalization.CultureInfo that specifies the culture to represent the
number.
value: The object to convert.
destinationType: The type to convert the object to.
Returns: An System.Object that represents the converted value.
"""
pass
class BindableAttribute(Attribute, _Attribute):
"""
Specifies whether a member is typically used for binding. This class cannot be inherited.
BindableAttribute(bindable: bool)
BindableAttribute(bindable: bool, direction: BindingDirection)
BindableAttribute(flags: BindableSupport)
BindableAttribute(flags: BindableSupport, direction: BindingDirection)
"""
def Equals(self, obj):
"""
Equals(self: BindableAttribute, obj: object) -> bool
Determines whether two System.ComponentModel.BindableAttribute objects are
equal.
obj: The object to compare.
Returns: true if the specified System.ComponentModel.BindableAttribute is equal to the
current System.ComponentModel.BindableAttribute; false if it is not equal.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: BindableAttribute) -> int
Serves as a hash function for the System.ComponentModel.BindableAttribute class.
Returns: A hash code for the current System.ComponentModel.BindableAttribute.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: BindableAttribute) -> bool
Determines if this attribute is the default.
Returns: true if the attribute is the default value for this attribute class; otherwise,
false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type, bindable: bool)
__new__(cls: type, bindable: bool, direction: BindingDirection)
__new__(cls: type, flags: BindableSupport)
__new__(cls: type, flags: BindableSupport, direction: BindingDirection)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
Bindable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating that a property is typically used for binding.
Get: Bindable(self: BindableAttribute) -> bool
"""
Direction = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating the direction or directions of this property's data binding.
Get: Direction(self: BindableAttribute) -> BindingDirection
"""
Default = None
No = None
Yes = None
class BindableSupport(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies values to indicate whether a property can be bound to a data element or another property.
enum BindableSupport, values: Default (2), No (0), Yes (1)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
Default = None
No = None
value__ = None
Yes = None
class BindingDirection(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies whether the template can be bound one way or two ways.
enum BindingDirection, values: OneWay (0), TwoWay (1)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
OneWay = None
TwoWay = None
value__ = None
class IBindingList(IList, ICollection, IEnumerable):
""" Provides the features required to support both complex and simple scenarios when binding to a data source. """
def AddIndex(self, property):
"""
AddIndex(self: IBindingList, property: PropertyDescriptor)
Adds the System.ComponentModel.PropertyDescriptor to the indexes used for
searching.
property: The System.ComponentModel.PropertyDescriptor to add to the indexes used for
searching.
"""
pass
def AddNew(self):
"""
AddNew(self: IBindingList) -> object
Adds a new item to the list.
Returns: The item added to the list.
"""
pass
def ApplySort(self, property, direction):
"""
ApplySort(self: IBindingList, property: PropertyDescriptor, direction: ListSortDirection)
Sorts the list based on a System.ComponentModel.PropertyDescriptor and a
System.ComponentModel.ListSortDirection.
property: The System.ComponentModel.PropertyDescriptor to sort by.
direction: One of the System.ComponentModel.ListSortDirection values.
"""
pass
def Find(self, property, key):
"""
Find(self: IBindingList, property: PropertyDescriptor, key: object) -> int
Returns the index of the row that has the given
System.ComponentModel.PropertyDescriptor.
property: The System.ComponentModel.PropertyDescriptor to search on.
key: The value of the property parameter to search for.
Returns: The index of the row that has the given
System.ComponentModel.PropertyDescriptor.
"""
pass
def RemoveIndex(self, property):
"""
RemoveIndex(self: IBindingList, property: PropertyDescriptor)
Removes the System.ComponentModel.PropertyDescriptor from the indexes used for
searching.
property: The System.ComponentModel.PropertyDescriptor to remove from the indexes used
for searching.
"""
pass
def RemoveSort(self):
"""
RemoveSort(self: IBindingList)
Removes any sort applied using
System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.PropertyDescr
iptor,System.ComponentModel.ListSortDirection).
"""
pass
def __contains__(self, *args): #cannot find CLR method
"""
__contains__(self: IList, value: object) -> bool
Determines whether the System.Collections.IList contains a specific value.
value: The object to locate in the System.Collections.IList.
Returns: true if the System.Object is found in the System.Collections.IList; otherwise,
false.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __iter__(self, *args): #cannot find CLR method
""" __iter__(self: IEnumerable) -> object """
pass
def __len__(self, *args): #cannot find CLR method
""" x.__len__() <==> len(x) """
pass
AllowEdit = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets whether you can update items in the list.
Get: AllowEdit(self: IBindingList) -> bool
"""
AllowNew = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets whether you can add items to the list using System.ComponentModel.IBindingList.AddNew.
Get: AllowNew(self: IBindingList) -> bool
"""
AllowRemove = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets whether you can remove items from the list, using System.Collections.IList.Remove(System.Object) or System.Collections.IList.RemoveAt(System.Int32).
Get: AllowRemove(self: IBindingList) -> bool
"""
IsSorted = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets whether the items in the list are sorted.
Get: IsSorted(self: IBindingList) -> bool
"""
SortDirection = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the direction of the sort.
Get: SortDirection(self: IBindingList) -> ListSortDirection
"""
SortProperty = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the System.ComponentModel.PropertyDescriptor that is being used for sorting.
Get: SortProperty(self: IBindingList) -> PropertyDescriptor
"""
SupportsChangeNotification = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets whether a System.ComponentModel.IBindingList.ListChanged event is raised when the list changes or an item in the list changes.
Get: SupportsChangeNotification(self: IBindingList) -> bool
"""
SupportsSearching = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets whether the list supports searching using the System.ComponentModel.IBindingList.Find(System.ComponentModel.PropertyDescriptor,System.Object) method.
Get: SupportsSearching(self: IBindingList) -> bool
"""
SupportsSorting = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets whether the list supports sorting.
Get: SupportsSorting(self: IBindingList) -> bool
"""
ListChanged = None
class ICancelAddNew:
""" Adds transactional capability when adding a new item to a collection. """
def CancelNew(self, itemIndex):
"""
CancelNew(self: ICancelAddNew, itemIndex: int)
Discards a pending new item from the collection.
itemIndex: The index of the item that was previously added to the collection.
"""
pass
def EndNew(self, itemIndex):
"""
EndNew(self: ICancelAddNew, itemIndex: int)
Commits a pending new item to the collection.
itemIndex: The index of the item that was previously added to the collection.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
class IRaiseItemChangedEvents:
""" Indicates whether a class converts property change events to System.ComponentModel.IBindingList.ListChanged events. """
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
RaisesItemChangedEvents = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the System.ComponentModel.IRaiseItemChangedEvents object raises System.ComponentModel.IBindingList.ListChanged events.
Get: RaisesItemChangedEvents(self: IRaiseItemChangedEvents) -> bool
"""
class BindingList(Collection[T], IList[T], ICollection[T], IEnumerable[T], IEnumerable, IList, ICollection, IReadOnlyList[T], IReadOnlyCollection[T], IBindingList, ICancelAddNew, IRaiseItemChangedEvents):
"""
BindingList[T]()
BindingList[T](list: IList[T])
"""
def AddNew(self):
"""
AddNew(self: BindingList[T]) -> T
Adds a new item to the collection.
Returns: The item added to the list.
"""
pass
def AddNewCore(self, *args): #cannot find CLR method
"""
AddNewCore(self: BindingList[T]) -> object
Adds a new item to the end of the collection.
Returns: The item that was added to the collection.
"""
pass
def ApplySortCore(self, *args): #cannot find CLR method
"""
ApplySortCore(self: BindingList[T], prop: PropertyDescriptor, direction: ListSortDirection)
Sorts the items if overridden in a derived class; otherwise, throws a
System.NotSupportedException.
prop: A System.ComponentModel.PropertyDescriptor that specifies the property to sort
on.
direction: One of the System.ComponentModel.ListSortDirection values.
"""
pass
def CancelNew(self, itemIndex):
"""
CancelNew(self: BindingList[T], itemIndex: int)
Discards a pending new item.
itemIndex: The index of the of the new item to be added
"""
pass
def ClearItems(self, *args): #cannot find CLR method
"""
ClearItems(self: BindingList[T])
Removes all elements from the collection.
"""
pass
def EndNew(self, itemIndex):
"""
EndNew(self: BindingList[T], itemIndex: int)
Commits a pending new item to the collection.
itemIndex: The index of the new item to be added.
"""
pass
def FindCore(self, *args): #cannot find CLR method
"""
FindCore(self: BindingList[T], prop: PropertyDescriptor, key: object) -> int
Searches for the index of the item that has the specified property descriptor
with the specified value, if searching is implemented in a derived class;
otherwise, a System.NotSupportedException.
prop: The System.ComponentModel.PropertyDescriptor to search for.
key: The value of property to match.
Returns: The zero-based index of the item that matches the property descriptor and
contains the specified value.
"""
pass
def InsertItem(self, *args): #cannot find CLR method
"""
InsertItem(self: BindingList[T], index: int, item: T)
Inserts the specified item in the list at the specified index.
index: The zero-based index where the item is to be inserted.
item: The item to insert in the list.
"""
pass
def OnAddingNew(self, *args): #cannot find CLR method
"""
OnAddingNew(self: BindingList[T], e: AddingNewEventArgs)
Raises the System.ComponentModel.BindingList event.
e: An System.ComponentModel.AddingNewEventArgs that contains the event data.
"""
pass
def OnListChanged(self, *args): #cannot find CLR method
"""
OnListChanged(self: BindingList[T], e: ListChangedEventArgs)
Raises the System.ComponentModel.BindingList event.
e: A System.ComponentModel.ListChangedEventArgs that contains the event data.
"""
pass
def RemoveItem(self, *args): #cannot find CLR method
"""
RemoveItem(self: BindingList[T], index: int)
Removes the item at the specified index.
index: The zero-based index of the item to remove.
"""
pass
def RemoveSortCore(self, *args): #cannot find CLR method
"""
RemoveSortCore(self: BindingList[T])
Removes any sort applied with System.ComponentModel.BindingList if sorting is
implemented in a derived class; otherwise, raises System.NotSupportedException.
"""
pass
def ResetBindings(self):
"""
ResetBindings(self: BindingList[T])
Raises a System.ComponentModel.BindingList event of type
System.ComponentModel.ListChangedType.Reset.
"""
pass
def ResetItem(self, position):
"""
ResetItem(self: BindingList[T], position: int)
Raises a System.ComponentModel.BindingList event of type
System.ComponentModel.ListChangedType.ItemChanged for the item at the specified
position.
position: A zero-based index of the item to be reset.
"""
pass
def SetItem(self, *args): #cannot find CLR method
"""
SetItem(self: BindingList[T], index: int, item: T)
Replaces the item at the specified index with the specified item.
index: The zero-based index of the item to replace.
item: The new value for the item at the specified index. The value can be null for
reference types.
"""
pass
def __getitem__(self, *args): #cannot find CLR method
""" x.__getitem__(y) <==> x[y] """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __iter__(self, *args): #cannot find CLR method
""" __iter__(self: IEnumerable) -> object """
pass
@staticmethod # known case of __new__
def __new__(self, list=None):
"""
__new__(cls: type)
__new__(cls: type, list: IList[T])
"""
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __setitem__(self, *args): #cannot find CLR method
""" x.__setitem__(i, y) <==> x[i]= """
pass
AllowEdit = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value indicating whether items in the list can be edited.
Get: AllowEdit(self: BindingList[T]) -> bool
Set: AllowEdit(self: BindingList[T]) = value
"""
AllowNew = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value indicating whether you can add items to the list using the System.ComponentModel.BindingList method.
Get: AllowNew(self: BindingList[T]) -> bool
Set: AllowNew(self: BindingList[T]) = value
"""
AllowRemove = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value indicating whether you can remove items from the collection.
Get: AllowRemove(self: BindingList[T]) -> bool
Set: AllowRemove(self: BindingList[T]) = value
"""
IsSortedCore = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the list is sorted.
"""
Items = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a System.Collections.Generic.IList wrapper around the System.Collections.ObjectModel.Collection.
"""
RaiseListChangedEvents = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value indicating whether adding or removing items within the list raises System.ComponentModel.BindingList events.
Get: RaiseListChangedEvents(self: BindingList[T]) -> bool
Set: RaiseListChangedEvents(self: BindingList[T]) = value
"""
SortDirectionCore = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the direction the list is sorted.
"""
SortPropertyCore = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the property descriptor that is used for sorting the list if sorting is implemented in a derived class; otherwise, returns null.
"""
SupportsChangeNotificationCore = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether System.ComponentModel.BindingList events are enabled.
"""
SupportsSearchingCore = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the list supports searching.
"""
SupportsSortingCore = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the list supports sorting.
"""
AddingNew = None
ListChanged = None
class BooleanConverter(TypeConverter):
"""
Provides a type converter to convert System.Boolean objects to and from various other representations.
BooleanConverter()
"""
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: BooleanConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Gets a value indicating whether this converter can convert an object in the
given source type to a Boolean object using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: A System.Type that represents the type you wish to convert from.
Returns: true if this object can perform the conversion; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: BooleanConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the given value object to a Boolean object.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: A System.Globalization.CultureInfo that specifies the culture to which to
convert.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def GetStandardValues(self, context=None):
"""
GetStandardValues(self: BooleanConverter, context: ITypeDescriptorContext) -> StandardValuesCollection
Gets a collection of standard values for the Boolean data type.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: A System.ComponentModel.TypeConverter.StandardValuesCollection that holds a
standard set of valid values.
"""
pass
def GetStandardValuesExclusive(self, context=None):
"""
GetStandardValuesExclusive(self: BooleanConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether the list of standard values returned from the
System.ComponentModel.BooleanConverter.GetStandardValues(System.ComponentModel.I
TypeDescriptorContext) method is an exclusive list.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true because the System.ComponentModel.TypeConverter.StandardValuesCollection
returned from
System.ComponentModel.BooleanConverter.GetStandardValues(System.ComponentModel.I
TypeDescriptorContext) is an exhaustive list of possible values. This method
never returns false.
"""
pass
def GetStandardValuesSupported(self, context=None):
"""
GetStandardValuesSupported(self: BooleanConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether this object supports a standard set of values
that can be picked from a list.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true because
System.ComponentModel.BooleanConverter.GetStandardValues(System.ComponentModel.I
TypeDescriptorContext) can be called to find a common set of values the object
supports. This method never returns false.
"""
pass
class BrowsableAttribute(Attribute, _Attribute):
"""
Specifies whether a property or event should be displayed in a Properties window.
BrowsableAttribute(browsable: bool)
"""
def Equals(self, obj):
"""
Equals(self: BrowsableAttribute, obj: object) -> bool
Indicates whether this instance and a specified object are equal.
obj: Another object to compare to.
Returns: true if obj is equal to this instance; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: BrowsableAttribute) -> int
Returns the hash code for this instance.
Returns: A 32-bit signed integer hash code.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: BrowsableAttribute) -> bool
Determines if this attribute is the default.
Returns: true if the attribute is the default value for this attribute class; otherwise,
false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, browsable):
""" __new__(cls: type, browsable: bool) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
Browsable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether an object is browsable.
Get: Browsable(self: BrowsableAttribute) -> bool
"""
Default = None
No = None
Yes = None
class ByteConverter(BaseNumberConverter):
"""
Provides a type converter to convert 8-bit unsigned integer objects to and from various other representations.
ByteConverter()
"""
class CancelEventArgs(EventArgs):
"""
Provides data for a cancelable event.
CancelEventArgs()
CancelEventArgs(cancel: bool)
"""
@staticmethod # known case of __new__
def __new__(self, cancel=None):
"""
__new__(cls: type)
__new__(cls: type, cancel: bool)
"""
pass
Cancel = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value indicating whether the event should be canceled.
Get: Cancel(self: CancelEventArgs) -> bool
Set: Cancel(self: CancelEventArgs) = value
"""
class CancelEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents the method that handles a cancelable event.
CancelEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, sender, e, callback, object):
""" BeginInvoke(self: CancelEventHandler, sender: object, e: CancelEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: CancelEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, sender, e):
""" Invoke(self: CancelEventHandler, sender: object, e: CancelEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class CategoryAttribute(Attribute, _Attribute):
"""
Specifies the name of the category in which to group the property or event when displayed in a System.Windows.Forms.PropertyGrid control set to Categorized mode.
CategoryAttribute()
CategoryAttribute(category: str)
"""
def Equals(self, obj):
"""
Equals(self: CategoryAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.CategoryAttribute..
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current;
otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: CategoryAttribute) -> int
Returns the hash code for this attribute.
Returns: A 32-bit signed integer hash code.
"""
pass
def GetLocalizedString(self, *args): #cannot find CLR method
"""
GetLocalizedString(self: CategoryAttribute, value: str) -> str
Looks up the localized name of the specified category.
value: The identifer for the category to look up.
Returns: The localized name of the category, or null if a localized name does not exist.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: CategoryAttribute) -> bool
Determines if this attribute is the default.
Returns: true if the attribute is the default value for this attribute class; otherwise,
false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, category=None):
"""
__new__(cls: type)
__new__(cls: type, category: str)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
Category = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the category for the property or event that this attribute is applied to.
Get: Category(self: CategoryAttribute) -> str
"""
Action = None
Appearance = None
Asynchronous = None
Behavior = None
Data = None
Default = None
Design = None
DragDrop = None
Focus = None
Format = None
Key = None
Layout = None
Mouse = None
WindowStyle = None
class CharConverter(TypeConverter):
"""
Provides a type converter to convert Unicode character objects to and from various other representations.
CharConverter()
"""
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: CharConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Gets a value indicating whether this converter can convert an object in the
given source type to a Unicode character object using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: A System.Type that represents the type you want to convert from.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: CharConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the given object to a Unicode character object.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: The culture into which value will be converted.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: CharConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given value object to a Unicode character object using the
arguments.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: The culture into which value will be converted.
value: The System.Object to convert.
destinationType: The System.Type to convert the value to.
Returns: An System.Object that represents the converted value.
"""
pass
class CollectionChangeAction(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies how the collection is changed.
enum CollectionChangeAction, values: Add (1), Refresh (3), Remove (2)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
Add = None
Refresh = None
Remove = None
value__ = None
class CollectionChangeEventArgs(EventArgs):
"""
Provides data for the System.Data.DataColumnCollection.CollectionChanged event.
CollectionChangeEventArgs(action: CollectionChangeAction, element: object)
"""
@staticmethod # known case of __new__
def __new__(self, action, element):
""" __new__(cls: type, action: CollectionChangeAction, element: object) """
pass
Action = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets an action that specifies how the collection changed.
Get: Action(self: CollectionChangeEventArgs) -> CollectionChangeAction
"""
Element = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the instance of the collection with the change.
Get: Element(self: CollectionChangeEventArgs) -> object
"""
class CollectionChangeEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents the method that handles the System.Data.DataColumnCollection.CollectionChanged event raised when adding elements to or removing elements from a collection.
CollectionChangeEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, sender, e, callback, object):
""" BeginInvoke(self: CollectionChangeEventHandler, sender: object, e: CollectionChangeEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: CollectionChangeEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, sender, e):
""" Invoke(self: CollectionChangeEventHandler, sender: object, e: CollectionChangeEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class ComplexBindingPropertiesAttribute(Attribute, _Attribute):
"""
Specifies the data source and data member properties for a component that supports complex data binding. This class cannot be inherited.
ComplexBindingPropertiesAttribute()
ComplexBindingPropertiesAttribute(dataSource: str)
ComplexBindingPropertiesAttribute(dataSource: str, dataMember: str)
"""
def Equals(self, obj):
"""
Equals(self: ComplexBindingPropertiesAttribute, obj: object) -> bool
Determines whether the specified System.Object is equal to the current
System.ComponentModel.ComplexBindingPropertiesAttribute instance.
obj: The System.Object to compare with the current
System.ComponentModel.ComplexBindingPropertiesAttribute instance
Returns: true if the object is equal to the current instance; otherwise, false,
indicating they are not equal.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: ComplexBindingPropertiesAttribute) -> int
Returns: A 32-bit signed integer hash code.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, dataSource=None, dataMember=None):
"""
__new__(cls: type)
__new__(cls: type, dataSource: str)
__new__(cls: type, dataSource: str, dataMember: str)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
DataMember = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the data member property for the component to which the System.ComponentModel.ComplexBindingPropertiesAttribute is bound.
Get: DataMember(self: ComplexBindingPropertiesAttribute) -> str
"""
DataSource = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the data source property for the component to which the System.ComponentModel.ComplexBindingPropertiesAttribute is bound.
Get: DataSource(self: ComplexBindingPropertiesAttribute) -> str
"""
Default = None
class ComponentCollection(ReadOnlyCollectionBase, ICollection, IEnumerable):
"""
Provides a read-only container for a collection of System.ComponentModel.IComponent objects.
ComponentCollection(components: Array[IComponent])
"""
def CopyTo(self, array, index):
"""
CopyTo(self: ComponentCollection, array: Array[IComponent], index: int)
Copies the entire collection to an array, starting writing at the specified
array index.
array: An System.ComponentModel.IComponent array to copy the objects in the collection
to.
index: The index of the array at which copying to should begin.
"""
pass
def __getitem__(self, *args): #cannot find CLR method
""" x.__getitem__(y) <==> x[y]x.__getitem__(y) <==> x[y] """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __iter__(self, *args): #cannot find CLR method
""" __iter__(self: IEnumerable) -> object """
pass
@staticmethod # known case of __new__
def __new__(self, components):
""" __new__(cls: type, components: Array[IComponent]) """
pass
InnerList = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the list of elements contained in the System.Collections.ReadOnlyCollectionBase instance.
"""
class ReferenceConverter(TypeConverter):
"""
Provides a type converter to convert object references to and from other representations.
ReferenceConverter(type: Type)
"""
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: ReferenceConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Gets a value indicating whether this converter can convert an object in the
given source type to a reference object using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: A System.Type that represents the type you wish to convert from.
Returns: true if this object can perform the conversion; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: ReferenceConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the given object to the reference type.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: A System.Globalization.CultureInfo that specifies the culture used to represent
the font.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: ReferenceConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given value object to the reference type using the specified
context and arguments.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: A System.Globalization.CultureInfo that specifies the culture used to represent
the font.
value: The System.Object to convert.
destinationType: The type to convert the object to.
Returns: The converted object.
"""
pass
def GetStandardValues(self, context=None):
"""
GetStandardValues(self: ReferenceConverter, context: ITypeDescriptorContext) -> StandardValuesCollection
Gets a collection of standard values for the reference data type.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: A System.ComponentModel.TypeConverter.StandardValuesCollection that holds a
standard set of valid values, or null if the data type does not support a
standard set of values.
"""
pass
def GetStandardValuesExclusive(self, context=None):
"""
GetStandardValuesExclusive(self: ReferenceConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether the list of standard values returned from
System.ComponentModel.ReferenceConverter.GetStandardValues(System.ComponentModel
.ITypeDescriptorContext) is an exclusive list.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true because the System.ComponentModel.TypeConverter.StandardValuesCollection
returned from
System.ComponentModel.ReferenceConverter.GetStandardValues(System.ComponentModel
.ITypeDescriptorContext) is an exhaustive list of possible values. This method
never returns false.
"""
pass
def GetStandardValuesSupported(self, context=None):
"""
GetStandardValuesSupported(self: ReferenceConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether this object supports a standard set of values
that can be picked from a list.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true because
System.ComponentModel.ReferenceConverter.GetStandardValues(System.ComponentModel
.ITypeDescriptorContext) can be called to find a common set of values the
object supports. This method never returns false.
"""
pass
def IsValueAllowed(self, *args): #cannot find CLR method
"""
IsValueAllowed(self: ReferenceConverter, context: ITypeDescriptorContext, value: object) -> bool
Returns a value indicating whether a particular value can be added to the
standard values collection.
context: An System.ComponentModel.ITypeDescriptorContext that provides an additional
context.
value: The value to check.
Returns: true if the value is allowed and can be added to the standard values
collection; false if the value cannot be added to the standard values
collection.
"""
pass
@staticmethod # known case of __new__
def __new__(self, type):
""" __new__(cls: type, type: Type) """
pass
class ComponentConverter(ReferenceConverter):
"""
Provides a type converter to convert components to and from various other representations.
ComponentConverter(type: Type)
"""
def GetProperties(self, *__args):
"""
GetProperties(self: ComponentConverter, context: ITypeDescriptorContext, value: object, attributes: Array[Attribute]) -> PropertyDescriptorCollection
Gets a collection of properties for the type of component specified by the
value parameter.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: An System.Object that specifies the type of component to get the properties for.
attributes: An array of type System.Attribute that will be used as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
are exposed for the component, or null if there are no properties.
"""
pass
def GetPropertiesSupported(self, context=None):
"""
GetPropertiesSupported(self: ComponentConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether this object supports properties using the
specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true because System.ComponentModel.TypeConverter.GetProperties(System.Object)
should be called to find the properties of this object. This method never
returns false.
"""
pass
@staticmethod # known case of __new__
def __new__(self, type):
""" __new__(cls: type, type: Type) """
pass
class ComponentEditor(object):
""" Provides the base class for a custom component editor. """
def EditComponent(self, *__args):
"""
EditComponent(self: ComponentEditor, context: ITypeDescriptorContext, component: object) -> bool
Edits the component and returns a value indicating whether the component was
modified based upon a given context.
context: An optional context object that can be used to obtain further information about
the edit.
component: The component to be edited.
Returns: true if the component was modified; otherwise, false.
EditComponent(self: ComponentEditor, component: object) -> bool
Edits the component and returns a value indicating whether the component was
modified.
component: The component to be edited.
Returns: true if the component was modified; otherwise, false.
"""
pass
class ComponentResourceManager(ResourceManager):
"""
Provides simple functionality for enumerating resources for a component or object. The System.ComponentModel.ComponentResourceManager class is a System.Resources.ResourceManager.
ComponentResourceManager()
ComponentResourceManager(t: Type)
"""
def ApplyResources(self, value, objectName, culture=None):
"""
ApplyResources(self: ComponentResourceManager, value: object, objectName: str, culture: CultureInfo)
Applies a resource's value to the corresponding property of the object.
value: An System.Object that contains the property value to be applied.
objectName: A System.String that contains the name of the object to look up in the
resources.
culture: The culture for which to apply resources.
ApplyResources(self: ComponentResourceManager, value: object, objectName: str)
Applies a resource's value to the corresponding property of the object.
value: An System.Object that contains the property value to be applied.
objectName: A System.String that contains the name of the object to look up in the
resources.
"""
pass
@staticmethod # known case of __new__
def __new__(self, t=None):
"""
__new__(cls: type)
__new__(cls: type, t: Type)
"""
pass
FallbackLocation = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the location from which to retrieve neutral fallback resources.
"""
BaseNameField = None
MainAssembly = None
ResourceSets = None
class Container(object, IContainer, IDisposable):
"""
Encapsulates zero or more components.
Container()
"""
def Add(self, component, name=None):
"""
Add(self: Container, component: IComponent, name: str)
Adds the specified System.ComponentModel.Component to the
System.ComponentModel.Container and assigns it a name.
component: The component to add.
name: The unique, case-insensitive name to assign to the component.-or- null, which
leaves the component unnamed.
Add(self: Container, component: IComponent)
Adds the specified System.ComponentModel.Component to the
System.ComponentModel.Container. The component is unnamed.
component: The component to add.
"""
pass
def CreateSite(self, *args): #cannot find CLR method
"""
CreateSite(self: Container, component: IComponent, name: str) -> ISite
Creates a site System.ComponentModel.ISite for the given
System.ComponentModel.IComponent and assigns the given name to the site.
component: The System.ComponentModel.IComponent to create a site for.
name: The name to assign to component, or null to skip the name assignment.
Returns: The newly created site.
"""
pass
def Dispose(self):
"""
Dispose(self: Container)
Releases all resources used by the System.ComponentModel.Container.
"""
pass
def GetService(self, *args): #cannot find CLR method
"""
GetService(self: Container, service: Type) -> object
Gets the service object of the specified type, if it is available.
service: The System.Type of the service to retrieve.
Returns: An System.Object implementing the requested service, or null if the service
cannot be resolved.
"""
pass
def Remove(self, component):
"""
Remove(self: Container, component: IComponent)
Removes a component from the System.ComponentModel.Container.
component: The component to remove.
"""
pass
def RemoveWithoutUnsiting(self, *args): #cannot find CLR method
"""
RemoveWithoutUnsiting(self: Container, component: IComponent)
Removes a component from the System.ComponentModel.Container without setting
System.ComponentModel.IComponent.Site to null.
component: The component to remove.
"""
pass
def ValidateName(self, *args): #cannot find CLR method
"""
ValidateName(self: Container, component: IComponent, name: str)
Determines whether the component name is unique for this container.
component: The named component.
name: The component name to validate.
"""
pass
def __add__(self, *args): #cannot find CLR method
""" x.__add__(y) <==> x+yx.__add__(y) <==> x+y """
pass
def __enter__(self, *args): #cannot find CLR method
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args): #cannot find CLR method
""" __exit__(self: IDisposable, exc_type: object, exc_value: object, exc_back: object) """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __repr__(self, *args): #cannot find CLR method
""" __repr__(self: object) -> str """
pass
Components = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets all the components in the System.ComponentModel.Container.
Get: Components(self: Container) -> ComponentCollection
"""
class ContainerFilterService(object):
""" Provides a base class for the container filter service. """
def FilterComponents(self, components):
"""
FilterComponents(self: ContainerFilterService, components: ComponentCollection) -> ComponentCollection
Filters the component collection.
components: The component collection to filter.
Returns: A System.ComponentModel.ComponentCollection that represents a modified
collection.
"""
pass
class CultureInfoConverter(TypeConverter):
"""
Provides a type converter to convert System.Globalization.CultureInfo objects to and from various other representations.
CultureInfoConverter()
"""
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: CultureInfoConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Gets a value indicating whether this converter can convert an object in the
given source type to a System.Globalization.CultureInfo using the specified
context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: A System.Type that represents the type you wish to convert from.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def CanConvertTo(self, *__args):
"""
CanConvertTo(self: CultureInfoConverter, context: ITypeDescriptorContext, destinationType: Type) -> bool
Gets a value indicating whether this converter can convert an object to the
given destination type using the context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
destinationType: A System.Type that represents the type you wish to convert to.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: CultureInfoConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the specified value object to a System.Globalization.CultureInfo.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: A System.Globalization.CultureInfo that specifies the culture to which to
convert.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: CultureInfoConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given value object to the specified destination type.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: A System.Globalization.CultureInfo that specifies the culture to which to
convert.
value: The System.Object to convert.
destinationType: The System.Type to convert the value to.
Returns: An System.Object that represents the converted value.
"""
pass
def GetCultureName(self, *args): #cannot find CLR method
"""
GetCultureName(self: CultureInfoConverter, culture: CultureInfo) -> str
Retrieves the name of the specified culture.
culture: A System.Globalization.CultureInfo that specifies the culture to get the name
for.
Returns: The name of the specified culture.
"""
pass
def GetStandardValues(self, context=None):
"""
GetStandardValues(self: CultureInfoConverter, context: ITypeDescriptorContext) -> StandardValuesCollection
Gets a collection of standard values for a System.Globalization.CultureInfo
object using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: A System.ComponentModel.TypeConverter.StandardValuesCollection containing a
standard set of valid values, or null if the data type does not support a
standard set of values.
"""
pass
def GetStandardValuesExclusive(self, context=None):
"""
GetStandardValuesExclusive(self: CultureInfoConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether the list of standard values returned from
System.ComponentModel.CultureInfoConverter.GetStandardValues(System.ComponentMod
el.ITypeDescriptorContext) is an exhaustive list.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: false because the System.ComponentModel.TypeConverter.StandardValuesCollection
returned from
System.ComponentModel.CultureInfoConverter.GetStandardValues(System.ComponentMod
el.ITypeDescriptorContext) is not an exhaustive list of possible values (that
is, other values are possible). This method never returns true.
"""
pass
def GetStandardValuesSupported(self, context=None):
"""
GetStandardValuesSupported(self: CultureInfoConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether this object supports a standard set of values
that can be picked from a list using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true because
System.ComponentModel.CultureInfoConverter.GetStandardValues(System.ComponentMod
el.ITypeDescriptorContext) should be called to find a common set of values the
object supports. This method never returns false.
"""
pass
class CurrentChangedEventManager(WeakEventManager):
""" Provides a System.Windows.WeakEventManager implementation so that you can use the "weak event listener" pattern to attach listeners for the System.ComponentModel.ICollectionView.CurrentChanged event. """
@staticmethod
def AddHandler(source, handler):
""" AddHandler(source: ICollectionView, handler: EventHandler[EventArgs]) """
pass
@staticmethod
def AddListener(source, listener):
"""
AddListener(source: ICollectionView, listener: IWeakEventListener)
Adds the specified listener to the
System.ComponentModel.ICollectionView.CurrentChanged event of the specified
source.
source: The object with the event.
listener: The object to add as a listener.
"""
pass
@staticmethod
def RemoveHandler(source, handler):
""" RemoveHandler(source: ICollectionView, handler: EventHandler[EventArgs]) """
pass
@staticmethod
def RemoveListener(source, listener):
"""
RemoveListener(source: ICollectionView, listener: IWeakEventListener)
Removes the specified listener from the
System.ComponentModel.ICollectionView.CurrentChanged event of the specified
source.
source: The object with the event.
listener: The listener to remove.
"""
pass
ReadLock = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Establishes a read-lock on the underlying data table, and returns an System.IDisposable.
"""
WriteLock = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Establishes a write-lock on the underlying data table, and returns an System.IDisposable.
"""
class CurrentChangingEventArgs(EventArgs):
"""
Provides information for the System.ComponentModel.ICollectionView.CurrentChanging event.
CurrentChangingEventArgs()
CurrentChangingEventArgs(isCancelable: bool)
"""
@staticmethod # known case of __new__
def __new__(self, isCancelable=None):
"""
__new__(cls: type)
__new__(cls: type, isCancelable: bool)
"""
pass
Cancel = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value that indicates whether to cancel the event.
Get: Cancel(self: CurrentChangingEventArgs) -> bool
Set: Cancel(self: CurrentChangingEventArgs) = value
"""
IsCancelable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether the event is cancelable.
Get: IsCancelable(self: CurrentChangingEventArgs) -> bool
"""
class CurrentChangingEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents the method that handles the System.Windows.Data.CollectionView.CurrentChanging event.
CurrentChangingEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, sender, e, callback, object):
""" BeginInvoke(self: CurrentChangingEventHandler, sender: object, e: CurrentChangingEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: CurrentChangingEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, sender, e):
""" Invoke(self: CurrentChangingEventHandler, sender: object, e: CurrentChangingEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class CurrentChangingEventManager(WeakEventManager):
""" Provides a System.Windows.WeakEventManager implementation so that you can use the "weak event listener" pattern to attach listeners for the System.ComponentModel.ICollectionView.CurrentChanging event. """
@staticmethod
def AddHandler(source, handler):
""" AddHandler(source: ICollectionView, handler: EventHandler[CurrentChangingEventArgs]) """
pass
@staticmethod
def AddListener(source, listener):
"""
AddListener(source: ICollectionView, listener: IWeakEventListener)
Adds the specified listener to the
System.ComponentModel.ICollectionView.CurrentChanging event of the specified
source.
source: The object with the event.
listener: The object to add as a listener.
"""
pass
@staticmethod
def RemoveHandler(source, handler):
""" RemoveHandler(source: ICollectionView, handler: EventHandler[CurrentChangingEventArgs]) """
pass
@staticmethod
def RemoveListener(source, listener):
"""
RemoveListener(source: ICollectionView, listener: IWeakEventListener)
Removes the specified listener from the
System.ComponentModel.ICollectionView.CurrentChanging event of the specified
source.
source: The object with the event.
listener: The listener to remove.
"""
pass
ReadLock = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Establishes a read-lock on the underlying data table, and returns an System.IDisposable.
"""
WriteLock = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Establishes a write-lock on the underlying data table, and returns an System.IDisposable.
"""
class CustomTypeDescriptor(object, ICustomTypeDescriptor):
""" Provides a simple default implementation of the System.ComponentModel.ICustomTypeDescriptor interface. """
def GetAttributes(self):
"""
GetAttributes(self: CustomTypeDescriptor) -> AttributeCollection
Returns a collection of custom attributes for the type represented by this type
descriptor.
Returns: An System.ComponentModel.AttributeCollection containing the attributes for the
type. The default is System.ComponentModel.AttributeCollection.Empty.
"""
pass
def GetClassName(self):
"""
GetClassName(self: CustomTypeDescriptor) -> str
Returns the fully qualified name of the class represented by this type
descriptor.
Returns: A System.String containing the fully qualified class name of the type this type
descriptor is describing. The default is null.
"""
pass
def GetComponentName(self):
"""
GetComponentName(self: CustomTypeDescriptor) -> str
Returns the name of the class represented by this type descriptor.
Returns: A System.String containing the name of the component instance this type
descriptor is describing. The default is null.
"""
pass
def GetConverter(self):
"""
GetConverter(self: CustomTypeDescriptor) -> TypeConverter
Returns a type converter for the type represented by this type descriptor.
Returns: A System.ComponentModel.TypeConverter for the type represented by this type
descriptor. The default is a newly created System.ComponentModel.TypeConverter.
"""
pass
def GetDefaultEvent(self):
"""
GetDefaultEvent(self: CustomTypeDescriptor) -> EventDescriptor
Returns the event descriptor for the default event of the object represented by
this type descriptor.
Returns: The System.ComponentModel.EventDescriptor for the default event on the object
represented by this type descriptor. The default is null.
"""
pass
def GetDefaultProperty(self):
"""
GetDefaultProperty(self: CustomTypeDescriptor) -> PropertyDescriptor
Returns the property descriptor for the default property of the object
represented by this type descriptor.
Returns: A System.ComponentModel.PropertyDescriptor for the default property on the
object represented by this type descriptor. The default is null.
"""
pass
def GetEditor(self, editorBaseType):
"""
GetEditor(self: CustomTypeDescriptor, editorBaseType: Type) -> object
Returns an editor of the specified type that is to be associated with the class
represented by this type descriptor.
editorBaseType: The base type of the editor to retrieve.
Returns: An editor of the given type that is to be associated with the class represented
by this type descriptor. The default is null.
"""
pass
def GetEvents(self, attributes=None):
"""
GetEvents(self: CustomTypeDescriptor, attributes: Array[Attribute]) -> EventDescriptorCollection
Returns a filtered collection of event descriptors for the object represented
by this type descriptor.
attributes: An array of attributes to use as a filter. This can be null.
Returns: An System.ComponentModel.EventDescriptorCollection containing the event
descriptions for the object represented by this type descriptor. The default is
System.ComponentModel.EventDescriptorCollection.Empty.
GetEvents(self: CustomTypeDescriptor) -> EventDescriptorCollection
Returns a collection of event descriptors for the object represented by this
type descriptor.
Returns: An System.ComponentModel.EventDescriptorCollection containing the event
descriptors for the object represented by this type descriptor. The default is
System.ComponentModel.EventDescriptorCollection.Empty.
"""
pass
def GetProperties(self, attributes=None):
"""
GetProperties(self: CustomTypeDescriptor, attributes: Array[Attribute]) -> PropertyDescriptorCollection
Returns a filtered collection of property descriptors for the object
represented by this type descriptor.
attributes: An array of attributes to use as a filter. This can be null.
Returns: A System.ComponentModel.PropertyDescriptorCollection containing the property
descriptions for the object represented by this type descriptor. The default is
System.ComponentModel.PropertyDescriptorCollection.Empty.
GetProperties(self: CustomTypeDescriptor) -> PropertyDescriptorCollection
Returns a collection of property descriptors for the object represented by this
type descriptor.
Returns: A System.ComponentModel.PropertyDescriptorCollection containing the property
descriptions for the object represented by this type descriptor. The default is
System.ComponentModel.PropertyDescriptorCollection.Empty.
"""
pass
def GetPropertyOwner(self, pd):
"""
GetPropertyOwner(self: CustomTypeDescriptor, pd: PropertyDescriptor) -> object
Returns an object that contains the property described by the specified
property descriptor.
pd: The property descriptor for which to retrieve the owning object.
Returns: An System.Object that owns the given property specified by the type descriptor.
The default is null.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *args): #cannot find CLR constructor
"""
__new__(cls: type)
__new__(cls: type, parent: ICustomTypeDescriptor)
"""
pass
def __repr__(self, *args): #cannot find CLR method
""" __repr__(self: object) -> str """
pass
class DataErrorsChangedEventArgs(EventArgs):
""" DataErrorsChangedEventArgs(propertyName: str) """
@staticmethod # known case of __new__
def __new__(self, propertyName):
""" __new__(cls: type, propertyName: str) """
pass
PropertyName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: PropertyName(self: DataErrorsChangedEventArgs) -> str
"""
class DataObjectAttribute(Attribute, _Attribute):
"""
Identifies a type as an object suitable for binding to an System.Web.UI.WebControls.ObjectDataSource object. This class cannot be inherited.
DataObjectAttribute()
DataObjectAttribute(isDataObject: bool)
"""
def Equals(self, obj):
"""
Equals(self: DataObjectAttribute, obj: object) -> bool
Determines whether this instance of System.ComponentModel.DataObjectAttribute
fits the pattern of another object.
obj: An object to compare with this instance of
System.ComponentModel.DataObjectAttribute.
Returns: true if this instance is the same as the instance specified by the obj
parameter; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: DataObjectAttribute) -> int
Returns the hash code for this instance.
Returns: A 32-bit signed integer hash code.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: DataObjectAttribute) -> bool
Gets a value indicating whether the current value of the attribute is the
default value for the attribute.
Returns: true if the current value of the attribute is the default; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, isDataObject=None):
"""
__new__(cls: type)
__new__(cls: type, isDataObject: bool)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
IsDataObject = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether an object should be considered suitable for binding to an System.Web.UI.WebControls.ObjectDataSource object at design time.
Get: IsDataObject(self: DataObjectAttribute) -> bool
"""
DataObject = None
Default = None
NonDataObject = None
class DataObjectFieldAttribute(Attribute, _Attribute):
"""
Provides metadata for a property representing a data field. This class cannot be inherited.
DataObjectFieldAttribute(primaryKey: bool)
DataObjectFieldAttribute(primaryKey: bool, isIdentity: bool)
DataObjectFieldAttribute(primaryKey: bool, isIdentity: bool, isNullable: bool)
DataObjectFieldAttribute(primaryKey: bool, isIdentity: bool, isNullable: bool, length: int)
"""
def Equals(self, obj):
"""
Equals(self: DataObjectFieldAttribute, obj: object) -> bool
Returns a value indicating whether this instance is equal to a specified object.
obj: An object to compare with this instance of
System.ComponentModel.DataObjectFieldAttribute.
Returns: true if this instance is the same as the instance specified by the obj
parameter; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: DataObjectFieldAttribute) -> int
Returns the hash code for this instance.
Returns: A 32-bit signed integer hash code.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, primaryKey, isIdentity=None, isNullable=None, length=None):
"""
__new__(cls: type, primaryKey: bool)
__new__(cls: type, primaryKey: bool, isIdentity: bool)
__new__(cls: type, primaryKey: bool, isIdentity: bool, isNullable: bool)
__new__(cls: type, primaryKey: bool, isIdentity: bool, isNullable: bool, length: int)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
IsIdentity = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether a property represents an identity field in the underlying data.
Get: IsIdentity(self: DataObjectFieldAttribute) -> bool
"""
IsNullable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether a property represents a field that can be null in the underlying data store.
Get: IsNullable(self: DataObjectFieldAttribute) -> bool
"""
Length = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the length of the property in bytes.
Get: Length(self: DataObjectFieldAttribute) -> int
"""
PrimaryKey = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether a property is in the primary key in the underlying data.
Get: PrimaryKey(self: DataObjectFieldAttribute) -> bool
"""
class DataObjectMethodAttribute(Attribute, _Attribute):
"""
Identifies a data operation method exposed by a type, what type of operation the method performs, and whether the method is the default data method. This class cannot be inherited.
DataObjectMethodAttribute(methodType: DataObjectMethodType)
DataObjectMethodAttribute(methodType: DataObjectMethodType, isDefault: bool)
"""
def Equals(self, obj):
"""
Equals(self: DataObjectMethodAttribute, obj: object) -> bool
Returns a value indicating whether this instance is equal to a specified object.
obj: An object to compare with this instance of
System.ComponentModel.DataObjectMethodAttribute.
Returns: true if this instance is the same as the instance specified by the obj
parameter; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: DataObjectMethodAttribute) -> int
Returns the hash code for this instance.
Returns: A 32-bit signed integer hash code.
"""
pass
def Match(self, obj):
"""
Match(self: DataObjectMethodAttribute, obj: object) -> bool
Gets a value indicating whether this instance shares a common pattern with a
specified attribute.
obj: An object to compare with this instance of
System.ComponentModel.DataObjectMethodAttribute.
Returns: true if this instance is the same as the instance specified by the obj
parameter; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, methodType, isDefault=None):
"""
__new__(cls: type, methodType: DataObjectMethodType)
__new__(cls: type, methodType: DataObjectMethodType, isDefault: bool)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
IsDefault = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the method that the System.ComponentModel.DataObjectMethodAttribute is applied to is the default data method exposed by the data object for a specific method type.
Get: IsDefault(self: DataObjectMethodAttribute) -> bool
"""
MethodType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a System.ComponentModel.DataObjectMethodType value indicating the type of data operation the method performs.
Get: MethodType(self: DataObjectMethodAttribute) -> DataObjectMethodType
"""
class DataObjectMethodType(Enum, IComparable, IFormattable, IConvertible):
"""
Identifies the type of data operation performed by a method, as specified by the System.ComponentModel.DataObjectMethodAttribute applied to the method.
enum DataObjectMethodType, values: Delete (4), Fill (0), Insert (3), Select (1), Update (2)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
Delete = None
Fill = None
Insert = None
Select = None
Update = None
value__ = None
class DateTimeConverter(TypeConverter):
"""
Provides a type converter to convert System.DateTime objects to and from various other representations.
DateTimeConverter()
"""
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: DateTimeConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Gets a value indicating whether this converter can convert an object in the
given source type to a System.DateTime using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: A System.Type that represents the type you wish to convert from.
Returns: true if this object can perform the conversion; otherwise, false.
"""
pass
def CanConvertTo(self, *__args):
"""
CanConvertTo(self: DateTimeConverter, context: ITypeDescriptorContext, destinationType: Type) -> bool
Gets a value indicating whether this converter can convert an object to the
given destination type using the context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
destinationType: A System.Type that represents the type you wish to convert to.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: DateTimeConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the given value object to a System.DateTime.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: An optional System.Globalization.CultureInfo. If not supplied, the current
culture is assumed.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: DateTimeConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given value object to a System.DateTime using the arguments.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: An optional System.Globalization.CultureInfo. If not supplied, the current
culture is assumed.
value: The System.Object to convert.
destinationType: The System.Type to convert the value to.
Returns: An System.Object that represents the converted value.
"""
pass
class DateTimeOffsetConverter(TypeConverter):
"""
Provides a type converter to convert System.DateTimeOffset structures to and from various other representations.
DateTimeOffsetConverter()
"""
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: DateTimeOffsetConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Returns a value that indicates whether an object of the specified source type
can be converted to a System.DateTimeOffset.
context: The date format context.
sourceType: The source type to check.
Returns: true if the specified type can be converted to a System.DateTimeOffset;
otherwise, false.
"""
pass
def CanConvertTo(self, *__args):
"""
CanConvertTo(self: DateTimeOffsetConverter, context: ITypeDescriptorContext, destinationType: Type) -> bool
Returns a value that indicates whether a System.DateTimeOffset can be converted
to an object of the specified type.
context: The date format context.
destinationType: The destination type to check.
Returns: true if a System.DateTimeOffset can be converted to the specified type;
otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: DateTimeOffsetConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the specified object to a System.DateTimeOffset.
context: The date format context.
culture: The date culture.
value: The object to be converted.
Returns: A System.DateTimeOffset that represents the specified object.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: DateTimeOffsetConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts a System.DateTimeOffset to an object of the specified type.
context: The date format context.
culture: The date culture.
value: The System.DateTimeOffset to be converted.
destinationType: The type to convert to.
Returns: An object of the specified type that represents the System.DateTimeOffset.
"""
pass
class DecimalConverter(BaseNumberConverter):
"""
Provides a type converter to convert System.Decimal objects to and from various other representations.
DecimalConverter()
"""
def CanConvertTo(self, *__args):
"""
CanConvertTo(self: DecimalConverter, context: ITypeDescriptorContext, destinationType: Type) -> bool
Gets a value indicating whether this converter can convert an object to the
given destination type using the context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
destinationType: A System.Type that represents the type you wish to convert to.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: DecimalConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given value object to a System.Decimal using the arguments.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: An optional System.Globalization.CultureInfo. If not supplied, the current
culture is assumed.
value: The System.Object to convert.
destinationType: The System.Type to convert the value to.
Returns: An System.Object that represents the converted value.
"""
pass
class DefaultBindingPropertyAttribute(Attribute, _Attribute):
"""
Specifies the default binding property for a component. This class cannot be inherited.
DefaultBindingPropertyAttribute()
DefaultBindingPropertyAttribute(name: str)
"""
def Equals(self, obj):
"""
Equals(self: DefaultBindingPropertyAttribute, obj: object) -> bool
Determines whether the specified System.Object is equal to the current
System.ComponentModel.DefaultBindingPropertyAttribute instance.
obj: The System.Object to compare with the current
System.ComponentModel.DefaultBindingPropertyAttribute instance
Returns: true if the object is equal to the current instance; otherwise, false,
indicating they are not equal.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: DefaultBindingPropertyAttribute) -> int
Returns: A 32-bit signed integer hash code.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, name=None):
"""
__new__(cls: type)
__new__(cls: type, name: str)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
Name = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the default binding property for the component to which the System.ComponentModel.DefaultBindingPropertyAttribute is bound.
Get: Name(self: DefaultBindingPropertyAttribute) -> str
"""
Default = None
class DefaultEventAttribute(Attribute, _Attribute):
"""
Specifies the default event for a component.
DefaultEventAttribute(name: str)
"""
def Equals(self, obj):
"""
Equals(self: DefaultEventAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.DefaultEventAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current;
otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: DefaultEventAttribute) -> int
Returns the hash code for this instance.
Returns: A 32-bit signed integer hash code.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, name):
""" __new__(cls: type, name: str) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
Name = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the default event for the component this attribute is bound to.
Get: Name(self: DefaultEventAttribute) -> str
"""
Default = None
class DefaultPropertyAttribute(Attribute, _Attribute):
"""
Specifies the default property for a component.
DefaultPropertyAttribute(name: str)
"""
def Equals(self, obj):
"""
Equals(self: DefaultPropertyAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.DefaultPropertyAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current;
otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: DefaultPropertyAttribute) -> int
Returns the hash code for this instance.
Returns: A 32-bit signed integer hash code.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, name):
""" __new__(cls: type, name: str) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
Name = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the default property for the component this attribute is bound to.
Get: Name(self: DefaultPropertyAttribute) -> str
"""
Default = None
class DefaultValueAttribute(Attribute, _Attribute):
"""
Specifies the default value for a property.
DefaultValueAttribute(type: Type, value: str)
DefaultValueAttribute(value: Char)
DefaultValueAttribute(value: Byte)
DefaultValueAttribute(value: Int16)
DefaultValueAttribute(value: int)
DefaultValueAttribute(value: Int64)
DefaultValueAttribute(value: Single)
DefaultValueAttribute(value: float)
DefaultValueAttribute(value: bool)
DefaultValueAttribute(value: str)
DefaultValueAttribute(value: object)
"""
def Equals(self, obj):
"""
Equals(self: DefaultValueAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.DefaultValueAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current;
otherwise, false.
"""
pass
def GetHashCode(self):
""" GetHashCode(self: DefaultValueAttribute) -> int """
pass
def SetValue(self, *args): #cannot find CLR method
"""
SetValue(self: DefaultValueAttribute, value: object)
Sets the default value for the property to which this attribute is bound.
value: The default value.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type, type: Type, value: str)
__new__(cls: type, value: Char)
__new__(cls: type, value: Byte)
__new__(cls: type, value: Int16)
__new__(cls: type, value: int)
__new__(cls: type, value: Int64)
__new__(cls: type, value: Single)
__new__(cls: type, value: float)
__new__(cls: type, value: bool)
__new__(cls: type, value: str)
__new__(cls: type, value: object)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
Value = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the default value of the property this attribute is bound to.
Get: Value(self: DefaultValueAttribute) -> object
"""
class MemberDescriptor(object):
""" Represents a class member, such as a property or event. This is an abstract base class. """
def CreateAttributeCollection(self, *args): #cannot find CLR method
"""
CreateAttributeCollection(self: MemberDescriptor) -> AttributeCollection
Creates a collection of attributes using the array of attributes passed to the
constructor.
Returns: A new System.ComponentModel.AttributeCollection that contains the
System.ComponentModel.MemberDescriptor.AttributeArray attributes.
"""
pass
def Equals(self, obj):
"""
Equals(self: MemberDescriptor, obj: object) -> bool
Compares this instance to the given object to see if they are equivalent.
obj: The object to compare to the current instance.
Returns: true if equivalent; otherwise, false.
"""
pass
def FillAttributes(self, *args): #cannot find CLR method
"""
FillAttributes(self: MemberDescriptor, attributeList: IList)
When overridden in a derived class, adds the attributes of the inheriting class
to the specified list of attributes in the parent class.
attributeList: An System.Collections.IList that lists the attributes in the parent class.
Initially, this is empty.
"""
pass
def FindMethod(self, *args): #cannot find CLR method
"""
FindMethod(componentClass: Type, name: str, args: Array[Type], returnType: Type, publicOnly: bool) -> MethodInfo
Finds the given method through reflection, with an option to search only public
methods.
componentClass: The component that contains the method.
name: The name of the method to find.
args: An array of parameters for the method, used to choose between overloaded
methods.
returnType: The type to return for the method.
publicOnly: Whether to restrict search to public methods.
Returns: A System.Reflection.MethodInfo that represents the method, or null if the
method is not found.
FindMethod(componentClass: Type, name: str, args: Array[Type], returnType: Type) -> MethodInfo
Finds the given method through reflection, searching only for public methods.
componentClass: The component that contains the method.
name: The name of the method to find.
args: An array of parameters for the method, used to choose between overloaded
methods.
returnType: The type to return for the method.
Returns: A System.Reflection.MethodInfo that represents the method, or null if the
method is not found.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: MemberDescriptor) -> int
Returns the hash code for this instance.
Returns: A hash code for the current System.ComponentModel.MemberDescriptor.
"""
pass
def GetInvocationTarget(self, *args): #cannot find CLR method
"""
GetInvocationTarget(self: MemberDescriptor, type: Type, instance: object) -> object
Retrieves the object that should be used during invocation of members.
type: The System.Type of the invocation target.
instance: The potential invocation target.
Returns: The object to be used during member invocations.
"""
pass
def GetInvokee(self, *args): #cannot find CLR method
"""
GetInvokee(componentClass: Type, component: object) -> object
Gets the component on which to invoke a method.
componentClass: A System.Type representing the type of component this
System.ComponentModel.MemberDescriptor is bound to. For example, if this
System.ComponentModel.MemberDescriptor describes a property, this parameter
should be the class that the property is declared on.
component: An instance of the object to call.
Returns: An instance of the component to invoke. This method returns a visual designer
when the property is attached to a visual designer.
"""
pass
def GetSite(self, *args): #cannot find CLR method
"""
GetSite(component: object) -> ISite
Gets a component site for the given component.
component: The component for which you want to find a site.
Returns: The site of the component, or null if a site does not exist.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
@staticmethod # known case of __new__
def __new__(self, *args): #cannot find CLR constructor
"""
__new__(cls: type, name: str)
__new__(cls: type, name: str, attributes: Array[Attribute])
__new__(cls: type, descr: MemberDescriptor)
__new__(cls: type, oldMemberDescriptor: MemberDescriptor, newAttributes: Array[Attribute])
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
AttributeArray = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets an array of attributes.
"""
Attributes = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the collection of attributes for this member.
Get: Attributes(self: MemberDescriptor) -> AttributeCollection
"""
Category = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the category to which the member belongs, as specified in the System.ComponentModel.CategoryAttribute.
Get: Category(self: MemberDescriptor) -> str
"""
Description = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the description of the member, as specified in the System.ComponentModel.DescriptionAttribute.
Get: Description(self: MemberDescriptor) -> str
"""
DesignTimeOnly = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets whether this member should be set only at design time, as specified in the System.ComponentModel.DesignOnlyAttribute.
Get: DesignTimeOnly(self: MemberDescriptor) -> bool
"""
DisplayName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name that can be displayed in a window, such as a Properties window.
Get: DisplayName(self: MemberDescriptor) -> str
"""
IsBrowsable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the member is browsable, as specified in the System.ComponentModel.BrowsableAttribute.
Get: IsBrowsable(self: MemberDescriptor) -> bool
"""
Name = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the member.
Get: Name(self: MemberDescriptor) -> str
"""
NameHashCode = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the hash code for the name of the member, as specified in System.String.GetHashCode.
"""
class PropertyDescriptor(MemberDescriptor):
""" Provides an abstraction of a property on a class. """
def AddValueChanged(self, component, handler):
"""
AddValueChanged(self: PropertyDescriptor, component: object, handler: EventHandler)
Enables other objects to be notified when this property changes.
component: The component to add the handler for.
handler: The delegate to add as a listener.
"""
pass
def CanResetValue(self, component):
"""
CanResetValue(self: PropertyDescriptor, component: object) -> bool
When overridden in a derived class, returns whether resetting an object changes
its value.
component: The component to test for reset capability.
Returns: true if resetting the component changes its value; otherwise, false.
"""
pass
def CreateInstance(self, *args): #cannot find CLR method
"""
CreateInstance(self: PropertyDescriptor, type: Type) -> object
Creates an instance of the specified type.
type: A System.Type that represents the type to create.
Returns: A new instance of the type.
"""
pass
def Equals(self, obj):
"""
Equals(self: PropertyDescriptor, obj: object) -> bool
Compares this to another object to see if they are equivalent.
obj: The object to compare to this System.ComponentModel.PropertyDescriptor.
Returns: true if the values are equivalent; otherwise, false.
"""
pass
def GetChildProperties(self, *__args):
"""
GetChildProperties(self: PropertyDescriptor, instance: object) -> PropertyDescriptorCollection
Returns a System.ComponentModel.PropertyDescriptorCollection for a given object.
instance: A component to get the properties for.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties for
the specified component.
GetChildProperties(self: PropertyDescriptor, instance: object, filter: Array[Attribute]) -> PropertyDescriptorCollection
Returns a System.ComponentModel.PropertyDescriptorCollection for a given object
using a specified array of attributes as a filter.
instance: A component to get the properties for.
filter: An array of type System.Attribute to use as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
match the specified attributes for the specified component.
GetChildProperties(self: PropertyDescriptor) -> PropertyDescriptorCollection
Returns the default System.ComponentModel.PropertyDescriptorCollection.
Returns: A System.ComponentModel.PropertyDescriptorCollection.
GetChildProperties(self: PropertyDescriptor, filter: Array[Attribute]) -> PropertyDescriptorCollection
Returns a System.ComponentModel.PropertyDescriptorCollection using a specified
array of attributes as a filter.
filter: An array of type System.Attribute to use as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
match the specified attributes.
"""
pass
def GetEditor(self, editorBaseType):
"""
GetEditor(self: PropertyDescriptor, editorBaseType: Type) -> object
Gets an editor of the specified type.
editorBaseType: The base type of editor, which is used to differentiate between multiple
editors that a property supports.
Returns: An instance of the requested editor type, or null if an editor cannot be found.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: PropertyDescriptor) -> int
Returns the hash code for this object.
Returns: The hash code for this object.
"""
pass
def GetTypeFromName(self, *args): #cannot find CLR method
"""
GetTypeFromName(self: PropertyDescriptor, typeName: str) -> Type
Returns a type using its name.
typeName: The assembly-qualified name of the type to retrieve.
Returns: A System.Type that matches the given type name, or null if a match cannot be
found.
"""
pass
def GetValue(self, component):
"""
GetValue(self: PropertyDescriptor, component: object) -> object
When overridden in a derived class, gets the current value of the property on a
component.
component: The component with the property for which to retrieve the value.
Returns: The value of a property for a given component.
"""
pass
def GetValueChangedHandler(self, *args): #cannot find CLR method
"""
GetValueChangedHandler(self: PropertyDescriptor, component: object) -> EventHandler
Retrieves the current set of ValueChanged event handlers for a specific
component
component: The component for which to retrieve event handlers.
Returns: A combined multicast event handler, or null if no event handlers are currently
assigned to component.
"""
pass
def OnValueChanged(self, *args): #cannot find CLR method
"""
OnValueChanged(self: PropertyDescriptor, component: object, e: EventArgs)
Raises the ValueChanged event that you implemented.
component: The object that raises the event.
e: An System.EventArgs that contains the event data.
"""
pass
def RemoveValueChanged(self, component, handler):
"""
RemoveValueChanged(self: PropertyDescriptor, component: object, handler: EventHandler)
Enables other objects to be notified when this property changes.
component: The component to remove the handler for.
handler: The delegate to remove as a listener.
"""
pass
def ResetValue(self, component):
"""
ResetValue(self: PropertyDescriptor, component: object)
When overridden in a derived class, resets the value for this property of the
component to the default value.
component: The component with the property value that is to be reset to the default value.
"""
pass
def SetValue(self, component, value):
"""
SetValue(self: PropertyDescriptor, component: object, value: object)
When overridden in a derived class, sets the value of the component to a
different value.
component: The component with the property value that is to be set.
value: The new value.
"""
pass
def ShouldSerializeValue(self, component):
"""
ShouldSerializeValue(self: PropertyDescriptor, component: object) -> bool
When overridden in a derived class, determines a value indicating whether the
value of this property needs to be persisted.
component: The component with the property to be examined for persistence.
Returns: true if the property should be persisted; otherwise, false.
"""
pass
@staticmethod # known case of __new__
def __new__(self, *args): #cannot find CLR constructor
"""
__new__(cls: type, name: str, attrs: Array[Attribute])
__new__(cls: type, descr: MemberDescriptor)
__new__(cls: type, descr: MemberDescriptor, attrs: Array[Attribute])
"""
pass
AttributeArray = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets an array of attributes.
"""
ComponentType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""When overridden in a derived class, gets the type of the component this property is bound to.
Get: ComponentType(self: PropertyDescriptor) -> Type
"""
Converter = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the type converter for this property.
Get: Converter(self: PropertyDescriptor) -> TypeConverter
"""
IsLocalizable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether this property should be localized, as specified in the System.ComponentModel.LocalizableAttribute.
Get: IsLocalizable(self: PropertyDescriptor) -> bool
"""
IsReadOnly = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""When overridden in a derived class, gets a value indicating whether this property is read-only.
Get: IsReadOnly(self: PropertyDescriptor) -> bool
"""
NameHashCode = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the hash code for the name of the member, as specified in System.String.GetHashCode.
"""
PropertyType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""When overridden in a derived class, gets the type of the property.
Get: PropertyType(self: PropertyDescriptor) -> Type
"""
SerializationVisibility = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether this property should be serialized, as specified in the System.ComponentModel.DesignerSerializationVisibilityAttribute.
Get: SerializationVisibility(self: PropertyDescriptor) -> DesignerSerializationVisibility
"""
SupportsChangeEvents = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether value change notifications for this property may originate from outside the property descriptor.
Get: SupportsChangeEvents(self: PropertyDescriptor) -> bool
"""
class DependencyPropertyDescriptor(PropertyDescriptor):
""" Provides an extension of System.ComponentModel.PropertyDescriptor that accounts for the additional property characteristics of a dependency property. """
def AddValueChanged(self, component, handler):
"""
AddValueChanged(self: DependencyPropertyDescriptor, component: object, handler: EventHandler)
Enables other objects to be notified when this property changes.
component: The component to add the handler for.
handler: The delegate to add as a listener.
"""
pass
def CanResetValue(self, component):
"""
CanResetValue(self: DependencyPropertyDescriptor, component: object) -> bool
Returns whether resetting an object changes its value.
component: The component to test for reset capability.
Returns: true if resetting the component changes its value; otherwise, false.
"""
pass
def Equals(self, obj):
"""
Equals(self: DependencyPropertyDescriptor, obj: object) -> bool
Compares two System.ComponentModel.DependencyPropertyDescriptor instances for
equality.
obj: The System.ComponentModel.DependencyPropertyDescriptor to compare with the
current instance.
Returns: true if the values are equivalent; otherwise, false.
"""
pass
@staticmethod
def FromName(name, ownerType, targetType, ignorePropertyType=None):
"""
FromName(name: str, ownerType: Type, targetType: Type, ignorePropertyType: bool) -> DependencyPropertyDescriptor
Returns a System.ComponentModel.DependencyPropertyDescriptor for a provided
property name.
name: The registered name of a dependency property or an attached property.
ownerType: The System.Type of the object that owns the property definition.
targetType: The System.Type of the object you want to set the property for.
ignorePropertyType: Specifies to ignore the property type.
Returns: The requested System.ComponentModel.DependencyPropertyDescriptor.
FromName(name: str, ownerType: Type, targetType: Type) -> DependencyPropertyDescriptor
Returns a System.ComponentModel.DependencyPropertyDescriptor for a provided
property name.
name: The registered name of a dependency property or an attached property.
ownerType: The System.Type of the object that owns the property definition.
targetType: The System.Type of the object you want to set the property for.
Returns: The requested System.ComponentModel.DependencyPropertyDescriptor.
"""
pass
@staticmethod
def FromProperty(*__args):
"""
FromProperty(dependencyProperty: DependencyProperty, targetType: Type) -> DependencyPropertyDescriptor
Returns a System.ComponentModel.DependencyPropertyDescriptor for a provided
dependency property and target type.
dependencyProperty: The identifier for a dependency property.
targetType: The type of the object where the property is set.
Returns: A System.ComponentModel.DependencyPropertyDescriptor for the provided
dependency property.
FromProperty(property: PropertyDescriptor) -> DependencyPropertyDescriptor
Returns a System.ComponentModel.DependencyPropertyDescriptor for a provided
System.ComponentModel.PropertyDescriptor.
property: The System.ComponentModel.PropertyDescriptor to check.
Returns: If the property described by property is a dependency property, returns a valid
System.ComponentModel.DependencyPropertyDescriptor. Otherwise, returns a
nullSystem.ComponentModel.DependencyPropertyDescriptor.
"""
pass
def GetChildProperties(self, *__args):
"""
GetChildProperties(self: DependencyPropertyDescriptor, instance: object, filter: Array[Attribute]) -> PropertyDescriptorCollection
Returns a System.ComponentModel.PropertyDescriptorCollection.
instance: A component to get the properties for.
filter: An array of type System.Attribute to use as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
match the specified attributes for the specified component.
"""
pass
def GetEditor(self, editorBaseType):
"""
GetEditor(self: DependencyPropertyDescriptor, editorBaseType: Type) -> object
Gets an editor of the specified type.
editorBaseType: The base type of editor, which is used to differentiate between multiple
editors that a property supports.
Returns: An instance of the requested editor type, or null if an editor cannot be found.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: DependencyPropertyDescriptor) -> int
Returns the hash code for this
System.ComponentModel.DependencyPropertyDescriptor.
Returns: A 32-bit signed integer hash code.
"""
pass
def GetValue(self, component):
"""
GetValue(self: DependencyPropertyDescriptor, component: object) -> object
Resturns the current value of the property on a component.
component: The component instance.
Returns: The requested value.
"""
pass
def RemoveValueChanged(self, component, handler):
"""
RemoveValueChanged(self: DependencyPropertyDescriptor, component: object, handler: EventHandler)
Enables other objects to be notified when this property changes.
component: The component to add the handler for.
handler: The delegate to add as a listener.
"""
pass
def ResetValue(self, component):
"""
ResetValue(self: DependencyPropertyDescriptor, component: object)
Resets the value for this property of the component to the default value.
component: The component with the property value that is to be reset to the default value.
"""
pass
def SetValue(self, component, value):
"""
SetValue(self: DependencyPropertyDescriptor, component: object, value: object)
Sets the value of the component to a different value.
component: The component with the property value that is to be set.
value: The new value.
"""
pass
def ShouldSerializeValue(self, component):
"""
ShouldSerializeValue(self: DependencyPropertyDescriptor, component: object) -> bool
Indicates whether the value of this property needs to be persisted by
serialization processes.
component: The component with the property to be examined for persistence.
Returns: true if the property should be persisted; otherwise, false.
"""
pass
def ToString(self):
"""
ToString(self: DependencyPropertyDescriptor) -> str
Converts the value of this instance to its equivalent string representation.
Returns: Returns the System.ComponentModel.MemberDescriptor.Name value.
"""
pass
AttributeArray = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets an array of attributes.
"""
Attributes = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the collection of attributes for this member.
Get: Attributes(self: DependencyPropertyDescriptor) -> AttributeCollection
"""
Category = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the category that the member belongs to, as specified in the System.ComponentModel.CategoryAttribute.
Get: Category(self: DependencyPropertyDescriptor) -> str
"""
ComponentType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the type of the component this property is bound to.
Get: ComponentType(self: DependencyPropertyDescriptor) -> Type
"""
Converter = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the type converter for this property.
Get: Converter(self: DependencyPropertyDescriptor) -> TypeConverter
"""
DependencyProperty = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Returns the dependency property identifier.
Get: DependencyProperty(self: DependencyPropertyDescriptor) -> DependencyProperty
"""
Description = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the description of the member, as specified in the System.ComponentModel.DescriptionAttribute.
Get: Description(self: DependencyPropertyDescriptor) -> str
"""
DesignerCoerceValueCallback = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a callback that designers use to modify the effective value of a dependency property before the dependency property value is stored in the dependency property engine.
Get: DesignerCoerceValueCallback(self: DependencyPropertyDescriptor) -> CoerceValueCallback
Set: DesignerCoerceValueCallback(self: DependencyPropertyDescriptor) = value
"""
DesignTimeOnly = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets whether this member should be set only at design time, as specified in the System.ComponentModel.DesignOnlyAttribute.
Get: DesignTimeOnly(self: DependencyPropertyDescriptor) -> bool
"""
DisplayName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name that can be displayed in a window, such as a Properties window.
Get: DisplayName(self: DependencyPropertyDescriptor) -> str
"""
IsAttached = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether the property is registered as an attached property and is being used through an attached usage.
Get: IsAttached(self: DependencyPropertyDescriptor) -> bool
"""
IsBrowsable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates the value of the System.ComponentModel.BrowsableAttribute on the property.
Get: IsBrowsable(self: DependencyPropertyDescriptor) -> bool
"""
IsLocalizable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether this property should be localized, as specified in the System.ComponentModel.LocalizableAttribute.
Get: IsLocalizable(self: DependencyPropertyDescriptor) -> bool
"""
IsReadOnly = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether this property is read-only.
Get: IsReadOnly(self: DependencyPropertyDescriptor) -> bool
"""
Metadata = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the metadata associated with the dependency property.
Get: Metadata(self: DependencyPropertyDescriptor) -> PropertyMetadata
"""
NameHashCode = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the hash code for the name of the member, as specified in System.String.GetHashCode.
"""
PropertyType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the represented System.Type of the dependency property.
Get: PropertyType(self: DependencyPropertyDescriptor) -> Type
"""
SupportsChangeEvents = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Indicates whether value change notifications for this property may originate from outside the property descriptor, such as from the component itself, or whether notifications will only originate from direct calls made to System.ComponentModel.DependencyPropertyDescriptor.SetValue(System.Object,System.Object).
Get: SupportsChangeEvents(self: DependencyPropertyDescriptor) -> bool
"""
class DescriptionAttribute(Attribute, _Attribute):
"""
Specifies a description for a property or event.
DescriptionAttribute()
DescriptionAttribute(description: str)
"""
def Equals(self, obj):
"""
Equals(self: DescriptionAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.DescriptionAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current;
otherwise, false.
"""
pass
def GetHashCode(self):
""" GetHashCode(self: DescriptionAttribute) -> int """
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: DescriptionAttribute) -> bool
Returns a value indicating whether this is the default
System.ComponentModel.DescriptionAttribute instance.
Returns: true, if this is the default System.ComponentModel.DescriptionAttribute
instance; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, description=None):
"""
__new__(cls: type)
__new__(cls: type, description: str)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
Description = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the description stored in this attribute.
Get: Description(self: DescriptionAttribute) -> str
"""
DescriptionValue = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the string stored as the description.
"""
Default = None
class DesignerAttribute(Attribute, _Attribute):
"""
Specifies the class used to implement design-time services for a component.
DesignerAttribute(designerTypeName: str)
DesignerAttribute(designerType: Type)
DesignerAttribute(designerTypeName: str, designerBaseTypeName: str)
DesignerAttribute(designerTypeName: str, designerBaseType: Type)
DesignerAttribute(designerType: Type, designerBaseType: Type)
"""
def Equals(self, obj):
"""
Equals(self: DesignerAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.DesignerAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current;
otherwise, false.
"""
pass
def GetHashCode(self):
""" GetHashCode(self: DesignerAttribute) -> int """
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type, designerTypeName: str)
__new__(cls: type, designerType: Type)
__new__(cls: type, designerTypeName: str, designerBaseTypeName: str)
__new__(cls: type, designerTypeName: str, designerBaseType: Type)
__new__(cls: type, designerType: Type, designerBaseType: Type)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
DesignerBaseTypeName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the base type of this designer.
Get: DesignerBaseTypeName(self: DesignerAttribute) -> str
"""
DesignerTypeName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the designer type associated with this designer attribute.
Get: DesignerTypeName(self: DesignerAttribute) -> str
"""
TypeId = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a unique ID for this attribute type.
Get: TypeId(self: DesignerAttribute) -> object
"""
class DesignerCategoryAttribute(Attribute, _Attribute):
"""
Specifies that the designer for a class belongs to a certain category.
DesignerCategoryAttribute()
DesignerCategoryAttribute(category: str)
"""
def Equals(self, obj):
"""
Equals(self: DesignerCategoryAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.DesignOnlyAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current;
otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: DesignerCategoryAttribute) -> int
Returns the hash code for this instance.
Returns: A 32-bit signed integer hash code.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: DesignerCategoryAttribute) -> bool
Determines if this attribute is the default.
Returns: true if the attribute is the default value for this attribute class; otherwise,
false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, category=None):
"""
__new__(cls: type)
__new__(cls: type, category: str)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
Category = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the category.
Get: Category(self: DesignerCategoryAttribute) -> str
"""
TypeId = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a unique identifier for this attribute.
Get: TypeId(self: DesignerCategoryAttribute) -> object
"""
Component = None
Default = None
Form = None
Generic = None
class DesignerProperties(object):
""" Provides attached properties used to communicate with a designer. """
@staticmethod
def GetIsInDesignMode(element):
"""
GetIsInDesignMode(element: DependencyObject) -> bool
Gets the value of the System.ComponentModel.DesignerProperties.IsInDesignMode�
attached property for the specified System.Windows.UIElement.
element: The element from which the property value is read.
Returns: The System.ComponentModel.DesignerProperties.IsInDesignMode property value for
the element.
"""
pass
@staticmethod
def SetIsInDesignMode(element, value):
"""
SetIsInDesignMode(element: DependencyObject, value: bool)
Sets the value of the System.ComponentModel.DesignerProperties.IsInDesignMode�
attached property to a specified element.
element: The element to which the attached property is written.
value: The needed System.Boolean value.
"""
pass
IsInDesignModeProperty = None
__all__ = [
'GetIsInDesignMode',
'IsInDesignModeProperty',
'SetIsInDesignMode',
]
class DesignerSerializationVisibility(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies the visibility a property has to the design-time serializer.
enum DesignerSerializationVisibility, values: Content (2), Hidden (0), Visible (1)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
Content = None
Hidden = None
value__ = None
Visible = None
class DesignerSerializationVisibilityAttribute(Attribute, _Attribute):
"""
Specifies the type of persistence to use when serializing a property on a component at design time.
DesignerSerializationVisibilityAttribute(visibility: DesignerSerializationVisibility)
"""
def Equals(self, obj):
"""
Equals(self: DesignerSerializationVisibilityAttribute, obj: object) -> bool
Indicates whether this instance and a specified object are equal.
obj: Another object to compare to.
Returns: true if obj is equal to this instance; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: DesignerSerializationVisibilityAttribute) -> int
Returns the hash code for this object.
Returns: A 32-bit signed integer hash code.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: DesignerSerializationVisibilityAttribute) -> bool
Gets a value indicating whether the current value of the attribute is the
default value for the attribute.
Returns: true if the attribute is set to the default value; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, visibility):
""" __new__(cls: type, visibility: DesignerSerializationVisibility) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
Visibility = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating the basic serialization mode a serializer should use when determining whether and how to persist the value of a property.
Get: Visibility(self: DesignerSerializationVisibilityAttribute) -> DesignerSerializationVisibility
"""
Content = None
Default = None
Hidden = None
Visible = None
class DesignOnlyAttribute(Attribute, _Attribute):
"""
Specifies whether a property can only be set at design time.
DesignOnlyAttribute(isDesignOnly: bool)
"""
def Equals(self, obj):
"""
Equals(self: DesignOnlyAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.DesignOnlyAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current;
otherwise, false.
"""
pass
def GetHashCode(self):
""" GetHashCode(self: DesignOnlyAttribute) -> int """
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: DesignOnlyAttribute) -> bool
Determines if this attribute is the default.
Returns: true if the attribute is the default value for this attribute class; otherwise,
false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, isDesignOnly):
""" __new__(cls: type, isDesignOnly: bool) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
IsDesignOnly = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether a property can be set only at design time.
Get: IsDesignOnly(self: DesignOnlyAttribute) -> bool
"""
Default = None
No = None
Yes = None
class DesignTimeVisibleAttribute(Attribute, _Attribute):
"""
System.ComponentModel.DesignTimeVisibleAttribute marks a component's visibility. If System.ComponentModel.DesignTimeVisibleAttribute.Yes is present, a visual designer can show this component on a designer.
DesignTimeVisibleAttribute(visible: bool)
DesignTimeVisibleAttribute()
"""
def Equals(self, obj):
"""
Equals(self: DesignTimeVisibleAttribute, obj: object) -> bool
obj: The object to compare.
"""
pass
def GetHashCode(self):
""" GetHashCode(self: DesignTimeVisibleAttribute) -> int """
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: DesignTimeVisibleAttribute) -> bool
Gets a value indicating if this instance is equal to the
System.ComponentModel.DesignTimeVisibleAttribute.Default value.
Returns: true, if this instance is equal to the
System.ComponentModel.DesignTimeVisibleAttribute.Default value; otherwise,
false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, visible=None):
"""
__new__(cls: type, visible: bool)
__new__(cls: type)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
Visible = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets whether the component should be shown at design time.
Get: Visible(self: DesignTimeVisibleAttribute) -> bool
"""
Default = None
No = None
Yes = None
class DisplayNameAttribute(Attribute, _Attribute):
"""
Specifies the display name for a property, event, or public void method which takes no arguments.
DisplayNameAttribute()
DisplayNameAttribute(displayName: str)
"""
def Equals(self, obj):
"""
Equals(self: DisplayNameAttribute, obj: object) -> bool
Determines whether two System.ComponentModel.DisplayNameAttribute instances are
equal.
obj: The System.ComponentModel.DisplayNameAttribute to test the value equality of.
Returns: true if the value of the given object is equal to that of the current object;
otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: DisplayNameAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current System.ComponentModel.DisplayNameAttribute.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: DisplayNameAttribute) -> bool
Determines if this attribute is the default.
Returns: true if the attribute is the default value for this attribute class; otherwise,
false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, displayName=None):
"""
__new__(cls: type)
__new__(cls: type, displayName: str)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
DisplayName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the display name for a property, event, or public void method that takes no arguments stored in this attribute.
Get: DisplayName(self: DisplayNameAttribute) -> str
"""
DisplayNameValue = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the display name.
"""
Default = None
class DoubleConverter(BaseNumberConverter):
"""
Provides a type converter to convert double-precision, floating point number objects to and from various other representations.
DoubleConverter()
"""
class DoWorkEventArgs(CancelEventArgs):
"""
Provides data for the System.ComponentModel.BackgroundWorker.DoWork event handler.
DoWorkEventArgs(argument: object)
"""
@staticmethod # known case of __new__
def __new__(self, argument):
""" __new__(cls: type, argument: object) """
pass
Argument = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that represents the argument of an asynchronous operation.
Get: Argument(self: DoWorkEventArgs) -> object
"""
Result = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value that represents the result of an asynchronous operation.
Get: Result(self: DoWorkEventArgs) -> object
Set: Result(self: DoWorkEventArgs) = value
"""
class DoWorkEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents the method that will handle the System.ComponentModel.BackgroundWorker.DoWork event. This class cannot be inherited.
DoWorkEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, sender, e, callback, object):
""" BeginInvoke(self: DoWorkEventHandler, sender: object, e: DoWorkEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: DoWorkEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, sender, e):
""" Invoke(self: DoWorkEventHandler, sender: object, e: DoWorkEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class EditorAttribute(Attribute, _Attribute):
"""
Specifies the editor to use to change a property. This class cannot be inherited.
EditorAttribute()
EditorAttribute(typeName: str, baseTypeName: str)
EditorAttribute(typeName: str, baseType: Type)
EditorAttribute(type: Type, baseType: Type)
"""
def Equals(self, obj):
"""
Equals(self: EditorAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.EditorAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current object;
otherwise, false.
"""
pass
def GetHashCode(self):
""" GetHashCode(self: EditorAttribute) -> int """
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type)
__new__(cls: type, typeName: str, baseTypeName: str)
__new__(cls: type, typeName: str, baseType: Type)
__new__(cls: type, type: Type, baseType: Type)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
EditorBaseTypeName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the base class or interface serving as a lookup key for this editor.
Get: EditorBaseTypeName(self: EditorAttribute) -> str
"""
EditorTypeName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the editor class in the System.Type.AssemblyQualifiedName format.
Get: EditorTypeName(self: EditorAttribute) -> str
"""
TypeId = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a unique ID for this attribute type.
Get: TypeId(self: EditorAttribute) -> object
"""
class EditorBrowsableAttribute(Attribute, _Attribute):
"""
Specifies that a property or method is viewable in an editor. This class cannot be inherited.
EditorBrowsableAttribute(state: EditorBrowsableState)
EditorBrowsableAttribute()
"""
def Equals(self, obj):
"""
Equals(self: EditorBrowsableAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.EditorBrowsableAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current;
otherwise, false.
"""
pass
def GetHashCode(self):
""" GetHashCode(self: EditorBrowsableAttribute) -> int """
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, state=None):
"""
__new__(cls: type, state: EditorBrowsableState)
__new__(cls: type)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
State = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the browsable state of the property or method.
Get: State(self: EditorBrowsableAttribute) -> EditorBrowsableState
"""
class EditorBrowsableState(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies the browsable state of a property or method from within an editor.
enum EditorBrowsableState, values: Advanced (2), Always (0), Never (1)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
Advanced = None
Always = None
Never = None
value__ = None
class EnumConverter(TypeConverter):
"""
Provides a type converter to convert System.Enum objects to and from various other representations.
EnumConverter(type: Type)
"""
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: EnumConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Gets a value indicating whether this converter can convert an object in the
given source type to an enumeration object using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: A System.Type that represents the type you wish to convert from.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def CanConvertTo(self, *__args):
"""
CanConvertTo(self: EnumConverter, context: ITypeDescriptorContext, destinationType: Type) -> bool
Gets a value indicating whether this converter can convert an object to the
given destination type using the context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
destinationType: A System.Type that represents the type you wish to convert to.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: EnumConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the specified value object to an enumeration object.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: An optional System.Globalization.CultureInfo. If not supplied, the current
culture is assumed.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: EnumConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given value object to the specified destination type.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: An optional System.Globalization.CultureInfo. If not supplied, the current
culture is assumed.
value: The System.Object to convert.
destinationType: The System.Type to convert the value to.
Returns: An System.Object that represents the converted value.
"""
pass
def GetStandardValues(self, context=None):
"""
GetStandardValues(self: EnumConverter, context: ITypeDescriptorContext) -> StandardValuesCollection
Gets a collection of standard values for the data type this validator is
designed for.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: A System.ComponentModel.TypeConverter.StandardValuesCollection that holds a
standard set of valid values, or null if the data type does not support a
standard set of values.
"""
pass
def GetStandardValuesExclusive(self, context=None):
"""
GetStandardValuesExclusive(self: EnumConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether the list of standard values returned from
System.ComponentModel.TypeConverter.GetStandardValues is an exclusive list
using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true if the System.ComponentModel.TypeConverter.StandardValuesCollection
returned from System.ComponentModel.TypeConverter.GetStandardValues is an
exhaustive list of possible values; false if other values are possible.
"""
pass
def GetStandardValuesSupported(self, context=None):
"""
GetStandardValuesSupported(self: EnumConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether this object supports a standard set of values
that can be picked from a list using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true because System.ComponentModel.TypeConverter.GetStandardValues should be
called to find a common set of values the object supports. This method never
returns false.
"""
pass
def IsValid(self, *__args):
"""
IsValid(self: EnumConverter, context: ITypeDescriptorContext, value: object) -> bool
Gets a value indicating whether the given object value is valid for this type.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: The System.Object to test.
Returns: true if the specified value is valid for this object; otherwise, false.
"""
pass
@staticmethod # known case of __new__
def __new__(self, type):
""" __new__(cls: type, type: Type) """
pass
Comparer = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets an System.Collections.IComparer that can be used to sort the values of the enumeration.
"""
EnumType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Specifies the type of the enumerator this converter is associated with.
"""
Values = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a System.ComponentModel.TypeConverter.StandardValuesCollection that specifies the possible values for the enumeration.
"""
class ErrorsChangedEventManager(WeakEventManager):
# no doc
@staticmethod
def AddHandler(source, handler):
""" AddHandler(source: INotifyDataErrorInfo, handler: EventHandler[DataErrorsChangedEventArgs]) """
pass
@staticmethod
def RemoveHandler(source, handler):
""" RemoveHandler(source: INotifyDataErrorInfo, handler: EventHandler[DataErrorsChangedEventArgs]) """
pass
ReadLock = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Establishes a read-lock on the underlying data table, and returns an System.IDisposable.
"""
WriteLock = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Establishes a write-lock on the underlying data table, and returns an System.IDisposable.
"""
class EventDescriptor(MemberDescriptor):
""" Provides information about an event. """
def AddEventHandler(self, component, value):
"""
AddEventHandler(self: EventDescriptor, component: object, value: Delegate)
When overridden in a derived class, binds the event to the component.
component: A component that provides events to the delegate.
value: A delegate that represents the method that handles the event.
"""
pass
def RemoveEventHandler(self, component, value):
"""
RemoveEventHandler(self: EventDescriptor, component: object, value: Delegate)
When overridden in a derived class, unbinds the delegate from the component so
that the delegate will no longer receive events from the component.
component: The component that the delegate is bound to.
value: The delegate to unbind from the component.
"""
pass
@staticmethod # known case of __new__
def __new__(self, *args): #cannot find CLR constructor
"""
__new__(cls: type, name: str, attrs: Array[Attribute])
__new__(cls: type, descr: MemberDescriptor)
__new__(cls: type, descr: MemberDescriptor, attrs: Array[Attribute])
"""
pass
AttributeArray = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets an array of attributes.
"""
ComponentType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""When overridden in a derived class, gets the type of component this event is bound to.
Get: ComponentType(self: EventDescriptor) -> Type
"""
EventType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""When overridden in a derived class, gets the type of delegate for the event.
Get: EventType(self: EventDescriptor) -> Type
"""
IsMulticast = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""When overridden in a derived class, gets a value indicating whether the event delegate is a multicast delegate.
Get: IsMulticast(self: EventDescriptor) -> bool
"""
NameHashCode = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the hash code for the name of the member, as specified in System.String.GetHashCode.
"""
class EventDescriptorCollection(object, ICollection, IEnumerable, IList):
"""
Represents a collection of System.ComponentModel.EventDescriptor objects.
EventDescriptorCollection(events: Array[EventDescriptor])
EventDescriptorCollection(events: Array[EventDescriptor], readOnly: bool)
"""
def Add(self, value):
"""
Add(self: EventDescriptorCollection, value: EventDescriptor) -> int
Adds an System.ComponentModel.EventDescriptor to the end of the collection.
value: An System.ComponentModel.EventDescriptor to add to the collection.
Returns: The position of the System.ComponentModel.EventDescriptor within the collection.
"""
pass
def Clear(self):
"""
Clear(self: EventDescriptorCollection)
Removes all objects from the collection.
"""
pass
def Contains(self, value):
"""
Contains(self: EventDescriptorCollection, value: EventDescriptor) -> bool
Returns whether the collection contains the given
System.ComponentModel.EventDescriptor.
value: The System.ComponentModel.EventDescriptor to find within the collection.
Returns: true if the collection contains the value parameter given; otherwise, false.
"""
pass
def Find(self, name, ignoreCase):
"""
Find(self: EventDescriptorCollection, name: str, ignoreCase: bool) -> EventDescriptor
Gets the description of the event with the specified name in the collection.
name: The name of the event to get from the collection.
ignoreCase: true if you want to ignore the case of the event; otherwise, false.
Returns: The System.ComponentModel.EventDescriptor with the specified name, or null if
the event does not exist.
"""
pass
def GetEnumerator(self):
"""
GetEnumerator(self: EventDescriptorCollection) -> IEnumerator
Gets an enumerator for this System.ComponentModel.EventDescriptorCollection.
Returns: An enumerator that implements System.Collections.IEnumerator.
"""
pass
def IndexOf(self, value):
"""
IndexOf(self: EventDescriptorCollection, value: EventDescriptor) -> int
Returns the index of the given System.ComponentModel.EventDescriptor.
value: The System.ComponentModel.EventDescriptor to find within the collection.
Returns: The index of the given System.ComponentModel.EventDescriptor within the
collection.
"""
pass
def Insert(self, index, value):
"""
Insert(self: EventDescriptorCollection, index: int, value: EventDescriptor)
Inserts an System.ComponentModel.EventDescriptor to the collection at a
specified index.
index: The index within the collection in which to insert the value parameter.
value: An System.ComponentModel.EventDescriptor to insert into the collection.
"""
pass
def InternalSort(self, *args): #cannot find CLR method
"""
InternalSort(self: EventDescriptorCollection, sorter: IComparer)
Sorts the members of this System.ComponentModel.EventDescriptorCollection,
using the specified System.Collections.IComparer.
sorter: A comparer to use to sort the System.ComponentModel.EventDescriptor objects in
this collection.
InternalSort(self: EventDescriptorCollection, names: Array[str])
Sorts the members of this System.ComponentModel.EventDescriptorCollection. The
specified order is applied first, followed by the default sort for this
collection, which is usually alphabetical.
names: An array of strings describing the order in which to sort the
System.ComponentModel.EventDescriptor objects in this collection.
"""
pass
def Remove(self, value):
"""
Remove(self: EventDescriptorCollection, value: EventDescriptor)
Removes the specified System.ComponentModel.EventDescriptor from the collection.
value: The System.ComponentModel.EventDescriptor to remove from the collection.
"""
pass
def RemoveAt(self, index):
"""
RemoveAt(self: EventDescriptorCollection, index: int)
Removes the System.ComponentModel.EventDescriptor at the specified index from
the collection.
index: The index of the System.ComponentModel.EventDescriptor to remove.
"""
pass
def Sort(self, *__args):
"""
Sort(self: EventDescriptorCollection, names: Array[str], comparer: IComparer) -> EventDescriptorCollection
Sorts the members of this System.ComponentModel.EventDescriptorCollection,
given a specified sort order and an System.Collections.IComparer.
names: An array of strings describing the order in which to sort the
System.ComponentModel.EventDescriptor objects in the collection.
comparer: An System.Collections.IComparer to use to sort the
System.ComponentModel.EventDescriptor objects in this collection.
Returns: The new System.ComponentModel.EventDescriptorCollection.
Sort(self: EventDescriptorCollection, comparer: IComparer) -> EventDescriptorCollection
Sorts the members of this System.ComponentModel.EventDescriptorCollection,
using the specified System.Collections.IComparer.
comparer: An System.Collections.IComparer to use to sort the
System.ComponentModel.EventDescriptor objects in this collection.
Returns: The new System.ComponentModel.EventDescriptorCollection.
Sort(self: EventDescriptorCollection) -> EventDescriptorCollection
Sorts the members of this System.ComponentModel.EventDescriptorCollection,
using the default sort for this collection, which is usually alphabetical.
Returns: The new System.ComponentModel.EventDescriptorCollection.
Sort(self: EventDescriptorCollection, names: Array[str]) -> EventDescriptorCollection
Sorts the members of this System.ComponentModel.EventDescriptorCollection,
given a specified sort order.
names: An array of strings describing the order in which to sort the
System.ComponentModel.EventDescriptor objects in the collection.
Returns: The new System.ComponentModel.EventDescriptorCollection.
"""
pass
def __add__(self, *args): #cannot find CLR method
""" x.__add__(y) <==> x+y """
pass
def __contains__(self, *args): #cannot find CLR method
"""
__contains__(self: IList, value: object) -> bool
Determines whether the System.Collections.IList contains a specific value.
value: The object to locate in the System.Collections.IList.
Returns: true if the System.Object is found in the System.Collections.IList; otherwise,
false.
"""
pass
def __getitem__(self, *args): #cannot find CLR method
""" x.__getitem__(y) <==> x[y]x.__getitem__(y) <==> x[y] """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __iter__(self, *args): #cannot find CLR method
""" __iter__(self: IEnumerable) -> object """
pass
def __len__(self, *args): #cannot find CLR method
""" x.__len__() <==> len(x) """
pass
@staticmethod # known case of __new__
def __new__(self, events, readOnly=None):
"""
__new__(cls: type, events: Array[EventDescriptor])
__new__(cls: type, events: Array[EventDescriptor], readOnly: bool)
"""
pass
def __repr__(self, *args): #cannot find CLR method
""" __repr__(self: object) -> str """
pass
Count = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the number of event descriptors in the collection.
Get: Count(self: EventDescriptorCollection) -> int
"""
Empty = None
class EventHandlerList(object, IDisposable):
"""
Provides a simple list of delegates. This class cannot be inherited.
EventHandlerList()
"""
def AddHandler(self, key, value):
"""
AddHandler(self: EventHandlerList, key: object, value: Delegate)
Adds a delegate to the list.
key: The object that owns the event.
value: The delegate to add to the list.
"""
pass
def AddHandlers(self, listToAddFrom):
"""
AddHandlers(self: EventHandlerList, listToAddFrom: EventHandlerList)
Adds a list of delegates to the current list.
listToAddFrom: The list to add.
"""
pass
def Dispose(self):
"""
Dispose(self: EventHandlerList)
Disposes the delegate list.
"""
pass
def RemoveHandler(self, key, value):
"""
RemoveHandler(self: EventHandlerList, key: object, value: Delegate)
Removes a delegate from the list.
key: The object that owns the event.
value: The delegate to remove from the list.
"""
pass
def __enter__(self, *args): #cannot find CLR method
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args): #cannot find CLR method
""" __exit__(self: IDisposable, exc_type: object, exc_value: object, exc_back: object) """
pass
def __getitem__(self, *args): #cannot find CLR method
""" x.__getitem__(y) <==> x[y] """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __repr__(self, *args): #cannot find CLR method
""" __repr__(self: object) -> str """
pass
def __setitem__(self, *args): #cannot find CLR method
""" x.__setitem__(i, y) <==> x[i]= """
pass
class ExpandableObjectConverter(TypeConverter):
"""
Provides a type converter to convert expandable objects to and from various other representations.
ExpandableObjectConverter()
"""
def GetProperties(self, *__args):
"""
GetProperties(self: ExpandableObjectConverter, context: ITypeDescriptorContext, value: object, attributes: Array[Attribute]) -> PropertyDescriptorCollection
Gets a collection of properties for the type of object specified by the value
parameter.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: An System.Object that specifies the type of object to get the properties for.
attributes: An array of type System.Attribute that will be used as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
are exposed for the component, or null if there are no properties.
"""
pass
def GetPropertiesSupported(self, context=None):
"""
GetPropertiesSupported(self: ExpandableObjectConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether this object supports properties using the
specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true because System.ComponentModel.TypeConverter.GetProperties(System.Object)
should be called to find the properties of this object. This method never
returns false.
"""
pass
class ExtenderProvidedPropertyAttribute(Attribute, _Attribute):
"""
Specifies a property that is offered by an extender provider. This class cannot be inherited.
ExtenderProvidedPropertyAttribute()
"""
def Equals(self, obj):
"""
Equals(self: ExtenderProvidedPropertyAttribute, obj: object) -> bool
Determines whether the specified System.Object is equal to the current
System.Object.
obj: An System.Object to compare with this instance or null.
Returns: true if the specified System.Object is equal to the current System.Object;
otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: ExtenderProvidedPropertyAttribute) -> int
Returns the hash code for this instance.
Returns: A 32-bit signed integer hash code.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: ExtenderProvidedPropertyAttribute) -> bool
Provides an indication whether the value of this instance is the default value
for the derived class.
Returns: true if this instance is the default attribute for the class; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __ne__(self, *args): #cannot find CLR method
pass
ExtenderProperty = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the property that is being provided.
Get: ExtenderProperty(self: ExtenderProvidedPropertyAttribute) -> PropertyDescriptor
"""
Provider = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the extender provider that is providing the property.
Get: Provider(self: ExtenderProvidedPropertyAttribute) -> IExtenderProvider
"""
ReceiverType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the type of object that can receive the property.
Get: ReceiverType(self: ExtenderProvidedPropertyAttribute) -> Type
"""
class INotifyPropertyChanged:
""" Notifies clients that a property value has changed. """
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
PropertyChanged = None
class GroupDescription(object, INotifyPropertyChanged):
""" Provides an abstract base class for types that describe how to divide the items in a collection into groups. """
def add_PropertyChanged(self, *args): #cannot find CLR method
""" add_PropertyChanged(self: GroupDescription, value: PropertyChangedEventHandler) """
pass
def GroupNameFromItem(self, item, level, culture):
"""
GroupNameFromItem(self: GroupDescription, item: object, level: int, culture: CultureInfo) -> object
Returns the group name(s) for the given item.
item: The item to return group names for.
level: The level of grouping.
culture: The System.Globalization.CultureInfo to supply to the converter.
Returns: The group name(s) for the given item.
"""
pass
def NamesMatch(self, groupName, itemName):
"""
NamesMatch(self: GroupDescription, groupName: object, itemName: object) -> bool
Returns a value that indicates whether the group name and the item name match
such that the item belongs to the group.
groupName: The name of the group to check.
itemName: The name of the item to check.
Returns: true if the names match and the item belongs to the group; otherwise, false.
"""
pass
def OnPropertyChanged(self, *args): #cannot find CLR method
"""
OnPropertyChanged(self: GroupDescription, e: PropertyChangedEventArgs)
Raises the System.ComponentModel.GroupDescription.PropertyChanged event.
e: Arguments of the event being raised.
"""
pass
def remove_PropertyChanged(self, *args): #cannot find CLR method
""" remove_PropertyChanged(self: GroupDescription, value: PropertyChangedEventHandler) """
pass
def ShouldSerializeGroupNames(self):
"""
ShouldSerializeGroupNames(self: GroupDescription) -> bool
Returns whether serialization processes should serialize the effective value of
the System.ComponentModel.GroupDescription.GroupNames property on instances of
this class.
Returns: Returns true if the System.ComponentModel.GroupDescription.GroupNames property
value should be serialized; otherwise, false.
"""
pass
def ShouldSerializeSortDescriptions(self):
""" ShouldSerializeSortDescriptions(self: GroupDescription) -> bool """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __repr__(self, *args): #cannot find CLR method
""" __repr__(self: object) -> str """
pass
CustomSort = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: CustomSort(self: GroupDescription) -> IComparer
Set: CustomSort(self: GroupDescription) = value
"""
GroupNames = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the collection of names that are used to initialize a group with a set of subgroups with the given names.
Get: GroupNames(self: GroupDescription) -> ObservableCollection[object]
"""
SortDescriptions = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: SortDescriptions(self: GroupDescription) -> SortDescriptionCollection
"""
class GuidConverter(TypeConverter):
"""
Provides a type converter to convert System.Guid objects to and from various other representations.
GuidConverter()
"""
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: GuidConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Gets a value indicating whether this converter can convert an object in the
given source type to a GUID object using the context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: A System.Type that represents the type you wish to convert from.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def CanConvertTo(self, *__args):
"""
CanConvertTo(self: GuidConverter, context: ITypeDescriptorContext, destinationType: Type) -> bool
Gets a value indicating whether this converter can convert an object to the
given destination type using the context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
destinationType: A System.Type that represents the type you wish to convert to.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: GuidConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the given object to a GUID object.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: An optional System.Globalization.CultureInfo. If not supplied, the current
culture is assumed.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: GuidConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given object to another type.
context: A formatter context.
culture: The culture into which value will be converted.
value: The object to convert.
destinationType: The type to convert the object to.
Returns: The converted object.
"""
pass
class HandledEventArgs(EventArgs):
"""
Provides data for events that can be handled completely in an event handler.
HandledEventArgs()
HandledEventArgs(defaultHandledValue: bool)
"""
@staticmethod # known case of __new__
def __new__(self, defaultHandledValue=None):
"""
__new__(cls: type)
__new__(cls: type, defaultHandledValue: bool)
"""
pass
Handled = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing.
Get: Handled(self: HandledEventArgs) -> bool
Set: Handled(self: HandledEventArgs) = value
"""
class HandledEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents a method that can handle events which may or may not require further processing after the event handler has returned.
HandledEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, sender, e, callback, object):
""" BeginInvoke(self: HandledEventHandler, sender: object, e: HandledEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: HandledEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, sender, e):
""" Invoke(self: HandledEventHandler, sender: object, e: HandledEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class IBindingListView(IBindingList, IList, ICollection, IEnumerable):
""" Extends the System.ComponentModel.IBindingList interface by providing advanced sorting and filtering capabilities. """
def ApplySort(self, sorts):
"""
ApplySort(self: IBindingListView, sorts: ListSortDescriptionCollection)
Sorts the data source based on the given
System.ComponentModel.ListSortDescriptionCollection.
sorts: The System.ComponentModel.ListSortDescriptionCollection containing the sorts to
apply to the data source.
"""
pass
def RemoveFilter(self):
"""
RemoveFilter(self: IBindingListView)
Removes the current filter applied to the data source.
"""
pass
def __contains__(self, *args): #cannot find CLR method
"""
__contains__(self: IList, value: object) -> bool
Determines whether the System.Collections.IList contains a specific value.
value: The object to locate in the System.Collections.IList.
Returns: true if the System.Object is found in the System.Collections.IList; otherwise,
false.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __iter__(self, *args): #cannot find CLR method
""" __iter__(self: IEnumerable) -> object """
pass
def __len__(self, *args): #cannot find CLR method
""" x.__len__() <==> len(x) """
pass
Filter = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the filter to be used to exclude items from the collection of items returned by the data source
Get: Filter(self: IBindingListView) -> str
Set: Filter(self: IBindingListView) = value
"""
SortDescriptions = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the collection of sort descriptions currently applied to the data source.
Get: SortDescriptions(self: IBindingListView) -> ListSortDescriptionCollection
"""
SupportsAdvancedSorting = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the data source supports advanced sorting.
Get: SupportsAdvancedSorting(self: IBindingListView) -> bool
"""
SupportsFiltering = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the data source supports filtering.
Get: SupportsFiltering(self: IBindingListView) -> bool
"""
class IChangeTracking:
""" Defines the mechanism for querying the object for changes and resetting of the changed status. """
def AcceptChanges(self):
"""
AcceptChanges(self: IChangeTracking)
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
IsChanged = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the object's changed status.
Get: IsChanged(self: IChangeTracking) -> bool
"""
class ICollectionView(IEnumerable, INotifyCollectionChanged):
""" Enables collections to have the functionalities of current record management, custom sorting, filtering, and grouping. """
def Contains(self, item):
"""
Contains(self: ICollectionView, item: object) -> bool
Returns a value that indicates whether a given item belongs to this collection
view.
item: The object to check.
Returns: true if the item belongs to this collection view; otherwise, false.
"""
pass
def DeferRefresh(self):
"""
DeferRefresh(self: ICollectionView) -> IDisposable
Enters a defer cycle that you can use to merge changes to the view and delay
automatic refresh.
Returns: An System.IDisposable object that you can use to dispose of the calling object.
"""
pass
def MoveCurrentTo(self, item):
"""
MoveCurrentTo(self: ICollectionView, item: object) -> bool
Sets the specified item to be the
System.ComponentModel.ICollectionView.CurrentItem in the view.
item: The item to set as the System.ComponentModel.ICollectionView.CurrentItem.
Returns: true if the resulting System.ComponentModel.ICollectionView.CurrentItem is
within the view; otherwise, false.
"""
pass
def MoveCurrentToFirst(self):
"""
MoveCurrentToFirst(self: ICollectionView) -> bool
Sets the first item in the view as the
System.ComponentModel.ICollectionView.CurrentItem.
Returns: true if the resulting System.ComponentModel.ICollectionView.CurrentItem is an
item within the view; otherwise, false.
"""
pass
def MoveCurrentToLast(self):
"""
MoveCurrentToLast(self: ICollectionView) -> bool
Sets the last item in the view as the
System.ComponentModel.ICollectionView.CurrentItem.
Returns: true if the resulting System.ComponentModel.ICollectionView.CurrentItem is an
item within the view; otherwise, false.
"""
pass
def MoveCurrentToNext(self):
"""
MoveCurrentToNext(self: ICollectionView) -> bool
Sets the item after the System.ComponentModel.ICollectionView.CurrentItem in
the view as the System.ComponentModel.ICollectionView.CurrentItem.
Returns: true if the resulting System.ComponentModel.ICollectionView.CurrentItem is an
item within the view; otherwise, false.
"""
pass
def MoveCurrentToPosition(self, position):
"""
MoveCurrentToPosition(self: ICollectionView, position: int) -> bool
Sets the item at the specified index to be the
System.ComponentModel.ICollectionView.CurrentItem in the view.
position: The index to set the System.ComponentModel.ICollectionView.CurrentItem to.
Returns: true if the resulting System.ComponentModel.ICollectionView.CurrentItem is an
item within the view; otherwise, false.
"""
pass
def MoveCurrentToPrevious(self):
"""
MoveCurrentToPrevious(self: ICollectionView) -> bool
Sets the item before the System.ComponentModel.ICollectionView.CurrentItem in
the view as the System.ComponentModel.ICollectionView.CurrentItem.
Returns: true if the resulting System.ComponentModel.ICollectionView.CurrentItem is an
item within the view; otherwise, false.
"""
pass
def Refresh(self):
"""
Refresh(self: ICollectionView)
Recreates the view.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __iter__(self, *args): #cannot find CLR method
""" __iter__(self: IEnumerable) -> object """
pass
CanFilter = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether this view supports filtering via the System.ComponentModel.ICollectionView.Filter property.
Get: CanFilter(self: ICollectionView) -> bool
"""
CanGroup = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether this view supports grouping via the System.ComponentModel.ICollectionView.GroupDescriptions property.
Get: CanGroup(self: ICollectionView) -> bool
"""
CanSort = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether this view supports sorting via the System.ComponentModel.ICollectionView.SortDescriptions property.
Get: CanSort(self: ICollectionView) -> bool
"""
Culture = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the cultural info for any operations of the view that may differ by culture, such as sorting.
Get: Culture(self: ICollectionView) -> CultureInfo
Set: Culture(self: ICollectionView) = value
"""
CurrentItem = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the current item in the view.
Get: CurrentItem(self: ICollectionView) -> object
"""
CurrentPosition = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the ordinal position of the System.ComponentModel.ICollectionView.CurrentItem within the view.
Get: CurrentPosition(self: ICollectionView) -> int
"""
Filter = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a callback used to determine if an item is suitable for inclusion in the view.
Get: Filter(self: ICollectionView) -> Predicate[object]
Set: Filter(self: ICollectionView) = value
"""
GroupDescriptions = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a collection of System.ComponentModel.GroupDescription objects that describe how the items in the collection are grouped in the view.
Get: GroupDescriptions(self: ICollectionView) -> ObservableCollection[GroupDescription]
"""
Groups = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the top-level groups.
Get: Groups(self: ICollectionView) -> ReadOnlyObservableCollection[object]
"""
IsCurrentAfterLast = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether the System.ComponentModel.ICollectionView.CurrentItem of the view is beyond the end of the collection.
Get: IsCurrentAfterLast(self: ICollectionView) -> bool
"""
IsCurrentBeforeFirst = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether the System.ComponentModel.ICollectionView.CurrentItem of the view is beyond the beginning of the collection.
Get: IsCurrentBeforeFirst(self: ICollectionView) -> bool
"""
IsEmpty = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Returns a value that indicates whether the resulting view is empty.
Get: IsEmpty(self: ICollectionView) -> bool
"""
SortDescriptions = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a collection of System.ComponentModel.SortDescription objects that describe how the items in the collection are sorted in the view.
Get: SortDescriptions(self: ICollectionView) -> SortDescriptionCollection
"""
SourceCollection = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Returns the underlying collection.
Get: SourceCollection(self: ICollectionView) -> IEnumerable
"""
CurrentChanged = None
CurrentChanging = None
class ICollectionViewFactory:
""" An interface that enables implementing collections to create a view to their data. Normally, user code does not call methods on this interface. """
def CreateView(self):
"""
CreateView(self: ICollectionViewFactory) -> ICollectionView
Creates a new view on the collection that implements this interface. Typically,
user code does not call this method.
Returns: The newly created view.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
class ICollectionViewLiveShaping:
# no doc
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
CanChangeLiveFiltering = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: CanChangeLiveFiltering(self: ICollectionViewLiveShaping) -> bool
"""
CanChangeLiveGrouping = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: CanChangeLiveGrouping(self: ICollectionViewLiveShaping) -> bool
"""
CanChangeLiveSorting = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: CanChangeLiveSorting(self: ICollectionViewLiveShaping) -> bool
"""
IsLiveFiltering = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: IsLiveFiltering(self: ICollectionViewLiveShaping) -> Nullable[bool]
Set: IsLiveFiltering(self: ICollectionViewLiveShaping) = value
"""
IsLiveGrouping = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: IsLiveGrouping(self: ICollectionViewLiveShaping) -> Nullable[bool]
Set: IsLiveGrouping(self: ICollectionViewLiveShaping) = value
"""
IsLiveSorting = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: IsLiveSorting(self: ICollectionViewLiveShaping) -> Nullable[bool]
Set: IsLiveSorting(self: ICollectionViewLiveShaping) = value
"""
LiveFilteringProperties = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: LiveFilteringProperties(self: ICollectionViewLiveShaping) -> ObservableCollection[str]
"""
LiveGroupingProperties = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: LiveGroupingProperties(self: ICollectionViewLiveShaping) -> ObservableCollection[str]
"""
LiveSortingProperties = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: LiveSortingProperties(self: ICollectionViewLiveShaping) -> ObservableCollection[str]
"""
class IComNativeDescriptorHandler:
""" Provides a top-level mapping layer between a COM object and a System.ComponentModel.TypeDescriptor. """
def GetAttributes(self, component):
"""
GetAttributes(self: IComNativeDescriptorHandler, component: object) -> AttributeCollection
Gets the attributes for the specified component.
component: The component to get attributes for.
Returns: A collection of attributes for component.
"""
pass
def GetClassName(self, component):
"""
GetClassName(self: IComNativeDescriptorHandler, component: object) -> str
Gets the class name for the specified component.
component: The component to get the class name for.
Returns: The name of the class that corresponds with component.
"""
pass
def GetConverter(self, component):
"""
GetConverter(self: IComNativeDescriptorHandler, component: object) -> TypeConverter
Gets the type converter for the specified component.
component: The component to get the System.ComponentModel.TypeConverter for.
Returns: The System.ComponentModel.TypeConverter for component.
"""
pass
def GetDefaultEvent(self, component):
"""
GetDefaultEvent(self: IComNativeDescriptorHandler, component: object) -> EventDescriptor
Gets the default event for the specified component.
component: The component to get the default event for.
Returns: An System.ComponentModel.EventDescriptor that represents component's default
event.
"""
pass
def GetDefaultProperty(self, component):
"""
GetDefaultProperty(self: IComNativeDescriptorHandler, component: object) -> PropertyDescriptor
Gets the default property for the specified component.
component: The component to get the default property for.
Returns: A System.ComponentModel.PropertyDescriptor that represents component's default
property.
"""
pass
def GetEditor(self, component, baseEditorType):
"""
GetEditor(self: IComNativeDescriptorHandler, component: object, baseEditorType: Type) -> object
Gets the editor for the specified component.
component: The component to get the editor for.
baseEditorType: The base type of the editor for component.
Returns: The editor for component.
"""
pass
def GetEvents(self, component, attributes=None):
"""
GetEvents(self: IComNativeDescriptorHandler, component: object, attributes: Array[Attribute]) -> EventDescriptorCollection
Gets the events with the specified attributes for the specified component.
component: The component to get events for.
attributes: The attributes used to filter events.
Returns: A collection of event descriptors for component.
GetEvents(self: IComNativeDescriptorHandler, component: object) -> EventDescriptorCollection
Gets the events for the specified component.
component: The component to get events for.
Returns: A collection of event descriptors for component.
"""
pass
def GetName(self, component):
"""
GetName(self: IComNativeDescriptorHandler, component: object) -> str
Gets the name of the specified component.
component: The component to get the name of.
Returns: The name of component.
"""
pass
def GetProperties(self, component, attributes):
"""
GetProperties(self: IComNativeDescriptorHandler, component: object, attributes: Array[Attribute]) -> PropertyDescriptorCollection
Gets the properties with the specified attributes for the specified component.
component: The component to get events for.
attributes: The attributes used to filter properties.
Returns: A collection of property descriptors for component.
"""
pass
def GetPropertyValue(self, component, *__args):
"""
GetPropertyValue(self: IComNativeDescriptorHandler, component: object, dispid: int, success: bool) -> (object, bool)
Gets the value of the property that has the specified dispatch identifier.
component: The object to which the property belongs.
dispid: The dispatch identifier.
success: A System.Boolean, passed by reference, that represents whether the property was
retrieved.
Returns: The value of the property that has the specified dispatch identifier.
GetPropertyValue(self: IComNativeDescriptorHandler, component: object, propertyName: str, success: bool) -> (object, bool)
Gets the value of the property that has the specified name.
component: The object to which the property belongs.
propertyName: The name of the property.
success: A System.Boolean, passed by reference, that represents whether the property was
retrieved.
Returns: The value of the property that has the specified name.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
class IComponent(IDisposable):
""" Provides functionality required by all components. """
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Site = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the System.ComponentModel.ISite associated with the System.ComponentModel.IComponent.
Get: Site(self: IComponent) -> ISite
Set: Site(self: IComponent) = value
"""
Disposed = None
class IContainer(IDisposable):
""" Provides functionality for containers. Containers are objects that logically contain zero or more components. """
def Add(self, component, name=None):
"""
Add(self: IContainer, component: IComponent, name: str)
Adds the specified System.ComponentModel.IComponent to the
System.ComponentModel.IContainer at the end of the list, and assigns a name to
the component.
component: The System.ComponentModel.IComponent to add.
name: The unique, case-insensitive name to assign to the component.-or- null that
leaves the component unnamed.
Add(self: IContainer, component: IComponent)
Adds the specified System.ComponentModel.IComponent to the
System.ComponentModel.IContainer at the end of the list.
component: The System.ComponentModel.IComponent to add.
"""
pass
def Remove(self, component):
"""
Remove(self: IContainer, component: IComponent)
Removes a component from the System.ComponentModel.IContainer.
component: The System.ComponentModel.IComponent to remove.
"""
pass
def __add__(self, *args): #cannot find CLR method
""" x.__add__(y) <==> x+yx.__add__(y) <==> x+y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Components = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets all the components in the System.ComponentModel.IContainer.
Get: Components(self: IContainer) -> ComponentCollection
"""
class ICustomTypeDescriptor:
""" Provides an interface that supplies dynamic custom type information for an object. """
def GetAttributes(self):
"""
GetAttributes(self: ICustomTypeDescriptor) -> AttributeCollection
Returns a collection of custom attributes for this instance of a component.
Returns: An System.ComponentModel.AttributeCollection containing the attributes for this
object.
"""
pass
def GetClassName(self):
"""
GetClassName(self: ICustomTypeDescriptor) -> str
Returns the class name of this instance of a component.
Returns: The class name of the object, or null if the class does not have a name.
"""
pass
def GetComponentName(self):
"""
GetComponentName(self: ICustomTypeDescriptor) -> str
Returns the name of this instance of a component.
Returns: The name of the object, or null if the object does not have a name.
"""
pass
def GetConverter(self):
"""
GetConverter(self: ICustomTypeDescriptor) -> TypeConverter
Returns a type converter for this instance of a component.
Returns: A System.ComponentModel.TypeConverter that is the converter for this object, or
null if there is no System.ComponentModel.TypeConverter for this object.
"""
pass
def GetDefaultEvent(self):
"""
GetDefaultEvent(self: ICustomTypeDescriptor) -> EventDescriptor
Returns the default event for this instance of a component.
Returns: An System.ComponentModel.EventDescriptor that represents the default event for
this object, or null if this object does not have events.
"""
pass
def GetDefaultProperty(self):
"""
GetDefaultProperty(self: ICustomTypeDescriptor) -> PropertyDescriptor
Returns the default property for this instance of a component.
Returns: A System.ComponentModel.PropertyDescriptor that represents the default property
for this object, or null if this object does not have properties.
"""
pass
def GetEditor(self, editorBaseType):
"""
GetEditor(self: ICustomTypeDescriptor, editorBaseType: Type) -> object
Returns an editor of the specified type for this instance of a component.
editorBaseType: A System.Type that represents the editor for this object.
Returns: An System.Object of the specified type that is the editor for this object, or
null if the editor cannot be found.
"""
pass
def GetEvents(self, attributes=None):
"""
GetEvents(self: ICustomTypeDescriptor, attributes: Array[Attribute]) -> EventDescriptorCollection
Returns the events for this instance of a component using the specified
attribute array as a filter.
attributes: An array of type System.Attribute that is used as a filter.
Returns: An System.ComponentModel.EventDescriptorCollection that represents the filtered
events for this component instance.
GetEvents(self: ICustomTypeDescriptor) -> EventDescriptorCollection
Returns the events for this instance of a component.
Returns: An System.ComponentModel.EventDescriptorCollection that represents the events
for this component instance.
"""
pass
def GetProperties(self, attributes=None):
"""
GetProperties(self: ICustomTypeDescriptor, attributes: Array[Attribute]) -> PropertyDescriptorCollection
Returns the properties for this instance of a component using the attribute
array as a filter.
attributes: An array of type System.Attribute that is used as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection that represents the
filtered properties for this component instance.
GetProperties(self: ICustomTypeDescriptor) -> PropertyDescriptorCollection
Returns the properties for this instance of a component.
Returns: A System.ComponentModel.PropertyDescriptorCollection that represents the
properties for this component instance.
"""
pass
def GetPropertyOwner(self, pd):
"""
GetPropertyOwner(self: ICustomTypeDescriptor, pd: PropertyDescriptor) -> object
Returns an object that contains the property described by the specified
property descriptor.
pd: A System.ComponentModel.PropertyDescriptor that represents the property whose
owner is to be found.
Returns: An System.Object that represents the owner of the specified property.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
class IDataErrorInfo:
""" Provides the functionality to offer custom error information that a user interface can bind to. """
def __getitem__(self, *args): #cannot find CLR method
""" x.__getitem__(y) <==> x[y] """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Error = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets an error message indicating what is wrong with this object.
Get: Error(self: IDataErrorInfo) -> str
"""
class IEditableCollectionView:
""" Defines methods and properties that a System.Windows.Data.CollectionView implements to provide editing capabilities to a collection. """
def AddNew(self):
"""
AddNew(self: IEditableCollectionView) -> object
Adds a new item to the collection.
Returns: The new item that is added to the collection.
"""
pass
def CancelEdit(self):
"""
CancelEdit(self: IEditableCollectionView)
Ends the edit transaction and, if possible, restores the original value to the
item.
"""
pass
def CancelNew(self):
"""
CancelNew(self: IEditableCollectionView)
Ends the add transaction and discards the pending new item.
"""
pass
def CommitEdit(self):
"""
CommitEdit(self: IEditableCollectionView)
Ends the edit transaction and saves the pending changes.
"""
pass
def CommitNew(self):
"""
CommitNew(self: IEditableCollectionView)
Ends the add transaction and saves the pending new item.
"""
pass
def EditItem(self, item):
"""
EditItem(self: IEditableCollectionView, item: object)
Begins an edit transaction of the specified item.
item: The item to edit.
"""
pass
def Remove(self, item):
"""
Remove(self: IEditableCollectionView, item: object)
Removes the specified item from the collection.
item: The item to remove.
"""
pass
def RemoveAt(self, index):
"""
RemoveAt(self: IEditableCollectionView, index: int)
Removes the item at the specified position from the collection.
index: The position of the item to remove.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
CanAddNew = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether a new item can be added to the collection.
Get: CanAddNew(self: IEditableCollectionView) -> bool
"""
CanCancelEdit = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether the collection view can discard pending changes and restore the original values of an edited object.
Get: CanCancelEdit(self: IEditableCollectionView) -> bool
"""
CanRemove = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether an item can be removed from the collection.
Get: CanRemove(self: IEditableCollectionView) -> bool
"""
CurrentAddItem = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the item that is being added during the current add transaction.
Get: CurrentAddItem(self: IEditableCollectionView) -> object
"""
CurrentEditItem = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the item in the collection that is being edited.
Get: CurrentEditItem(self: IEditableCollectionView) -> object
"""
IsAddingNew = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether an add transaction is in progress.
Get: IsAddingNew(self: IEditableCollectionView) -> bool
"""
IsEditingItem = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether an edit transaction is in progress.
Get: IsEditingItem(self: IEditableCollectionView) -> bool
"""
NewItemPlaceholderPosition = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the position of the new item placeholder in the collection view.
Get: NewItemPlaceholderPosition(self: IEditableCollectionView) -> NewItemPlaceholderPosition
Set: NewItemPlaceholderPosition(self: IEditableCollectionView) = value
"""
class IEditableCollectionViewAddNewItem(IEditableCollectionView):
""" Defines methods and properties that a System.Windows.Data.CollectionView implements to enable specifying adding items of a specific type. """
def AddNewItem(self, newItem):
"""
AddNewItem(self: IEditableCollectionViewAddNewItem, newItem: object) -> object
Adds the specified object to the collection.
newItem: The object to add to the collection.
Returns: The object that is added to the collection.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
CanAddNewItem = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether a specified object can be added to the collection.
Get: CanAddNewItem(self: IEditableCollectionViewAddNewItem) -> bool
"""
class IEditableObject:
""" Provides functionality to commit or rollback changes to an object that is used as a data source. """
def BeginEdit(self):
"""
BeginEdit(self: IEditableObject)
Begins an edit on an object.
"""
pass
def CancelEdit(self):
"""
CancelEdit(self: IEditableObject)
Discards changes since the last System.ComponentModel.IEditableObject.BeginEdit
call.
"""
pass
def EndEdit(self):
"""
EndEdit(self: IEditableObject)
Pushes changes since the last System.ComponentModel.IEditableObject.BeginEdit
or System.ComponentModel.IBindingList.AddNew call into the underlying object.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
class IExtenderProvider:
""" Defines the interface for extending properties to other components in a container. """
def CanExtend(self, extendee):
"""
CanExtend(self: IExtenderProvider, extendee: object) -> bool
Specifies whether this object can provide its extender properties to the
specified object.
extendee: The System.Object to receive the extender properties.
Returns: true if this object can provide extender properties to the specified object;
otherwise, false.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
class IIntellisenseBuilder:
""" Provides an interface to facilitate the retrieval of the builder's name and to display the builder. """
def Show(self, language, value, newValue):
"""
Show(self: IIntellisenseBuilder, language: str, value: str, newValue: str) -> (bool, str)
Shows the builder.
language: The language service that is calling the builder.
value: The expression being edited.
newValue: The new value.
Returns: true if the value should be replaced with newValue; otherwise, false (if the
user cancels, for example).
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Name = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a localized name.
Get: Name(self: IIntellisenseBuilder) -> str
"""
class IItemProperties:
""" Defines a property that provides information about an object's properties. """
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
ItemProperties = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a collection that contains information about the properties that are available on the items in a collection.
Get: ItemProperties(self: IItemProperties) -> ReadOnlyCollection[ItemPropertyInfo]
"""
class IListSource:
""" Provides functionality to an object to return a list that can be bound to a data source. """
def GetList(self):
"""
GetList(self: IListSource) -> IList
Returns an System.Collections.IList that can be bound to a data source from an
object that does not implement an System.Collections.IList itself.
Returns: An System.Collections.IList that can be bound to a data source from the object.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
ContainsListCollection = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the collection is a collection of System.Collections.IList objects.
Get: ContainsListCollection(self: IListSource) -> bool
"""
class ImmutableObjectAttribute(Attribute, _Attribute):
"""
Specifies that an object has no subproperties capable of being edited. This class cannot be inherited.
ImmutableObjectAttribute(immutable: bool)
"""
def Equals(self, obj):
"""
Equals(self: ImmutableObjectAttribute, obj: object) -> bool
obj: An System.Object to compare with this instance or null.
Returns: true if obj equals the type and value of this instance; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: ImmutableObjectAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current System.ComponentModel.ImmutableObjectAttribute.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: ImmutableObjectAttribute) -> bool
Indicates whether the value of this instance is the default value.
Returns: true if this instance is the default attribute for the class; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, immutable):
""" __new__(cls: type, immutable: bool) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
Immutable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets whether the object is immutable.
Get: Immutable(self: ImmutableObjectAttribute) -> bool
"""
Default = None
No = None
Yes = None
class INestedContainer(IContainer, IDisposable):
""" Provides functionality for nested containers, which logically contain zero or more other components and are owned by a parent component. """
def __enter__(self, *args): #cannot find CLR method
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args): #cannot find CLR method
""" __exit__(self: IDisposable, exc_type: object, exc_value: object, exc_back: object) """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Owner = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the owning component for the nested container.
Get: Owner(self: INestedContainer) -> IComponent
"""
class ISite(IServiceProvider):
""" Provides functionality required by sites. """
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Component = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the component associated with the System.ComponentModel.ISite when implemented by a class.
Get: Component(self: ISite) -> IComponent
"""
Container = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the System.ComponentModel.IContainer associated with the System.ComponentModel.ISite when implemented by a class.
Get: Container(self: ISite) -> IContainer
"""
DesignMode = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Determines whether the component is in design mode when implemented by a class.
Get: DesignMode(self: ISite) -> bool
"""
Name = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the name of the component associated with the System.ComponentModel.ISite when implemented by a class.
Get: Name(self: ISite) -> str
Set: Name(self: ISite) = value
"""
class INestedSite(ISite, IServiceProvider):
""" Provides the ability to retrieve the full nested name of a component. """
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
FullName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the full name of the component in this site.
Get: FullName(self: INestedSite) -> str
"""
class InheritanceAttribute(Attribute, _Attribute):
"""
Indicates whether the component associated with this attribute has been inherited from a base class. This class cannot be inherited.
InheritanceAttribute()
InheritanceAttribute(inheritanceLevel: InheritanceLevel)
"""
def Equals(self, value):
"""
Equals(self: InheritanceAttribute, value: object) -> bool
Override to test for equality.
value: The object to test.
Returns: true if the object is the same; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: InheritanceAttribute) -> int
Returns the hashcode for this object.
Returns: A hash code for the current System.ComponentModel.InheritanceAttribute.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: InheritanceAttribute) -> bool
Gets a value indicating whether the current value of the attribute is the
default value for the attribute.
Returns: true if the current value of the attribute is the default; otherwise, false.
"""
pass
def ToString(self):
"""
ToString(self: InheritanceAttribute) -> str
Converts this attribute to a string.
Returns: A string that represents this System.ComponentModel.InheritanceAttribute.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, inheritanceLevel=None):
"""
__new__(cls: type)
__new__(cls: type, inheritanceLevel: InheritanceLevel)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
InheritanceLevel = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the current inheritance level stored in this attribute.
Get: InheritanceLevel(self: InheritanceAttribute) -> InheritanceLevel
"""
Default = None
Inherited = None
InheritedReadOnly = None
NotInherited = None
class InheritanceLevel(Enum, IComparable, IFormattable, IConvertible):
"""
Defines identifiers for types of inheritance levels.
enum InheritanceLevel, values: Inherited (1), InheritedReadOnly (2), NotInherited (3)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
Inherited = None
InheritedReadOnly = None
NotInherited = None
value__ = None
class InitializationEventAttribute(Attribute, _Attribute):
"""
Specifies which event is raised on initialization. This class cannot be inherited.
InitializationEventAttribute(eventName: str)
"""
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, eventName):
""" __new__(cls: type, eventName: str) """
pass
EventName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the initialization event.
Get: EventName(self: InitializationEventAttribute) -> str
"""
class INotifyDataErrorInfo:
# no doc
def GetErrors(self, propertyName):
""" GetErrors(self: INotifyDataErrorInfo, propertyName: str) -> IEnumerable """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
HasErrors = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get: HasErrors(self: INotifyDataErrorInfo) -> bool
"""
ErrorsChanged = None
class INotifyPropertyChanging:
""" Notifies clients that a property value is changing. """
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
PropertyChanging = None
class InstallerTypeAttribute(Attribute, _Attribute):
"""
Specifies the installer for a type that installs components.
InstallerTypeAttribute(installerType: Type)
InstallerTypeAttribute(typeName: str)
"""
def Equals(self, obj):
"""
Equals(self: InstallerTypeAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.InstallerTypeAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current;
otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: InstallerTypeAttribute) -> int
Returns the hashcode for this object.
Returns: A hash code for the current System.ComponentModel.InstallerTypeAttribute.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type, installerType: Type)
__new__(cls: type, typeName: str)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
InstallerType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the type of installer associated with this attribute.
Get: InstallerType(self: InstallerTypeAttribute) -> Type
"""
class InstanceCreationEditor(object):
""" Creates an instance of a particular type of property from a drop-down box within the System.Windows.Forms.PropertyGrid. """
def CreateInstance(self, context, instanceType):
"""
CreateInstance(self: InstanceCreationEditor, context: ITypeDescriptorContext, instanceType: Type) -> object
When overridden in a derived class, returns an instance of the specified type.
context: The context information.
instanceType: The specified type.
Returns: An instance of the specified type or null.
"""
pass
Text = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the specified text.
Get: Text(self: InstanceCreationEditor) -> str
"""
class Int16Converter(BaseNumberConverter):
"""
Provides a type converter to convert 16-bit signed integer objects to and from other representations.
Int16Converter()
"""
class Int32Converter(BaseNumberConverter):
"""
Provides a type converter to convert 32-bit signed integer objects to and from other representations.
Int32Converter()
"""
class Int64Converter(BaseNumberConverter):
"""
Provides a type converter to convert 64-bit signed integer objects to and from various other representations.
Int64Converter()
"""
class InvalidAsynchronousStateException(ArgumentException, ISerializable, _Exception):
"""
Thrown when a thread on which an operation should execute no longer exists or has no message loop.
InvalidAsynchronousStateException()
InvalidAsynchronousStateException(message: str)
InvalidAsynchronousStateException(message: str, innerException: Exception)
"""
def add_SerializeObjectState(self, *args): #cannot find CLR method
""" add_SerializeObjectState(self: Exception, value: EventHandler[SafeSerializationEventArgs]) """
pass
def remove_SerializeObjectState(self, *args): #cannot find CLR method
""" remove_SerializeObjectState(self: Exception, value: EventHandler[SafeSerializationEventArgs]) """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, message=None, innerException=None):
"""
__new__(cls: type)
__new__(cls: type, message: str)
__new__(cls: type, message: str, innerException: Exception)
__new__(cls: type, info: SerializationInfo, context: StreamingContext)
"""
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
class InvalidEnumArgumentException(ArgumentException, ISerializable, _Exception):
"""
The exception thrown when using invalid arguments that are enumerators.
InvalidEnumArgumentException()
InvalidEnumArgumentException(message: str)
InvalidEnumArgumentException(message: str, innerException: Exception)
InvalidEnumArgumentException(argumentName: str, invalidValue: int, enumClass: Type)
"""
def add_SerializeObjectState(self, *args): #cannot find CLR method
""" add_SerializeObjectState(self: Exception, value: EventHandler[SafeSerializationEventArgs]) """
pass
def remove_SerializeObjectState(self, *args): #cannot find CLR method
""" remove_SerializeObjectState(self: Exception, value: EventHandler[SafeSerializationEventArgs]) """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type)
__new__(cls: type, message: str)
__new__(cls: type, message: str, innerException: Exception)
__new__(cls: type, argumentName: str, invalidValue: int, enumClass: Type)
__new__(cls: type, info: SerializationInfo, context: StreamingContext)
"""
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
class IRevertibleChangeTracking(IChangeTracking):
""" Provides support for rolling back the changes """
def RejectChanges(self):
"""
RejectChanges(self: IRevertibleChangeTracking)
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
class ISupportInitialize:
""" Specifies that this object supports a simple, transacted notification for batch initialization. """
def BeginInit(self):
"""
BeginInit(self: ISupportInitialize)
Signals the object that initialization is starting.
"""
pass
def EndInit(self):
"""
EndInit(self: ISupportInitialize)
Signals the object that initialization is complete.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
class ISupportInitializeNotification(ISupportInitialize):
""" Allows coordination of initialization for a component and its dependent properties. """
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
IsInitialized = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the component is initialized.
Get: IsInitialized(self: ISupportInitializeNotification) -> bool
"""
Initialized = None
class ISynchronizeInvoke:
""" Provides a way to synchronously or asynchronously execute a delegate. """
def BeginInvoke(self, method, args):
"""
BeginInvoke(self: ISynchronizeInvoke, method: Delegate, args: Array[object]) -> IAsyncResult
Asynchronously executes the delegate on the thread that created this object.
method: A System.Delegate to a method that takes parameters of the same number and type
that are contained in args.
args: An array of type System.Object to pass as arguments to the given method. This
can be null if no arguments are needed.
Returns: An System.IAsyncResult interface that represents the asynchronous operation
started by calling this method.
"""
pass
def EndInvoke(self, result):
"""
EndInvoke(self: ISynchronizeInvoke, result: IAsyncResult) -> object
Waits until the process started by calling
System.ComponentModel.ISynchronizeInvoke.BeginInvoke(System.Delegate,System.Obje
ct[]) completes, and then returns the value generated by the process.
result: An System.IAsyncResult interface that represents the asynchronous operation
started by calling
System.ComponentModel.ISynchronizeInvoke.BeginInvoke(System.Delegate,System.Obje
ct[]).
Returns: An System.Object that represents the return value generated by the asynchronous
operation.
"""
pass
def Invoke(self, method, args):
"""
Invoke(self: ISynchronizeInvoke, method: Delegate, args: Array[object]) -> object
Synchronously executes the delegate on the thread that created this object and
marshals the call to the creating thread.
method: A System.Delegate that contains a method to call, in the context of the thread
for the control.
args: An array of type System.Object that represents the arguments to pass to the
given method. This can be null if no arguments are needed.
Returns: An System.Object that represents the return value from the delegate being
invoked, or null if the delegate has no return value.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
InvokeRequired = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the caller must call System.ComponentModel.ISynchronizeInvoke.Invoke(System.Delegate,System.Object[]) when calling an object that implements this interface.
Get: InvokeRequired(self: ISynchronizeInvoke) -> bool
"""
class ItemPropertyInfo(object):
"""
Contains information about a property.
ItemPropertyInfo(name: str, type: Type, descriptor: object)
"""
@staticmethod # known case of __new__
def __new__(self, name, type, descriptor):
""" __new__(cls: type, name: str, type: Type, descriptor: object) """
pass
Descriptor = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Get an object that contains additional information about the property.
Get: Descriptor(self: ItemPropertyInfo) -> object
"""
Name = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the property.
Get: Name(self: ItemPropertyInfo) -> str
"""
PropertyType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the type of the property.
Get: PropertyType(self: ItemPropertyInfo) -> Type
"""
class ITypeDescriptorContext(IServiceProvider):
""" Provides contextual information about a component, such as its container and property descriptor. """
def OnComponentChanged(self):
"""
OnComponentChanged(self: ITypeDescriptorContext)
Raises the
System.ComponentModel.Design.IComponentChangeService.ComponentChanged event.
"""
pass
def OnComponentChanging(self):
"""
OnComponentChanging(self: ITypeDescriptorContext) -> bool
Raises the
System.ComponentModel.Design.IComponentChangeService.ComponentChanging event.
Returns: true if this object can be changed; otherwise, false.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Container = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the container representing this System.ComponentModel.TypeDescriptor request.
Get: Container(self: ITypeDescriptorContext) -> IContainer
"""
Instance = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the object that is connected with this type descriptor request.
Get: Instance(self: ITypeDescriptorContext) -> object
"""
PropertyDescriptor = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the System.ComponentModel.PropertyDescriptor that is associated with the given context item.
Get: PropertyDescriptor(self: ITypeDescriptorContext) -> PropertyDescriptor
"""
class ITypedList:
""" Provides functionality to discover the schema for a bindable list, where the properties available for binding differ from the public properties of the object to bind to. """
def GetItemProperties(self, listAccessors):
"""
GetItemProperties(self: ITypedList, listAccessors: Array[PropertyDescriptor]) -> PropertyDescriptorCollection
Returns the System.ComponentModel.PropertyDescriptorCollection that represents
the properties on each item used to bind data.
listAccessors: An array of System.ComponentModel.PropertyDescriptor objects to find in the
collection as bindable. This can be null.
Returns: The System.ComponentModel.PropertyDescriptorCollection that represents the
properties on each item used to bind data.
"""
pass
def GetListName(self, listAccessors):
"""
GetListName(self: ITypedList, listAccessors: Array[PropertyDescriptor]) -> str
Returns the name of the list.
listAccessors: An array of System.ComponentModel.PropertyDescriptor objects, for which the
list name is returned. This can be null.
Returns: The name of the list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
class License(object, IDisposable):
""" Provides the abstract base class for all licenses. A license is granted to a specific instance of a component. """
def Dispose(self):
"""
Dispose(self: License)
When overridden in a derived class, disposes of the resources used by the
license.
"""
pass
def __enter__(self, *args): #cannot find CLR method
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args): #cannot find CLR method
""" __exit__(self: IDisposable, exc_type: object, exc_value: object, exc_back: object) """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __repr__(self, *args): #cannot find CLR method
""" __repr__(self: object) -> str """
pass
LicenseKey = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""When overridden in a derived class, gets the license key granted to this component.
Get: LicenseKey(self: License) -> str
"""
class LicenseContext(object, IServiceProvider):
"""
Specifies when you can use a licensed object and provides a way of obtaining additional services needed to support licenses running within its domain.
LicenseContext()
"""
def GetSavedLicenseKey(self, type, resourceAssembly):
"""
GetSavedLicenseKey(self: LicenseContext, type: Type, resourceAssembly: Assembly) -> str
When overridden in a derived class, returns a saved license key for the
specified type, from the specified resource assembly.
type: A System.Type that represents the type of component.
resourceAssembly: An System.Reflection.Assembly with the license key.
Returns: The System.ComponentModel.License.LicenseKey for the specified type. This
method returns null unless you override it.
"""
pass
def GetService(self, type):
"""
GetService(self: LicenseContext, type: Type) -> object
Gets the requested service, if it is available.
type: The type of service to retrieve.
Returns: An instance of the service, or null if the service cannot be found.
"""
pass
def SetSavedLicenseKey(self, type, key):
"""
SetSavedLicenseKey(self: LicenseContext, type: Type, key: str)
When overridden in a derived class, sets a license key for the specified type.
type: A System.Type that represents the component associated with the license key.
key: The System.ComponentModel.License.LicenseKey to save for the type of component.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __repr__(self, *args): #cannot find CLR method
""" __repr__(self: object) -> str """
pass
UsageMode = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""When overridden in a derived class, gets a value that specifies when you can use a license.
Get: UsageMode(self: LicenseContext) -> LicenseUsageMode
"""
class LicenseException(SystemException, ISerializable, _Exception):
"""
Represents the exception thrown when a component cannot be granted a license.
LicenseException(type: Type)
LicenseException(type: Type, instance: object)
LicenseException(type: Type, instance: object, message: str)
LicenseException(type: Type, instance: object, message: str, innerException: Exception)
"""
def add_SerializeObjectState(self, *args): #cannot find CLR method
""" add_SerializeObjectState(self: Exception, value: EventHandler[SafeSerializationEventArgs]) """
pass
def GetObjectData(self, info, context):
"""
GetObjectData(self: LicenseException, info: SerializationInfo, context: StreamingContext)
Sets the System.Runtime.Serialization.SerializationInfo with information about
the exception.
info: The System.Runtime.Serialization.SerializationInfo to be used for
deserialization.
context: The destination to be used for deserialization.
"""
pass
def remove_SerializeObjectState(self, *args): #cannot find CLR method
""" remove_SerializeObjectState(self: Exception, value: EventHandler[SafeSerializationEventArgs]) """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, type, instance=None, message=None, innerException=None):
"""
__new__(cls: type, type: Type)
__new__(cls: type, type: Type, instance: object)
__new__(cls: type, type: Type, instance: object, message: str)
__new__(cls: type, type: Type, instance: object, message: str, innerException: Exception)
__new__(cls: type, info: SerializationInfo, context: StreamingContext)
"""
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
LicensedType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the type of the component that was not granted a license.
Get: LicensedType(self: LicenseException) -> Type
"""
class LicenseManager(object):
""" Provides properties and methods to add a license to a component and to manage a System.ComponentModel.LicenseProvider. This class cannot be inherited. """
@staticmethod
def CreateWithContext(type, creationContext, args=None):
"""
CreateWithContext(type: Type, creationContext: LicenseContext, args: Array[object]) -> object
Creates an instance of the specified type with the specified arguments, given a
context in which you can use the licensed instance.
type: A System.Type that represents the type to create.
creationContext: A System.ComponentModel.LicenseContext that specifies when you can use the
licensed instance.
args: An array of type System.Object that represents the arguments for the type.
Returns: An instance of the specified type with the given array of arguments.
CreateWithContext(type: Type, creationContext: LicenseContext) -> object
Creates an instance of the specified type, given a context in which you can use
the licensed instance.
type: A System.Type that represents the type to create.
creationContext: A System.ComponentModel.LicenseContext that specifies when you can use the
licensed instance.
Returns: An instance of the specified type.
"""
pass
@staticmethod
def IsLicensed(type):
"""
IsLicensed(type: Type) -> bool
Returns whether the given type has a valid license.
type: The System.Type to find a valid license for.
Returns: true if the given type is licensed; otherwise, false.
"""
pass
@staticmethod
def IsValid(type, instance=None, license=None):
"""
IsValid(type: Type, instance: object) -> (bool, License)
Determines whether a valid license can be granted for the specified instance of
the type. This method creates a valid System.ComponentModel.License.
type: A System.Type that represents the type of object that requests the license.
instance: An object of the specified type or a type derived from the specified type.
Returns: true if a valid System.ComponentModel.License can be granted; otherwise, false.
IsValid(type: Type) -> bool
Determines whether a valid license can be granted for the specified type.
type: A System.Type that represents the type of object that requests the
System.ComponentModel.License.
Returns: true if a valid license can be granted; otherwise, false.
"""
pass
@staticmethod
def LockContext(contextUser):
"""
LockContext(contextUser: object)
Prevents changes being made to the current System.ComponentModel.LicenseContext
of the given object.
contextUser: The object whose current context you want to lock.
"""
pass
@staticmethod
def UnlockContext(contextUser):
"""
UnlockContext(contextUser: object)
Allows changes to be made to the current System.ComponentModel.LicenseContext
of the given object.
contextUser: The object whose current context you want to unlock.
"""
pass
@staticmethod
def Validate(type, instance=None):
"""
Validate(type: Type, instance: object) -> License
Determines whether a license can be granted for the instance of the specified
type.
type: A System.Type that represents the type of object that requests the license.
instance: An System.Object of the specified type or a type derived from the specified
type.
Returns: A valid System.ComponentModel.License.
Validate(type: Type)
Determines whether a license can be granted for the specified type.
type: A System.Type that represents the type of object that requests the license.
"""
pass
CurrentContext = None
UsageMode = None
class LicenseProvider(object):
""" Provides the abstract base class for implementing a license provider. """
def GetLicense(self, context, type, instance, allowExceptions):
"""
GetLicense(self: LicenseProvider, context: LicenseContext, type: Type, instance: object, allowExceptions: bool) -> License
When overridden in a derived class, gets a license for an instance or type of
component, when given a context and whether the denial of a license throws an
exception.
context: A System.ComponentModel.LicenseContext that specifies where you can use the
licensed object.
type: A System.Type that represents the component requesting the license.
instance: An object that is requesting the license.
allowExceptions: true if a System.ComponentModel.LicenseException should be thrown when the
component cannot be granted a license; otherwise, false.
Returns: A valid System.ComponentModel.License.
"""
pass
class LicenseProviderAttribute(Attribute, _Attribute):
"""
Specifies the System.ComponentModel.LicenseProvider to use with a class. This class cannot be inherited.
LicenseProviderAttribute()
LicenseProviderAttribute(typeName: str)
LicenseProviderAttribute(type: Type)
"""
def Equals(self, value):
"""
Equals(self: LicenseProviderAttribute, value: object) -> bool
Indicates whether this instance and a specified object are equal.
value: Another object to compare to.
Returns: true if value is equal to this instance; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: LicenseProviderAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current System.ComponentModel.LicenseProviderAttribute.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type)
__new__(cls: type, typeName: str)
__new__(cls: type, type: Type)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
LicenseProvider = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the license provider that must be used with the associated class.
Get: LicenseProvider(self: LicenseProviderAttribute) -> Type
"""
TypeId = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Indicates a unique ID for this attribute type.
Get: TypeId(self: LicenseProviderAttribute) -> object
"""
Default = None
class LicenseUsageMode(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies when the System.ComponentModel.License can be used.
enum LicenseUsageMode, values: Designtime (1), Runtime (0)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
Designtime = None
Runtime = None
value__ = None
class LicFileLicenseProvider(LicenseProvider):
"""
Provides an implementation of a System.ComponentModel.LicenseProvider. The provider works in a similar fashion to the Microsoft .NET Framework standard licensing model.
LicFileLicenseProvider()
"""
def GetKey(self, *args): #cannot find CLR method
"""
GetKey(self: LicFileLicenseProvider, type: Type) -> str
Returns a key for the specified type.
type: The object type to return the key.
Returns: A confirmation that the type parameter is licensed.
"""
pass
def GetLicense(self, context, type, instance, allowExceptions):
"""
GetLicense(self: LicFileLicenseProvider, context: LicenseContext, type: Type, instance: object, allowExceptions: bool) -> License
Returns a license for the instance of the component, if one is available.
context: A System.ComponentModel.LicenseContext that specifies where you can use the
licensed object.
type: A System.Type that represents the component requesting the
System.ComponentModel.License.
instance: An object that requests the System.ComponentModel.License.
allowExceptions: true if a System.ComponentModel.LicenseException should be thrown when a
component cannot be granted a license; otherwise, false.
Returns: A valid System.ComponentModel.License. If this method cannot find a valid
System.ComponentModel.License or a valid context parameter, it returns null.
"""
pass
def IsKeyValid(self, *args): #cannot find CLR method
"""
IsKeyValid(self: LicFileLicenseProvider, key: str, type: Type) -> bool
Determines whether the key that the
System.ComponentModel.LicFileLicenseProvider.GetLicense(System.ComponentModel.Li
censeContext,System.Type,System.Object,System.Boolean) method retrieves is
valid for the specified type.
key: The System.ComponentModel.License.LicenseKey to check.
type: A System.Type that represents the component requesting the
System.ComponentModel.License.
Returns: true if the key is a valid System.ComponentModel.License.LicenseKey for the
specified type; otherwise, false.
"""
pass
class ListBindableAttribute(Attribute, _Attribute):
"""
Specifies that a list can be used as a data source. A visual designer should use this attribute to determine whether to display a particular list in a data-binding picker. This class cannot be inherited.
ListBindableAttribute(listBindable: bool)
ListBindableAttribute(flags: BindableSupport)
"""
def Equals(self, obj):
"""
Equals(self: ListBindableAttribute, obj: object) -> bool
Returns whether the object passed is equal to this
System.ComponentModel.ListBindableAttribute.
obj: The object to test equality with.
Returns: true if the object passed is equal to this
System.ComponentModel.ListBindableAttribute; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: ListBindableAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current System.ComponentModel.ListBindableAttribute.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: ListBindableAttribute) -> bool
Returns whether System.ComponentModel.ListBindableAttribute.ListBindable is set
to the default value.
Returns: true if System.ComponentModel.ListBindableAttribute.ListBindable is set to the
default value; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type, listBindable: bool)
__new__(cls: type, flags: BindableSupport)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
ListBindable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets whether the list is bindable.
Get: ListBindable(self: ListBindableAttribute) -> bool
"""
Default = None
No = None
Yes = None
class ListChangedEventArgs(EventArgs):
"""
Provides data for the System.ComponentModel.IBindingList.ListChanged event.
ListChangedEventArgs(listChangedType: ListChangedType, newIndex: int)
ListChangedEventArgs(listChangedType: ListChangedType, newIndex: int, propDesc: PropertyDescriptor)
ListChangedEventArgs(listChangedType: ListChangedType, propDesc: PropertyDescriptor)
ListChangedEventArgs(listChangedType: ListChangedType, newIndex: int, oldIndex: int)
"""
@staticmethod # known case of __new__
def __new__(self, listChangedType, *__args):
"""
__new__(cls: type, listChangedType: ListChangedType, newIndex: int)
__new__(cls: type, listChangedType: ListChangedType, newIndex: int, propDesc: PropertyDescriptor)
__new__(cls: type, listChangedType: ListChangedType, propDesc: PropertyDescriptor)
__new__(cls: type, listChangedType: ListChangedType, newIndex: int, oldIndex: int)
"""
pass
ListChangedType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the type of change.
Get: ListChangedType(self: ListChangedEventArgs) -> ListChangedType
"""
NewIndex = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the index of the item affected by the change.
Get: NewIndex(self: ListChangedEventArgs) -> int
"""
OldIndex = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the old index of an item that has been moved.
Get: OldIndex(self: ListChangedEventArgs) -> int
"""
PropertyDescriptor = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the System.ComponentModel.PropertyDescriptor that was added, changed, or deleted.
Get: PropertyDescriptor(self: ListChangedEventArgs) -> PropertyDescriptor
"""
class ListChangedEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents the method that will handle the System.ComponentModel.IBindingList.ListChanged event of the System.ComponentModel.IBindingList class.
ListChangedEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, sender, e, callback, object):
""" BeginInvoke(self: ListChangedEventHandler, sender: object, e: ListChangedEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: ListChangedEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, sender, e):
""" Invoke(self: ListChangedEventHandler, sender: object, e: ListChangedEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class ListChangedType(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies how the list changed.
enum ListChangedType, values: ItemAdded (1), ItemChanged (4), ItemDeleted (2), ItemMoved (3), PropertyDescriptorAdded (5), PropertyDescriptorChanged (7), PropertyDescriptorDeleted (6), Reset (0)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
ItemAdded = None
ItemChanged = None
ItemDeleted = None
ItemMoved = None
PropertyDescriptorAdded = None
PropertyDescriptorChanged = None
PropertyDescriptorDeleted = None
Reset = None
value__ = None
class ListSortDescription(object):
"""
Provides a description of the sort operation applied to a data source.
ListSortDescription(property: PropertyDescriptor, direction: ListSortDirection)
"""
@staticmethod # known case of __new__
def __new__(self, property, direction):
""" __new__(cls: type, property: PropertyDescriptor, direction: ListSortDirection) """
pass
PropertyDescriptor = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the abstract description of a class property associated with this System.ComponentModel.ListSortDescription
Get: PropertyDescriptor(self: ListSortDescription) -> PropertyDescriptor
Set: PropertyDescriptor(self: ListSortDescription) = value
"""
SortDirection = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the direction of the sort operation associated with this System.ComponentModel.ListSortDescription.
Get: SortDirection(self: ListSortDescription) -> ListSortDirection
Set: SortDirection(self: ListSortDescription) = value
"""
class ListSortDescriptionCollection(object, IList, ICollection, IEnumerable):
"""
Represents a collection of System.ComponentModel.ListSortDescription objects.
ListSortDescriptionCollection()
ListSortDescriptionCollection(sorts: Array[ListSortDescription])
"""
def Contains(self, value):
"""
Contains(self: ListSortDescriptionCollection, value: object) -> bool
Determines if the System.ComponentModel.ListSortDescriptionCollection contains
a specific value.
value: The System.Object to locate in the collection.
Returns: true if the System.Object is found in the collection; otherwise, false.
"""
pass
def CopyTo(self, array, index):
"""
CopyTo(self: ListSortDescriptionCollection, array: Array, index: int)
Copies the contents of the collection to the specified array, starting at the
specified destination array index.
array: The destination array for the items copied from the collection.
index: The index of the destination array at which copying begins.
"""
pass
def IndexOf(self, value):
"""
IndexOf(self: ListSortDescriptionCollection, value: object) -> int
Returns the index of the specified item in the collection.
value: The System.Object to locate in the collection.
Returns: The index of value if found in the list; otherwise, -1.
"""
pass
def __contains__(self, *args): #cannot find CLR method
"""
__contains__(self: IList, value: object) -> bool
Determines whether the System.Collections.IList contains a specific value.
value: The object to locate in the System.Collections.IList.
Returns: true if the System.Object is found in the System.Collections.IList; otherwise,
false.
"""
pass
def __getitem__(self, *args): #cannot find CLR method
""" x.__getitem__(y) <==> x[y] """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __iter__(self, *args): #cannot find CLR method
""" __iter__(self: IEnumerable) -> object """
pass
def __len__(self, *args): #cannot find CLR method
""" x.__len__() <==> len(x) """
pass
@staticmethod # known case of __new__
def __new__(self, sorts=None):
"""
__new__(cls: type)
__new__(cls: type, sorts: Array[ListSortDescription])
"""
pass
def __repr__(self, *args): #cannot find CLR method
""" __repr__(self: object) -> str """
pass
def __setitem__(self, *args): #cannot find CLR method
""" x.__setitem__(i, y) <==> x[i]= """
pass
Count = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the number of items in the collection.
Get: Count(self: ListSortDescriptionCollection) -> int
"""
class ListSortDirection(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies the direction of a sort operation.
enum ListSortDirection, values: Ascending (0), Descending (1)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
Ascending = None
Descending = None
value__ = None
class LocalizableAttribute(Attribute, _Attribute):
"""
Specifies whether a property should be localized. This class cannot be inherited.
LocalizableAttribute(isLocalizable: bool)
"""
def Equals(self, obj):
"""
Equals(self: LocalizableAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.LocalizableAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current;
otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: LocalizableAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current System.ComponentModel.LocalizableAttribute.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: LocalizableAttribute) -> bool
Determines if this attribute is the default.
Returns: true if the attribute is the default value for this attribute class; otherwise,
false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, isLocalizable):
""" __new__(cls: type, isLocalizable: bool) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
IsLocalizable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether a property should be localized.
Get: IsLocalizable(self: LocalizableAttribute) -> bool
"""
Default = None
No = None
Yes = None
class LookupBindingPropertiesAttribute(Attribute, _Attribute):
"""
Specifies the properties that support lookup-based binding. This class cannot be inherited.
LookupBindingPropertiesAttribute()
LookupBindingPropertiesAttribute(dataSource: str, displayMember: str, valueMember: str, lookupMember: str)
"""
def Equals(self, obj):
"""
Equals(self: LookupBindingPropertiesAttribute, obj: object) -> bool
Determines whether the specified System.Object is equal to the current
System.ComponentModel.LookupBindingPropertiesAttribute instance.
obj: The System.Object to compare with the current
System.ComponentModel.LookupBindingPropertiesAttribute instance
Returns: true if the object is equal to the current instance; otherwise, false,
indicating they are not equal.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: LookupBindingPropertiesAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current
System.ComponentModel.LookupBindingPropertiesAttribute.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, dataSource=None, displayMember=None, valueMember=None, lookupMember=None):
"""
__new__(cls: type)
__new__(cls: type, dataSource: str, displayMember: str, valueMember: str, lookupMember: str)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
DataSource = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the data source property for the component to which the System.ComponentModel.LookupBindingPropertiesAttribute is bound.
Get: DataSource(self: LookupBindingPropertiesAttribute) -> str
"""
DisplayMember = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the display member property for the component to which the System.ComponentModel.LookupBindingPropertiesAttribute is bound.
Get: DisplayMember(self: LookupBindingPropertiesAttribute) -> str
"""
LookupMember = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the lookup member for the component to which this attribute is bound.
Get: LookupMember(self: LookupBindingPropertiesAttribute) -> str
"""
ValueMember = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the value member property for the component to which the System.ComponentModel.LookupBindingPropertiesAttribute is bound.
Get: ValueMember(self: LookupBindingPropertiesAttribute) -> str
"""
Default = None
class MarshalByValueComponent(object, IComponent, IDisposable, IServiceProvider):
"""
Implements System.ComponentModel.IComponent and provides the base implementation for remotable components that are marshaled by value (a copy of the serialized object is passed).
MarshalByValueComponent()
"""
def Dispose(self):
"""
Dispose(self: MarshalByValueComponent)
Releases all resources used by the
System.ComponentModel.MarshalByValueComponent.
"""
pass
def GetService(self, service):
"""
GetService(self: MarshalByValueComponent, service: Type) -> object
Gets the implementer of the System.IServiceProvider.
service: A System.Type that represents the type of service you want.
Returns: An System.Object that represents the implementer of the System.IServiceProvider.
"""
pass
def ToString(self):
"""
ToString(self: MarshalByValueComponent) -> str
Returns a System.String containing the name of the
System.ComponentModel.Component, if any. This method should not be overridden.
Returns: A System.String containing the name of the System.ComponentModel.Component, if
any.null if the System.ComponentModel.Component is unnamed.
"""
pass
def __enter__(self, *args): #cannot find CLR method
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args): #cannot find CLR method
""" __exit__(self: IDisposable, exc_type: object, exc_value: object, exc_back: object) """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __repr__(self, *args): #cannot find CLR method
""" __repr__(self: object) -> str """
pass
def __str__(self, *args): #cannot find CLR method
pass
Container = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the container for the component.
Get: Container(self: MarshalByValueComponent) -> IContainer
"""
DesignMode = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the component is currently in design mode.
Get: DesignMode(self: MarshalByValueComponent) -> bool
"""
Events = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the list of event handlers that are attached to this component.
"""
Site = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the site of the component.
Get: Site(self: MarshalByValueComponent) -> ISite
Set: Site(self: MarshalByValueComponent) = value
"""
Disposed = None
class MaskedTextProvider(object, ICloneable):
"""
Represents a mask-parsing service that can be used by any number of controls that support masking, such as the System.Windows.Forms.MaskedTextBox control.
MaskedTextProvider(mask: str)
MaskedTextProvider(mask: str, restrictToAscii: bool)
MaskedTextProvider(mask: str, culture: CultureInfo)
MaskedTextProvider(mask: str, culture: CultureInfo, restrictToAscii: bool)
MaskedTextProvider(mask: str, passwordChar: Char, allowPromptAsInput: bool)
MaskedTextProvider(mask: str, culture: CultureInfo, passwordChar: Char, allowPromptAsInput: bool)
MaskedTextProvider(mask: str, culture: CultureInfo, allowPromptAsInput: bool, promptChar: Char, passwordChar: Char, restrictToAscii: bool)
"""
def Add(self, input, testPosition=None, resultHint=None):
"""
Add(self: MaskedTextProvider, input: str) -> bool
Adds the characters in the specified input string to the end of the formatted
string.
input: A System.String containing character values to be appended to the formatted
string.
Returns: true if all the characters from the input string were added successfully;
otherwise false to indicate that no characters were added.
Add(self: MaskedTextProvider, input: str) -> (bool, int, MaskedTextResultHint)
Adds the characters in the specified input string to the end of the formatted
string, and then outputs position and descriptive information.
input: A System.String containing character values to be appended to the formatted
string.
Returns: true if all the characters from the input string were added successfully;
otherwise false to indicate that no characters were added.
Add(self: MaskedTextProvider, input: Char) -> bool
Adds the specified input character to the end of the formatted string.
input: A System.Char value to be appended to the formatted string.
Returns: true if the input character was added successfully; otherwise false.
Add(self: MaskedTextProvider, input: Char) -> (bool, int, MaskedTextResultHint)
Adds the specified input character to the end of the formatted string, and then
outputs position and descriptive information.
input: A System.Char value to be appended to the formatted string.
Returns: true if the input character was added successfully; otherwise false.
"""
pass
def Clear(self, resultHint=None):
"""
Clear(self: MaskedTextProvider) -> MaskedTextResultHint
Clears all the editable input characters from the formatted string, replacing
them with prompt characters, and then outputs descriptive information.
Clear(self: MaskedTextProvider)
Clears all the editable input characters from the formatted string, replacing
them with prompt characters.
"""
pass
def Clone(self):
"""
Clone(self: MaskedTextProvider) -> object
Creates a copy of the current System.ComponentModel.MaskedTextProvider.
Returns: The System.ComponentModel.MaskedTextProvider object this method creates, cast
as an object.
"""
pass
def FindAssignedEditPositionFrom(self, position, direction):
"""
FindAssignedEditPositionFrom(self: MaskedTextProvider, position: int, direction: bool) -> int
Returns the position of the first assigned editable position after the
specified position using the specified search direction.
position: The zero-based position in the formatted string to start the search.
direction: A System.Boolean indicating the search direction; either true to search forward
or false to search backward.
Returns: If successful, an System.Int32 representing the zero-based position of the
first assigned editable position encountered; otherwise
System.ComponentModel.MaskedTextProvider.InvalidIndex.
"""
pass
def FindAssignedEditPositionInRange(self, startPosition, endPosition, direction):
"""
FindAssignedEditPositionInRange(self: MaskedTextProvider, startPosition: int, endPosition: int, direction: bool) -> int
Returns the position of the first assigned editable position between the
specified positions using the specified search direction.
startPosition: The zero-based position in the formatted string where the search starts.
endPosition: The zero-based position in the formatted string where the search ends.
direction: A System.Boolean indicating the search direction; either true to search forward
or false to search backward.
Returns: If successful, an System.Int32 representing the zero-based position of the
first assigned editable position encountered; otherwise
System.ComponentModel.MaskedTextProvider.InvalidIndex.
"""
pass
def FindEditPositionFrom(self, position, direction):
"""
FindEditPositionFrom(self: MaskedTextProvider, position: int, direction: bool) -> int
Returns the position of the first editable position after the specified
position using the specified search direction.
position: The zero-based position in the formatted string to start the search.
direction: A System.Boolean indicating the search direction; either true to search forward
or false to search backward.
Returns: If successful, an System.Int32 representing the zero-based position of the
first editable position encountered; otherwise
System.ComponentModel.MaskedTextProvider.InvalidIndex.
"""
pass
def FindEditPositionInRange(self, startPosition, endPosition, direction):
"""
FindEditPositionInRange(self: MaskedTextProvider, startPosition: int, endPosition: int, direction: bool) -> int
Returns the position of the first editable position between the specified
positions using the specified search direction.
startPosition: The zero-based position in the formatted string where the search starts.
endPosition: The zero-based position in the formatted string where the search ends.
direction: A System.Boolean indicating the search direction; either true to search forward
or false to search backward.
Returns: If successful, an System.Int32 representing the zero-based position of the
first editable position encountered; otherwise
System.ComponentModel.MaskedTextProvider.InvalidIndex.
"""
pass
def FindNonEditPositionFrom(self, position, direction):
"""
FindNonEditPositionFrom(self: MaskedTextProvider, position: int, direction: bool) -> int
Returns the position of the first non-editable position after the specified
position using the specified search direction.
position: The zero-based position in the formatted string to start the search.
direction: A System.Boolean indicating the search direction; either true to search forward
or false to search backward.
Returns: If successful, an System.Int32 representing the zero-based position of the
first literal position encountered; otherwise
System.ComponentModel.MaskedTextProvider.InvalidIndex.
"""
pass
def FindNonEditPositionInRange(self, startPosition, endPosition, direction):
"""
FindNonEditPositionInRange(self: MaskedTextProvider, startPosition: int, endPosition: int, direction: bool) -> int
Returns the position of the first non-editable position between the specified
positions using the specified search direction.
startPosition: The zero-based position in the formatted string where the search starts.
endPosition: The zero-based position in the formatted string where the search ends.
direction: A System.Boolean indicating the search direction; either true to search forward
or false to search backward.
Returns: If successful, an System.Int32 representing the zero-based position of the
first literal position encountered; otherwise
System.ComponentModel.MaskedTextProvider.InvalidIndex.
"""
pass
def FindUnassignedEditPositionFrom(self, position, direction):
"""
FindUnassignedEditPositionFrom(self: MaskedTextProvider, position: int, direction: bool) -> int
Returns the position of the first unassigned editable position after the
specified position using the specified search direction.
position: The zero-based position in the formatted string to start the search.
direction: A System.Boolean indicating the search direction; either true to search forward
or false to search backward.
Returns: If successful, an System.Int32 representing the zero-based position of the
first unassigned editable position encountered; otherwise
System.ComponentModel.MaskedTextProvider.InvalidIndex.
"""
pass
def FindUnassignedEditPositionInRange(self, startPosition, endPosition, direction):
"""
FindUnassignedEditPositionInRange(self: MaskedTextProvider, startPosition: int, endPosition: int, direction: bool) -> int
Returns the position of the first unassigned editable position between the
specified positions using the specified search direction.
startPosition: The zero-based position in the formatted string where the search starts.
endPosition: The zero-based position in the formatted string where the search ends.
direction: A System.Boolean indicating the search direction; either true to search forward
or false to search backward.
Returns: If successful, an System.Int32 representing the zero-based position of the
first unassigned editable position encountered; otherwise
System.ComponentModel.MaskedTextProvider.InvalidIndex.
"""
pass
@staticmethod
def GetOperationResultFromHint(hint):
"""
GetOperationResultFromHint(hint: MaskedTextResultHint) -> bool
Determines whether the specified System.ComponentModel.MaskedTextResultHint
denotes success or failure.
hint: A System.ComponentModel.MaskedTextResultHint value typically obtained as an
output parameter from a previous operation.
Returns: true if the specified System.ComponentModel.MaskedTextResultHint value
represents a success; otherwise, false if it represents failure.
"""
pass
def InsertAt(self, input, position, testPosition=None, resultHint=None):
"""
InsertAt(self: MaskedTextProvider, input: str, position: int) -> bool
Inserts the specified string at a specified position within the formatted
string.
input: The System.String to be inserted.
position: The zero-based position in the formatted string to insert the input string.
Returns: true if the insertion was successful; otherwise, false.
InsertAt(self: MaskedTextProvider, input: str, position: int) -> (bool, int, MaskedTextResultHint)
Inserts the specified string at a specified position within the formatted
string, returning the last insertion position and the status of the operation.
input: The System.String to be inserted.
position: The zero-based position in the formatted string to insert the input string.
Returns: true if the insertion was successful; otherwise, false.
InsertAt(self: MaskedTextProvider, input: Char, position: int) -> bool
Inserts the specified character at the specified position within the formatted
string.
input: The System.Char to be inserted.
position: The zero-based position in the formatted string to insert the character.
Returns: true if the insertion was successful; otherwise, false.
InsertAt(self: MaskedTextProvider, input: Char, position: int) -> (bool, int, MaskedTextResultHint)
Inserts the specified character at the specified position within the formatted
string, returning the last insertion position and the status of the operation.
input: The System.Char to be inserted.
position: The zero-based position in the formatted string to insert the character.
Returns: true if the insertion was successful; otherwise, false.
"""
pass
def IsAvailablePosition(self, position):
"""
IsAvailablePosition(self: MaskedTextProvider, position: int) -> bool
Determines whether the specified position is available for assignment.
position: The zero-based position in the mask to test.
Returns: true if the specified position in the formatted string is editable and has not
been assigned to yet; otherwise false.
"""
pass
def IsEditPosition(self, position):
"""
IsEditPosition(self: MaskedTextProvider, position: int) -> bool
Determines whether the specified position is editable.
position: The zero-based position in the mask to test.
Returns: true if the specified position in the formatted string is editable; otherwise
false.
"""
pass
@staticmethod
def IsValidInputChar(c):
"""
IsValidInputChar(c: Char) -> bool
Determines whether the specified character is a valid input character.
c: The System.Char value to test.
Returns: true if the specified character contains a valid input value; otherwise false.
"""
pass
@staticmethod
def IsValidMaskChar(c):
"""
IsValidMaskChar(c: Char) -> bool
Determines whether the specified character is a valid mask character.
c: The System.Char value to test.
Returns: true if the specified character contains a valid mask value; otherwise false.
"""
pass
@staticmethod
def IsValidPasswordChar(c):
"""
IsValidPasswordChar(c: Char) -> bool
Determines whether the specified character is a valid password character.
c: The System.Char value to test.
Returns: true if the specified character contains a valid password value; otherwise
false.
"""
pass
def Remove(self, testPosition=None, resultHint=None):
"""
Remove(self: MaskedTextProvider) -> (bool, int, MaskedTextResultHint)
Removes the last assigned character from the formatted string, and then outputs
the removal position and descriptive information.
Returns: true if the character was successfully removed; otherwise, false.
Remove(self: MaskedTextProvider) -> bool
Removes the last assigned character from the formatted string.
Returns: true if the character was successfully removed; otherwise, false.
"""
pass
def RemoveAt(self, *__args):
"""
RemoveAt(self: MaskedTextProvider, startPosition: int, endPosition: int) -> (bool, int, MaskedTextResultHint)
Removes the assigned characters between the specified positions from the
formatted string, and then outputs the removal position and descriptive
information.
startPosition: The zero-based index of the first assigned character to remove.
endPosition: The zero-based index of the last assigned character to remove.
Returns: true if the character was successfully removed; otherwise, false.
RemoveAt(self: MaskedTextProvider, startPosition: int, endPosition: int) -> bool
Removes the assigned characters between the specified positions from the
formatted string.
startPosition: The zero-based index of the first assigned character to remove.
endPosition: The zero-based index of the last assigned character to remove.
Returns: true if the character was successfully removed; otherwise, false.
RemoveAt(self: MaskedTextProvider, position: int) -> bool
Removes the assigned character at the specified position from the formatted
string.
position: The zero-based position of the assigned character to remove.
Returns: true if the character was successfully removed; otherwise, false.
"""
pass
def Replace(self, input, *__args):
"""
Replace(self: MaskedTextProvider, input: str, position: int) -> bool
Replaces a range of editable characters starting at the specified position with
the specified string.
input: The System.String value used to replace the existing editable characters.
position: The zero-based position to search for the first editable character to replace.
Returns: true if all the characters were successfully replaced; otherwise, false.
Replace(self: MaskedTextProvider, input: str, position: int) -> (bool, int, MaskedTextResultHint)
Replaces a range of editable characters starting at the specified position with
the specified string, and then outputs the removal position and descriptive
information.
input: The System.String value used to replace the existing editable characters.
position: The zero-based position to search for the first editable character to replace.
Returns: true if all the characters were successfully replaced; otherwise, false.
Replace(self: MaskedTextProvider, input: str, startPosition: int, endPosition: int) -> (bool, int, MaskedTextResultHint)
Replaces a range of editable characters between the specified starting and
ending positions with the specified string, and then outputs the removal
position and descriptive information.
input: The System.String value used to replace the existing editable characters.
startPosition: The zero-based position in the formatted string where the replacement starts.
endPosition: The zero-based position in the formatted string where the replacement ends.
Returns: true if all the characters were successfully replaced; otherwise, false.
Replace(self: MaskedTextProvider, input: Char, position: int) -> bool
Replaces a single character at or beyond the specified position with the
specified character value.
input: The System.Char value that replaces the existing value.
position: The zero-based position to search for the first editable character to replace.
Returns: true if the character was successfully replaced; otherwise, false.
Replace(self: MaskedTextProvider, input: Char, position: int) -> (bool, int, MaskedTextResultHint)
Replaces a single character at or beyond the specified position with the
specified character value, and then outputs the removal position and
descriptive information.
input: The System.Char value that replaces the existing value.
position: The zero-based position to search for the first editable character to replace.
Returns: true if the character was successfully replaced; otherwise, false.
Replace(self: MaskedTextProvider, input: Char, startPosition: int, endPosition: int) -> (bool, int, MaskedTextResultHint)
Replaces a single character between the specified starting and ending positions
with the specified character value, and then outputs the removal position and
descriptive information.
input: The System.Char value that replaces the existing value.
startPosition: The zero-based position in the formatted string where the replacement starts.
endPosition: The zero-based position in the formatted string where the replacement ends.
Returns: true if the character was successfully replaced; otherwise, false.
"""
pass
def Set(self, input, testPosition=None, resultHint=None):
"""
Set(self: MaskedTextProvider, input: str) -> (bool, int, MaskedTextResultHint)
Sets the formatted string to the specified input string, and then outputs the
removal position and descriptive information.
input: The System.String value used to set the formatted string.
Returns: true if all the characters were successfully set; otherwise, false.
Set(self: MaskedTextProvider, input: str) -> bool
Sets the formatted string to the specified input string.
input: The System.String value used to set the formatted string.
Returns: true if all the characters were successfully set; otherwise, false.
"""
pass
def ToDisplayString(self):
"""
ToDisplayString(self: MaskedTextProvider) -> str
Returns the formatted string in a displayable form.
Returns: The formatted System.String that includes prompts and mask literals.
"""
pass
def ToString(self, *__args):
"""
ToString(self: MaskedTextProvider, includePrompt: bool, includeLiterals: bool) -> str
Returns the formatted string, optionally including prompt and literal
characters.
includePrompt: true to include prompt characters in the return string; otherwise, false.
includeLiterals: true to include literal characters in the return string; otherwise, false.
Returns: The formatted System.String that includes all the assigned character values and
optionally includes literals and prompts.
ToString(self: MaskedTextProvider, includePrompt: bool, includeLiterals: bool, startPosition: int, length: int) -> str
Returns a substring of the formatted string, optionally including prompt and
literal characters.
includePrompt: true to include prompt characters in the return string; otherwise, false.
includeLiterals: true to include literal characters in the return string; otherwise, false.
startPosition: The zero-based position in the formatted string where the output begins.
length: The number of characters to return.
Returns: If successful, a substring of the formatted System.String, which includes all
the assigned character values and optionally includes literals and prompts;
otherwise the System.String.Empty string.
ToString(self: MaskedTextProvider, ignorePasswordChar: bool, includePrompt: bool, includeLiterals: bool, startPosition: int, length: int) -> str
Returns a substring of the formatted string, optionally including prompt,
literal, and password characters.
ignorePasswordChar: true to return the actual editable characters; otherwise, false to indicate
that the System.ComponentModel.MaskedTextProvider.PasswordChar property is to
be honored.
includePrompt: true to include prompt characters in the return string; otherwise, false.
includeLiterals: true to return literal characters in the return string; otherwise, false.
startPosition: The zero-based position in the formatted string where the output begins.
length: The number of characters to return.
Returns: If successful, a substring of the formatted System.String, which includes all
the assigned character values and optionally includes literals, prompts, and
password characters; otherwise the System.String.Empty string.
ToString(self: MaskedTextProvider, ignorePasswordChar: bool, startPosition: int, length: int) -> str
Returns a substring of the formatted string, optionally including password
characters.
ignorePasswordChar: true to return the actual editable characters; otherwise, false to indicate
that the System.ComponentModel.MaskedTextProvider.PasswordChar property is to
be honored.
startPosition: The zero-based position in the formatted string where the output begins.
length: The number of characters to return.
Returns: If successful, a substring of the formatted System.String, which includes
literals, prompts, and optionally password characters; otherwise the
System.String.Empty string.
ToString(self: MaskedTextProvider) -> str
Returns the formatted string that includes all the assigned character values.
Returns: The formatted System.String that includes all the assigned character values.
ToString(self: MaskedTextProvider, ignorePasswordChar: bool) -> str
Returns the formatted string, optionally including password characters.
ignorePasswordChar: true to return the actual editable characters; otherwise, false to indicate
that the System.ComponentModel.MaskedTextProvider.PasswordChar property is to
be honored.
Returns: The formatted System.String that includes literals, prompts, and optionally
password characters.
ToString(self: MaskedTextProvider, startPosition: int, length: int) -> str
Returns a substring of the formatted string.
startPosition: The zero-based position in the formatted string where the output begins.
length: The number of characters to return.
Returns: If successful, a substring of the formatted System.String, which includes all
the assigned character values; otherwise the System.String.Empty string.
"""
pass
def VerifyChar(self, input, position, hint):
"""
VerifyChar(self: MaskedTextProvider, input: Char, position: int) -> (bool, MaskedTextResultHint)
Tests whether the specified character could be set successfully at the
specified position.
input: The System.Char value to test.
position: The position in the mask to test the input character against.
Returns: true if the specified character is valid for the specified position; otherwise,
false.
"""
pass
def VerifyEscapeChar(self, input, position):
"""
VerifyEscapeChar(self: MaskedTextProvider, input: Char, position: int) -> bool
Tests whether the specified character would be escaped at the specified
position.
input: The System.Char value to test.
position: The position in the mask to test the input character against.
Returns: true if the specified character would be escaped at the specified position;
otherwise, false.
"""
pass
def VerifyString(self, input, testPosition=None, resultHint=None):
"""
VerifyString(self: MaskedTextProvider, input: str) -> (bool, int, MaskedTextResultHint)
Tests whether the specified string could be set successfully, and then outputs
position and descriptive information.
input: The System.String value to test.
Returns: true if the specified string represents valid input; otherwise, false.
VerifyString(self: MaskedTextProvider, input: str) -> bool
Tests whether the specified string could be set successfully.
input: The System.String value to test.
Returns: true if the specified string represents valid input; otherwise, false.
"""
pass
def __add__(self, *args): #cannot find CLR method
""" x.__add__(y) <==> x+yx.__add__(y) <==> x+yx.__add__(y) <==> x+yx.__add__(y) <==> x+y """
pass
def __getitem__(self, *args): #cannot find CLR method
""" x.__getitem__(y) <==> x[y] """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, mask, *__args):
"""
__new__(cls: type, mask: str)
__new__(cls: type, mask: str, restrictToAscii: bool)
__new__(cls: type, mask: str, culture: CultureInfo)
__new__(cls: type, mask: str, culture: CultureInfo, restrictToAscii: bool)
__new__(cls: type, mask: str, passwordChar: Char, allowPromptAsInput: bool)
__new__(cls: type, mask: str, culture: CultureInfo, passwordChar: Char, allowPromptAsInput: bool)
__new__(cls: type, mask: str, culture: CultureInfo, allowPromptAsInput: bool, promptChar: Char, passwordChar: Char, restrictToAscii: bool)
"""
pass
def __repr__(self, *args): #cannot find CLR method
""" __repr__(self: object) -> str """
pass
def __str__(self, *args): #cannot find CLR method
pass
AllowPromptAsInput = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the prompt character should be treated as a valid input character or not.
Get: AllowPromptAsInput(self: MaskedTextProvider) -> bool
"""
AsciiOnly = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the mask accepts characters outside of the ASCII character set.
Get: AsciiOnly(self: MaskedTextProvider) -> bool
"""
AssignedEditPositionCount = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the number of editable character positions that have already been successfully assigned an input value.
Get: AssignedEditPositionCount(self: MaskedTextProvider) -> int
"""
AvailableEditPositionCount = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the number of editable character positions in the input mask that have not yet been assigned an input value.
Get: AvailableEditPositionCount(self: MaskedTextProvider) -> int
"""
Culture = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the culture that determines the value of the localizable separators and placeholders in the input mask.
Get: Culture(self: MaskedTextProvider) -> CultureInfo
"""
EditPositionCount = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the number of editable positions in the formatted string.
Get: EditPositionCount(self: MaskedTextProvider) -> int
"""
EditPositions = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a newly created enumerator for the editable positions in the formatted string.
Get: EditPositions(self: MaskedTextProvider) -> IEnumerator
"""
IncludeLiterals = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value that indicates whether literal characters in the input mask should be included in the formatted string.
Get: IncludeLiterals(self: MaskedTextProvider) -> bool
Set: IncludeLiterals(self: MaskedTextProvider) = value
"""
IncludePrompt = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value indicating whether System.Windows.Forms.MaskedTextBox.PromptChar is used to represent the absence of user input when displaying the formatted string.
Get: IncludePrompt(self: MaskedTextProvider) -> bool
Set: IncludePrompt(self: MaskedTextProvider) = value
"""
IsPassword = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value that determines whether password protection should be applied to the formatted string.
Get: IsPassword(self: MaskedTextProvider) -> bool
Set: IsPassword(self: MaskedTextProvider) = value
"""
LastAssignedPosition = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the index in the mask of the rightmost input character that has been assigned to the mask.
Get: LastAssignedPosition(self: MaskedTextProvider) -> int
"""
Length = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the length of the mask, absent any mask modifier characters.
Get: Length(self: MaskedTextProvider) -> int
"""
Mask = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the input mask.
Get: Mask(self: MaskedTextProvider) -> str
"""
MaskCompleted = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether all required inputs have been entered into the formatted string.
Get: MaskCompleted(self: MaskedTextProvider) -> bool
"""
MaskFull = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether all required and optional inputs have been entered into the formatted string.
Get: MaskFull(self: MaskedTextProvider) -> bool
"""
PasswordChar = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the character to be substituted for the actual input characters.
Get: PasswordChar(self: MaskedTextProvider) -> Char
Set: PasswordChar(self: MaskedTextProvider) = value
"""
PromptChar = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the character used to represent the absence of user input for all available edit positions.
Get: PromptChar(self: MaskedTextProvider) -> Char
Set: PromptChar(self: MaskedTextProvider) = value
"""
ResetOnPrompt = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value that determines how an input character that matches the prompt character should be handled.
Get: ResetOnPrompt(self: MaskedTextProvider) -> bool
Set: ResetOnPrompt(self: MaskedTextProvider) = value
"""
ResetOnSpace = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value that determines how a space input character should be handled.
Get: ResetOnSpace(self: MaskedTextProvider) -> bool
Set: ResetOnSpace(self: MaskedTextProvider) = value
"""
SkipLiterals = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value indicating whether literal character positions in the mask can be overwritten by their same values.
Get: SkipLiterals(self: MaskedTextProvider) -> bool
Set: SkipLiterals(self: MaskedTextProvider) = value
"""
DefaultPasswordChar = None
InvalidIndex = -1
class MaskedTextResultHint(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies values that succinctly describe the results of a masked text parsing operation.
enum MaskedTextResultHint, values: AlphanumericCharacterExpected (-2), AsciiCharacterExpected (-1), CharacterEscaped (1), DigitExpected (-3), InvalidInput (-51), LetterExpected (-4), NoEffect (2), NonEditPosition (-54), PositionOutOfRange (-55), PromptCharNotAllowed (-52), SideEffect (3), SignedDigitExpected (-5), Success (4), UnavailableEditPosition (-53), Unknown (0)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
AlphanumericCharacterExpected = None
AsciiCharacterExpected = None
CharacterEscaped = None
DigitExpected = None
InvalidInput = None
LetterExpected = None
NoEffect = None
NonEditPosition = None
PositionOutOfRange = None
PromptCharNotAllowed = None
SideEffect = None
SignedDigitExpected = None
Success = None
UnavailableEditPosition = None
Unknown = None
value__ = None
class MergablePropertyAttribute(Attribute, _Attribute):
"""
Specifies that this property can be combined with properties belonging to other objects in a Properties window.
MergablePropertyAttribute(allowMerge: bool)
"""
def Equals(self, obj):
"""
Equals(self: MergablePropertyAttribute, obj: object) -> bool
Indicates whether this instance and a specified object are equal.
obj: Another object to compare to.
Returns: true if obj is equal to this instance; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: MergablePropertyAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current System.ComponentModel.MergablePropertyAttribute.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: MergablePropertyAttribute) -> bool
Determines if this attribute is the default.
Returns: true if the attribute is the default value for this attribute class; otherwise,
false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, allowMerge):
""" __new__(cls: type, allowMerge: bool) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
AllowMerge = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether this property can be combined with properties belonging to other objects in a Properties window.
Get: AllowMerge(self: MergablePropertyAttribute) -> bool
"""
Default = None
No = None
Yes = None
class MultilineStringConverter(TypeConverter):
"""
Provides a type converter to convert multiline strings to a simple string.
MultilineStringConverter()
"""
def ConvertTo(self, *__args):
"""
ConvertTo(self: MultilineStringConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given value object to the specified type, using the specified
context and culture information.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: A System.Globalization.CultureInfo. If null is passed, the current culture is
assumed.
value: The System.Object to convert.
destinationType: The System.Type to convert the value parameter to.
Returns: An System.Object that represents the converted value.
"""
pass
def GetProperties(self, *__args):
"""
GetProperties(self: MultilineStringConverter, context: ITypeDescriptorContext, value: object, attributes: Array[Attribute]) -> PropertyDescriptorCollection
Returns a collection of properties for the type of array specified by the value
parameter, using the specified context and attributes.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: An System.Object that specifies the type of array for which to get properties.
attributes: An array of type System.Attribute that is used as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
are exposed for this data type, or null if there are no properties.
"""
pass
def GetPropertiesSupported(self, context=None):
"""
GetPropertiesSupported(self: MultilineStringConverter, context: ITypeDescriptorContext) -> bool
Returns whether this object supports properties, using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true if erload:System.ComponentModel.MultilineStringConverter.GetProperties
should be called to find the properties of this object; otherwise, false.
"""
pass
class NestedContainer(Container, IContainer, IDisposable, INestedContainer):
"""
Provides the base implementation for the System.ComponentModel.INestedContainer interface, which enables containers to have an owning component.
NestedContainer(owner: IComponent)
"""
def CreateSite(self, *args): #cannot find CLR method
"""
CreateSite(self: NestedContainer, component: IComponent, name: str) -> ISite
Creates a site for the component within the container.
component: The System.ComponentModel.IComponent to create a site for.
name: The name to assign to component, or null to skip the name assignment.
Returns: The newly created System.ComponentModel.ISite.
"""
pass
def Dispose(self):
"""
Dispose(self: NestedContainer, disposing: bool)
Releases the resources used by the nested container.
disposing: true to release both managed and unmanaged resources; false to release only
unmanaged resources.
"""
pass
def GetService(self, *args): #cannot find CLR method
"""
GetService(self: NestedContainer, service: Type) -> object
Gets the service object of the specified type, if it is available.
service: The System.Type of the service to retrieve.
Returns: An System.Object that implements the requested service, or null if the service
cannot be resolved.
"""
pass
def RemoveWithoutUnsiting(self, *args): #cannot find CLR method
"""
RemoveWithoutUnsiting(self: Container, component: IComponent)
Removes a component from the System.ComponentModel.Container without setting
System.ComponentModel.IComponent.Site to null.
component: The component to remove.
"""
pass
def ValidateName(self, *args): #cannot find CLR method
"""
ValidateName(self: Container, component: IComponent, name: str)
Determines whether the component name is unique for this container.
component: The named component.
name: The component name to validate.
"""
pass
def __enter__(self, *args): #cannot find CLR method
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args): #cannot find CLR method
""" __exit__(self: IDisposable, exc_type: object, exc_value: object, exc_back: object) """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, owner):
""" __new__(cls: type, owner: IComponent) """
pass
Owner = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the owning component for this nested container.
Get: Owner(self: NestedContainer) -> IComponent
"""
OwnerName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the owning component.
"""
class NewItemPlaceholderPosition(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies where the placeholder for a new item appears in the collection.
enum NewItemPlaceholderPosition, values: AtBeginning (1), AtEnd (2), None (0)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
AtBeginning = None
AtEnd = None
None = None
value__ = None
class NotifyParentPropertyAttribute(Attribute, _Attribute):
"""
Indicates that the parent property is notified when the value of the property that this attribute is applied to is modified. This class cannot be inherited.
NotifyParentPropertyAttribute(notifyParent: bool)
"""
def Equals(self, obj):
"""
Equals(self: NotifyParentPropertyAttribute, obj: object) -> bool
Gets a value indicating whether the specified object is the same as the current
object.
obj: The object to test for equality.
Returns: true if the object is the same as this object; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: NotifyParentPropertyAttribute) -> int
Gets the hash code for this object.
Returns: The hash code for the object the attribute belongs to.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: NotifyParentPropertyAttribute) -> bool
Gets a value indicating whether the current value of the attribute is the
default value for the attribute.
Returns: true if the current value of the attribute is the default value of the
attribute; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, notifyParent):
""" __new__(cls: type, notifyParent: bool) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
NotifyParent = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value indicating whether the parent property should be notified of changes to the value of the property.
Get: NotifyParent(self: NotifyParentPropertyAttribute) -> bool
"""
Default = None
No = None
Yes = None
class NullableConverter(TypeConverter):
"""
Provides automatic conversion between a nullable type and its underlying primitive type.
NullableConverter(type: Type)
"""
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: NullableConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Returns whether this converter can convert an object of the given type to the
type of this converter, using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: A System.Type that represents the type you want to convert from.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def CanConvertTo(self, *__args):
"""
CanConvertTo(self: NullableConverter, context: ITypeDescriptorContext, destinationType: Type) -> bool
Returns whether this converter can convert the object to the specified type,
using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
destinationType: A System.Type that represents the type you want to convert to.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: NullableConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the given object to the type of this converter, using the specified
context and culture information.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: The System.Globalization.CultureInfo to use as the current culture.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: NullableConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given value object to the specified type, using the specified
context and culture information.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: The System.Globalization.CultureInfo to use as the current culture.
value: The System.Object to convert.
destinationType: The System.Type to convert the value parameter to.
Returns: An System.Object that represents the converted value.
"""
pass
def CreateInstance(self, *__args):
"""
CreateInstance(self: NullableConverter, context: ITypeDescriptorContext, propertyValues: IDictionary) -> object
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
propertyValues: An System.Collections.IDictionary of new property values.
Returns: An System.Object representing the given System.Collections.IDictionary, or null
if the object cannot be created. This method always returns null.
"""
pass
def GetCreateInstanceSupported(self, context=None):
"""
GetCreateInstanceSupported(self: NullableConverter, context: ITypeDescriptorContext) -> bool
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true if changing a property on this object requires a call to
System.ComponentModel.TypeConverter.CreateInstance(System.Collections.IDictionar
y) to create a new value; otherwise, false.
"""
pass
def GetProperties(self, *__args):
"""
GetProperties(self: NullableConverter, context: ITypeDescriptorContext, value: object, attributes: Array[Attribute]) -> PropertyDescriptorCollection
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: An System.Object that specifies the type of array for which to get properties.
attributes: An array of type System.Attribute that is used as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
are exposed for this data type, or null if there are no properties.
"""
pass
def GetPropertiesSupported(self, context=None):
"""
GetPropertiesSupported(self: NullableConverter, context: ITypeDescriptorContext) -> bool
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true if System.ComponentModel.TypeConverter.GetProperties(System.Object) should
be called to find the properties of this object; otherwise, false.
"""
pass
def GetStandardValues(self, context=None):
"""
GetStandardValues(self: NullableConverter, context: ITypeDescriptorContext) -> StandardValuesCollection
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context
that can be used to extract additional information about the environment from
which this converter is invoked. This parameter or properties of this parameter
can be null.
Returns: A System.ComponentModel.TypeConverter.StandardValuesCollection that holds a
standard set of valid values, or null if the data type does not support a
standard set of values.
"""
pass
def GetStandardValuesExclusive(self, context=None):
"""
GetStandardValuesExclusive(self: NullableConverter, context: ITypeDescriptorContext) -> bool
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true if the System.ComponentModel.TypeConverter.StandardValuesCollection
returned from System.ComponentModel.TypeConverter.GetStandardValues is an
exhaustive list of possible values; false if other values are possible.
"""
pass
def GetStandardValuesSupported(self, context=None):
"""
GetStandardValuesSupported(self: NullableConverter, context: ITypeDescriptorContext) -> bool
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true if System.ComponentModel.TypeConverter.GetStandardValues should be called
to find a common set of values the object supports; otherwise, false.
"""
pass
def IsValid(self, *__args):
"""
IsValid(self: NullableConverter, context: ITypeDescriptorContext, value: object) -> bool
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
value: The System.Object to test for validity.
"""
pass
@staticmethod # known case of __new__
def __new__(self, type):
""" __new__(cls: type, type: Type) """
pass
NullableType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the nullable type.
Get: NullableType(self: NullableConverter) -> Type
"""
UnderlyingType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the underlying type.
Get: UnderlyingType(self: NullableConverter) -> Type
"""
UnderlyingTypeConverter = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the underlying type converter.
Get: UnderlyingTypeConverter(self: NullableConverter) -> TypeConverter
"""
class ParenthesizePropertyNameAttribute(Attribute, _Attribute):
"""
Indicates whether the name of the associated property is displayed with parentheses in the Properties window. This class cannot be inherited.
ParenthesizePropertyNameAttribute()
ParenthesizePropertyNameAttribute(needParenthesis: bool)
"""
def Equals(self, o):
"""
Equals(self: ParenthesizePropertyNameAttribute, o: object) -> bool
Compares the specified object to this object and tests for equality.
o: The object to be compared.
Returns: true if equal; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: ParenthesizePropertyNameAttribute) -> int
Gets the hash code for this object.
Returns: The hash code for the object the attribute belongs to.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: ParenthesizePropertyNameAttribute) -> bool
Gets a value indicating whether the current value of the attribute is the
default value for the attribute.
Returns: true if the current value of the attribute is the default value of the
attribute; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, needParenthesis=None):
"""
__new__(cls: type)
__new__(cls: type, needParenthesis: bool)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
NeedParenthesis = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the Properties window displays the name of the property in parentheses in the Properties window.
Get: NeedParenthesis(self: ParenthesizePropertyNameAttribute) -> bool
"""
Default = None
class PasswordPropertyTextAttribute(Attribute, _Attribute):
"""
Indicates that an object's text representation is obscured by characters such as asterisks. This class cannot be inherited.
PasswordPropertyTextAttribute()
PasswordPropertyTextAttribute(password: bool)
"""
def Equals(self, o):
"""
Equals(self: PasswordPropertyTextAttribute, o: object) -> bool
Determines whether two System.ComponentModel.PasswordPropertyTextAttribute
instances are equal.
o: The System.ComponentModel.PasswordPropertyTextAttribute to compare with the
current System.ComponentModel.PasswordPropertyTextAttribute.
Returns: true if the specified System.ComponentModel.PasswordPropertyTextAttribute is
equal to the current System.ComponentModel.PasswordPropertyTextAttribute;
otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: PasswordPropertyTextAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current System.ComponentModel.PasswordPropertyTextAttribute.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: PasswordPropertyTextAttribute) -> bool
Returns an indication whether the value of this instance is the default value.
Returns: true if this instance is the default attribute for the class; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, password=None):
"""
__new__(cls: type)
__new__(cls: type, password: bool)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
Password = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating if the property for which the System.ComponentModel.PasswordPropertyTextAttribute is defined should be shown as password text.
Get: Password(self: PasswordPropertyTextAttribute) -> bool
"""
Default = None
No = None
Yes = None
class ProgressChangedEventArgs(EventArgs):
"""
Provides data for the System.ComponentModel.BackgroundWorker.ProgressChanged event.
ProgressChangedEventArgs(progressPercentage: int, userState: object)
"""
@staticmethod # known case of __new__
def __new__(self, progressPercentage, userState):
""" __new__(cls: type, progressPercentage: int, userState: object) """
pass
ProgressPercentage = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the asynchronous task progress percentage.
Get: ProgressPercentage(self: ProgressChangedEventArgs) -> int
"""
UserState = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a unique user state.
Get: UserState(self: ProgressChangedEventArgs) -> object
"""
class ProgressChangedEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents the method that will handle the System.ComponentModel.BackgroundWorker.ProgressChanged event of the System.ComponentModel.BackgroundWorker class. This class cannot be inherited.
ProgressChangedEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, sender, e, callback, object):
""" BeginInvoke(self: ProgressChangedEventHandler, sender: object, e: ProgressChangedEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: ProgressChangedEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, sender, e):
""" Invoke(self: ProgressChangedEventHandler, sender: object, e: ProgressChangedEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class PropertyChangedEventArgs(EventArgs):
"""
Provides data for the System.ComponentModel.INotifyPropertyChanged.PropertyChanged event.
PropertyChangedEventArgs(propertyName: str)
"""
@staticmethod # known case of __new__
def __new__(self, propertyName):
""" __new__(cls: type, propertyName: str) """
pass
PropertyName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the property that changed.
Get: PropertyName(self: PropertyChangedEventArgs) -> str
"""
class PropertyChangedEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents the method that will handle the System.ComponentModel.INotifyPropertyChanged.PropertyChanged event raised when a property is changed on a component.
PropertyChangedEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, sender, e, callback, object):
""" BeginInvoke(self: PropertyChangedEventHandler, sender: object, e: PropertyChangedEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: PropertyChangedEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, sender, e):
""" Invoke(self: PropertyChangedEventHandler, sender: object, e: PropertyChangedEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class PropertyChangedEventManager(WeakEventManager):
""" Provides a System.Windows.WeakEventManager implementation so that you can use the "weak event listener" pattern to attach listeners for the System.ComponentModel.INotifyPropertyChanged.PropertyChanged event. """
@staticmethod
def AddHandler(source, handler, propertyName):
""" AddHandler(source: INotifyPropertyChanged, handler: EventHandler[PropertyChangedEventArgs], propertyName: str) """
pass
@staticmethod
def AddListener(source, listener, propertyName):
"""
AddListener(source: INotifyPropertyChanged, listener: IWeakEventListener, propertyName: str)
Adds the specified listener to the list of listeners on the specified source.
source: The object with the event.
listener: The object to add as a listener.
propertyName: The name of the property that exists on source upon which to listen for
changes. Set to System.String.Empty to indicate "any property".
"""
pass
@staticmethod
def RemoveHandler(source, handler, propertyName):
""" RemoveHandler(source: INotifyPropertyChanged, handler: EventHandler[PropertyChangedEventArgs], propertyName: str) """
pass
@staticmethod
def RemoveListener(source, listener, propertyName):
"""
RemoveListener(source: INotifyPropertyChanged, listener: IWeakEventListener, propertyName: str)
Removes the specified listener from the list of listeners on the provided
source.
source: The object to remove the listener from.
listener: The listener to remove.
propertyName: The name of the property that exists on source upon which to stop listening for
changes. Set to System.String.Empty to indicate "any property".
"""
pass
ReadLock = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Establishes a read-lock on the underlying data table, and returns an System.IDisposable.
"""
WriteLock = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Establishes a write-lock on the underlying data table, and returns an System.IDisposable.
"""
class PropertyChangingEventArgs(EventArgs):
"""
Provides data for the System.ComponentModel.INotifyPropertyChanging.PropertyChanging event.
PropertyChangingEventArgs(propertyName: str)
"""
@staticmethod # known case of __new__
def __new__(self, propertyName):
""" __new__(cls: type, propertyName: str) """
pass
PropertyName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the property whose value is changing.
Get: PropertyName(self: PropertyChangingEventArgs) -> str
"""
class PropertyChangingEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents the method that will handle the System.ComponentModel.INotifyPropertyChanging.PropertyChanging event of an System.ComponentModel.INotifyPropertyChanging interface.
PropertyChangingEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, sender, e, callback, object):
""" BeginInvoke(self: PropertyChangingEventHandler, sender: object, e: PropertyChangingEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: PropertyChangingEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, sender, e):
""" Invoke(self: PropertyChangingEventHandler, sender: object, e: PropertyChangingEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class PropertyDescriptorCollection(object, ICollection, IEnumerable, IList, IDictionary):
"""
Represents a collection of System.ComponentModel.PropertyDescriptor objects.
PropertyDescriptorCollection(properties: Array[PropertyDescriptor])
PropertyDescriptorCollection(properties: Array[PropertyDescriptor], readOnly: bool)
"""
def Add(self, value):
"""
Add(self: PropertyDescriptorCollection, value: PropertyDescriptor) -> int
Adds the specified System.ComponentModel.PropertyDescriptor to the collection.
value: The System.ComponentModel.PropertyDescriptor to add to the collection.
Returns: The index of the System.ComponentModel.PropertyDescriptor that was added to the
collection.
"""
pass
def Clear(self):
"""
Clear(self: PropertyDescriptorCollection)
Removes all System.ComponentModel.PropertyDescriptor objects from the
collection.
"""
pass
def Contains(self, value):
"""
Contains(self: PropertyDescriptorCollection, value: PropertyDescriptor) -> bool
Returns whether the collection contains the given
System.ComponentModel.PropertyDescriptor.
value: The System.ComponentModel.PropertyDescriptor to find in the collection.
Returns: true if the collection contains the given
System.ComponentModel.PropertyDescriptor; otherwise, false.
"""
pass
def CopyTo(self, array, index):
"""
CopyTo(self: PropertyDescriptorCollection, array: Array, index: int)
Copies the entire collection to an array, starting at the specified index
number.
array: An array of System.ComponentModel.PropertyDescriptor objects to copy elements
of the collection to.
index: The index of the array parameter at which copying begins.
"""
pass
def Find(self, name, ignoreCase):
"""
Find(self: PropertyDescriptorCollection, name: str, ignoreCase: bool) -> PropertyDescriptor
Returns the System.ComponentModel.PropertyDescriptor with the specified name,
using a Boolean to indicate whether to ignore case.
name: The name of the System.ComponentModel.PropertyDescriptor to return from the
collection.
ignoreCase: true if you want to ignore the case of the property name; otherwise, false.
Returns: A System.ComponentModel.PropertyDescriptor with the specified name, or null if
the property does not exist.
"""
pass
def GetEnumerator(self):
"""
GetEnumerator(self: PropertyDescriptorCollection) -> IEnumerator
Returns an enumerator for this class.
Returns: An enumerator of type System.Collections.IEnumerator.
"""
pass
def IndexOf(self, value):
"""
IndexOf(self: PropertyDescriptorCollection, value: PropertyDescriptor) -> int
Returns the index of the given System.ComponentModel.PropertyDescriptor.
value: The System.ComponentModel.PropertyDescriptor to return the index of.
Returns: The index of the given System.ComponentModel.PropertyDescriptor.
"""
pass
def Insert(self, index, value):
"""
Insert(self: PropertyDescriptorCollection, index: int, value: PropertyDescriptor)
Adds the System.ComponentModel.PropertyDescriptor to the collection at the
specified index number.
index: The index at which to add the value parameter to the collection.
value: The System.ComponentModel.PropertyDescriptor to add to the collection.
"""
pass
def InternalSort(self, *args): #cannot find CLR method
"""
InternalSort(self: PropertyDescriptorCollection, sorter: IComparer)
Sorts the members of this collection, using the specified
System.Collections.IComparer.
sorter: A comparer to use to sort the System.ComponentModel.PropertyDescriptor objects
in this collection.
InternalSort(self: PropertyDescriptorCollection, names: Array[str])
Sorts the members of this collection. The specified order is applied first,
followed by the default sort for this collection, which is usually
alphabetical.
names: An array of strings describing the order in which to sort the
System.ComponentModel.PropertyDescriptor objects in this collection.
"""
pass
def Remove(self, value):
"""
Remove(self: PropertyDescriptorCollection, value: PropertyDescriptor)
Removes the specified System.ComponentModel.PropertyDescriptor from the
collection.
value: The System.ComponentModel.PropertyDescriptor to remove from the collection.
"""
pass
def RemoveAt(self, index):
"""
RemoveAt(self: PropertyDescriptorCollection, index: int)
Removes the System.ComponentModel.PropertyDescriptor at the specified index
from the collection.
index: The index of the System.ComponentModel.PropertyDescriptor to remove from the
collection.
"""
pass
def Sort(self, *__args):
"""
Sort(self: PropertyDescriptorCollection, names: Array[str], comparer: IComparer) -> PropertyDescriptorCollection
Sorts the members of this collection. The specified order is applied first,
followed by the sort using the specified System.Collections.IComparer.
names: An array of strings describing the order in which to sort the
System.ComponentModel.PropertyDescriptor objects in this collection.
comparer: A comparer to use to sort the System.ComponentModel.PropertyDescriptor objects
in this collection.
Returns: A new System.ComponentModel.PropertyDescriptorCollection that contains the
sorted System.ComponentModel.PropertyDescriptor objects.
Sort(self: PropertyDescriptorCollection, comparer: IComparer) -> PropertyDescriptorCollection
Sorts the members of this collection, using the specified
System.Collections.IComparer.
comparer: A comparer to use to sort the System.ComponentModel.PropertyDescriptor objects
in this collection.
Returns: A new System.ComponentModel.PropertyDescriptorCollection that contains the
sorted System.ComponentModel.PropertyDescriptor objects.
Sort(self: PropertyDescriptorCollection) -> PropertyDescriptorCollection
Sorts the members of this collection, using the default sort for this
collection, which is usually alphabetical.
Returns: A new System.ComponentModel.PropertyDescriptorCollection that contains the
sorted System.ComponentModel.PropertyDescriptor objects.
Sort(self: PropertyDescriptorCollection, names: Array[str]) -> PropertyDescriptorCollection
Sorts the members of this collection. The specified order is applied first,
followed by the default sort for this collection, which is usually
alphabetical.
names: An array of strings describing the order in which to sort the
System.ComponentModel.PropertyDescriptor objects in this collection.
Returns: A new System.ComponentModel.PropertyDescriptorCollection that contains the
sorted System.ComponentModel.PropertyDescriptor objects.
"""
pass
def __add__(self, *args): #cannot find CLR method
""" x.__add__(y) <==> x+y """
pass
def __contains__(self, *args): #cannot find CLR method
"""
__contains__(self: IList, value: object) -> bool
Determines whether the System.Collections.IList contains a specific value.
value: The object to locate in the System.Collections.IList.
Returns: true if the System.Object is found in the System.Collections.IList; otherwise,
false.
"""
pass
def __getitem__(self, *args): #cannot find CLR method
""" x.__getitem__(y) <==> x[y]x.__getitem__(y) <==> x[y] """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __iter__(self, *args): #cannot find CLR method
""" __iter__(self: IEnumerable) -> object """
pass
def __len__(self, *args): #cannot find CLR method
""" x.__len__() <==> len(x) """
pass
@staticmethod # known case of __new__
def __new__(self, properties, readOnly=None):
"""
__new__(cls: type, properties: Array[PropertyDescriptor])
__new__(cls: type, properties: Array[PropertyDescriptor], readOnly: bool)
"""
pass
def __repr__(self, *args): #cannot find CLR method
""" __repr__(self: object) -> str """
pass
Count = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the number of property descriptors in the collection.
Get: Count(self: PropertyDescriptorCollection) -> int
"""
Empty = None
class PropertyFilterAttribute(Attribute, _Attribute):
"""
Specifies which properties should be reported by type descriptors, specifically the System.ComponentModel.TypeDescriptor.GetProperties(System.Object) method.
PropertyFilterAttribute(filter: PropertyFilterOptions)
"""
def Equals(self, value):
"""
Equals(self: PropertyFilterAttribute, value: object) -> bool
Returns a value that indicates whether the current
System.ComponentModel.PropertyFilterAttribute�.NET Framework attribute is equal
to a specified object.
value: The object to compare to this System.ComponentModel.PropertyFilterAttribute.
Returns: true if the specified System.ComponentModel.PropertyFilterAttribute is equal to
the current System.ComponentModel.PropertyFilterAttribute; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: PropertyFilterAttribute) -> int
Returns the hash code for the current
System.ComponentModel.PropertyFilterAttribute�.NET Framework attribute.
Returns: A signed 32-bit integer value.
"""
pass
def Match(self, value):
"""
Match(self: PropertyFilterAttribute, value: object) -> bool
Returns a value that indicates whether the property filter options of the
current System.ComponentModel.PropertyFilterAttribute�.NET Framework attribute
match the property filter options of the provided object.
value: The object to compare. This object is expected to be a
System.ComponentModel.PropertyFilterAttribute.
Returns: true if a match exists; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, filter):
""" __new__(cls: type, filter: PropertyFilterOptions) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
Filter = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the filter options for this System.ComponentModel.PropertyFilterAttribute�.NET Framework attribute.
Get: Filter(self: PropertyFilterAttribute) -> PropertyFilterOptions
"""
Default = None
class PropertyFilterOptions(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies which properties should be reported by type descriptors, specifically the System.ComponentModel.TypeDescriptor.GetProperties(System.Object) method. This enumeration is used to specify the value of the System.ComponentModel.PropertyFilterAttribute.Filter property.
enum (flags) PropertyFilterOptions, values: All (15), Invalid (1), None (0), SetValues (2), UnsetValues (4), Valid (8)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
All = None
Invalid = None
None = None
SetValues = None
UnsetValues = None
Valid = None
value__ = None
class PropertyTabAttribute(Attribute, _Attribute):
"""
Identifies the property tab or tabs to display for the specified class or classes.
PropertyTabAttribute()
PropertyTabAttribute(tabClass: Type)
PropertyTabAttribute(tabClassName: str)
PropertyTabAttribute(tabClass: Type, tabScope: PropertyTabScope)
PropertyTabAttribute(tabClassName: str, tabScope: PropertyTabScope)
"""
def Equals(self, other):
"""
Equals(self: PropertyTabAttribute, other: PropertyTabAttribute) -> bool
Returns a value indicating whether this instance is equal to a specified
attribute.
other: A System.ComponentModel.PropertyTabAttribute to compare to this instance, or
null.
Returns: true if the System.ComponentModel.PropertyTabAttribute instances are equal;
otherwise, false.
Equals(self: PropertyTabAttribute, other: object) -> bool
Returns a value indicating whether this instance is equal to a specified object.
other: An object to compare to this instance, or null.
Returns: true if other refers to the same System.ComponentModel.PropertyTabAttribute
instance; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: PropertyTabAttribute) -> int
Gets the hash code for this object.
Returns: The hash code for the object the attribute belongs to.
"""
pass
def InitializeArrays(self, *args): #cannot find CLR method
"""
InitializeArrays(self: PropertyTabAttribute, tabClasses: Array[Type], tabScopes: Array[PropertyTabScope])
Initializes the attribute using the specified names of tab classes and array of
tab scopes.
tabClasses: The types of tabs to create.
tabScopes: The scope of each tab. If the scope is
System.ComponentModel.PropertyTabScope.Component, it is shown only for
components with the corresponding System.ComponentModel.PropertyTabAttribute.
If it is System.ComponentModel.PropertyTabScope.Document, it is shown for all
components on the document.
InitializeArrays(self: PropertyTabAttribute, tabClassNames: Array[str], tabScopes: Array[PropertyTabScope])
Initializes the attribute using the specified names of tab classes and array of
tab scopes.
tabClassNames: An array of fully qualified type names of the types to create for tabs on the
Properties window.
tabScopes: The scope of each tab. If the scope is
System.ComponentModel.PropertyTabScope.Component, it is shown only for
components with the corresponding System.ComponentModel.PropertyTabAttribute.
If it is System.ComponentModel.PropertyTabScope.Document, it is shown for all
components on the document.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type)
__new__(cls: type, tabClass: Type)
__new__(cls: type, tabClassName: str)
__new__(cls: type, tabClass: Type, tabScope: PropertyTabScope)
__new__(cls: type, tabClassName: str, tabScope: PropertyTabScope)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
TabClasses = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the types of tabs that this attribute uses.
Get: TabClasses(self: PropertyTabAttribute) -> Array[Type]
"""
TabClassNames = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the names of the tab classes that this attribute uses.
"""
TabScopes = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets an array of tab scopes of each tab of this System.ComponentModel.PropertyTabAttribute.
Get: TabScopes(self: PropertyTabAttribute) -> Array[PropertyTabScope]
"""
class PropertyTabScope(Enum, IComparable, IFormattable, IConvertible):
"""
Defines identifiers that indicate the persistence scope of a tab in the Properties window.
enum PropertyTabScope, values: Component (3), Document (2), Global (1), Static (0)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
Component = None
Document = None
Global = None
Static = None
value__ = None
class ProvidePropertyAttribute(Attribute, _Attribute):
"""
Specifies the name of the property that an implementer of System.ComponentModel.IExtenderProvider offers to other components. This class cannot be inherited
ProvidePropertyAttribute(propertyName: str, receiverType: Type)
ProvidePropertyAttribute(propertyName: str, receiverTypeName: str)
"""
def Equals(self, obj):
"""
Equals(self: ProvidePropertyAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.ProvidePropertyAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current;
otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: ProvidePropertyAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current System.ComponentModel.ProvidePropertyAttribute.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, propertyName, *__args):
"""
__new__(cls: type, propertyName: str, receiverType: Type)
__new__(cls: type, propertyName: str, receiverTypeName: str)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
PropertyName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of a property that this class provides.
Get: PropertyName(self: ProvidePropertyAttribute) -> str
"""
ReceiverTypeName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the name of the data type this property can extend.
Get: ReceiverTypeName(self: ProvidePropertyAttribute) -> str
"""
TypeId = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a unique identifier for this attribute.
Get: TypeId(self: ProvidePropertyAttribute) -> object
"""
class ReadOnlyAttribute(Attribute, _Attribute):
"""
Specifies whether the property this attribute is bound to is read-only or read/write. This class cannot be inherited
ReadOnlyAttribute(isReadOnly: bool)
"""
def Equals(self, value):
"""
Equals(self: ReadOnlyAttribute, value: object) -> bool
Indicates whether this instance and a specified object are equal.
value: Another object to compare to.
Returns: true if value is equal to this instance; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: ReadOnlyAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current System.ComponentModel.ReadOnlyAttribute.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: ReadOnlyAttribute) -> bool
Determines if this attribute is the default.
Returns: true if the attribute is the default value for this attribute class; otherwise,
false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, isReadOnly):
""" __new__(cls: type, isReadOnly: bool) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
IsReadOnly = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the property this attribute is bound to is read-only.
Get: IsReadOnly(self: ReadOnlyAttribute) -> bool
"""
Default = None
No = None
Yes = None
class RecommendedAsConfigurableAttribute(Attribute, _Attribute):
"""
Specifies that the property can be used as an application setting.
RecommendedAsConfigurableAttribute(recommendedAsConfigurable: bool)
"""
def Equals(self, obj):
"""
Equals(self: RecommendedAsConfigurableAttribute, obj: object) -> bool
Indicates whether this instance and a specified object are equal.
obj: Another object to compare to.
Returns: true if obj is equal to this instance; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: RecommendedAsConfigurableAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current
System.ComponentModel.RecommendedAsConfigurableAttribute.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: RecommendedAsConfigurableAttribute) -> bool
Indicates whether the value of this instance is the default value for the class.
Returns: true if this instance is the default attribute for the class; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, recommendedAsConfigurable):
""" __new__(cls: type, recommendedAsConfigurable: bool) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
RecommendedAsConfigurable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether the property this attribute is bound to can be used as an application setting.
Get: RecommendedAsConfigurable(self: RecommendedAsConfigurableAttribute) -> bool
"""
Default = None
No = None
Yes = None
class RefreshEventArgs(EventArgs):
"""
Provides data for the System.ComponentModel.TypeDescriptor.Refreshed event.
RefreshEventArgs(componentChanged: object)
RefreshEventArgs(typeChanged: Type)
"""
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type, componentChanged: object)
__new__(cls: type, typeChanged: Type)
"""
pass
ComponentChanged = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the component that changed its properties, events, or extenders.
Get: ComponentChanged(self: RefreshEventArgs) -> object
"""
TypeChanged = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the System.Type that changed its properties or events.
Get: TypeChanged(self: RefreshEventArgs) -> Type
"""
class RefreshEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents the method that handles the System.ComponentModel.TypeDescriptor.Refreshed event raised when a System.Type or component is changed during design time.
RefreshEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, e, callback, object):
""" BeginInvoke(self: RefreshEventHandler, e: RefreshEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: RefreshEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, e):
""" Invoke(self: RefreshEventHandler, e: RefreshEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class RefreshProperties(Enum, IComparable, IFormattable, IConvertible):
"""
Defines identifiers that indicate the type of a refresh of the Properties window.
enum RefreshProperties, values: All (1), None (0), Repaint (2)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
All = None
None = None
Repaint = None
value__ = None
class RefreshPropertiesAttribute(Attribute, _Attribute):
"""
Indicates that the property grid should refresh when the associated property value changes. This class cannot be inherited.
RefreshPropertiesAttribute(refresh: RefreshProperties)
"""
def Equals(self, value):
"""
Equals(self: RefreshPropertiesAttribute, value: object) -> bool
Overrides the object's erload:System.Object.Equals method.
value: The object to test for equality.
Returns: true if the specified object is the same; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: RefreshPropertiesAttribute) -> int
Returns the hash code for this object.
Returns: The hash code for the object that the attribute belongs to.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: RefreshPropertiesAttribute) -> bool
Gets a value indicating whether the current value of the attribute is the
default value for the attribute.
Returns: true if the current value of the attribute is the default; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, refresh):
""" __new__(cls: type, refresh: RefreshProperties) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
RefreshProperties = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the refresh properties for the member.
Get: RefreshProperties(self: RefreshPropertiesAttribute) -> RefreshProperties
"""
All = None
Default = None
Repaint = None
class RunInstallerAttribute(Attribute, _Attribute):
"""
Specifies whether the Visual Studio Custom Action Installer or the Installutil.exe (Installer Tool) should be invoked when the assembly is installed.
RunInstallerAttribute(runInstaller: bool)
"""
def Equals(self, obj):
"""
Equals(self: RunInstallerAttribute, obj: object) -> bool
Determines whether the value of the specified
System.ComponentModel.RunInstallerAttribute is equivalent to the current
System.ComponentModel.RunInstallerAttribute.
obj: The object to compare.
Returns: true if the specified System.ComponentModel.RunInstallerAttribute is equal to
the current System.ComponentModel.RunInstallerAttribute; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: RunInstallerAttribute) -> int
Generates a hash code for the current
System.ComponentModel.RunInstallerAttribute.
Returns: A hash code for the current System.ComponentModel.RunInstallerAttribute.
"""
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: RunInstallerAttribute) -> bool
Determines if this attribute is the default.
Returns: true if the attribute is the default value for this attribute class; otherwise,
false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, runInstaller):
""" __new__(cls: type, runInstaller: bool) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
RunInstaller = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether an installer should be invoked during installation of an assembly.
Get: RunInstaller(self: RunInstallerAttribute) -> bool
"""
Default = None
No = None
Yes = None
class RunWorkerCompletedEventArgs(AsyncCompletedEventArgs):
"""
Provides data for the MethodNameCompleted event.
RunWorkerCompletedEventArgs(result: object, error: Exception, cancelled: bool)
"""
@staticmethod # known case of __new__
def __new__(self, result, error, cancelled):
""" __new__(cls: type, result: object, error: Exception, cancelled: bool) """
pass
Result = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that represents the result of an asynchronous operation.
Get: Result(self: RunWorkerCompletedEventArgs) -> object
"""
UserState = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that represents the user state.
Get: UserState(self: RunWorkerCompletedEventArgs) -> object
"""
class RunWorkerCompletedEventHandler(MulticastDelegate, ICloneable, ISerializable):
"""
Represents the method that will handle the System.ComponentModel.BackgroundWorker.RunWorkerCompleted event of a System.ComponentModel.BackgroundWorker class.
RunWorkerCompletedEventHandler(object: object, method: IntPtr)
"""
def BeginInvoke(self, sender, e, callback, object):
""" BeginInvoke(self: RunWorkerCompletedEventHandler, sender: object, e: RunWorkerCompletedEventArgs, callback: AsyncCallback, object: object) -> IAsyncResult """
pass
def CombineImpl(self, *args): #cannot find CLR method
"""
CombineImpl(self: MulticastDelegate, follow: Delegate) -> Delegate
Combines this System.Delegate with the specified System.Delegate to form a new
delegate.
follow: The delegate to combine with this delegate.
Returns: A delegate that is the new root of the System.MulticastDelegate invocation list.
"""
pass
def DynamicInvokeImpl(self, *args): #cannot find CLR method
"""
DynamicInvokeImpl(self: Delegate, args: Array[object]) -> object
Dynamically invokes (late-bound) the method represented by the current delegate.
args: An array of objects that are the arguments to pass to the method represented by
the current delegate.-or- null, if the method represented by the current
delegate does not require arguments.
Returns: The object returned by the method represented by the delegate.
"""
pass
def EndInvoke(self, result):
""" EndInvoke(self: RunWorkerCompletedEventHandler, result: IAsyncResult) """
pass
def GetMethodImpl(self, *args): #cannot find CLR method
"""
GetMethodImpl(self: MulticastDelegate) -> MethodInfo
Returns a static method represented by the current System.MulticastDelegate.
Returns: A static method represented by the current System.MulticastDelegate.
"""
pass
def Invoke(self, sender, e):
""" Invoke(self: RunWorkerCompletedEventHandler, sender: object, e: RunWorkerCompletedEventArgs) """
pass
def RemoveImpl(self, *args): #cannot find CLR method
"""
RemoveImpl(self: MulticastDelegate, value: Delegate) -> Delegate
Removes an element from the invocation list of this System.MulticastDelegate
that is equal to the specified delegate.
value: The delegate to search for in the invocation list.
Returns: If value is found in the invocation list for this instance, then a new
System.Delegate without value in its invocation list; otherwise, this instance
with its original invocation list.
"""
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, object, method):
""" __new__(cls: type, object: object, method: IntPtr) """
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
class SByteConverter(BaseNumberConverter):
"""
Provides a type converter to convert 8-bit unsigned integer objects to and from a string.
SByteConverter()
"""
class SettingsBindableAttribute(Attribute, _Attribute):
"""
Specifies when a component property can be bound to an application setting.
SettingsBindableAttribute(bindable: bool)
"""
def Equals(self, obj):
"""
Equals(self: SettingsBindableAttribute, obj: object) -> bool
Determines whether two System.ComponentModel.SettingsBindableAttribute objects
are equal.
obj: The value to compare to.
Returns: true if obj equals the type and value of this instance; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: SettingsBindableAttribute) -> int
Returns: A 32-bit signed integer hash code.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, bindable):
""" __new__(cls: type, bindable: bool) """
pass
def __ne__(self, *args): #cannot find CLR method
pass
Bindable = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value indicating whether a property is appropriate to bind settings to.
Get: Bindable(self: SettingsBindableAttribute) -> bool
"""
No = None
Yes = None
class SingleConverter(BaseNumberConverter):
"""
Provides a type converter to convert single-precision, floating point number objects to and from various other representations.
SingleConverter()
"""
class SortDescription(object):
"""
Defines the direction and the property name to be used as the criteria for sorting a collection.
SortDescription(propertyName: str, direction: ListSortDirection)
"""
def Equals(self, obj):
"""
Equals(self: SortDescription, obj: object) -> bool
Compares the specified instance and the current instance of
System.ComponentModel.SortDescription for value equality.
obj: The System.ComponentModel.SortDescription instance to compare.
Returns: true if obj and this instance of System.ComponentModel.SortDescription have the
same values.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: SortDescription) -> int
Returns the hash code for this instance of
System.ComponentModel.SortDescription.
Returns: The hash code for this instance of System.ComponentModel.SortDescription.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
@staticmethod # known case of __new__
def __new__(self, propertyName, direction):
"""
__new__(cls: type, propertyName: str, direction: ListSortDirection)
__new__[SortDescription]() -> SortDescription
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
Direction = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets a value that indicates whether to sort in ascending or descending order.
Get: Direction(self: SortDescription) -> ListSortDirection
Set: Direction(self: SortDescription) = value
"""
IsSealed = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a value that indicates whether this object is in an immutable state.
Get: IsSealed(self: SortDescription) -> bool
"""
PropertyName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the property name being used as the sorting criteria.
Get: PropertyName(self: SortDescription) -> str
Set: PropertyName(self: SortDescription) = value
"""
class SortDescriptionCollection(Collection[SortDescription], IList[SortDescription], ICollection[SortDescription], IEnumerable[SortDescription], IEnumerable, IList, ICollection, IReadOnlyList[SortDescription], IReadOnlyCollection[SortDescription], INotifyCollectionChanged):
"""
Represents a collection of System.ComponentModel.SortDescription objects.
SortDescriptionCollection()
"""
def add_CollectionChanged(self, *args): #cannot find CLR method
""" add_CollectionChanged(self: SortDescriptionCollection, value: NotifyCollectionChangedEventHandler) """
pass
def ClearItems(self, *args): #cannot find CLR method
"""
ClearItems(self: SortDescriptionCollection)
Removes all items from the collection.
"""
pass
def InsertItem(self, *args): #cannot find CLR method
"""
InsertItem(self: SortDescriptionCollection, index: int, item: SortDescription)
Inserts an item into the collection at the specified index.
index: The zero-based index where the item is inserted.
item: The object to insert.
"""
pass
def RemoveItem(self, *args): #cannot find CLR method
"""
RemoveItem(self: SortDescriptionCollection, index: int)
Removes the item at the specified index in the collection.
index: The zero-based index of the element to remove.
"""
pass
def remove_CollectionChanged(self, *args): #cannot find CLR method
""" remove_CollectionChanged(self: SortDescriptionCollection, value: NotifyCollectionChangedEventHandler) """
pass
def SetItem(self, *args): #cannot find CLR method
"""
SetItem(self: SortDescriptionCollection, index: int, item: SortDescription)
Replaces the element at the specified index.
index: The zero-based index of the element to replace.
item: The new value for the element at the specified index.
"""
pass
def __getitem__(self, *args): #cannot find CLR method
""" x.__getitem__(y) <==> x[y] """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __iter__(self, *args): #cannot find CLR method
""" __iter__(self: IEnumerable) -> object """
pass
def __setitem__(self, *args): #cannot find CLR method
""" x.__setitem__(i, y) <==> x[i]= """
pass
Items = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets a System.Collections.Generic.IList wrapper around the System.Collections.ObjectModel.Collection.
"""
Empty = None
class StringConverter(TypeConverter):
"""
Provides a type converter to convert string objects to and from other representations.
StringConverter()
"""
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: StringConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Gets a value indicating whether this converter can convert an object in the
given source type to a string using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: A System.Type that represents the type you wish to convert from.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: StringConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the specified value object to a System.String object.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: The System.Globalization.CultureInfo to use.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
class SyntaxCheck(object):
""" Provides methods to verify the machine name and path conform to a specific syntax. This class cannot be inherited. """
@staticmethod
def CheckMachineName(value):
"""
CheckMachineName(value: str) -> bool
Checks the syntax of the machine name to confirm that it does not contain "\".
value: A string containing the machine name to check.
Returns: true if value matches the proper machine name format; otherwise, false.
"""
pass
@staticmethod
def CheckPath(value):
"""
CheckPath(value: str) -> bool
Checks the syntax of the path to see whether it starts with "\\".
value: A string containing the path to check.
Returns: true if value matches the proper path format; otherwise, false.
"""
pass
@staticmethod
def CheckRootedPath(value):
"""
CheckRootedPath(value: str) -> bool
Checks the syntax of the path to see if it starts with "\" or drive letter "C:".
value: A string containing the path to check.
Returns: true if value matches the proper path format; otherwise, false.
"""
pass
__all__ = [
'CheckMachineName',
'CheckPath',
'CheckRootedPath',
]
class TimeSpanConverter(TypeConverter):
"""
Provides a type converter to convert System.TimeSpan objects to and from other representations.
TimeSpanConverter()
"""
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: TimeSpanConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Gets a value indicating whether this converter can convert an object in the
given source type to a System.TimeSpan using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: A System.Type that represents the type you wish to convert from.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def CanConvertTo(self, *__args):
"""
CanConvertTo(self: TimeSpanConverter, context: ITypeDescriptorContext, destinationType: Type) -> bool
Gets a value indicating whether this converter can convert an object to the
given destination type using the context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
destinationType: A System.Type that represents the type you wish to convert to.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: TimeSpanConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the given object to a System.TimeSpan.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: An optional System.Globalization.CultureInfo. If not supplied, the current
culture is assumed.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: TimeSpanConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given object to another type.
context: A formatter context.
culture: The culture into which value will be converted.
value: The object to convert.
destinationType: The type to convert the object to.
Returns: The converted object.
"""
pass
class ToolboxItemAttribute(Attribute, _Attribute):
"""
Represents an attribute of a toolbox item.
ToolboxItemAttribute(defaultType: bool)
ToolboxItemAttribute(toolboxItemTypeName: str)
ToolboxItemAttribute(toolboxItemType: Type)
"""
def Equals(self, obj):
"""
Equals(self: ToolboxItemAttribute, obj: object) -> bool
obj: The object to compare.
"""
pass
def GetHashCode(self):
""" GetHashCode(self: ToolboxItemAttribute) -> int """
pass
def IsDefaultAttribute(self):
"""
IsDefaultAttribute(self: ToolboxItemAttribute) -> bool
Gets a value indicating whether the current value of the attribute is the
default value for the attribute.
Returns: true if the current value of the attribute is the default; otherwise, false.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type, defaultType: bool)
__new__(cls: type, toolboxItemTypeName: str)
__new__(cls: type, toolboxItemType: Type)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
ToolboxItemType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the type of the toolbox item.
Get: ToolboxItemType(self: ToolboxItemAttribute) -> Type
"""
ToolboxItemTypeName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets or sets the name of the type of the current System.Drawing.Design.ToolboxItem.
Get: ToolboxItemTypeName(self: ToolboxItemAttribute) -> str
"""
Default = None
None = None
class ToolboxItemFilterAttribute(Attribute, _Attribute):
"""
Specifies the filter string and filter type to use for a toolbox item.
ToolboxItemFilterAttribute(filterString: str)
ToolboxItemFilterAttribute(filterString: str, filterType: ToolboxItemFilterType)
"""
def Equals(self, obj):
"""
Equals(self: ToolboxItemFilterAttribute, obj: object) -> bool
obj: The object to compare.
"""
pass
def GetHashCode(self):
""" GetHashCode(self: ToolboxItemFilterAttribute) -> int """
pass
def Match(self, obj):
"""
Match(self: ToolboxItemFilterAttribute, obj: object) -> bool
Indicates whether the specified object has a matching filter string.
obj: The object to test for a matching filter string.
Returns: true if the specified object has a matching filter string; otherwise, false.
"""
pass
def ToString(self):
""" ToString(self: ToolboxItemFilterAttribute) -> str """
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, filterString, filterType=None):
"""
__new__(cls: type, filterString: str)
__new__(cls: type, filterString: str, filterType: ToolboxItemFilterType)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
FilterString = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the filter string for the toolbox item.
Get: FilterString(self: ToolboxItemFilterAttribute) -> str
"""
FilterType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the type of the filter.
Get: FilterType(self: ToolboxItemFilterAttribute) -> ToolboxItemFilterType
"""
TypeId = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the type ID for the attribute.
Get: TypeId(self: ToolboxItemFilterAttribute) -> object
"""
class ToolboxItemFilterType(Enum, IComparable, IFormattable, IConvertible):
"""
Defines identifiers used to indicate the type of filter that a System.ComponentModel.ToolboxItemFilterAttribute uses.
enum ToolboxItemFilterType, values: Allow (0), Custom (1), Prevent (2), Require (3)
"""
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): #cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): #cannot find CLR method
pass
def __gt__(self, *args): #cannot find CLR method
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): #cannot find CLR method
pass
def __lt__(self, *args): #cannot find CLR method
pass
def __ne__(self, *args): #cannot find CLR method
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
Allow = None
Custom = None
Prevent = None
Require = None
value__ = None
class TypeConverterAttribute(Attribute, _Attribute):
"""
Specifies what type to use as a converter for the object this attribute is bound to.
TypeConverterAttribute()
TypeConverterAttribute(type: Type)
TypeConverterAttribute(typeName: str)
"""
def Equals(self, obj):
"""
Equals(self: TypeConverterAttribute, obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.TypeConverterAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current
System.ComponentModel.TypeConverterAttribute; otherwise, false.
"""
pass
def GetHashCode(self):
"""
GetHashCode(self: TypeConverterAttribute) -> int
Returns the hash code for this instance.
Returns: A hash code for the current System.ComponentModel.TypeConverterAttribute.
"""
pass
def __eq__(self, *args): #cannot find CLR method
""" x.__eq__(y) <==> x==y """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type)
__new__(cls: type, type: Type)
__new__(cls: type, typeName: str)
"""
pass
def __ne__(self, *args): #cannot find CLR method
pass
ConverterTypeName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the fully qualified type name of the System.Type to use as a converter for the object this attribute is bound to.
Get: ConverterTypeName(self: TypeConverterAttribute) -> str
"""
Default = None
class TypeDescriptionProvider(object):
""" Provides supplemental metadata to the System.ComponentModel.TypeDescriptor. """
def CreateInstance(self, provider, objectType, argTypes, args):
"""
CreateInstance(self: TypeDescriptionProvider, provider: IServiceProvider, objectType: Type, argTypes: Array[Type], args: Array[object]) -> object
Creates an object that can substitute for another data type.
provider: An optional service provider.
objectType: The type of object to create. This parameter is never null.
argTypes: An optional array of types that represent the parameter types to be passed to
the object's constructor. This array can be null or of zero length.
args: An optional array of parameter values to pass to the object's constructor.
Returns: The substitute System.Object.
"""
pass
def GetCache(self, instance):
"""
GetCache(self: TypeDescriptionProvider, instance: object) -> IDictionary
Gets a per-object cache, accessed as an System.Collections.IDictionary of
key/value pairs.
instance: The object for which to get the cache.
Returns: An System.Collections.IDictionary if the provided object supports caching;
otherwise, null.
"""
pass
def GetExtendedTypeDescriptor(self, instance):
"""
GetExtendedTypeDescriptor(self: TypeDescriptionProvider, instance: object) -> ICustomTypeDescriptor
Gets an extended custom type descriptor for the given object.
instance: The object for which to get the extended type descriptor.
Returns: An System.ComponentModel.ICustomTypeDescriptor that can provide extended
metadata for the object.
"""
pass
def GetExtenderProviders(self, *args): #cannot find CLR method
"""
GetExtenderProviders(self: TypeDescriptionProvider, instance: object) -> Array[IExtenderProvider]
Gets the extender providers for the specified object.
instance: The object to get extender providers for.
Returns: An array of extender providers for instance.
"""
pass
def GetFullComponentName(self, component):
"""
GetFullComponentName(self: TypeDescriptionProvider, component: object) -> str
Gets the name of the specified component, or null if the component has no name.
component: The specified component.
Returns: The name of the specified component.
"""
pass
def GetReflectionType(self, *__args):
"""
GetReflectionType(self: TypeDescriptionProvider, objectType: Type, instance: object) -> Type
Performs normal reflection against the given object with the given type.
objectType: The type of object for which to retrieve the System.Reflection.IReflect.
instance: An instance of the type. Can be null.
Returns: A System.Type.
GetReflectionType(self: TypeDescriptionProvider, instance: object) -> Type
Performs normal reflection against the given object.
instance: An instance of the type (should not be null).
Returns: A System.Type.
GetReflectionType(self: TypeDescriptionProvider, objectType: Type) -> Type
Performs normal reflection against a type.
objectType: The type of object for which to retrieve the System.Reflection.IReflect.
Returns: A System.Type.
"""
pass
def GetRuntimeType(self, reflectionType):
"""
GetRuntimeType(self: TypeDescriptionProvider, reflectionType: Type) -> Type
Converts a reflection type into a runtime type.
reflectionType: The type to convert to its runtime equivalent.
Returns: A System.Type that represents the runtime equivalent of reflectionType.
"""
pass
def GetTypeDescriptor(self, *__args):
"""
GetTypeDescriptor(self: TypeDescriptionProvider, objectType: Type, instance: object) -> ICustomTypeDescriptor
Gets a custom type descriptor for the given type and object.
objectType: The type of object for which to retrieve the type descriptor.
instance: An instance of the type. Can be null if no instance was passed to the
System.ComponentModel.TypeDescriptor.
Returns: An System.ComponentModel.ICustomTypeDescriptor that can provide metadata for
the type.
GetTypeDescriptor(self: TypeDescriptionProvider, instance: object) -> ICustomTypeDescriptor
Gets a custom type descriptor for the given object.
instance: An instance of the type. Can be null if no instance was passed to the
System.ComponentModel.TypeDescriptor.
Returns: An System.ComponentModel.ICustomTypeDescriptor that can provide metadata for
the type.
GetTypeDescriptor(self: TypeDescriptionProvider, objectType: Type) -> ICustomTypeDescriptor
Gets a custom type descriptor for the given type.
objectType: The type of object for which to retrieve the type descriptor.
Returns: An System.ComponentModel.ICustomTypeDescriptor that can provide metadata for
the type.
"""
pass
def IsSupportedType(self, type):
"""
IsSupportedType(self: TypeDescriptionProvider, type: Type) -> bool
Gets a value that indicates whether the specified type is compatible with the
type description and its chain of type description providers.
type: The type to test for compatibility.
Returns: true if type is compatible with the type description and its chain of type
description providers; otherwise, false.
"""
pass
@staticmethod # known case of __new__
def __new__(self, *args): #cannot find CLR constructor
"""
__new__(cls: type)
__new__(cls: type, parent: TypeDescriptionProvider)
"""
pass
class TypeDescriptionProviderAttribute(Attribute, _Attribute):
"""
Specifies the custom type description provider for a class. This class cannot be inherited.
TypeDescriptionProviderAttribute(typeName: str)
TypeDescriptionProviderAttribute(type: Type)
"""
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type, typeName: str)
__new__(cls: type, type: Type)
"""
pass
TypeName = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the type name for the type description provider.
Get: TypeName(self: TypeDescriptionProviderAttribute) -> str
"""
class TypeDescriptor(object):
""" Provides information about the characteristics for a component, such as its attributes, properties, and events. This class cannot be inherited. """
@staticmethod
def AddAttributes(*__args):
"""
AddAttributes(instance: object, *attributes: Array[Attribute]) -> TypeDescriptionProvider
Adds class-level attributes to the target component instance.
instance: An instance of the target component.
attributes: An array of System.Attribute objects to add to the component's class.
Returns: The newly created System.ComponentModel.TypeDescriptionProvider that was used
to add the specified attributes.
AddAttributes(type: Type, *attributes: Array[Attribute]) -> TypeDescriptionProvider
Adds class-level attributes to the target component type.
type: The System.Type of the target component.
attributes: An array of System.Attribute objects to add to the component's class.
Returns: The newly created System.ComponentModel.TypeDescriptionProvider that was used
to add the specified attributes.
"""
pass
@staticmethod
def AddEditorTable(editorBaseType, table):
"""
AddEditorTable(editorBaseType: Type, table: Hashtable)
Adds an editor table for the given editor base type.
editorBaseType: The editor base type to add the editor table for. If a table already exists for
this type, this method will do nothing.
table: The System.Collections.Hashtable to add.
"""
pass
@staticmethod
def AddProvider(provider, *__args):
"""
AddProvider(provider: TypeDescriptionProvider, instance: object)
Adds a type description provider for a single instance of a component.
provider: The System.ComponentModel.TypeDescriptionProvider to add.
instance: An instance of the target component.
AddProvider(provider: TypeDescriptionProvider, type: Type)
Adds a type description provider for a component class.
provider: The System.ComponentModel.TypeDescriptionProvider to add.
type: The System.Type of the target component.
"""
pass
@staticmethod
def AddProviderTransparent(provider, *__args):
"""
AddProviderTransparent(provider: TypeDescriptionProvider, instance: object)
Adds a type description provider for a single instance of a component.
provider: The System.ComponentModel.TypeDescriptionProvider to add.
instance: An instance of the target component.
AddProviderTransparent(provider: TypeDescriptionProvider, type: Type)
Adds a type description provider for a component class.
provider: The System.ComponentModel.TypeDescriptionProvider to add.
type: The System.Type of the target component.
"""
pass
@staticmethod
def CreateAssociation(primary, secondary):
"""
CreateAssociation(primary: object, secondary: object)
Creates a primary-secondary association between two objects.
primary: The primary System.Object.
secondary: The secondary System.Object.
"""
pass
@staticmethod
def CreateDesigner(component, designerBaseType):
"""
CreateDesigner(component: IComponent, designerBaseType: Type) -> IDesigner
Creates an instance of the designer associated with the specified component and
of the specified type of designer.
component: An System.ComponentModel.IComponent that specifies the component to associate
with the designer.
designerBaseType: A System.Type that represents the type of designer to create.
Returns: An System.ComponentModel.Design.IDesigner that is an instance of the designer
for the component, or null if no designer can be found.
"""
pass
@staticmethod
def CreateEvent(componentType, *__args):
"""
CreateEvent(componentType: Type, oldEventDescriptor: EventDescriptor, *attributes: Array[Attribute]) -> EventDescriptor
Creates a new event descriptor that is identical to an existing event
descriptor, when passed the existing System.ComponentModel.EventDescriptor.
componentType: The type of the component for which to create the new event.
oldEventDescriptor: The existing event information.
attributes: The new attributes.
Returns: A new System.ComponentModel.EventDescriptor that has merged the specified
metadata attributes with the existing metadata attributes.
CreateEvent(componentType: Type, name: str, type: Type, *attributes: Array[Attribute]) -> EventDescriptor
Creates a new event descriptor that is identical to an existing event
descriptor by dynamically generating descriptor information from a specified
event on a type.
componentType: The type of the component the event lives on.
name: The name of the event.
type: The type of the delegate that handles the event.
attributes: The attributes for this event.
Returns: An System.ComponentModel.EventDescriptor that is bound to a type.
"""
pass
@staticmethod
def CreateInstance(provider, objectType, argTypes, args):
"""
CreateInstance(provider: IServiceProvider, objectType: Type, argTypes: Array[Type], args: Array[object]) -> object
Creates an object that can substitute for another data type.
provider: The service provider that provides a
System.ComponentModel.TypeDescriptionProvider service. This parameter can be
null.
objectType: The System.Type of object to create.
argTypes: An optional array of parameter types to be passed to the object's constructor.
This parameter can be null or an array of zero length.
args: An optional array of parameter values to pass to the object's constructor. If
not null, the number of elements must be the same as argTypes.
Returns: An instance of the substitute data type if an associated
System.ComponentModel.TypeDescriptionProvider is found; otherwise, null.
"""
pass
@staticmethod
def CreateProperty(componentType, *__args):
"""
CreateProperty(componentType: Type, oldPropertyDescriptor: PropertyDescriptor, *attributes: Array[Attribute]) -> PropertyDescriptor
Creates a new property descriptor from an existing property descriptor, using
the specified existing System.ComponentModel.PropertyDescriptor and attribute
array.
componentType: The System.Type of the component that the property is a member of.
oldPropertyDescriptor: The existing property descriptor.
attributes: The new attributes for this property.
Returns: A new System.ComponentModel.PropertyDescriptor that has the specified metadata
attributes merged with the existing metadata attributes.
CreateProperty(componentType: Type, name: str, type: Type, *attributes: Array[Attribute]) -> PropertyDescriptor
Creates and dynamically binds a property descriptor to a type, using the
specified property name, type, and attribute array.
componentType: The System.Type of the component that the property is a member of.
name: The name of the property.
type: The System.Type of the property.
attributes: The new attributes for this property.
Returns: A System.ComponentModel.PropertyDescriptor that is bound to the specified type
and that has the specified metadata attributes merged with the existing
metadata attributes.
"""
pass
@staticmethod
def GetAssociation(type, primary):
"""
GetAssociation(type: Type, primary: object) -> object
Returns an instance of the type associated with the specified primary object.
type: The System.Type of the target component.
primary: The primary object of the association.
Returns: An instance of the secondary type that has been associated with the primary
object if an association exists; otherwise, primary if no specified association
exists.
"""
pass
@staticmethod
def GetAttributes(*__args):
"""
GetAttributes(component: object, noCustomTypeDesc: bool) -> AttributeCollection
Returns a collection of attributes for the specified component and a Boolean
indicating that a custom type descriptor has been created.
component: The component for which you want to get attributes.
noCustomTypeDesc: true to use a baseline set of attributes from the custom type descriptor if
component is of type System.ComponentModel.ICustomTypeDescriptor; otherwise,
false.
Returns: An System.ComponentModel.AttributeCollection with the attributes for the
component. If the component is null, this method returns an empty collection.
GetAttributes(component: object) -> AttributeCollection
Returns the collection of attributes for the specified component.
component: The component for which you want to get attributes.
Returns: An System.ComponentModel.AttributeCollection containing the attributes for the
component. If component is null, this method returns an empty collection.
GetAttributes(componentType: Type) -> AttributeCollection
Returns a collection of attributes for the specified type of component.
componentType: The System.Type of the target component.
Returns: An System.ComponentModel.AttributeCollection with the attributes for the type
of the component. If the component is null, this method returns an empty
collection.
"""
pass
@staticmethod
def GetClassName(*__args):
"""
GetClassName(componentType: Type) -> str
Returns the name of the class for the specified type.
componentType: The System.Type of the target component.
Returns: A System.String containing the name of the class for the specified component
type.
GetClassName(component: object, noCustomTypeDesc: bool) -> str
Returns the name of the class for the specified component using a custom type
descriptor.
component: The System.Object for which you want the class name.
noCustomTypeDesc: true to consider custom type description information; otherwise, false.
Returns: A System.String containing the name of the class for the specified component.
GetClassName(component: object) -> str
Returns the name of the class for the specified component using the default
type descriptor.
component: The System.Object for which you want the class name.
Returns: A System.String containing the name of the class for the specified component.
"""
pass
@staticmethod
def GetComponentName(component, noCustomTypeDesc=None):
"""
GetComponentName(component: object, noCustomTypeDesc: bool) -> str
Returns the name of the specified component using a custom type descriptor.
component: The System.Object for which you want the class name.
noCustomTypeDesc: true to consider custom type description information; otherwise, false.
Returns: The name of the class for the specified component, or null if there is no
component name.
GetComponentName(component: object) -> str
Returns the name of the specified component using the default type descriptor.
component: The System.Object for which you want the class name.
Returns: A System.String containing the name of the specified component, or null if
there is no component name.
"""
pass
@staticmethod
def GetConverter(*__args):
"""
GetConverter(type: Type) -> TypeConverter
Returns a type converter for the specified type.
type: The System.Type of the target component.
Returns: A System.ComponentModel.TypeConverter for the specified type.
GetConverter(component: object, noCustomTypeDesc: bool) -> TypeConverter
Returns a type converter for the type of the specified component with a custom
type descriptor.
component: A component to get the converter for.
noCustomTypeDesc: true to consider custom type description information; otherwise, false.
Returns: A System.ComponentModel.TypeConverter for the specified component.
GetConverter(component: object) -> TypeConverter
Returns a type converter for the type of the specified component.
component: A component to get the converter for.
Returns: A System.ComponentModel.TypeConverter for the specified component.
"""
pass
@staticmethod
def GetDefaultEvent(*__args):
"""
GetDefaultEvent(component: object, noCustomTypeDesc: bool) -> EventDescriptor
Returns the default event for a component with a custom type descriptor.
component: The component to get the event for.
noCustomTypeDesc: true to consider custom type description information; otherwise, false.
Returns: An System.ComponentModel.EventDescriptor with the default event, or null if
there are no events.
GetDefaultEvent(component: object) -> EventDescriptor
Returns the default event for the specified component.
component: The component to get the event for.
Returns: An System.ComponentModel.EventDescriptor with the default event, or null if
there are no events.
GetDefaultEvent(componentType: Type) -> EventDescriptor
Returns the default event for the specified type of component.
componentType: The System.Type of the target component.
Returns: An System.ComponentModel.EventDescriptor with the default event, or null if
there are no events.
"""
pass
@staticmethod
def GetDefaultProperty(*__args):
"""
GetDefaultProperty(component: object, noCustomTypeDesc: bool) -> PropertyDescriptor
Returns the default property for the specified component with a custom type
descriptor.
component: The component to get the default property for.
noCustomTypeDesc: true to consider custom type description information; otherwise, false.
Returns: A System.ComponentModel.PropertyDescriptor with the default property, or null
if there are no properties.
GetDefaultProperty(component: object) -> PropertyDescriptor
Returns the default property for the specified component.
component: The component to get the default property for.
Returns: A System.ComponentModel.PropertyDescriptor with the default property, or null
if there are no properties.
GetDefaultProperty(componentType: Type) -> PropertyDescriptor
Returns the default property for the specified type of component.
componentType: A System.Type that represents the class to get the property for.
Returns: A System.ComponentModel.PropertyDescriptor with the default property, or null
if there are no properties.
"""
pass
@staticmethod
def GetEditor(*__args):
"""
GetEditor(type: Type, editorBaseType: Type) -> object
Returns an editor with the specified base type for the specified type.
type: The System.Type of the target component.
editorBaseType: A System.Type that represents the base type of the editor you are trying to
find.
Returns: An instance of the editor object that can be cast to the given base type, or
null if no editor of the requested type can be found.
GetEditor(component: object, editorBaseType: Type, noCustomTypeDesc: bool) -> object
Returns an editor with the specified base type and with a custom type
descriptor for the specified component.
component: The component to get the editor for.
editorBaseType: A System.Type that represents the base type of the editor you want to find.
noCustomTypeDesc: A flag indicating whether custom type description information should be
considered.
Returns: An instance of the editor that can be cast to the specified editor type, or
null if no editor of the requested type can be found.
GetEditor(component: object, editorBaseType: Type) -> object
Gets an editor with the specified base type for the specified component.
component: The component to get the editor for.
editorBaseType: A System.Type that represents the base type of the editor you want to find.
Returns: An instance of the editor that can be cast to the specified editor type, or
null if no editor of the requested type can be found.
"""
pass
@staticmethod
def GetEvents(*__args):
"""
GetEvents(component: object, noCustomTypeDesc: bool) -> EventDescriptorCollection
Returns the collection of events for a specified component with a custom type
descriptor.
component: A component to get the events for.
noCustomTypeDesc: true to consider custom type description information; otherwise, false.
Returns: An System.ComponentModel.EventDescriptorCollection with the events for this
component.
GetEvents(component: object, attributes: Array[Attribute]) -> EventDescriptorCollection
Returns the collection of events for a specified component using a specified
array of attributes as a filter.
component: A component to get the events for.
attributes: An array of type System.Attribute that you can use as a filter.
Returns: An System.ComponentModel.EventDescriptorCollection with the events that match
the specified attributes for this component.
GetEvents(component: object, attributes: Array[Attribute], noCustomTypeDesc: bool) -> EventDescriptorCollection
Returns the collection of events for a specified component using a specified
array of attributes as a filter and using a custom type descriptor.
component: A component to get the events for.
attributes: An array of type System.Attribute to use as a filter.
noCustomTypeDesc: true to consider custom type description information; otherwise, false.
Returns: An System.ComponentModel.EventDescriptorCollection with the events that match
the specified attributes for this component.
GetEvents(componentType: Type) -> EventDescriptorCollection
Returns the collection of events for a specified type of component.
componentType: The System.Type of the target component.
Returns: An System.ComponentModel.EventDescriptorCollection with the events for this
component.
GetEvents(componentType: Type, attributes: Array[Attribute]) -> EventDescriptorCollection
Returns the collection of events for a specified type of component using a
specified array of attributes as a filter.
componentType: The System.Type of the target component.
attributes: An array of type System.Attribute that you can use as a filter.
Returns: An System.ComponentModel.EventDescriptorCollection with the events that match
the specified attributes for this component.
GetEvents(component: object) -> EventDescriptorCollection
Returns the collection of events for the specified component.
component: A component to get the events for.
Returns: An System.ComponentModel.EventDescriptorCollection with the events for this
component.
"""
pass
@staticmethod
def GetFullComponentName(component):
"""
GetFullComponentName(component: object) -> str
Returns the fully qualified name of the component.
component: The System.ComponentModel.Component to find the name for.
Returns: The fully qualified name of the specified component, or null if the component
has no name.
"""
pass
@staticmethod
def GetProperties(*__args):
"""
GetProperties(component: object, noCustomTypeDesc: bool) -> PropertyDescriptorCollection
Returns the collection of properties for a specified component using the
default type descriptor.
component: A component to get the properties for.
noCustomTypeDesc: true to not consider custom type description information; otherwise, false.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties for a
specified component.
GetProperties(component: object, attributes: Array[Attribute]) -> PropertyDescriptorCollection
Returns the collection of properties for a specified component using a
specified array of attributes as a filter.
component: A component to get the properties for.
attributes: An array of type System.Attribute to use as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
match the specified attributes for the specified component.
GetProperties(component: object, attributes: Array[Attribute], noCustomTypeDesc: bool) -> PropertyDescriptorCollection
Returns the collection of properties for a specified component using a
specified array of attributes as a filter and using a custom type descriptor.
component: A component to get the properties for.
attributes: An array of type System.Attribute to use as a filter.
noCustomTypeDesc: true to consider custom type description information; otherwise, false.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the events that match
the specified attributes for the specified component.
GetProperties(componentType: Type) -> PropertyDescriptorCollection
Returns the collection of properties for a specified type of component.
componentType: A System.Type that represents the component to get properties for.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties for a
specified type of component.
GetProperties(componentType: Type, attributes: Array[Attribute]) -> PropertyDescriptorCollection
Returns the collection of properties for a specified type of component using a
specified array of attributes as a filter.
componentType: The System.Type of the target component.
attributes: An array of type System.Attribute to use as a filter.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties that
match the specified attributes for this type of component.
GetProperties(component: object) -> PropertyDescriptorCollection
Returns the collection of properties for a specified component.
component: A component to get the properties for.
Returns: A System.ComponentModel.PropertyDescriptorCollection with the properties for
the specified component.
"""
pass
@staticmethod
def GetProvider(*__args):
"""
GetProvider(instance: object) -> TypeDescriptionProvider
Returns the type description provider for the specified component.
instance: An instance of the target component.
Returns: A System.ComponentModel.TypeDescriptionProvider associated with the specified
component.
GetProvider(type: Type) -> TypeDescriptionProvider
Returns the type description provider for the specified type.
type: The System.Type of the target component.
Returns: A System.ComponentModel.TypeDescriptionProvider associated with the specified
type.
"""
pass
@staticmethod
def GetReflectionType(*__args):
"""
GetReflectionType(instance: object) -> Type
Returns a System.Type that can be used to perform reflection, given an object.
instance: An instance of the target component.
Returns: A System.Type for the specified object.
GetReflectionType(type: Type) -> Type
Returns a System.Type that can be used to perform reflection, given a class
type.
type: The System.Type of the target component.
Returns: A System.Type of the specified class.
"""
pass
@staticmethod
def Refresh(*__args):
"""
Refresh(module: Module)
Clears the properties and events for the specified module from the cache.
module: The System.Reflection.Module that represents the module to refresh. Each
System.Type in this module will be refreshed.
Refresh(assembly: Assembly)
Clears the properties and events for the specified assembly from the cache.
assembly: The System.Reflection.Assembly that represents the assembly to refresh. Each
System.Type in this assembly will be refreshed.
Refresh(component: object)
Clears the properties and events for the specified component from the cache.
component: A component for which the properties or events have changed.
Refresh(type: Type)
Clears the properties and events for the specified type of component from the
cache.
type: The System.Type of the target component.
"""
pass
@staticmethod
def RemoveAssociation(primary, secondary):
"""
RemoveAssociation(primary: object, secondary: object)
Removes an association between two objects.
primary: The primary System.Object.
secondary: The secondary System.Object.
"""
pass
@staticmethod
def RemoveAssociations(primary):
"""
RemoveAssociations(primary: object)
Removes all associations for a primary object.
primary: The primary System.Object in an association.
"""
pass
@staticmethod
def RemoveProvider(provider, *__args):
"""
RemoveProvider(provider: TypeDescriptionProvider, instance: object)
Removes a previously added type description provider that is associated with
the specified object.
provider: The System.ComponentModel.TypeDescriptionProvider to remove.
instance: An instance of the target component.
RemoveProvider(provider: TypeDescriptionProvider, type: Type)
Removes a previously added type description provider that is associated with
the specified type.
provider: The System.ComponentModel.TypeDescriptionProvider to remove.
type: The System.Type of the target component.
"""
pass
@staticmethod
def RemoveProviderTransparent(provider, *__args):
"""
RemoveProviderTransparent(provider: TypeDescriptionProvider, instance: object)
Removes a previously added type description provider that is associated with
the specified object.
provider: The System.ComponentModel.TypeDescriptionProvider to remove.
instance: An instance of the target component.
RemoveProviderTransparent(provider: TypeDescriptionProvider, type: Type)
Removes a previously added type description provider that is associated with
the specified type.
provider: The System.ComponentModel.TypeDescriptionProvider to remove.
type: The System.Type of the target component.
"""
pass
@staticmethod
def SortDescriptorArray(infos):
"""
SortDescriptorArray(infos: IList)
Sorts descriptors using the name of the descriptor.
infos: An System.Collections.IList that contains the descriptors to sort.
"""
pass
ComNativeDescriptorHandler = None
ComObjectType = None
InterfaceType = None
Refreshed = None
class TypeListConverter(TypeConverter):
""" Provides a type converter that can be used to populate a list box with available types. """
def CanConvertFrom(self, *__args):
"""
CanConvertFrom(self: TypeListConverter, context: ITypeDescriptorContext, sourceType: Type) -> bool
Gets a value indicating whether this converter can convert the specified
System.Type of the source object using the given context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType: The System.Type of the source object.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def CanConvertTo(self, *__args):
"""
CanConvertTo(self: TypeListConverter, context: ITypeDescriptorContext, destinationType: Type) -> bool
Gets a value indicating whether this converter can convert an object to the
given destination type using the context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
destinationType: A System.Type that represents the type you wish to convert to.
Returns: true if this converter can perform the conversion; otherwise, false.
"""
pass
def ConvertFrom(self, *__args):
"""
ConvertFrom(self: TypeListConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object) -> object
Converts the specified object to the native type of the converter.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: A System.Globalization.CultureInfo that specifies the culture used to represent
the font.
value: The System.Object to convert.
Returns: An System.Object that represents the converted value.
"""
pass
def ConvertTo(self, *__args):
"""
ConvertTo(self: TypeListConverter, context: ITypeDescriptorContext, culture: CultureInfo, value: object, destinationType: Type) -> object
Converts the given value object to the specified destination type.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
culture: An optional System.Globalization.CultureInfo. If not supplied, the current
culture is assumed.
value: The System.Object to convert.
destinationType: The System.Type to convert the value to.
Returns: An System.Object that represents the converted value.
"""
pass
def GetStandardValues(self, context=None):
"""
GetStandardValues(self: TypeListConverter, context: ITypeDescriptorContext) -> StandardValuesCollection
Gets a collection of standard values for the data type this validator is
designed for.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: A System.ComponentModel.TypeConverter.StandardValuesCollection that holds a
standard set of valid values, or null if the data type does not support a
standard set of values.
"""
pass
def GetStandardValuesExclusive(self, context=None):
"""
GetStandardValuesExclusive(self: TypeListConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether the list of standard values returned from the
System.ComponentModel.TypeListConverter.GetStandardValues(System.ComponentModel.
ITypeDescriptorContext) method is an exclusive list.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true because the System.ComponentModel.TypeConverter.StandardValuesCollection
returned from
System.ComponentModel.TypeListConverter.GetStandardValues(System.ComponentModel.
ITypeDescriptorContext) is an exhaustive list of possible values. This method
never returns false.
"""
pass
def GetStandardValuesSupported(self, context=None):
"""
GetStandardValuesSupported(self: TypeListConverter, context: ITypeDescriptorContext) -> bool
Gets a value indicating whether this object supports a standard set of values
that can be picked from a list using the specified context.
context: An System.ComponentModel.ITypeDescriptorContext that provides a format context.
Returns: true because
System.ComponentModel.TypeListConverter.GetStandardValues(System.ComponentModel.
ITypeDescriptorContext) should be called to find a common set of values the
object supports. This method never returns false.
"""
pass
@staticmethod # known case of __new__
def __new__(self, *args): #cannot find CLR constructor
""" __new__(cls: type, types: Array[Type]) """
pass
class UInt16Converter(BaseNumberConverter):
"""
Provides a type converter to convert 16-bit unsigned integer objects to and from other representations.
UInt16Converter()
"""
class UInt32Converter(BaseNumberConverter):
"""
Provides a type converter to convert 32-bit unsigned integer objects to and from various other representations.
UInt32Converter()
"""
class UInt64Converter(BaseNumberConverter):
"""
Provides a type converter to convert 64-bit unsigned integer objects to and from other representations.
UInt64Converter()
"""
class WarningException(SystemException, ISerializable, _Exception):
"""
Specifies an exception that is handled as a warning instead of an error.
WarningException()
WarningException(message: str)
WarningException(message: str, helpUrl: str)
WarningException(message: str, innerException: Exception)
WarningException(message: str, helpUrl: str, helpTopic: str)
"""
def add_SerializeObjectState(self, *args): #cannot find CLR method
""" add_SerializeObjectState(self: Exception, value: EventHandler[SafeSerializationEventArgs]) """
pass
def GetObjectData(self, info, context):
"""
GetObjectData(self: WarningException, info: SerializationInfo, context: StreamingContext)
Sets the System.Runtime.Serialization.SerializationInfo with the parameter name
and additional exception information.
info: Stores the data that was being used to serialize or deserialize the object that
the System.ComponentModel.Design.Serialization.CodeDomSerializer was
serializing or deserializing.
context: Describes the source and destination of the stream that generated the
exception, as well as a means for serialization to retain that context and an
additional caller-defined context.
"""
pass
def remove_SerializeObjectState(self, *args): #cannot find CLR method
""" remove_SerializeObjectState(self: Exception, value: EventHandler[SafeSerializationEventArgs]) """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, message=None, *__args):
"""
__new__(cls: type)
__new__(cls: type, message: str)
__new__(cls: type, message: str, helpUrl: str)
__new__(cls: type, message: str, innerException: Exception)
__new__(cls: type, message: str, helpUrl: str, helpTopic: str)
__new__(cls: type, info: SerializationInfo, context: StreamingContext)
"""
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
HelpTopic = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the Help topic associated with the warning.
Get: HelpTopic(self: WarningException) -> str
"""
HelpUrl = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the Help file associated with the warning.
Get: HelpUrl(self: WarningException) -> str
"""
class Win32Exception(ExternalException, ISerializable, _Exception):
"""
Throws an exception for a Win32 error code.
Win32Exception()
Win32Exception(error: int)
Win32Exception(error: int, message: str)
Win32Exception(message: str)
Win32Exception(message: str, innerException: Exception)
"""
def add_SerializeObjectState(self, *args): #cannot find CLR method
""" add_SerializeObjectState(self: Exception, value: EventHandler[SafeSerializationEventArgs]) """
pass
def GetObjectData(self, info, context):
"""
GetObjectData(self: Win32Exception, info: SerializationInfo, context: StreamingContext)
Sets the System.Runtime.Serialization.SerializationInfo object with the file
name and line number at which this System.ComponentModel.Win32Exception
occurred.
info: A System.Runtime.Serialization.SerializationInfo.
context: The contextual information about the source or destination.
"""
pass
def remove_SerializeObjectState(self, *args): #cannot find CLR method
""" remove_SerializeObjectState(self: Exception, value: EventHandler[SafeSerializationEventArgs]) """
pass
def __init__(self, *args): #cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod # known case of __new__
def __new__(self, *__args):
"""
__new__(cls: type)
__new__(cls: type, error: int)
__new__(cls: type, error: int, message: str)
__new__(cls: type, message: str)
__new__(cls: type, message: str, innerException: Exception)
__new__(cls: type, info: SerializationInfo, context: StreamingContext)
"""
pass
def __reduce_ex__(self, *args): #cannot find CLR method
pass
def __str__(self, *args): #cannot find CLR method
pass
NativeErrorCode = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""Gets the Win32 error code associated with this exception.
Get: NativeErrorCode(self: Win32Exception) -> int
"""
# variables with complex values
| 39.988315
| 376
| 0.627895
| 60,018
| 585,189
| 5.971492
| 0.030974
| 0.024861
| 0.023164
| 0.029783
| 0.759169
| 0.724738
| 0.680876
| 0.647254
| 0.620466
| 0.60041
| 0.00001
| 0.000634
| 0.299754
| 585,189
| 14,633
| 377
| 39.991048
| 0.873968
| 0.030899
| 0
| 0.780938
| 0
| 0
| 0.000939
| 0.000186
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.369743
| 0
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
77340d4a81b0a602f0ec69ffe73cb8971674007e
| 137
|
py
|
Python
|
code/Solutions TP1/affiche.py
|
christophesaintjean/IntroProgS1_2020
|
99555d1e3681d88ee023592a16caecdec6f7c0b4
|
[
"CC0-1.0"
] | null | null | null |
code/Solutions TP1/affiche.py
|
christophesaintjean/IntroProgS1_2020
|
99555d1e3681d88ee023592a16caecdec6f7c0b4
|
[
"CC0-1.0"
] | null | null | null |
code/Solutions TP1/affiche.py
|
christophesaintjean/IntroProgS1_2020
|
99555d1e3681d88ee023592a16caecdec6f7c0b4
|
[
"CC0-1.0"
] | null | null | null |
print("Nous sommes en Septembre 2020,")
print("Mon premier programme Python")
print("a pour nom affiche, son code source est affiche.py")
| 45.666667
| 59
| 0.766423
| 22
| 137
| 4.772727
| 0.863636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033333
| 0.124088
| 137
| 3
| 59
| 45.666667
| 0.841667
| 0
| 0
| 0
| 0
| 0
| 0.782609
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
91f803941f3c4f1c8fd2578d3d8b6bb359a09820
| 150
|
py
|
Python
|
src/loadimpact/urls.py
|
nffdiogosilva/Data-Center-REST-API
|
7c34302103cf769f7f861cda970c41c4f9bbac27
|
[
"MIT"
] | null | null | null |
src/loadimpact/urls.py
|
nffdiogosilva/Data-Center-REST-API
|
7c34302103cf769f7f861cda970c41c4f9bbac27
|
[
"MIT"
] | null | null | null |
src/loadimpact/urls.py
|
nffdiogosilva/Data-Center-REST-API
|
7c34302103cf769f7f861cda970c41c4f9bbac27
|
[
"MIT"
] | null | null | null |
from django.urls import include, path
from .views import best_datacenter_setup
urlpatterns = [
path('best-dc-setup', best_datacenter_setup),
]
| 16.666667
| 49
| 0.76
| 20
| 150
| 5.5
| 0.6
| 0.254545
| 0.345455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146667
| 150
| 8
| 50
| 18.75
| 0.859375
| 0
| 0
| 0
| 0
| 0
| 0.086667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
6220959f131e925d700c6aacdd768e91354c56b7
| 139
|
py
|
Python
|
mmdet3d/core/evaluation/evaluation_3d/matchers/__init__.py
|
SimonDoll/mmdetection3d
|
742e325dc8a31ef1d6775bb592076de973eeccb8
|
[
"Apache-2.0"
] | 1
|
2021-04-15T12:29:57.000Z
|
2021-04-15T12:29:57.000Z
|
mmdet3d/core/evaluation/evaluation_3d/matchers/__init__.py
|
SimonDoll/mmdetection3d
|
742e325dc8a31ef1d6775bb592076de973eeccb8
|
[
"Apache-2.0"
] | null | null | null |
mmdet3d/core/evaluation/evaluation_3d/matchers/__init__.py
|
SimonDoll/mmdetection3d
|
742e325dc8a31ef1d6775bb592076de973eeccb8
|
[
"Apache-2.0"
] | null | null | null |
from .greedy_matcher import GreedyMatcher
from .hungarian_matcher import HungarianMatcher
__all__ = ["GreedyMatcher", "HungarianMatcher"]
| 27.8
| 47
| 0.834532
| 13
| 139
| 8.461538
| 0.615385
| 0.236364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093525
| 139
| 4
| 48
| 34.75
| 0.873016
| 0
| 0
| 0
| 0
| 0
| 0.208633
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
6249c11df18c203fa46250f8afa9e3cecf502437
| 90
|
py
|
Python
|
docs/repo_util.py
|
djoulz22/pycom-esp-idf
|
ac081fd114befe25a8a754bffdf88c71e018beb1
|
[
"Apache-2.0"
] | 104
|
2017-05-04T09:55:08.000Z
|
2022-03-22T11:29:05.000Z
|
docs/repo_util.py
|
djoulz22/pycom-esp-idf
|
ac081fd114befe25a8a754bffdf88c71e018beb1
|
[
"Apache-2.0"
] | 28
|
2017-08-01T09:19:23.000Z
|
2017-12-26T13:41:14.000Z
|
docs/repo_util.py
|
djoulz22/pycom-esp-idf
|
ac081fd114befe25a8a754bffdf88c71e018beb1
|
[
"Apache-2.0"
] | 59
|
2016-11-15T06:07:56.000Z
|
2022-02-05T17:03:32.000Z
|
import re
import os
def run_cmd_get_output(cmd):
return os.popen(cmd).read().strip()
| 15
| 39
| 0.722222
| 16
| 90
| 3.875
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144444
| 90
| 5
| 40
| 18
| 0.805195
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.5
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
|
0
| 5
|
624abb075b5de25e6283b8b36b00f68d4ac1eb43
| 240
|
py
|
Python
|
tests/integration/cli/projects/script/scripts/site.py
|
Ninjagod1251/ape
|
9b40ef15f25362ddb83cb6d571d60cab041fce4a
|
[
"Apache-2.0"
] | 1
|
2022-01-25T21:26:01.000Z
|
2022-01-25T21:26:01.000Z
|
tests/integration/cli/projects/script/scripts/site.py
|
Ninjagod1251/ape
|
9b40ef15f25362ddb83cb6d571d60cab041fce4a
|
[
"Apache-2.0"
] | 1
|
2022-02-12T01:31:16.000Z
|
2022-02-22T00:26:49.000Z
|
tests/integration/cli/projects/script/scripts/site.py
|
Ninjagod1251/ape
|
9b40ef15f25362ddb83cb6d571d60cab041fce4a
|
[
"Apache-2.0"
] | null | null | null |
# This script proves that we are allowed to have scripts
# with the same name as a built-in site package, e.g. `site.py`.
# This script also shows that the module doesn't load until called.
print("Super secret script output") # noqa: T001
| 48
| 67
| 0.741667
| 43
| 240
| 4.139535
| 0.860465
| 0.11236
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015228
| 0.179167
| 240
| 4
| 68
| 60
| 0.888325
| 0.808333
| 0
| 0
| 0
| 0
| 0.634146
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 0
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
627683893547991c70e71e08ba90395024b9700b
| 5,106
|
py
|
Python
|
api/sdis/machine_components/interface.py
|
cypherpath/sdios-api-sdk
|
dbef980ee68844688e9911443571eca06ee02a6a
|
[
"MIT"
] | 1
|
2020-12-04T13:32:19.000Z
|
2020-12-04T13:32:19.000Z
|
api/sdis/machine_components/interface.py
|
cypherpath/sdios-api-sdk
|
dbef980ee68844688e9911443571eca06ee02a6a
|
[
"MIT"
] | null | null | null |
api/sdis/machine_components/interface.py
|
cypherpath/sdios-api-sdk
|
dbef980ee68844688e9911443571eca06ee02a6a
|
[
"MIT"
] | 4
|
2019-05-07T00:35:06.000Z
|
2020-02-08T17:35:33.000Z
|
"""InterfaceDriver class object"""
from typing import Any, Dict
from api.sdis.machine_components.base_machine import BaseMachine
from api.driver import APIDriver
from api.driver import APIResponse
from settings.urls import APICategory
class InterfaceDriver(BaseMachine):
"""Make all machine interface API calls."""
_category = APICategory.MACHINE_INTERFACES
def __init__(self, api_driver: APIDriver) -> None:
"""Initialize InterfaceDriver class
:param api_driver: Allows the driver to communicate with SDI OS
:type api_driver: APIDriver class object
"""
super().__init__(api_driver)
def get_interfaces(self, machine_id: str) -> APIResponse:
"""Get machine's interfaces and return response."""
return self._get("list", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id})
def create_interface(self, machine_id: str, data: Dict[str, Any]) -> APIResponse:
"""Create interface for machine and return response."""
return self._post("list", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id}, data)
def get_interface(self, machine_id: str, conn_id: str) -> APIResponse:
"""Get interface's detail and return response."""
return self._get("detail", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id})
def modify_interface(self, machine_id: str, conn_id: str, data: Dict[str, Any]) -> APIResponse:
"""Modify an interface and return a response."""
return self._put("detail", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id}, data)
def delete_interface(self, machine_id: str, conn_id: str) -> APIResponse:
"""Delete an interface and return a response."""
return self._delete("detail", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id})
def get_ports(self, machine_id: str, conn_id: str) -> APIResponse:
"""Get the machine's port list and return a response."""
return self._get("port_list", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id})
def get_vlans(self, machine_id: str, conn_id: str) -> APIResponse:
"""Get the machine's vlan list and return a response."""
return self._get("vlan_list", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id})
def create_vlan(self, machine_id: str, conn_id: str, data: Dict[str, Any]) -> APIResponse:
"""Create a machine vlan and return response."""
return self._post("vlan_list", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id}, data)
def get_vlan(self, machine_id: str, conn_id: str, vlan_id: int) -> APIResponse:
"""Get machine's vlan details and return response."""
return self._get("vlan_detail", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id, "vlan_id": vlan_id})
def modify_vlan(self, machine_id: str, conn_id: str, vlan_id: int, data: Dict[str, Any]) -> APIResponse:
"""Modify machine's vlan and return response."""
return self._put("vlan_detail", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id, "vlan_id": vlan_id}, data)
def delete_vlan(self, machine_id: str, conn_id: str, vlan_id: int) -> APIResponse:
"""Delete machine's vlan and return response."""
return self._delete("vlan_detail", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id, "vlan_id": vlan_id})
def get_vlan_ports(self, machine_id: str, conn_id: str, vlan_id: int) -> APIResponse:
"""Get machine's vlan port forwarders and return response."""
return self._get("vlan_port_list", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id, "vlan_id": vlan_id})
def create_vlan_port(self, machine_id: str, conn_id: str, vlan_id: int, data: Dict[str, Any]) -> APIResponse:
"""Create a vlan port forwarder and return response."""
return self._post("vlan_port_list", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id, "vlan_id": vlan_id}, data)
def get_vlan_port(self, machine_id: str, conn_id: str, vlan_id: int, port_id: int) -> APIResponse:
"""Get vlan port forwarder and return response."""
return self._get("vlan_port_detail", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id, "vlan_id": vlan_id, "port_id": port_id})
def delete_vlan_port(self, machine_id: str, conn_id: str, vlan_id: int, port_id: int) -> APIResponse:
"""Delete vlan port forwarder and return response."""
return self._delete("vlan_port_detail", {"pk": self.user_pk, "sdi_id": self.sdi_pk, "machine_id": machine_id, "connection_id": conn_id, "vlan_id": vlan_id, "port_id": port_id})
| 63.037037
| 184
| 0.686643
| 763
| 5,106
| 4.306684
| 0.093054
| 0.12325
| 0.059343
| 0.073037
| 0.786062
| 0.77815
| 0.745587
| 0.71972
| 0.580949
| 0.552648
| 0
| 0
| 0.168038
| 5,106
| 80
| 185
| 63.825
| 0.77354
| 0.178026
| 0
| 0
| 0
| 0
| 0.158785
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.410256
| false
| 0
| 0.128205
| 0
| 0.974359
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
655743849ed53ab7cf5608a70ec6498f7b471980
| 184
|
py
|
Python
|
khs/internet_check/admin.py
|
KaiserMovet/k-homeServer3
|
d45395fbbf1eb9b1f38f65411db60b6b927381f8
|
[
"MIT"
] | 1
|
2021-01-07T15:54:40.000Z
|
2021-01-07T15:54:40.000Z
|
khs/internet_check/admin.py
|
KaiserMovet/k-home_server_3
|
d45395fbbf1eb9b1f38f65411db60b6b927381f8
|
[
"MIT"
] | null | null | null |
khs/internet_check/admin.py
|
KaiserMovet/k-home_server_3
|
d45395fbbf1eb9b1f38f65411db60b6b927381f8
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import InternetSpeed, InternetStatus
# Register your models here.
admin.site.register(InternetSpeed)
admin.site.register(InternetStatus)
| 26.285714
| 49
| 0.836957
| 22
| 184
| 7
| 0.545455
| 0.116883
| 0.220779
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092391
| 184
| 6
| 50
| 30.666667
| 0.922156
| 0.141304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
65796578a2965cd02a52bbefa44f88bc7da0a580
| 32
|
py
|
Python
|
app/core/tools/__init__.py
|
Matexer/BSPR
|
a503a8795cb0f4cebe2eedd148aa00aea75b570e
|
[
"MIT"
] | null | null | null |
app/core/tools/__init__.py
|
Matexer/BSPR
|
a503a8795cb0f4cebe2eedd148aa00aea75b570e
|
[
"MIT"
] | null | null | null |
app/core/tools/__init__.py
|
Matexer/BSPR
|
a503a8795cb0f4cebe2eedd148aa00aea75b570e
|
[
"MIT"
] | null | null | null |
from .integrals import Integrals
| 32
| 32
| 0.875
| 4
| 32
| 7
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 32
| 1
| 32
| 32
| 0.965517
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
658546e1d30f1883f3a70f3c7ae902906acda005
| 23
|
py
|
Python
|
mOle32/__init__.py
|
SkyLined/mWindowsSDK
|
931cc9d30316893662a3dc4e200dabe97122d216
|
[
"CC-BY-4.0"
] | 2
|
2019-08-01T15:08:25.000Z
|
2021-01-30T07:29:34.000Z
|
mOle32/__init__.py
|
SkyLined/mWindowsSDK
|
931cc9d30316893662a3dc4e200dabe97122d216
|
[
"CC-BY-4.0"
] | null | null | null |
mOle32/__init__.py
|
SkyLined/mWindowsSDK
|
931cc9d30316893662a3dc4e200dabe97122d216
|
[
"CC-BY-4.0"
] | null | null | null |
from .mOle32 import *;
| 11.5
| 22
| 0.695652
| 3
| 23
| 5.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 0.173913
| 23
| 1
| 23
| 23
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
658a90db6ea0f0c4a2b4a672bb7e3faeb46f07c6
| 47
|
py
|
Python
|
tests/__init__.py
|
Casperjamin/Plasmidsimilarity
|
8cdd38e92cf9fd735fec2265fbbebbeb11e3e2c1
|
[
"BSD-3-Clause"
] | null | null | null |
tests/__init__.py
|
Casperjamin/Plasmidsimilarity
|
8cdd38e92cf9fd735fec2265fbbebbeb11e3e2c1
|
[
"BSD-3-Clause"
] | 10
|
2020-03-29T18:05:42.000Z
|
2022-01-25T13:41:04.000Z
|
tests/__init__.py
|
Casperjamin/Plasmidsimilarity
|
8cdd38e92cf9fd735fec2265fbbebbeb11e3e2c1
|
[
"BSD-3-Clause"
] | 1
|
2020-07-08T08:07:08.000Z
|
2020-07-08T08:07:08.000Z
|
"""Unit test package for Plasmidsimilarity."""
| 23.5
| 46
| 0.744681
| 5
| 47
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106383
| 47
| 1
| 47
| 47
| 0.833333
| 0.851064
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
65b56b0b4d2dcd27ba760b90fab8e02b6216f1e1
| 34
|
py
|
Python
|
code_analysis/old/new_parser/__init__.py
|
AnacletoLAB/ensmallen_graph
|
b2c1b18fb1e5801712852bcc239f239e03076f09
|
[
"MIT"
] | 5
|
2021-02-17T00:44:45.000Z
|
2021-08-09T16:41:47.000Z
|
code_analysis/old/new_parser/__init__.py
|
AnacletoLAB/ensmallen_graph
|
b2c1b18fb1e5801712852bcc239f239e03076f09
|
[
"MIT"
] | 18
|
2021-01-07T16:47:39.000Z
|
2021-08-12T21:51:32.000Z
|
code_analysis/old/new_parser/__init__.py
|
AnacletoLAB/ensmallen
|
b2c1b18fb1e5801712852bcc239f239e03076f09
|
[
"MIT"
] | 3
|
2021-01-14T02:20:59.000Z
|
2021-08-04T19:09:52.000Z
|
from .analysis import get_analysis
| 34
| 34
| 0.882353
| 5
| 34
| 5.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088235
| 34
| 1
| 34
| 34
| 0.935484
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
65befe079f5eb3c87b707ef488a6eca8817702d1
| 162
|
py
|
Python
|
TinyintException/tinyintexception.py
|
santiagogeliz/TinyintException-
|
b85d3cf823079dd41b9045a14ef9e13817b6453e
|
[
"MIT"
] | null | null | null |
TinyintException/tinyintexception.py
|
santiagogeliz/TinyintException-
|
b85d3cf823079dd41b9045a14ef9e13817b6453e
|
[
"MIT"
] | null | null | null |
TinyintException/tinyintexception.py
|
santiagogeliz/TinyintException-
|
b85d3cf823079dd41b9045a14ef9e13817b6453e
|
[
"MIT"
] | null | null | null |
class TinyIntError(Exception):
def __init__(self):
self.message = 'El numero entregado NO es un dato tipo TinyInt'
def __str__(self):
return self.message
| 23.142857
| 65
| 0.746914
| 23
| 162
| 4.913043
| 0.782609
| 0.19469
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 162
| 6
| 66
| 27
| 0.837037
| 0
| 0
| 0
| 0
| 0
| 0.283951
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0.2
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.