prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>"""Deprecated import support. Auto-generated by import_shims/generate_shims.sh.""" # pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long from import_shims.warn import warn_deprecated_import<|fim▁hole|> warn_d...
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
destination_index_zero_based = int(destination_index) - 1 self.ctrl.set_turret(destination_index_zero_based) self.grating_index.write(destination_index) self.wait_until_still()
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
def __init__(self, *args, **kwargs): self._yaqd_port = kwargs.pop("yaqd_port") super().__init__(*args, **kwargs) self.grating_index = pc.Combo( name="Grating", allowed_values=[1, 2], section=self.name, option="grating_index", displa...
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
self._yaqd_port = kwargs.pop("yaqd_port") super().__init__(*args, **kwargs) self.grating_index = pc.Combo( name="Grating", allowed_values=[1, 2], section=self.name, option="grating_index", display=True, set_method="set_turre...
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
native_position = self.ctrl.get_position() self.position.write(native_position, self.native_units) return self.position.read()
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
self.ctrl = yaqc.Client(self._yaqd_port) # import some information from control id_dict = self.ctrl.id() self.serial_number = id_dict["serial"] self.position.write(self.ctrl.get_position()) # recorded self.recorded[self.name] = [self.position, self.native_units, 1...
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
return self.ctrl.busy()
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
self.ctrl.set_position(float(destination)) self.wait_until_still()
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
if type(destination_index) == list: destination_index = destination_index[0] # turret index on ActiveX call starts from zero destination_index_zero_based = int(destination_index) - 1 self.ctrl.set_turret(destination_index_zero_based) self.grating_index.write(destinati...
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
pass
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
def __init__(self, *args, **kwargs): self.kind = "spectrometer" hw.Hardware.__init__(self, *args, **kwargs)
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
self.kind = "spectrometer" hw.Hardware.__init__(self, *args, **kwargs)
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
destination_index = destination_index[0]
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
__init__
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
get_position
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
initialize
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
is_busy
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
set_position
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
set_turret
<|file_name|>spectrometers.py<|end_file_name|><|fim▁begin|>### import #################################################################### import pycmds.project.classes as pc import pycmds.hardware.hardware as hw import pathlib import appdirs import toml import yaqc ### driver ######################################...
__init__
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url, include from django.contrib import admin from django.contrib.auth.decorators import login_required from .views import UploadBlackListView, DemoView, UdateBlackListView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), ...
]
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2016 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'OAuth2 Disable Login with Odoo.com', 'version': '10.0.1.0.0', 'category': 'Tools', 'auth...
], }
<|file_name|>mercurial.py<|end_file_name|><|fim▁begin|>from mercurial import cmdutil _hgignore_content = """\ syntax: glob *~ *.pyc *.pyo *.bak cache/* databases/* sessions/* errors/* """ def commit(): app = request.args[0] path = apath(app, r=request) uio = ui.ui() uio.quiet = True if not os.e...
r.commit(text=form.vars.comment) if r[r.lookup('.')] == oldid: response.flash = 'no changes' files = r[r.lookup('.')].files()
<|file_name|>mercurial.py<|end_file_name|><|fim▁begin|> from mercurial import cmdutil _hgignore_content = """\ syntax: glob *~ *.pyc *.pyo *.bak cache/* databases/* sessions/* errors/* """ def commit(): <|fim_middle|> <|fim▁end|>
app = request.args[0] path = apath(app, r=request) uio = ui.ui() uio.quiet = True if not os.environ.get('HGUSER') and not uio.config("ui", "username"): os.environ['HGUSER'] = 'web2py@localhost' try: r = hg.repository(ui=uio, path=path) except: r = hg.repository(ui=ui...
<|file_name|>mercurial.py<|end_file_name|><|fim▁begin|> from mercurial import cmdutil _hgignore_content = """\ syntax: glob *~ *.pyc *.pyo *.bak cache/* databases/* sessions/* errors/* """ def commit(): app = request.args[0] path = apath(app, r=request) uio = ui.ui() uio.quiet = True if not os....
os.environ['HGUSER'] = 'web2py@localhost'
<|file_name|>mercurial.py<|end_file_name|><|fim▁begin|> from mercurial import cmdutil _hgignore_content = """\ syntax: glob *~ *.pyc *.pyo *.bak cache/* databases/* sessions/* errors/* """ def commit(): app = request.args[0] path = apath(app, r=request) uio = ui.ui() uio.quiet = True if not os....
open(hgignore, 'w').write(_hgignore_content)
<|file_name|>mercurial.py<|end_file_name|><|fim▁begin|> from mercurial import cmdutil _hgignore_content = """\ syntax: glob *~ *.pyc *.pyo *.bak cache/* databases/* sessions/* errors/* """ def commit(): app = request.args[0] path = apath(app, r=request) uio = ui.ui() uio.quiet = True if not os....
oldid = r[r.lookup('.')] cmdutil.addremove(r) r.commit(text=form.vars.comment) if r[r.lookup('.')] == oldid: response.flash = 'no changes'
<|file_name|>mercurial.py<|end_file_name|><|fim▁begin|> from mercurial import cmdutil _hgignore_content = """\ syntax: glob *~ *.pyc *.pyo *.bak cache/* databases/* sessions/* errors/* """ def commit(): app = request.args[0] path = apath(app, r=request) uio = ui.ui() uio.quiet = True if not os....
response.flash = 'no changes'
<|file_name|>mercurial.py<|end_file_name|><|fim▁begin|> from mercurial import cmdutil _hgignore_content = """\ syntax: glob *~ *.pyc *.pyo *.bak cache/* databases/* sessions/* errors/* """ def <|fim_middle|>(): app = request.args[0] path = apath(app, r=request) uio = ui.ui() uio.quiet = True if...
commit
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
# scalar, since TRT requires input tensor to be of rank at least 2, so a # reshape with scalar input will be filtered out of the segment before
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
test.main()
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
GraphFn
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
GetParams
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
ExpectedEnginesToBuild
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
ShouldRunTest
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
GraphFn
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
GetParams
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
ExpectedEnginesToBuild
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
ShouldRunTest
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
def GraphFn(self, inp): outputs = [] # Here we test two types of reshapes, one changes the batch dimension and # the other does not. Note that we're not able to test reshaping to # scalar, since TRT requires input tensor to be of rank at least 2, so a # reshape with scalar input will be filtered o...
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
outputs = [] # Here we test two types of reshapes, one changes the batch dimension and # the other does not. Note that we're not able to test reshaping to # scalar, since TRT requires input tensor to be of rank at least 2, so a # reshape with scalar input will be filtered out of the segment before ...
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
return self.BuildParams(self.GraphFn, dtypes.float32, [[100, 24, 24, 2]], [[100, 24, 24, 2]])
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
"""Return the expected engines to build.""" return { "TRTEngineOp_0": ["reshape-%d" % i for i in range(7)] + ["reshape-%d/shape" % i for i in range(7)] }
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
"""Whether to run the test.""" return (not trt_test.IsQuantizationMode(run_params.precision_mode) and not run_params.dynamic_engine)
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
def GraphFn(self, inp): # Add a block with compatible transposes. compatible_transpose = array_ops.transpose( inp, [0, 3, 1, 2], name="transpose-1") compatible_transpose = array_ops.transpose( compatible_transpose, [0, 2, 3, 1], name="transposeback") # Add an incompatible op so the fi...
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
compatible_transpose = array_ops.transpose( inp, [0, 3, 1, 2], name="transpose-1") compatible_transpose = array_ops.transpose( compatible_transpose, [0, 2, 3, 1], name="transposeback") # Add an incompatible op so the first block will not be in the same # subgraph where the following blo...
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
return self.BuildParams(self.GraphFn, dtypes.float32, [[100, 24, 24, 2]], [[24, 100, 2, 24]])
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
"""Return the expected engines to build.""" return { "TRTEngineOp_0": [ "transpose-1", "transpose-1/perm", "transposeback", "transposeback/perm" ] }
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
"""Whether to run the test.""" return (not trt_test.IsQuantizationMode(run_params.precision_mode) and not run_params.dynamic_engine)
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: <|fim▁hole|> def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_element_by_name("user").clear() wd.find...
def __init__(self, app): self.app = app
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: <|fim_middle|> <|fim▁end|>
def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_element_by_name("user").clear() wd.find_element_by_name("user").send_keys(username) wd....
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): <|fim_middle|> def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_eleme...
self.app = app
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): <|fim_middle|> def logout(self): wd = self.app.wd wd.find_element_by_link_text("Logout").click() ...
wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_element_by_name("user").clear() wd.find_element_by_name("user").send_keys(username) wd.find_element_by_name("pass").click() wd.find_element_by_name("pass").clear() w...
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
wd = self.app.wd wd.find_element_by_link_text("Logout").click()
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
wd = self.app.wd return len(wd.find_elements_by_link_text("Logout")) > 0
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
wd = self.app.wd return self.get_logged_user() == username
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
wd = self.app.wd return wd.find_element_by_xpath("//div/div[1]/form/b").text[1:-1]
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
wd = self.app.wd if self.is_logged_in(): self.logout()
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
wd = self.app.wd if self.is_logged_in(): if self.is_logged_in_as(username): return else: self.logout() self.login(username, password)
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
self.logout()
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
if self.is_logged_in_as(username): return else: self.logout()
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
return
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
self.logout()
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def <|fim_middle|>(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_...
__init__
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def <|fim_middle|>(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.fi...
login
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
logout
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
is_logged_in
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
is_logged_in_as
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
get_logged_user
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
ensure_logout
<|file_name|>session.py<|end_file_name|><|fim▁begin|>__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_elemen...
ensure_login
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText...
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): <|fim_middle|> class Integer(QLineEditAccessor): def get_value(self): return int(self.widget.text()) ...
def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText(str(value))
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): <|fim_middle|> def set_value(self, value): self.widget.setText(str(value)) ...
return str(self.widget.text())
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): <|fim_middle|> c...
self.widget.setText(str(value))
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText...
def get_value(self): return int(self.widget.text()) def set_value(self, value): self.widget.setText(int(value))
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText...
return int(self.widget.text())
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText...
self.widget.setText(int(value))
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText...
return { '{}_link'.format(x): (x, 'val_{}'.format(x)) }
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText...
return { 'expediente_link': Mapper('c[0]', 'val_c[0]', get_child_x_mapper('a')), 'masa_bruta_link': Mapper('c[1]', 'val_c[1]', get_child_x_mapper('b')), 'nombre_link': Field('cc', 'val_cc'), }
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText...
return { 'expediente_link': Field('expediente', String('expediente')), 'masa_bruta_link': Field('masa_bruta', Integer('masa_bruta')), 'nombre_link': Field('nombre', String('nombre')) }
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def <|fim_middle|>(self): return str(self.widget.text()) def set_value(self, value): self.widget.se...
get_value
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def <|fim_middle|>(self, value): self.widget.se...
set_value
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText...
get_value
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText...
set_value
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText...
get_child_x_mapper
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText...
get_d_mapper
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field from modelmapper.qt.fields import QLineEditAccessor class String(QLineEditAccessor): def get_value(self): return str(self.widget.text()) def set_value(self, value): self.widget.setText...
get_model_mapper
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
def initConfig(controllerObject): global controller controller = controllerObject
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
global controller controller = controllerObject logging.debug("Adding MySQL OpenStack configuration") paramsList = [ {"CMD_OPTION" : "mysql-host", "USAGE" : "The IP address of the server on which to install MySQL", "PROMPT" ...
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
mysqlsteps = [ {'title': 'Adding MySQL manifest entries', 'functions':[createmanifest]} ] controller.addSequence("Installing MySQL", [], [], mysqlsteps)
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
if config['CONFIG_MYSQL_INSTALL'] == 'y': install = True suffix = 'install' else: install = False suffix = 'noinstall' # In case we are not installing MySQL server, mysql* manifests have # to be run from Keystone host host = install and config['CONFIG_MYSQL_HOST'] \ ...
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
template = "mysql_%s_%s.pp" % (module, suffix) manifestdata.append(getManifestTemplate(template))
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
install = True suffix = 'install'
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
install = False suffix = 'noinstall'
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
append_for(mod, suffix) # Check wich modules are enabled so we can allow their # hosts on the firewall if mod != 'nova' and mod != 'neutron': hosts.add(config.get('CONFIG_%s_HOST' % mod.upper()).strip()) elif mod == 'neutron': h...
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
hosts.add(config.get('CONFIG_%s_HOST' % mod.upper()).strip())
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
hosts.add(config.get('CONFIG_NEUTRON_SERVER_HOST').strip())
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
hosts.add(config.get('CONFIG_NOVA_API_HOST').strip()) hosts.add(config.get('CONFIG_NOVA_CERT_HOST').strip()) hosts.add(config.get('CONFIG_NOVA_VNCPROXY_HOST').strip()) hosts.add(config.get('CONFIG_NOVA_CONDUCTOR_HOST').strip()) hosts.add(co...
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
dbhosts = split_hosts(config['CONFIG_NOVA_NETWORK_HOSTS']) hosts |= dbhosts