prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from os import listdir import os import re import sys from argparse import ArgumentParser import random import subprocess from math import sqrt import ast from adderror import adderror """ENSAMBLE, -d directory -n numb...
args = argument() total_number_of_pdb_files = searching_pdb() for i in range(args.repeat): argument_processing(args, total_number_of_pdb_files) strings = using_adderror() #find_index(strings) # ensamble_output = ensamble-fit() ensamble_output=[None]*2 ensamble_output...
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from os import listdir import os import re import sys from argparse import ArgumentParser import random import subprocess from math import sqrt import ast from adderror import adderror """ENSAMBLE, -d directory -n numb...
pymol_processing(ensamble_output)
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from os import listdir import os import re import sys from argparse import ArgumentParser import random import subprocess from math import sqrt import ast from adderror import adderror """ENSAMBLE, -d directory -n numb...
print("not implemented")
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from os import listdir import os import re import sys from argparse import ArgumentParser import random import subprocess from math import sqrt import ast from adderror import adderror """ENSAMBLE, -d directory -n numb...
argument
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from os import listdir import os import re import sys from argparse import ArgumentParser import random import subprocess from math import sqrt import ast from adderror import adderror """ENSAMBLE, -d directory -n numb...
rmsd_pymol
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from os import listdir import os import re import sys from argparse import ArgumentParser import random import subprocess from math import sqrt import ast from adderror import adderror """ENSAMBLE, -d directory -n numb...
searching_pdb
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from os import listdir import os import re import sys from argparse import ArgumentParser import random import subprocess from math import sqrt import ast from adderror import adderror """ENSAMBLE, -d directory -n numb...
argument_processing
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from os import listdir import os import re import sys from argparse import ArgumentParser import random import subprocess from math import sqrt import ast from adderror import adderror """ENSAMBLE, -d directory -n numb...
using_adderror
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from os import listdir import os import re import sys from argparse import ArgumentParser import random import subprocess from math import sqrt import ast from adderror import adderror """ENSAMBLE, -d directory -n numb...
find_index
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from os import listdir import os import re import sys from argparse import ArgumentParser import random import subprocess from math import sqrt import ast from adderror import adderror """ENSAMBLE, -d directory -n numb...
ensamble_fit
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from os import listdir import os import re import sys from argparse import ArgumentParser import random import subprocess from math import sqrt import ast from adderror import adderror """ENSAMBLE, -d directory -n numb...
result_rmsd
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from os import listdir import os import re import sys from argparse import ArgumentParser import random import subprocess from math import sqrt import ast from adderror import adderror """ENSAMBLE, -d directory -n numb...
pymol_processing
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Initialize Flask app """ from flask import Flask import os from flask_debugtoolbar import DebugToolbarExtension from werkzeug.debug import DebuggedApplication app = Flask('application') if os.getenv('FLASK_CONF') == 'DEV':<|fim▁hole|> # Google app eng...
# Development settings app.config.from_object('application.settings.Development') # Flask-DebugToolbar toolbar = DebugToolbarExtension(app)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Initialize Flask app """ from flask import Flask import os from flask_debugtoolbar import DebugToolbarExtension from werkzeug.debug import DebuggedApplication app = Flask('application') if os.getenv('FLASK_CONF') == 'DEV': # Development settings app.c...
return dict(profiler_includes=templatetags.profiler_includes())
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Initialize Flask app """ from flask import Flask import os from flask_debugtoolbar import DebugToolbarExtension from werkzeug.debug import DebuggedApplication app = Flask('application') if os.getenv('FLASK_CONF') == 'DEV': # Development settings <...
app.config.from_object('application.settings.Development') # Flask-DebugToolbar toolbar = DebugToolbarExtension(app) # Google app engine mini profiler # https://github.com/kamens/gae_mini_profiler app.wsgi_app = DebuggedApplication(app.wsgi_app, evalex=True) from gae_mini_profiler impo...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Initialize Flask app """ from flask import Flask import os from flask_debugtoolbar import DebugToolbarExtension from werkzeug.debug import DebuggedApplication app = Flask('application') if os.getenv('FLASK_CONF') == 'DEV': # Development settings app.c...
app.config.from_object('application.settings.Testing')
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Initialize Flask app """ from flask import Flask import os from flask_debugtoolbar import DebugToolbarExtension from werkzeug.debug import DebuggedApplication app = Flask('application') if os.getenv('FLASK_CONF') == 'DEV': # Development settings app.c...
app.config.from_object('application.settings.Production')
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Initialize Flask app """ from flask import Flask import os from flask_debugtoolbar import DebugToolbarExtension from werkzeug.debug import DebuggedApplication app = Flask('application') if os.getenv('FLASK_CONF') == 'DEV': # Development settings app.c...
inject_profiler
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
def __init__(self, message, error): super(ImejiError, self).__init__(message) self.error = error.get('error') if isinstance(error, dict) else error
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
super(ImejiError, self).__init__(message) self.error = error.get('error') if isinstance(error, dict) else error
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
"""Handle GET requests. This includes requests - to retrieve single objects, - to fetch lists of object references (which are returned as `OrderedDict` mapping object `id` to additional metadata present in the response). """ def __init__(self, api, name): """Initialize a handler....
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
"""Initialize a handler. :param api: An Imeji API instance. :param name: Name specifying the kind of object(s) to retrieve. We check whether\ this name has a plural "s" to determine if a list is to be retrieved. """ self._list = name.endswith('s') self.rsc = geta...
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
"""Calling the handler initiates an HTTP request to the imeji server. :param id: If a single object is to be retrieved it must be specified by id. :return: An OrderedDict mapping id to additional metadata for lists, a \ :py:class:`pyimeji.resource.Resource` instance for single objects. ...
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
"""The client. >>> api = Imeji(service_url='http://demo.imeji.org/imeji/') >>> collection_id = list(api.collections().keys())[0] >>> collection = api.collection(collection_id) >>> collection = api.create('collection', title='the new collection') >>> item = collection.add_item(fetchUrl='http://e...
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
self.cfg = cfg or Config() self.service_url = service_url or self.cfg.get('service', 'url') user = self.cfg.get('service', 'user', default=None) password = self.cfg.get('service', 'password', default=None) self.session = requests.Session() if user and password: ...
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
"""Make a request to the API of an imeji instance. :param path: HTTP path. :param method: HTTP method. :param json: Flag signalling whether the response should be treated as JSON. :param assert_status: Expected HTTP response status of a successful request. :param kw: Add...
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
"""Names of resource classes are accepted and resolved as dynamic attribute names. This allows convenient retrieval of resources as api.<resource-class>(id=<id>), or api.<resource-class>s(q='x'). """ return GET(self, name)
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
if isinstance(rsc, string_types): cls = getattr(resource, rsc.capitalize()) rsc = cls(kw, self) return rsc.save()
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
return rsc.delete()
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
for k, v in kw.items(): setattr(rsc, k, v) return rsc.save()
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
self.path += 's'
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
raise ValueError('no id given')
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
id = '/' + id
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
return self.rsc(res, self.api)
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
self.session.auth = (user, password)
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
try: res = res.json() except ValueError: # pragma: no cover log.error(res.text[:1000]) raise
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
if status_code != assert_status: log.error( 'got HTTP %s, expected HTTP %s' % (status_code, assert_status)) log.error(res.text[:1000] if hasattr(res, 'text') else res) raise ImejiError('Unexpected HTTP status code', res)
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
log.error( 'got HTTP %s, expected HTTP %s' % (status_code, assert_status)) log.error(res.text[:1000] if hasattr(res, 'text') else res) raise ImejiError('Unexpected HTTP status code', res)
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
cls = getattr(resource, rsc.capitalize()) rsc = cls(kw, self)
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
__init__
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
__init__
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
__call__
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
__init__
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
_req
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
__getattr__
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
create
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
delete
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exc...
update
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
def _get_ovn_controller(self, install_method="sandbox"): ovn_nbctl = self.controller_client("ovn-nbctl") ovn_nbctl.set_sandbox("controller-sandbox", install_method, self.context['controller']['host_container']) ovn_nbctl.set_daemon_socket(self.context.get("daemo...
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
ovn_nbctl = self.controller_client("ovn-nbctl") ovn_nbctl.set_sandbox("controller-sandbox", install_method, self.context['controller']['host_container']) ovn_nbctl.set_daemon_socket(self.context.get("daemon_socket", None)) return ovn_nbctl
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
ovn_nbctl = self._get_ovn_controller(self.install_method) return ovn_nbctl.start_daemon()
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
ovn_nbctl = self._get_ovn_controller(self.install_method) ovn_nbctl.stop_daemon()
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
self._stop_daemon() return self._start_daemon()
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
self.RESOURCE_NAME_FORMAT = "lswitch_XXXXXX_XXXXXX" if (num_switches == -1): num_switches = lswitch_create_args.get("amount", 1) batch = lswitch_create_args.get("batch", num_switches) start_cidr = lswitch_create_args.get("start_cidr", "") if start_cidr: ...
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
self.RESOURCE_NAME_FORMAT = "lrouter_XXXXXX_XXXXXX" amount = router_create_args.get("amount", 1) batch = router_create_args.get("batch", 1) ovn_nbctl = self._get_ovn_controller(self.install_method) ovn_nbctl.enable_batch_mode() flush_count = batch lrouters = []...
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
LOG.info("Connect network %s to router %s" % (network["name"], router["name"])) ovn_nbctl = self.controller_client("ovn-nbctl") ovn_nbctl.set_sandbox("controller-sandbox", self.install_method, self.context['controller']['host_container']) ovn_nbctl.enable_b...
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
for lrouter in lrouters: LOG.info("Connect %s networks to router %s" % (networks_per_router, lrouter["name"])) for lnetwork in lnetworks[:networks_per_router]: LOG.info("connect networks %s cidr %s" % (lnetwork["name"], lnetwork["cidr"])) self._connect_net...
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
num_switches = lswitch_create_args.get("amount", 1)
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
start_cidr = netaddr.IPNetwork(start_cidr)
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
cidr = start_cidr.next(i) name = "lswitch_%s" % cidr
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
name = self.generate_random_name()
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
lswitch["cidr"] = cidr
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
ovn_nbctl.flush() flush_count = batch
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
ovn_nbctl.flush() flush_count = batch
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
_get_ovn_controller
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
_start_daemon
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
_stop_daemon
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
_restart_daemon
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
_create_lswitches
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
_create_routers
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
_connect_network_to_router
<|file_name|>ovnclients.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
_connect_networks_to_routers
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): <|fim_middle|> def getSummonerIdsOfOpponentTeam( summonerId, game ): teamId = getTeamOfSummoner(summonerId,...
for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId']
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
teamId = getTeamOfSummoner(summonerId, game) summoners = [] for p in game['participants']: if p['teamId'] != teamId: summoners.append(p['summonerId']) return summoners
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
sets = {} rqs = 0 for id in summonerIds: response = w.get_match_list(id); matchlist = [] if 'matches' in response: matchlist = response['matches'] gamelist = [] if past10: gamelist = w.get_recent_games(id)['games'] rqs += 2 if rqs >= 8: sleep(10) rqs = 0 log.debug('match...
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
searchedSets = set() friendships = {} for id in IdSets: friendships[id] = {} for id in IdSets: searchedSets.add(id) for gameId in IdSets[id]: for id2 in IdSets: if not id2 in searchedSets: if gameId in IdSets[id2]: if not id2 in friendships[id]: friendships[id][id2] = 1 ...
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
premades = [] for id in friendshipRelations: group = set(friendshipRelations[id].keys()) group.add(id) if group not in premades: premades.append(group) finPremades = [] for group1 in premades: finGroup = group1 for group2 in premades: if group1 != group2 and len(group1 & group2) > 0: ...
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
w = riotwatcher.RiotWatcher(lolAPIKey, default_region=riotwatcher.EUROPE_WEST) id = w.get_summoner(name=summonerName)['id'] game = w.get_current_game(id) participants = game['participants'] idToParticipantsMap = {} for p in participants: log.info(p['summonerName'].encode('utf8')+' '+str(p['summonerId'])+'...
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: <|fim_middle|> def getSummonerIdsO...
return p['teamId']
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
summoners.append(p['summonerId'])
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
matchlist = response['matches']
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
gamelist = w.get_recent_games(id)['games'] rqs += 2 if rqs >= 8: sleep(10) rqs = 0
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
sleep(10) rqs = 0
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
if gameId in IdSets[id2]: if not id2 in friendships[id]: friendships[id][id2] = 1 if not id in friendships[id2]: friendships[id2][id] = 1 friendships[id][id2] += 1 friendships[id2][id] += 1
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
if not id2 in friendships[id]: friendships[id][id2] = 1 if not id in friendships[id2]: friendships[id2][id] = 1 friendships[id][id2] += 1 friendships[id2][id] += 1
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
friendships[id][id2] = 1
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
friendships[id2][id] = 1
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
premades.append(group)
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
finGroup = finGroup | group2
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
finPremades.append(finGroup)
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
for summonerId in group: groupNames.append(idToParticipantsMap[summonerId]['summonerName']) premadesNames.append(groupNames)
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def <|fim_middle|>( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsOfOp...
getTeamOfSummoner
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def <|fim_middle|>(...
getSummonerIdsOfOpponentTeam
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
queryPastGameIdSets
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
computeFriendship
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
computePremades
<|file_name|>friendship.py<|end_file_name|><|fim▁begin|>from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsO...
getPremades