function stringlengths 11 56k | repo_name stringlengths 5 60 | features list |
|---|---|---|
def test_update_manifest_properties(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
self.import_image(containerregistry_endpoint, HELLO_WORLD, ["{}:{}".format(repo, tag)])
client = self.create_registry_client(containerregistry... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_update_manifest_properties_kwargs(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
self.import_image(containerregistry_endpoint, HELLO_WORLD, ["{}:{}".format(repo, tag)])
client = self.create_registry_client(containerr... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_get_tag_properties(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
self.import_image(containerregistry_endpoint, HELLO_WORLD, ["{}:{}".format(repo, tag)])
client = self.create_registry_client(containerregistry_endpoin... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_get_tag_properties_does_not_exist(self, containerregistry_endpoint):
client = self.create_registry_client(containerregistry_endpoint)
with pytest.raises(ResourceNotFoundError):
client.get_tag_properties("Nonexistent", "Nonexistent") | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_update_tag_properties(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
self.import_image(containerregistry_endpoint, HELLO_WORLD, ["{}:{}".format(repo, tag)])
client = self.create_registry_client(containerregistry_endp... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_update_tag_properties_kwargs(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
self.import_image(containerregistry_endpoint, HELLO_WORLD, ["{}:{}".format(repo, tag)])
client = self.create_registry_client(containerregist... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_list_tag_properties(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
tags = ["{}:{}".format(repo, tag + str(i)) for i in range(4)]
self.import_image(containerregistry_endpoint, HELLO_WORLD, tags)
client = self.... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_list_tag_properties_order_descending(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
tags = ["{}:{}".format(repo, tag + str(i)) for i in range(4)]
self.import_image(containerregistry_endpoint, HELLO_WORLD, tags)
... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_list_tag_properties_order_ascending(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
tags = ["{}:{}".format(repo, tag + str(i)) for i in range(4)]
self.import_image(containerregistry_endpoint, HELLO_WORLD, tags)
... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_delete_tag(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
tags = ["{}:{}".format(repo, tag + str(i)) for i in range(4)]
self.import_image(containerregistry_endpoint, HELLO_WORLD, tags)
client = self.create_re... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_delete_tag_does_not_exist(self, containerregistry_endpoint):
client = self.create_registry_client(containerregistry_endpoint)
client.delete_tag(DOES_NOT_EXIST, DOES_NOT_EXIST) | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_delete_manifest(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
self.import_image(containerregistry_endpoint, HELLO_WORLD, ["{}:{}".format(repo, tag)])
client = self.create_registry_client(containerregistry_endpoint)
... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_delete_manifest_does_not_exist(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
self.import_image(containerregistry_endpoint, HELLO_WORLD, ["{}:{}".format(repo, tag)])
client = self.create_registry_client(containerregi... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_expiration_time_parsing(self, containerregistry_endpoint):
from azure.containerregistry._authentication_policy import ContainerRegistryChallengePolicy
client = self.create_registry_client(containerregistry_endpoint)
for repo in client.list_repository_names():
pass
... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_construct_container_registry_client(self, containerregistry_endpoint):
authority = get_authority(containerregistry_endpoint)
credential = self.get_credential(authority)
client = ContainerRegistryClient(endpoint=containerregistry_endpoint, credential=credential, audience="https://micros... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_set_api_version(self, containerregistry_endpoint):
client = self.create_registry_client(containerregistry_endpoint)
assert client._client._config.api_version == "2021-07-01" | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {}) | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def get_long_running_output(pipeline_response):
deserialized = self._deserialize('SecurityRule', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def list(
self,
resource_group_name: str,
network_security_group_name: str,
**kwargs: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
url = self.list.metadat... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A name... | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def color(self, val):
self["color"] = val | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def colorsrc(self):
"""
Sets the source reference on Chart Studio Cloud for color . | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def colorsrc(self, val):
self["colorsrc"] = val | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
prefer... | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def family(self, val):
self["family"] = val | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def familysrc(self):
"""
Sets the source reference on Chart Studio Cloud for family . | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def familysrc(self, val):
self["familysrc"] = val | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def size(self):
"""
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
int|float|numpy.ndarray
"""
return self["size"... | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def size(self, val):
self["size"] = val | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def sizesrc(self):
"""
Sets the source reference on Chart Studio Cloud for size . | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def sizesrc(self, val):
self["sizesrc"] = val | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def _prop_descriptions(self):
return """\
color
colorsrc
Sets the source reference on Chart Studio Cloud for
color .
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
... | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def time_formatter(seconds):
return "%d:%.2d:%.2d" % (seconds // 3600,
seconds % 3600 // 60,
seconds % 60) | ultmaster/eoj3 | [
161,
29,
161,
27,
1489228488
] |
def test_func(self):
if self.privileged:
return True
return self.contest.access_level > 0 | ultmaster/eoj3 | [
161,
29,
161,
27,
1489228488
] |
def get_context_data(self, **kwargs):
data = super(ContestProblemDetail, self).get_context_data(**kwargs)
data['contest_problem'] = get_object_or_404(ContestProblem,
identifier=self.kwargs.get('pid'),
contest=self.co... | ultmaster/eoj3 | [
161,
29,
161,
27,
1489228488
] |
def get(self, request, *args, **kwargs):
if not self.contest.pdf_statement:
raise Http404
return HttpResponse(self.contest.pdf_statement.read(), content_type="application/pdf") | ultmaster/eoj3 | [
161,
29,
161,
27,
1489228488
] |
def post(self, request, cid):
if not request.user.is_authenticated:
messages.error(request, "请先登录。")
else:
invitation_code = request.POST.get('code', '')
try:
invitation = ContestInvitation.objects.get(code=invitation_code)
add_participant_with_invitation(cid, invitation.pk, re... | ultmaster/eoj3 | [
161,
29,
161,
27,
1489228488
] |
def post(self, request, cid):
if not request.user.is_authenticated:
messages.error(request, "请先登录。")
else:
contest = get_object_or_404(Contest, pk=cid)
if contest.access_level == 30 and contest.status == -1:
with transaction.atomic():
if not contest.contestparticipant_set.fil... | ultmaster/eoj3 | [
161,
29,
161,
27,
1489228488
] |
def get_queryset(self):
user = self.request.user if self.request.user.is_authenticated else None
return Contest.objects.get_status_list(show_all=is_admin_or_root(self.request.user), filter_user=user,
contest_type=0) | ultmaster/eoj3 | [
161,
29,
161,
27,
1489228488
] |
def get_queryset(self):
user = self.request.user if self.request.user.is_authenticated else None
return Contest.objects.get_status_list(show_all=is_admin_or_root(self.request.user), filter_user=user,
sorting_by_id=True, contest_type=1) | ultmaster/eoj3 | [
161,
29,
161,
27,
1489228488
] |
def dispatch(self, request, *args, **kwargs):
q = request.GET.get('q', '')
if request.GET.get('full'):
self.full = True
elif q.isdigit():
self.user = get_object_or_404(User, pk=q)
self.full = False
elif request.user.is_authenticated:
self.user = request.user
self.full = Fal... | ultmaster/eoj3 | [
161,
29,
161,
27,
1489228488
] |
def get_context_data(self, **kwargs): # pylint: disable=arguments-differ
data = super().get_context_data(**kwargs)
data['full'] = self.full
if not self.full:
data['query_user'] = self.user
data['max_rating'], data['min_rating'] = 2000, 1000
data['rating_list'] = ContestUserRating.objects.... | ultmaster/eoj3 | [
161,
29,
161,
27,
1489228488
] |
def test_func(self):
return self.vp_available | ultmaster/eoj3 | [
161,
29,
161,
27,
1489228488
] |
def __init__(self, name):
self.name = name
self.connections_made = 0
self.data = []
self.connection_errors = []
self.expected_received = 0
self.expected = 0
self.connected = asyncio.Future()
self.closed = asyncio.Future() | madedotcom/photon-pump | [
49,
10,
49,
30,
1493299344
] |
def data_received(self, data):
print("%s: data received" % self.name)
self.data.append(data)
if self.expectation and not self.expectation.done():
self.expected_received += len(data)
if self.expected_received >= self.expected:
self.expectation.set_result(N... | madedotcom/photon-pump | [
49,
10,
49,
30,
1493299344
] |
def expect(self, count):
self.expected_received = 0
self.expected = count
self.expectation = asyncio.Future()
return self.expectation | madedotcom/photon-pump | [
49,
10,
49,
30,
1493299344
] |
def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
url = self.list_monitor... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
error = self._deserialize.... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def list_by_subscription(
self,
**kwargs # type: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
url = self.list_by_subs... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
error = self._deserialize.... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def list_by_resource_group(
self,
resource_group_name, # type: str
**kwargs # type: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
url = self.list_by_reso... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
error = self._deserialize.... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def get(
self,
resource_group_name, # type: str
monitor_name, # type: str
**kwargs # type: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def _create_initial(
self,
resource_group_name, # type: str
monitor_name, # type: str
body=None, # type: Optional["_models.LogzMonitorResource"]
**kwargs # type: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def begin_create(
self,
resource_group_name, # type: str
monitor_name, # type: str
body=None, # type: Optional["_models.LogzMonitorResource"]
**kwargs # type: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def get_long_running_output(pipeline_response):
deserialized = self._deserialize('LogzMonitorResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def update(
self,
resource_group_name, # type: str
monitor_name, # type: str
body=None, # type: Optional["_models.LogzMonitorResourceUpdateParameters"]
**kwargs # type: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def _delete_initial(
self,
resource_group_name, # type: str
monitor_name, # type: str
**kwargs # type: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def begin_delete(
self,
resource_group_name, # type: str
monitor_name, # type: str
**kwargs # type: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {}) | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def list_user_roles(
self,
resource_group_name, # type: str
monitor_name, # type: str
body=None, # type: Optional["_models.UserRoleRequest"]
**kwargs # type: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = self._serialize.header("accept", accept, '... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
error = self._deserialize.... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(self, dm, config, name):
self.omConf = {}
for k in ['parentDevice', 'transform']:
if k in config:
self.omConf[k] = config.pop(k)
DAQGeneric.__init__(self, dm, config, name)
OptomechDevice.__init__(self, dm, config, name) | acq4/acq4 | [
51,
39,
51,
31,
1385049034
] |
def __init__(
self,
credential: "AsyncTokenCredential",
**kwargs: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def _configure(
self,
**kwargs: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def build_list_request(
**kwargs: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def list(
self,
**kwargs: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def prepare_request(next_link=None):
if not next_link: | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def extract_data(pipeline_response):
deserialized = self._deserialize("ComputeOperationListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return None, iter(list_of_elem) | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {}) | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def get_long_running_output(pipeline_response):
deserialized = self._deserialize('SecurityRule', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def list(
self,
resource_group_name: str,
network_security_group_name: str,
**kwargs: Any | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
url = self.list.metadat... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_basic(self):
test_file = os.path.join(sandbox, "test_SourceClip.aaf")
f = aaf.open(None, 't')
source_mob = f.create.SourceMob()
f.storage.add_mob(source_mob)
slot = source_mob.add_nil_ref(1, 100, "picture", "25/1")
source_ref = aaf.util.SourceRef()
so... | markreidvfx/pyaaf | [
46,
8,
46,
14,
1377887118
] |
def fuzzy_time(time):
"""Formats a `datetime.time` object relative to the current time."""
dt = time_to_date(time)
return fuzzy_date(dt) | tjcsl/ion | [
89,
57,
89,
90,
1408078781
] |
def time_to_date(time):
"""Returns a `datetime.datetime` object from a `datetime.time` object using the current date."""
return datetime.combine(timezone.localdate(), time) | tjcsl/ion | [
89,
57,
89,
90,
1408078781
] |
def __init__(self, endpoint, pub_queue):
from glob import glob
from laniakea.localconfig import LocalConfig
from laniakea.msgstream import keyfile_read_verify_key
self._socket = None
self._ctx = zmq.Context.instance()
self._pub_queue = pub_queue
self._endpoint =... | tanglu-org/laniakea | [
20,
8,
20,
1,
1465596960
] |
def my_finish(self):
if not self.wfile.closed:
try:
self.wfile.flush()
except socket.error:
# A final socket error may have occurred here, such as
# the local error ECONNABORTED.
pass
try:
self.wfile.close()
self.rfile.c... | tidalf/plugin.audio.qobuz | [
15,
8,
15,
17,
1325448354
] |
def is_empty(obj):
if obj is None:
return True
if isinstance(obj, basestring):
if obj == '':
return True
return False | tidalf/plugin.audio.qobuz | [
15,
8,
15,
17,
1325448354
] |
def is_service_enable():
return config.app.registry.get('enable_scan_feature', to='bool') | tidalf/plugin.audio.qobuz | [
15,
8,
15,
17,
1325448354
] |
def shutdown_request():
if monitor.abortRequested:
shutdown_server()
return None | tidalf/plugin.audio.qobuz | [
15,
8,
15,
17,
1325448354
] |
def __init__(self, port=33574):
threading.Thread.__init__(self)
self.daemon = True
self.port = port
self.running = False
self.threaded = True
self.processes = 2
self.alive = True | tidalf/plugin.audio.qobuz | [
15,
8,
15,
17,
1325448354
] |
def run(self):
while self.alive:
if not is_authentication_set():
gui.notify_warn('Authentication not set',
'You need to enter credentials')
elif not user.logged:
if not api.login(
username=qobuzApp.re... | tidalf/plugin.audio.qobuz | [
15,
8,
15,
17,
1325448354
] |
def __init__(self, dbfile, page_rows=100):
self.dbfile = dbfile
self.page_rows = page_rows
self.conn = sqlite3.connect(self.dbfile)
self.conn.row_factory = sqlite3.Row
cursor = self.conn.cursor()
cursor.execute(
"CREATE TABLE IF NOT EXISTS messages "
... | ant9000/websup | [
2,
1,
2,
1,
1421744113
] |
def count(self):
cursor = self.conn.cursor()
n = cursor.execute("SELECT COUNT(*) FROM messages").fetchone()[0]
return n | ant9000/websup | [
2,
1,
2,
1,
1421744113
] |
def empty_reduce(rank, device_list, output, source=0):
pass | acopar/crow | [
6,
3,
6,
1,
1488876595
] |
def __init__(self, text_to_speech):
self.is_speaking = False
self.text_to_speech = text_to_speech | rdmilligan/SaltwashAR | [
146,
59,
146,
4,
1447704189
] |
def __init__(self):
self.__mapping_starts = []
super(Composer, self).__init__() | gitterHQ/ansible | [
1,
3,
1,
1,
1394046789
] |
def __init__(self, params):
super(Windows2012ServerMemory, self).__init__(params) | SekoiaLab/Fastir_Collector | [
486,
136,
486,
11,
1445591906
] |
def csv_all_modules_opened_files(self):
super(Windows2012ServerMemory, self)._csv_all_modules_opened_files() | SekoiaLab/Fastir_Collector | [
486,
136,
486,
11,
1445591906
] |
def test_flip_bits_in_single_byte():
for i in range(0, 256):
assert bit_manipulators.flip_bits_in_single_byte(i) == (255 - i) | guardicore/monkey | [
6098,
725,
6098,
196,
1440919371
] |
def __init__(self, lock_name):
message = 'Failed to acquire lock: {}'.format(lock_name)
super(ConcurrentModificationError, self).__init__(self, message) | sio2project/filetracker | [
7,
12,
7,
1,
1346586491
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.