Instruction
stringlengths
362
7.83k
output_code
stringlengths
1
945
Given snippet: <|code_start|>""" Description: Test module for module src/factory/simple_factory.py @author: Paul Bodean @date: 10/08/2017 """ class TestSimpleFactory(TestCase): """ Check simple factory functionality """ def setUp(self): """ Driver + factory setup :return: dr...
return driver, App(driver)
Based on the snippet: <|code_start|>""" Description: Test module for module src/factory/simple_factory.py @author: Paul Bodean @date: 10/08/2017 """ class TestSimpleFactory(TestCase): """ Check simple factory functionality """ def setUp(self): """ Driver + factory setup :ret...
driver = get_selenium_driver('chrome')
Given snippet: <|code_start|> self.__builder.get_flow() # Make comparison if self.__builder.get_post_validation(): self.__status = True else: self.__status = False else: self.__status = False # Post results ...
self._driver = get_selenium_driver('chrome')
Next line prediction: <|code_start|>""" Description: - Check Driver connection following both singleton approaches @author: Paul Bodean @date: 26/12/2017 """ class TestDecoratorSingleton(TestCase): def test_singleton(self): dr1 = Driver() dr1.get_driver().get('https://en.wikipedia.org/') ...
dr1 = MyDriver()
Continue the code snippet: <|code_start|>""" Description: - Check Driver connection following both singleton approaches @author: Paul Bodean @date: 26/12/2017 """ class TestDecoratorSingleton(TestCase): def test_singleton(self): <|code_end|> . Use current file imports: from unittest import TestCase from src...
dr1 = Driver()
Continue the code snippet: <|code_start|>Description: Test module for module src/factory/simple_factory.py @author: Paul Bodean @date: 12/08/2017 """ class TestFactoryMethod(TestCase): """ Check simple factory functionality """ def setUp(self): """ Driver + factory setup :...
demo = MenuAndSearchTest(self.dr)
Here is a snippet: <|code_start|>""" Description: Test module for module src/factory/simple_factory.py @author: Paul Bodean @date: 12/08/2017 """ class TestFactoryMethod(TestCase): """ Check simple factory functionality """ def setUp(self): """ Driver + factory setup :retu...
self.dr = get_selenium_driver('chrome')
Predict the next line for this snippet: <|code_start|>""" Implement a test flow using facade pattern. The flow will be a unified high-level interface for all the pages which composes the test app """ class FacadePage: """ Facade class delegates the client requests to the actual subsystems """ __driver...
return HomePage(FacadePage.__driver)
Here is a snippet: <|code_start|>""" class FacadePage: """ Facade class delegates the client requests to the actual subsystems """ __driver = get_selenium_driver('chrome') def get_driver(self): """ :return: selenium driver """ return self.__driver @staticmeth...
return SearchPage(FacadePage.__driver)
Based on the snippet: <|code_start|>""" Implement a test flow using facade pattern. The flow will be a unified high-level interface for all the pages which composes the test app """ class FacadePage: """ Facade class delegates the client requests to the actual subsystems """ <|code_end|> , predict the imm...
__driver = get_selenium_driver('chrome')
Predict the next line after this snippet: <|code_start|>""" Description: Test case implementation based on builder pattern and unittest """ class TestSearchFlow(TestTemplate): """ Test class for testing a search on Wikipedia """ def test_flow(self): """ Test Steps """ <|code_...
home_builder = SearchFlow()
Given the code snippet: <|code_start|>""" Description: Test case implementation based on builder pattern and unittest """ class TestSearchFlow(TestTemplate): """ Test class for testing a search on Wikipedia """ def test_flow(self): """ Test Steps """ home_builder = Se...
manager = TestManager()
Given the following code snippet before the placeholder: <|code_start|> class Manager: """ State machine manager. Acting as an interface to the client and providing the actual state of the object """ def __init__(self, state): """ :param state: current object state """ ...
self._driver = get_selenium_driver('chrome')
Predict the next line after this snippet: <|code_start|>""" Description: module providing the implementation of the search class of the object pattern pattern class declaration. @author: Paul Bodean @date: 25/07/2017 """ <|code_end|> using the current file's imports: from src.page_object_pattern.base_page import ...
class HomePage(BasePage):
Next line prediction: <|code_start|>""" Different project related utilities like Selenium driver connection """ def get_appium_driver(url, desired_capabilities) -> Remote: """ Return the same instance to the Appium driver. :param url: the URL (address and port) where the service runs. :param desired...
return SingletonFactory.build(Remote,
Given snippet: <|code_start|> def subscribe(self, who): self._observers.add(who) def un_subscribe(self, who): self._observers.discard(who) def dispatch(self,test_func, message): for subscriber in self._observers: if get_process_info_spike(message) >= 50: ...
main_page = HomePage(driver)
Given snippet: <|code_start|> def __init__(self): self._observers = set() def subscribe(self, who): self._observers.add(who) def un_subscribe(self, who): self._observers.discard(who) def dispatch(self,test_func, message): for subscriber in self._observers: i...
driver = get_selenium_driver('CHROME')
Given the following code snippet before the placeholder: <|code_start|>""" Define a one to many relationship between objects. If the state of an object is changed, all the others are notified """ class Process: """ - is aware of observers - send a notification to the observers if its state is changed ...
if get_process_info_spike(message) >= 50:
Predict the next line for this snippet: <|code_start|>- Simple Factory Pattern implementation - To notice them main idea a base class App was created and two other subclasses @author: Paul Bodean @date: 10/08/2017 """ class App(object): """ """ def __init__(self, driver: Union[Chrome, Firefox]): ...
return Menu(self.__driver)
Here is a snippet: <|code_start|> @author: Paul Bodean @date: 10/08/2017 """ class App(object): """ """ def __init__(self, driver: Union[Chrome, Firefox]): """ :param driver: browser driver :type driver: object """ self.__driver = driver def factory(self,...
return Search(self.__driver)
Continue the code snippet: <|code_start|> class TestTemplateTestBuilder(TestCase): def setUp(self): self.driver = get_selenium_driver('chrome') self.driver.get('https://www.youtube.com/') def test_one(self): <|code_end|> . Use current file imports: from unittest import TestCase from src.bui...
test_case = TemplateTestBuilder(self.driver)\
Continue the code snippet: <|code_start|>""" Description: Test case implementation based on page object pattern and unittest """ class TestSearchPage(TestTemplate): """ Test class for testing a search on Youtube """ def test_result_found(self): """ Perform searches """ <|code...
home_page = HomePage(self.driver)
Predict the next line after this snippet: <|code_start|>""" Description: Test case implementation based on page object pattern and unittest """ class TestSearchPage(TestTemplate): """ Test class for testing a search on Youtube """ def test_result_found(self): """ Perform searches ...
result = SearchPage(self.driver)
Given the following code snippet before the placeholder: <|code_start|>""" Description: Test module for module src/singleton/simple_singleton.py @author: Eugen @date: 24/07/2017 """ class TestMyClassBuilder(TestCase): def test_build(self): <|code_end|> , predict the next line using imports from the...
my_class = MyClassBuilder.build(name='my class')
Based on the snippet: <|code_start|>""" Description: This module provides the menu page related interactions @author: Paul Bodean @date: 10/08/2017 """ class Menu(object): """ A couple of menu actions are implemented in Menu class """ MENU_BUTTON = '#appbar-guide-button > span > span' TREND_BUTTO...
click_retry(self.__driver, self.MENU_BUTTON, 'css_selector')
Using the snippet: <|code_start|>""" Description: Test module for module src/page_object_patter/base_page.py @author: Paul Bodean @date: 25/07/2017 """ class TestHomePage(TestTemplate): """ Check page page functionality """ def test_buttons_available(self): """ Check Home page butto...
main_page = HomePage(self.driver)
Using the snippet: <|code_start|>""" Description: Test module for module src/page_object_patter/base_page.py @author: Paul Bodean @date: 25/07/2017 """ <|code_end|> , determine the next line of code. You have imports: from src.page_object_pattern.home_page import HomePage from src.page_object_pattern.test_template...
class TestHomePage(TestTemplate):
Next line prediction: <|code_start|>""" Description: - Check the object instance memory location @author: Paul Bodean @date: 26/12/2017 """ class TestSingleton(TestCase): def test_singleton(self): <|code_end|> . Use current file imports: (from unittest import TestCase from src.singleton.singleton_classical...
s = ClassicalSingleton()
Next line prediction: <|code_start|> class TestLipoP(PluginTestBase): _plugin_name = "lipop1" def test_lipop1(self): if not self.params['lipop1_bin']: self.params['lipop1_bin'] = 'LipoP' <|code_end|> . Use current file imports: (import os import unittest import sys import inmembrane im...
lipop1.annotate(self.params, self.proteins)
Continue the code snippet: <|code_start|> class TestTmhmm(PluginTestBase): _plugin_name = "tmhmm" def test_tmhmm(self): if not self.params['tmhmm_bin']: self.params['tmhmm_bin'] = 'tmhmm' <|code_end|> . Use current file imports: import os import unittest import sys import inmembrane i...
tmhmm.annotate(self.params, self.proteins)
Given the code snippet: <|code_start|>citation = {'ref': u"Garrow, A.G., Agnew, A. and Westhead, D.R. TMB-Hunt: An " u"amino acid composition based method to screen proteomes " u"for beta-barrel transmembrane proteins. BMC " u"Bioinformatics, 2005, 6: 56 \n " ...
log_stderr(
Given the code snippet: <|code_start|> except: polltime = polltime * 2 if polltime >= 7200: # 2 hours log_stderr("# TMB-HUNT error: Taking too long.") return txt_out = show() # write raw TMB-HUNT results fh = open(out, 'w') fh.write(txt_out) fh....
seqid, desc = parse_fasta_header(l)
Given the code snippet: <|code_start|># -*- coding: utf-8 -*- citation = {'ref': "http://hmmer.org", 'name': 'HMMER 3.0'} def annotate(params, proteins): """ Returns a reference to the proteins data structure. Uses HMMER to identify sequence motifs in proteins. This function annotates the proteins ...
log_stderr(
Using the snippet: <|code_start|># -*- coding: utf-8 -*- citation = {'ref': "http://hmmer.org", 'name': 'HMMER 3.0'} def annotate(params, proteins): """ Returns a reference to the proteins data structure. Uses HMMER to identify sequence motifs in proteins. This function annotates the proteins with:...
run(cmd, hmmsearch3_out)
Predict the next line after this snippet: <|code_start|> - 'hmmsearch': a list of motifs that are found in the protein. The motifs correspond to the basename of the .hmm files found in the directory indicated by the 'hmm_profiles_dir' field of 'params'. """ log_stderr( "# Searchi...
seqid = parse_fasta_header(l[3:])[0]
Predict the next line after this snippet: <|code_start|> __DEBUG__ = False try: except: def annotate(params, proteins, \ batchsize=500, \ force=False): """ This plugin interfaces with the TMHMM web interface (for humans) and scrapes the results. There once was a SOAP service b...
proteins = parse_tmhmm(resultpage, proteins, id_mapping=id_mapping)
Given snippet: <|code_start|> u"L. L. Sonnhammer (2001) Predicting Transmembrane Protein " u"Topology with a Hidden Markov Model: Application to " u"Complete Genomes. J. Mol. Biol. 305:567-580. \n" u"<http://dx.doi.org/10.1006/jmbi.2000.4315>", ...
log_stderr("# -> skipped: %s already exists" % outfile)
Based on the snippet: <|code_start|> u"Topology with a Hidden Markov Model: Application to " u"Complete Genomes. J. Mol. Biol. 305:567-580. \n" u"<http://dx.doi.org/10.1006/jmbi.2000.4315>", 'name': "TMHMM 2.0" } __DEBUG__ = False try: e...
proteins, id_mapping = generate_safe_seqids(proteins)
Given snippet: <|code_start|> This plugin interfaces with the TMHMM web interface (for humans) and scrapes the results. There once was a SOAP service but it was discontinued, so now we use this. """ baseurl = "http://www.cbs.dtu.dk" url = baseurl + '/cgi-bin/webface2.fcgi' # grab the cached...
safe_fasta = proteins_to_fasta(proteins, seqids=seqid_batch,
Based on the snippet: <|code_start|> class TestSignalp(PluginTestBase): _plugin_name = "signalp4" def test_signalp4(self): if not self.params['signalp4_bin']: self.params['signalp4_bin'] = 'signalp' self.params['fasta'] = "input.fasta" self.params['signalp4_organism'] = '...
signalp4.annotate(self.params, self.proteins)
Next line prediction: <|code_start|> u"<http://dx.doi.org/10.1006/jmbi.2000.4315>", 'name': "TMHMM 2.0" } def annotate(params, proteins): """ Runs THMHMM and parses the output files. Takes a standard 'inmembrane' params dictionary and a global proteins dictionary...
run('%(tmhmm_bin)s %(fasta)s' % params, tmhmm_out)
Given the following code snippet before the placeholder: <|code_start|> These keys are added to the proteins dictionary: - 'tmhmm_helices', a list of tuples describing the first and last residue number of each transmembrane segment; - 'tmhmm_scores', a list of confidence scores (floats) for eac...
seqid = parse_fasta_header(words[1])[0]
Continue the code snippet: <|code_start|> seqid, result = parse_fasta_header(f) if "Non-Outer Membrane Protein" in result: proteins[seqid]["is_tmbetadisc_rbf"] = False elif "is Outer Membrane Protein" in result: proteins[seqid]["is_tmbetadisc_rbf"] = Tr...
log_stderr(
Predict the next line after this snippet: <|code_start|># -*- coding: utf-8 -*- citation = {'ref': "Ou Y-YY, Gromiha MMM, Chen S-AA, Suwa M (2008) " "TMBETADISC-RBF: Discrimination of beta-barrel " "membrane proteins using RBF networks and PSSM profiles. " "Comp...
seqid, result = parse_fasta_header(f)
Given the code snippet: <|code_start|> by web browsers, since we need to bypass some AJAX fun. """ # TODO: automatically split large sets into multiple jobs # since TMBETADISC seems to not like more than take # ~5000 seqs at a time if len(proteins) >= 5000: log_stderr( ...
if dict_get(params, 'tmbetadisc_rbf_method'):
Predict the next line for this snippet: <|code_start|># -*- coding: utf-8 -*- citation = {'ref': u"Agnieszka S. Juncker, Hanni Willenbrock, " u"Gunnar Von Heijne, Søren Brunak, Henrik Nielsen, " u"And Anders Krogh. (2003) Prediction of lipoprotein " u"signal pep...
run('%(lipop1_bin)s %(fasta)s' % params, lipop1_out)
Given snippet: <|code_start|> lipop1_out = 'lipop.out' run('%(lipop1_bin)s %(fasta)s' % params, lipop1_out) proteins = parse_lipop(open(lipop1_out).read(), proteins) return proteins def parse_lipop(text, proteins, id_mapping=None): """ Parses the text output of the LipoP program and returns a...
seqid = parse_fasta_header(words[1])[0]
Next line prediction: <|code_start|> """ if id_mapping is None: id_mapping = [] # initialize fields in each protein for seqid in proteins: proteins[seqid]['is_lipop'] = False proteins[seqid]['lipop_cleave_position'] = None for l in text.split('\n'): words = l.split(...
if dict_get(proteins[seqid], 'lipop_cleave_position'):
Next line prediction: <|code_start|> def get_annotations(params): annotations = [] params['signalp4_organism'] = 'gram-' if not params['signalp4_bin'] or params[ 'signalp4_bin'] == 'signalp_scrape_web': annotations += ['signalp_scrape_web'] else: annotations += ['signalp4'] ...
if 'bomp' in dict_get(params, 'barrel_programs'):
Given snippet: <|code_start|> # DEPRECATED: TMB-HUNT server is permanently offline # tmbhunt_prob = dict_get(protein, 'tmbhunt_prob') # if (tmbhunt_prob >= params['tmbhunt_clearly_cutoff']) or \ # (has_signal_pept and tmbhunt_prob >= params['tmbhunt_maybe_cutoff']): # details += ['tmbhunt(%.2f)' %...
chop_nterminal_peptide(protein, protein['signalp_cleave_position'])
Using the snippet: <|code_start|> if line.startswith("#"): past_preamble = True continue if not past_preamble and line.strip() == '': # skip empty lines continue if past_preamble: if line.strip() == '': # in the case of web output o...
run(cmd, signalp4_out)
Here is a snippet: <|code_start|># -*- coding: utf-8 -*- citation = {'ref': u"Petersen TN, Brunak S, von Heijne G, Nielsen H. " u"SignalP 4.0: discriminating signal peptides from " u"transmembrane regions. Nature methods 2011 " u"Jan;8(10):785-6. \n" ...
seqid = parse_fasta_header(words[0])[0]
Predict the next line after this snippet: <|code_start|> class TestTatfind(PluginTestBase): _plugin_name = "tatfind_web" def test_tatfind_web(self): <|code_end|> using the current file's imports: import os import unittest import sys import inmembrane import inmembrane.tests from inmembrane import helpers ...
tatfind_web.annotate(self.params, self.proteins)
Predict the next line for this snippet: <|code_start|> # NOTE: since memsat3 is dependent on using a particular BLAST sequence # database, if your local version of this database differs to the # one used to generate the expected results below, this test will # fail. There is no straightforward way ...
memsat3.annotate(self.params, self.proteins)
Given the code snippet: <|code_start|> class TestTmhmmWeb(PluginTestBase): _plugin_name = "tmhmm_scrape_web" def test_tmhmm_scrape_web(self): <|code_end|> , generate the next line using the imports in this file: import os import unittest import sys import inmembrane import inmembrane.tests import inmembra...
tmhmm_scrape_web.annotate(self.params, self.proteins)
Predict the next line for this snippet: <|code_start|> class PluginTestBase(unittest.TestCase): _plugin_name = "" def setUp(self): """ Sets up a directory, a parameters dictionary and a proteins dictionary object in preparation for running a test of a plugin. Creates a tempor...
helpers.silence_log(True)
Given the code snippet: <|code_start|> u"L. L. Sonnhammer (2001) Predicting Transmembrane Protein " u"Topology with a Hidden Markov Model: Application to " u"Complete Genomes. J. Mol. Biol. 305:567-580. \n" u"<http://dx.doi.org/10.1006/jmbi.2000...
log_stderr("# -> skipped: %s already exists" % outfile)
Here is a snippet: <|code_start|> citation["name"] = result[0].method + " " + result[0].version for res in result.ann: # seqid = res.sequence.id seqid = tmhmm_seq_id_mapping[res.sequence.id] if 'tmhmm_helices' not in proteins[seqid]: proteins[seqid].u...
if __DEBUG__: print_proteins(proteins)
Given the code snippet: <|code_start|># see: http://www.cbs.dtu.dk/ws/ws.php?entry=SignalP4 citation = {'ref': u"Agnieszka S. Juncker, Hanni Willenbrock, " u"Gunnar Von Heijne, Søren Brunak, Henrik Nielsen, " u"And Anders Krogh. (2003) Prediction of lipoprotein " ...
log_stderr("# -> skipped: %s already exists" % outfile)
Using the snippet: <|code_start|> def get_annotations(params): """ Creates a list of annotation functions required by this gram_pos protocol. The main program will run the annotation functions of this list, mapping the correct functions to the strings. As well, the function does some bookeepin...
if dict_get(params, 'helix_programs'):
Here is a snippet: <|code_start|> params['internal_exposed_loop_min'])) if extents: return max(extents) else: return 0 terminal_exposed_loop_min = \ params['terminal_exposed_loop_min'] is_hmm_profile_match = dict_get(protein, 'hmmsearch') ...
chop_nterminal_peptide(protein, i_lipop_cut)
Based on the snippet: <|code_start|># -*- coding: utf-8 -*- __DEBUG__ = False citation = {'ref': u"Berven FS, Flikka K, Jensen HB, Eidhammer I (2004) " u"BOMP: a program to predict integral beta-barrel outer " u"membrane proteins encoded within genomes of Gram-negative " ...
log_stderr("# BOMP(web) %s > %s" % (params['fasta'], bomp_out))
Given snippet: <|code_start|> u"bacteria. Nucleic acids research 32: W394-9. \n" u"<http://dx.crossref.org/10.1093/nar/gkh351>", 'name': "BOMP" } def annotate(params, proteins, \ url="http://services.cbu.uib.no/tools/bomp/", force=False): ...
seqid = parse_fasta_header(l)[0]
Continue the code snippet: <|code_start|> class TestBomp(PluginTestBase): _plugin_name = "bomp_web" def test_bomp(self): self.expected_output = { u'gi|107837101': 3, u'gi|107836588': 5, u'gi|107836852': 5 } <|code_end|> . Use current file imports: impor...
self.output = bomp_web.annotate(self.params, self.proteins, force=True)
Predict the next line after this snippet: <|code_start|> Parses the TatFind HTML output (file-like object or a list of strings) an uses it to annotate and return an associated 'proteins' data structure. """ for l in output: if "Results for" in l: seqid = l.split("Results for ")[1].spl...
log_stderr("# TatFind(web) %s > %s" % (params['fasta'], outfn))
Based on the snippet: <|code_start|># -*- coding: utf-8 -*- citation = {'ref': u"Rose, R.W., T. Brüser,. J. C. Kissinger, and M. " u"Pohlschröder. 2002. Adaptation of protein secretion " u"to extremely high salt concentrations by extensive use " u"of the twin ar...
seqid, unused = parse_fasta_header(seqid)
Given the code snippet: <|code_start|> 'name': "LipoP 1.0 (web interface)" } __DEBUG__ = False try: except: def annotate(params, proteins, batchsize=2000, force=False): """ This plugin interfaces with the LipoP web interface (for humans) and scrapes the results. There once was a...
proteins = parse_lipop(resultpage, proteins, id_mapping=id_mapping)
Here is a snippet: <|code_start|>citation = {'ref': u"Agnieszka S. Juncker, Hanni Willenbrock, " u"Gunnar Von Heijne, Søren Brunak, Henrik Nielsen, " u"And Anders Krogh. (2003) Prediction of lipoprotein " u"signal peptides in Gram-negative bacteria. Protein " ...
log_stderr("# -> skipped: %s already exists" % outfile)
Predict the next line after this snippet: <|code_start|> u"Gunnar Von Heijne, Søren Brunak, Henrik Nielsen, " u"And Anders Krogh. (2003) Prediction of lipoprotein " u"signal peptides in Gram-negative bacteria. Protein " u"Science 12:1652–1662. \...
proteins, id_mapping = generate_safe_seqids(proteins)
Using the snippet: <|code_start|> This plugin interfaces with the LipoP web interface (for humans) and scrapes the results. There once was a SOAP service but it was discontinued, so now we use this. """ baseurl = "http://www.cbs.dtu.dk" url = baseurl + "/cgi-bin/webface2.fcgi" # grab the ca...
safe_fasta = proteins_to_fasta(proteins,
Next line prediction: <|code_start|> class TestSignalpScrapeWeb(PluginTestBase): _plugin_name = "signalp_scrape_web" def test_signalp4(self): if not self.params['signalp4_bin']: self.params['signalp4_bin'] = 'signalp_scrape_web' self.params['fasta'] = "input.fasta" self.p...
signalp_scrape_web.annotate(self.params, self.proteins)
Continue the code snippet: <|code_start|> class TestHmmsearch3(PluginTestBase): _plugin_name = "hmmsearch3" def test_hmmsearch3(self): self.params['hmm_profiles_dir'] = os.path.join(inmembrane.module_dir, "protocols/gram_pos_profiles") <|code_en...
hmmsearch3.annotate(self.params, self.proteins)
Predict the next line after this snippet: <|code_start|> In the current implementation, this function extracts and feeds sequences to MEMSAT3 one by one via a temporary file. These keys are added to the proteins dictionary: - 'memsat3_helices', a list of tuples describing the first and last residue ...
single_fasta = seqid_to_filename(seqid) + '.fasta'
Continue the code snippet: <|code_start|> - 'memsat3_helices', a list of tuples describing the first and last residue number of each transmembrane segment; - 'memsat3_scores', a list of confidence scores (floats) for each predicted tm segment; - 'memsat3_inner_loops', a list of tuples...
run('%s %s' % (params['memsat3_bin'], single_fasta), memsat_out)
Given snippet: <|code_start|> one by one via a temporary file. These keys are added to the proteins dictionary: - 'memsat3_helices', a list of tuples describing the first and last residue number of each transmembrane segment; - 'memsat3_scores', a list of confidence scores (floats) for each...
write_proteins_fasta(single_fasta, proteins, [seqid])
Here is a snippet: <|code_start|> 'name': "SignalP 4.1" } __DEBUG__ = False try: except: def annotate(params, proteins, batchsize=2000, force=False): """ This plugin interfaces with the SignalP web interface (for humans) and scrapes the results. There once was a SOAP service but...
proteins = parse_signalp(resultpage.splitlines(),
Here is a snippet: <|code_start|># -*- coding: utf-8 -*- citation = {'ref': u"Petersen TN, Brunak S, von Heijne G, Nielsen H. " u"SignalP 4.0: discriminating signal peptides from " u"transmembrane regions. Nature methods 2011 " u"Jan;8(10):785-6. \n" ...
log_stderr("# -> skipped: %s already exists" % outfile)
Continue the code snippet: <|code_start|>citation = {'ref': u"Petersen TN, Brunak S, von Heijne G, Nielsen H. " u"SignalP 4.0: discriminating signal peptides from " u"transmembrane regions. Nature methods 2011 " u"Jan;8(10):785-6. \n" u"<http:/...
proteins, id_mapping = generate_safe_seqids(proteins)
Using the snippet: <|code_start|> """ This plugin interfaces with the SignalP web interface (for humans) and scrapes the results. There once was a SOAP service but it was discontinued, so now we use this. """ baseurl = "http://www.cbs.dtu.dk" url = baseurl + "/cgi-bin/webface2.fcgi" # g...
safe_fasta = proteins_to_fasta(proteins,
Continue the code snippet: <|code_start|> waittime = 1.0 time.sleep(waittime) # (len(proteins)/500) resultpage = requests.get(pollingurl).text retries = 0 while (("<title>Job status of" in resultpage) and (retries < 15)): sys.stderr.write(".") time.sleep(w...
allresultpages += html2text(
Predict the next line after this snippet: <|code_start|> class TestLipoP(PluginTestBase): _plugin_name = "lipop_scrape_web" def test_lipop_scrape_web(self): <|code_end|> using the current file's imports: import os import unittest import sys import inmembrane import inmembrane.tests from inmembrane import ...
lipop_scrape_web.annotate(self.params, self.proteins)
Continue the code snippet: <|code_start|># Copyright (c) 2015 Intel Corporation # # Author: Julio Montes <julio.montes@intel.com> # Author: Victor Morales <victor.morales@intel.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
seq = Sequence('test', mock_function)
Predict the next line for this snippet: <|code_start|># # Copyright (c) 2015 Intel Corporation # # Author: Alberto Murillo <alberto.murillo.silva@intel.com> # # 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 t...
utils.generate_random_pw(),
Using the snippet: <|code_start|># # Copyright (c) 2015 Intel Corporation # # Author: Alberto Murillo <alberto.murillo.silva@intel.com> # # 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 # # ...
validators=[validators.not_empty]),
Here is a snippet: <|code_start|># # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License fo...
Controller.get().add_group(group, conf[group])
Given the code snippet: <|code_start|># # Copyright (c) 2015 Intel Corporation # # Author: Alberto Murillo <alberto.murillo.silva@intel.com> # # 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 # ...
Argument("ceilometer-db-pw",
Based on the snippet: <|code_start|># See the License for the specific language governing permissions and # limitations under the License. # def init_config(): conf = { "CEILOMETER": [ Argument("ceilometer-db-pw", "Password for ceilometer to access DB", ...
if util.str2bool(conf['CONFIG_CEILOMETER_INSTALL']):
Given the code snippet: <|code_start|># # Copyright (c) 2015 Intel Corporation # # Author: Julio Montes <julio.montes@intel.com> # Author: Obed Munoz <obed.n.munoz@intel.com> # Author: Victor Morales <victor.morales@intel.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this fi...
conf = Controller.get().CONF
Given snippet: <|code_start|> for dirpath, dirnames, filenames in os.walk(file): remote_path = dest_path + dirpath.split(parent_dir)[1] try: sftp.mkdir(remote_path) except: LOG.info("clearstack: Directory {0} is already c...
util.remove_localhost(hosts)
Using the snippet: <|code_start|> pass except Exception as e: raise e ''' if stderr is not empty then something fail ''' error = stderr.read() if error: raise Exception(error.decode('utf-8')) return stdin, stdout, stderr def transfer_...
LOG.info("clearstack: Directory {0} is already created"
Predict the next line after this snippet: <|code_start|># You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDIT...
recipe = utils.get_template(template)
Predict the next line for this snippet: <|code_start|># # Copyright (c) 2015 Intel Corporation # # Author: Alberto Murillo <alberto.murillo.silva@intel.com> # # 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 t...
Controller.get().add_group(group, conf[group])
Predict the next line for this snippet: <|code_start|># # Copyright (c) 2015 Intel Corporation # # Author: Alberto Murillo <alberto.murillo.silva@intel.com> # # 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 t...
if util.str2bool(conf['CONFIG_HORIZON_INSTALL']):
Using the snippet: <|code_start|># # Copyright (c) 2015 Intel Corporation # # Author: Alberto Murillo <alberto.murillo.silva@intel.com> # # 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 # # ...
utils.generate_random_pw(),
Next line prediction: <|code_start|># # Copyright (c) 2015 Intel Corporation # # Author: Alberto Murillo <alberto.murillo.silva@intel.com> # # 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 # # ...
validators=[validators.not_empty]),
Here is a snippet: <|code_start|> "Comma-separated, ordered list of network types to " "allocate as tenant networks", "CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS", "linuxbridge,l2population", options=['openvswitch', 'linux...
Controller.get().add_group(group, conf[group])
Continue the code snippet: <|code_start|># # Copyright (c) 2015 Intel Corporation # # Author: Alberto Murillo <alberto.murillo.silva@intel.com> # # 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...
Argument("neutron-ks-pw",
Here is a snippet: <|code_start|> Argument("neutron-ml2-flat-networks", "Comma-separated list of physical_network names with " "wich flat networks can be created.", "CONFIG_NEUTRON_ML2_FLAT_NETWORKS", "public", ...
if util.str2bool(conf['CONFIG_NEUTRON_INSTALL']):
Given the following code snippet before the placeholder: <|code_start|># # Copyright (c) 2015 Intel Corporation # # Author: Alberto Murillo <alberto.murillo.silva@intel.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may o...
utils.generate_random_pw(),
Using the snippet: <|code_start|># # Copyright (c) 2015 Intel Corporation # # Author: Alberto Murillo <alberto.murillo.silva@intel.com> # # 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 # # ...
validators=[validators.not_empty]),