prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import os class Config(object): DEBUG = False TESTING = False CSRF_ENABLED = True SECRET_KEY = "super_secret_key" SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] class ProductionConfig(Config): DEBUG = False SECRET_KEY = os.environ['...
DEVELOPMENT = True DEBUG = True
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import os class Config(object): DEBUG = False TESTING = False CSRF_ENABLED = True SECRET_KEY = "super_secret_key" SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] class ProductionConfig(Config): DEBUG = False SECRET_KEY = os.environ['...
TESTING = True
<|file_name|>test_login.py<|end_file_name|><|fim▁begin|><|fim▁hole|>@pytest.fixture def driver(request): wd = webdriver.Firefox(capabilities={"marionette": True}) #(desired_capabilities={"chromeOptions": {"args": ["--start-fullscreen"]}}) request.addfinalizer(wd.quit) return wd def test_example(driver...
import pytest from selenium import webdriver
<|file_name|>test_login.py<|end_file_name|><|fim▁begin|>import pytest from selenium import webdriver @pytest.fixture def driver(request): <|fim_middle|> def test_example(driver): driver.get("http://localhost/litecart/admin/") driver.find_element_by_xpath("//input[@name='username']").send_keys("admin") ...
wd = webdriver.Firefox(capabilities={"marionette": True}) #(desired_capabilities={"chromeOptions": {"args": ["--start-fullscreen"]}}) request.addfinalizer(wd.quit) return wd
<|file_name|>test_login.py<|end_file_name|><|fim▁begin|>import pytest from selenium import webdriver @pytest.fixture def driver(request): wd = webdriver.Firefox(capabilities={"marionette": True}) #(desired_capabilities={"chromeOptions": {"args": ["--start-fullscreen"]}}) request.addfinalizer(wd.quit) ...
driver.get("http://localhost/litecart/admin/") driver.find_element_by_xpath("//input[@name='username']").send_keys("admin") driver.find_element_by_xpath("//input[@name='password']").send_keys("admin") driver.find_element_by_xpath("//button[@name='login']").click()
<|file_name|>test_login.py<|end_file_name|><|fim▁begin|>import pytest from selenium import webdriver @pytest.fixture def <|fim_middle|>(request): wd = webdriver.Firefox(capabilities={"marionette": True}) #(desired_capabilities={"chromeOptions": {"args": ["--start-fullscreen"]}}) request.addfinalizer(wd.qu...
driver
<|file_name|>test_login.py<|end_file_name|><|fim▁begin|>import pytest from selenium import webdriver @pytest.fixture def driver(request): wd = webdriver.Firefox(capabilities={"marionette": True}) #(desired_capabilities={"chromeOptions": {"args": ["--start-fullscreen"]}}) request.addfinalizer(wd.quit) ...
test_example
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># coding: utf-8 import sys from setuptools import setup, find_packages NAME = "pollster" VERSION = "2.0.2" # To install the library, run the following # # python setup.py install # # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools <|fim▁hole|>REQUI...
<|file_name|>split.py<|end_file_name|><|fim▁begin|>s="the quick brown fox jumped over the lazy dog" t = s.split(" ") for v in t: print(v) r = s.split("e") for v in r: print(v) x = s.split() for v in x: print(v) # 2-arg version of split not supported # y = s.split(" ",7) # for v in y:<|fim▁hole|><|fim▁e...
# print v
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
"""
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
""Find in files DockWidget""" CONF_SECTION = 'ipython' def __init__(self, parent, args, kernel_widget, kernel_name): super(IPythonPlugin, self).__init__(parent) self.kernel_widget = kernel_widget self.kernel_name = kernel_name self.ipython_widget = create_wi...
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
uper(IPythonPlugin, self).__init__(parent) self.kernel_widget = kernel_widget self.kernel_name = kernel_name self.ipython_widget = create_widget(argv=args.split()) layout = QHBoxLayout() layout.addWidget(self.ipython_widget) self.setLayout(layo...
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
""Toggle widget visibility""" if self.dockwidget: self.dockwidget.setVisible(state)
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
""Return widget title""" return "IPython (%s) - Experimental!" % self.kernel_name
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
"" Return the widget to give focus to when this plugin's dockwidget is raised on top-level """ return self.ipython_widget._control
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
""Return a list of actions related to plugin""" return []
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
""Register plugin in Spyder's main window""" self.main.add_dockwidget(self)
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
""Refresh widget""" pass
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
""Perform actions before parent main window is closed""" return True
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
elf.dockwidget.setVisible(state)
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
_init__(
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
oggle(
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
et_plugin_title(
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
et_focus_widget(
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
et_plugin_actions(
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
egister_plugin(
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
efresh_plugin(
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
losing_plugin(
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
self.client.get(url_for("user.logout"))
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): <|fim_middle|> <|fim▁end|>
DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI = "sqlite:///" + DB_FILE[1] LOGGING = {"version": 1} TESTING = True WTF_CSRF_ENABLED = False USER_ENABLE_LOGIN_WITHOUT_CONFIRM = True def create_app(self): ret = iis.create_app(self.__class__) app = ret[0] self.use...
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
ret = iis.create_app(self.__class__) app = ret[0] self.user_manager = ret[1] return app
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
db.create_all() self.create_user("admin", "passW1")
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
db.session.remove() db.drop_all()
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
username = username or "admin" password = password or "passW1" self.client.post(url_for('user.login'), data=dict( username=username, password=password ), follow_redirects=False) return User.query.filter_by(username=username).one()
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
self.client.get(url_for("user.logout"))
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
user = User(username=username, password=self.user_manager.hash_password(password), email=username + "@localhost", confirmed_at=datetime.fromtimestamp(0.0), active=True) db.session.add(user) db.session.commit() ...
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
self.logout() res = self.client.get(url) self.assertEqual(302, res.status_code) self.assertIn(url_for('user.login'), res.headers['Location'])
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
create_app
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
setUp
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
tearDown
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
login
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
logout
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
create_user
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
assertLoginRequired
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class XorgServer(AutotoolsPackage, XorgPackage)...
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class XorgServer(AutotoolsPackage, XorgPackage)...
"""X.Org Server is the free and open source implementation of the display server for the X Window System stewarded by the X.Org Foundation.""" homepage = "http://cgit.freedesktop.org/xorg/xserver" xorg_mirror_path = "xserver/xorg-server-1.18.99.901.tar.gz" version('1.18.99.901', sha256='c8425163b5...
<|file_name|>test_exteriorfuelequipment.py<|end_file_name|><|fim▁begin|>import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.exterior_equipment import ExteriorFuelEquipment log = logging.getLogger(__name__) class TestExteriorFuelE...
idf = IDF() idf.add(obj) idf.save(self.path, check=False)
<|file_name|>test_exteriorfuelequipment.py<|end_file_name|><|fim▁begin|>import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.exterior_equipment import ExteriorFuelEquipment log = logging.getLogger(__name__) class TestExteriorFuelE...
def setUp(self): self.fd, self.path = tempfile.mkstemp() def tearDown(self): os.remove(self.path) def test_create_exteriorfuelequipment(self): pyidf.validation_level = ValidationLevel.error obj = ExteriorFuelEquipment() # alpha var_name = "Name" ob...
<|file_name|>test_exteriorfuelequipment.py<|end_file_name|><|fim▁begin|>import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.exterior_equipment import ExteriorFuelEquipment log = logging.getLogger(__name__) class TestExteriorFuelE...
self.fd, self.path = tempfile.mkstemp()
<|file_name|>test_exteriorfuelequipment.py<|end_file_name|><|fim▁begin|>import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.exterior_equipment import ExteriorFuelEquipment log = logging.getLogger(__name__) class TestExteriorFuelE...
os.remove(self.path)
<|file_name|>test_exteriorfuelequipment.py<|end_file_name|><|fim▁begin|>import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.exterior_equipment import ExteriorFuelEquipment log = logging.getLogger(__name__) class TestExteriorFuelE...
pyidf.validation_level = ValidationLevel.error obj = ExteriorFuelEquipment() # alpha var_name = "Name" obj.name = var_name # alpha var_fuel_use_type = "Electricity" obj.fuel_use_type = var_fuel_use_type # object-list var_schedule_name = "o...
<|file_name|>test_exteriorfuelequipment.py<|end_file_name|><|fim▁begin|>import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.exterior_equipment import ExteriorFuelEquipment log = logging.getLogger(__name__) class TestExteriorFuelE...
setUp
<|file_name|>test_exteriorfuelequipment.py<|end_file_name|><|fim▁begin|>import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.exterior_equipment import ExteriorFuelEquipment log = logging.getLogger(__name__) class TestExteriorFuelE...
tearDown
<|file_name|>test_exteriorfuelequipment.py<|end_file_name|><|fim▁begin|>import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.exterior_equipment import ExteriorFuelEquipment log = logging.getLogger(__name__) class TestExteriorFuelE...
test_create_exteriorfuelequipment
<|file_name|>bowtie2.py<|end_file_name|><|fim▁begin|>import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def run(self): """ Map READS to CONTIGS a...
if len(reads) == 2: cmd_args += ['-1', reads[0], '-2', reads[1]]
<|file_name|>bowtie2.py<|end_file_name|><|fim▁begin|>import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): <|fim_middle|> <|fim▁end|>
def run(self): """ Map READS to CONTIGS and return alignment. Set MERGED_PAIR to True if reads[1] is a merged paired end file """ contig_file = self.data.contigfiles[0] reads = self.data.readfiles ## Index contigs prefix = os.path.join(self....
<|file_name|>bowtie2.py<|end_file_name|><|fim▁begin|>import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def run(self): <|fim_middle|> <|fim▁end|>
""" Map READS to CONTIGS and return alignment. Set MERGED_PAIR to True if reads[1] is a merged paired end file """ contig_file = self.data.contigfiles[0] reads = self.data.readfiles ## Index contigs prefix = os.path.join(self.outpath, 'bt2') ...
<|file_name|>bowtie2.py<|end_file_name|><|fim▁begin|>import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def run(self): """ Map READS to CONTIGS a...
cmd_args += ['-1', reads[0], '-2', reads[1]]
<|file_name|>bowtie2.py<|end_file_name|><|fim▁begin|>import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def run(self): """ Map READS to CONTIGS a...
cmd_args += ['-U', reads[0]]
<|file_name|>bowtie2.py<|end_file_name|><|fim▁begin|>import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def run(self): """ Map READS to CONTIGS a...
raise Exception('Bowtie plugin error')
<|file_name|>bowtie2.py<|end_file_name|><|fim▁begin|>import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def run(self): """ Map READS to CONTIGS a...
raise Exception('Unable to complete alignment')
<|file_name|>bowtie2.py<|end_file_name|><|fim▁begin|>import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def run(self): """ Map READS to CONTIGS a...
bamfile = os.path.join(self.outpath, '{}_{}.bam'.format(os.path.basename(contig_file), i)) self.arast_popen(['samtools', 'merge', bamfile] + bamfiles) if not os.path.exists(bamfile): raise Exception('Unable to complete alignment')
<|file_name|>bowtie2.py<|end_file_name|><|fim▁begin|>import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def run(self): """ Map READS to CONTIGS a...
raise Exception('Unable to complete alignment')
<|file_name|>bowtie2.py<|end_file_name|><|fim▁begin|>import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def run(self): """ Map READS to CONTIGS a...
bamfile = bamfiles[0] if not os.path.exists(bamfile): raise Exception('Unable to complete alignment')
<|file_name|>bowtie2.py<|end_file_name|><|fim▁begin|>import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def run(self): """ Map READS to CONTIGS a...
raise Exception('Unable to complete alignment')
<|file_name|>bowtie2.py<|end_file_name|><|fim▁begin|>import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def <|fim_middle|>(self): """ Map READS t...
run
<|file_name|>tumblrserv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ## tumblrserv.py implements a Tumblr (http://www.tumblr.com) markup parsing ## engine and compatible webserver. ## ## Version: 0.2 final ## ## Copyright (C) 2009 Jeremy Herbert ## Contact mailto:jeremy@jeremyherbert.net ## ## ...
<|file_name|>tumblrserv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ## tumblrserv.py implements a Tumblr (http://www.tumblr.com) markup parsing ## engine and compatible webserver. ## ## Version: 0.2 final ## ## Copyright (C) 2009 Jeremy Herbert ## Contact mailto:jeremy@jeremyherbert.net ## ## ...
arguments.pop(0)
<|file_name|>tumblrserv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ## tumblrserv.py implements a Tumblr (http://www.tumblr.com) markup parsing ## engine and compatible webserver. ## ## Version: 0.2 final ## ## Copyright (C) 2009 Jeremy Herbert ## Contact mailto:jeremy@jeremyherbert.net ## ## ...
if os.path.exists(next_arg(arguments, '--config')): config_path = next_arg(arguments, '--config')
<|file_name|>tumblrserv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ## tumblrserv.py implements a Tumblr (http://www.tumblr.com) markup parsing ## engine and compatible webserver. ## ## Version: 0.2 final ## ## Copyright (C) 2009 Jeremy Herbert ## Contact mailto:jeremy@jeremyherbert.net ## ## ...
config_path = next_arg(arguments, '--config')
<|file_name|>tumblrserv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ## tumblrserv.py implements a Tumblr (http://www.tumblr.com) markup parsing ## engine and compatible webserver. ## ## Version: 0.2 final ## ## Copyright (C) 2009 Jeremy Herbert ## Contact mailto:jeremy@jeremyherbert.net ## ## ...
pull_data( next_arg(arguments, '--pull-data') )
<|file_name|>tumblrserv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ## tumblrserv.py implements a Tumblr (http://www.tumblr.com) markup parsing ## engine and compatible webserver. ## ## Version: 0.2 final ## ## Copyright (C) 2009 Jeremy Herbert ## Contact mailto:jeremy@jeremyherbert.net ## ## ...
if not os.path.exists("themes/" + next_arg(arguments, '--theme') + '.thtml'): err_exit("The theme file %s.thtml does not exist in the themes\ directory." % next_arg(arguments, '--theme')) config['defaults']['theme_name'] = next_arg(arguments, '--theme')
<|file_name|>tumblrserv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ## tumblrserv.py implements a Tumblr (http://www.tumblr.com) markup parsing ## engine and compatible webserver. ## ## Version: 0.2 final ## ## Copyright (C) 2009 Jeremy Herbert ## Contact mailto:jeremy@jeremyherbert.net ## ## ...
err_exit("The theme file %s.thtml does not exist in the themes\ directory." % next_arg(arguments, '--theme'))
<|file_name|>tumblrserv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ## tumblrserv.py implements a Tumblr (http://www.tumblr.com) markup parsing ## engine and compatible webserver. ## ## Version: 0.2 final ## ## Copyright (C) 2009 Jeremy Herbert ## Contact mailto:jeremy@jeremyherbert.net ## ## ...
if not has_keys(config['publishing_info'], \ ( 'url', 'username', 'password' )): err_exit('The configuration file is missing some critical publishing\ information. Please make sure you have specified your url, username and\ password.') publish_theme(config['publishing_info']['url'],\ con...
<|file_name|>tumblrserv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ## tumblrserv.py implements a Tumblr (http://www.tumblr.com) markup parsing ## engine and compatible webserver. ## ## Version: 0.2 final ## ## Copyright (C) 2009 Jeremy Herbert ## Contact mailto:jeremy@jeremyherbert.net ## ## ...
err_exit('The configuration file is missing some critical publishing\ information. Please make sure you have specified your url, username and\ password.')
<|file_name|>tumblrserv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ## tumblrserv.py implements a Tumblr (http://www.tumblr.com) markup parsing ## engine and compatible webserver. ## ## Version: 0.2 final ## ## Copyright (C) 2009 Jeremy Herbert ## Contact mailto:jeremy@jeremyherbert.net ## ## ...
config['optimisations']['do_nothing'] = True
<|file_name|>asyncio_example.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import time from nicfit.aio import Application async def _main(args): print(args) print("Sleeping 2...") time.sleep(2) print("Sleeping 0...") return 0<|fim▁hole|>def atexit(): print("atexit") app = Application(...
<|file_name|>asyncio_example.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import time from nicfit.aio import Application async def _main(args): <|fim_middle|> def atexit(): print("atexit") app = Application(_main, atexit=atexit) app.arg_parser.add_argument("--example", help="Example cli") app.run(...
print(args) print("Sleeping 2...") time.sleep(2) print("Sleeping 0...") return 0
<|file_name|>asyncio_example.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import time from nicfit.aio import Application async def _main(args): print(args) print("Sleeping 2...") time.sleep(2) print("Sleeping 0...") return 0 def atexit(): <|fim_middle|> app = Application(_main, ate...
print("atexit")
<|file_name|>asyncio_example.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import time from nicfit.aio import Application async def <|fim_middle|>(args): print(args) print("Sleeping 2...") time.sleep(2) print("Sleeping 0...") return 0 def atexit(): print("atexit") app = Application(_...
_main
<|file_name|>asyncio_example.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import time from nicfit.aio import Application async def _main(args): print(args) print("Sleeping 2...") time.sleep(2) print("Sleeping 0...") return 0 def <|fim_middle|>(): print("atexit") app = Application(_m...
atexit
<|file_name|>linked_tap.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np from bokeh.client import push_session from bokeh.io import curdoc from bokeh.models import (ColumnDataSource, DataRange1d, Plot, Circle, WidgetBox, Row, Button, TapTool) N = 9 ...
<|file_name|>linked_tap.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np from bokeh.client import push_session from bokeh.io import curdoc from bokeh.models import (ColumnDataSource, DataRange1d, Plot, Circle, WidgetBox, Row, Button, TapTool) N = 9 ...
color = ["blue"]*N if inds['1d']['indices']: indices = inds['1d']['indices'] for i in indices: color[i] = "red" source2.data["color"] = color
<|file_name|>linked_tap.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np from bokeh.client import push_session from bokeh.io import curdoc from bokeh.models import (ColumnDataSource, DataRange1d, Plot, Circle, WidgetBox, Row, Button, TapTool) N = 9 ...
inds = inds['1d']['indices'] if inds: [index] = inds radius = [0.1]*N radius[index] = 0.2 else: radius = [0.1]*N source1.data["radius"] = radius
<|file_name|>linked_tap.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np from bokeh.client import push_session from bokeh.io import curdoc from bokeh.models import (ColumnDataSource, DataRange1d, Plot, Circle, WidgetBox, Row, Button, TapTool) N = 9 ...
source1.selected = { '0d': {'flag': False, 'indices': []}, '1d': {'indices': []}, '2d': {'indices': {}} } source2.selected = { '0d': {'flag': False, 'indices': []}, '1d': {'indices': []}, '2d': {'indices': {}} }
<|file_name|>linked_tap.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np from bokeh.client import push_session from bokeh.io import curdoc from bokeh.models import (ColumnDataSource, DataRange1d, Plot, Circle, WidgetBox, Row, Button, TapTool) N = 9 ...
indices = inds['1d']['indices'] for i in indices: color[i] = "red"
<|file_name|>linked_tap.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np from bokeh.client import push_session from bokeh.io import curdoc from bokeh.models import (ColumnDataSource, DataRange1d, Plot, Circle, WidgetBox, Row, Button, TapTool) N = 9 ...
[index] = inds radius = [0.1]*N radius[index] = 0.2
<|file_name|>linked_tap.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np from bokeh.client import push_session from bokeh.io import curdoc from bokeh.models import (ColumnDataSource, DataRange1d, Plot, Circle, WidgetBox, Row, Button, TapTool) N = 9 ...
radius = [0.1]*N
<|file_name|>linked_tap.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np from bokeh.client import push_session from bokeh.io import curdoc from bokeh.models import (ColumnDataSource, DataRange1d, Plot, Circle, WidgetBox, Row, Button, TapTool) N = 9 ...
print("\npress ctrl-C to exit") session = push_session(document) session.show() session.loop_until_closed()
<|file_name|>linked_tap.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np from bokeh.client import push_session from bokeh.io import curdoc from bokeh.models import (ColumnDataSource, DataRange1d, Plot, Circle, WidgetBox, Row, Button, TapTool) N = 9 ...
on_selection_change1
<|file_name|>linked_tap.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np from bokeh.client import push_session from bokeh.io import curdoc from bokeh.models import (ColumnDataSource, DataRange1d, Plot, Circle, WidgetBox, Row, Button, TapTool) N = 9 ...
on_selection_change2
<|file_name|>linked_tap.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np from bokeh.client import push_session from bokeh.io import curdoc from bokeh.models import (ColumnDataSource, DataRange1d, Plot, Circle, WidgetBox, Row, Button, TapTool) N = 9 ...
on_reset_click
<|file_name|>test_add_project.py<|end_file_name|><|fim▁begin|>from model.project import Project def test_add_project(app): project=Project(name="students_project", description="about Project") try: ind = app.project.get_project_list().index(project)<|fim▁hole|> app.project.delete_named_project(...
<|file_name|>test_add_project.py<|end_file_name|><|fim▁begin|>from model.project import Project def test_add_project(app): <|fim_middle|> <|fim▁end|>
project=Project(name="students_project", description="about Project") try: ind = app.project.get_project_list().index(project) app.project.delete_named_project(project) except ValueError: pass old_projects = app.project.get_project_list() app.project.create(project) new_p...
<|file_name|>test_add_project.py<|end_file_name|><|fim▁begin|>from model.project import Project def <|fim_middle|>(app): project=Project(name="students_project", description="about Project") try: ind = app.project.get_project_list().index(project) app.project.delete_named_project(project) ...
test_add_project
<|file_name|>test_source_notfound.py<|end_file_name|><|fim▁begin|>import source_navigation_steps import functional_test class TestSourceInterfaceNotFound(<|fim▁hole|> self._source_not_found()<|fim▁end|>
functional_test.FunctionalTest, source_navigation_steps.SourceNavigationStepsMixin): def test_not_found(self):
<|file_name|>test_source_notfound.py<|end_file_name|><|fim▁begin|>import source_navigation_steps import functional_test class TestSourceInterfaceNotFound( functional_test.FunctionalTest, source_navigation_steps.SourceNavigationStepsMixin): <|fim_middle|> <|fim▁end|>
def test_not_found(self): self._source_not_found()
<|file_name|>test_source_notfound.py<|end_file_name|><|fim▁begin|>import source_navigation_steps import functional_test class TestSourceInterfaceNotFound( functional_test.FunctionalTest, source_navigation_steps.SourceNavigationStepsMixin): def test_not_found(self): <|fim_middle|> <|fim▁e...
self._source_not_found()
<|file_name|>test_source_notfound.py<|end_file_name|><|fim▁begin|>import source_navigation_steps import functional_test class TestSourceInterfaceNotFound( functional_test.FunctionalTest, source_navigation_steps.SourceNavigationStepsMixin): def <|fim_middle|>(self): self._source_not_found(...
test_not_found
<|file_name|>runtests.py<|end_file_name|><|fim▁begin|>import unittest import os from ui import main print os.getcwd() class TestMain(unittest.TestCase): def setUp(self): self.m = main.MainWindow() def test_mainWindow(self): assert(self.m) def test_dataframe(self): import ...
datasets = ['iris','Nile','morley','freeny','sleep','mtcars'] for a in datasets: main.rsession.r('%s=%s' % (a,a))