prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
if input_value: return 'TRUE' else: return 'FALSE'
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
return 'TRUE'
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
return 'FALSE'
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
if input_value.lower() == 'true': return 'TRUE' elif input_value.lower() == 'false': return 'FALSE'
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
return 'TRUE'
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
return 'FALSE'
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
sequence = False input_value = [input_value]
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
sequence = True # indicates if a sequence must be returned
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
if isinstance(format_time(to_raw(element)), datetime): # valid Generalized Time string valid_values.append(element) else: return False
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
valid_values.append(element)
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
return False
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
changed = True if element.tzinfo: # a datetime with a timezone valid_values.append(element.strftime('%Y%m%d%H%M%S%z')) else: # datetime without timezone, assumed local and adjusted to UTC offset = datetime.now() - datetime.utcnow() va...
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
valid_values.append(element.strftime('%Y%m%d%H%M%S%z'))
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
offset = datetime.now() - datetime.utcnow() valid_values.append((element - offset).strftime('%Y%m%d%H%M%SZ'))
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
return False
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
if sequence: return valid_values else: return valid_values[0]
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
return valid_values
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
return valid_values[0]
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
return True
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
check_type
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
always_valid
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
validate_generic_single_value
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
validate_integer
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
validate_bytes
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
validate_boolean
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
validate_time
<|file_name|>0002_phonenumber_related_sim.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-11-01 20:02 from __future__ import unicode_literals <|fim▁hole|> class Migration(migrations.Migration): initial = True dependencies = [ ('phone_numbers', '0001_initial')...
from django.db import migrations, models import django.db.models.deletion
<|file_name|>0002_phonenumber_related_sim.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-11-01 20:02 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): <|fim_middle|>...
initial = True dependencies = [ ('phone_numbers', '0001_initial'), ('sims', '0001_initial'), ] operations = [ migrations.AddField( model_name='phonenumber', name='related_sim', field=models.ForeignKey(null=True, on_delete=django.db.models.del...
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
# 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 for the specific language governing permissions and
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options = WeavePing.option() try: opts, args = getopt.getopt(sys.argv[1:], "ho:s:c:tuwqp:i:a:e:n:CE:T:", ["help", "origin=", "server=", "count=", "tcp", "udp", "wrmp", "interval=", "quiet", "tap=", "case", "case_cert_path=", "case_k...
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
print(WeavePing.WeavePing.__doc__) sys.exit(0)
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["quiet"] = True
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["tcp"] = True
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["udp"] = True
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["wrmp"] = True
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["client"] = a
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["server"] = a
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["count"] = a
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["interval"] = a
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["tap"] = a
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["case"] = True
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["case_cert_path"] = a
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["case_key_path"] = a
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
assert False, "unhandled option"
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["origin"] = args[0]
<|file_name|>weave-ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, Inc. # 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 cop...
options["client"] = args[0] options["server"] = args[1]
<|file_name|>carenet.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import * from indivo.views import * from indivo.lib.utils import MethodDispatcher urlpatterns = patterns('', (r'^$', MethodDispatcher({ 'DELETE' : carenet_delete})), (r'^/rename$', MethodDispatcher({ ...
MethodDispatcher({ 'GET' : carenet_app_permissions })), # Reporting Calls (r'^/reports/minimal/procedures/$',
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .image import Image from .product_category import ProductCategory from .supplier import Supplier, PaymentMethod from .product import Product from .product import ProductImage from .enum_values import EnumValues from .related_values import RelatedValues from .cu...
from .purchase_order import PurchaseOrder, PurchaseOrderLine
<|file_name|>test_with_shap.py<|end_file_name|><|fim▁begin|>import numpy as np import xgboost as xgb import pytest<|fim▁hole|> try: import shap except ImportError: shap = None pass pytestmark = pytest.mark.skipif(shap is None, reason="Requires shap package") # Check integration is not broken from xgboost...
<|file_name|>test_with_shap.py<|end_file_name|><|fim▁begin|>import numpy as np import xgboost as xgb import pytest try: import shap except ImportError: shap = None pass pytestmark = pytest.mark.skipif(shap is None, reason="Requires shap package") # Check integration is not broken from xgboost side # Cha...
from sklearn.datasets import fetch_california_housing X, y = fetch_california_housing(return_X_y=True) dtrain = xgb.DMatrix(X, label=y) model = xgb.train({"learning_rate": 0.01}, dtrain, 10) explainer = shap.TreeExplainer(model) shap_values = explainer.shap_values(X) margin = model.predict(d...
<|file_name|>test_with_shap.py<|end_file_name|><|fim▁begin|>import numpy as np import xgboost as xgb import pytest try: import shap except ImportError: shap = None pass pytestmark = pytest.mark.skipif(shap is None, reason="Requires shap package") # Check integration is not broken from xgboost side # Cha...
test_with_shap
<|file_name|>notification.py<|end_file_name|><|fim▁begin|>import requests import logging import redis from requests.packages.urllib3.exceptions import ConnectionError from core.serialisers import json from dss import localsettings # TODO(fergal.moran@gmail.com): refactor these out to # classes to avoid duplicating cons...
headers=HEADERS
<|file_name|>notification.py<|end_file_name|><|fim▁begin|>import requests import logging import redis from requests.packages.urllib3.exceptions import ConnectionError from core.serialisers import json from dss import localsettings # TODO(fergal.moran@gmail.com): refactor these out to # classes to avoid duplicating cons...
try: payload = { 'sessionid': session_id, 'image': image, 'message': message } data = json.dumps(payload) r = requests.post( localsettings.REALTIME_HOST + 'notification', data=data, headers=HEADERS ) ...
<|file_name|>notification.py<|end_file_name|><|fim▁begin|>import requests import logging import redis from requests.packages.urllib3.exceptions import ConnectionError from core.serialisers import json from dss import localsettings # TODO(fergal.moran@gmail.com): refactor these out to # classes to avoid duplicating cons...
return ""
<|file_name|>notification.py<|end_file_name|><|fim▁begin|>import requests import logging import redis from requests.packages.urllib3.exceptions import ConnectionError from core.serialisers import json from dss import localsettings # TODO(fergal.moran@gmail.com): refactor these out to # classes to avoid duplicating cons...
return r.text
<|file_name|>notification.py<|end_file_name|><|fim▁begin|>import requests import logging import redis from requests.packages.urllib3.exceptions import ConnectionError from core.serialisers import json from dss import localsettings # TODO(fergal.moran@gmail.com): refactor these out to # classes to avoid duplicating cons...
post_notification
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|><|fim▁hole|>extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util impor...
"""
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
""" Create the configuration key which will be used to locate the base tiddlywiki file. """ base = 'base_tiddlywiki' if external: base += '_external' if beta: base += '_beta' return base
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
""" Subclass of the standard TiddlyWiki serialization to allow choosing beta or externalized versions of the base empty.html in which the tiddlers will be servered. Also, if the TiddlyWiki is not being downloaded, add the UniversalBackstage by injecting a script tag. """ def list_tiddl...
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
""" Override tiddlers.link so the location in noscript is to /tiddlers. """ http_host, _ = determine_host(self.environ) space_name = determine_space(self.environ, http_host) if space_name: recipe_name = determine_space_recipe(self.environ, space_name) ...
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
beta = external = False release = self.environ.get('tiddlyweb.query', {}).get( 'twrelease', [False])[0] externalize = self.environ.get('tiddlyweb.query', {}).get( 'external', [False])[0] download = self.environ.get('tiddlyweb.query', {}).get( ...
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
base += '_external'
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
base += '_beta'
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
recipe_name = determine_space_recipe(self.environ, space_name) if '/recipes/%s' % recipe_name in tiddlers.link: tiddlers.link = '/tiddlers'
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
tiddlers.link = '/tiddlers'
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
beta = True
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
external = True
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
external = False
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
config_var = build_config_var(beta, external) LOGGER.debug('looking for %s', config_var) base_wiki_file = self.environ.get('tiddlyweb.config', {}).get(config_var, '') if base_wiki_file: LOGGER.debug('using %s as base_tiddlywiki', base_w...
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
LOGGER.debug('using %s as base_tiddlywiki', base_wiki_file) wiki = read_utf8_file(base_wiki_file)
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
wiki = WikiSerialization._get_wiki(self)
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
wiki = wiki.replace(tag, '<script type="text/javascript" ' 'src="/bags/common/tiddlers/backstage.js"></script> %s' % tag)
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
build_config_var
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
list_tiddlers
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>""" extend TiddlyWiki serialization to optionally use beta or externalized releases and add the UniversalBackstage. activated via "twrelease=beta" URL parameter or ServerSettings, see build_config_var """ import logging from tiddlyweb.util import read_u...
_get_wiki
<|file_name|>Parameter.py<|end_file_name|><|fim▁begin|>param = dict( useAIon=True, verbose=False, chargePreXlinkIons=[1, 3], chargePostXlinkIons=[2, 5], basepeakint = 100.0, dynamicrange = 0.001, missedsites = 2, minlength = 4, maxlength = 51, modRes = '', modMass = 0.0, linkermass = 136.10005, ms1tol = di...
C=103.009184,
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
else: self.fail("time out") driver.find_element_by_link_text("Download data").click()
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
def setUp(self): self.driver = webdriver.Firefox() self.driver.implicitly_wait(30) self.base_url = "http://kc.kbtdev.org/" self.verificationErrors = [] self.accept_next_alert = True def test_download_entered_data(self): # Open KoBoCAT. driver = self.drive...
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
self.driver = webdriver.Firefox() self.driver.implicitly_wait(30) self.base_url = "http://kc.kbtdev.org/" self.verificationErrors = [] self.accept_next_alert = True
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
driver = self.driver driver.get(self.base_url + "") # Assert that our form's title is in the list of projects and follow its link. self.assertTrue(self.is_element_present(By.LINK_TEXT, "Selenium test form title.")) driver.find_element_by_link_text("Selenium test form title.").cl...
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
try: self.driver.find_element(by=how, value=what) except NoSuchElementException: return False return True
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
try: self.driver.switch_to_alert() except NoAlertPresentException: return False return True
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
try: alert = self.driver.switch_to_alert() alert_text = alert.text if self.accept_next_alert: alert.accept() else: alert.dismiss() return alert_text finally: self.accept_next_alert = True
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
self.driver.quit() self.assertEqual([], self.verificationErrors)
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
break
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
self.fail("time out")
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
break
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
self.fail("time out")
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
break
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
self.fail("time out")
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
break
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
self.fail("time out")
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
break
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
self.fail("time out")
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
alert.accept()
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
alert.dismiss()
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
unittest.main()
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
setUp
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
test_download_entered_data
<|file_name|>download_entered_data_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, r...
is_element_present