Python context.Context() Examples
The following are 8
code examples of context.Context().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
context
, or try the search function
.
Example #1
Source File: default.py From plugin.video.emby with GNU General Public License v3.0 | 5 votes |
def delete_item(): ''' Delete keymap action. ''' import context context.Context(delete=True)
Example #2
Source File: conftest.py From inference-model-manager with Apache License 2.0 | 5 votes |
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
Example #3
Source File: conftest.py From inference-model-manager with Apache License 2.0 | 5 votes |
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
Example #4
Source File: default.py From jellyfin-kodi with GNU General Public License v3.0 | 5 votes |
def delete_item(): ''' Delete keymap action. ''' import context context.Context(delete=True)
Example #5
Source File: multiverse.py From multiverse with GNU Lesser General Public License v3.0 | 5 votes |
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
Example #6
Source File: multiverse.py From multiverse with GNU Lesser General Public License v3.0 | 5 votes |
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
Example #7
Source File: NUFHEContext.py From arcanevm with GNU General Public License v3.0 | 5 votes |
def generate_context(self): return nufhe.Context()
Example #8
Source File: simulation_cmd.py From simcoin with MIT License | 5 votes |
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)))