_id stringlengths 2 7 | title stringlengths 1 88 | partition stringclasses 3
values | text stringlengths 75 19.8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q267300 | add_new_message | test | def add_new_message():
"""
Add new java messages to ignore from user text file. It first reads in the new java ignored messages
from the user text file and generate a dict structure to out of the new java ignored messages. This
is achieved by function extract_message_to_dict. Next, new java messages ... | python | {
"resource": ""
} |
q267301 | update_message_dict | test | def update_message_dict(message_dict,action):
"""
Update the g_ok_java_messages dict structure by
1. add the new java ignored messages stored in message_dict if action == 1
2. remove the java ignored messages stired in message_dict if action == 2.
Parameters
----------
message_dict : Pyth... | python | {
"resource": ""
} |
q267302 | extract_message_to_dict | test | def extract_message_to_dict(filename):
"""
Read in a text file that java messages to be ignored and generate a dictionary structure out of
it with key and value pairs. The keys are test names and the values are lists of java message
strings associated with that test name where we are either going to ad... | python | {
"resource": ""
} |
q267303 | save_dict | test | def save_dict():
"""
Save the ignored java message dict stored in g_ok_java_messages into a pickle file for future use.
:return: none
"""
global g_ok_java_messages
global g_save_java_message_filename
global g_dict_changed
if g_dict_changed:
with open(g_save_java_message_filenam... | python | {
"resource": ""
} |
q267304 | print_dict | test | def print_dict():
"""
Write the java ignored messages in g_ok_java_messages into a text file for humans to read.
:return: none
"""
global g_ok_java_messages
global g_java_messages_to_ignore_text_filename
allKeys = sorted(g_ok_java_messages.keys())
with open(g_java_messages_to_ignore_t... | python | {
"resource": ""
} |
q267305 | parse_args | test | def parse_args(argv):
"""
Parse user inputs and set the corresponing global variables to perform the
necessary tasks.
Parameters
----------
argv : string array
contains flags and input options from users
:return:
"""
global g_new_messages_to_exclude
global g_old_messag... | python | {
"resource": ""
} |
q267306 | usage | test | def usage():
"""
Illustrate what the various input flags are and the options should be.
:return: none
"""
global g_script_name # name of the script being run.
print("")
print("Usage: " + g_script_name + " [...options...]")
print("")
print(" --help print out this help menu a... | python | {
"resource": ""
} |
q267307 | locate_files | test | def locate_files(root_dir):
"""Find all python files in the given directory and all subfolders."""
all_files = []
root_dir = os.path.abspath(root_dir)
for dir_name, subdirs, files in os.walk(root_dir):
for f in files:
if f.endswith(".py"):
all_files.append(os.path.joi... | python | {
"resource": ""
} |
q267308 | find_magic_in_file | test | def find_magic_in_file(filename):
"""
Search the file for any magic incantations.
:param filename: file to search
:returns: a tuple containing the spell and then maybe some extra words (or None if no magic present)
"""
with open(filename, "rt", encoding="utf-8") as f:
for line in f:
... | python | {
"resource": ""
} |
q267309 | main | test | def main():
"""Executed when script is run as-is."""
# magic_files = {}
for filename in locate_files(ROOT_DIR):
print("Processing %s" % filename)
with open(filename, "rt") as f:
tokens = list(tokenize.generate_tokens(f.readline))
text1 = tokenize.untokenize(tokens)
... | python | {
"resource": ""
} |
q267310 | H2OMojoPipeline.transform | test | def transform(self, data, allow_timestamps=False):
"""
Transform H2OFrame using a MOJO Pipeline.
:param data: Frame to be transformed.
:param allow_timestamps: Allows datetime columns to be used directly with MOJO pipelines. It is recommended
to parse your datetime columns as St... | python | {
"resource": ""
} |
q267311 | summarizeFailedRuns | test | def summarizeFailedRuns():
"""
This function will look at the local directory and pick out files that have the correct start name and
summarize the results into one giant dict.
:return: None
"""
global g_summary_dict_all
onlyFiles = [x for x in listdir(g_test_root_dir) if isfile(join(g_tes... | python | {
"resource": ""
} |
q267312 | extractPrintSaveIntermittens | test | def extractPrintSaveIntermittens():
"""
This function will print out the intermittents onto the screen for casual viewing. It will also print out
where the giant summary dictionary is going to be stored.
:return: None
"""
# extract intermittents from collected failed tests
global g_summary... | python | {
"resource": ""
} |
q267313 | H2OBinomialModelMetrics.plot | test | def plot(self, type="roc", server=False):
"""
Produce the desired metric plot.
:param type: the type of metric plot (currently, only ROC supported).
:param server: if True, generate plot inline using matplotlib's "Agg" backend.
:returns: None
"""
# TODO: add more... | python | {
"resource": ""
} |
q267314 | H2OBinomialModelMetrics.confusion_matrix | test | def confusion_matrix(self, metrics=None, thresholds=None):
"""
Get the confusion matrix for the specified metric
:param metrics: A string (or list of strings) among metrics listed in :const:`max_metrics`. Defaults to 'f1'.
:param thresholds: A value (or list of values) between 0 and 1.
... | python | {
"resource": ""
} |
q267315 | H2ODeepWaterEstimator.available | test | def available():
"""Returns True if a deep water model can be built, or False otherwise."""
builder_json = h2o.api("GET /3/ModelBuilders", data={"algo": "deepwater"})
visibility = builder_json["model_builders"]["deepwater"]["visibility"]
if visibility == "Experimental":
print... | python | {
"resource": ""
} |
q267316 | trim_data_back_to | test | def trim_data_back_to(monthToKeep):
"""
This method will remove data from the summary text file and the dictionary file for tests that occurs before
the number of months specified by monthToKeep.
:param monthToKeep:
:return:
"""
global g_failed_tests_info_dict
current_time = time.time()... | python | {
"resource": ""
} |
q267317 | endpoint_groups | test | def endpoint_groups():
"""Return endpoints, grouped by the class which handles them."""
groups = defaultdict(list)
for e in endpoints():
groups[e["class_name"]].append(e)
return groups | python | {
"resource": ""
} |
q267318 | update_site_forward | test | def update_site_forward(apps, schema_editor):
"""Set site domain and name."""
Site = apps.get_model("sites", "Site")
Site.objects.update_or_create(
id=settings.SITE_ID,
defaults={
"domain": "{{cookiecutter.domain_name}}",
"name": "{{cookiecutter.project_name}}",
... | python | {
"resource": ""
} |
q267319 | API.json_data | test | def json_data(self, data=None):
"""Adds the default_data to data and dumps it to a json."""
if data is None:
data = {}
data.update(self.default_data)
return json.dumps(data) | python | {
"resource": ""
} |
q267320 | comment_user | test | def comment_user(self, user_id, amount=None):
""" Comments last user_id's medias """
if not self.check_user(user_id, filter_closed_acc=True):
return False
self.logger.info("Going to comment user_%s's feed:" % user_id)
user_id = self.convert_to_user_id(user_id)
medias = self.get_user_medias(u... | python | {
"resource": ""
} |
q267321 | get_credentials | test | def get_credentials(username=None):
"""Returns login and password stored in `secret.txt`."""
while not check_secret():
pass
while True:
try:
with open(SECRET_FILE, "r") as f:
lines = [line.strip().split(":", 2) for line in f.readlines()]
except ValueError:... | python | {
"resource": ""
} |
q267322 | like_user | test | def like_user(self, user_id, amount=None, filtration=True):
""" Likes last user_id's medias """
if filtration:
if not self.check_user(user_id):
return False
self.logger.info("Liking user_%s's feed:" % user_id)
user_id = self.convert_to_user_id(user_id)
medias = self.get_user_medi... | python | {
"resource": ""
} |
q267323 | like_hashtag | test | def like_hashtag(self, hashtag, amount=None):
""" Likes last medias from hashtag """
self.logger.info("Going to like media with hashtag #%s." % hashtag)
medias = self.get_total_hashtag_medias(hashtag, amount)
return self.like_medias(medias) | python | {
"resource": ""
} |
q267324 | check_not_bot | test | def check_not_bot(self, user_id):
""" Filter bot from real users. """
self.small_delay()
user_id = self.convert_to_user_id(user_id)
if not user_id:
return False
if user_id in self.whitelist:
return True
if user_id in self.blacklist:
return False
user_info = self.get_... | python | {
"resource": ""
} |
q267325 | read_list_from_file | test | def read_list_from_file(file_path, quiet=False):
"""
Reads list from file. One line - one item.
Returns the list if file items.
"""
try:
if not check_if_file_exists(file_path, quiet=quiet):
return []
with codecs.open(file_path, "r", encoding="utf-8") as f:
... | python | {
"resource": ""
} |
q267326 | Message.schedule | test | def schedule(self, schedule_time):
"""Add a specific enqueue time to the message.
:param schedule_time: The scheduled time to enqueue the message.
:type schedule_time: ~datetime.datetime
"""
if not self.properties.message_id:
self.properties.message_id = str(uuid.uui... | python | {
"resource": ""
} |
q267327 | Message.defer | test | def defer(self):
"""Defer the message.
This message will remain in the queue but must be received
specifically by its sequence number in order to be processed.
:raises: ~azure.servicebus.common.errors.MessageAlreadySettled if the message has been settled.
:raises: ~azure.servic... | python | {
"resource": ""
} |
q267328 | VpnSitesConfigurationOperations.download | test | def download(
self, resource_group_name, virtual_wan_name, vpn_sites=None, output_blob_sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""Gives the sas-url to download the configurations for vpn-sites in a
resource group.
:param resource_group_name: ... | python | {
"resource": ""
} |
q267329 | guess_service_info_from_path | test | def guess_service_info_from_path(spec_path):
"""Guess Python Autorest options based on the spec path.
Expected path:
specification/compute/resource-manager/readme.md
"""
spec_path = spec_path.lower()
spec_path = spec_path[spec_path.index("specification"):] # Might raise and it's ok
split_sp... | python | {
"resource": ""
} |
q267330 | PowerShellOperations.update_command | test | def update_command(
self, resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, polling=True, **operation_config):
"""Updates a running PowerShell command with more data.
:param resource_group_name: The resource group name uniquely
identifies the resou... | python | {
"resource": ""
} |
q267331 | ApplicationDefinitionsOperations.delete_by_id | test | def delete_by_id(
self, application_definition_id, custom_headers=None, raw=False, polling=True, **operation_config):
"""Deletes the managed application definition.
:param application_definition_id: The fully qualified ID of the
managed application definition, including the managed... | python | {
"resource": ""
} |
q267332 | ApplicationDefinitionsOperations.create_or_update_by_id | test | def create_or_update_by_id(
self, application_definition_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config):
"""Creates a new managed application definition.
:param application_definition_id: The fully qualified ID of the
managed application definitio... | python | {
"resource": ""
} |
q267333 | _HTTPClient.get_uri | test | def get_uri(self, request):
''' Return the target uri for the request.'''
protocol = request.protocol_override \
if request.protocol_override else self.protocol
protocol = protocol.lower()
port = HTTP_PORT if protocol == 'http' else HTTPS_PORT
return protocol + '://' ... | python | {
"resource": ""
} |
q267334 | _HTTPClient.get_connection | test | def get_connection(self, request):
''' Create connection for the request. '''
protocol = request.protocol_override \
if request.protocol_override else self.protocol
protocol = protocol.lower()
target_host = request.host
# target_port = HTTP_PORT if protocol == 'http' ... | python | {
"resource": ""
} |
q267335 | _HTTPClient.perform_request | test | def perform_request(self, request):
''' Sends request to cloud service server and return the response. '''
connection = self.get_connection(request)
try:
connection.putrequest(request.method, request.path)
self.send_request_headers(connection, request.headers)
... | python | {
"resource": ""
} |
q267336 | ClustersOperations.execute_script_actions | test | def execute_script_actions(
self, resource_group_name, cluster_name, persist_on_success, script_actions=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""Executes script actions on the specified HDInsight cluster.
:param resource_group_name: The name of the resourc... | python | {
"resource": ""
} |
q267337 | FrontDoorManagementClient.check_front_door_name_availability | test | def check_front_door_name_availability(
self, name, type, custom_headers=None, raw=False, **operation_config):
"""Check the availability of a Front Door resource name.
:param name: The resource name to validate.
:type name: str
:param type: The type of the resource whose nam... | python | {
"resource": ""
} |
q267338 | VaultsOperations.purge_deleted | test | def purge_deleted(
self, vault_name, location, custom_headers=None, raw=False, polling=True, **operation_config):
"""Permanently deletes the specified vault. aka Purges the deleted Azure
key vault.
:param vault_name: The name of the soft-deleted vault.
:type vault_name: str
... | python | {
"resource": ""
} |
q267339 | HttpChallenge.get_authorization_server | test | def get_authorization_server(self):
""" Returns the URI for the authorization server if present, otherwise empty string. """
value = ''
for key in ['authorization_uri', 'authorization']:
value = self.get_value(key) or ''
if value:
break
return valu... | python | {
"resource": ""
} |
q267340 | HttpChallenge._validate_request_uri | test | def _validate_request_uri(self, uri):
""" Extracts the host authority from the given URI. """
if not uri:
raise ValueError('request_uri cannot be empty')
uri = parse.urlparse(uri)
if not uri.netloc:
raise ValueError('request_uri must be an absolute URI')
... | python | {
"resource": ""
} |
q267341 | get_cli_profile | test | def get_cli_profile():
"""Return a CLI profile class.
.. versionadded:: 1.1.6
:return: A CLI Profile
:rtype: azure.cli.core._profile.Profile
:raises: ImportError if azure-cli-core package is not available
"""
try:
from azure.cli.core._profile import Profile
from azure.cli.... | python | {
"resource": ""
} |
q267342 | get_azure_cli_credentials | test | def get_azure_cli_credentials(resource=None, with_tenant=False):
"""Return Credentials and default SubscriptionID of current loaded profile of the CLI.
Credentials will be the "az login" command:
https://docs.microsoft.com/cli/azure/authenticate-azure-cli
Default subscription ID is either the only one... | python | {
"resource": ""
} |
q267343 | PredictionOperations.resolve | test | def resolve(
self, app_id, query, timezone_offset=None, verbose=None, staging=None, spell_check=None, bing_spell_check_subscription_key=None, log=None, custom_headers=None, raw=False, **operation_config):
"""Gets predictions for a given utterance, in the form of intents and
entities. The cur... | python | {
"resource": ""
} |
q267344 | MixedRealityClient.check_name_availability_local | test | def check_name_availability_local(
self, location, name, type, custom_headers=None, raw=False, **operation_config):
"""Check Name Availability for global uniqueness.
:param location: The location in which uniqueness will be verified.
:type location: str
:param name: Resource... | python | {
"resource": ""
} |
q267345 | _WinHttpRequest.open | test | def open(self, method, url):
'''
Opens the request.
method:
the request VERB 'GET', 'POST', etc.
url:
the url to connect
'''
flag = VARIANT.create_bool_false()
_method = BSTR(method)
_url = BSTR(url)
_WinHttpRequest._Open(s... | python | {
"resource": ""
} |
q267346 | _WinHttpRequest.set_timeout | test | def set_timeout(self, timeout_in_seconds):
''' Sets up the timeout for the request. '''
timeout_in_ms = int(timeout_in_seconds * 1000)
_WinHttpRequest._SetTimeouts(
self, 0, timeout_in_ms, timeout_in_ms, timeout_in_ms) | python | {
"resource": ""
} |
q267347 | _WinHttpRequest.set_request_header | test | def set_request_header(self, name, value):
''' Sets the request header. '''
_name = BSTR(name)
_value = BSTR(value)
_WinHttpRequest._SetRequestHeader(self, _name, _value) | python | {
"resource": ""
} |
q267348 | _WinHttpRequest.get_all_response_headers | test | def get_all_response_headers(self):
''' Gets back all response headers. '''
bstr_headers = c_void_p()
_WinHttpRequest._GetAllResponseHeaders(self, byref(bstr_headers))
bstr_headers = ctypes.cast(bstr_headers, c_wchar_p)
headers = bstr_headers.value
_SysFreeString(bstr_he... | python | {
"resource": ""
} |
q267349 | _WinHttpRequest.send | test | def send(self, request=None):
''' Sends the request body. '''
# Sends VT_EMPTY if it is GET, HEAD request.
if request is None:
var_empty = VARIANT.create_empty()
_WinHttpRequest._Send(self, var_empty)
else: # Sends request body as SAFEArray.
_request... | python | {
"resource": ""
} |
q267350 | _WinHttpRequest.status | test | def status(self):
''' Gets status of response. '''
status = c_long()
_WinHttpRequest._Status(self, byref(status))
return int(status.value) | python | {
"resource": ""
} |
q267351 | _WinHttpRequest.status_text | test | def status_text(self):
''' Gets status text of response. '''
bstr_status_text = c_void_p()
_WinHttpRequest._StatusText(self, byref(bstr_status_text))
bstr_status_text = ctypes.cast(bstr_status_text, c_wchar_p)
status_text = bstr_status_text.value
_SysFreeString(bstr_stat... | python | {
"resource": ""
} |
q267352 | _WinHttpRequest.response_body | test | def response_body(self):
'''
Gets response body as a SAFEARRAY and converts the SAFEARRAY to str.
'''
var_respbody = VARIANT()
_WinHttpRequest._ResponseBody(self, byref(var_respbody))
if var_respbody.is_safearray_of_bytes():
respbody = var_respbody.str_from_sa... | python | {
"resource": ""
} |
q267353 | _WinHttpRequest.set_client_certificate | test | def set_client_certificate(self, certificate):
'''Sets client certificate for the request. '''
_certificate = BSTR(certificate)
_WinHttpRequest._SetClientCertificate(self, _certificate) | python | {
"resource": ""
} |
q267354 | _HTTPConnection.putrequest | test | def putrequest(self, method, uri):
''' Connects to host and sends the request. '''
protocol = unicode(self.protocol + '://')
url = protocol + self.host + unicode(uri)
self._httprequest.set_timeout(self.timeout)
self._httprequest.open(unicode(method), url)
# sets certifi... | python | {
"resource": ""
} |
q267355 | _HTTPConnection.putheader | test | def putheader(self, name, value):
''' Sends the headers of request. '''
if sys.version_info < (3,):
name = str(name).decode('utf-8')
value = str(value).decode('utf-8')
self._httprequest.set_request_header(name, value) | python | {
"resource": ""
} |
q267356 | _HTTPConnection.send | test | def send(self, request_body):
''' Sends request body. '''
if not request_body:
self._httprequest.send()
else:
self._httprequest.send(request_body) | python | {
"resource": ""
} |
q267357 | _HTTPConnection.getresponse | test | def getresponse(self):
''' Gets the response and generates the _Response object'''
status = self._httprequest.status()
status_text = self._httprequest.status_text()
resp_headers = self._httprequest.get_all_response_headers()
fixed_headers = []
for resp_header in resp_hea... | python | {
"resource": ""
} |
q267358 | _get_readable_id | test | def _get_readable_id(id_name, id_prefix_to_skip):
"""simplified an id to be more friendly for us people"""
# id_name is in the form 'https://namespace.host.suffix/name'
# where name may contain a forward slash!
pos = id_name.find('//')
if pos != -1:
pos += 2
if id_prefix_to_skip:
... | python | {
"resource": ""
} |
q267359 | _get_serialization_name | test | def _get_serialization_name(element_name):
"""converts a Python name into a serializable name"""
known = _KNOWN_SERIALIZATION_XFORMS.get(element_name)
if known is not None:
return known
if element_name.startswith('x_ms_'):
return element_name.replace('_', '-')
if element_name.endswi... | python | {
"resource": ""
} |
q267360 | FaceOperations.verify_face_to_person | test | def verify_face_to_person(
self, face_id, person_id, person_group_id=None, large_person_group_id=None, custom_headers=None, raw=False, **operation_config):
"""Verify whether two faces belong to a same person. Compares a face Id
with a Person Id.
:param face_id: FaceId of the face, c... | python | {
"resource": ""
} |
q267361 | JobOperations.add | test | def add(
self, job, job_add_options=None, custom_headers=None, raw=False, **operation_config):
"""Adds a job to the specified account.
The Batch service supports two ways to control the work done as part of
a job. In the first approach, the user specifies a Job Manager task.
... | python | {
"resource": ""
} |
q267362 | _MinidomXmlToObject.get_entry_properties_from_node | test | def get_entry_properties_from_node(entry, include_id, id_prefix_to_skip=None, use_title_as_id=False):
''' get properties from entry xml '''
properties = {}
etag = entry.getAttributeNS(METADATA_NS, 'etag')
if etag:
properties['etag'] = etag
for updated in _MinidomXmlT... | python | {
"resource": ""
} |
q267363 | _MinidomXmlToObject.get_children_from_path | test | def get_children_from_path(node, *path):
'''descends through a hierarchy of nodes returning the list of children
at the inner most level. Only returns children who share a common parent,
not cousins.'''
cur = node
for index, child in enumerate(path):
if isinstance(ch... | python | {
"resource": ""
} |
q267364 | _MinidomXmlToObject._find_namespaces_from_child | test | def _find_namespaces_from_child(parent, child, namespaces):
"""Recursively searches from the parent to the child,
gathering all the applicable namespaces along the way"""
for cur_child in parent.childNodes:
if cur_child is child:
return True
if _MinidomXml... | python | {
"resource": ""
} |
q267365 | _ServiceBusManagementXmlSerializer.xml_to_namespace | test | def xml_to_namespace(xmlstr):
'''Converts xml response to service bus namespace
The xml format for namespace:
<entry>
<id>uuid:00000000-0000-0000-0000-000000000000;id=0000000</id>
<title type="text">myunittests</title>
<updated>2012-08-22T16:48:10Z</updated>
<content type="application/xml">
<Namesp... | python | {
"resource": ""
} |
q267366 | _ServiceBusManagementXmlSerializer.xml_to_region | test | def xml_to_region(xmlstr):
'''Converts xml response to service bus region
The xml format for region:
<entry>
<id>uuid:157c311f-081f-4b4a-a0ba-a8f990ffd2a3;id=1756759</id>
<title type="text"></title>
<updated>2013-04-10T18:25:29Z</updated>
<content type="application/xml">
<RegionCodeDescription
... | python | {
"resource": ""
} |
q267367 | _ServiceBusManagementXmlSerializer.xml_to_namespace_availability | test | def xml_to_namespace_availability(xmlstr):
'''Converts xml response to service bus namespace availability
The xml format:
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<id>uuid:9fc7c652-1856-47ab-8d74-cd31502ea8e6;id=3683292</id>
<title type="text"></title>
... | python | {
"resource": ""
} |
q267368 | _ServiceBusManagementXmlSerializer.xml_to_metrics | test | def xml_to_metrics(xmlstr, object_type):
'''Converts xml response to service bus metrics objects
The xml format for MetricProperties
<entry>
<id>https://sbgm.windows.net/Metrics(\'listeners.active\')</id>
<title/>
<updated>2014-10-09T11:56:50Z</updated>
<author>
<name/>
</au... | python | {
"resource": ""
} |
q267369 | RunbookDraftOperations.replace_content | test | def replace_content(
self, resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers=None, raw=False, callback=None, polling=True, **operation_config):
"""Replaces the runbook draft content.
:param resource_group_name: Name of an Azure Resource group.
... | python | {
"resource": ""
} |
q267370 | DomainsOperations.list_recommendations | test | def list_recommendations(
self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config):
"""Get domain name recommendations based on keywords.
Get domain name recommendations based on keywords.
:param keywords: Keywords to be used for gen... | python | {
"resource": ""
} |
q267371 | KnowledgebaseOperations.update | test | def update(
self, kb_id, update_kb, custom_headers=None, raw=False, **operation_config):
"""Asynchronous operation to modify a knowledgebase.
:param kb_id: Knowledgebase id.
:type kb_id: str
:param update_kb: Post body of the request.
:type update_kb:
~azure... | python | {
"resource": ""
} |
q267372 | UsersOperations.get_member_groups | test | def get_member_groups(
self, object_id, security_enabled_only, additional_properties=None, custom_headers=None, raw=False, **operation_config):
"""Gets a collection that contains the object IDs of the groups of which
the user is a member.
:param object_id: The object ID of the user ... | python | {
"resource": ""
} |
q267373 | build_package_from_pr_number | test | def build_package_from_pr_number(gh_token, sdk_id, pr_number, output_folder, *, with_comment=False):
"""Will clone the given PR branch and vuild the package with the given name."""
con = Github(gh_token)
repo = con.get_repo(sdk_id)
sdk_pr = repo.get_pull(pr_number)
# "get_files" of Github only down... | python | {
"resource": ""
} |
q267374 | RedisOperations.import_data | test | def import_data(
self, resource_group_name, name, files, format=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""Import data into Redis cache.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param name: T... | python | {
"resource": ""
} |
q267375 | RunbookOperations.publish | test | def publish(
self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Publish runbook draft.
:param resource_group_name: Name of an Azure Resource group.
:type resource_group_name: str
:param auto... | python | {
"resource": ""
} |
q267376 | Message.renew_lock | test | async def renew_lock(self):
"""Renew the message lock.
This will maintain the lock on the message to ensure
it is not returned to the queue to be reprocessed. In order to complete (or otherwise settle)
the message, the lock must be maintained. Messages received via ReceiveAndDelete mode... | python | {
"resource": ""
} |
q267377 | AlterationsOperations.replace | test | def replace(
self, word_alterations, custom_headers=None, raw=False, **operation_config):
"""Replace alterations data.
:param word_alterations: Collection of word alterations.
:type word_alterations:
list[~azure.cognitiveservices.knowledge.qnamaker.models.AlterationsDTO]
... | python | {
"resource": ""
} |
q267378 | MeshSecretValueOperations.add_value | test | def add_value(
self, secret_resource_name, secret_value_resource_name, name, value=None, custom_headers=None, raw=False, **operation_config):
"""Adds the specified value as a new version of the specified secret
resource.
Creates a new value of the specified secret resource. The name... | python | {
"resource": ""
} |
q267379 | ServiceManagementService.get_storage_account_properties | test | def get_storage_account_properties(self, service_name):
'''
Returns system properties for the specified storage account.
service_name:
Name of the storage service account.
'''
_validate_not_none('service_name', service_name)
return self._perform_get(self._get... | python | {
"resource": ""
} |
q267380 | ServiceManagementService.get_storage_account_keys | test | def get_storage_account_keys(self, service_name):
'''
Returns the primary and secondary access keys for the specified
storage account.
service_name:
Name of the storage service account.
'''
_validate_not_none('service_name', service_name)
return self.... | python | {
"resource": ""
} |
q267381 | ServiceManagementService.regenerate_storage_account_keys | test | def regenerate_storage_account_keys(self, service_name, key_type):
'''
Regenerates the primary or secondary access key for the specified
storage account.
service_name:
Name of the storage service account.
key_type:
Specifies which key to regenerate. Valid... | python | {
"resource": ""
} |
q267382 | ServiceManagementService.create_storage_account | test | def create_storage_account(self, service_name, description, label,
affinity_group=None, location=None,
geo_replication_enabled=None,
extended_properties=None,
account_type='Standard_GRS'):
... | python | {
"resource": ""
} |
q267383 | ServiceManagementService.update_storage_account | test | def update_storage_account(self, service_name, description=None,
label=None, geo_replication_enabled=None,
extended_properties=None,
account_type='Standard_GRS'):
'''
Updates the label, the description, and enab... | python | {
"resource": ""
} |
q267384 | ServiceManagementService.delete_storage_account | test | def delete_storage_account(self, service_name):
'''
Deletes the specified storage account from Windows Azure.
service_name:
Name of the storage service account.
'''
_validate_not_none('service_name', service_name)
return self._perform_delete(
self... | python | {
"resource": ""
} |
q267385 | ServiceManagementService.check_storage_account_name_availability | test | def check_storage_account_name_availability(self, service_name):
'''
Checks to see if the specified storage account name is available, or
if it has already been taken.
service_name:
Name of the storage service account.
'''
_validate_not_none('service_name', s... | python | {
"resource": ""
} |
q267386 | ServiceManagementService.get_hosted_service_properties | test | def get_hosted_service_properties(self, service_name, embed_detail=False):
'''
Retrieves system properties for the specified hosted service. These
properties include the service name and service type; the name of the
affinity group to which the service belongs, or its location if it is
... | python | {
"resource": ""
} |
q267387 | ServiceManagementService.create_hosted_service | test | def create_hosted_service(self, service_name, label, description=None,
location=None, affinity_group=None,
extended_properties=None):
'''
Creates a new hosted service in Windows Azure.
service_name:
A name for the hosted se... | python | {
"resource": ""
} |
q267388 | ServiceManagementService.delete_hosted_service | test | def delete_hosted_service(self, service_name, complete=False):
'''
Deletes the specified hosted service from Windows Azure.
service_name:
Name of the hosted service.
complete:
True if all OS/data disks and the source blobs for the disks should
also be... | python | {
"resource": ""
} |
q267389 | ServiceManagementService.create_deployment | test | def create_deployment(self, service_name, deployment_slot, name,
package_url, label, configuration,
start_deployment=False,
treat_warnings_as_error=False,
extended_properties=None):
'''
Uploads a new ... | python | {
"resource": ""
} |
q267390 | ServiceManagementService.delete_deployment | test | def delete_deployment(self, service_name, deployment_name,delete_vhd=False):
'''
Deletes the specified deployment.
service_name:
Name of the hosted service.
deployment_name:
The name of the deployment.
'''
_validate_not_none('service_name', servic... | python | {
"resource": ""
} |
q267391 | ServiceManagementService.swap_deployment | test | def swap_deployment(self, service_name, production, source_deployment):
'''
Initiates a virtual IP swap between the staging and production
deployment environments for a service. If the service is currently
running in the staging environment, it will be swapped to the
production e... | python | {
"resource": ""
} |
q267392 | ServiceManagementService.change_deployment_configuration | test | def change_deployment_configuration(self, service_name, deployment_name,
configuration,
treat_warnings_as_error=False,
mode='Auto', extended_properties=None):
'''
Initiates a change to... | python | {
"resource": ""
} |
q267393 | ServiceManagementService.update_deployment_status | test | def update_deployment_status(self, service_name, deployment_name, status):
'''
Initiates a change in deployment status.
service_name:
Name of the hosted service.
deployment_name:
The name of the deployment.
status:
The change to initiate to th... | python | {
"resource": ""
} |
q267394 | ServiceManagementService.upgrade_deployment | test | def upgrade_deployment(self, service_name, deployment_name, mode,
package_url, configuration, label, force,
role_to_upgrade=None, extended_properties=None):
'''
Initiates an upgrade.
service_name:
Name of the hosted service.
... | python | {
"resource": ""
} |
q267395 | ServiceManagementService.walk_upgrade_domain | test | def walk_upgrade_domain(self, service_name, deployment_name,
upgrade_domain):
'''
Specifies the next upgrade domain to be walked during manual in-place
upgrade or configuration change.
service_name:
Name of the hosted service.
deployment_n... | python | {
"resource": ""
} |
q267396 | ServiceManagementService.reboot_role_instance | test | def reboot_role_instance(self, service_name, deployment_name,
role_instance_name):
'''
Requests a reboot of a role instance that is running in a deployment.
service_name:
Name of the hosted service.
deployment_name:
The name of the de... | python | {
"resource": ""
} |
q267397 | ServiceManagementService.delete_role_instances | test | def delete_role_instances(self, service_name, deployment_name,
role_instance_names):
'''
Reinstalls the operating system on instances of web roles or worker
roles and initializes the storage resources that are used by them. If
you do not want to initialize st... | python | {
"resource": ""
} |
q267398 | ServiceManagementService.check_hosted_service_name_availability | test | def check_hosted_service_name_availability(self, service_name):
'''
Checks to see if the specified hosted service name is available, or if
it has already been taken.
service_name:
Name of the hosted service.
'''
_validate_not_none('service_name', service_name... | python | {
"resource": ""
} |
q267399 | ServiceManagementService.list_service_certificates | test | def list_service_certificates(self, service_name):
'''
Lists all of the service certificates associated with the specified
hosted service.
service_name:
Name of the hosted service.
'''
_validate_not_none('service_name', service_name)
return self._perf... | python | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.