body_hash stringlengths 64 64 | body stringlengths 23 109k | docstring stringlengths 1 57k | path stringlengths 4 198 | name stringlengths 1 115 | repository_name stringlengths 7 111 | repository_stars float64 0 191k | lang stringclasses 1
value | body_without_docstring stringlengths 14 108k | unified stringlengths 45 133k |
|---|---|---|---|---|---|---|---|---|---|
125d6e17e44f518853c13446b0c2af35f09e3e99fad4f3b95486d4d5e3b3a0ee | def __fastmodel_init(self):
'Import the fm_agent module and set up the FastModel simulator.\n\n Raises:\n ConnectorPrimitiveException: fm_agent import failed, or the FastModel setup\n failed.\n '
self.logger.prn_inf('Initializing FastModel...')
try:
self.fm_ag... | Import the fm_agent module and set up the FastModel simulator.
Raises:
ConnectorPrimitiveException: fm_agent import failed, or the FastModel setup
failed. | src/htrun/host_tests_conn_proxy/conn_primitive_fastmodel.py | __fastmodel_init | Patater/greentea | 37 | python | def __fastmodel_init(self):
'Import the fm_agent module and set up the FastModel simulator.\n\n Raises:\n ConnectorPrimitiveException: fm_agent import failed, or the FastModel setup\n failed.\n '
self.logger.prn_inf('Initializing FastModel...')
try:
self.fm_ag... | def __fastmodel_init(self):
'Import the fm_agent module and set up the FastModel simulator.\n\n Raises:\n ConnectorPrimitiveException: fm_agent import failed, or the FastModel setup\n failed.\n '
self.logger.prn_inf('Initializing FastModel...')
try:
self.fm_ag... |
76a9c85819f50ee6d9234524f6c245797adfbd3b9c6a657d7a35e323ac65b143 | def __fastmodel_launch(self):
'Start the FastModel.\n\n Raises:\n ConnectorPrimitiveException: Simulator start-up failed.\n '
self.logger.prn_inf('Launching FastModel...')
try:
if (not self.resource.start_simulator()):
raise ConnectorPrimitiveException('FastModel... | Start the FastModel.
Raises:
ConnectorPrimitiveException: Simulator start-up failed. | src/htrun/host_tests_conn_proxy/conn_primitive_fastmodel.py | __fastmodel_launch | Patater/greentea | 37 | python | def __fastmodel_launch(self):
'Start the FastModel.\n\n Raises:\n ConnectorPrimitiveException: Simulator start-up failed.\n '
self.logger.prn_inf('Launching FastModel...')
try:
if (not self.resource.start_simulator()):
raise ConnectorPrimitiveException('FastModel... | def __fastmodel_launch(self):
'Start the FastModel.\n\n Raises:\n ConnectorPrimitiveException: Simulator start-up failed.\n '
self.logger.prn_inf('Launching FastModel...')
try:
if (not self.resource.start_simulator()):
raise ConnectorPrimitiveException('FastModel... |
44c6052c890abc2ca101554e4d24c9f40199f882d7a88b1bf2397e5fcb2a0c19 | def __fastmodel_run(self):
'Run the FastModel simulator.\n\n Raises:\n ConnectorPrimitiveException: Failed to run the simulator.\n '
self.logger.prn_inf('Running FastModel...')
try:
if (not self.resource.run_simulator()):
raise ConnectorPrimitiveException('FastMo... | Run the FastModel simulator.
Raises:
ConnectorPrimitiveException: Failed to run the simulator. | src/htrun/host_tests_conn_proxy/conn_primitive_fastmodel.py | __fastmodel_run | Patater/greentea | 37 | python | def __fastmodel_run(self):
'Run the FastModel simulator.\n\n Raises:\n ConnectorPrimitiveException: Failed to run the simulator.\n '
self.logger.prn_inf('Running FastModel...')
try:
if (not self.resource.run_simulator()):
raise ConnectorPrimitiveException('FastMo... | def __fastmodel_run(self):
'Run the FastModel simulator.\n\n Raises:\n ConnectorPrimitiveException: Failed to run the simulator.\n '
self.logger.prn_inf('Running FastModel...')
try:
if (not self.resource.run_simulator()):
raise ConnectorPrimitiveException('FastMo... |
3d4d36efae305f1a85abe888ffe6282117bb786bb9c349423ef5a51971358100 | def __fastmodel_load(self, filename):
'Load a firmware image to the FastModel.\n\n This is the functional equivalent of flashing a physical DUT.\n\n Args:\n filename: Path to the image to load.\n '
self.logger.prn_inf(("loading FastModel with image '%s'..." % filename))
try:
... | Load a firmware image to the FastModel.
This is the functional equivalent of flashing a physical DUT.
Args:
filename: Path to the image to load. | src/htrun/host_tests_conn_proxy/conn_primitive_fastmodel.py | __fastmodel_load | Patater/greentea | 37 | python | def __fastmodel_load(self, filename):
'Load a firmware image to the FastModel.\n\n This is the functional equivalent of flashing a physical DUT.\n\n Args:\n filename: Path to the image to load.\n '
self.logger.prn_inf(("loading FastModel with image '%s'..." % filename))
try:
... | def __fastmodel_load(self, filename):
'Load a firmware image to the FastModel.\n\n This is the functional equivalent of flashing a physical DUT.\n\n Args:\n filename: Path to the image to load.\n '
self.logger.prn_inf(("loading FastModel with image '%s'..." % filename))
try:
... |
c0bf86dd3e7f6a4fe77f025c71bc0d45838efd169baa083b519f30f321c5ea65 | def __resource_allocated(self):
"Check if the FastModel agent resource been 'allocated'.\n\n Returns:\n True if the FastModel agent is available.\n "
if self.resource:
return True
else:
self.logger.prn_err('FastModel resource not available!')
return False | Check if the FastModel agent resource been 'allocated'.
Returns:
True if the FastModel agent is available. | src/htrun/host_tests_conn_proxy/conn_primitive_fastmodel.py | __resource_allocated | Patater/greentea | 37 | python | def __resource_allocated(self):
"Check if the FastModel agent resource been 'allocated'.\n\n Returns:\n True if the FastModel agent is available.\n "
if self.resource:
return True
else:
self.logger.prn_err('FastModel resource not available!')
return False | def __resource_allocated(self):
"Check if the FastModel agent resource been 'allocated'.\n\n Returns:\n True if the FastModel agent is available.\n "
if self.resource:
return True
else:
self.logger.prn_err('FastModel resource not available!')
return False<|do... |
435521b987c748796f6682eca1560b6b69360c374869034341a143558ea3ddaa | def read(self, count):
'Read data from the FastModel.\n\n Args:\n count: Not used for FastModels.\n\n Returns:\n The data from the FastModel if the read was successful, otherwise False.\n '
if (not self.__resource_allocated()):
return False
try:
ret... | Read data from the FastModel.
Args:
count: Not used for FastModels.
Returns:
The data from the FastModel if the read was successful, otherwise False. | src/htrun/host_tests_conn_proxy/conn_primitive_fastmodel.py | read | Patater/greentea | 37 | python | def read(self, count):
'Read data from the FastModel.\n\n Args:\n count: Not used for FastModels.\n\n Returns:\n The data from the FastModel if the read was successful, otherwise False.\n '
if (not self.__resource_allocated()):
return False
try:
ret... | def read(self, count):
'Read data from the FastModel.\n\n Args:\n count: Not used for FastModels.\n\n Returns:\n The data from the FastModel if the read was successful, otherwise False.\n '
if (not self.__resource_allocated()):
return False
try:
ret... |
4e403cdedae31c2e9b71d676b21965d8ea6383856fcaf046743bf4bc6c40980c | def write(self, payload, log=False):
'Send text to the FastModel.\n\n Args:\n payload: Text to send to the FastModel.\n log: Log the text payload if True.\n '
if self.__resource_allocated():
if log:
self.logger.prn_txd(payload)
try:
sel... | Send text to the FastModel.
Args:
payload: Text to send to the FastModel.
log: Log the text payload if True. | src/htrun/host_tests_conn_proxy/conn_primitive_fastmodel.py | write | Patater/greentea | 37 | python | def write(self, payload, log=False):
'Send text to the FastModel.\n\n Args:\n payload: Text to send to the FastModel.\n log: Log the text payload if True.\n '
if self.__resource_allocated():
if log:
self.logger.prn_txd(payload)
try:
sel... | def write(self, payload, log=False):
'Send text to the FastModel.\n\n Args:\n payload: Text to send to the FastModel.\n log: Log the text payload if True.\n '
if self.__resource_allocated():
if log:
self.logger.prn_txd(payload)
try:
sel... |
a9845f6baa086bcda899629d6ab4dbb2c2f9a9627451b5413b124d07f9e0cbe3 | def flush(self):
'Flush is not supported in the FastModel_module.'
pass | Flush is not supported in the FastModel_module. | src/htrun/host_tests_conn_proxy/conn_primitive_fastmodel.py | flush | Patater/greentea | 37 | python | def flush(self):
pass | def flush(self):
pass<|docstring|>Flush is not supported in the FastModel_module.<|endoftext|> |
d2bfc7573be5ba494d0e14fa56f09a2fe3a4ae2516236ec2da1dba2c9948fb3c | def connected(self):
'Check if the FastModel is running.'
if self.__resource_allocated():
return self.resource.is_simulator_alive
else:
return False | Check if the FastModel is running. | src/htrun/host_tests_conn_proxy/conn_primitive_fastmodel.py | connected | Patater/greentea | 37 | python | def connected(self):
if self.__resource_allocated():
return self.resource.is_simulator_alive
else:
return False | def connected(self):
if self.__resource_allocated():
return self.resource.is_simulator_alive
else:
return False<|docstring|>Check if the FastModel is running.<|endoftext|> |
983926a76c278858514e3a3f7a48c8caeee8ebcd35c9f42d22bf952ef639706c | def finish(self):
'Shut down the FastModel.'
if self.__resource_allocated():
try:
self.resource.shutdown_simulator()
self.resource = None
except self.fm_agent_module.SimulatorError as e:
self.logger.prn_err(('FastmodelConnectorPrimitive.finish() failed: %s' % ... | Shut down the FastModel. | src/htrun/host_tests_conn_proxy/conn_primitive_fastmodel.py | finish | Patater/greentea | 37 | python | def finish(self):
if self.__resource_allocated():
try:
self.resource.shutdown_simulator()
self.resource = None
except self.fm_agent_module.SimulatorError as e:
self.logger.prn_err(('FastmodelConnectorPrimitive.finish() failed: %s' % str(e))) | def finish(self):
if self.__resource_allocated():
try:
self.resource.shutdown_simulator()
self.resource = None
except self.fm_agent_module.SimulatorError as e:
self.logger.prn_err(('FastmodelConnectorPrimitive.finish() failed: %s' % str(e)))<|docstring|>Shut ... |
50337ded8cb01bc6434a036b4d3c4c1fcc69ee503ac27c80eaeacff329da3d84 | def reset(self):
'Reset the FastModel.'
if self.__resource_allocated():
try:
if (not self.resource.reset_simulator()):
self.logger.prn_err('FastModel reset failed, reset_simulator() return False!')
except self.fm_agent_module.SimulatorError as e:
self.logg... | Reset the FastModel. | src/htrun/host_tests_conn_proxy/conn_primitive_fastmodel.py | reset | Patater/greentea | 37 | python | def reset(self):
if self.__resource_allocated():
try:
if (not self.resource.reset_simulator()):
self.logger.prn_err('FastModel reset failed, reset_simulator() return False!')
except self.fm_agent_module.SimulatorError as e:
self.logger.prn_err(('Fastmodel... | def reset(self):
if self.__resource_allocated():
try:
if (not self.resource.reset_simulator()):
self.logger.prn_err('FastModel reset failed, reset_simulator() return False!')
except self.fm_agent_module.SimulatorError as e:
self.logger.prn_err(('Fastmodel... |
5c1b9374d141d0549708b9e6ec74fdaa5dfd70dd2b5276f67147b2eb0211be5a | def __del__(self):
'Shut down the FastModel when garbage collected.'
self.finish() | Shut down the FastModel when garbage collected. | src/htrun/host_tests_conn_proxy/conn_primitive_fastmodel.py | __del__ | Patater/greentea | 37 | python | def __del__(self):
self.finish() | def __del__(self):
self.finish()<|docstring|>Shut down the FastModel when garbage collected.<|endoftext|> |
ead173b8f4c69cd77e5795a350bb908ba1902033b1f963a8c23940b4fef328f4 | def check_command(int_current_server_id: int, string_command: str):
'\n Функция проверяет наличие команды string_command в файле JSON для int_current_server_id\n '
_json = open_json((get_path_of_current_server(int_current_server_id) + '\\commands.json'))
for line in _json:
if (string_comma... | Функция проверяет наличие команды string_command в файле JSON для int_current_server_id | source/modules/file_commands.py | check_command | ilyata76/dis-bot | 0 | python | def check_command(int_current_server_id: int, string_command: str):
'\n \n '
_json = open_json((get_path_of_current_server(int_current_server_id) + '\\commands.json'))
for line in _json:
if (string_command == line):
return True
return False | def check_command(int_current_server_id: int, string_command: str):
'\n \n '
_json = open_json((get_path_of_current_server(int_current_server_id) + '\\commands.json'))
for line in _json:
if (string_command == line):
return True
return False<|docstring|>Функция проверяет нал... |
d7495ca960f63a94c4d8f980ec67e5a7e8b77c8b300eb954620637adf5a53196 | def string_show_commands(int_current_server_id):
'\n Функция, показывающая команды и их синонимы для int_current_server_id\n '
_json = open_json((get_path_of_current_server(int_current_server_id) + '\\commands.json'))
string = ''
for line in _json:
string += ((((('<' + line) + '>') + '... | Функция, показывающая команды и их синонимы для int_current_server_id | source/modules/file_commands.py | string_show_commands | ilyata76/dis-bot | 0 | python | def string_show_commands(int_current_server_id):
'\n \n '
_json = open_json((get_path_of_current_server(int_current_server_id) + '\\commands.json'))
string =
for line in _json:
string += ((((('<' + line) + '>') + ' : ') + _json[line]) + '\n')
return string | def string_show_commands(int_current_server_id):
'\n \n '
_json = open_json((get_path_of_current_server(int_current_server_id) + '\\commands.json'))
string =
for line in _json:
string += ((((('<' + line) + '>') + ' : ') + _json[line]) + '\n')
return string<|docstring|>Функция, пок... |
fb1ee2940f8ae432b2ac23ecfc02dd581d721c39a770c1b98d0cea7a7848eca6 | def change_command(int_current_server_id: int, string_current_command: str, string_new_command: str):
'\n Функция, обеспечивающая замену синонима для string_current_command на string_new_command на текущем\n сервере с ID int_current_server_id\n '
string = ''
_json = open_json((get_path_... | Функция, обеспечивающая замену синонима для string_current_command на string_new_command на текущем
сервере с ID int_current_server_id | source/modules/file_commands.py | change_command | ilyata76/dis-bot | 0 | python | def change_command(int_current_server_id: int, string_current_command: str, string_new_command: str):
'\n Функция, обеспечивающая замену синонима для string_current_command на string_new_command на текущем\n сервере с ID int_current_server_id\n '
string =
_json = open_json((get_path_of... | def change_command(int_current_server_id: int, string_current_command: str, string_new_command: str):
'\n Функция, обеспечивающая замену синонима для string_current_command на string_new_command на текущем\n сервере с ID int_current_server_id\n '
string =
_json = open_json((get_path_of... |
380721c93b863c2f2ed46a8e6b308b112b7f7b4f8caad499519ed053ec9ebd06 | async def commands_file_handler(message, content: str, int_current_server_id: int, int_j: int):
'\n Функция, обеспечивающая обработку комманд PREFIXcommand <всё последующее>\n\n Параметры:\n\n message: discord.message объект\n content: сообщение\n ... | Функция, обеспечивающая обработку комманд PREFIXcommand <всё последующее>
Параметры:
message: discord.message объект
content: сообщение
int_current_server_id: текущий ID сервера
int_j: текущее расположение каретки (после обработки заглавной функции) | source/modules/file_commands.py | commands_file_handler | ilyata76/dis-bot | 0 | python | async def commands_file_handler(message, content: str, int_current_server_id: int, int_j: int):
'\n Функция, обеспечивающая обработку комманд PREFIXcommand <всё последующее>\n\n Параметры:\n\n message: discord.message объект\n content: сообщение\n ... | async def commands_file_handler(message, content: str, int_current_server_id: int, int_j: int):
'\n Функция, обеспечивающая обработку комманд PREFIXcommand <всё последующее>\n\n Параметры:\n\n message: discord.message объект\n content: сообщение\n ... |
1bef72ee8326a151dbbc31bb2e92c60f00daa98149b7d48fd81a11c0cae4a165 | def os_walk_modules(path):
'Traverse all path and sub directories for found all HTML files.'
for (folder, directories, files) in os.walk(path):
if ('__' in folder):
continue
for f in filter((lambda n: n.endswith('.html')), files):
(yield os.path.join(folder, f)) | Traverse all path and sub directories for found all HTML files. | server/validator_devel/filesystem.py | os_walk_modules | ComuneTrento/Sportello-telematico---Validator-devel | 0 | python | def os_walk_modules(path):
for (folder, directories, files) in os.walk(path):
if ('__' in folder):
continue
for f in filter((lambda n: n.endswith('.html')), files):
(yield os.path.join(folder, f)) | def os_walk_modules(path):
for (folder, directories, files) in os.walk(path):
if ('__' in folder):
continue
for f in filter((lambda n: n.endswith('.html')), files):
(yield os.path.join(folder, f))<|docstring|>Traverse all path and sub directories for found all HTML files... |
6d5fd348a121e08dfa915192d87e44336e4b4d35dc5cd95ca7d5e249666ef23e | def module_parse(path):
'Return a dictionary that contain the module metadata'
meta = {'file_path': path, 'key': hashlib.sha256(path.encode('utf-8')).hexdigest(), 'folders': [p for p in path.split('modules', 1)[(- 1)].split(os.sep)[:(- 1)] if p], 'filename': os.path.basename(path)}
text = ''
with open(p... | Return a dictionary that contain the module metadata | server/validator_devel/filesystem.py | module_parse | ComuneTrento/Sportello-telematico---Validator-devel | 0 | python | def module_parse(path):
meta = {'file_path': path, 'key': hashlib.sha256(path.encode('utf-8')).hexdigest(), 'folders': [p for p in path.split('modules', 1)[(- 1)].split(os.sep)[:(- 1)] if p], 'filename': os.path.basename(path)}
text =
with open(path, 'r', encoding='utf8') as f:
i = 0
w... | def module_parse(path):
meta = {'file_path': path, 'key': hashlib.sha256(path.encode('utf-8')).hexdigest(), 'folders': [p for p in path.split('modules', 1)[(- 1)].split(os.sep)[:(- 1)] if p], 'filename': os.path.basename(path)}
text =
with open(path, 'r', encoding='utf8') as f:
i = 0
w... |
d8685aa393aefe7e148574f7fb848c707cc2c7016fa2a1274329c7629e6abca2 | def parse_dir(path):
'Read the directory and reset all modules data.'
logging.debug(f'start parsing {path}')
if (not path.endswith('modules')):
path = os.path.join(path, 'modules')
if (not os.path.exists(path)):
logging.error(f"The {path} doesn't exists")
raise ValueError(f"The {... | Read the directory and reset all modules data. | server/validator_devel/filesystem.py | parse_dir | ComuneTrento/Sportello-telematico---Validator-devel | 0 | python | def parse_dir(path):
logging.debug(f'start parsing {path}')
if (not path.endswith('modules')):
path = os.path.join(path, 'modules')
if (not os.path.exists(path)):
logging.error(f"The {path} doesn't exists")
raise ValueError(f"The {path} doesn't exists")
global DATA
DATA ... | def parse_dir(path):
logging.debug(f'start parsing {path}')
if (not path.endswith('modules')):
path = os.path.join(path, 'modules')
if (not os.path.exists(path)):
logging.error(f"The {path} doesn't exists")
raise ValueError(f"The {path} doesn't exists")
global DATA
DATA ... |
50fc402a8ef0160f4bf4098c81dc5ae1a5c412201ecd829c19d7d292d358ef4d | def recursive_topological_sort(graph, node):
'perform topo sort on a graph\n\n return an KeyError if some dependency is missing.\n\n :arg graph: a dict of list with dependency name.\n :arg node: the node you want calculate the dependencies\n '
result = []
seen = set()
def recursive_helper(n... | perform topo sort on a graph
return an KeyError if some dependency is missing.
:arg graph: a dict of list with dependency name.
:arg node: the node you want calculate the dependencies | server/validator_devel/filesystem.py | recursive_topological_sort | ComuneTrento/Sportello-telematico---Validator-devel | 0 | python | def recursive_topological_sort(graph, node):
'perform topo sort on a graph\n\n return an KeyError if some dependency is missing.\n\n :arg graph: a dict of list with dependency name.\n :arg node: the node you want calculate the dependencies\n '
result = []
seen = set()
def recursive_helper(n... | def recursive_topological_sort(graph, node):
'perform topo sort on a graph\n\n return an KeyError if some dependency is missing.\n\n :arg graph: a dict of list with dependency name.\n :arg node: the node you want calculate the dependencies\n '
result = []
seen = set()
def recursive_helper(n... |
d2af6f9e8797aeae2fc123739240b11eccc39e385ad3cafa8c2d29c75d3df043 | def __init__(self, device, bundle_id, trace_template=None, trace_output=None, **params):
'构造函数\n \n :param device: Device的实例对象\n :type device: Device\n :param bundle_id: APP的BundleID(例如:com.tencent.demo)\n :type bundle_id: str\n :param trace_template: trace模板(专项测试使用,功能测试默认为... | 构造函数
:param device: Device的实例对象
:type device: Device
:param bundle_id: APP的BundleID(例如:com.tencent.demo)
:type bundle_id: str
:param trace_template: trace模板(专项测试使用,功能测试默认为None即可)
:type trace_template: str
:param trace_output: trace存储路径(专项测试使用,功能测试默认为None即可)
:type trace_output: str
:param params: app启动参数,默认为空
:type par... | qt4i/app.py | __init__ | zhangkn/QT4iOS | 209 | python | def __init__(self, device, bundle_id, trace_template=None, trace_output=None, **params):
'构造函数\n \n :param device: Device的实例对象\n :type device: Device\n :param bundle_id: APP的BundleID(例如:com.tencent.demo)\n :type bundle_id: str\n :param trace_template: trace模板(专项测试使用,功能测试默认为... | def __init__(self, device, bundle_id, trace_template=None, trace_output=None, **params):
'构造函数\n \n :param device: Device的实例对象\n :type device: Device\n :param bundle_id: APP的BundleID(例如:com.tencent.demo)\n :type bundle_id: str\n :param trace_template: trace模板(专项测试使用,功能测试默认为... |
fa2cc7f24987fd0fbaeee81eae8f7e17ca9ea1dca89d5accde700c1abfca6677 | def start(self):
'启动APP\n '
begin_time = time.time()
env = {'rules_of_alert_auto_handle': self._rules_of_alert_auto_handle, 'flag_alert_auto_handled': (not self._flag_alert_auto_handled)}
self._driver.web.release_app_session(self._bundle_id)
self._app_started = self._device.start_app(self._bu... | 启动APP | qt4i/app.py | start | zhangkn/QT4iOS | 209 | python | def start(self):
'\n '
begin_time = time.time()
env = {'rules_of_alert_auto_handle': self._rules_of_alert_auto_handle, 'flag_alert_auto_handled': (not self._flag_alert_auto_handled)}
self._driver.web.release_app_session(self._bundle_id)
self._app_started = self._device.start_app(self._bundle_... | def start(self):
'\n '
begin_time = time.time()
env = {'rules_of_alert_auto_handle': self._rules_of_alert_auto_handle, 'flag_alert_auto_handled': (not self._flag_alert_auto_handled)}
self._driver.web.release_app_session(self._bundle_id)
self._app_started = self._device.start_app(self._bundle_... |
5a92d530ba2c5f1f8a6bd010daf5651449a38033b632e304cdc471c8c0143125 | def get_text(self, text):
'获取text对应的本地语言文本\n \n :param text: 标准文本,不随语言环境发生变化的唯一标识\n :type text: str\n :return: str - 本地语言的文\n '
raise Exception('该函数暂未实现,请在子类中重载实现') | 获取text对应的本地语言文本
:param text: 标准文本,不随语言环境发生变化的唯一标识
:type text: str
:return: str - 本地语言的文 | qt4i/app.py | get_text | zhangkn/QT4iOS | 209 | python | def get_text(self, text):
'获取text对应的本地语言文本\n \n :param text: 标准文本,不随语言环境发生变化的唯一标识\n :type text: str\n :return: str - 本地语言的文\n '
raise Exception('该函数暂未实现,请在子类中重载实现') | def get_text(self, text):
'获取text对应的本地语言文本\n \n :param text: 标准文本,不随语言环境发生变化的唯一标识\n :type text: str\n :return: str - 本地语言的文\n '
raise Exception('该函数暂未实现,请在子类中重载实现')<|docstring|>获取text对应的本地语言文本
:param text: 标准文本,不随语言环境发生变化的唯一标识
:type text: str
:return: str - 本地语言的文<|endoftext|... |
97c87c3aee41599e3e429965d6d0e573e037fac06f349571fcea46a9dbd2a4db | @property
def device(self):
'返回app所在的设备\n \n :rtype: qt4i.device.Device\n '
return self._device | 返回app所在的设备
:rtype: qt4i.device.Device | qt4i/app.py | device | zhangkn/QT4iOS | 209 | python | @property
def device(self):
'返回app所在的设备\n \n :rtype: qt4i.device.Device\n '
return self._device | @property
def device(self):
'返回app所在的设备\n \n :rtype: qt4i.device.Device\n '
return self._device<|docstring|>返回app所在的设备
:rtype: qt4i.device.Device<|endoftext|> |
5c63ae9904a4bc6c3e05963a2c1162af7f1f6bacf0b7e462a46e956b2ec9d32f | @property
def language(self):
'app的当前语言\n \n :rtype: str\n '
raise NotImplementedError | app的当前语言
:rtype: str | qt4i/app.py | language | zhangkn/QT4iOS | 209 | python | @property
def language(self):
'app的当前语言\n \n :rtype: str\n '
raise NotImplementedError | @property
def language(self):
'app的当前语言\n \n :rtype: str\n '
raise NotImplementedError<|docstring|>app的当前语言
:rtype: str<|endoftext|> |
09da9eb235bc566a3c6024e16319a6a81cc93d8684cc286f4313591540ed5291 | @property
def driver(self):
'返回app所使用的driver\n \n :rtype: RPCClientProxy\n '
return self._driver | 返回app所使用的driver
:rtype: RPCClientProxy | qt4i/app.py | driver | zhangkn/QT4iOS | 209 | python | @property
def driver(self):
'返回app所使用的driver\n \n :rtype: RPCClientProxy\n '
return self._driver | @property
def driver(self):
'返回app所使用的driver\n \n :rtype: RPCClientProxy\n '
return self._driver<|docstring|>返回app所使用的driver
:rtype: RPCClientProxy<|endoftext|> |
87108d9d0120f29d8e5c70def8dd91a00634bde274413bdb23b1dac4febce04a | @property
def rules_of_alert_auto_handle(self):
'获取已设置的自动处理Alert规则\n \n :rtype: list - [ {"message_text": "message_text", "button_text": "button_text"}, ... ]\n '
return self._rules_of_alert_auto_handle | 获取已设置的自动处理Alert规则
:rtype: list - [ {"message_text": "message_text", "button_text": "button_text"}, ... ] | qt4i/app.py | rules_of_alert_auto_handle | zhangkn/QT4iOS | 209 | python | @property
def rules_of_alert_auto_handle(self):
'获取已设置的自动处理Alert规则\n \n :rtype: list - [ {"message_text": "message_text", "button_text": "button_text"}, ... ]\n '
return self._rules_of_alert_auto_handle | @property
def rules_of_alert_auto_handle(self):
'获取已设置的自动处理Alert规则\n \n :rtype: list - [ {"message_text": "message_text", "button_text": "button_text"}, ... ]\n '
return self._rules_of_alert_auto_handle<|docstring|>获取已设置的自动处理Alert规则
:rtype: list - [ {"message_text": "message_text", "button... |
702106e69982ae3cc7b4a66aa057a7fcaf8e4bfb5200377522ab56475fee8339 | @rules_of_alert_auto_handle.setter
def rules_of_alert_auto_handle(self, rules=list()):
'设置自动处理Alert规则\n \n 当message_text匹配到Alert框内的任意文本,则点击button_text指定的按钮。\n 文本以段为单元,元素的label、name、value分为三段文本。规则匹配范围是Alert框内的所有元素的文本。\n :param rules: 规则\n :type rules: list - [ {"message_text": "mes... | 设置自动处理Alert规则
当message_text匹配到Alert框内的任意文本,则点击button_text指定的按钮。
文本以段为单元,元素的label、name、value分为三段文本。规则匹配范围是Alert框内的所有元素的文本。
:param rules: 规则
:type rules: list - [ {"message_text": "message_text", "button_text": "button_text"}, ... ] | qt4i/app.py | rules_of_alert_auto_handle | zhangkn/QT4iOS | 209 | python | @rules_of_alert_auto_handle.setter
def rules_of_alert_auto_handle(self, rules=list()):
'设置自动处理Alert规则\n \n 当message_text匹配到Alert框内的任意文本,则点击button_text指定的按钮。\n 文本以段为单元,元素的label、name、value分为三段文本。规则匹配范围是Alert框内的所有元素的文本。\n :param rules: 规则\n :type rules: list - [ {"message_text": "mes... | @rules_of_alert_auto_handle.setter
def rules_of_alert_auto_handle(self, rules=list()):
'设置自动处理Alert规则\n \n 当message_text匹配到Alert框内的任意文本,则点击button_text指定的按钮。\n 文本以段为单元,元素的label、name、value分为三段文本。规则匹配范围是Alert框内的所有元素的文本。\n :param rules: 规则\n :type rules: list - [ {"message_text": "mes... |
f3c097e8b725b51b6933480d4a658d4ae7ac19f6b86a6093814d075eda7c82cb | def add_rule_of_alert_auto_handle(self, message_text, button_text):
'自动处理Alert规则,新增一项\n \n :param message_text: Alert内文本片段,支持正则表达式(范围是所谓文本,每个元素的label/name/value为文本段)\n :type message_text: str\n :param button_text: Alert内按钮的文本,支持正则表达式(元素的label/name/value)\n :type button_text: str\n... | 自动处理Alert规则,新增一项
:param message_text: Alert内文本片段,支持正则表达式(范围是所谓文本,每个元素的label/name/value为文本段)
:type message_text: str
:param button_text: Alert内按钮的文本,支持正则表达式(元素的label/name/value)
:type button_text: str | qt4i/app.py | add_rule_of_alert_auto_handle | zhangkn/QT4iOS | 209 | python | def add_rule_of_alert_auto_handle(self, message_text, button_text):
'自动处理Alert规则,新增一项\n \n :param message_text: Alert内文本片段,支持正则表达式(范围是所谓文本,每个元素的label/name/value为文本段)\n :type message_text: str\n :param button_text: Alert内按钮的文本,支持正则表达式(元素的label/name/value)\n :type button_text: str\n... | def add_rule_of_alert_auto_handle(self, message_text, button_text):
'自动处理Alert规则,新增一项\n \n :param message_text: Alert内文本片段,支持正则表达式(范围是所谓文本,每个元素的label/name/value为文本段)\n :type message_text: str\n :param button_text: Alert内按钮的文本,支持正则表达式(元素的label/name/value)\n :type button_text: str\n... |
1f9af5749ab5b6723fb739b5b9229ece35552653e01c1b55721e5d88129b1ed4 | @property
def flag_alert_auto_handled(self):
'自动关闭Alert框\n :rtype: boolean\n '
return self._flag_alert_auto_handled | 自动关闭Alert框
:rtype: boolean | qt4i/app.py | flag_alert_auto_handled | zhangkn/QT4iOS | 209 | python | @property
def flag_alert_auto_handled(self):
'自动关闭Alert框\n :rtype: boolean\n '
return self._flag_alert_auto_handled | @property
def flag_alert_auto_handled(self):
'自动关闭Alert框\n :rtype: boolean\n '
return self._flag_alert_auto_handled<|docstring|>自动关闭Alert框
:rtype: boolean<|endoftext|> |
dc7ef3442e14bb4f571b4fd1b30e8ae0e9628c6f9aa5099f0e11a8e333176ab5 | @flag_alert_auto_handled.setter
def flag_alert_auto_handled(self, flag):
'自动关闭Alert框\n \n :param flag: True为自动关闭|False为不自动处理\n :type flag: boolean\n '
if (flag and (not self._flag_alert_auto_handled)):
self._flag_alert_auto_handled = True
if self._app_started:
... | 自动关闭Alert框
:param flag: True为自动关闭|False为不自动处理
:type flag: boolean | qt4i/app.py | flag_alert_auto_handled | zhangkn/QT4iOS | 209 | python | @flag_alert_auto_handled.setter
def flag_alert_auto_handled(self, flag):
'自动关闭Alert框\n \n :param flag: True为自动关闭|False为不自动处理\n :type flag: boolean\n '
if (flag and (not self._flag_alert_auto_handled)):
self._flag_alert_auto_handled = True
if self._app_started:
... | @flag_alert_auto_handled.setter
def flag_alert_auto_handled(self, flag):
'自动关闭Alert框\n \n :param flag: True为自动关闭|False为不自动处理\n :type flag: boolean\n '
if (flag and (not self._flag_alert_auto_handled)):
self._flag_alert_auto_handled = True
if self._app_started:
... |
ae349e78d067da830c560bc162dfdcf8c5f9fd2424ae14719b6fa8d1f7890db9 | def release(self):
'终止APP\n '
logger.info(('[%s] APP - Release - %s' % (datetime.datetime.fromtimestamp(time.time()), self._bundle_id)))
self._app_started = False | 终止APP | qt4i/app.py | release | zhangkn/QT4iOS | 209 | python | def release(self):
'\n '
logger.info(('[%s] APP - Release - %s' % (datetime.datetime.fromtimestamp(time.time()), self._bundle_id)))
self._app_started = False | def release(self):
'\n '
logger.info(('[%s] APP - Release - %s' % (datetime.datetime.fromtimestamp(time.time()), self._bundle_id)))
self._app_started = False<|docstring|>终止APP<|endoftext|> |
6fabeb88b5557411c76696178db2dd06a3990590dd458599e5f9b496dd81a69c | def open_url(self, url, page_cls=None):
'打开Safari浏览器,跳转指定网,返回page_cls类的实例\n\n :param url: url地址\n :type url: str\n :param page_cls: 用户实现的WebPage子类,默认不填写则使用基类WebPage\n :type page_cls: qt4w.webcontrols.WebPage\n :rtype: qt4w.webcontrols.WebPage\n '
if self._win.Controls['... | 打开Safari浏览器,跳转指定网,返回page_cls类的实例
:param url: url地址
:type url: str
:param page_cls: 用户实现的WebPage子类,默认不填写则使用基类WebPage
:type page_cls: qt4w.webcontrols.WebPage
:rtype: qt4w.webcontrols.WebPage | qt4i/app.py | open_url | zhangkn/QT4iOS | 209 | python | def open_url(self, url, page_cls=None):
'打开Safari浏览器,跳转指定网,返回page_cls类的实例\n\n :param url: url地址\n :type url: str\n :param page_cls: 用户实现的WebPage子类,默认不填写则使用基类WebPage\n :type page_cls: qt4w.webcontrols.WebPage\n :rtype: qt4w.webcontrols.WebPage\n '
if self._win.Controls['... | def open_url(self, url, page_cls=None):
'打开Safari浏览器,跳转指定网,返回page_cls类的实例\n\n :param url: url地址\n :type url: str\n :param page_cls: 用户实现的WebPage子类,默认不填写则使用基类WebPage\n :type page_cls: qt4w.webcontrols.WebPage\n :rtype: qt4w.webcontrols.WebPage\n '
if self._win.Controls['... |
8b2491f45ff6bb8d1736db24cf2ca5d46b5ac057e39de2eceb9d31969fdf77d8 | def find_by_url(self, url, page_cls=None, timeout=10):
'在当前打开的页面中查找指定url,返回WebPage实例,如果未找到,返回None\n\n :param url: 要查找的页面url\n :type url: str\n :param page_cls: 用户实现的WebPage子类,默认不填写则使用基类WebPage\n :type page_cls: qt4w.webcontrols.WebPage\n :param timeout: 查找超时时间,单位:秒\n :type... | 在当前打开的页面中查找指定url,返回WebPage实例,如果未找到,返回None
:param url: 要查找的页面url
:type url: str
:param page_cls: 用户实现的WebPage子类,默认不填写则使用基类WebPage
:type page_cls: qt4w.webcontrols.WebPage
:param timeout: 查找超时时间,单位:秒
:type timeout: int/float
:rtype: qt4w.webcontrols.WebPage | qt4i/app.py | find_by_url | zhangkn/QT4iOS | 209 | python | def find_by_url(self, url, page_cls=None, timeout=10):
'在当前打开的页面中查找指定url,返回WebPage实例,如果未找到,返回None\n\n :param url: 要查找的页面url\n :type url: str\n :param page_cls: 用户实现的WebPage子类,默认不填写则使用基类WebPage\n :type page_cls: qt4w.webcontrols.WebPage\n :param timeout: 查找超时时间,单位:秒\n :type... | def find_by_url(self, url, page_cls=None, timeout=10):
'在当前打开的页面中查找指定url,返回WebPage实例,如果未找到,返回None\n\n :param url: 要查找的页面url\n :type url: str\n :param page_cls: 用户实现的WebPage子类,默认不填写则使用基类WebPage\n :type page_cls: qt4w.webcontrols.WebPage\n :param timeout: 查找超时时间,单位:秒\n :type... |
fe1b118c58ea5dab3a61307fc845303cd8b109de819a4fba794c538552254977 | def _switch_wifi(self, network_type, timeout=1):
'wifi切换\n '
self._win.Controls['无线局域网'].click()
if (int(self._win.Controls['无线开关'].value) == 1):
if ((network_type == 0) or (network_type == 1)):
self._win.Controls['无线开关'].click()
elif ((network_type == 2) or (network_type == 3... | wifi切换 | qt4i/app.py | _switch_wifi | zhangkn/QT4iOS | 209 | python | def _switch_wifi(self, network_type, timeout=1):
'\n '
self._win.Controls['无线局域网'].click()
if (int(self._win.Controls['无线开关'].value) == 1):
if ((network_type == 0) or (network_type == 1)):
self._win.Controls['无线开关'].click()
elif ((network_type == 2) or (network_type == 3)):
... | def _switch_wifi(self, network_type, timeout=1):
'\n '
self._win.Controls['无线局域网'].click()
if (int(self._win.Controls['无线开关'].value) == 1):
if ((network_type == 0) or (network_type == 1)):
self._win.Controls['无线开关'].click()
elif ((network_type == 2) or (network_type == 3)):
... |
e6ba6aec62a117a3644275b70435536b2da82424a958984ec59d5b95c5bda407 | def _switch_xG(self, network_type, timeout=1):
'xG网络切换\n '
self._win.Controls['蜂窝移动网络'].click()
if (int(self._win.Controls['蜂窝开关'].value) == 1):
if ((network_type == 0) or (network_type == 2)):
self._win.Controls['蜂窝开关'].click()
elif ((network_type == 1) or (network_type == 3)... | xG网络切换 | qt4i/app.py | _switch_xG | zhangkn/QT4iOS | 209 | python | def _switch_xG(self, network_type, timeout=1):
'\n '
self._win.Controls['蜂窝移动网络'].click()
if (int(self._win.Controls['蜂窝开关'].value) == 1):
if ((network_type == 0) or (network_type == 2)):
self._win.Controls['蜂窝开关'].click()
elif ((network_type == 1) or (network_type == 3)):
... | def _switch_xG(self, network_type, timeout=1):
'\n '
self._win.Controls['蜂窝移动网络'].click()
if (int(self._win.Controls['蜂窝开关'].value) == 1):
if ((network_type == 0) or (network_type == 2)):
self._win.Controls['蜂窝开关'].click()
elif ((network_type == 1) or (network_type == 3)):
... |
5f74919f4becf9f01785a47311c9c5330e6c1b14f8f1e7db5cc8db82115d29e0 | def _switch_nlc(self, nlc_type=NLCType.NONE, timeout=1):
'弱网络模拟器切换\n '
self._win.Controls['开发者'].click()
version = int(self._device.ios_version[0])
if (version == 1):
version = int(self._device.ios_version[:2])
if (version == 11):
self._win.Controls['Conditioner'].click()
... | 弱网络模拟器切换 | qt4i/app.py | _switch_nlc | zhangkn/QT4iOS | 209 | python | def _switch_nlc(self, nlc_type=NLCType.NONE, timeout=1):
'\n '
self._win.Controls['开发者'].click()
version = int(self._device.ios_version[0])
if (version == 1):
version = int(self._device.ios_version[:2])
if (version == 11):
self._win.Controls['Conditioner'].click()
else:
... | def _switch_nlc(self, nlc_type=NLCType.NONE, timeout=1):
'\n '
self._win.Controls['开发者'].click()
version = int(self._device.ios_version[0])
if (version == 1):
version = int(self._device.ios_version[:2])
if (version == 11):
self._win.Controls['Conditioner'].click()
else:
... |
0bb532744dd87a8f5e5ca4f371c036bb37dc18af00acca2821187620604c33e8 | def switch_network(self, network_type, nlc_type=NLCType.NONE, timeout=1):
'网络切换\n \n :param network_type: 网络类型,如下:\n 0:无WIFI无4G\n 1:无WIFi有4G\n 2:有WIFI无4G\n 3:... | 网络切换
:param network_type: 网络类型,如下:
0:无WIFI无4G
1:无WIFi有4G
2:有WIFI无4G
3:有WIFI有4G
4:飞行模式
5:保持不变,仅设置弱网
:type network_type: int
:param nlc_type: 模拟弱网络... | qt4i/app.py | switch_network | zhangkn/QT4iOS | 209 | python | def switch_network(self, network_type, nlc_type=NLCType.NONE, timeout=1):
'网络切换\n \n :param network_type: 网络类型,如下:\n 0:无WIFI无4G\n 1:无WIFi有4G\n 2:有WIFI无4G\n 3:... | def switch_network(self, network_type, nlc_type=NLCType.NONE, timeout=1):
'网络切换\n \n :param network_type: 网络类型,如下:\n 0:无WIFI无4G\n 1:无WIFi有4G\n 2:有WIFI无4G\n 3:... |
b8441a85321b14c049e8148474c08b6ae5925980d662eac9d0968fe297a4121d | def set_host_proxy(self, server, port, wifi_name):
'设置host代理\n \n :param server: 服务器名\n :type server: str\n :param port: 端口号\n :type port: int\n :param wifi: wifi名\n :type wifi: str\n '
version = int(self._device.ios_version[0])
if (version == 1):
... | 设置host代理
:param server: 服务器名
:type server: str
:param port: 端口号
:type port: int
:param wifi: wifi名
:type wifi: str | qt4i/app.py | set_host_proxy | zhangkn/QT4iOS | 209 | python | def set_host_proxy(self, server, port, wifi_name):
'设置host代理\n \n :param server: 服务器名\n :type server: str\n :param port: 端口号\n :type port: int\n :param wifi: wifi名\n :type wifi: str\n '
version = int(self._device.ios_version[0])
if (version == 1):
... | def set_host_proxy(self, server, port, wifi_name):
'设置host代理\n \n :param server: 服务器名\n :type server: str\n :param port: 端口号\n :type port: int\n :param wifi: wifi名\n :type wifi: str\n '
version = int(self._device.ios_version[0])
if (version == 1):
... |
540fb1f8d80f0ab694937c2ea25e9f5beab3781c450ff1bc58e85fd4fddf9f23 | def reset_host_proxy(self):
'关闭host代理\n '
version = int(self._device.ios_version[0])
if (version == 1):
version = int(self._device.ios_version[:2])
time.sleep(1)
if self._win.Controls['无线局域网'].wait_for_exist(2, 0.05):
self._win.Controls['无线局域网'].click()
time.sleep(1)
f... | 关闭host代理 | qt4i/app.py | reset_host_proxy | zhangkn/QT4iOS | 209 | python | def reset_host_proxy(self):
'\n '
version = int(self._device.ios_version[0])
if (version == 1):
version = int(self._device.ios_version[:2])
time.sleep(1)
if self._win.Controls['无线局域网'].wait_for_exist(2, 0.05):
self._win.Controls['无线局域网'].click()
time.sleep(1)
from qt4i... | def reset_host_proxy(self):
'\n '
version = int(self._device.ios_version[0])
if (version == 1):
version = int(self._device.ios_version[:2])
time.sleep(1)
if self._win.Controls['无线局域网'].wait_for_exist(2, 0.05):
self._win.Controls['无线局域网'].click()
time.sleep(1)
from qt4i... |
300c1ca9a3af7c0e5500c94650633944dbee481cbd5bd0ecca2b36bf82b45de1 | def get_conn(self):
'\n Retrieves connection to Cloud SQL.\n\n :return: Google Cloud SQL services object.\n :rtype: dict\n '
if (not self._conn):
http_authorized = self._authorize()
self._conn = build('sqladmin', self.api_version, http=http_authorized, cache_discovery... | Retrieves connection to Cloud SQL.
:return: Google Cloud SQL services object.
:rtype: dict | airflow/contrib/hooks/gcp_sql_hook.py | get_conn | crazyxw/incubator-airflow | 4 | python | def get_conn(self):
'\n Retrieves connection to Cloud SQL.\n\n :return: Google Cloud SQL services object.\n :rtype: dict\n '
if (not self._conn):
http_authorized = self._authorize()
self._conn = build('sqladmin', self.api_version, http=http_authorized, cache_discovery... | def get_conn(self):
'\n Retrieves connection to Cloud SQL.\n\n :return: Google Cloud SQL services object.\n :rtype: dict\n '
if (not self._conn):
http_authorized = self._authorize()
self._conn = build('sqladmin', self.api_version, http=http_authorized, cache_discovery... |
7614157300e423b536a39de1be51d199e5dc4fb080ee69dc0c4b0ae76f5467bf | def get_instance(self, project_id, instance):
'\n Retrieves a resource containing information about a Cloud SQL instance.\n\n :param project_id: Project ID of the project that contains the instance.\n :type project_id: str\n :param instance: Database instance ID. This does not include th... | Retrieves a resource containing information about a Cloud SQL instance.
:param project_id: Project ID of the project that contains the instance.
:type project_id: str
:param instance: Database instance ID. This does not include the project ID.
:type instance: str
:return: A Cloud SQL instance resource.
:rtype: dict | airflow/contrib/hooks/gcp_sql_hook.py | get_instance | crazyxw/incubator-airflow | 4 | python | def get_instance(self, project_id, instance):
'\n Retrieves a resource containing information about a Cloud SQL instance.\n\n :param project_id: Project ID of the project that contains the instance.\n :type project_id: str\n :param instance: Database instance ID. This does not include th... | def get_instance(self, project_id, instance):
'\n Retrieves a resource containing information about a Cloud SQL instance.\n\n :param project_id: Project ID of the project that contains the instance.\n :type project_id: str\n :param instance: Database instance ID. This does not include th... |
8138ae01f78a7eda693b1fe83bb2ea6d7289d10eb0e1eaca6ec6fd5f7027920d | def create_instance(self, project_id, body):
'\n Creates a new Cloud SQL instance.\n\n :param project_id: Project ID of the project to which the newly created\n Cloud SQL instances should belong.\n :type project_id: str\n :param body: Body required by the Cloud SQL insert API,... | Creates a new Cloud SQL instance.
:param project_id: Project ID of the project to which the newly created
Cloud SQL instances should belong.
:type project_id: str
:param body: Body required by the Cloud SQL insert API, as described in
https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances/insert#r... | airflow/contrib/hooks/gcp_sql_hook.py | create_instance | crazyxw/incubator-airflow | 4 | python | def create_instance(self, project_id, body):
'\n Creates a new Cloud SQL instance.\n\n :param project_id: Project ID of the project to which the newly created\n Cloud SQL instances should belong.\n :type project_id: str\n :param body: Body required by the Cloud SQL insert API,... | def create_instance(self, project_id, body):
'\n Creates a new Cloud SQL instance.\n\n :param project_id: Project ID of the project to which the newly created\n Cloud SQL instances should belong.\n :type project_id: str\n :param body: Body required by the Cloud SQL insert API,... |
2ccfbe7d15ea19ac42d538535ba40883674f1c7eb22dbbb5b130152b14c9f66b | def patch_instance(self, project_id, body, instance):
'\n Updates settings of a Cloud SQL instance.\n\n Caution: This is not a partial update, so you must include values for\n all the settings that you want to retain.\n\n :param project_id: Project ID of the project that contains the ins... | Updates settings of a Cloud SQL instance.
Caution: This is not a partial update, so you must include values for
all the settings that you want to retain.
:param project_id: Project ID of the project that contains the instance.
:type project_id: str
:param body: Body required by the Cloud SQL patch API, as described i... | airflow/contrib/hooks/gcp_sql_hook.py | patch_instance | crazyxw/incubator-airflow | 4 | python | def patch_instance(self, project_id, body, instance):
'\n Updates settings of a Cloud SQL instance.\n\n Caution: This is not a partial update, so you must include values for\n all the settings that you want to retain.\n\n :param project_id: Project ID of the project that contains the ins... | def patch_instance(self, project_id, body, instance):
'\n Updates settings of a Cloud SQL instance.\n\n Caution: This is not a partial update, so you must include values for\n all the settings that you want to retain.\n\n :param project_id: Project ID of the project that contains the ins... |
04d6a0f70265c6ab62f7a4800c74a5673ddd47bc0fea3307dd170293ee96b518 | def delete_instance(self, project_id, instance):
'\n Deletes a Cloud SQL instance.\n\n :param project_id: Project ID of the project that contains the instance.\n :type project_id: str\n :param instance: Cloud SQL instance ID. This does not include the project ID.\n :type instance:... | Deletes a Cloud SQL instance.
:param project_id: Project ID of the project that contains the instance.
:type project_id: str
:param instance: Cloud SQL instance ID. This does not include the project ID.
:type instance: str
:return: True if the operation succeeded, raises an error otherwise
:rtype: bool | airflow/contrib/hooks/gcp_sql_hook.py | delete_instance | crazyxw/incubator-airflow | 4 | python | def delete_instance(self, project_id, instance):
'\n Deletes a Cloud SQL instance.\n\n :param project_id: Project ID of the project that contains the instance.\n :type project_id: str\n :param instance: Cloud SQL instance ID. This does not include the project ID.\n :type instance:... | def delete_instance(self, project_id, instance):
'\n Deletes a Cloud SQL instance.\n\n :param project_id: Project ID of the project that contains the instance.\n :type project_id: str\n :param instance: Cloud SQL instance ID. This does not include the project ID.\n :type instance:... |
1534704ee16cd1ebf31be3554cf874ce18a767f54339253aeaff2745630fdc8d | def _wait_for_operation_to_complete(self, project_id, operation_name):
'\n Waits for the named operation to complete - checks status of the\n asynchronous call.\n\n :param project_id: Project ID of the project that contains the instance.\n :type project_id: str\n :param operation_... | Waits for the named operation to complete - checks status of the
asynchronous call.
:param project_id: Project ID of the project that contains the instance.
:type project_id: str
:param operation_name: name of the operation
:type operation_name: str
:return: response returned by the operation
:rtype: dict | airflow/contrib/hooks/gcp_sql_hook.py | _wait_for_operation_to_complete | crazyxw/incubator-airflow | 4 | python | def _wait_for_operation_to_complete(self, project_id, operation_name):
'\n Waits for the named operation to complete - checks status of the\n asynchronous call.\n\n :param project_id: Project ID of the project that contains the instance.\n :type project_id: str\n :param operation_... | def _wait_for_operation_to_complete(self, project_id, operation_name):
'\n Waits for the named operation to complete - checks status of the\n asynchronous call.\n\n :param project_id: Project ID of the project that contains the instance.\n :type project_id: str\n :param operation_... |
8936859ec219535fa972d4805ed7ad681a30c65e81f935f4113e714a7ead4ff8 | def __init__(self, **kwargs):
'\n Initializes a new WorkRequestSummary object with values from keyword arguments.\n The following keyword arguments are supported (corresponding to the getters/setters of this class):\n\n :param operation_type:\n The value to assign to the operation_ty... | Initializes a new WorkRequestSummary object with values from keyword arguments.
The following keyword arguments are supported (corresponding to the getters/setters of this class):
:param operation_type:
The value to assign to the operation_type property of this WorkRequestSummary.
Allowed values for this prope... | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | __init__ | revnav/sandbox | 0 | python | def __init__(self, **kwargs):
'\n Initializes a new WorkRequestSummary object with values from keyword arguments.\n The following keyword arguments are supported (corresponding to the getters/setters of this class):\n\n :param operation_type:\n The value to assign to the operation_ty... | def __init__(self, **kwargs):
'\n Initializes a new WorkRequestSummary object with values from keyword arguments.\n The following keyword arguments are supported (corresponding to the getters/setters of this class):\n\n :param operation_type:\n The value to assign to the operation_ty... |
e343e14f34e89ca81fa4371f935ff5ba62385077d7a506486ecdf20dc9716dc0 | @property
def operation_type(self):
'\n **[Required]** Gets the operation_type of this WorkRequestSummary.\n The asynchronous operation tracked by this work request.\n\n Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT",... | **[Required]** Gets the operation_type of this WorkRequestSummary.
The asynchronous operation tracked by this work request.
Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", 'UN... | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | operation_type | revnav/sandbox | 0 | python | @property
def operation_type(self):
'\n **[Required]** Gets the operation_type of this WorkRequestSummary.\n The asynchronous operation tracked by this work request.\n\n Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT",... | @property
def operation_type(self):
'\n **[Required]** Gets the operation_type of this WorkRequestSummary.\n The asynchronous operation tracked by this work request.\n\n Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT",... |
ebe127ac8caee1d45d2093ae17eade20c1fa7447d90ac12df497a3044a8dd743 | @operation_type.setter
def operation_type(self, operation_type):
'\n Sets the operation_type of this WorkRequestSummary.\n The asynchronous operation tracked by this work request.\n\n\n :param operation_type: The operation_type of this WorkRequestSummary.\n :type: str\n '
allo... | Sets the operation_type of this WorkRequestSummary.
The asynchronous operation tracked by this work request.
:param operation_type: The operation_type of this WorkRequestSummary.
:type: str | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | operation_type | revnav/sandbox | 0 | python | @operation_type.setter
def operation_type(self, operation_type):
'\n Sets the operation_type of this WorkRequestSummary.\n The asynchronous operation tracked by this work request.\n\n\n :param operation_type: The operation_type of this WorkRequestSummary.\n :type: str\n '
allo... | @operation_type.setter
def operation_type(self, operation_type):
'\n Sets the operation_type of this WorkRequestSummary.\n The asynchronous operation tracked by this work request.\n\n\n :param operation_type: The operation_type of this WorkRequestSummary.\n :type: str\n '
allo... |
3cec2a3882621b0b7b7a190e4225437730a4effbd8e88a036bfd024e114a8dfa | @property
def status(self):
'\n **[Required]** Gets the status of this WorkRequestSummary.\n The status of the work request.\n\n Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", \'UNKNOWN_ENUM_VALUE\'.\n Any unrecognized values returned by a service... | **[Required]** Gets the status of this WorkRequestSummary.
The status of the work request.
Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
:return: The status of this Wo... | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | status | revnav/sandbox | 0 | python | @property
def status(self):
'\n **[Required]** Gets the status of this WorkRequestSummary.\n The status of the work request.\n\n Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", \'UNKNOWN_ENUM_VALUE\'.\n Any unrecognized values returned by a service... | @property
def status(self):
'\n **[Required]** Gets the status of this WorkRequestSummary.\n The status of the work request.\n\n Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", \'UNKNOWN_ENUM_VALUE\'.\n Any unrecognized values returned by a service... |
dd91301119bd1a51dbadfe175483a23fcf82fa98ecbd51b7d8352daa2d6326bf | @status.setter
def status(self, status):
'\n Sets the status of this WorkRequestSummary.\n The status of the work request.\n\n\n :param status: The status of this WorkRequestSummary.\n :type: str\n '
allowed_values = ['ACCEPTED', 'IN_PROGRESS', 'FAILED', 'SUCCEEDED']
if (n... | Sets the status of this WorkRequestSummary.
The status of the work request.
:param status: The status of this WorkRequestSummary.
:type: str | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | status | revnav/sandbox | 0 | python | @status.setter
def status(self, status):
'\n Sets the status of this WorkRequestSummary.\n The status of the work request.\n\n\n :param status: The status of this WorkRequestSummary.\n :type: str\n '
allowed_values = ['ACCEPTED', 'IN_PROGRESS', 'FAILED', 'SUCCEEDED']
if (n... | @status.setter
def status(self, status):
'\n Sets the status of this WorkRequestSummary.\n The status of the work request.\n\n\n :param status: The status of this WorkRequestSummary.\n :type: str\n '
allowed_values = ['ACCEPTED', 'IN_PROGRESS', 'FAILED', 'SUCCEEDED']
if (n... |
8776e30319b7e0939c08d3ccff02c7f7a4486ea40f709322d7774dd8eb7c70eb | @property
def id(self):
'\n **[Required]** Gets the id of this WorkRequestSummary.\n The OCID of the work request.\n\n\n :return: The id of this WorkRequestSummary.\n :rtype: str\n '
return self._id | **[Required]** Gets the id of this WorkRequestSummary.
The OCID of the work request.
:return: The id of this WorkRequestSummary.
:rtype: str | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | id | revnav/sandbox | 0 | python | @property
def id(self):
'\n **[Required]** Gets the id of this WorkRequestSummary.\n The OCID of the work request.\n\n\n :return: The id of this WorkRequestSummary.\n :rtype: str\n '
return self._id | @property
def id(self):
'\n **[Required]** Gets the id of this WorkRequestSummary.\n The OCID of the work request.\n\n\n :return: The id of this WorkRequestSummary.\n :rtype: str\n '
return self._id<|docstring|>**[Required]** Gets the id of this WorkRequestSummary.
The OCID of... |
cffdcb061d7c833085ab2e2f41f2603f68a07ca7cab3ba46f97e0535d3785062 | @id.setter
def id(self, id):
'\n Sets the id of this WorkRequestSummary.\n The OCID of the work request.\n\n\n :param id: The id of this WorkRequestSummary.\n :type: str\n '
self._id = id | Sets the id of this WorkRequestSummary.
The OCID of the work request.
:param id: The id of this WorkRequestSummary.
:type: str | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | id | revnav/sandbox | 0 | python | @id.setter
def id(self, id):
'\n Sets the id of this WorkRequestSummary.\n The OCID of the work request.\n\n\n :param id: The id of this WorkRequestSummary.\n :type: str\n '
self._id = id | @id.setter
def id(self, id):
'\n Sets the id of this WorkRequestSummary.\n The OCID of the work request.\n\n\n :param id: The id of this WorkRequestSummary.\n :type: str\n '
self._id = id<|docstring|>Sets the id of this WorkRequestSummary.
The OCID of the work request.
:para... |
6927b12d5187da87b0c4b685e20069eee4190b89c749e6d715f16962070f11c3 | @property
def compartment_id(self):
'\n **[Required]** Gets the compartment_id of this WorkRequestSummary.\n The OCID of the compartment containing this work request.\n\n\n :return: The compartment_id of this WorkRequestSummary.\n :rtype: str\n '
return self._compartment_id | **[Required]** Gets the compartment_id of this WorkRequestSummary.
The OCID of the compartment containing this work request.
:return: The compartment_id of this WorkRequestSummary.
:rtype: str | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | compartment_id | revnav/sandbox | 0 | python | @property
def compartment_id(self):
'\n **[Required]** Gets the compartment_id of this WorkRequestSummary.\n The OCID of the compartment containing this work request.\n\n\n :return: The compartment_id of this WorkRequestSummary.\n :rtype: str\n '
return self._compartment_id | @property
def compartment_id(self):
'\n **[Required]** Gets the compartment_id of this WorkRequestSummary.\n The OCID of the compartment containing this work request.\n\n\n :return: The compartment_id of this WorkRequestSummary.\n :rtype: str\n '
return self._compartment_id<|d... |
0de75e5a340b4f904e0916bad500a2c527276280a24dcf687f03a848c7aa9a74 | @compartment_id.setter
def compartment_id(self, compartment_id):
'\n Sets the compartment_id of this WorkRequestSummary.\n The OCID of the compartment containing this work request.\n\n\n :param compartment_id: The compartment_id of this WorkRequestSummary.\n :type: str\n '
sel... | Sets the compartment_id of this WorkRequestSummary.
The OCID of the compartment containing this work request.
:param compartment_id: The compartment_id of this WorkRequestSummary.
:type: str | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | compartment_id | revnav/sandbox | 0 | python | @compartment_id.setter
def compartment_id(self, compartment_id):
'\n Sets the compartment_id of this WorkRequestSummary.\n The OCID of the compartment containing this work request.\n\n\n :param compartment_id: The compartment_id of this WorkRequestSummary.\n :type: str\n '
sel... | @compartment_id.setter
def compartment_id(self, compartment_id):
'\n Sets the compartment_id of this WorkRequestSummary.\n The OCID of the compartment containing this work request.\n\n\n :param compartment_id: The compartment_id of this WorkRequestSummary.\n :type: str\n '
sel... |
4d582d02d33d183706e601774c20362485a14bdd8c20147ec2690d57853c900f | @property
def resources(self):
'\n **[Required]** Gets the resources of this WorkRequestSummary.\n The resources impacted by the work request.\n\n\n :return: The resources of this WorkRequestSummary.\n :rtype: list[WorkRequestResource]\n '
return self._resources | **[Required]** Gets the resources of this WorkRequestSummary.
The resources impacted by the work request.
:return: The resources of this WorkRequestSummary.
:rtype: list[WorkRequestResource] | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | resources | revnav/sandbox | 0 | python | @property
def resources(self):
'\n **[Required]** Gets the resources of this WorkRequestSummary.\n The resources impacted by the work request.\n\n\n :return: The resources of this WorkRequestSummary.\n :rtype: list[WorkRequestResource]\n '
return self._resources | @property
def resources(self):
'\n **[Required]** Gets the resources of this WorkRequestSummary.\n The resources impacted by the work request.\n\n\n :return: The resources of this WorkRequestSummary.\n :rtype: list[WorkRequestResource]\n '
return self._resources<|docstring|>**... |
fef47a71d4dcde68c8edee597772b55ea40ecaca44a1cad6a9b9137a36315c23 | @resources.setter
def resources(self, resources):
'\n Sets the resources of this WorkRequestSummary.\n The resources impacted by the work request.\n\n\n :param resources: The resources of this WorkRequestSummary.\n :type: list[WorkRequestResource]\n '
self._resources = resourc... | Sets the resources of this WorkRequestSummary.
The resources impacted by the work request.
:param resources: The resources of this WorkRequestSummary.
:type: list[WorkRequestResource] | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | resources | revnav/sandbox | 0 | python | @resources.setter
def resources(self, resources):
'\n Sets the resources of this WorkRequestSummary.\n The resources impacted by the work request.\n\n\n :param resources: The resources of this WorkRequestSummary.\n :type: list[WorkRequestResource]\n '
self._resources = resourc... | @resources.setter
def resources(self, resources):
'\n Sets the resources of this WorkRequestSummary.\n The resources impacted by the work request.\n\n\n :param resources: The resources of this WorkRequestSummary.\n :type: list[WorkRequestResource]\n '
self._resources = resourc... |
e4d2b970aa306284c45296f5790964df83311bf8cb01eb0a0f90bd89effa9fee | @property
def percent_complete(self):
'\n **[Required]** Gets the percent_complete of this WorkRequestSummary.\n Progress of the request in percentage.\n\n\n :return: The percent_complete of this WorkRequestSummary.\n :rtype: float\n '
return self._percent_complete | **[Required]** Gets the percent_complete of this WorkRequestSummary.
Progress of the request in percentage.
:return: The percent_complete of this WorkRequestSummary.
:rtype: float | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | percent_complete | revnav/sandbox | 0 | python | @property
def percent_complete(self):
'\n **[Required]** Gets the percent_complete of this WorkRequestSummary.\n Progress of the request in percentage.\n\n\n :return: The percent_complete of this WorkRequestSummary.\n :rtype: float\n '
return self._percent_complete | @property
def percent_complete(self):
'\n **[Required]** Gets the percent_complete of this WorkRequestSummary.\n Progress of the request in percentage.\n\n\n :return: The percent_complete of this WorkRequestSummary.\n :rtype: float\n '
return self._percent_complete<|docstring|... |
0210d0c9e148eb982eab75e5339eed6cec2e7de1bf09a6bed343f954e7f4700b | @percent_complete.setter
def percent_complete(self, percent_complete):
'\n Sets the percent_complete of this WorkRequestSummary.\n Progress of the request in percentage.\n\n\n :param percent_complete: The percent_complete of this WorkRequestSummary.\n :type: float\n '
self._pe... | Sets the percent_complete of this WorkRequestSummary.
Progress of the request in percentage.
:param percent_complete: The percent_complete of this WorkRequestSummary.
:type: float | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | percent_complete | revnav/sandbox | 0 | python | @percent_complete.setter
def percent_complete(self, percent_complete):
'\n Sets the percent_complete of this WorkRequestSummary.\n Progress of the request in percentage.\n\n\n :param percent_complete: The percent_complete of this WorkRequestSummary.\n :type: float\n '
self._pe... | @percent_complete.setter
def percent_complete(self, percent_complete):
'\n Sets the percent_complete of this WorkRequestSummary.\n Progress of the request in percentage.\n\n\n :param percent_complete: The percent_complete of this WorkRequestSummary.\n :type: float\n '
self._pe... |
6516ba901d7994a2914f39c4e13ad310f14e0ebd04dc9e77f90b60fd2d182408 | @property
def time_accepted(self):
'\n **[Required]** Gets the time_accepted of this WorkRequestSummary.\n The date and time the work request was created, in the format defined by RFC3339.\n\n\n :return: The time_accepted of this WorkRequestSummary.\n :rtype: datetime\n '
retu... | **[Required]** Gets the time_accepted of this WorkRequestSummary.
The date and time the work request was created, in the format defined by RFC3339.
:return: The time_accepted of this WorkRequestSummary.
:rtype: datetime | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | time_accepted | revnav/sandbox | 0 | python | @property
def time_accepted(self):
'\n **[Required]** Gets the time_accepted of this WorkRequestSummary.\n The date and time the work request was created, in the format defined by RFC3339.\n\n\n :return: The time_accepted of this WorkRequestSummary.\n :rtype: datetime\n '
retu... | @property
def time_accepted(self):
'\n **[Required]** Gets the time_accepted of this WorkRequestSummary.\n The date and time the work request was created, in the format defined by RFC3339.\n\n\n :return: The time_accepted of this WorkRequestSummary.\n :rtype: datetime\n '
retu... |
ddf789ff4ecf5141dad11bced76633120dc6298e077641316caac5ea78f5c3a3 | @time_accepted.setter
def time_accepted(self, time_accepted):
'\n Sets the time_accepted of this WorkRequestSummary.\n The date and time the work request was created, in the format defined by RFC3339.\n\n\n :param time_accepted: The time_accepted of this WorkRequestSummary.\n :type: date... | Sets the time_accepted of this WorkRequestSummary.
The date and time the work request was created, in the format defined by RFC3339.
:param time_accepted: The time_accepted of this WorkRequestSummary.
:type: datetime | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | time_accepted | revnav/sandbox | 0 | python | @time_accepted.setter
def time_accepted(self, time_accepted):
'\n Sets the time_accepted of this WorkRequestSummary.\n The date and time the work request was created, in the format defined by RFC3339.\n\n\n :param time_accepted: The time_accepted of this WorkRequestSummary.\n :type: date... | @time_accepted.setter
def time_accepted(self, time_accepted):
'\n Sets the time_accepted of this WorkRequestSummary.\n The date and time the work request was created, in the format defined by RFC3339.\n\n\n :param time_accepted: The time_accepted of this WorkRequestSummary.\n :type: date... |
d3fe0442f8f451dbcb31f802a6a8d6b22edd65436b57717ee3ad96485fcab038 | @property
def time_started(self):
'\n Gets the time_started of this WorkRequestSummary.\n The date and time the work request transitioned from ACCEPTED to IN_PROGRESS, in the format defined by RFC3339.\n\n\n :return: The time_started of this WorkRequestSummary.\n :rtype: datetime\n ... | Gets the time_started of this WorkRequestSummary.
The date and time the work request transitioned from ACCEPTED to IN_PROGRESS, in the format defined by RFC3339.
:return: The time_started of this WorkRequestSummary.
:rtype: datetime | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | time_started | revnav/sandbox | 0 | python | @property
def time_started(self):
'\n Gets the time_started of this WorkRequestSummary.\n The date and time the work request transitioned from ACCEPTED to IN_PROGRESS, in the format defined by RFC3339.\n\n\n :return: The time_started of this WorkRequestSummary.\n :rtype: datetime\n ... | @property
def time_started(self):
'\n Gets the time_started of this WorkRequestSummary.\n The date and time the work request transitioned from ACCEPTED to IN_PROGRESS, in the format defined by RFC3339.\n\n\n :return: The time_started of this WorkRequestSummary.\n :rtype: datetime\n ... |
7eb3b27d142635d20d751f492c0816fc8b50176c7d32fbf7b261c4d690722380 | @time_started.setter
def time_started(self, time_started):
'\n Sets the time_started of this WorkRequestSummary.\n The date and time the work request transitioned from ACCEPTED to IN_PROGRESS, in the format defined by RFC3339.\n\n\n :param time_started: The time_started of this WorkRequestSumma... | Sets the time_started of this WorkRequestSummary.
The date and time the work request transitioned from ACCEPTED to IN_PROGRESS, in the format defined by RFC3339.
:param time_started: The time_started of this WorkRequestSummary.
:type: datetime | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | time_started | revnav/sandbox | 0 | python | @time_started.setter
def time_started(self, time_started):
'\n Sets the time_started of this WorkRequestSummary.\n The date and time the work request transitioned from ACCEPTED to IN_PROGRESS, in the format defined by RFC3339.\n\n\n :param time_started: The time_started of this WorkRequestSumma... | @time_started.setter
def time_started(self, time_started):
'\n Sets the time_started of this WorkRequestSummary.\n The date and time the work request transitioned from ACCEPTED to IN_PROGRESS, in the format defined by RFC3339.\n\n\n :param time_started: The time_started of this WorkRequestSumma... |
87c159a768906edda97c8fe0e23de709b854e30f8a0e20bcfb5eecb0de381e90 | @property
def time_finished(self):
'\n Gets the time_finished of this WorkRequestSummary.\n The date and time the work request reached a terminal state, either FAILED or SUCCEEDED, in the format defined by RFC3339.\n\n\n :return: The time_finished of this WorkRequestSummary.\n :rtype: da... | Gets the time_finished of this WorkRequestSummary.
The date and time the work request reached a terminal state, either FAILED or SUCCEEDED, in the format defined by RFC3339.
:return: The time_finished of this WorkRequestSummary.
:rtype: datetime | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | time_finished | revnav/sandbox | 0 | python | @property
def time_finished(self):
'\n Gets the time_finished of this WorkRequestSummary.\n The date and time the work request reached a terminal state, either FAILED or SUCCEEDED, in the format defined by RFC3339.\n\n\n :return: The time_finished of this WorkRequestSummary.\n :rtype: da... | @property
def time_finished(self):
'\n Gets the time_finished of this WorkRequestSummary.\n The date and time the work request reached a terminal state, either FAILED or SUCCEEDED, in the format defined by RFC3339.\n\n\n :return: The time_finished of this WorkRequestSummary.\n :rtype: da... |
f1c7cf0fdf96f84ac2717c2f6026060f4b8fb6e8b0053f8d7959a4742b300cac | @time_finished.setter
def time_finished(self, time_finished):
'\n Sets the time_finished of this WorkRequestSummary.\n The date and time the work request reached a terminal state, either FAILED or SUCCEEDED, in the format defined by RFC3339.\n\n\n :param time_finished: The time_finished of this... | Sets the time_finished of this WorkRequestSummary.
The date and time the work request reached a terminal state, either FAILED or SUCCEEDED, in the format defined by RFC3339.
:param time_finished: The time_finished of this WorkRequestSummary.
:type: datetime | darling_ansible/python_venv/lib/python3.7/site-packages/oci/data_safe/models/work_request_summary.py | time_finished | revnav/sandbox | 0 | python | @time_finished.setter
def time_finished(self, time_finished):
'\n Sets the time_finished of this WorkRequestSummary.\n The date and time the work request reached a terminal state, either FAILED or SUCCEEDED, in the format defined by RFC3339.\n\n\n :param time_finished: The time_finished of this... | @time_finished.setter
def time_finished(self, time_finished):
'\n Sets the time_finished of this WorkRequestSummary.\n The date and time the work request reached a terminal state, either FAILED or SUCCEEDED, in the format defined by RFC3339.\n\n\n :param time_finished: The time_finished of this... |
db3921ce1a9a37ea217e4df2c35f5b6025da115eaa703b99d44f7942e621c749 | def _popn(self, n):
' Returns a copy of this index without the left-most n values.\n\n Removes n names, labels, and codes in order to build a new index\n for results.\n '
from cudf import DataFrame
codes = DataFrame()
for idx in self.codes.columns[n:]:
codes.add_column(idx, ... | Returns a copy of this index without the left-most n values.
Removes n names, labels, and codes in order to build a new index
for results. | python/cudf/dataframe/multiindex.py | _popn | mas192/cudf | 1 | python | def _popn(self, n):
' Returns a copy of this index without the left-most n values.\n\n Removes n names, labels, and codes in order to build a new index\n for results.\n '
from cudf import DataFrame
codes = DataFrame()
for idx in self.codes.columns[n:]:
codes.add_column(idx, ... | def _popn(self, n):
' Returns a copy of this index without the left-most n values.\n\n Removes n names, labels, and codes in order to build a new index\n for results.\n '
from cudf import DataFrame
codes = DataFrame()
for idx in self.codes.columns[n:]:
codes.add_column(idx, ... |
2ce3f67f9b992da48e98da1e9d31902a1e880c26fbfbca789d6b75208ca85f8f | def _compute_validity_mask(self, df, row_tuple):
' Computes the valid set of indices of values in the lookup\n '
validity_mask = []
for (i, element) in enumerate(row_tuple):
index_of_code_at_level = None
for level_index in range(len(self.levels[i])):
if (self.levels[i][lev... | Computes the valid set of indices of values in the lookup | python/cudf/dataframe/multiindex.py | _compute_validity_mask | mas192/cudf | 1 | python | def _compute_validity_mask(self, df, row_tuple):
' \n '
validity_mask = []
for (i, element) in enumerate(row_tuple):
index_of_code_at_level = None
for level_index in range(len(self.levels[i])):
if (self.levels[i][level_index] == element):
index_of_code_at_l... | def _compute_validity_mask(self, df, row_tuple):
' \n '
validity_mask = []
for (i, element) in enumerate(row_tuple):
index_of_code_at_level = None
for level_index in range(len(self.levels[i])):
if (self.levels[i][level_index] == element):
index_of_code_at_l... |
33da09f180e969aa247100eb8c3fd4bd40eb9a19b4844c981a256407aa22ce94 | @classmethod
def from_pandas(cls, multiindex):
"\n Convert from a Pandas MultiIndex\n\n Raises\n ------\n TypeError for invalid input type.\n\n Examples\n --------\n >>> import cudf\n >>> import pandas as pd\n >>> pmi = pd.MultiIndex(levels=[['a', 'b'],... | Convert from a Pandas MultiIndex
Raises
------
TypeError for invalid input type.
Examples
--------
>>> import cudf
>>> import pandas as pd
>>> pmi = pd.MultiIndex(levels=[['a', 'b'], ['c', 'd']],
codes=[[0, 1], [1, ]])
>>> cudf.from_pandas(pmi)
MultiIndex( ... ) | python/cudf/dataframe/multiindex.py | from_pandas | mas192/cudf | 1 | python | @classmethod
def from_pandas(cls, multiindex):
"\n Convert from a Pandas MultiIndex\n\n Raises\n ------\n TypeError for invalid input type.\n\n Examples\n --------\n >>> import cudf\n >>> import pandas as pd\n >>> pmi = pd.MultiIndex(levels=[['a', 'b'],... | @classmethod
def from_pandas(cls, multiindex):
"\n Convert from a Pandas MultiIndex\n\n Raises\n ------\n TypeError for invalid input type.\n\n Examples\n --------\n >>> import cudf\n >>> import pandas as pd\n >>> pmi = pd.MultiIndex(levels=[['a', 'b'],... |
ba9fea9410474f435fa2284f57aeccf0eeff7bd256585b1d1f6b1c99bc6f1799 | def main(_):
'Run main function for continue Training.'
if (FLAGS.logdir is None):
logging.error('No logdir are given.')
logging.error('Usage: tv-analyze --logdir dir')
exit(1)
if (FLAGS.gpus is None):
if ('TV_USE_GPUS' in os.environ):
if (os.environ['TV_USE_GPUS'... | Run main function for continue Training. | submodules/TensorVision/tensorvision/continue.py | main | lrxiao/free-space | 250 | python | def main(_):
if (FLAGS.logdir is None):
logging.error('No logdir are given.')
logging.error('Usage: tv-analyze --logdir dir')
exit(1)
if (FLAGS.gpus is None):
if ('TV_USE_GPUS' in os.environ):
if (os.environ['TV_USE_GPUS'] == 'force'):
logging.err... | def main(_):
if (FLAGS.logdir is None):
logging.error('No logdir are given.')
logging.error('Usage: tv-analyze --logdir dir')
exit(1)
if (FLAGS.gpus is None):
if ('TV_USE_GPUS' in os.environ):
if (os.environ['TV_USE_GPUS'] == 'force'):
logging.err... |
d92837a2e9733c8bcab5be8e431d2b9737b15168a2dd8b15527c71c7135355b0 | def __init__(self, model, img_size=(1, 3, 224, 224), custom_tensor=None, device='cpu', instances=None):
'\n instances: list of layer types,\n supported types are [nn.Conv2d, nn.Linear,\n nn.BatchNorm2d, nn.ReLU, nn.MaxPool2d, nn.AvgPool2d, nn.Softmax]\n '
self.device = device... | instances: list of layer types,
supported types are [nn.Conv2d, nn.Linear,
nn.BatchNorm2d, nn.ReLU, nn.MaxPool2d, nn.AvgPool2d, nn.Softmax] | flopco/flopco.py | __init__ | juliagusak/flopco-pytorch | 14 | python | def __init__(self, model, img_size=(1, 3, 224, 224), custom_tensor=None, device='cpu', instances=None):
'\n instances: list of layer types,\n supported types are [nn.Conv2d, nn.Linear,\n nn.BatchNorm2d, nn.ReLU, nn.MaxPool2d, nn.AvgPool2d, nn.Softmax]\n '
self.device = device... | def __init__(self, model, img_size=(1, 3, 224, 224), custom_tensor=None, device='cpu', instances=None):
'\n instances: list of layer types,\n supported types are [nn.Conv2d, nn.Linear,\n nn.BatchNorm2d, nn.ReLU, nn.MaxPool2d, nn.AvgPool2d, nn.Softmax]\n '
self.device = device... |
7e1221f47d90ebf0c049d0950cc3794106c78eeede522d07edf449b38a4297b4 | def __call__(self, assembly1, assembly2):
'\n :param brainio.assemblies.NeuroidAssembly assembly1:\n :param brainio.assemblies.NeuroidAssembly assembly2:\n :return: brainscore.metrics.Score\n '
return self._cross_validation(assembly1, assembly2, apply=self._metric) | :param brainio.assemblies.NeuroidAssembly assembly1:
:param brainio.assemblies.NeuroidAssembly assembly2:
:return: brainscore.metrics.Score | brainscore/metrics/cka.py | __call__ | aalok-sathe/brain-score | 52 | python | def __call__(self, assembly1, assembly2):
'\n :param brainio.assemblies.NeuroidAssembly assembly1:\n :param brainio.assemblies.NeuroidAssembly assembly2:\n :return: brainscore.metrics.Score\n '
return self._cross_validation(assembly1, assembly2, apply=self._metric) | def __call__(self, assembly1, assembly2):
'\n :param brainio.assemblies.NeuroidAssembly assembly1:\n :param brainio.assemblies.NeuroidAssembly assembly2:\n :return: brainscore.metrics.Score\n '
return self._cross_validation(assembly1, assembly2, apply=self._metric)<|docstring|>:param... |
479069a04169376d1cfadf0fb4f8d40207a6f43ddc55e8315c46cbc1ac3a1ad6 | def __call__(self, assembly1, assembly2):
'\n :param brainscore.assemblies.NeuroidAssembly assembly1:\n :param brainscore.assemblies.NeuroidAssembly assembly2:\n :return: brainscore.assemblies.DataAssembly\n '
assembly1 = assembly1.sortby(self._comparison_coord)
assembly2 = assem... | :param brainscore.assemblies.NeuroidAssembly assembly1:
:param brainscore.assemblies.NeuroidAssembly assembly2:
:return: brainscore.assemblies.DataAssembly | brainscore/metrics/cka.py | __call__ | aalok-sathe/brain-score | 52 | python | def __call__(self, assembly1, assembly2):
'\n :param brainscore.assemblies.NeuroidAssembly assembly1:\n :param brainscore.assemblies.NeuroidAssembly assembly2:\n :return: brainscore.assemblies.DataAssembly\n '
assembly1 = assembly1.sortby(self._comparison_coord)
assembly2 = assem... | def __call__(self, assembly1, assembly2):
'\n :param brainscore.assemblies.NeuroidAssembly assembly1:\n :param brainscore.assemblies.NeuroidAssembly assembly2:\n :return: brainscore.assemblies.DataAssembly\n '
assembly1 = assembly1.sortby(self._comparison_coord)
assembly2 = assem... |
900178c531c0f229e1cd69c6cd91f8805e39ac001d059e6da6d1f6f1ea1d622f | def __init__(self, dataset, dataset_json_mappings, facets):
'\n\n :param dataset:\n :param dataset_json_mappings:\n '
self.id = dataset
self._facets = facets
self.file_map = {}
self.dataset_uris = {}
self.not_found_messages = set()
self.dataset_json_mappings = dataset_js... | :param dataset:
:param dataset_json_mappings: | cci_tagger/dataset/dataset.py | __init__ | rsmith013/cci-tagger | 0 | python | def __init__(self, dataset, dataset_json_mappings, facets):
'\n\n :param dataset:\n :param dataset_json_mappings:\n '
self.id = dataset
self._facets = facets
self.file_map = {}
self.dataset_uris = {}
self.not_found_messages = set()
self.dataset_json_mappings = dataset_js... | def __init__(self, dataset, dataset_json_mappings, facets):
'\n\n :param dataset:\n :param dataset_json_mappings:\n '
self.id = dataset
self._facets = facets
self.file_map = {}
self.dataset_uris = {}
self.not_found_messages = set()
self.dataset_json_mappings = dataset_js... |
79a1be792a6ec6c8fa6f795da283bdf2b4c6dbb865ff93c5a08e34d06b7e098c | def process_dataset(self, max_file_count=0):
'\n Main entry point to process a dataset.\n\n The max file count kwarg can be used for testing on a smaller subset\n of files. When this parameter is set > 1, the file list is restricted\n to netCDF files.\n :param max_file_count: defa... | Main entry point to process a dataset.
The max file count kwarg can be used for testing on a smaller subset
of files. When this parameter is set > 1, the file list is restricted
to netCDF files.
:param max_file_count: default: 0. How many netCDF files to try and scan (int)
:return: URIs for each facet (dict), Files ma... | cci_tagger/dataset/dataset.py | process_dataset | rsmith013/cci-tagger | 0 | python | def process_dataset(self, max_file_count=0):
'\n Main entry point to process a dataset.\n\n The max file count kwarg can be used for testing on a smaller subset\n of files. When this parameter is set > 1, the file list is restricted\n to netCDF files.\n :param max_file_count: defa... | def process_dataset(self, max_file_count=0):
'\n Main entry point to process a dataset.\n\n The max file count kwarg can be used for testing on a smaller subset\n of files. When this parameter is set > 1, the file list is restricted\n to netCDF files.\n :param max_file_count: defa... |
0e92687333c5febff717c57853c79856e69026f7a12ea44cb9a0372ba110f5d7 | def generate_ds_id(self, drs_facets, filepath):
'\n Turn the drs labels into an identifier\n\n :param drs_facets: Bag of labels\n :param filepath: Filepath of the file to generate ID for. Used to\n match against filters.\n\n :return: ID\n '
MISSING_VALUES = False
ds... | Turn the drs labels into an identifier
:param drs_facets: Bag of labels
:param filepath: Filepath of the file to generate ID for. Used to
match against filters.
:return: ID | cci_tagger/dataset/dataset.py | generate_ds_id | rsmith013/cci-tagger | 0 | python | def generate_ds_id(self, drs_facets, filepath):
'\n Turn the drs labels into an identifier\n\n :param drs_facets: Bag of labels\n :param filepath: Filepath of the file to generate ID for. Used to\n match against filters.\n\n :return: ID\n '
MISSING_VALUES = False
ds... | def generate_ds_id(self, drs_facets, filepath):
'\n Turn the drs labels into an identifier\n\n :param drs_facets: Bag of labels\n :param filepath: Filepath of the file to generate ID for. Used to\n match against filters.\n\n :return: ID\n '
MISSING_VALUES = False
ds... |
e6d5d5b12ac806333adf0e39b5573258c11d111d858cc2b40c3bbc6fd458a743 | def get_drs_labels(self, drs_labels):
'\n Convert the URIs into human readable labels for the DRS.\n\n :param uris: Labels generated from each URI (dict)\n :return: Label string for each facet (dict)\n '
drs_labels = drs_labels.copy()
for facet in drs_labels:
if (facet in... | Convert the URIs into human readable labels for the DRS.
:param uris: Labels generated from each URI (dict)
:return: Label string for each facet (dict) | cci_tagger/dataset/dataset.py | get_drs_labels | rsmith013/cci-tagger | 0 | python | def get_drs_labels(self, drs_labels):
'\n Convert the URIs into human readable labels for the DRS.\n\n :param uris: Labels generated from each URI (dict)\n :return: Label string for each facet (dict)\n '
drs_labels = drs_labels.copy()
for facet in drs_labels:
if (facet in... | def get_drs_labels(self, drs_labels):
'\n Convert the URIs into human readable labels for the DRS.\n\n :param uris: Labels generated from each URI (dict)\n :return: Label string for each facet (dict)\n '
drs_labels = drs_labels.copy()
for facet in drs_labels:
if (facet in... |
73f7df99e81bb5c407dd346350b840aa43129e59faf5511d0448d1f452037e67 | @fpath_as_pathlib('filepath')
def get_file_tags(self, filepath):
'\n Extract the URIs from the vocab server which matches the terms\n found in the file path and the file metadata.\n\n The file must be a pathlib.Path object so is checked by a decorator.\n :param file: Filepath (str | path... | Extract the URIs from the vocab server which matches the terms
found in the file path and the file metadata.
The file must be a pathlib.Path object so is checked by a decorator.
:param file: Filepath (str | pathlib.Path)
:return: URIs (dict) | cci_tagger/dataset/dataset.py | get_file_tags | rsmith013/cci-tagger | 0 | python | @fpath_as_pathlib('filepath')
def get_file_tags(self, filepath):
'\n Extract the URIs from the vocab server which matches the terms\n found in the file path and the file metadata.\n\n The file must be a pathlib.Path object so is checked by a decorator.\n :param file: Filepath (str | path... | @fpath_as_pathlib('filepath')
def get_file_tags(self, filepath):
'\n Extract the URIs from the vocab server which matches the terms\n found in the file path and the file metadata.\n\n The file must be a pathlib.Path object so is checked by a decorator.\n :param file: Filepath (str | path... |
06d86bb2332946c5934fe505d5bcd9a57580e3a404853b1545203efed973280e | def _apply_mapping(self, file_tags):
'\n Take set of file tags and map them based on user JSON files\n\n :param file_tags: Tags extracted from the files\n :return: Bag of mapped tags\n '
mapped_values = {}
for (facet, values) in file_tags.items():
if (type(values) is list... | Take set of file tags and map them based on user JSON files
:param file_tags: Tags extracted from the files
:return: Bag of mapped tags | cci_tagger/dataset/dataset.py | _apply_mapping | rsmith013/cci-tagger | 0 | python | def _apply_mapping(self, file_tags):
'\n Take set of file tags and map them based on user JSON files\n\n :param file_tags: Tags extracted from the files\n :return: Bag of mapped tags\n '
mapped_values = {}
for (facet, values) in file_tags.items():
if (type(values) is list... | def _apply_mapping(self, file_tags):
'\n Take set of file tags and map them based on user JSON files\n\n :param file_tags: Tags extracted from the files\n :return: Bag of mapped tags\n '
mapped_values = {}
for (facet, values) in file_tags.items():
if (type(values) is list... |
73b4a279d4778c76eb8e140aa5f145dc74b0ffa8f060d0620fad275018c97615 | def _apply_overrides(self, mapped_tags):
'\n Apply any hard overrides which have been defined in the JSON files.\n This will take it as is, so you will need to make sure that overrides are\n legit!\n\n :param mapped_tags: Fields to apply overrides to\n :return: mapped_tags with ov... | Apply any hard overrides which have been defined in the JSON files.
This will take it as is, so you will need to make sure that overrides are
legit!
:param mapped_tags: Fields to apply overrides to
:return: mapped_tags with overrides applies (dict) | cci_tagger/dataset/dataset.py | _apply_overrides | rsmith013/cci-tagger | 0 | python | def _apply_overrides(self, mapped_tags):
'\n Apply any hard overrides which have been defined in the JSON files.\n This will take it as is, so you will need to make sure that overrides are\n legit!\n\n :param mapped_tags: Fields to apply overrides to\n :return: mapped_tags with ov... | def _apply_overrides(self, mapped_tags):
'\n Apply any hard overrides which have been defined in the JSON files.\n This will take it as is, so you will need to make sure that overrides are\n legit!\n\n :param mapped_tags: Fields to apply overrides to\n :return: mapped_tags with ov... |
5b05a46a9ac688c047a069fa2e7038963dda5014cc78476323c12ecc9a57e3d2 | def _convert_terms_to_uris(self, mapped_labels):
'\n Get the terms which have been extracted from the file and turn them\n into a bag or URIs which have been validated by the vocab server.\n\n :param mapped_labels: Mapped labels\n :return:\n '
uri_bag = {}
for facet in [co... | Get the terms which have been extracted from the file and turn them
into a bag or URIs which have been validated by the vocab server.
:param mapped_labels: Mapped labels
:return: | cci_tagger/dataset/dataset.py | _convert_terms_to_uris | rsmith013/cci-tagger | 0 | python | def _convert_terms_to_uris(self, mapped_labels):
'\n Get the terms which have been extracted from the file and turn them\n into a bag or URIs which have been validated by the vocab server.\n\n :param mapped_labels: Mapped labels\n :return:\n '
uri_bag = {}
for facet in [co... | def _convert_terms_to_uris(self, mapped_labels):
'\n Get the terms which have been extracted from the file and turn them\n into a bag or URIs which have been validated by the vocab server.\n\n :param mapped_labels: Mapped labels\n :return:\n '
uri_bag = {}
for facet in [co... |
6de4d8aa6b0a096dd7b72f87e209752ad87fa914a71e0e5dd20080d23f9bb182 | @staticmethod
def _get_data_from_filename1(file_segments):
'\n Extract data from the file name of form 1.\n\n @param file_segments (List(str)): file segments\n\n @return a dict where:\n key = facet name\n value = file segment\n\n '
return {constants.PROC... | Extract data from the file name of form 1.
@param file_segments (List(str)): file segments
@return a dict where:
key = facet name
value = file segment | cci_tagger/dataset/dataset.py | _get_data_from_filename1 | rsmith013/cci-tagger | 0 | python | @staticmethod
def _get_data_from_filename1(file_segments):
'\n Extract data from the file name of form 1.\n\n @param file_segments (List(str)): file segments\n\n @return a dict where:\n key = facet name\n value = file segment\n\n '
return {constants.PROC... | @staticmethod
def _get_data_from_filename1(file_segments):
'\n Extract data from the file name of form 1.\n\n @param file_segments (List(str)): file segments\n\n @return a dict where:\n key = facet name\n value = file segment\n\n '
return {constants.PROC... |
be0efb2ab846d58237c82fbb1e6968ce086da95c34413067aa7694af0972e5e8 | @staticmethod
def _get_data_from_filename2(file_segments):
'\n Extract data from the file name of form 2.\n\n @param file_segments (List(str)): file segments\n\n @return a dict where:\n key = facet name\n value = file segment\n\n '
return {constants.PROC... | Extract data from the file name of form 2.
@param file_segments (List(str)): file segments
@return a dict where:
key = facet name
value = file segment | cci_tagger/dataset/dataset.py | _get_data_from_filename2 | rsmith013/cci-tagger | 0 | python | @staticmethod
def _get_data_from_filename2(file_segments):
'\n Extract data from the file name of form 2.\n\n @param file_segments (List(str)): file segments\n\n @return a dict where:\n key = facet name\n value = file segment\n\n '
return {constants.PROC... | @staticmethod
def _get_data_from_filename2(file_segments):
'\n Extract data from the file name of form 2.\n\n @param file_segments (List(str)): file segments\n\n @return a dict where:\n key = facet name\n value = file segment\n\n '
return {constants.PROC... |
65f0659bd76809520656b3b52ac4c0775e18fed206e4f333cb4ac2cf89f7336b | def _get_dataset_files(self, max_file_count):
'\n Get files from the dataset. Will return a list including all file types\n unless the max_file_count parameter > 0. This assumes you are testing and\n are only interested in netCDF so will return the first n netCDF files\n\n :param max_fil... | Get files from the dataset. Will return a list including all file types
unless the max_file_count parameter > 0. This assumes you are testing and
are only interested in netCDF so will return the first n netCDF files
:param max_file_count: Used for testing. Max number of netCDF files. Default: 0
:return: list of files | cci_tagger/dataset/dataset.py | _get_dataset_files | rsmith013/cci-tagger | 0 | python | def _get_dataset_files(self, max_file_count):
'\n Get files from the dataset. Will return a list including all file types\n unless the max_file_count parameter > 0. This assumes you are testing and\n are only interested in netCDF so will return the first n netCDF files\n\n :param max_fil... | def _get_dataset_files(self, max_file_count):
'\n Get files from the dataset. Will return a list including all file types\n unless the max_file_count parameter > 0. This assumes you are testing and\n are only interested in netCDF so will return the first n netCDF files\n\n :param max_fil... |
0fdbd5d99c2d0df8dca816997c6e15b7a0252c3b6eaa2eb2afb6457312f5f599 | def _get_mapping(self, facet, term):
'\n Convert the term to lower case and get the mapped value from the\n user JSON files. Will return the original term in lowercase if no\n mapping is found.\n\n :param facet: The facet to match against (string)\n :param term: The term to be map... | Convert the term to lower case and get the mapped value from the
user JSON files. Will return the original term in lowercase if no
mapping is found.
:param facet: The facet to match against (string)
:param term: The term to be mapped (string)
:return: Mapped term or lowercase term (string) | cci_tagger/dataset/dataset.py | _get_mapping | rsmith013/cci-tagger | 0 | python | def _get_mapping(self, facet, term):
'\n Convert the term to lower case and get the mapped value from the\n user JSON files. Will return the original term in lowercase if no\n mapping is found.\n\n :param facet: The facet to match against (string)\n :param term: The term to be map... | def _get_mapping(self, facet, term):
'\n Convert the term to lower case and get the mapped value from the\n user JSON files. Will return the original term in lowercase if no\n mapping is found.\n\n :param facet: The facet to match against (string)\n :param term: The term to be map... |
d843a79302870f6f4233472b235b5f29e5bea365f493244e603e8826683b7566 | def _get_term_uri(self, facet, term):
'\n Take the term and return the URI from the Vocab service\n :param facet: global attribute, facet\n :param term: The term to check against the vocab service\n :return: The correct URI for the term\n '
facet = facet.lower()
term_l = t... | Take the term and return the URI from the Vocab service
:param facet: global attribute, facet
:param term: The term to check against the vocab service
:return: The correct URI for the term | cci_tagger/dataset/dataset.py | _get_term_uri | rsmith013/cci-tagger | 0 | python | def _get_term_uri(self, facet, term):
'\n Take the term and return the URI from the Vocab service\n :param facet: global attribute, facet\n :param term: The term to check against the vocab service\n :return: The correct URI for the term\n '
facet = facet.lower()
term_l = t... | def _get_term_uri(self, facet, term):
'\n Take the term and return the URI from the Vocab service\n :param facet: global attribute, facet\n :param term: The term to check against the vocab service\n :return: The correct URI for the term\n '
facet = facet.lower()
term_l = t... |
1a0d24ba0e8764ca72cae2731d652130d91b6f4a37d820891cc08bbdb5f7e99e | def _log_attr_not_found(self, facet, term):
'\n Create a log and record the term not found in the vocab server\n This is used to create a report of all the terms not in the vocab server\n\n :param facet: (str) Facet being processed\n :param term: (str) term being processed\n '
... | Create a log and record the term not found in the vocab server
This is used to create a report of all the terms not in the vocab server
:param facet: (str) Facet being processed
:param term: (str) term being processed | cci_tagger/dataset/dataset.py | _log_attr_not_found | rsmith013/cci-tagger | 0 | python | def _log_attr_not_found(self, facet, term):
'\n Create a log and record the term not found in the vocab server\n This is used to create a report of all the terms not in the vocab server\n\n :param facet: (str) Facet being processed\n :param term: (str) term being processed\n '
... | def _log_attr_not_found(self, facet, term):
'\n Create a log and record the term not found in the vocab server\n This is used to create a report of all the terms not in the vocab server\n\n :param facet: (str) Facet being processed\n :param term: (str) term being processed\n '
... |
605250d6b78ee39787f708ee52a561dffe14af2672bb59038a56d8d35de85d34 | def _parse_file_name(self, fpath):
"\n Extract data from the file name.\n\n The file name comes in two different formats. The values are '-'\n delimited.\n Form 1\n <Indicative Date>[<Indicative Time>]-ESACCI\n -<Processing Level>_<CCI Project>-<Data Type>-<Product ... | Extract data from the file name.
The file name comes in two different formats. The values are '-'
delimited.
Form 1
<Indicative Date>[<Indicative Time>]-ESACCI
-<Processing Level>_<CCI Project>-<Data Type>-<Product String>
[-<Additional Segregator>][-v<GDS version>]-fv<File version>.nc
Form 2
ESACCI-<C... | cci_tagger/dataset/dataset.py | _parse_file_name | rsmith013/cci-tagger | 0 | python | def _parse_file_name(self, fpath):
"\n Extract data from the file name.\n\n The file name comes in two different formats. The values are '-'\n delimited.\n Form 1\n <Indicative Date>[<Indicative Time>]-ESACCI\n -<Processing Level>_<CCI Project>-<Data Type>-<Product ... | def _parse_file_name(self, fpath):
"\n Extract data from the file name.\n\n The file name comes in two different formats. The values are '-'\n delimited.\n Form 1\n <Indicative Date>[<Indicative Time>]-ESACCI\n -<Processing Level>_<CCI Project>-<Data Type>-<Product ... |
b920f6d225cab154d40efda8778dfef68464c7cb3588fdeb40cbda3415727a70 | def _scan_file(self, filename, file_tags):
'\n Scan the file and extract tags from the metadata\n :param filename:\n :return:\n '
labels = {}
proc_level = file_tags.get(constants.PROCESSING_LEVEL)
handler = HandlerFactory.get_handler(filename.suffix)
if handler:
l... | Scan the file and extract tags from the metadata
:param filename:
:return: | cci_tagger/dataset/dataset.py | _scan_file | rsmith013/cci-tagger | 0 | python | def _scan_file(self, filename, file_tags):
'\n Scan the file and extract tags from the metadata\n :param filename:\n :return:\n '
labels = {}
proc_level = file_tags.get(constants.PROCESSING_LEVEL)
handler = HandlerFactory.get_handler(filename.suffix)
if handler:
l... | def _scan_file(self, filename, file_tags):
'\n Scan the file and extract tags from the metadata\n :param filename:\n :return:\n '
labels = {}
proc_level = file_tags.get(constants.PROCESSING_LEVEL)
handler = HandlerFactory.get_handler(filename.suffix)
if handler:
l... |
4f192d6f293ee09c0df3cb04fa5e93174a2a895b715127da29e7f1daf073a957 | @staticmethod
def _split_multiplatforms(segments):
"\n Take a string like ERS-<1,2> and return\n ['ERS-1','ERS-2']\n\n :param segment: String\n :return: list of components\n "
split_segments = []
pattern = re.compile('(.*-)<(.*)>.*')
for segment in segments:
m ... | Take a string like ERS-<1,2> and return
['ERS-1','ERS-2']
:param segment: String
:return: list of components | cci_tagger/dataset/dataset.py | _split_multiplatforms | rsmith013/cci-tagger | 0 | python | @staticmethod
def _split_multiplatforms(segments):
"\n Take a string like ERS-<1,2> and return\n ['ERS-1','ERS-2']\n\n :param segment: String\n :return: list of components\n "
split_segments = []
pattern = re.compile('(.*-)<(.*)>.*')
for segment in segments:
m ... | @staticmethod
def _split_multiplatforms(segments):
"\n Take a string like ERS-<1,2> and return\n ['ERS-1','ERS-2']\n\n :param segment: String\n :return: list of components\n "
split_segments = []
pattern = re.compile('(.*-)<(.*)>.*')
for segment in segments:
m ... |
022afd1d98918cb0e1cf03f7b08107f880e26f2b195ceac8af45ca904e8eeb24 | def _update_dataset_uris(self, tags):
'\n Update the set containing all the URIs extracted from the dataset\n\n :param tags: (dict) URI tags\n '
for (facet, values) in tags.items():
if (facet in self.dataset_uris):
self.dataset_uris[facet].update(values)
else:
... | Update the set containing all the URIs extracted from the dataset
:param tags: (dict) URI tags | cci_tagger/dataset/dataset.py | _update_dataset_uris | rsmith013/cci-tagger | 0 | python | def _update_dataset_uris(self, tags):
'\n Update the set containing all the URIs extracted from the dataset\n\n :param tags: (dict) URI tags\n '
for (facet, values) in tags.items():
if (facet in self.dataset_uris):
self.dataset_uris[facet].update(values)
else:
... | def _update_dataset_uris(self, tags):
'\n Update the set containing all the URIs extracted from the dataset\n\n :param tags: (dict) URI tags\n '
for (facet, values) in tags.items():
if (facet in self.dataset_uris):
self.dataset_uris[facet].update(values)
else:
... |
793abb7fb4403852b4a9ee061779ca02d45ad69e876c44779f1316bb299b5dc8 | def _update_drs_filelist(self, tags, file):
'\n Update the drs filelists\n :param tags: URIs\n :param drs_files: dictionary to store the state\n :param file: The file to add to the dataset\n '
file = file.as_posix()
labels = self._facets.process_bag(tags)
drs_labels = ... | Update the drs filelists
:param tags: URIs
:param drs_files: dictionary to store the state
:param file: The file to add to the dataset | cci_tagger/dataset/dataset.py | _update_drs_filelist | rsmith013/cci-tagger | 0 | python | def _update_drs_filelist(self, tags, file):
'\n Update the drs filelists\n :param tags: URIs\n :param drs_files: dictionary to store the state\n :param file: The file to add to the dataset\n '
file = file.as_posix()
labels = self._facets.process_bag(tags)
drs_labels = ... | def _update_drs_filelist(self, tags, file):
'\n Update the drs filelists\n :param tags: URIs\n :param drs_files: dictionary to store the state\n :param file: The file to add to the dataset\n '
file = file.as_posix()
labels = self._facets.process_bag(tags)
drs_labels = ... |
7a2c4980fb58c472f2cf28f121ef486ad204ab1f3fcd7d9286fee3ad08506bdd | def weighted_error(self):
'\n Error that has been weighted so the initial errors are more important\n than the final errors.\n '
if (len(self.states) == 0):
return 0
total = 0.0
i = 1.0
for state in self.states:
i += 1.0
total += (state.error / i)
ret... | Error that has been weighted so the initial errors are more important
than the final errors. | Results/Accuracy/compare_results.py | weighted_error | kellpossible/libgdx-atc-sim | 0 | python | def weighted_error(self):
'\n Error that has been weighted so the initial errors are more important\n than the final errors.\n '
if (len(self.states) == 0):
return 0
total = 0.0
i = 1.0
for state in self.states:
i += 1.0
total += (state.error / i)
ret... | def weighted_error(self):
'\n Error that has been weighted so the initial errors are more important\n than the final errors.\n '
if (len(self.states) == 0):
return 0
total = 0.0
i = 1.0
for state in self.states:
i += 1.0
total += (state.error / i)
ret... |
16eda063e78dffd7371961fb997843c5811d2568c38997c2aeac06726e058be8 | def prepared_dis_code(dis_code):
'\n Keep only required labels.\n Put labels on their own lines.\n Remove relative jumps and keep explicit labels.\n Keep only explicit arguments.\n Replace reference to function objects by labels.\n '
newcode = []
for line in dis_code.splitlines():
... | Keep only required labels.
Put labels on their own lines.
Remove relative jumps and keep explicit labels.
Keep only explicit arguments.
Replace reference to function objects by labels. | numsed/opcoder.py | prepared_dis_code | GillesArcas/cws | 13 | python | def prepared_dis_code(dis_code):
'\n Keep only required labels.\n Put labels on their own lines.\n Remove relative jumps and keep explicit labels.\n Keep only explicit arguments.\n Replace reference to function objects by labels.\n '
newcode = []
for line in dis_code.splitlines():
... | def prepared_dis_code(dis_code):
'\n Keep only required labels.\n Put labels on their own lines.\n Remove relative jumps and keep explicit labels.\n Keep only explicit arguments.\n Replace reference to function objects by labels.\n '
newcode = []
for line in dis_code.splitlines():
... |
1ceaeaa1afb60f1b75ee83c9e4ce2c1357bde8d540960ce352ee40ef828822e5 | def inline_helper_opcodes(code):
'\n Detect following opcode sequences:\n\n LOAD_GLOBAL is_positive|negative|is_odd|divide_by_two\n XXX\n CALL_FUNCTION 1 labelname\n :labelname\n\n and replace with:\n\n XXX\n IS_POSITIVE|NEGATIVE|IS_ODD|DIVIDE_BY_TWO\n\n This assum... | Detect following opcode sequences:
LOAD_GLOBAL is_positive|negative|is_odd|divide_by_two
XXX
CALL_FUNCTION 1 labelname
:labelname
and replace with:
XXX
IS_POSITIVE|NEGATIVE|IS_ODD|DIVIDE_BY_TWO
This assumes the helper functions are called with arguments made of
variables, consts and operator... | numsed/opcoder.py | inline_helper_opcodes | GillesArcas/cws | 13 | python | def inline_helper_opcodes(code):
'\n Detect following opcode sequences:\n\n LOAD_GLOBAL is_positive|negative|is_odd|divide_by_two\n XXX\n CALL_FUNCTION 1 labelname\n :labelname\n\n and replace with:\n\n XXX\n IS_POSITIVE|NEGATIVE|IS_ODD|DIVIDE_BY_TWO\n\n This assum... | def inline_helper_opcodes(code):
'\n Detect following opcode sequences:\n\n LOAD_GLOBAL is_positive|negative|is_odd|divide_by_two\n XXX\n CALL_FUNCTION 1 labelname\n :labelname\n\n and replace with:\n\n XXX\n IS_POSITIVE|NEGATIVE|IS_ODD|DIVIDE_BY_TWO\n\n This assum... |
e3a5e8054bd75aedcc20f771525ec17358d01f2d2a6a7faebc6536809a9a6026 | def divmod_required(code):
'\n Detects if divmod definition is required. This is the case with --literal.\n In that case, transformer does not replace the call to divmod with one of\n the function from numsed_lib (udivmod or signed_divmod). To be able to\n interpret the opcodes, this case is detected an... | Detects if divmod definition is required. This is the case with --literal.
In that case, transformer does not replace the call to divmod with one of
the function from numsed_lib (udivmod or signed_divmod). To be able to
interpret the opcodes, this case is detected and a dedicated opcode
(DIVMOD) is inserted. | numsed/opcoder.py | divmod_required | GillesArcas/cws | 13 | python | def divmod_required(code):
'\n Detects if divmod definition is required. This is the case with --literal.\n In that case, transformer does not replace the call to divmod with one of\n the function from numsed_lib (udivmod or signed_divmod). To be able to\n interpret the opcodes, this case is detected an... | def divmod_required(code):
'\n Detects if divmod definition is required. This is the case with --literal.\n In that case, transformer does not replace the call to divmod with one of\n the function from numsed_lib (udivmod or signed_divmod). To be able to\n interpret the opcodes, this case is detected an... |
9ec31013d3e8489e5da4c0fcb717084614a01043fd569fe2dde0340179ab03dc | def link_opcode(code):
'\n After disassembly of functions, labels in each function starts from 0.\n Update labels to have separate name spaces.\n '
offset = 0
maxlabel = 0
for (index, (instr, opc, arg)) in enumerate(scancodes(code)):
if is_function_label(instr):
offset = (ma... | After disassembly of functions, labels in each function starts from 0.
Update labels to have separate name spaces. | numsed/opcoder.py | link_opcode | GillesArcas/cws | 13 | python | def link_opcode(code):
'\n After disassembly of functions, labels in each function starts from 0.\n Update labels to have separate name spaces.\n '
offset = 0
maxlabel = 0
for (index, (instr, opc, arg)) in enumerate(scancodes(code)):
if is_function_label(instr):
offset = (ma... | def link_opcode(code):
'\n After disassembly of functions, labels in each function starts from 0.\n Update labels to have separate name spaces.\n '
offset = 0
maxlabel = 0
for (index, (instr, opc, arg)) in enumerate(scancodes(code)):
if is_function_label(instr):
offset = (ma... |
d9cd004059ba0c78989ac7776517f9ab4240b2f1d38550e707a02d1dc7d506c9 | def testCountingDecorator(self):
'Test function call counting.'
stats.STATS.RegisterCounterMetric('test_counter')
for _ in range(10):
self.CountedFunc()
self.assertEqual(stats.STATS.GetMetricValue('test_counter'), 10) | Test function call counting. | lib/stats_test.py | testCountingDecorator | strcrzy/grr | 6 | python | def testCountingDecorator(self):
stats.STATS.RegisterCounterMetric('test_counter')
for _ in range(10):
self.CountedFunc()
self.assertEqual(stats.STATS.GetMetricValue('test_counter'), 10) | def testCountingDecorator(self):
stats.STATS.RegisterCounterMetric('test_counter')
for _ in range(10):
self.CountedFunc()
self.assertEqual(stats.STATS.GetMetricValue('test_counter'), 10)<|docstring|>Test function call counting.<|endoftext|> |
cdf13bde99fb4305af3762477c8e787e4a0363faeb9e911ce8f9b9fc576adb15 | def testMaps(self):
'Test binned timings.'
stats.STATS.RegisterEventMetric('test_timed', bins=[0.0, 0.1, 0.2])
m = stats.STATS.GetMetricValue('test_timed')
self.assertEqual(m.bins_heights[0.0], 0)
self.assertEqual(m.bins_heights[0.1], 0)
self.assertEqual(m.bins_heights[0.2], 0)
for _ in rang... | Test binned timings. | lib/stats_test.py | testMaps | strcrzy/grr | 6 | python | def testMaps(self):
stats.STATS.RegisterEventMetric('test_timed', bins=[0.0, 0.1, 0.2])
m = stats.STATS.GetMetricValue('test_timed')
self.assertEqual(m.bins_heights[0.0], 0)
self.assertEqual(m.bins_heights[0.1], 0)
self.assertEqual(m.bins_heights[0.2], 0)
for _ in range(3):
self.Tim... | def testMaps(self):
stats.STATS.RegisterEventMetric('test_timed', bins=[0.0, 0.1, 0.2])
m = stats.STATS.GetMetricValue('test_timed')
self.assertEqual(m.bins_heights[0.0], 0)
self.assertEqual(m.bins_heights[0.1], 0)
self.assertEqual(m.bins_heights[0.2], 0)
for _ in range(3):
self.Tim... |
6d454d5cfac17fa67e9b46c0294a8732e3dc6af431d5556b85fcff7a37b3d8bf | def testCombiningDecorators(self):
'Test combining decorators.'
stats.STATS.RegisterCounterMetric('test_counter')
stats.STATS.RegisterEventMetric('test_timed', bins=[0.0, 0.1, 0.2])
self.OverdecoratedFunc(0.02)
m = stats.STATS.GetMetricValue('test_timed')
self.assertEqual(m.bins_heights[0.0], 1)... | Test combining decorators. | lib/stats_test.py | testCombiningDecorators | strcrzy/grr | 6 | python | def testCombiningDecorators(self):
stats.STATS.RegisterCounterMetric('test_counter')
stats.STATS.RegisterEventMetric('test_timed', bins=[0.0, 0.1, 0.2])
self.OverdecoratedFunc(0.02)
m = stats.STATS.GetMetricValue('test_timed')
self.assertEqual(m.bins_heights[0.0], 1)
self.assertEqual(m.bins... | def testCombiningDecorators(self):
stats.STATS.RegisterCounterMetric('test_counter')
stats.STATS.RegisterEventMetric('test_timed', bins=[0.0, 0.1, 0.2])
self.OverdecoratedFunc(0.02)
m = stats.STATS.GetMetricValue('test_timed')
self.assertEqual(m.bins_heights[0.0], 1)
self.assertEqual(m.bins... |
c64560718ca7809f3af9ccce244cf4c25a13bde68d9988f5b024051325a72c5b | def testExceptionHandling(self):
'Test decorators when exceptions are thrown.'
stats.STATS.RegisterCounterMetric('test_counter')
stats.STATS.RegisterEventMetric('test_timed', bins=[0.0, 0.1, 0.2])
self.assertRaises(Exception, self.RaiseFunc, 0.11)
m = stats.STATS.GetMetricValue('test_timed')
sel... | Test decorators when exceptions are thrown. | lib/stats_test.py | testExceptionHandling | strcrzy/grr | 6 | python | def testExceptionHandling(self):
stats.STATS.RegisterCounterMetric('test_counter')
stats.STATS.RegisterEventMetric('test_timed', bins=[0.0, 0.1, 0.2])
self.assertRaises(Exception, self.RaiseFunc, 0.11)
m = stats.STATS.GetMetricValue('test_timed')
self.assertEqual(m.bins_heights[0.0], 0)
sel... | def testExceptionHandling(self):
stats.STATS.RegisterCounterMetric('test_counter')
stats.STATS.RegisterEventMetric('test_timed', bins=[0.0, 0.1, 0.2])
self.assertRaises(Exception, self.RaiseFunc, 0.11)
m = stats.STATS.GetMetricValue('test_timed')
self.assertEqual(m.bins_heights[0.0], 0)
sel... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.