当前位置: 首页>>代码示例>>Python>>正文


Python context.Context方法代码示例

本文整理汇总了Python中context.Context方法的典型用法代码示例。如果您正苦于以下问题:Python context.Context方法的具体用法?Python context.Context怎么用?Python context.Context使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在context的用法示例。


在下文中一共展示了context.Context方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: delete_item

# 需要导入模块: import context [as 别名]
# 或者: from context import Context [as 别名]
def delete_item():

    ''' Delete keymap action.
    '''
    import context

    context.Context(delete=True) 
开发者ID:MediaBrowser,项目名称:plugin.video.emby,代码行数:9,代码来源:default.py

示例2: function_context

# 需要导入模块: import context [as 别名]
# 或者: from context import Context [as 别名]
def function_context(request, get_k8s_custom_obj_client, api_instance, minio_resource,
                     minio_client):
    context = Context(k8s_client=api_instance, k8s_client_custom=get_k8s_custom_obj_client,
                      minio_resource_client=minio_resource, minio_client=minio_client)
    request.addfinalizer(context.delete_all_objects)
    return context 
开发者ID:IntelAI,项目名称:inference-model-manager,代码行数:8,代码来源:conftest.py

示例3: session_context

# 需要导入模块: import context [as 别名]
# 或者: from context import Context [as 别名]
def session_context(request, get_k8s_custom_obj_client, api_instance, minio_resource, minio_client):
    context = Context(k8s_client=api_instance, k8s_client_custom=get_k8s_custom_obj_client,
                      minio_resource_client=minio_resource, minio_client=minio_client)
    request.addfinalizer(context.delete_all_objects)
    return context 
开发者ID:IntelAI,项目名称:inference-model-manager,代码行数:7,代码来源:conftest.py

示例4: ELF64_R_SYM

# 需要导入模块: import context [as 别名]
# 或者: from context import Context [as 别名]
def ELF64_R_SYM(val):
  return (val) >> 32

#Globals: If there end up being too many of these, put them in a Context & pass them around 
开发者ID:utds3lab,项目名称:multiverse,代码行数:6,代码来源:multiverse.py

示例5: __init__

# 需要导入模块: import context [as 别名]
# 或者: from context import Context [as 别名]
def __init__(self,write_so,exec_only,no_pic):
    self.context = Context()
    self.context.write_so = write_so
    self.context.exec_only = exec_only
    self.context.no_pic = no_pic 
开发者ID:utds3lab,项目名称:multiverse,代码行数:7,代码来源:multiverse.py

示例6: generate_context

# 需要导入模块: import context [as 别名]
# 或者: from context import Context [as 别名]
def generate_context(self):
        return nufhe.Context() 
开发者ID:f-prime,项目名称:arcanevm,代码行数:4,代码来源:NUFHEContext.py

示例7: run

# 需要导入模块: import context [as 别名]
# 或者: from context import Context [as 别名]
def run(unknown_arguments=False):
    for file in [config.ticks_csv, config.network_csv, config.nodes_csv]:
        utils.check_for_file(file)

    parser = _create_parser()
    if unknown_arguments:
        args = parser.parse_known_args(sys.argv[2:])[0]
    else:
        args = parser.parse_args(sys.argv[2:])
    logging.info("Parsed arguments in {}: {}".format(__name__, args))
    utils.update_args(args)

    _check_skip_ticks(args.skip_ticks)

    context = Context()

    logging.info(config.log_line_run_start + context.run_name)

    tag = context.args.tag
    if hasattr(context.args, 'tag_appendix'):
        tag += context.args.tag_appendix
    writer = Writer(tag)
    runner = Runner(context, writer)

    prepare = Prepare(context)
    runner._prepare = prepare

    postprocessing = PostProcessing(context, writer)
    runner._postprocessing = postprocessing

    event = Event(context)
    runner._event = event

    start = time.time()

    runner.run()

    logging.info("The duration of the run was {} seconds".format(str(time.time() - start))) 
开发者ID:sbaresearch,项目名称:simcoin,代码行数:40,代码来源:simulation_cmd.py


注:本文中的context.Context方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。