prompt large_stringlengths 72 9.34k | completion large_stringlengths 0 7.61k |
|---|---|
<|file_name|>todo.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
import json
from frappe.model.document import Document
from frappe.utils import get_fullname, parse_addr
exclude_from_linked_with = True
class ToDo(Documen... | on_trash |
<|file_name|>todo.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
import json
from frappe.model.document import Document
from frappe.utils import get_fullname, parse_addr
exclude_from_linked_with = True
class ToDo(Documen... | add_assign_comment |
<|file_name|>todo.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
import json
from frappe.model.document import Document
from frappe.utils import get_fullname, parse_addr
exclude_from_linked_with = True
class ToDo(Documen... | delete_communication_links |
<|file_name|>todo.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
import json
from frappe.model.document import Document
from frappe.utils import get_fullname, parse_addr
exclude_from_linked_with = True
class ToDo(Documen... | update_in_reference |
<|file_name|>todo.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
import json
from frappe.model.document import Document
from frappe.utils import get_fullname, parse_addr
exclude_from_linked_with = True
class ToDo(Documen... | get_owners |
<|file_name|>todo.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
import json
from frappe.model.document import Document
from frappe.utils import get_fullname, parse_addr
exclude_from_linked_with = True
class ToDo(Documen... | on_doctype_update |
<|file_name|>todo.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
import json
from frappe.model.document import Document
from frappe.utils import get_fullname, parse_addr
exclude_from_linked_with = True
class ToDo(Documen... | get_permission_query_conditions |
<|file_name|>todo.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
import json
from frappe.model.document import Document
from frappe.utils import get_fullname, parse_addr
exclude_from_linked_with = True
class ToDo(Documen... | has_permission |
<|file_name|>todo.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
import json
from frappe.model.document import Document
from frappe.utils import get_fullname, parse_addr
exclude_from_linked_with = True
class ToDo(Documen... | new_todo |
<|file_name|>active.py<|end_file_name|><|fim▁begin|>import re
from django import template
from django.core.urlresolvers import NoReverseMatch
from django.core.urlresolvers import reverse
register = template.Library()
@register.simple_tag(takes_context=True)
def active(context, name):
try:
pattern = rev... | return 'active'
return '' |
<|file_name|>active.py<|end_file_name|><|fim▁begin|>import re
from django import template
from django.core.urlresolvers import NoReverseMatch
from django.core.urlresolvers import reverse
register = template.Library()
@register.simple_tag(takes_context=True)
def active(context, name):
<|fim_middle|>
<|fim▁end|... | try:
pattern = reverse(name)
except NoReverseMatch:
return ''
if re.match(pattern, context['request'].path):
return 'active'
return '' |
<|file_name|>active.py<|end_file_name|><|fim▁begin|>import re
from django import template
from django.core.urlresolvers import NoReverseMatch
from django.core.urlresolvers import reverse
register = template.Library()
@register.simple_tag(takes_context=True)
def active(context, name):
try:
pattern = rev... | return 'active' |
<|file_name|>active.py<|end_file_name|><|fim▁begin|>import re
from django import template
from django.core.urlresolvers import NoReverseMatch
from django.core.urlresolvers import reverse
register = template.Library()
@register.simple_tag(takes_context=True)
def <|fim_middle|>(context, name):
try:
patte... | active |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
from django.http import HttpResponse
from django.template import RequestContext, loader
from django.views.decorators.csrf import csrf_exempt
import django.shortcuts
from wlokalu.api import presence
#-------------------------------------------------... | logger = getLogger(__name__)
|
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
from django.http import HttpResponse
from django.template import RequestContext, loader
from django.views.decorators.csrf import csrf_exempt
import django.shortcuts
from wlokalu.api import presence
#-------------------------------------------------... | template = loader.get_template("list.html")
from django.core.urlresolvers import reverse
from forms import PresenceForm
form = PresenceForm()
if nick is not None:
form.initial['nick'] = nick
form_target = reverse(list, kwargs = {'nick': nick})
else:
form_target = reverse(list)
if request.POS... |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
from django.http import HttpResponse
from django.template import RequestContext, loader
from django.views.decorators.csrf import csrf_exempt
import django.shortcuts
from wlokalu.api import presence
#-------------------------------------------------... | form.initial['nick'] = nick
form_target = reverse(list, kwargs = {'nick': nick}) |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
from django.http import HttpResponse
from django.template import RequestContext, loader
from django.views.decorators.csrf import csrf_exempt
import django.shortcuts
from wlokalu.api import presence
#-------------------------------------------------... | form_target = reverse(list) |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
from django.http import HttpResponse
from django.template import RequestContext, loader
from django.views.decorators.csrf import csrf_exempt
import django.shortcuts
from wlokalu.api import presence
#-------------------------------------------------... | context = {
'address': request.META['REMOTE_ADDR'],
'uri': request.META['REQUEST_URI'],
}
if 'enter' in request.POST:
presence.person_entered(request.POST['nick'], context)
else: # 'leave' in request.POST
presence.person_left(request.POST['nick'], context)
# tell the browser ... |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
from django.http import HttpResponse
from django.template import RequestContext, loader
from django.views.decorators.csrf import csrf_exempt
import django.shortcuts
from wlokalu.api import presence
#-------------------------------------------------... | presence.person_entered(request.POST['nick'], context) |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
from django.http import HttpResponse
from django.template import RequestContext, loader
from django.views.decorators.csrf import csrf_exempt
import django.shortcuts
from wlokalu.api import presence
#-------------------------------------------------... | presence.person_left(request.POST['nick'], context) |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
from django.http import HttpResponse
from django.template import RequestContext, loader
from django.views.decorators.csrf import csrf_exempt
import django.shortcuts
from wlokalu.api import presence
#-------------------------------------------------... | list |
<|file_name|>testtermopi.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
"""
title : testtermopi.py
description : This program runs the termopi.py <|fim▁hole|> : Displays the status of the resources (cpu load and memory usage) consumed by a Raspberry Pi
computer and the... | |
<|file_name|>network_cls.py<|end_file_name|><|fim▁begin|>import tensorflow as tf
from ocnn import *
# octree-based resnet55
def network_resnet(octree, flags, training=True, reuse=None):
depth = flags.depth
channels = [2048, 1024, 512, 256, 128, 64, 32, 16, 8]
with tf.variable_scope("ocnn_resnet", reuse=reuse):
... | data, _ = octree_max_pool(data, octree, d)
|
<|file_name|>network_cls.py<|end_file_name|><|fim▁begin|>import tensorflow as tf
from ocnn import *
# octree-based resnet55
def network_resnet(octree, flags, training=True, reuse=None):
<|fim_middle|>
# the ocnn in the paper
def network_ocnn(octree, flags, training=True, reuse=None):
depth = flags.depth
chan... | depth = flags.depth
channels = [2048, 1024, 512, 256, 128, 64, 32, 16, 8]
with tf.variable_scope("ocnn_resnet", reuse=reuse):
data = octree_property(octree, property_name="feature", dtype=tf.float32,
depth=depth, channel=flags.channel)
data = tf.reshape(data, [1, flags.channel,... |
<|file_name|>network_cls.py<|end_file_name|><|fim▁begin|>import tensorflow as tf
from ocnn import *
# octree-based resnet55
def network_resnet(octree, flags, training=True, reuse=None):
depth = flags.depth
channels = [2048, 1024, 512, 256, 128, 64, 32, 16, 8]
with tf.variable_scope("ocnn_resnet", reuse=reuse):
... | depth = flags.depth
channels = [512, 256, 128, 64, 32, 16, 8, 4, 2]
with tf.variable_scope("ocnn", reuse=reuse):
data = octree_property(octree, property_name="feature", dtype=tf.float32,
depth=depth, channel=flags.channel)
data = tf.reshape(data, [1, flags.channel, -1, 1])
... |
<|file_name|>network_cls.py<|end_file_name|><|fim▁begin|>import tensorflow as tf
from ocnn import *
# octree-based resnet55
def network_resnet(octree, flags, training=True, reuse=None):
depth = flags.depth
channels = [2048, 1024, 512, 256, 128, 64, 32, 16, 8]
with tf.variable_scope("ocnn_resnet", reuse=reuse):
... | if flags.name.lower() == 'ocnn':
return network_ocnn(octree, flags, training, reuse)
elif flags.name.lower() == 'resnet':
return network_resnet(octree, flags, training, reuse)
else:
print('Error, no network: ' + flags.name) |
<|file_name|>network_cls.py<|end_file_name|><|fim▁begin|>import tensorflow as tf
from ocnn import *
# octree-based resnet55
def network_resnet(octree, flags, training=True, reuse=None):
depth = flags.depth
channels = [2048, 1024, 512, 256, 128, 64, 32, 16, 8]
with tf.variable_scope("ocnn_resnet", reuse=reuse):
... | data = tf.layers.dropout(data, rate=0.5, training=training) |
<|file_name|>network_cls.py<|end_file_name|><|fim▁begin|>import tensorflow as tf
from ocnn import *
# octree-based resnet55
def network_resnet(octree, flags, training=True, reuse=None):
depth = flags.depth
channels = [2048, 1024, 512, 256, 128, 64, 32, 16, 8]
with tf.variable_scope("ocnn_resnet", reuse=reuse):
... | return network_ocnn(octree, flags, training, reuse) |
<|file_name|>network_cls.py<|end_file_name|><|fim▁begin|>import tensorflow as tf
from ocnn import *
# octree-based resnet55
def network_resnet(octree, flags, training=True, reuse=None):
depth = flags.depth
channels = [2048, 1024, 512, 256, 128, 64, 32, 16, 8]
with tf.variable_scope("ocnn_resnet", reuse=reuse):
... | return network_resnet(octree, flags, training, reuse) |
<|file_name|>network_cls.py<|end_file_name|><|fim▁begin|>import tensorflow as tf
from ocnn import *
# octree-based resnet55
def network_resnet(octree, flags, training=True, reuse=None):
depth = flags.depth
channels = [2048, 1024, 512, 256, 128, 64, 32, 16, 8]
with tf.variable_scope("ocnn_resnet", reuse=reuse):
... | print('Error, no network: ' + flags.name) |
<|file_name|>network_cls.py<|end_file_name|><|fim▁begin|>import tensorflow as tf
from ocnn import *
# octree-based resnet55
def <|fim_middle|>(octree, flags, training=True, reuse=None):
depth = flags.depth
channels = [2048, 1024, 512, 256, 128, 64, 32, 16, 8]
with tf.variable_scope("ocnn_resnet", reuse=reuse):
... | network_resnet |
<|file_name|>network_cls.py<|end_file_name|><|fim▁begin|>import tensorflow as tf
from ocnn import *
# octree-based resnet55
def network_resnet(octree, flags, training=True, reuse=None):
depth = flags.depth
channels = [2048, 1024, 512, 256, 128, 64, 32, 16, 8]
with tf.variable_scope("ocnn_resnet", reuse=reuse):
... | network_ocnn |
<|file_name|>network_cls.py<|end_file_name|><|fim▁begin|>import tensorflow as tf
from ocnn import *
# octree-based resnet55
def network_resnet(octree, flags, training=True, reuse=None):
depth = flags.depth
channels = [2048, 1024, 512, 256, 128, 64, 32, 16, 8]
with tf.variable_scope("ocnn_resnet", reuse=reuse):
... | cls_network |
<|file_name|>test_cli.py<|end_file_name|><|fim▁begin|>from pathlib import Path
from inxs.cli import main as _main
from tests import equal_documents
def main(*args):
_args = ()
for arg in args:
if isinstance(arg, Path):
_args += (str(arg),)
else:
_args += (arg,)
_m... | assert equal_documents(datadir / "mods_to_tei.xml", datadir / "mods_to_tei_exp.xml") |
<|file_name|>test_cli.py<|end_file_name|><|fim▁begin|>from pathlib import Path
from inxs.cli import main as _main
from tests import equal_documents
def main(*args):
<|fim_middle|>
# TODO case-study with this use-case
def test_mods_to_tei(datadir):
main("--inplace", datadir / "mods_to_tei.py", datadir / "... | _args = ()
for arg in args:
if isinstance(arg, Path):
_args += (str(arg),)
else:
_args += (arg,)
_main(_args) |
<|file_name|>test_cli.py<|end_file_name|><|fim▁begin|>from pathlib import Path
from inxs.cli import main as _main
from tests import equal_documents
def main(*args):
_args = ()
for arg in args:
if isinstance(arg, Path):
_args += (str(arg),)
else:
_args += (arg,)
_m... | main("--inplace", datadir / "mods_to_tei.py", datadir / "mods_to_tei.xml")
assert equal_documents(datadir / "mods_to_tei.xml", datadir / "mods_to_tei_exp.xml") |
<|file_name|>test_cli.py<|end_file_name|><|fim▁begin|>from pathlib import Path
from inxs.cli import main as _main
from tests import equal_documents
def main(*args):
_args = ()
for arg in args:
if isinstance(arg, Path):
<|fim_middle|>
else:
_args += (arg,)... | _args += (str(arg),) |
<|file_name|>test_cli.py<|end_file_name|><|fim▁begin|>from pathlib import Path
from inxs.cli import main as _main
from tests import equal_documents
def main(*args):
_args = ()
for arg in args:
if isinstance(arg, Path):
_args += (str(arg),)
else:
<|fim_midd... | _args += (arg,) |
<|file_name|>test_cli.py<|end_file_name|><|fim▁begin|>from pathlib import Path
from inxs.cli import main as _main
from tests import equal_documents
def <|fim_middle|>(*args):
_args = ()
for arg in args:
if isinstance(arg, Path):
_args += (str(arg),)
else:
_args += (ar... | main |
<|file_name|>test_cli.py<|end_file_name|><|fim▁begin|>from pathlib import Path
from inxs.cli import main as _main
from tests import equal_documents
def main(*args):
_args = ()
for arg in args:
if isinstance(arg, Path):
_args += (str(arg),)
else:
_args += (arg,)
_m... | test_mods_to_tei |
<|file_name|>test_clock_resolution.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Created on Wed Sep 09 13:04:53 2015
* If TimerTool.exe is running, kill the process.
* If input parameter is given, start TimerTool and set clock resolution
Starts TimerTool.exe and sets the clock resolution to argv[0]... | (np.mean(np.diff(td1))*1000, np.median(np.diff(td1))*1000,np.std(np.diff(td1))*1000,
|
<|file_name|>test_clock_resolution.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Created on Wed Sep 09 13:04:53 2015
* If TimerTool.exe is running, kill the process.
* If input parameter is given, start TimerTool and set clock resolution
Starts TimerTool.exe and sets the clock resolution to argv[0]... | my_path = os.path.join('C:',os.sep,'Share','sync_clocks')
os.chdir(my_path)
# Initial timestamps
t1 = time.clock()
t2 = time.time()
t3 = datetime.datetime.now()
td1 = []
td2 = []
td3 = []
for i in xrange(100):
td1.append(time.clock()-t1)
td2... |
<|file_name|>test_clock_resolution.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Created on Wed Sep 09 13:04:53 2015
* If TimerTool.exe is running, kill the process.
* If input parameter is given, start TimerTool and set clock resolution
Starts TimerTool.exe and sets the clock resolution to argv[0]... | main() |
<|file_name|>test_clock_resolution.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Created on Wed Sep 09 13:04:53 2015
* If TimerTool.exe is running, kill the process.
* If input parameter is given, start TimerTool and set clock resolution
Starts TimerTool.exe and sets the clock resolution to argv[0]... | main |
<|file_name|>cleanfilecache.py<|end_file_name|><|fim▁begin|>import os
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings<|fim▁hole|>from cacheops.simple import file_cache, FILE_CACHE_DIR
class Command(BaseCommand):
help = 'Clean filebased cache'
def handle(sel... | from django.core.exceptions import ImproperlyConfigured
|
<|file_name|>cleanfilecache.py<|end_file_name|><|fim▁begin|>import os
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from cacheops.simple import file_cache, FILE_CACHE_DIR
class Command(BaseCommand):
<|fi... | help = 'Clean filebased cache'
def handle(self, **options):
os.system('find %s -type f \! -iname "\." -mmin +0 -delete' % FILE_CACHE_DIR) |
<|file_name|>cleanfilecache.py<|end_file_name|><|fim▁begin|>import os
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from cacheops.simple import file_cache, FILE_CACHE_DIR
class Command(BaseCommand):
help... | os.system('find %s -type f \! -iname "\." -mmin +0 -delete' % FILE_CACHE_DIR) |
<|file_name|>cleanfilecache.py<|end_file_name|><|fim▁begin|>import os
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from cacheops.simple import file_cache, FILE_CACHE_DIR
class Command(BaseCommand):
help... | handle |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | self._canned_results = {} |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | def __init__(self):
super(MockTestResultsFetcher, self).__init__()
self._canned_results = {}
self._canned_retry_summary_json = {}
self._webdriver_results = {}
self.fetched_builds = []
self.fetched_webdriver_builds = []
self._layout_test_step_name = 'blink_web_... |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | super(MockTestResultsFetcher, self).__init__()
self._canned_results = {}
self._canned_retry_summary_json = {}
self._webdriver_results = {}
self.fetched_builds = []
self.fetched_webdriver_builds = []
self._layout_test_step_name = 'blink_web_tests (with patch)' |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | step_name = step_name or self.get_layout_test_step_name(build)
step = BuilderStep(build=build, step_name=step_name)
self._canned_results[step] = results |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | step_name = step_name or self.get_layout_test_step_name(build)
step = BuilderStep(build=build, step_name=step_name)
self.fetched_builds.append(step)
return self._canned_results.get(step) |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | self._canned_results[build.build_id] = results |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | rv = []
for build in builds:
results = self._canned_results.get(build.build_id)
if results:
rv.extend(results)
return rv |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | self._webdriver_results[(build, m)] = results |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | self.fetched_webdriver_builds.append((build, m))
return self._webdriver_results.get((build, m)) |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | self._canned_retry_summary_json[build] = content |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | return self._canned_retry_summary_json.get(build) |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | self._layout_test_step_name = name |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | return self._layout_test_step_name |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | rv.extend(results) |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | __init__ |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | set_results |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | fetch_results |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | set_results_to_resultdb |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | fetch_results_from_resultdb |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | set_webdriver_test_results |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | fetch_webdriver_test_results |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | set_retry_sumary_json |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | fetch_retry_summary_json |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | set_layout_test_step_name |
<|file_name|>results_fetcher_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must reta... | get_layout_test_step_name |
<|file_name|>global_defaults.py<|end_file_name|><|fim▁begin|>__author__ = 'brianoneill'
from log_calls import log_calls
global_settings = dict(
log_call_numbers=True,
log_exit=False,
log_retval=True,
)<|fim▁hole|><|fim▁end|> | log_calls.set_defaults(global_settings, args_sep=' $ ') |
<|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 ... | |
<|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(input_value, value_type):
return True
if isinstance(input_value, SEQUENCE_TYPES):
for value in input_value:
if not isinstance(value, value_type):
return False
return True
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 ... | if not isinstance(input_value, SEQUENCE_TYPES):
return True
try: # object couldn't have a __len__ method
if len(input_value) == 1:
return True
except Exception:
pass
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 check_type(input_value, (float, bool)):
return False
if str is bytes: # Python 2, check for long too
if check_type(input_value, (int, long)):
return True
else: # Python 3, int only
if check_type(input_value, int):
return True
sequence = True # indi... |
<|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 check_type(input_value, 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 ... | if validate_generic_single_value(input_value): # valid only if a single value or a sequence with a single element
if isinstance(input_value, SEQUENCE_TYPES):
input_value = input_value[0]
if isinstance(input_value, bool):
if input_value:
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 ... | if not isinstance(input_value, SEQUENCE_TYPES):
sequence = False
input_value = [input_value]
else:
sequence = True # indicates if a sequence must be returned
valid_values = []
changed = False
for element in input_value:
if isinstance(element, STRING_TYPES): # tries... |
<|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 ... | for value in input_value:
if not isinstance(value, value_type):
return False
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 ... | 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 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 check_type(input_value, (int, long)):
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 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 ... | if check_type(input_value, int):
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 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 ... | 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 ... | valid_values.append(int(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 ... | 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 ... | if isinstance(input_value, SEQUENCE_TYPES):
input_value = input_value[0]
if isinstance(input_value, bool):
if input_value:
return 'TRUE'
else:
return 'FALSE'
if isinstance(input_value, STRING_TYPES):
if input_value.l... |
<|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 ... | input_value = input_value[0] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.